Compare commits

...

6 Commits

Author SHA256 Message Date
8236bd32e6 positioning searchbar and quickfilter 2025-03-24 11:21:50 +01:00
3520c65879 for changing branch 2025-03-24 09:44:55 +01:00
a821956a67 to switch branch 2025-03-21 15:56:05 +01:00
46cba58ebe for branch switch 2025-03-21 15:47:56 +01:00
a7a1cd4913 merge 2025-03-21 15:17:07 +01:00
34bd7409df edited Layout 2025-03-21 14:01:23 +01:00
9 changed files with 352 additions and 230 deletions

View File

@@ -4,7 +4,8 @@ import QtQuick.Controls
import Qt.labs.qmlmodels
ColumnLayout {
function viewCriterion(criterion) {
function viewCriterion(criterion)
{
business_model.viewCriterion(criterion.text);
}
@@ -12,12 +13,15 @@ ColumnLayout {
Component.onCompleted: customersStack.pop()
RowLayout {
Layout.fillWidth: true
Layout.horizontalStretchFactor: 1
spacing: Dimensions.l
RowLayout
{
// Layout.fillWidth: true
// Layout.horizontalStretchFactor: 1
// spacing: Dimensions.l
SearchBar {
SearchBar
{
}
QuickFilter {
@@ -27,46 +31,49 @@ ColumnLayout {
model: ListModel {
ListElement {
name: "Alle"
text: qsTr("Alle")
selected: true
}
ListElement {
name: "showProvider"
name: "Interessent"
text: qsTr("Interessent")
selected: false
}
ListElement {
name: "showClientele"
name: "Kunde"
text: qsTr("Kunde")
selected: false
}
ListElement {
name: "showProvider"
name: "Lieferant"
text: qsTr("Lieferant")
selected: false
}
ListElement {
name: "showFinished"
name: "Erledigt"
text: qsTr("Erledigt")
selected: false
}
}
}
Button {
Button
{
id: addCustomer
Layout.alignment: Qt.AlignRight
icon.source: "qrc:/images/PlusCircle.svg"
text: qsTr("Kunde Hinzufügen")
onClicked: appLoader.source = "AddCustomer.qml"
}
}
ColumnLayout {
ColumnLayout
{
clip: true
HorizontalHeaderView {
HorizontalHeaderView
{
id: horizontalHeader
Layout.fillWidth: true
@@ -74,14 +81,16 @@ ColumnLayout {
movableColumns: true //@disable-check M16
syncView: customerTable
delegate: Rectangle {
delegate: Rectangle
{
Layout.fillWidth: true
border.color: addCustomer.palette.base
color: addCustomer.palette.alternateBase
implicitHeight: 40
implicitWidth: 1
Text {
Text
{
color: addCustomer.palette.text
elide: Text.ElideRight
height: parent.height
@@ -158,4 +167,5 @@ ColumnLayout {
Layout.fillWidth: true
}
}
}

View File

@@ -3,114 +3,170 @@ import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
Item
ColumnLayout
{
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
SearchBar
function viewEmployees(criterion)
{
id:searchBar
anchors.margins: 9
employee_model.viewCriterion(criterion)
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
}
Button
{
id: addEmployeeBtn
text: qsTr("Mitarbeiter Hinzufügen")
icon.source: "qrc:/images/PlusCircle.svg"
anchors.right: parent.right
flat: true
onClicked: appLoader.source = "AddApplicant.qml"
}
anchors.fill: parent
ButtonGroup
Component.onCompleted: employeesStack.pop()
// property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
RowLayout
{
id: criterion
// buttons: criterion.children
onClicked:
SearchBar
{
viewEmployees(criterion.checkedButton.text)
id:searchBar
}
QuickFilter
{
onSelectedChanged: (name) =>
{
business_model.viewCriterion(name)
}
model: ListModel
{
ListElement
{
name: "Alle"
text: qsTr("Alle")
selected: true
}
ListElement
{
name: "Bewerber"
text: qsTr("Bewerber")
selected: false
}
ListElement
{
name: "Mitarbeiter"
text: qsTr("Kunde")
selected: false
}
ListElement
{
name: "Lieferant"
text: qsTr("Lieferant")
selected: false
}
ListElement
{
name: "Erledigt"
text: qsTr("Erledigt")
selected: false
}
}
}
Button
{
id: addEmployeeBtn
text: qsTr("Mitarbeiter Hinzufügen")
icon.source: "qrc:/images/PlusCircle.svg"
Layout.alignment: Qt.AlignRight
flat: true
onClicked: appLoader.source = "AddApplicant.qml"
}
}
ColumnLayout
{
id: tableParent
clip: true
anchors
{
top: searchBar.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
}
RowLayout
{
id: viewCriterion
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)
}
}
// ButtonGroup
// {
// id: criterion
// // buttons: criterion.children
// onClicked:
// {
// viewEmployees(criterion.checkedButton.text)
// }
// }
}
// ColumnLayout
// {
// id: tableParent
// clip: true
// anchors
// {
// top: searchBar.bottom
// bottom: parent.bottom
// left: parent.left
// right: parent.right
// }
// RowLayout
// {
// id: viewCriterion
// 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
{
@@ -143,8 +199,9 @@ Item
{
id: appliEmpTable
//Layout.fillHeight: true
height: tableParent.height - (viewCriterion.height + employeeTableHeader.height)
//height: tableParent.height - (viewCriterion.height + employeeTableHeader.height)
Layout.fillWidth: true
Layout.fillHeight: true
columnSpacing: 1
rowSpacing: 2
alternatingRows: true
@@ -216,9 +273,9 @@ Item
}
}
function viewEmployees(criterion)
{
employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
}
Component.onCompleted: employeesStack.pop()
}
// function viewEmployees(criterion)
// {
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
// }
// Component.onCompleted: employeesStack.pop()

View File

@@ -3,21 +3,73 @@ import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
Item
ColumnLayout
{
SearchBar
function viewCriterion(criterion)
{
id:searchBar
business_model.viewCriterion(criterion.text);
}
function onObjectContactAdded(added)
{
console.log(added)
if (added) object_model.viewCriterion("")
}
Button
anchors.fill: parent
Component.onCompleted:
{
id: addObjectBtn
icon.source: "qrc:/images/PlusCircle.svg"
text: qsTr("Objekt Hinzufügen")
anchors.right: parent.right
onClicked: appLoader.source = "AddObject.qml"
contact_model.objectContactAdded.connect(onObjectContactAdded)
objectsStack.pop()
}
RowLayout
{
SearchBar
{
}
QuickFilter {
onSelectedChanged: (name) => {
business_model.viewCriterion(name)
}
model: ListModel {
ListElement {
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"
text: qsTr("Objekt Hinzufügen")
Layout.alignment: Qt.AlignRight
onClicked: appLoader.source = "AddObject.qml"
}
}
@@ -25,14 +77,14 @@ Item
{
id: tableColumn
clip: true
anchors
{
top: searchBar.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
topMargin: 15
}
// anchors
// {
// top: searchBar.bottom
// bottom: parent.bottom
// left: parent.left
// right: parent.right
// topMargin: 15
// }
HorizontalHeaderView
{
id: horizontalHeaderview
@@ -131,26 +183,32 @@ Item
// }
}
Item
{
Layout.fillWidth: true
}
}
Item
{
Layout.fillHeight: true
}
// function onObjectContactAdded(added)
// {
// console.log(added)
// if (added) object_model.viewCriterion("")
// }
// function viewCriterion(criterion)
// {
// object_model.viewCriterion(criterion.text)
// }
Component.onCompleted:
{
contact_model.objectContactAdded.connect(onObjectContactAdded)
objectsStack.pop()
}
// Component.onCompleted:
// {
// contact_model.objectContactAdded.connect(onObjectContactAdded)
// objectsStack.pop()
// }
function onObjectContactAdded(added)
{
console.log(added)
if (added) object_model.viewCriterion("")
}
// function onObjectContactAdded(added)
// {
// console.log(added)
// if (added) object_model.viewCriterion("")
// }
}

View File

@@ -3,12 +3,72 @@ import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
Item
ColumnLayout
{
property var availableFilters: []
SearchBar
anchors.fill: parent
function viewOffers(criterion)
{
id:searchBar
//offer_model.viewCriterion(criterion)
}
RowLayout
{
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 {
id: spacer
Layout.fillHeight: true
}
}

View File

@@ -3,78 +3,12 @@ import QtQuick.Controls
import QtQuick.Layouts
RowLayout
{
id: searchBar
TextField {
Layout.preferredWidth: 300
placeholderText: qsTr("Suche")
TextField
{
id: searchField
placeholderText: qsTr("Suche")
leftPadding: 3
rightPadding: 3
Layout.preferredWidth: 300
Button
{
icon.source: "qrc:/images/search.svg"
icon.color: "olive"
x: parent.x + parent.width - width
height: parent.height
flat: true
}
Button
{
id: filterBtn
icon.source: "qrc:/images/filter.svg"
icon.color: "olive"
x: parent.x + parent.width
height: searchField.height
flat: true
onClicked: filterPopup.open()
}
}
Popup
{
id: filterPopup
x: filterBtn.x + filterBtn.width
y: filterBtn.y
width: 100
height: 150
modal: true
focus: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
contentItem: Item
{
ColumnLayout
{
anchors.fill: parent
//id: filterContent
Repeater
{
model: availableFilters
CheckBox
{
text: model.modelData
onClicked:
{
setFilter(text, checkState)
}
}
}
}
}
}
function setFilter(filter,activated)
{
console.log(filter)
console.log(activated)
Button {
icon.source: "qrc:/images/MagnifyingGlass.svg"
isFieldButton: true
}
}

View File

@@ -225,7 +225,8 @@ ColumnLayout
BarButton
{
id: atajos
implicitWidth: 90
implicitHeight: 90
checkable: false
icon.source: "qrc:/images/Bars3.svg"

View File

@@ -21,7 +21,6 @@ ApplicationWindow
TopBar
{
id:topBar
visible: bad_config || !db_con ? false: true
}
@@ -47,8 +46,13 @@ ApplicationWindow
anchors
{
left: topBar.right
right: parent.right
top: parent.top
bottom: parent.bottom
fill: parent
topMargin: Dimensions.l
bottomMargin: Dimensions.l
rightMargin: Dimensions.l

View File

@@ -11,3 +11,4 @@ Label Label.qml
QuickFilter QuickFilter.qml

View File

@@ -16,7 +16,6 @@
<file>fonts/RobotoCondensed.otf</file>
<file>README</file>
<file>LICENSE</file>
<<<<<<< HEAD
<file>images/tero.jpg</file>
<file>images/dash.svg</file>
<file>images/invoice.svg</file>
@@ -25,7 +24,5 @@
<file>images/customer.svg</file>
<file>images/contract.svg</file>
<file>images/object.svg</file>
=======
>>>>>>> main
</qresource>
</RCC>