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.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
|
||||||
// Item
|
// Item
|
||||||
// {
|
// {
|
||||||
// id: topBar
|
// id: topBar
|
||||||
@@ -14,11 +13,13 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
// height: 30
|
// height: 30
|
||||||
|
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
id: topBar
|
id: topBar
|
||||||
|
|
||||||
height: 35
|
height: 35
|
||||||
width: parent.width / 8
|
width: parent.width
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -26,11 +27,19 @@ import QtQuick.Layouts
|
|||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: dashBoard
|
id: dashBoard
|
||||||
|
// implicitWidth: 65
|
||||||
|
// implicitHeight: 25
|
||||||
|
// background: Rectangle
|
||||||
|
// {
|
||||||
|
// border.color: "#f6f6f6"
|
||||||
|
// border.width: 1
|
||||||
|
// radius: 4
|
||||||
|
// }
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: "Dashboard"
|
text: "Dashboard"
|
||||||
@@ -40,6 +49,14 @@ import QtQuick.Layouts
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: kunden
|
id: kunden
|
||||||
|
// implicitWidth: 65
|
||||||
|
// implicitHeight: 25
|
||||||
|
// background: Rectangle
|
||||||
|
// {
|
||||||
|
// border.color: "#f6f6f6"
|
||||||
|
// border.width: 1
|
||||||
|
// radius: 4
|
||||||
|
// }
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: "Kunden"
|
text: "Kunden"
|
||||||
@@ -49,6 +66,14 @@ import QtQuick.Layouts
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: objekt
|
id: objekt
|
||||||
|
// implicitWidth: 65
|
||||||
|
// implicitHeight: 25
|
||||||
|
// background: Rectangle
|
||||||
|
// {
|
||||||
|
// border.color: "#f6f6f6"
|
||||||
|
// border.width: 1
|
||||||
|
// radius: 4
|
||||||
|
// }
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: "Objekt"
|
text: "Objekt"
|
||||||
@@ -58,6 +83,14 @@ import QtQuick.Layouts
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: mitarbeiter
|
id: mitarbeiter
|
||||||
|
// implicitWidth: 65
|
||||||
|
// implicitHeight: 25
|
||||||
|
// background: Rectangle
|
||||||
|
// {
|
||||||
|
// border.color: "#f6f6f6"
|
||||||
|
// border.width: 1
|
||||||
|
// radius: 4
|
||||||
|
// }
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: "Mitarbeiter"
|
text: "Mitarbeiter"
|
||||||
@@ -67,15 +100,38 @@ import QtQuick.Layouts
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: abrechnung
|
id: abrechnung
|
||||||
|
// implicitWidth: 79
|
||||||
|
// implicitHeight: 25
|
||||||
|
// //color: button.down ? "#d6d6d6" : "#f6f6f6"
|
||||||
|
// background: Rectangle
|
||||||
|
// {
|
||||||
|
// border.color: "#f6f6f6"
|
||||||
|
// border.width: 1
|
||||||
|
// radius: 4
|
||||||
|
// }
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: "Abrechnung"
|
text: "Abrechnung"
|
||||||
anchors.centerIn: parent
|
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)
|
@Slot(dict)
|
||||||
def setConfig(self, app_config):
|
def setConfig(self, app_config):
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open (self.config_dir + '/pyqcrm.toml', 'w') as f:
|
with open (self.config_dir + '/pyqcrm.toml', 'w') as f:
|
||||||
config = Vermasseln().oscarVermasseln(toml.dumps(app_config))
|
config = Vermasseln().oscarVermasseln(toml.dumps(app_config))
|
||||||
@@ -32,12 +30,10 @@ class ConfigLoader(QObject):
|
|||||||
|
|
||||||
|
|
||||||
def __configLoad(self):
|
def __configLoad(self):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open (self.config_dir + '/pyqcrm.toml', 'r') as f:
|
with open (self.config_dir + '/pyqcrm.toml', 'r') as f:
|
||||||
config = f.read()
|
config = f.read()
|
||||||
self.__config = toml.loads(Vermasseln().entschluesseln(config))
|
self.__config = toml.loads(Vermasseln().entschluesseln(config))
|
||||||
print(self.__config)
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print("Konnte die Konfiguration nicht laden.")
|
print("Konnte die Konfiguration nicht laden.")
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class Vermasseln:
|
|||||||
cipher = self.__vermasslungsKobold()
|
cipher = self.__vermasslungsKobold()
|
||||||
decrypted_data = cipher.decrypt_and_verify(encoded_data[0], encoded_data[1])
|
decrypted_data = cipher.decrypt_and_verify(encoded_data[0], encoded_data[1])
|
||||||
decrypted_data = decrypted_data.decode("utf-8")
|
decrypted_data = decrypted_data.decode("utf-8")
|
||||||
|
|
||||||
return decrypted_data
|
return decrypted_data
|
||||||
|
|
||||||
def __vermasslungsKobold(self):
|
def __vermasslungsKobold(self):
|
||||||
@@ -34,7 +35,6 @@ class Vermasseln:
|
|||||||
cipher = AES.new(hashed, AES.MODE_SIV, nonce = nonce)
|
cipher = AES.new(hashed, AES.MODE_SIV, nonce = nonce)
|
||||||
return cipher
|
return cipher
|
||||||
|
|
||||||
print(Vermasseln().oscarVermasseln("irgendeinenText"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
7
main.py
7
main.py
@@ -34,14 +34,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
|
|
||||||
if not config.getConfig():
|
if not config.getConfig():
|
||||||
|
|
||||||
bad_config = True
|
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("bad_config", bad_config) # print(f"Fehler: {i}")
|
||||||
engine.rootContext().setContextProperty("config", config)
|
engine.rootContext().setContextProperty("config", config)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"gui/Start.qml",
|
"gui/Start.qml",
|
||||||
"js/qmldict.js",
|
"js/qmldict.js",
|
||||||
"lib/Vermasseln.py",
|
"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