Skip to content

Commit

Permalink
using a toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cristeab committed May 25, 2024
1 parent efa5f39 commit 9da4c67
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 15 deletions.
1 change: 1 addition & 0 deletions img/FileCsv.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/FileExport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/Settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
<file>qml/LabelTextFieldBrowser.qml</file>
<file>qml/LabelComboBox.qml</file>
<file>img/FolderOpen.svg</file>
<file>img/FileCsv.svg</file>
<file>img/Settings.svg</file>
<file>img/FileExport.svg</file>
</qresource>
</RCC>
41 changes: 26 additions & 15 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,42 @@ ApplicationWindow {
height: 600
title: qsTr("Evidenta Fiscala")

menuBar: MenuBar {
Menu {
title: qsTr("Fisier")
MenuItem {
text: qsTr("Deschide...")
onTriggered: {
ToolBar {
id: toolBar
spacing: Theme.horizontalMargin
width: parent.width
background: Item {}
Row {
anchors.fill: parent
ToolButton {
icon.source: "qrc:/img/FileCsv.svg"
onClicked: {
fileDialogLoader.active = true
fileDialogLoader.item.visible = true
}
ToolTip {
text: qsTr("Deschide...")
visible: parent.hovered
}
}
MenuItem {
text: qsTr("Configurare...")
onTriggered: {
ToolButton {
icon.source: "qrc:/img/Settings.svg"
onClicked: {
settingsLoader.active = true
settingsLoader.item.visible = true
}
ToolTip {
text: qsTr("Configurare...")
visible: parent.hovered
}
}
MenuItem {
id: genReg
text: qsTr("Generare Registru")
onTriggered: tableModel.generateRegistry()
ToolButton {
icon.source: "qrc:/img/FileExport.svg"
onClicked: tableModel.generateRegistry()
enabled: 0 < tableTab.count
ToolTip {
text: qsTr("Generare Registru de Evidenta Fiscala")
visible: genReg.hovered
visible: parent.hovered
}
}
}
Expand All @@ -44,7 +55,7 @@ ApplicationWindow {
TabBar {
id: bar
anchors {
top: parent.top
top: toolBar.bottom
topMargin: Theme.verticalMargin
left: parent.left
leftMargin: Theme.horizontalMargin
Expand Down

0 comments on commit 9da4c67

Please sign in to comment.