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"
|
||||
|
||||
}
|
||||
110
gui/TopBar.qml
110
gui/TopBar.qml
@@ -1,19 +1,11 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
// Item
|
||||
// {
|
||||
// id: topBar
|
||||
// anchors
|
||||
// {
|
||||
// top: parent.top
|
||||
// left: parent.left
|
||||
// right: parent.right
|
||||
|
||||
// }
|
||||
// height: 30
|
||||
|
||||
|
||||
|
||||
|
||||
RowLayout
|
||||
{
|
||||
@@ -33,107 +25,40 @@ import QtQuick.Controls.Material
|
||||
Button
|
||||
{
|
||||
id: dashBoard
|
||||
implicitWidth: 85
|
||||
hoverEnabled: true
|
||||
highlighted: true
|
||||
flat: true
|
||||
background: Rectangle
|
||||
{
|
||||
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
|
||||
}
|
||||
text: qsTr("Dashboard")
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: kunden
|
||||
implicitWidth: 85
|
||||
hoverEnabled: true
|
||||
highlighted: true
|
||||
flat: true
|
||||
background: Rectangle
|
||||
text: qsTr("Kunden")
|
||||
onClicked:
|
||||
{
|
||||
color: kunden.down? Material.Grey: Material.background
|
||||
border.color: kunden.hovered? Material.Amber: "transparent"
|
||||
radius: 0
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
text: "Kunden"
|
||||
anchors.centerIn: parent
|
||||
color: Material.accent
|
||||
appLoader.source = "Tables.qml"
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: objekt
|
||||
implicitWidth: 85
|
||||
hoverEnabled: true
|
||||
highlighted: true
|
||||
flat: true
|
||||
background: Rectangle
|
||||
{
|
||||
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
|
||||
}
|
||||
text: qsTr("Objekt")
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: mitarbeiter
|
||||
implicitWidth: 85
|
||||
hoverEnabled: true
|
||||
highlighted: true
|
||||
flat: true
|
||||
background: Rectangle
|
||||
{
|
||||
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
|
||||
}
|
||||
text: qsTr("Mitarbeiter")
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: abrechnung
|
||||
implicitWidth: 85
|
||||
hoverEnabled: true
|
||||
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
|
||||
}
|
||||
flat: true
|
||||
text: qsTr("Abrechnung")
|
||||
}
|
||||
|
||||
Item
|
||||
@@ -142,12 +67,15 @@ import QtQuick.Controls.Material
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Image
|
||||
Button
|
||||
{
|
||||
id: atajos
|
||||
source: "../images/menu.png"
|
||||
sourceSize.height: 35
|
||||
icon.source: "../images/menu.svg"
|
||||
icon.color: "red"
|
||||
flat: true
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
import "../js/qmldict.js" as Qmldict
|
||||
|
||||
|
||||
@@ -242,7 +242,9 @@ Item
|
||||
if (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.Controls
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
|
||||
|
||||
ApplicationWindow
|
||||
@@ -9,25 +9,31 @@ ApplicationWindow
|
||||
width: Screen.width * .6
|
||||
height: Screen.height * .6
|
||||
visible: true
|
||||
Material.theme: Material.Dark
|
||||
Material.accent: Material.BlueGrey
|
||||
Material.primary: Material.Grey
|
||||
|
||||
|
||||
title: "PYQCRM"
|
||||
TopBar
|
||||
{
|
||||
id:topBar
|
||||
|
||||
visible: if (bad_config) visible = false
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: mainView
|
||||
}
|
||||
Loader
|
||||
{
|
||||
id: appLoader
|
||||
anchors.fill: parent
|
||||
// {
|
||||
// left: parent.left
|
||||
// right: parent.right
|
||||
// top: parent.top
|
||||
// bottom: parent.bottom
|
||||
// }
|
||||
source: bad_config? "firststart.qml":"Start.qml"
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: topBar.bottom
|
||||
bottom: parent.bottom
|
||||
}
|
||||
source: bad_config? "firststart.qml":"Dashboard.qml"
|
||||
property alias window: appWindow
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user