Compare commits
4 Commits
2b662e58ab
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e3f7a988d | |||
| 76857eaeb8 | |||
| 9f43833cb1 | |||
| d5e742155f |
42
src/Project-Orion/Appheader.qml
Normal file
42
src/Project-Orion/Appheader.qml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
width: parent.width
|
||||||
|
height: 50
|
||||||
|
color: "black"
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: setDefaultButton
|
||||||
|
icon.source: "qrc:/resources/tick.svg"
|
||||||
|
icon.width: 40
|
||||||
|
icon.height: 40
|
||||||
|
icon.color: "transparent"
|
||||||
|
width: 50
|
||||||
|
height: parent.height - 4
|
||||||
|
anchors.right: createNewUserButton.left
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: createNewUserButton
|
||||||
|
icon.source: "qrc:/resources/user.svg"
|
||||||
|
icon.width: 40
|
||||||
|
icon.height: 40
|
||||||
|
icon.color: "transparent"
|
||||||
|
width: 50
|
||||||
|
height: parent.height - 4
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
onClicked: userConfiguration.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
UserConfiguration
|
||||||
|
{
|
||||||
|
id: userConfiguration
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
project(Project-Orion VERSION 0.1 LANGUAGES CXX)
|
project(Project-Orion VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Quick)
|
find_package(Qt6 REQUIRED COMPONENTS Quick)
|
||||||
|
|
||||||
@@ -21,7 +22,11 @@ qt_add_qml_module(appProject-Orion
|
|||||||
SOURCES userlist.h userlist.cpp
|
SOURCES userlist.h userlist.cpp
|
||||||
SOURCES serialization.h
|
SOURCES serialization.h
|
||||||
SOURCES serialization.cpp
|
SOURCES serialization.cpp
|
||||||
QML_FILES Button.qml
|
QML_FILES CustomButton.qml
|
||||||
|
QML_FILES Appheader.qml
|
||||||
|
RESOURCES resources.qrc
|
||||||
|
QML_FILES CalendarGrid.qml
|
||||||
|
QML_FILES UserConfiguration.qml
|
||||||
)
|
)
|
||||||
|
|
||||||
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
|
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
|
||||||
|
|||||||
55
src/Project-Orion/CalendarGrid.qml
Normal file
55
src/Project-Orion/CalendarGrid.qml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQml
|
||||||
|
|
||||||
|
Flickable {
|
||||||
|
id: flickable
|
||||||
|
width: 200
|
||||||
|
height: 200
|
||||||
|
onDragStarted: console.info("Drag has started")
|
||||||
|
onDragEnded: console.info("Drag has ended")
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
columns: 1
|
||||||
|
|
||||||
|
DayOfWeekRow {
|
||||||
|
locale: grid.locale
|
||||||
|
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// WeekNumberColumn {
|
||||||
|
// month: grid.month
|
||||||
|
// year: grid.year
|
||||||
|
// locale: grid.locale
|
||||||
|
// Layout.fillHeight: true
|
||||||
|
// delegate: Text {
|
||||||
|
// text: weekNumber
|
||||||
|
// horizontalAlignment: Text.AlignHCenter
|
||||||
|
// verticalAlignment: Text.AlignVCenter
|
||||||
|
// color: myPalette.text
|
||||||
|
// required property int weekNumber
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
MonthGrid {
|
||||||
|
id: grid
|
||||||
|
month: Calendar.November
|
||||||
|
year: currentDate.getFullYear()
|
||||||
|
locale: Qt.locale("en_US")
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
delegate: Text {
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: model.day
|
||||||
|
color: model.month === currentDate.getMonth() ? myPalette.text : disabledPalette.text
|
||||||
|
required property var model
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
required property date currentDate
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
width: 640
|
width: 640
|
||||||
@@ -8,12 +9,42 @@ Window {
|
|||||||
minimumWidth: 200
|
minimumWidth: 200
|
||||||
minimumHeight: 150
|
minimumHeight: 150
|
||||||
|
|
||||||
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
|
SystemPalette
|
||||||
|
{
|
||||||
|
id: myPalette;
|
||||||
|
colorGroup: SystemPalette.Active
|
||||||
|
}
|
||||||
|
|
||||||
|
SystemPalette
|
||||||
|
{
|
||||||
|
id: disabledPalette;
|
||||||
|
colorGroup: SystemPalette.Disabled
|
||||||
|
}
|
||||||
|
|
||||||
color: myPalette.window
|
color: myPalette.window
|
||||||
|
id: name
|
||||||
|
|
||||||
Button
|
Appheader
|
||||||
{
|
{
|
||||||
text: "For testing purposes"
|
id: myHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
id: grid
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.top: myHeader.bottom
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
columns: 10
|
||||||
|
Repeater {
|
||||||
|
model: 30
|
||||||
|
Rectangle {
|
||||||
|
width: 30; height: 30
|
||||||
|
radius: 50
|
||||||
|
border.width: 1
|
||||||
|
color: "green"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
src/Project-Orion/UserConfiguration.qml
Normal file
48
src/Project-Orion/UserConfiguration.qml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
Dialog {
|
||||||
|
id: userDialog
|
||||||
|
modal: true
|
||||||
|
title: "Configure a new user"
|
||||||
|
width: 600
|
||||||
|
height: 400
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: usernameRow
|
||||||
|
spacing: 100
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: nameFieldLabel
|
||||||
|
text: qsTr("Username:")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: nameField
|
||||||
|
color: myPalette.text
|
||||||
|
width: 400
|
||||||
|
placeholderText: "Enter the new user's username"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: dateOfBirthRow
|
||||||
|
anchors.top: usernameRow.bottom
|
||||||
|
spacing: 100
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: dateOfBirthLabel
|
||||||
|
text: qsTr("Date of birth:")
|
||||||
|
}
|
||||||
|
|
||||||
|
CalendarGrid {
|
||||||
|
id: dateOfBirthGrid
|
||||||
|
currentDate: dateOfBirth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property date dateOfBirth: new Date()
|
||||||
|
property date dateOfDeath: new Date()
|
||||||
|
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
}
|
||||||
7
src/Project-Orion/resources.qrc
Normal file
7
src/Project-Orion/resources.qrc
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/resources">
|
||||||
|
<file>user.svg</file>
|
||||||
|
<file>tick.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/"/>
|
||||||
|
</RCC>
|
||||||
46
src/Project-Orion/tick.svg
Normal file
46
src/Project-Orion/tick.svg
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="392.23944"
|
||||||
|
height="352.99045"
|
||||||
|
viewBox="0 0 392.23944 352.99045"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#eeeeee"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="px">
|
||||||
|
<inkscape:page
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="392.23944"
|
||||||
|
height="352.99045"
|
||||||
|
id="page2"
|
||||||
|
margin="0"
|
||||||
|
bleed="0" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-79.920158,-79.249199)">
|
||||||
|
<path
|
||||||
|
style="fill:#15ff00;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 80.40236,163.66999 153.77586,431.26747 471.43996,106.69762 442.09056,79.937873 166.79688,350.99382 Z"
|
||||||
|
id="path1"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
66
src/Project-Orion/user.svg
Normal file
66
src/Project-Orion/user.svg
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="125.8321mm"
|
||||||
|
height="92.671555mm"
|
||||||
|
viewBox="0 0 125.8321 92.671555"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="user.svg"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#eeeeee"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="1.7044739"
|
||||||
|
inkscape:cx="237.90332"
|
||||||
|
inkscape:cy="175.12735"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="832"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<inkscape:page
|
||||||
|
x="-4.7078728e-14"
|
||||||
|
y="0"
|
||||||
|
width="125.83211"
|
||||||
|
height="92.671555"
|
||||||
|
id="page2"
|
||||||
|
margin="0"
|
||||||
|
bleed="0" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1" />
|
||||||
|
<path
|
||||||
|
id="path2"
|
||||||
|
style="fill:#000000;stroke-width:2.47253"
|
||||||
|
d="M 58.57937,60.880724 A 70.353088,70.353088 0 0 0 2.4080776e-6,92.272604 H 117.15926 A 70.353088,70.353088 0 0 0 58.57937,60.880724 Z" />
|
||||||
|
<path
|
||||||
|
id="path3"
|
||||||
|
style="fill:#000000;stroke-width:2.47253"
|
||||||
|
d="m 115.06636,16.559916 a 10.765774,63.092445 0 0 0 -10.76575,63.092278 10.765774,63.092445 0 0 0 0.23151,13.01936 h 21.06797 a 10.765774,63.092445 0 0 0 0.23202,-13.01936 10.765774,63.092445 0 0 0 -10.76575,-63.092278 z" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-46.42042,-54.043526)">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000;stroke-width:2.47253"
|
||||||
|
id="path1"
|
||||||
|
cx="105"
|
||||||
|
cy="82.255211"
|
||||||
|
r="25.036684" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
Reference in New Issue
Block a user