Skip to content

Commit bd24e77

Browse files
committed
Basic Code Of Any Application
0 parents  commit bd24e77

File tree

597 files changed

+3468
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+3468
-0
lines changed

Diff for: .gitignore

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This file is used to ignore files which are generated
2+
# ----------------------------------------------------------------------------
3+
4+
*~
5+
*.autosave
6+
*.a
7+
*.core
8+
*.moc
9+
*.o
10+
*.obj
11+
*.orig
12+
*.rej
13+
*.so
14+
*.so.*
15+
*_pch.h.cpp
16+
*_resource.rc
17+
*.qm
18+
.#*
19+
*.*#
20+
core
21+
!core/
22+
tags
23+
.DS_Store
24+
.directory
25+
*.debug
26+
Makefile*
27+
*.prl
28+
*.app
29+
moc_*.cpp
30+
ui_*.h
31+
qrc_*.cpp
32+
Thumbs.db
33+
*.res
34+
*.rc
35+
/.qmake.cache
36+
/.qmake.stash
37+
38+
# qtcreator generated files
39+
*.pro.user*
40+
41+
# xemacs temporary files
42+
*.flc
43+
44+
# Vim temporary files
45+
.*.swp
46+
47+
# Visual Studio generated files
48+
*.ib_pdb_index
49+
*.idb
50+
*.ilk
51+
*.pdb
52+
*.sln
53+
*.suo
54+
*.vcproj
55+
*vcproj.*.*.user
56+
*.ncb
57+
*.sdf
58+
*.opensdf
59+
*.vcxproj
60+
*vcxproj.*
61+
62+
# MinGW generated files
63+
*.Debug
64+
*.Release
65+
66+
# Python byte code
67+
*.pyc
68+
69+
# Binaries
70+
# --------
71+
*.dll
72+
*.exe
73+

Diff for: GameScreens/HomeScreen.qml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import QtQuick 2.15
2+
import QtQuick.Layouts 1.3
3+
import "./"
4+
import "../ScreensComponents"
5+
ScreenPage{
6+
anchors.fill: parent
7+
property int buttonWidth:root.width *0.20
8+
property int buttonHeight:root.height *0.25
9+
10+
}

Diff for: GameScreens/ScreenPage.qml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import QtQuick 2.15
2+
Item {
3+
anchors.fill: parent
4+
Rectangle{
5+
anchors.fill: parent
6+
color:backgroundColor
7+
}
8+
}

Diff for: Img/Icons/bars-solid.svg

+1
Loading

Diff for: Img/Icons/gear-solid.svg

+1
Loading

Diff for: Img/Icons/globe-solid.svg

+1
Loading

Diff for: Img/Icons/hire-a-helper.svg

+1
Loading

Diff for: Img/Icons/house-user-solid.svg

+1
Loading

Diff for: ScreensComponents/LeftSideDrawer/DrawerItem.qml

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
import QtQuick 2.0
2+
import QtQuick.Layouts 1.0
3+
import QtQuick.Controls 2.0
4+
5+
ItemDelegate {
6+
id:root
7+
//
8+
// Do not allow user to click spacers and separators
9+
//
10+
enabled: !isSpacer (index) && !isSeparator (index)
11+
12+
//
13+
// Alias to parent list view
14+
//
15+
property ListModel model
16+
property ListView pageSelector
17+
18+
//
19+
// Returns true if \c spacer is defined and is equal to \c true
20+
//
21+
function isSpacer (index) {
22+
if (typeof (model.get (index).spacer) !== "undefined")
23+
return model.get (index).spacer
24+
25+
return false
26+
}
27+
28+
//
29+
// Returns true if \c link is defined and is equal to \c true
30+
//
31+
function isLink (index) {
32+
if (typeof (model.get (index).link) !== "undefined")
33+
return model.get (index).link
34+
35+
return false
36+
}
37+
38+
//
39+
// Returns true if \c separator is defiend and is equal to \c true
40+
//
41+
function isSeparator (index) {
42+
if (typeof (model.get (index).separator) !== "undefined")
43+
return model.get (index).separator
44+
45+
return false
46+
}
47+
48+
//
49+
// Returns the icon for the drawer item
50+
//
51+
function iconSource (index) {
52+
if (typeof (model.get (index).pageIcon) !== "undefined")
53+
return model.get (index).pageIcon
54+
55+
return ""
56+
}
57+
58+
//
59+
// Returns the title for the drawer item
60+
//
61+
function itemText (index) {
62+
if (typeof (model.get (index).pageTitle) !== "undefined")
63+
return model.get (index).pageTitle
64+
65+
return ""
66+
}
67+
68+
//
69+
// Returns \c true if separatoText is correctly defined
70+
//
71+
function hasSeparatorText (index) {
72+
return isSeparator (index) && typeof (model.get (index).separatorText) !== "undefined"
73+
}
74+
75+
//
76+
// Decide if we should highlight the item
77+
//
78+
highlighted: ListView.isCurrentItem ? !isLink (index) : false
79+
80+
//
81+
// Calculate height depending on the type of item that we are
82+
//
83+
height: {
84+
if (isSpacer (index)) {
85+
var usedHeight = 0
86+
for (var i = 0; i < model.count; ++i) {
87+
if (!isSpacer (i)) {
88+
if (!isSeparator (i) || hasSeparatorText (i))
89+
usedHeight += 48
90+
else
91+
usedHeight += 8
92+
}
93+
}
94+
95+
return Math.max (8, pageSelector.height - usedHeight)
96+
}
97+
98+
if (enabled || hasSeparatorText (index))
99+
return 48
100+
101+
return 8
102+
}
103+
104+
105+
//
106+
// Separator layout
107+
//
108+
ColumnLayout {
109+
spacing: 8
110+
anchors.fill: parent
111+
visible: isSeparator (index)
112+
anchors.verticalCenter: parent.verticalCenter
113+
114+
Item {
115+
Layout.fillHeight: true
116+
}
117+
118+
Rectangle {
119+
height: 0.5
120+
opacity: 0.20
121+
color: "#000000"
122+
Layout.fillWidth: true
123+
}
124+
125+
Label {
126+
opacity: 0.54
127+
color: "#000000"
128+
font.pixelSize: 14
129+
font.weight: Font.Medium
130+
text: hasSeparatorText (index) ? separatorText : ""
131+
Layout.margins: 16
132+
Layout.fillWidth: true
133+
}
134+
135+
Item {
136+
Layout.fillHeight: true
137+
}
138+
}
139+
140+
//
141+
// Normal layout
142+
//
143+
RowLayout {
144+
spacing: 10
145+
anchors.leftMargin: 16
146+
anchors.fill: parent
147+
visible: !isSpacer (index)
148+
149+
Image {
150+
smooth: true
151+
opacity: 0.54
152+
fillMode: Image.Pad
153+
source: iconSource (index)
154+
sourceSize: Qt.size (18, 18)
155+
verticalAlignment: Image.AlignVCenter
156+
horizontalAlignment: Image.AlignHCenter
157+
Layout.alignment: Qt.AlignVCenter
158+
}
159+
160+
Label {
161+
opacity: 0.87
162+
font.pixelSize: 14
163+
text: itemText (index)
164+
Layout.fillWidth: true
165+
font.weight: Font.Medium
166+
verticalAlignment: Image.AlignVCenter
167+
Layout.alignment: Qt.AlignVCenter
168+
color: root.highlighted ? "white" : Qt.darkGray
169+
}
170+
}
171+
}

0 commit comments

Comments
 (0)