File tree 11 files changed +187
-35
lines changed
11 files changed +187
-35
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,5 @@ Makefile*
36
36
37
37
# QtCtreator CMake
38
38
CMakeLists.txt.user *
39
+
40
+ /debug
Original file line number Diff line number Diff line change
1
+ import QtQuick 2.0
2
+ import QtQuick.Controls 1.4
3
+ import QtQuick.Layouts 1.3
4
+
5
+ Rectangle {
6
+ id: rootRectangle
7
+ anchors .fill : parent
8
+
9
+ CustomToolbar {
10
+ id: mainToolBar
11
+ Layout .preferredWidth : parent .width
12
+
13
+ ToolButton{
14
+ id: goBackButton
15
+ anchors .left : toolBarTitle .right
16
+ width: parent .height
17
+ height: width
18
+
19
+ Image {
20
+ anchors .verticalCenter : parent .verticalCenter
21
+ anchors .horizontalCenter : parent .horizontalCenter
22
+ source: " icons/back_black.png"
23
+ width: parent .width * 0.7
24
+ height: width
25
+ }
26
+
27
+ onClicked: {
28
+ mainStack .pop ();
29
+ }
30
+ }
31
+ }
32
+
33
+ Rectangle {
34
+ id: contentWrapper
35
+ width: parent .width > 1200 ? 1080 : parent .width * 0.9
36
+ anchors .top : mainToolBar .bottom
37
+ anchors .bottom : parent .bottom
38
+ anchors .horizontalCenter : parent .horizontalCenter
39
+ anchors .leftMargin : 10
40
+ anchors .rightMargin : 10
41
+ clip: true
42
+
43
+ Flickable {
44
+ anchors .fill : parent
45
+ contentWidth: parent .width
46
+ contentHeight: colForm .height
47
+ interactive: true
48
+ boundsBehavior: Flickable .StopAtBounds
49
+
50
+ Column {
51
+ id: formWrapper
52
+ width: parent .width
53
+ spacing: 10
54
+
55
+ Column {
56
+ id: titleGroup
57
+ anchors .horizontalCenter : parent .horizontalCenter
58
+
59
+ Text {
60
+ id: titleLabel
61
+ anchors .horizontalCenter : parent .horizontalCenter
62
+ text: " Title"
63
+ }
64
+
65
+ TextField {
66
+ id: titleField
67
+ placeholderText: " Post title..."
68
+ }
69
+ }
70
+
71
+ Separator {}
72
+
73
+ Column {
74
+ id: contentGroup
75
+ anchors .horizontalCenter : parent .horizontalCenter
76
+
77
+ Text {
78
+ id: contentLabel
79
+ anchors .horizontalCenter : parent .horizontalCenter
80
+ text: " Content"
81
+ }
82
+
83
+ TextArea {
84
+ id: contentField
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
Original file line number Diff line number Diff line change
1
+ import QtQuick 2.0
2
+ import QtQuick.Controls 1.4
3
+ import QtQuick.Controls.Styles 1.4
4
+
5
+ ToolBar {
6
+ width: parent .width
7
+ height: 40
8
+
9
+ Text {
10
+ id: toolBarTitle
11
+ text: " iGym2"
12
+ anchors .left : parent .left
13
+ anchors .verticalCenter : parent .verticalCenter
14
+ font .pointSize : 20
15
+ }
16
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import QtQuick 2.0
2
+
3
+ Rectangle {
4
+ anchors .horizontalCenter : parent .horizontalCenter
5
+ width: parent .width
6
+ height: 1
7
+ opacity: 0.15
8
+ color : " black"
9
+ }
Original file line number Diff line number Diff line change
1
+ import QtQuick 2.0
2
+ import QtQuick.Controls 1.4
3
+ import QtQuick.Layouts 1.3
4
+
5
+ ColumnLayout {
6
+ anchors .fill : parent
7
+ spacing: 0
8
+
9
+ Component {
10
+ id: comp_addPostView
11
+ AddPostView {}
12
+ }
13
+
14
+ CustomToolbar {
15
+ Layout .preferredWidth : parent .width
16
+
17
+ ToolButton{
18
+ id: addPostButton
19
+ anchors .left : toolBarTitle .right
20
+ width: parent .height
21
+ height: width
22
+
23
+ Image {
24
+ anchors .verticalCenter : parent .verticalCenter
25
+ anchors .horizontalCenter : parent .horizontalCenter
26
+ source: " icons/add_black.png"
27
+ width: parent .width * 0.7
28
+ height: width
29
+ }
30
+
31
+ onClicked: {
32
+ mainStack .push (comp_addPostView);
33
+ }
34
+ }
35
+ }
36
+
37
+ Rectangle {
38
+ Layout .preferredWidth : parent .width
39
+ Layout .preferredHeight : parent .height * 0.5
40
+ color: " red"
41
+ }
42
+
43
+ Rectangle {
44
+ Layout .preferredWidth : parent .width
45
+ Layout .preferredHeight : parent .height * 0.5
46
+ color: " blue"
47
+ }
48
+ }
Original file line number Diff line number Diff line change 1
1
#include < QGuiApplication>
2
2
#include < QQmlApplicationEngine>
3
+ #include < QQmlContext>
4
+
5
+ #include " mediator.h"
3
6
4
7
int main (int argc, char *argv[])
5
8
{
6
9
QGuiApplication app (argc, argv);
10
+ Mediator mediator;
7
11
8
12
QQmlApplicationEngine engine;
13
+ engine.rootContext ()->setContextProperty (" mediator" , &mediator);
9
14
engine.load (QUrl (QStringLiteral (" qrc:/main.qml" )));
10
15
11
16
return app.exec ();
Original file line number Diff line number Diff line change 1
1
import QtQuick 2.6
2
2
import QtQuick.Window 2.2
3
+ import QtQuick.Controls 1.4
3
4
4
5
Window {
6
+ id: mainWindow
5
7
visible: true
6
8
width: 640
7
9
height: 480
8
- title: qsTr (" Hello World " )
10
+ title: qsTr (" iGym " )
9
11
10
- MainForm {
12
+ Component {
13
+ id: mainComponent
14
+ Workouts {}
15
+ }
16
+
17
+ StackView {
18
+ id: mainStack
19
+ initialItem: mainComponent
11
20
anchors .fill : parent
12
- mouseArea .onClicked : {
13
- console .log (qsTr (' Clicked on background. Text: "' + textEdit .text + ' "' ))
14
- }
15
21
}
16
22
}
Original file line number Diff line number Diff line change 1
1
<RCC>
2
2
<qresource prefix="/">
3
3
<file>main.qml</file>
4
- <file>MainForm.ui.qml</file>
4
+ <file>AddPostView.qml</file>
5
+ <file>CustomToolbar.qml</file>
6
+ <file>Separator.qml</file>
7
+ <file>Workouts.qml</file>
8
+ <file>icons/add_black.png</file>
9
+ <file>icons/back_black.png</file>
5
10
</qresource>
6
11
</RCC>
You can’t perform that action at this time.
0 commit comments