Styling test
This commit is contained in:
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
@@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
// Item
|
||||
// {
|
||||
// id: topBar
|
||||
@@ -14,11 +13,13 @@ import QtQuick.Layouts
|
||||
|
||||
// }
|
||||
// height: 30
|
||||
|
||||
RowLayout
|
||||
{
|
||||
id: topBar
|
||||
|
||||
height: 35
|
||||
width: parent.width / 8
|
||||
width: parent.width
|
||||
|
||||
|
||||
|
||||
@@ -26,11 +27,19 @@ import QtQuick.Layouts
|
||||
{
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: dashBoard
|
||||
// implicitWidth: 65
|
||||
// implicitHeight: 25
|
||||
// background: Rectangle
|
||||
// {
|
||||
// border.color: "#f6f6f6"
|
||||
// border.width: 1
|
||||
// radius: 4
|
||||
// }
|
||||
Text
|
||||
{
|
||||
text: "Dashboard"
|
||||
@@ -40,6 +49,14 @@ import QtQuick.Layouts
|
||||
Button
|
||||
{
|
||||
id: kunden
|
||||
// implicitWidth: 65
|
||||
// implicitHeight: 25
|
||||
// background: Rectangle
|
||||
// {
|
||||
// border.color: "#f6f6f6"
|
||||
// border.width: 1
|
||||
// radius: 4
|
||||
// }
|
||||
Text
|
||||
{
|
||||
text: "Kunden"
|
||||
@@ -49,6 +66,14 @@ import QtQuick.Layouts
|
||||
Button
|
||||
{
|
||||
id: objekt
|
||||
// implicitWidth: 65
|
||||
// implicitHeight: 25
|
||||
// background: Rectangle
|
||||
// {
|
||||
// border.color: "#f6f6f6"
|
||||
// border.width: 1
|
||||
// radius: 4
|
||||
// }
|
||||
Text
|
||||
{
|
||||
text: "Objekt"
|
||||
@@ -58,6 +83,14 @@ import QtQuick.Layouts
|
||||
Button
|
||||
{
|
||||
id: mitarbeiter
|
||||
// implicitWidth: 65
|
||||
// implicitHeight: 25
|
||||
// background: Rectangle
|
||||
// {
|
||||
// border.color: "#f6f6f6"
|
||||
// border.width: 1
|
||||
// radius: 4
|
||||
// }
|
||||
Text
|
||||
{
|
||||
text: "Mitarbeiter"
|
||||
@@ -67,15 +100,38 @@ import QtQuick.Layouts
|
||||
Button
|
||||
{
|
||||
id: abrechnung
|
||||
// implicitWidth: 79
|
||||
// implicitHeight: 25
|
||||
// //color: button.down ? "#d6d6d6" : "#f6f6f6"
|
||||
// background: Rectangle
|
||||
// {
|
||||
// border.color: "#f6f6f6"
|
||||
// border.width: 1
|
||||
// radius: 4
|
||||
// }
|
||||
Text
|
||||
{
|
||||
text: "Abrechnung"
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: hspacer
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Image
|
||||
{
|
||||
id: atajos
|
||||
source: "../doc/icons/menu.png"
|
||||
sourceSize.height: 35
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ class ConfigLoader(QObject):
|
||||
|
||||
@Slot(dict)
|
||||
def setConfig(self, app_config):
|
||||
|
||||
|
||||
try:
|
||||
with open (self.config_dir + '/pyqcrm.toml', 'w') as f:
|
||||
config = Vermasseln().oscarVermasseln(toml.dumps(app_config))
|
||||
@@ -32,12 +30,10 @@ class ConfigLoader(QObject):
|
||||
|
||||
|
||||
def __configLoad(self):
|
||||
|
||||
try:
|
||||
with open (self.config_dir + '/pyqcrm.toml', 'r') as f:
|
||||
config = f.read()
|
||||
self.__config = toml.loads(Vermasseln().entschluesseln(config))
|
||||
print(self.__config)
|
||||
except FileNotFoundError:
|
||||
print("Konnte die Konfiguration nicht laden.")
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class Vermasseln:
|
||||
cipher = self.__vermasslungsKobold()
|
||||
decrypted_data = cipher.decrypt_and_verify(encoded_data[0], encoded_data[1])
|
||||
decrypted_data = decrypted_data.decode("utf-8")
|
||||
|
||||
return decrypted_data
|
||||
|
||||
def __vermasslungsKobold(self):
|
||||
@@ -34,7 +35,6 @@ class Vermasseln:
|
||||
cipher = AES.new(hashed, AES.MODE_SIV, nonce = nonce)
|
||||
return cipher
|
||||
|
||||
print(Vermasseln().oscarVermasseln("irgendeinenText"))
|
||||
|
||||
|
||||
|
||||
|
||||
7
main.py
7
main.py
@@ -34,14 +34,7 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
if not config.getConfig():
|
||||
|
||||
bad_config = True
|
||||
# try:
|
||||
# app_config = config.getConfig()
|
||||
# if not app_config:
|
||||
|
||||
|
||||
# except Exception as i:
|
||||
|
||||
engine.rootContext().setContextProperty("bad_config", bad_config) # print(f"Fehler: {i}")
|
||||
engine.rootContext().setContextProperty("config", config)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"gui/Start.qml",
|
||||
"js/qmldict.js",
|
||||
"lib/Vermasseln.py",
|
||||
"gui/TopBar.qml"
|
||||
"gui/TopBar.qml",
|
||||
"pyqcrm.qrc"
|
||||
]
|
||||
}
|
||||
|
||||
5
pyqcrm.qrc
Normal file
5
pyqcrm.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
2
qtquickcontrols2.conf
Normal file
2
qtquickcontrols2.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[Controls]
|
||||
Style=Material
|
||||
36
rc_pyqcrm.py
Normal file
36
rc_pyqcrm.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Resource object code (Python 3)
|
||||
# Created by: object code
|
||||
# Created by: The Resource Compiler for Qt version 6.8.0
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PySide6 import QtCore
|
||||
|
||||
qt_resource_data = b"\
|
||||
\x00\x00\x00\x1a\
|
||||
[\
|
||||
Controls]\x0aStyle=\
|
||||
Material\x0a\
|
||||
"
|
||||
|
||||
qt_resource_name = b"\
|
||||
\x00\x15\
|
||||
\x08\x1e\x16f\
|
||||
\x00q\
|
||||
\x00t\x00q\x00u\x00i\x00c\x00k\x00c\x00o\x00n\x00t\x00r\x00o\x00l\x00s\x002\x00.\
|
||||
\x00c\x00o\x00n\x00f\
|
||||
"
|
||||
|
||||
qt_resource_struct = b"\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||
\x00\x00\x01\x92\xf7\xa7y\xc2\
|
||||
"
|
||||
|
||||
def qInitResources():
|
||||
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
def qCleanupResources():
|
||||
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
qInitResources()
|
||||
Reference in New Issue
Block a user