Compare commits
21 Commits
7f5675c06d
...
d125b56564
| Author | SHA256 | Date | |
|---|---|---|---|
| d125b56564 | |||
| 6e8c2f340c | |||
| 76c4be7a7a | |||
| 8236bd32e6 | |||
| 3520c65879 | |||
| a821956a67 | |||
| 46cba58ebe | |||
| a7a1cd4913 | |||
| 34bd7409df | |||
| 6df02d9ff2 | |||
| 9499eace9b | |||
| 8f6efac11e | |||
| d6034a5299 | |||
| 15b14387df | |||
| fadd3d1b9e | |||
| 648753823f | |||
| 495252c408 | |||
| 5b7e364c20 | |||
| ce26d6d223 | |||
| c49e4ebacd | |||
| 7b1f5cd3cc |
@@ -3,6 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||||
@@ -12,6 +13,7 @@ Item {
|
|||||||
id: customersStack
|
id: customersStack
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
initialItem: "CustomersTable.qml"
|
initialItem: "CustomersTable.qml"
|
||||||
|
anchors.topMargin: Dimensions.m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,27 @@ import Qt.labs.qmlmodels
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
|
function viewCriterion(criterion)
|
||||||
|
{
|
||||||
|
business_model.viewCriterion(criterion.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
|
|
||||||
Component.onCompleted: customersStack.pop()
|
Component.onCompleted: customersStack.pop()
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
Layout.fillWidth: true
|
{
|
||||||
Layout.horizontalStretchFactor: 1
|
// Layout.fillWidth: true
|
||||||
spacing: Dimensions.l
|
// Layout.horizontalStretchFactor: 1
|
||||||
|
// spacing: Dimensions.l
|
||||||
|
|
||||||
SearchBar {
|
|
||||||
|
SearchBar
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QuickFilter {
|
QuickFilter {
|
||||||
@@ -25,6 +35,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|
||||||
name: "Alle"
|
name: "Alle"
|
||||||
text: qsTr("Alle")
|
text: qsTr("Alle")
|
||||||
selected: true
|
selected: true
|
||||||
@@ -51,20 +62,22 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
id: addCustomer
|
id: addCustomer
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
text: qsTr("Kunde Hinzufügen")
|
text: qsTr("Kunde Hinzufügen")
|
||||||
|
|
||||||
onClicked: appLoader.source = "AddCustomer.qml"
|
onClicked: appLoader.source = "AddCustomer.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
HorizontalHeaderView {
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
id: horizontalHeader
|
id: horizontalHeader
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -72,14 +85,16 @@ ColumnLayout {
|
|||||||
movableColumns: true //@disable-check M16
|
movableColumns: true //@disable-check M16
|
||||||
syncView: customerTable
|
syncView: customerTable
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle
|
||||||
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
border.color: addCustomer.palette.base
|
border.color: addCustomer.palette.base
|
||||||
color: addCustomer.palette.alternateBase
|
color: addCustomer.palette.alternateBase
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
implicitWidth: 1
|
implicitWidth: 1
|
||||||
|
|
||||||
Text {
|
Text
|
||||||
|
{
|
||||||
color: addCustomer.palette.text
|
color: addCustomer.palette.text
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
height: parent.height
|
height: parent.height
|
||||||
@@ -156,4 +171,5 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Item {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
initialItem: "EmployeesTable.qml"
|
initialItem: "EmployeesTable.qml"
|
||||||
|
anchors.topMargin: Dimensions.m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,195 +3,274 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
|
{
|
||||||
|
|
||||||
function viewEmployees(criterion) {
|
function viewEmployees(criterion)
|
||||||
employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked);
|
{
|
||||||
|
employee_model.viewCriterion(criterion)
|
||||||
|
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: Dimensions.s
|
|
||||||
|
|
||||||
Component.onCompleted: employeesStack.pop()
|
Component.onCompleted: employeesStack.pop()
|
||||||
|
// property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
|
||||||
RowLayout {
|
RowLayout
|
||||||
Layout.fillWidth: true
|
{
|
||||||
Layout.horizontalStretchFactor: 1
|
SearchBar
|
||||||
spacing: Dimensions.l
|
{
|
||||||
|
id:searchBar
|
||||||
SearchBar {
|
}
|
||||||
|
QuickFilter
|
||||||
|
{
|
||||||
|
onSelectedChanged: (name) =>
|
||||||
|
{
|
||||||
|
business_model.viewCriterion(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
QuickFilter {
|
model: ListModel
|
||||||
model: ListModel {
|
{
|
||||||
ListElement {
|
ListElement
|
||||||
|
{
|
||||||
|
|
||||||
name: "Alle"
|
name: "Alle"
|
||||||
selected: true
|
|
||||||
text: qsTr("Alle")
|
text: qsTr("Alle")
|
||||||
|
selected: true
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement
|
||||||
|
{
|
||||||
name: "Bewerber"
|
name: "Bewerber"
|
||||||
selected: false
|
|
||||||
text: qsTr("Bewerber")
|
text: qsTr("Bewerber")
|
||||||
|
selected: false
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement
|
||||||
|
{
|
||||||
name: "Mitarbeiter"
|
name: "Mitarbeiter"
|
||||||
text: qsTr("Mitarbeiter")
|
text: qsTr("Kunde")
|
||||||
}
|
selected: false
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelectedChanged: name => {
|
ListElement
|
||||||
viewEmployees(name);
|
{
|
||||||
|
name: "Erledigt"
|
||||||
|
text: qsTr("Erledigt")
|
||||||
|
selected: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
id: addEmployeeBtn
|
id: addEmployeeBtn
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
|
||||||
text: qsTr("Mitarbeiter Hinzufügen")
|
text: qsTr("Mitarbeiter Hinzufügen")
|
||||||
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
flat: true
|
||||||
onClicked: appLoader.source = "AddApplicant.qml"
|
onClicked: appLoader.source = "AddApplicant.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
|
||||||
id: viewCriterion
|
|
||||||
|
|
||||||
CheckBox {
|
|
||||||
id: showEveryone
|
|
||||||
|
|
||||||
checked: true
|
|
||||||
text: qsTr("Alle Stati")
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
showFired.checked = false;
|
|
||||||
showProcessed.checked = false;
|
|
||||||
}
|
|
||||||
onClicked: viewEmployees(criterion.checkedButton.text)
|
|
||||||
}
|
|
||||||
CheckBox {
|
|
||||||
id: showProcessed
|
|
||||||
|
|
||||||
checked: false
|
|
||||||
enabled: !showEveryone.checked
|
|
||||||
text: qsTr("Erledigt")
|
|
||||||
|
|
||||||
onClicked: {
|
// ButtonGroup
|
||||||
showFired.checked = false;
|
// {
|
||||||
viewEmployees(criterion.checkedButton.text);
|
// id: criterion
|
||||||
}
|
// // buttons: criterion.children
|
||||||
}
|
// onClicked:
|
||||||
CheckBox {
|
// {
|
||||||
id: showFired
|
// viewEmployees(criterion.checkedButton.text)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
checked: false
|
// ColumnLayout
|
||||||
enabled: !showEveryone.checked
|
// {
|
||||||
text: qsTr("Ausgeschieden")
|
// id: tableParent
|
||||||
|
// clip: true
|
||||||
|
// anchors
|
||||||
|
// {
|
||||||
|
|
||||||
onClicked: {
|
// top: searchBar.bottom
|
||||||
showProcessed.checked = false;
|
// bottom: parent.bottom
|
||||||
viewEmployees(criterion.checkedButton.text);
|
// left: parent.left
|
||||||
}
|
// right: parent.right
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
id: tableParent
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.verticalStretchFactor: 1
|
|
||||||
|
|
||||||
clip: true
|
// RowLayout
|
||||||
|
// {
|
||||||
|
// id: viewCriterion
|
||||||
|
|
||||||
HorizontalHeaderView {
|
// RadioButton
|
||||||
|
// {
|
||||||
|
// //id: showAll
|
||||||
|
// checked: true
|
||||||
|
// text: qsTr("Alle")
|
||||||
|
// ButtonGroup.group: criterion
|
||||||
|
// //onClicked: viewEmployees(showAll)
|
||||||
|
// }
|
||||||
|
// RadioButton
|
||||||
|
// {
|
||||||
|
// //id: showApplicant
|
||||||
|
// text: qsTr("Bewerber")
|
||||||
|
// ButtonGroup.group: criterion
|
||||||
|
// //onClicked: viewEmployees(showApplicant)
|
||||||
|
// }
|
||||||
|
// RadioButton
|
||||||
|
// {
|
||||||
|
// //id: showEmployee
|
||||||
|
// text: qsTr("Mitarbeiter")
|
||||||
|
// ButtonGroup.group: criterion
|
||||||
|
// //onClicked: viewEmployees(showEmployee)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// CheckBox
|
||||||
|
// {
|
||||||
|
// id: showEveryone
|
||||||
|
// text: qsTr("Alle Stati")
|
||||||
|
// checked: true
|
||||||
|
// onClicked: viewEmployees(criterion.checkedButton.text)
|
||||||
|
// onCheckedChanged:
|
||||||
|
// {
|
||||||
|
// showFired.checked = false
|
||||||
|
// showProcessed.checked = false
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// CheckBox
|
||||||
|
// {
|
||||||
|
// id: showProcessed
|
||||||
|
// text: qsTr("Erledigt")
|
||||||
|
// enabled: !showEveryone.checked
|
||||||
|
// checked: false
|
||||||
|
// onClicked:
|
||||||
|
// {
|
||||||
|
// showFired.checked = false
|
||||||
|
// viewEmployees(criterion.checkedButton.text)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// CheckBox
|
||||||
|
// {
|
||||||
|
// id: showFired
|
||||||
|
// text: qsTr("Ausgeschieden")
|
||||||
|
// enabled: !showEveryone.checked
|
||||||
|
// checked: false
|
||||||
|
// onClicked:
|
||||||
|
// {
|
||||||
|
// showProcessed.checked = false
|
||||||
|
// viewEmployees(criterion.checkedButton.text)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
id: employeeTableHeader
|
id: employeeTableHeader
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
width: tableParent.width
|
syncView: appliEmpTable
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
movableColumns: true //@disable-check M16
|
movableColumns: true //@disable-check M16
|
||||||
syncView: appliEmpTable
|
delegate: Rectangle
|
||||||
|
{
|
||||||
delegate: Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
border.color: palette.base
|
|
||||||
color: addEmployeeBtn.palette.alternateBase
|
color: addEmployeeBtn.palette.alternateBase
|
||||||
|
border.color: palette.base
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
implicitWidth: 1
|
implicitWidth: 1
|
||||||
|
Text
|
||||||
Text {
|
{
|
||||||
color: palette.text
|
text: model.display
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: model.display
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: parent.width
|
color: palette.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TableView {
|
|
||||||
id: appliEmpTable
|
|
||||||
|
|
||||||
|
TableView
|
||||||
|
{
|
||||||
|
id: appliEmpTable
|
||||||
|
//Layout.fillHeight: true
|
||||||
|
//height: tableParent.height - (viewCriterion.height + employeeTableHeader.height)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.verticalStretchFactor: 1
|
|
||||||
columnSpacing: 1
|
columnSpacing: 1
|
||||||
height: tableParent.height - employeeTableHeader.height
|
|
||||||
model: employee_model
|
|
||||||
resizableColumns: true
|
|
||||||
rowSpacing: 2
|
rowSpacing: 2
|
||||||
|
alternatingRows: true
|
||||||
|
resizableColumns: true
|
||||||
|
model: employee_model
|
||||||
selectionBehavior: TableView.SelectRows
|
selectionBehavior: TableView.SelectRows
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar
|
||||||
|
{
|
||||||
policy: appliEmpTable.contentHeight > appliEmpTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
policy: appliEmpTable.contentHeight > appliEmpTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
}
|
}
|
||||||
delegate: Rectangle {
|
|
||||||
required property bool current
|
|
||||||
required property bool selected
|
|
||||||
|
|
||||||
color: selected ? addEmployeeBtn.palette.highlight //palette.highlight
|
selectionModel: ItemSelectionModel
|
||||||
: (appliEmpTable.alternatingRows && row % 2 !== 0 ? addEmployeeBtn.palette.base // palette.base
|
{
|
||||||
|
id: selModel
|
||||||
|
model: appliEmpTable.model
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
delegate:Rectangle
|
||||||
|
{
|
||||||
|
required property bool selected
|
||||||
|
required property bool current
|
||||||
|
implicitWidth: appliEmpTable.width / appliEmpTable.columns
|
||||||
|
implicitHeight: 25
|
||||||
|
color: selected
|
||||||
|
? addEmployeeBtn.palette.highlight //palette.highlight
|
||||||
|
: (appliEmpTable.alternatingRows && row % 2 !== 0
|
||||||
|
? addEmployeeBtn.palette.base // palette.base
|
||||||
: addEmployeeBtn.palette.alternateBase) //palette.alternateBase)
|
: addEmployeeBtn.palette.alternateBase) //palette.alternateBase)
|
||||||
|
|
||||||
implicitHeight: 25
|
Text
|
||||||
implicitWidth: appliEmpTable.width / appliEmpTable.columns
|
{
|
||||||
|
|
||||||
Text {
|
|
||||||
color: palette.text
|
|
||||||
elide: Text.ElideRight
|
|
||||||
height: parent.height
|
|
||||||
leftPadding: 9 //@d isable-check M16
|
|
||||||
text: (model.display === null || model.display === undefined)? "": model.display
|
text: (model.display === null || model.display === undefined)? "": model.display
|
||||||
verticalAlignment: Text.AlignVCenter
|
elide: Text.ElideRight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
height: parent.height
|
||||||
MouseArea {
|
verticalAlignment: Text.AlignVCenter
|
||||||
id: mouseArea
|
leftPadding: 9 //@d isable-check M16
|
||||||
|
color: palette.text
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
id: mouseArea
|
||||||
property bool hovered:false
|
property bool hovered:false
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked:
|
||||||
employeesStack.push("EmployeeDetails.qml", {
|
{
|
||||||
selectedEmployee: row
|
employeesStack.push("EmployeeDetails.qml", {selectedEmployee: row});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
|
appliEmpTable.selectionModel.select(appliEmpTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||||
}
|
}
|
||||||
onEntered: {
|
|
||||||
appliEmpTable.selectionModel.select(appliEmpTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
selectionModel: ItemSelectionModel {
|
|
||||||
id: selModel
|
|
||||||
|
|
||||||
model: appliEmpTable.model
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// function viewEmployees(criterion)
|
||||||
|
// {
|
||||||
|
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
|
||||||
|
// }
|
||||||
|
// Component.onCompleted: employeesStack.pop()
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Dialogs
|
import QtQuick.Dialogs
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import TeroStyle
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property string recpass: ""
|
property string recpass: ""
|
||||||
|
|||||||
@@ -3,133 +3,182 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
function onObjectContactAdded(added) {
|
|
||||||
console.log(added);
|
function viewCriterion(criterion)
|
||||||
if (added)
|
{
|
||||||
object_model.viewCriterion("");
|
business_model.viewCriterion(criterion.text);
|
||||||
|
}
|
||||||
|
function onObjectContactAdded(added)
|
||||||
|
{
|
||||||
|
console.log(added)
|
||||||
|
if (added) object_model.viewCriterion("")
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted:
|
||||||
contact_model.objectContactAdded.connect(onObjectContactAdded);
|
{
|
||||||
objectsStack.pop();
|
contact_model.objectContactAdded.connect(onObjectContactAdded)
|
||||||
|
objectsStack.pop()
|
||||||
}
|
}
|
||||||
|
RowLayout
|
||||||
RowLayout {
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Dimensions.l
|
spacing: Dimensions.l
|
||||||
|
SearchBar
|
||||||
SearchBar {
|
{
|
||||||
|
}
|
||||||
|
QuickFilter {
|
||||||
|
onSelectedChanged: (name) => {
|
||||||
|
business_model.viewCriterion(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
model: ListModel {
|
||||||
id: addObjectBtn
|
ListElement {
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
|
|
||||||
|
name: "Alle"
|
||||||
|
text: qsTr("Alle")
|
||||||
|
selected: true
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
name: "Interessent"
|
||||||
|
text: qsTr("Interessent")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
name: "Kunde"
|
||||||
|
text: qsTr("Kunde")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
name: "Lieferant"
|
||||||
|
text: qsTr("Lieferant")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
name: "Erledigt"
|
||||||
|
text: qsTr("Erledigt")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: addObjectBtn
|
||||||
icon.source: "qrc:/images/PlusCircle.svg"
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
text: qsTr("Objekt Hinzufügen")
|
text: qsTr("Objekt Hinzufügen")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
onClicked: appLoader.source = "AddObject.qml"
|
onClicked: appLoader.source = "AddObject.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
|
||||||
|
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
id: tableColumn
|
id: tableColumn
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.verticalStretchFactor: 1
|
Layout.verticalStretchFactor: 1
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
// anchors
|
||||||
HorizontalHeaderView {
|
// {
|
||||||
|
// top: searchBar.bottom
|
||||||
|
// bottom: parent.bottom
|
||||||
|
// left: parent.left
|
||||||
|
// right: parent.right
|
||||||
|
// topMargin: 15
|
||||||
|
// }
|
||||||
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
id: horizontalHeaderview
|
id: horizontalHeaderview
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
movableColumns: true //@disable-check M16
|
movableColumns: true //@disable-check M16
|
||||||
syncView: objectTable
|
syncView: objectTable
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
Layout.fillWidth: true
|
|
||||||
border.color: addObjectBtn.palette.base
|
|
||||||
color: addObjectBtn.palette.alternateBase
|
color: addObjectBtn.palette.alternateBase
|
||||||
|
border.color: addObjectBtn.palette.base
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
implicitWidth: 1
|
implicitWidth: 1
|
||||||
|
Text
|
||||||
Text {
|
{
|
||||||
color: addObjectBtn.palette.text
|
text: model.display
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: model.display
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: parent.width
|
color: addObjectBtn.palette.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TableView {
|
|
||||||
id: objectTable
|
|
||||||
|
|
||||||
|
TableView
|
||||||
|
{
|
||||||
property real newWidth: 0
|
property real newWidth: 0
|
||||||
|
id: objectTable
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
alternatingRows: true
|
|
||||||
columnSpacing: 1
|
|
||||||
height: parent.height - horizontalHeaderview.height
|
|
||||||
model: object_model
|
|
||||||
resizableColumns: true // @disable-check M16
|
|
||||||
rowSpacing: 2
|
|
||||||
selectionBehavior: TableView.SelectRows
|
|
||||||
z: 0
|
z: 0
|
||||||
|
height: tableColumn.height - horizontalHeaderview.height
|
||||||
ScrollBar.vertical: ScrollBar {
|
Layout.fillWidth: true
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 2
|
||||||
|
model: object_model
|
||||||
|
alternatingRows: true
|
||||||
|
resizableColumns: true // @disable-check M16
|
||||||
|
selectionBehavior: TableView.SelectRows
|
||||||
|
ScrollBar.vertical: ScrollBar
|
||||||
|
{
|
||||||
policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
}
|
}
|
||||||
delegate: Rectangle {
|
selectionModel: ItemSelectionModel
|
||||||
required property bool current
|
{
|
||||||
required property bool selected
|
id: obmodel
|
||||||
|
model: objectTable.model
|
||||||
color: selected ? addObjectBtn.palette.highlight
|
|
||||||
: (objectTable.alternatingRows && row % 2 !== 0 ? addObjectBtn.palette.base
|
|
||||||
: addObjectBtn.palette.alternateBase)
|
|
||||||
|
|
||||||
implicitHeight: 25
|
|
||||||
implicitWidth: objectTable.width / objectTable.columns
|
|
||||||
|
|
||||||
Text {
|
|
||||||
color: addObjectBtn.palette.text
|
|
||||||
elide: Text.ElideRight
|
|
||||||
height: parent.height
|
|
||||||
leftPadding: 9 //@disable-check M16
|
|
||||||
text: (model.display === null || model.display === undefined) ? "" : model.display
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
width: parent.width
|
|
||||||
}
|
}
|
||||||
MouseArea {
|
|
||||||
id: mouseArea
|
|
||||||
|
|
||||||
|
delegate:Rectangle
|
||||||
|
{
|
||||||
|
required property bool selected
|
||||||
|
required property bool current
|
||||||
|
implicitWidth: objectTable.width / objectTable.columns
|
||||||
|
implicitHeight: 25
|
||||||
|
color: selected
|
||||||
|
? addObjectBtn.palette.highlight //palette.highlight
|
||||||
|
: (objectTable.alternatingRows && row % 2 !== 0
|
||||||
|
? addObjectBtn.palette.base // palette.base
|
||||||
|
: addObjectBtn.palette.alternateBase) //palette.alternateBase)
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: (model.display === null || model.display === undefined)? "": model.display
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
leftPadding: 9 //@d isable-check M16
|
||||||
|
color: addObjectBtn.palette.text
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
onDoubleClicked:
|
||||||
onDoubleClicked: {
|
{
|
||||||
objectsStack.push("ObjectDetails.qml", {
|
objectsStack.push("ObjectDetails.qml", {selectedObject: row});
|
||||||
selectedObject: row
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered:
|
||||||
objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows);
|
{
|
||||||
|
objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selectionModel: ItemSelectionModel {
|
|
||||||
id: obmodel
|
|
||||||
|
|
||||||
model: objectTable.model
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -3,18 +3,72 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
property var availableFilters: []
|
{
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
function viewOffers(criterion)
|
||||||
|
{
|
||||||
|
//offer_model.viewCriterion(criterion)
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
spacing: Dimensions.l
|
{
|
||||||
SearchBar {
|
SearchBar
|
||||||
|
{
|
||||||
|
id:searchBar
|
||||||
|
}
|
||||||
|
QuickFilter
|
||||||
|
{
|
||||||
|
onSelectedChanged: (name) =>
|
||||||
|
{
|
||||||
|
business_model.viewCriterion(name)
|
||||||
|
}
|
||||||
|
|
||||||
|
model: ListModel
|
||||||
|
{
|
||||||
|
ListElement
|
||||||
|
{
|
||||||
|
|
||||||
|
name: "Alle"
|
||||||
|
text: qsTr("Alle")
|
||||||
|
selected: true
|
||||||
|
}
|
||||||
|
ListElement
|
||||||
|
{
|
||||||
|
name: "Offen"
|
||||||
|
text: qsTr("Offen")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
ListElement
|
||||||
|
{
|
||||||
|
name: "Abgeschlossen"
|
||||||
|
text: qsTr("Abgeschlossen")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
|
||||||
|
ListElement
|
||||||
|
{
|
||||||
|
name: "Erledigt"
|
||||||
|
text: qsTr("Erledigt")
|
||||||
|
selected: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: addOfferBtn
|
||||||
|
text: qsTr("Angebote Hinzufügen")
|
||||||
|
icon.source: "qrc:/images/PlusCircle.svg"
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
flat: true
|
||||||
|
//onClicked: appLoader.source = "AddOffer.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
id: spacer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ Item
|
|||||||
if (db['database']['DB_HOST'] === '' || db['database']['DB_PORT'] === '' ||
|
if (db['database']['DB_HOST'] === '' || db['database']['DB_PORT'] === '' ||
|
||||||
db['database']['DB_NAME'] === '' || db['database']['DB_USER'] === '' ||
|
db['database']['DB_NAME'] === '' || db['database']['DB_USER'] === '' ||
|
||||||
db['database']['DB_PASS'] === '');
|
db['database']['DB_PASS'] === '');
|
||||||
else config.saveDbConf(company)
|
else config.saveDbConf(db)
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCompanyInfo()
|
function updateCompanyInfo()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
Layout.preferredWidth: 300
|
Layout.preferredWidth: 300
|
||||||
placeholderText: qsTr("Suche")
|
placeholderText: qsTr("Suche")
|
||||||
|
|||||||
262
Gui/TopBar.qml
@@ -2,12 +2,12 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
RowLayout
|
|
||||||
|
ColumnLayout
|
||||||
{
|
{
|
||||||
id: topBar
|
id: topBar
|
||||||
spacing: 0
|
spacing: 0
|
||||||
height: 35
|
height: parent.height
|
||||||
width: parent.width
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@@ -15,193 +15,223 @@ RowLayout
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ButtonGroup
|
||||||
|
{
|
||||||
|
id: buttonBar
|
||||||
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: dashBoard
|
id: dashBoard
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Dashboard")
|
text: qsTr("Dashboard")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
Layout.topMargin: Dimensions.s
|
||||||
{
|
icon.source: "qrc:/images/dash.svg"
|
||||||
id: dashiBackie
|
ButtonGroup.group: buttonBar
|
||||||
border.width: dashBoard.activeFocus ? 2 : 1
|
// background: Rectangle
|
||||||
border.color: "#888"
|
// {
|
||||||
radius: 4
|
// id: dashiBackie
|
||||||
gradient: Gradient
|
// border.width: dashBoard.activeFocus ? 2 : 1
|
||||||
{
|
// border.color: "#888"
|
||||||
GradientStop { position: 0 ; color: dashBoard.pressed ? "#000" : "#001" }
|
// radius: 4
|
||||||
GradientStop { position: 1 ; color: dashBoard.pressed ? "#100" : "#000" }
|
// gradient: Gradient
|
||||||
}
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: dashBoard.pressed ? "#000" : "#001" }
|
||||||
|
// GradientStop { position: 1 ; color: dashBoard.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
appLoader.source = "Dashboard.qml"
|
appLoader.source = "Dashboard.qml"
|
||||||
dashiBackie.border.width = 2
|
|
||||||
kundiBackie.border.width = 1
|
|
||||||
mitoBackie.border.width = 1
|
// dashiBackie.border.width = 2
|
||||||
invoBackie.border.width = 1
|
// kundiBackie.border.width = 1
|
||||||
objBackie.border.width = 1
|
// mitoBackie.border.width = 1
|
||||||
|
// invoBackie.border.width = 1
|
||||||
|
// objBackie.border.width = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: kunden
|
id: kunden
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Kunden")
|
text: qsTr("Kunden")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
icon.source: "qrc:/images/customer.svg"
|
||||||
{
|
ButtonGroup.group: buttonBar
|
||||||
id: kundiBackie
|
// background: Rectangle
|
||||||
border.width: kunden.activeFocus ? 2 : 1
|
// {
|
||||||
border.color: "#888"
|
// id: kundiBackie
|
||||||
radius: 4
|
// border.width: kunden.activeFocus ? 2 : 1
|
||||||
gradient: Gradient
|
// border.color: "#888"
|
||||||
{
|
// radius: 4
|
||||||
GradientStop { position: 0 ; color: kunden.pressed ? "#000" : "#001" }
|
// gradient: Gradient
|
||||||
GradientStop { position: 1 ; color: kunden.pressed ? "#100" : "#000" }
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: kunden.pressed ? "#000" : "#001" }
|
||||||
}
|
// GradientStop { position: 1 ; color: kunden.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
// TODO: here we should call the model
|
// TODO: here we should call the model
|
||||||
appLoader.source = "CustomerTable.qml"
|
appLoader.source = "CustomerTable.qml"
|
||||||
kundiBackie.border.width = 2
|
// kundiBackie.border.width = 2
|
||||||
dashiBackie.border.width = 1
|
// dashiBackie.border.width = 1
|
||||||
mitoBackie.border.width = 1
|
// mitoBackie.border.width = 1
|
||||||
invoBackie.border.width = 1
|
// invoBackie.border.width = 1
|
||||||
objBackie.border.width = 1
|
// objBackie.border.width = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: objekt
|
id: objekt
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Objekt")
|
text: qsTr("Objekt")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
icon.source: "qrc:/images/object.svg"
|
||||||
{
|
ButtonGroup.group: buttonBar
|
||||||
id: objBackie
|
// background: Rectangle
|
||||||
border.width: objekt.activeFocus ? 2 : 1
|
// {
|
||||||
border.color: "#888"
|
// id: objBackie
|
||||||
radius: 4
|
// border.width: objekt.activeFocus ? 2 : 1
|
||||||
gradient: Gradient
|
// border.color: "#888"
|
||||||
{
|
// radius: 4
|
||||||
GradientStop { position: 0 ; color: objekt.pressed ? "#000" : "#001" }
|
// gradient: Gradient
|
||||||
GradientStop { position: 1 ; color: objekt.pressed ? "#100" : "#000" }
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: objekt.pressed ? "#000" : "#001" }
|
||||||
}
|
// GradientStop { position: 1 ; color: objekt.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
appLoader.source = "ObjectTable.qml"
|
appLoader.source = "ObjectTable.qml"
|
||||||
objBackie.border.width = 2
|
// objBackie.border.width = 2
|
||||||
dashiBackie.border.width = 1
|
// dashiBackie.border.width = 1
|
||||||
kundiBackie.border.width = 1
|
// kundiBackie.border.width = 1
|
||||||
mitoBackie.border.width = 1
|
// mitoBackie.border.width = 1
|
||||||
invoBackie.border.width = 1
|
// invoBackie.border.width = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: mitarbeiter
|
id: mitarbeiter
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Mitarbeiter")
|
text: qsTr("Mitarbeiter")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
icon.source: "qrc:/images/employee.svg"
|
||||||
{
|
|
||||||
id: mitoBackie
|
ButtonGroup.group: buttonBar
|
||||||
border.width: mitarbeiter.activeFocus ? 2 : 1
|
// background: Rectangle
|
||||||
border.color: "#888"
|
// {
|
||||||
radius: 4
|
// id: mitoBackie
|
||||||
gradient: Gradient
|
// border.width: mitarbeiter.activeFocus ? 2 : 1
|
||||||
{
|
// border.color: "#888"
|
||||||
GradientStop { position: 0 ; color: mitarbeiter.pressed ? "#000" : "#001" }
|
// radius: 4
|
||||||
GradientStop { position: 1 ; color: mitarbeiter.pressed ? "#100" : "#000" }
|
// gradient: Gradient
|
||||||
}
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: mitarbeiter.pressed ? "#000" : "#001" }
|
||||||
|
// GradientStop { position: 1 ; color: mitarbeiter.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
appLoader.source = "EmployeeTable.qml"
|
appLoader.source = "EmployeeTable.qml"
|
||||||
mitoBackie.border.width = 2
|
// mitoBackie.border.width = 2
|
||||||
dashiBackie.border.width = 1
|
// dashiBackie.border.width = 1
|
||||||
kundiBackie.border.width = 1
|
// kundiBackie.border.width = 1
|
||||||
invoBackie.border.width = 1
|
// invoBackie.border.width = 1
|
||||||
objBackie.border.width = 1
|
// objBackie.border.width = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: offers
|
id: offers
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Angebote")
|
text: qsTr("Angebote")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
icon.source: "qrc:/images/offer.svg"
|
||||||
{
|
ButtonGroup.group: buttonBar
|
||||||
id: offersBackie
|
// background: Rectangle
|
||||||
border.width: offers.activeFocus ? 2 : 1
|
// {
|
||||||
border.color: "#888"
|
// id: offersBackie
|
||||||
radius: 4
|
// border.width: offers.activeFocus ? 2 : 1
|
||||||
gradient: Gradient
|
// border.color: "#888"
|
||||||
{
|
// radius: 4
|
||||||
GradientStop { position: 0 ; color: offers.pressed ? "#000" : "#001" }
|
// gradient: Gradient
|
||||||
GradientStop { position: 1 ; color: offers.pressed ? "#100" : "#000" }
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: offers.pressed ? "#000" : "#001" }
|
||||||
}
|
// GradientStop { position: 1 ; color: offers.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
appLoader.source = "OfferTable.qml"
|
appLoader.source = "OfferTable.qml"
|
||||||
mitoBackie.border.width = 2
|
// mitoBackie.border.width = 2
|
||||||
dashiBackie.border.width = 1
|
// dashiBackie.border.width = 1
|
||||||
kundiBackie.border.width = 1
|
// kundiBackie.border.width = 1
|
||||||
invoBackie.border.width = 1
|
// invoBackie.border.width = 1
|
||||||
objBackie.border.width = 1
|
// objBackie.border.width = 1
|
||||||
offersBackie.border.width = 1
|
// offersBackie.border.width = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: abrechnung
|
id: abrechnung
|
||||||
flat: true
|
flat: true
|
||||||
text: qsTr("Abrechnung")
|
text: qsTr("Abrechnung")
|
||||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
Layout.margins: 3
|
Layout.margins: 3
|
||||||
background: Rectangle
|
icon.source: "qrc:/images/invoice.svg"
|
||||||
{
|
ButtonGroup.group: buttonBar
|
||||||
id: invoBackie
|
// background: Rectangle
|
||||||
border.width: abrechnung.activeFocus ? 2 : 1
|
// {
|
||||||
border.color: "#888"
|
// id: invoBackie
|
||||||
radius: 4
|
// border.width: abrechnung.activeFocus ? 2 : 1
|
||||||
gradient: Gradient
|
// border.color: "#888"
|
||||||
{
|
// radius: 4
|
||||||
GradientStop { position: 0 ; color: abrechnung.pressed ? "#000" : "#001" }
|
// gradient: Gradient
|
||||||
GradientStop { position: 1 ; color: abrechnung.pressed ? "#100" : "#000" }
|
// {
|
||||||
}
|
// GradientStop { position: 0 ; color: abrechnung.pressed ? "#000" : "#001" }
|
||||||
}
|
// GradientStop { position: 1 ; color: abrechnung.pressed ? "#100" : "#000" }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: hspacer
|
id: hspacer
|
||||||
Layout.fillWidth: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
BarButton
|
||||||
{
|
{
|
||||||
id: atajos
|
id: atajos
|
||||||
|
implicitWidth: 90
|
||||||
|
implicitHeight: 90
|
||||||
|
checkable: false
|
||||||
icon.source: "qrc:/images/Bars3.svg"
|
icon.source: "qrc:/images/Bars3.svg"
|
||||||
|
|
||||||
flat: true
|
flat: true
|
||||||
Layout.rightMargin: 9
|
Layout.bottomMargin: Dimensions.s
|
||||||
onClicked: mainMenu.open()
|
onClicked: mainMenu.open()
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
|
|||||||
16
Gui/main.qml
@@ -21,14 +21,7 @@ ApplicationWindow
|
|||||||
|
|
||||||
TopBar
|
TopBar
|
||||||
{
|
{
|
||||||
|
|
||||||
id:topBar
|
id:topBar
|
||||||
anchors
|
|
||||||
{
|
|
||||||
rightMargin: 9
|
|
||||||
leftMargin: 9
|
|
||||||
}
|
|
||||||
|
|
||||||
visible: bad_config || !db_con ? false: true
|
visible: bad_config || !db_con ? false: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,11 +46,18 @@ ApplicationWindow
|
|||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
fill: parent
|
left: topBar.right
|
||||||
|
right: parent.right
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
topMargin: Dimensions.l
|
topMargin: Dimensions.l
|
||||||
bottomMargin: Dimensions.l
|
bottomMargin: Dimensions.l
|
||||||
rightMargin: Dimensions.l
|
rightMargin: Dimensions.l
|
||||||
leftMargin: Dimensions.l
|
leftMargin: Dimensions.l
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property alias window: appWindow
|
property alias window: appWindow
|
||||||
|
|||||||
87
TeroStyle/BarButton.qml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls.impl
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Templates as T
|
||||||
|
|
||||||
|
T.ToolButton {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
|
implicitContentHeight + topPadding + bottomPadding)
|
||||||
|
checkable: true
|
||||||
|
icon.color: Colors.foreground
|
||||||
|
icon.height: 36
|
||||||
|
icon.width: 36
|
||||||
|
topPadding: 20
|
||||||
|
// horizontalPadding: padding + 2
|
||||||
|
// spacing: 6
|
||||||
|
// display: AbstractButton.TextUnderIcon
|
||||||
|
|
||||||
|
// icon.color: control.checked || control.highlighted ? control.palette.brightText :
|
||||||
|
// control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
|
||||||
|
|
||||||
|
contentItem: Column
|
||||||
|
{
|
||||||
|
|
||||||
|
IconLabel
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
x: parent.width * .5 - width * .5
|
||||||
|
// height: icon.height
|
||||||
|
// width: icon.width
|
||||||
|
icon: control.icon
|
||||||
|
|
||||||
|
// display: control.display
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: control.text
|
||||||
|
font: Typography.dash
|
||||||
|
|
||||||
|
color: Colors.foreground
|
||||||
|
x: parent.width * .5 - width * .5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// spacing: control.spacing
|
||||||
|
// mirrored: control.mirrored
|
||||||
|
// display: control.TextUnderIcon
|
||||||
|
|
||||||
|
// icon: control.icon
|
||||||
|
// text: control.text
|
||||||
|
// font: control.font
|
||||||
|
// color: control.checked || control.highlighted ? control.palette.brightText :
|
||||||
|
// control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
id: mainrect
|
||||||
|
implicitWidth: control.width
|
||||||
|
implicitHeight: control.height
|
||||||
|
visible: !control.flat || control.down || control.checked || control.highlighted
|
||||||
|
x: control.left
|
||||||
|
y: control.top
|
||||||
|
color: Color.blend(control.checked || control.highlighted ? control.palette.dark : control.palette.button,
|
||||||
|
control.palette.mid, control.down ? 0.5 : 0.0)
|
||||||
|
border.color: control.palette.highlight
|
||||||
|
border.width: control.visualFocus ? 2 : 0
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
implicitHeight: control.height
|
||||||
|
implicitWidth: 6
|
||||||
|
x: mainrect.left
|
||||||
|
y: mainrect.top
|
||||||
|
color: "yellow"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,110 +1,246 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Templates as T
|
|
||||||
import QtQuick.Controls
|
|
||||||
import QtQuick.Controls.impl
|
import QtQuick.Controls.impl
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Templates as T
|
||||||
|
|
||||||
T.ComboBox {
|
T.ComboBox {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
font: Typography.body
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
implicitHeight: implicitContentHeight + topInset + bottomInset
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
|
implicitContentHeight + topPadding + bottomPadding,
|
||||||
|
implicitIndicatorHeight + topPadding + bottomPadding)
|
||||||
|
|
||||||
background: Rectangle {
|
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||||
border.color: Colors.interactive
|
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||||
border.width: 1
|
|
||||||
color: Colors.mantle
|
|
||||||
height: parent.height
|
|
||||||
radius: Dimensions.radius
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
contentItem: T.TextField {
|
|
||||||
autoScroll: control.editable
|
|
||||||
color: Colors.foreground
|
|
||||||
enabled: control.editable
|
|
||||||
font: Typography.body
|
|
||||||
implicitHeight: Typography.body.pointSize + topPadding + bottomPadding
|
|
||||||
inputMethodHints: control.inputMethodHints
|
|
||||||
padding: Dimensions.m
|
|
||||||
readOnly: control.down
|
|
||||||
selectByMouse: control.selectTextByMouse
|
|
||||||
text: control.editable ? control.editText : control.displayText
|
|
||||||
validator: control.validator
|
|
||||||
width: control.width - indicator.width
|
|
||||||
}
|
|
||||||
delegate: MenuItem {
|
|
||||||
id: menuItem
|
|
||||||
|
|
||||||
required property int index
|
delegate: ItemDelegate {
|
||||||
required property var model
|
required property var model
|
||||||
|
required property int index
|
||||||
|
|
||||||
|
width: ListView.view.width
|
||||||
|
text: model[control.textRole]
|
||||||
|
// palette.text: control.palette.text
|
||||||
|
// palette.highlightedText: control.palette.highlightedText
|
||||||
|
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
|
||||||
highlighted: control.highlightedIndex === index
|
highlighted: control.highlightedIndex === index
|
||||||
hoverEnabled: control.hoverEnabled
|
hoverEnabled: control.hoverEnabled
|
||||||
text: model[control.textRole]
|
}
|
||||||
width: control.width
|
|
||||||
|
indicator: ColorImage {
|
||||||
|
x: control.mirrored ? control.padding : control.width - width - control.padding
|
||||||
|
y: control.topPadding + (control.availableHeight - height) / 2
|
||||||
|
|
||||||
|
source: "qrc:/images/ChevronDown.svg"
|
||||||
|
opacity: enabled ? 1 : 0.3
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: T.TextField {
|
||||||
|
// leftPadding: !control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
|
||||||
|
// rightPadding: control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
|
||||||
|
// topPadding: 6 - control.padding
|
||||||
|
// bottomPadding: 6 - control.padding
|
||||||
|
implicitHeight: Typography.body.pixelSize + bottomPadding + topPadding
|
||||||
|
text: control.editable ? control.editText : control.displayText
|
||||||
|
padding: Dimensions.m
|
||||||
|
enabled: control.editable
|
||||||
|
autoScroll: control.editable
|
||||||
|
readOnly: control.down
|
||||||
|
inputMethodHints: control.inputMethodHints
|
||||||
|
validator: control.validator
|
||||||
|
selectByMouse: control.selectTextByMouse
|
||||||
|
|
||||||
|
color: Colors.foreground
|
||||||
|
// selectionColor: control.palette.highlight
|
||||||
|
// selectedTextColor: control.palette.highlightedText
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: menuItem.down || menuItem.highlighted ? Colors.primary : "transparent"
|
visible: control.enabled && control.editable && !control.flat
|
||||||
height: menuItem.height
|
border.width: parent && parent.activeFocus ? 2 : 1
|
||||||
width: menuItem.width
|
|
||||||
}
|
|
||||||
}
|
|
||||||
indicator: Rectangle {
|
|
||||||
id: indicator
|
|
||||||
|
|
||||||
border.color: Colors.interactive
|
border.color: Colors.interactive
|
||||||
bottomRightRadius: Dimensions.radius
|
|
||||||
color: Colors.primary
|
|
||||||
height: control.height
|
|
||||||
topRightRadius: Dimensions.radius
|
|
||||||
width: 20 + Dimensions.s * 2
|
|
||||||
x: control.width - width
|
|
||||||
y: 0
|
|
||||||
z: 2
|
|
||||||
|
|
||||||
IconLabel {
|
|
||||||
anchors.fill: parent
|
|
||||||
bottomPadding: Dimensions.s
|
|
||||||
icon.color: Colors.foreground
|
|
||||||
icon.source: "qrc:/images/ChevronDown.svg"
|
|
||||||
leftPadding: Dimensions.s
|
|
||||||
rightPadding: Dimensions.s
|
|
||||||
topPadding: Dimensions.s
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
|
|
||||||
onPressed: () => {
|
|
||||||
control.popup.visible = true;
|
|
||||||
control.popup.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
popup: T.Popup {
|
|
||||||
bottomMargin: 6
|
|
||||||
height: Math.min(contentItem.implicitHeight + 2, control.Window.height - topMargin - bottomMargin)
|
|
||||||
padding: 1
|
|
||||||
topMargin: 6
|
|
||||||
width: control.width
|
|
||||||
y: control.height
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
border.color: Colors.interactive
|
|
||||||
color: Colors.mantle
|
|
||||||
radius: Dimensions.radius
|
radius: Dimensions.radius
|
||||||
|
color: Colors.mantle
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
implicitWidth: 140
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: Dimensions.radius
|
||||||
|
color: Colors.mantle
|
||||||
|
border.color: Colors.interactive
|
||||||
|
border.width: 1
|
||||||
|
visible: !control.flat || control.down
|
||||||
|
}
|
||||||
|
|
||||||
|
popup: T.Popup {
|
||||||
|
y: control.height
|
||||||
|
width: control.width
|
||||||
|
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
|
||||||
|
topMargin: 6
|
||||||
|
bottomMargin: 6
|
||||||
|
palette: control.palette
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
clip: true
|
clip: true
|
||||||
currentIndex: control.highlightedIndex
|
|
||||||
implicitHeight: contentHeight
|
implicitHeight: contentHeight
|
||||||
model: control.popup.visible ? control.delegateModel : null
|
model: control.delegateModel
|
||||||
|
currentIndex: control.highlightedIndex
|
||||||
|
highlightMoveDuration: 0
|
||||||
|
|
||||||
T.ScrollBar.vertical: ScrollBar {
|
Rectangle {
|
||||||
}
|
z: 10
|
||||||
highlight: Rectangle {
|
width: parent.width
|
||||||
color: Colors.primary
|
height: parent.height
|
||||||
opacity: Colors.highlightOpacity
|
color: "transparent"
|
||||||
}
|
border.color: control.palette.mid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T.ScrollIndicator.vertical: ScrollIndicator { }
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: control.palette.window
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// import QtQuick
|
||||||
|
// import QtQuick.Templates as T
|
||||||
|
// import QtQuick.Controls
|
||||||
|
// import QtQuick.Controls.impl
|
||||||
|
|
||||||
|
// T.ComboBox {
|
||||||
|
// id: control
|
||||||
|
|
||||||
|
// font: Typography.body
|
||||||
|
// implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
|
// implicitContentHeight + topPadding + bottomPadding,
|
||||||
|
// implicitIndicatorHeight + topPadding + bottomPadding)
|
||||||
|
|
||||||
|
|
||||||
|
// contentItem: T.TextField {
|
||||||
|
// id: test
|
||||||
|
// autoScroll: control.editable
|
||||||
|
// color: Colors.foreground
|
||||||
|
// enabled: control.editable
|
||||||
|
|
||||||
|
// font: Typography.body
|
||||||
|
// implicitHeight: Typography.body.pixelSize + topPadding + bottomPadding
|
||||||
|
// inputMethodHints: control.inputMethodHints
|
||||||
|
// padding: Dimensions.m
|
||||||
|
// readOnly: control.down
|
||||||
|
// selectByMouse: control.selectTextByMouse
|
||||||
|
// text: control.editable ? control.editText : control.displayText
|
||||||
|
// validator: control.validator
|
||||||
|
// width: control.width - indicator.width
|
||||||
|
// verticalAlignment: Text.AlignVCenter
|
||||||
|
// }
|
||||||
|
// background: Rectangle {
|
||||||
|
// border.color: Colors.interactive
|
||||||
|
// border.width: 1
|
||||||
|
// color: Colors.mantle
|
||||||
|
// // height: parent.height
|
||||||
|
// radius: Dimensions.radius
|
||||||
|
// width: parent.width
|
||||||
|
// }
|
||||||
|
// // delegate: MenuItem {
|
||||||
|
// // id: menuItem
|
||||||
|
|
||||||
|
// // required property int index
|
||||||
|
// // required property var model
|
||||||
|
|
||||||
|
// // highlighted: control.highlightedIndex === index
|
||||||
|
// // hoverEnabled: control.hoverEnabled
|
||||||
|
// // text: model[control.textRole]
|
||||||
|
// // width: control.width
|
||||||
|
|
||||||
|
// // background: Rectangle {
|
||||||
|
// // color: menuItem.down || menuItem.highlighted ? Colors.primary : "transparent"
|
||||||
|
// // height: menuItem.height
|
||||||
|
// // width: menuItem.width
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// delegate: ItemDelegate {
|
||||||
|
// required property var model
|
||||||
|
// required property int index
|
||||||
|
|
||||||
|
// width: ListView.view.width
|
||||||
|
// text: model[control.textRole]
|
||||||
|
// // palette.text: control.palette.text
|
||||||
|
// // palette.highlightedText: control.palette.highlightedText
|
||||||
|
// // font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
|
||||||
|
// highlighted: control.highlightedIndex === index
|
||||||
|
// hoverEnabled: control.hoverEnabled
|
||||||
|
// }
|
||||||
|
// indicator: Rectangle {
|
||||||
|
// id: indicator
|
||||||
|
|
||||||
|
// border.color: Colors.interactive
|
||||||
|
// bottomRightRadius: Dimensions.radius
|
||||||
|
// color: Colors.primary
|
||||||
|
// height: control.height
|
||||||
|
// topRightRadius: Dimensions.radius
|
||||||
|
// width: 20 + Dimensions.s * 2
|
||||||
|
// x: control.width - width
|
||||||
|
// y: 0
|
||||||
|
// z: 2
|
||||||
|
|
||||||
|
// IconLabel {
|
||||||
|
// anchors.fill: parent
|
||||||
|
// bottomPadding: Dimensions.s
|
||||||
|
// icon.color: Colors.foreground
|
||||||
|
// icon.source: "qrc:/images/ChevronDown.svg"
|
||||||
|
// leftPadding: Dimensions.s
|
||||||
|
// rightPadding: Dimensions.s
|
||||||
|
// topPadding: Dimensions.s
|
||||||
|
// }
|
||||||
|
// MouseArea {
|
||||||
|
// anchors.fill: parent
|
||||||
|
// cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
|
// onPressed: () => {
|
||||||
|
// control.popup.visible = true;
|
||||||
|
// control.popup.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// popup: T.Popup {
|
||||||
|
// bottomMargin: 6
|
||||||
|
// height: Math.min(contentItem.implicitHeight + 2, control.Window.height - topMargin - bottomMargin)
|
||||||
|
// padding: 1
|
||||||
|
// topMargin: 6
|
||||||
|
// width: control.width
|
||||||
|
// y: control.height
|
||||||
|
|
||||||
|
// background: Rectangle {
|
||||||
|
// border.color: Colors.interactive
|
||||||
|
// color: Colors.mantle
|
||||||
|
// radius: Dimensions.radius
|
||||||
|
// }
|
||||||
|
// contentItem: ListView {
|
||||||
|
// clip: true
|
||||||
|
// currentIndex: control.highlightedIndex
|
||||||
|
// implicitHeight: contentHeight
|
||||||
|
// model: control.popup.visible ? control.delegateModel : null
|
||||||
|
|
||||||
|
// T.ScrollBar.vertical: ScrollBar {
|
||||||
|
// }
|
||||||
|
// highlight: Rectangle {
|
||||||
|
// color: Colors.primary
|
||||||
|
// opacity: Colors.highlightOpacity
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Component.onCompleted:
|
||||||
|
// {
|
||||||
|
// console.log(control.implicitContentHeight)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ pragma Singleton
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
QtObject {
|
QtObject
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Distance for objects that are tied to each other,
|
* Distance for objects that are tied to each other,
|
||||||
* e.g. a field and its label.
|
* e.g. a field and its label.
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
required property string label
|
required property string label
|
||||||
spacing: Dimensions.s
|
spacing: Dimensions.s
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
|
{
|
||||||
text: label
|
text: label
|
||||||
font: Typography.body
|
font: Typography.body
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,30 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Templates as T
|
import QtQuick.Templates as T
|
||||||
|
|
||||||
T.TextField {
|
T.TextField
|
||||||
|
{
|
||||||
id: control
|
id: control
|
||||||
background: Rectangle {
|
background: Rectangle
|
||||||
|
{
|
||||||
id: background
|
id: background
|
||||||
color: Colors.mantle
|
color: Colors.mantle
|
||||||
radius: Dimensions.radius
|
radius: Dimensions.radius
|
||||||
border.width: !control.focus ? 1 : 2
|
border.width: !control.focus ? 1 : 2
|
||||||
border.color: Colors.interactive
|
border.color: Colors.interactive
|
||||||
height: 47
|
height: control.implicitHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
color: Colors.foreground
|
color: Colors.foreground
|
||||||
implicitHeight: background.height
|
implicitHeight: Typography.body.pixelSize + topPadding + bottomPadding
|
||||||
placeholderTextColor: Colors.interactive
|
placeholderTextColor: Colors.interactive
|
||||||
font: Typography.body
|
font: Typography.body
|
||||||
padding: Dimensions.m
|
padding: Dimensions.m
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder
|
* Placeholder
|
||||||
*/
|
*/
|
||||||
@@ -36,3 +43,4 @@ T.TextField {
|
|||||||
renderType: control.renderType
|
renderType: control.renderType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ pragma Singleton
|
|||||||
import QtCore
|
import QtCore
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item
|
||||||
readonly property FontLoader robotoCondensed: FontLoader {
|
{
|
||||||
|
readonly property FontLoader robotoCondensed: FontLoader
|
||||||
|
{
|
||||||
source: "qrc:/fonts/RobotoCondensed.otf"
|
source: "qrc:/fonts/RobotoCondensed.otf"
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property font body: ({
|
readonly property font body:
|
||||||
|
({
|
||||||
family: robotoCondensed.font,
|
family: robotoCondensed.font,
|
||||||
pointSize: 16,
|
pointSize: 16,
|
||||||
weight: Font.Medium,
|
weight: Font.Medium,
|
||||||
@@ -16,11 +19,22 @@ Item {
|
|||||||
kerning: true,
|
kerning: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
readonly property font h1: ({
|
readonly property font h1:
|
||||||
|
({
|
||||||
family: body.family,
|
family: body.family,
|
||||||
pointSize: 38,
|
pointSize: 38,
|
||||||
weight: body.weight,
|
weight: body.weight,
|
||||||
letterSpacing: body.letterSpacing,
|
letterSpacing: body.letterSpacing,
|
||||||
kerning: body.kerning,
|
kerning: body.kerning,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
readonly property font dash:
|
||||||
|
({
|
||||||
|
family: body.family,
|
||||||
|
pointSize: 10,
|
||||||
|
weight: body.weight,
|
||||||
|
letterSpacing: body.letterSpacing,
|
||||||
|
kerning: body.kerning,
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,10 @@ singleton Typography Typography.qml
|
|||||||
Button Button.qml
|
Button Button.qml
|
||||||
ComboBox ComboBox.qml
|
ComboBox ComboBox.qml
|
||||||
Field Field.qml
|
Field Field.qml
|
||||||
|
TextField TextField.qml
|
||||||
|
BarButton BarButton.qml
|
||||||
Label Label.qml
|
Label Label.qml
|
||||||
QuickFilter QuickFilter.qml
|
QuickFilter QuickFilter.qml
|
||||||
TextField TextField.qml
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
3
images/contract.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 501 B |
3
images/customer.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 733 B |
3
images/dash.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 418 B |
3
images/employee.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 539 B |
3
images/invoice.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 490 B |
3
images/object.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 521 B |
3
images/offer.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg data-slot="icon" fill="none" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 589 B |
@@ -16,5 +16,13 @@
|
|||||||
<file>fonts/RobotoCondensed.otf</file>
|
<file>fonts/RobotoCondensed.otf</file>
|
||||||
<file>README</file>
|
<file>README</file>
|
||||||
<file>LICENSE</file>
|
<file>LICENSE</file>
|
||||||
|
<file>images/tero.jpg</file>
|
||||||
|
<file>images/dash.svg</file>
|
||||||
|
<file>images/invoice.svg</file>
|
||||||
|
<file>images/offer.svg</file>
|
||||||
|
<file>images/employee.svg</file>
|
||||||
|
<file>images/customer.svg</file>
|
||||||
|
<file>images/contract.svg</file>
|
||||||
|
<file>images/object.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
2
qml.qrc
@@ -59,7 +59,7 @@
|
|||||||
<file>TeroStyle/QuickFilter.qml</file>
|
<file>TeroStyle/QuickFilter.qml</file>
|
||||||
<file>TeroStyle/TextField.qml</file>
|
<file>TeroStyle/TextField.qml</file>
|
||||||
<file>TeroStyle/Typography.qml</file>
|
<file>TeroStyle/Typography.qml</file>
|
||||||
|
<file>TeroStyle/BarButton.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/TeroStyle"/>
|
<qresource prefix="/TeroStyle"/>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
||||||
|
|||||||