fixedloader
This commit is contained in:
15
gui/Dashboard.qml
Normal file
15
gui/Dashboard.qml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
appLoader.source = "firststart.qml"
|
||||||
|
appLoader.window.title = "pyqcrm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Controls
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
TopBar
|
|
||||||
{
|
|
||||||
id:topBar
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted:
|
|
||||||
{
|
|
||||||
appLoader.window.title = "PYQCRM"
|
|
||||||
appLoader.window.height = Screen.height * .5
|
|
||||||
appLoader.window.width = Screen.width * .5
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
6
gui/Tables.qml
Normal file
6
gui/Tables.qml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Item {
|
||||||
|
text: "tables"
|
||||||
|
|
||||||
|
}
|
||||||
108
gui/TopBar.qml
108
gui/TopBar.qml
@@ -1,19 +1,11 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls.Material
|
|
||||||
|
|
||||||
// Item
|
|
||||||
// {
|
|
||||||
// id: topBar
|
|
||||||
// anchors
|
|
||||||
// {
|
|
||||||
// top: parent.top
|
|
||||||
// left: parent.left
|
|
||||||
// right: parent.right
|
|
||||||
|
|
||||||
// }
|
|
||||||
// height: 30
|
|
||||||
|
|
||||||
|
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
@@ -33,107 +25,40 @@ import QtQuick.Controls.Material
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: dashBoard
|
id: dashBoard
|
||||||
implicitWidth: 85
|
|
||||||
hoverEnabled: true
|
|
||||||
highlighted: true
|
|
||||||
flat: true
|
flat: true
|
||||||
background: Rectangle
|
text: qsTr("Dashboard")
|
||||||
{
|
|
||||||
color: dashBoard.down? Material.Grey: Material.background
|
|
||||||
border.color: dashBoard.hovered? Material.Amber: "transparent"
|
|
||||||
radius: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: "Dashboard"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: Material.accent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: kunden
|
id: kunden
|
||||||
implicitWidth: 85
|
|
||||||
hoverEnabled: true
|
|
||||||
highlighted: true
|
|
||||||
flat: true
|
flat: true
|
||||||
background: Rectangle
|
text: qsTr("Kunden")
|
||||||
|
onClicked:
|
||||||
{
|
{
|
||||||
color: kunden.down? Material.Grey: Material.background
|
appLoader.source = "Tables.qml"
|
||||||
border.color: kunden.hovered? Material.Amber: "transparent"
|
}
|
||||||
radius: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: "Kunden"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: Material.accent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: objekt
|
id: objekt
|
||||||
implicitWidth: 85
|
|
||||||
hoverEnabled: true
|
|
||||||
highlighted: true
|
|
||||||
flat: true
|
flat: true
|
||||||
background: Rectangle
|
text: qsTr("Objekt")
|
||||||
{
|
|
||||||
color: objekt.down? Material.Grey: Material.background
|
|
||||||
border.color: objekt.hovered? Material.Amber: "transparent"
|
|
||||||
radius: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: "Objekt"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: Material.accent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: mitarbeiter
|
id: mitarbeiter
|
||||||
implicitWidth: 85
|
|
||||||
hoverEnabled: true
|
|
||||||
highlighted: true
|
|
||||||
flat: true
|
flat: true
|
||||||
background: Rectangle
|
text: qsTr("Mitarbeiter")
|
||||||
{
|
|
||||||
color: mitarbeiter.down? Material.Grey: Material.background
|
|
||||||
border.color: mitarbeiter.hovered? Material.Amber: "transparent"
|
|
||||||
radius: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: "Mitarbeiter"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: Material.accent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: abrechnung
|
id: abrechnung
|
||||||
implicitWidth: 85
|
flat: true
|
||||||
hoverEnabled: true
|
text: qsTr("Abrechnung")
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
color: abrechnung.down? Material.Grey: Material.background
|
|
||||||
border.color: abrechnung.hovered? Material.Amber: "transparent"
|
|
||||||
radius: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: "Abrechnung"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: Material.accent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
@@ -142,12 +67,15 @@ import QtQuick.Controls.Material
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Image
|
Button
|
||||||
{
|
{
|
||||||
id: atajos
|
id: atajos
|
||||||
source: "../images/menu.png"
|
icon.source: "../images/menu.svg"
|
||||||
sourceSize.height: 35
|
icon.color: "red"
|
||||||
|
flat: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls.Material
|
|
||||||
import "../js/qmldict.js" as Qmldict
|
import "../js/qmldict.js" as Qmldict
|
||||||
|
|
||||||
|
|
||||||
@@ -242,7 +242,9 @@ Item
|
|||||||
if (pyqcrm_conf)
|
if (pyqcrm_conf)
|
||||||
{
|
{
|
||||||
config.setConfig(pyqcrm_conf)
|
config.setConfig(pyqcrm_conf)
|
||||||
appLoader.source = "Start.qml"
|
appLoader.source = "Dashboard.qml"
|
||||||
|
|
||||||
|
topBar.visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
34
gui/main.qml
34
gui/main.qml
@@ -1,6 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls.Material
|
|
||||||
|
|
||||||
|
|
||||||
ApplicationWindow
|
ApplicationWindow
|
||||||
@@ -9,25 +9,31 @@ ApplicationWindow
|
|||||||
width: Screen.width * .6
|
width: Screen.width * .6
|
||||||
height: Screen.height * .6
|
height: Screen.height * .6
|
||||||
visible: true
|
visible: true
|
||||||
Material.theme: Material.Dark
|
|
||||||
Material.accent: Material.BlueGrey
|
|
||||||
Material.primary: Material.Grey
|
|
||||||
|
|
||||||
title: "PYQCRM"
|
title: "PYQCRM"
|
||||||
|
TopBar
|
||||||
|
{
|
||||||
|
id:topBar
|
||||||
|
|
||||||
|
visible: if (bad_config) visible = false
|
||||||
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: mainView
|
||||||
|
}
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
id: appLoader
|
id: appLoader
|
||||||
anchors.fill: parent
|
anchors
|
||||||
// {
|
{
|
||||||
// left: parent.left
|
left: parent.left
|
||||||
// right: parent.right
|
right: parent.right
|
||||||
// top: parent.top
|
top: topBar.bottom
|
||||||
// bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
// }
|
}
|
||||||
source: bad_config? "firststart.qml":"Start.qml"
|
source: bad_config? "firststart.qml":"Dashboard.qml"
|
||||||
property alias window: appWindow
|
property alias window: appWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
images/menu.svg
Normal file
1
images/menu.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 193 B |
@@ -5,9 +5,10 @@
|
|||||||
"lib/__init__.py",
|
"lib/__init__.py",
|
||||||
"main.py",
|
"main.py",
|
||||||
"gui/main.qml",
|
"gui/main.qml",
|
||||||
"gui/Start.qml",
|
"gui/Dashboard.qml",
|
||||||
"js/qmldict.js",
|
"js/qmldict.js",
|
||||||
"lib/Vermasseln.py",
|
"lib/Vermasseln.py",
|
||||||
"gui/TopBar.qml"
|
"gui/TopBar.qml",
|
||||||
|
"gui/Tables.qml"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user