Added new resource files, changed the CMake configuration to always

rebuild the resources files and also added the first main window to the
interface
This commit is contained in:
2025-08-30 18:27:49 +03:00
parent 2b662e58ab
commit d5e742155f
7 changed files with 180 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
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
}
}

View File

@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16)
project(Project-Orion VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTORCC ON)
find_package(Qt6 REQUIRED COMPONENTS Quick)
@@ -21,7 +22,9 @@ qt_add_qml_module(appProject-Orion
SOURCES userlist.h userlist.cpp
SOURCES serialization.h
SOURCES serialization.cpp
QML_FILES Button.qml
QML_FILES CustomButton.qml
QML_FILES Appheader.qml
RESOURCES resources.qrc
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.

View File

@@ -1,4 +1,5 @@
import QtQuick
import QtQuick.Layouts
Window {
width: 640
@@ -9,11 +10,30 @@ Window {
minimumHeight: 150
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
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"
}
}
}
}

View File

@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/resources">
<file>user.svg</file>
<file>tick.svg</file>
</qresource>
</RCC>

View 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

View 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