Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 7ae023c

Browse files
committed
complete qml doc
1 parent bd75e15 commit 7ae023c

23 files changed

+631
-72
lines changed

doc/Doxyfile

+10-3
Original file line numberDiff line numberDiff line change
@@ -900,13 +900,14 @@ RECURSIVE = YES
900900
EXCLUDE = ../src/3rdparty \
901901
../src/plugins \
902902
../src/imports/mvvmquick/settingsuibuilder.h \
903-
../src/imports/mvvmquick/TintIcon.qml \
904903
../src/imports/mvvmquick/MsgBoxBase.qml \
905904
../src/imports/mvvmquick/MsgBox.qml \
905+
../src/imports/mvvmquick/ProgressDialog.qml \
906906
../src/imports/mvvmquick/InputDialog.qml \
907907
../src/imports/mvvmquick/ListSection.qml \
908908
../src/imports/mvvmquick/OverviewListView.qml \
909909
../src/imports/mvvmquick/SectionListView.qml \
910+
../src/imports/mvvmquick/TimeTumbler.qml \
910911
../src/imports/mvvmquick/AndroidFileDialog.qml \
911912
../src/imports/mvvmquick/AndroidFolderDialog.qml \
912913
../src/imports/mvvmdatasyncquick/SubButton.qml \
@@ -936,7 +937,8 @@ EXCLUDE_PATTERNS = moc_* \
936937
*.cpp \
937938
*/src/mvvmquick/*.qml \
938939
*/src/mvvmdatasyncquick/*.qml \
939-
*/imports/mvvmquick/*model.h
940+
*/imports/mvvmquick/*model.h \
941+
*/imports/mvvmquick/*10.qml
940942

941943
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
942944
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -972,20 +974,25 @@ EXCLUDE_SYMBOLS = QtMvvm::__helpertypes \
972974
QPaintEngineEx \
973975
QQmlExtensionInterface \
974976
QTechniqueFilter \
977+
QAbstractXmlReceiver \
975978
\
976979
ApplicationWindow \
980+
Control \
977981
Dialog \
978982
Drawer \
983+
GridLayout \
979984
Item \
985+
ItemDelegate \
980986
Label \
981987
ListView \
982988
Page \
983989
ProgressBar \
984990
QtObject \
985991
RoundButton \
992+
RowLayout \
986993
StackView \
987994
ToolBar \
988-
ToolButton
995+
ToolButton \
989996

990997
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
991998
# that contain example code fragments that are included (see the \include

doc/qtmvvm.dox

+14-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following list shows which classes belong to which Qt module, in alphabetica
4949
@brief The QML import for the QtMvvmCore QML module
5050

5151
<b>Current Version</b><br/>
52-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0
52+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.1
5353

5454
<b>Available Types</b>
5555
- @ref QtMvvm::MessageConfig "MessageConfig" (uncreatable)
@@ -68,12 +68,14 @@ The following list shows which classes belong to which Qt module, in alphabetica
6868
@brief The QML import for the QtMvvmQuick QML module
6969

7070
<b>Current Version</b><br/>
71-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0
71+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.1
7272

7373
<b>Available Types</b>
7474
- @ref QtMvvm::InputViewFactory "InputViewFactory" (uncreatable)
7575
- QuickPresenter (singleton)
7676
- FileChooser
77+
- ViewPlaceholder
78+
- ColorHelper
7779
- AlertDialog
7880
- ContrastToolBar
7981
- ToolBarLabel
@@ -82,6 +84,14 @@ The following list shows which classes belong to which Qt module, in alphabetica
8284
- MenuButton
8385
- FileDialog
8486
- FolderDialog
87+
- TintIcon
88+
- SearchBar
89+
- RoundMenuButton
90+
- DecorLabel
91+
- MsgDelegate
92+
- TimeEdit
93+
- DateEdit
94+
- ColorEdit
8595
- PresenterProgress
8696
- PresentingStackView
8797
- PopupPresenter
@@ -96,7 +106,7 @@ The following list shows which classes belong to which Qt module, in alphabetica
96106
@brief The QML import for the QtMvvmDataSyncCore QML module
97107

98108
<b>Current Version</b><br/>
99-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0
109+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.1
100110

101111
<b>Available Types</b>
102112
- @ref QtMvvm::AccountModel "AccountModel"
@@ -115,7 +125,7 @@ The following list shows which classes belong to which Qt module, in alphabetica
115125
@brief The QML import for the QtMvvmDataSyncQuick QML module
116126

117127
<b>Current Version</b><br/>
118-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0
128+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.1
119129

120130
<b>Available Types</b>
121131
- DataSyncView

src/imports/mvvmdatasyncquick/plugins.qmltypes

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import QtQuick.tooling 1.2
88

99
Module {
1010
dependencies: [
11+
"Qt.labs.calendar 1.0",
1112
"Qt.labs.platform 1.0",
1213
"QtGraphicalEffects 1.0",
1314
"QtQml 2.2",

src/imports/mvvmquick/ColorEdit.qml

+29
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ import QtQuick.Layouts 1.3
55
import QtGraphicalEffects 1.0
66
import de.skycoder42.QtMvvm.Quick 1.1
77

8+
/*! @brief A edit view to edit colors by using a color picker
9+
*
10+
* @extends QtQuick.Layouts.GridLayout
11+
*
12+
* You can use this edit if you want to let the user select a color. It is made out of three
13+
* sliders to control hue, saturation and value and a TextField to enter a hex color code,
14+
* next to a small box that previews the color
15+
*/
816
GridLayout {
917
id: _colorPicker
1018
columns: 2
@@ -14,7 +22,28 @@ GridLayout {
1422
id: helper
1523
}
1624

25+
/*! @brief Specifies whether the alpha channel can be edited
26+
*
27+
* @default{`false`}
28+
*
29+
* If set to true, the user can enter a hex color string with an additional alpha value.
30+
* The sliders are uneffected from this property
31+
*
32+
* @accessors{
33+
* @memberAc{alpha}
34+
* @notifyAc{alphaChanged()}
35+
* }
36+
*/
1737
property bool alpha: false
38+
/*! @brief The color currently displayed and edited
39+
*
40+
* @default{`undefined`}
41+
*
42+
* @accessors{
43+
* @memberAc{color}
44+
* @notifyAc{colorChanged()}
45+
* }
46+
*/
1847
property color color
1948
onColorChanged: {
2049
if(!_p.changing){

src/imports/mvvmquick/ColorHelper.qml

+39
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,34 @@ import QtQuick.Controls.Material 2.3
44
import QtQuick.Controls.Universal 2.3
55
import de.skycoder42.QtMvvm.Quick 1.1
66

7+
/*! @brief A helper class to get style-dependant colors
8+
*
9+
* @extends QtQuick.Controls.Control
10+
*
11+
* Simply instanciate a helper within some control. It will pick up the style settings from
12+
* what it is in and provide them via the properties
13+
*
14+
* @sa ContrastToolBar
15+
*/
716
Control {
817
id: _colorHelper
918
visible: false
1019

20+
/*! @brief The color to use to highlight stuff
21+
*
22+
* @default{<i>style dependant</i>}
23+
*
24+
* Style | Value
25+
* -------------|-------
26+
* Material | Material.accent
27+
* Universal | Universal.accent
28+
* Others | palette.highlight
29+
*
30+
* @accessors{
31+
* @memberAc{highlight}
32+
* @notifyAc{highlightChanged()}
33+
* }
34+
*/
1135
readonly property color highlight: {
1236
if(QuickPresenter.currentStyle === "Material")
1337
return Material.accent;
@@ -17,6 +41,21 @@ Control {
1741
return palette.highlight;
1842
}
1943

44+
/*! @brief The color to use for text
45+
*
46+
* @default{<i>style dependant</i>}
47+
*
48+
* Style | Value
49+
* -------------|-------
50+
* Material | Material.foreground
51+
* Universal | Universal.foreground
52+
* Others | palette.windowText
53+
*
54+
* @accessors{
55+
* @memberAc{text}
56+
* @notifyAc{textChanged()}
57+
* }
58+
*/
2059
readonly property color text: {
2160
if(QuickPresenter.currentStyle === "Material")
2261
return Material.foreground;

src/imports/mvvmquick/ContrastToolBar.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ToolBar {
1717

1818
height: 56
1919

20-
// @copydoc QuickPresenter::accentTextColor
20+
//! @copydoc QuickPresenter::accentTextColor
2121
function accentTextColor(accentColor, baseColor) {
2222
return QuickPresenter.accentTextColor(accentColor, baseColor);
2323
}

src/imports/mvvmquick/DateEdit.qml

+50-7
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,67 @@ import QtQuick.Layouts 1.3
44
import Qt.labs.calendar 1.0
55
import de.skycoder42.QtMvvm.Quick 1.1
66

7+
/*! @brief A edit view to edit dates by using a calendar
8+
*
9+
* @extends QtQuick.ListView
10+
*
11+
* You can use this edit if you want to let the user select a date. You can use the properties
12+
* to control wich tumblers are shown and which format they use.
13+
*
14+
* @note This edit currently uses Qt.labs.calendar - an experimental module, and thus might
15+
* not always function perfectly or break after Qt updates
16+
*/
717
ListView {
818
id: _calenderList
919

20+
/*! @brief The smallest possible date the user can select
21+
*
22+
* @default{`new Date(1970, 0, 1)`}
23+
*
24+
* @note Only the date-componente of the date object is used.
25+
*
26+
* @accessors{
27+
* @memberAc{firstDate}
28+
* @notifyAc{firstDateChanged()}
29+
* }
30+
*/
1031
property date firstDate: new Date(1970, 0, 1)
32+
/*! @brief The highest possible date the user can select
33+
*
34+
* @default{`new Date(9999, 11, 31)`}
35+
*
36+
* @note Only the date-componente of the date object is used.
37+
*
38+
* @accessors{
39+
* @memberAc{lastDate}
40+
* @notifyAc{lastDateChanged()}
41+
* }
42+
*/
1143
property date lastDate: new Date(9999, 11, 31)
12-
property date date: today();
13-
14-
function today() {
15-
var cDate = new Date();
16-
cDate.setHours(0, 0, 0, 0, 0);
17-
return cDate;
18-
}
44+
/*! @brief The date currently displayed and edited
45+
*
46+
* @default{`new Date()`}
47+
*
48+
* @note Only the date-componente of the date object is used.
49+
*
50+
* @accessors{
51+
* @memberAc{date}
52+
* @notifyAc{dateChanged()}
53+
* }
54+
*/
55+
property date date: _p.today();
1956

2057
QtObject {
2158
id: _p
2259

2360
property bool _skipNextFocus: false
2461

62+
function today() {
63+
var cDate = new Date();
64+
cDate.setHours(0, 0, 0, 0, 0);
65+
return cDate;
66+
}
67+
2568
function focusDate() {
2669
if(_skipNextFocus)
2770
_skipNextFocus = false;

src/imports/mvvmquick/DecorLabel.qml

+31
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,46 @@ import QtQuick 2.10
22
import QtQuick.Controls 2.3
33
import de.skycoder42.QtMvvm.Quick 1.1
44

5+
/*! @brief An extension of the @ref QtQuick.Controls.Label "Label" for better appearance when
6+
* used in FormLayouts
7+
*
8+
* @extends QtQuick.Controls.Label
9+
*
10+
* This label will automatically change it's color to the highlight color if the the edit
11+
* it is connected to has input focus. This serves as a visual cue to the selected input
12+
*
13+
* @sa DecorLabel::edit
14+
*/
515
Label {
616
id: _decorLabel
717

818
ColorHelper {
919
id: helper
1020
}
1121

22+
/*! @brief The edit this label is connected to
23+
*
24+
* @default{`nextItemInFocusChain()`}
25+
*
26+
* If the edit gets the input focus, this label gets highlighted
27+
*
28+
* @accessors{
29+
* @memberAc{edit}
30+
* @notifyAc{editChanged()}
31+
* }
32+
*/
1233
property Item edit: _decorLabel.nextItemInFocusChain()
1334

35+
/*! @brief Checks if the connected edit currently has input focus
36+
*
37+
* @default{`false`}
38+
*
39+
* @accessors{
40+
* @memberAc{editHasFocus}
41+
* @notifyAc{editHasFocusChanged()}
42+
* @readonlyAc
43+
* }
44+
*/
1445
readonly property bool editHasFocus: edit && edit.focus
1546

1647
color: editHasFocus ? helper.highlight : helper.text

src/imports/mvvmquick/FileDialog.qml

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import de.skycoder42.QtMvvm.Quick 1.1
1313
* dialog message type
1414
*
1515
* @note On Android, the dialog extends the FileChooser. For all other platforms, it extends
16-
* the @ref Qt.labs.platform.FileDialog "Qt labs FileDialog"
16+
* the @ref Qt.labs.platform.FileDialog "Qt labs FileDialog" - an experimental module, and
17+
* thus might not always function perfectly or break after Qt updates
1718
*/
1819
Labs.FileDialog {
1920
id: _fileDialog
@@ -68,11 +69,11 @@ Labs.FileDialog {
6869
modality: Qt.WindowModal
6970
folder: msgConfig.defaultValue
7071
fileMode: {
71-
if(msgConfig.subType == "open")
72+
if(msgConfig.subType === "open")
7273
return Labs.FileDialog.OpenFile;
73-
else if(msgConfig.subType == "files")
74+
else if(msgConfig.subType === "files")
7475
return Labs.FileDialog.OpenFiles;
75-
else if(msgConfig.subType == "save")
76+
else if(msgConfig.subType === "save")
7677
return Labs.FileDialog.SaveFile;
7778
else {
7879
return Labs.FileDialog.OpenFile; //fallback
@@ -87,7 +88,7 @@ Labs.FileDialog {
8788

8889
onAccepted: {
8990
if(msgResult) {
90-
if(msgConfig.subType == "files")
91+
if(msgConfig.subType === "files")
9192
msgResult.result = _fileDialog.files;
9293
else
9394
msgResult.result = _fileDialog.file;

src/imports/mvvmquick/FolderDialog.qml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import de.skycoder42.QtMvvm.Quick 1.1
1313
* dialog message type
1414
*
1515
* @note On Android, the dialog extends the FileChooser. For all other platforms, it extends
16-
* the @ref Qt.labs.platform.FolderDialog "Qt labs FolderDialog"
16+
* the @ref Qt.labs.platform.FolderDialog "Qt labs FolderDialog" - an experimental module, and
17+
* thus might not always function perfectly or break after Qt updates
1718
*/
1819
Labs.FolderDialog {
1920
id: _folderDialog

0 commit comments

Comments
 (0)