Created
May 22, 2019 08:04
-
-
Save KrzaQ/4172b8592cae7b721123aa24e83ee8fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtQuick.Controls 2.12 | |
import QtQuick.Layouts 1.3 | |
import "../js/temp.js" as TempJS | |
Rectangle { | |
id: mainScreen | |
anchors.fill: parent | |
color: "transparent" | |
ScreenTitleLabel { | |
id: title | |
text: qsTr("Generowanie List Kompletacyjnyc22h") | |
} | |
signal generowanieListClicked() | |
signal podgladStrefyClicked() | |
signal wydrukDuplikatowClicked() | |
signal podgladZlecenClicked() | |
ListModel { | |
id: coordinatorMainButtons | |
ListElement { | |
text: qsTr("Generowanie list kompletacyjnych") | |
onClicked: function() { generowanieListClicked() } | |
} | |
ListElement { | |
text: qsTr("Podgląd strefy automatycznego sortowania") | |
onClicked: function() { podgladStrefyClicked() } | |
} | |
ListElement { | |
text: qsTr("Wydruk duplikatów list") | |
onClicked: function() { wydrukDuplikatowClicked() } | |
} | |
ListElement { | |
text: qsTr("Podgląd zleceń") | |
onClicked: function() { podgladZlecenClicked() } | |
} | |
} | |
function cocoInitialize() { | |
const funcs = [ | |
['f1', {onClicked: generowanieListClicked}], | |
['f2', {onClicked: podgladStrefyClicked}], | |
['f3', {onClicked: wydrukDuplikatowClicked}], | |
['f4', {onClicked: podgladZlecenClicked}], | |
['esc', {onClicked: function(){ main.switchWindow('Login') } }] | |
] | |
main.resetFnButtons(funcs); | |
} | |
onGenerowanieListClicked: main.switchWindow('GenerowanieListKompletacyjnych') | |
// Button { | |
// anchors { | |
// top: title.bottom | |
// horizontalCenter: mainScreen.horizontalCenter | |
// margins: 5 | |
// } | |
// width: 300 | |
// id: generowanieList | |
// text: qsTr("Generowanie list kompletacyjnych") | |
// onClicked: mainScreen.generowanieListClicked() | |
// } | |
// Button { | |
// anchors { | |
// top: generowanieList.bottom | |
// horizontalCenter: mainScreen.horizontalCenter | |
// margins: 5 | |
// } | |
// width: 300 | |
// id: podgladStrefy | |
// text: qsTr("Podgląd strefy automatycznego sortowania") | |
// onClicked: mainScreen.podgladStrefyClicked() | |
// } | |
// Button { | |
// anchors { | |
// top: podgladStrefy.bottom | |
// horizontalCenter: mainScreen.horizontalCenter | |
// margins: 5 | |
// } | |
// width: 300 | |
// id: wydrukDuplikatow | |
// text: qsTr("Wydruk duplikatów list") | |
// onClicked: mainScreen.wydrukDuplikatowClicked() | |
// } | |
// Button { | |
// anchors { | |
// top: wydrukDuplikatow.bottom | |
// horizontalCenter: mainScreen.horizontalCenter | |
// margins: 5 | |
// } | |
// width: 300 | |
// id: podgladZlecen | |
// text: qsTr("Podgląd zleceń") | |
// onClicked: mainScreen.podgladZlecenClicked() | |
// } | |
ListView { | |
anchors { | |
horizontalCenter: mainScreen.horizontalCenter | |
// left: mainScreen.left | |
// right: mainScreen.right | |
top: mainScreen.top | |
bottom: mainScreen.bottom | |
margins: 5 | |
} | |
// width: mainScreen.width / 2 | |
spacing: 5 | |
// orientation: Qt.Vertical | |
Repeater { | |
model: coordinatorMainButtons | |
Button { | |
text: model.text | |
// Layout.fillWidth: true | |
// Layout.fillHeight: true | |
onClicked: model.onClicked() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment