138 lines
4.3 KiB
QML
Executable File
138 lines
4.3 KiB
QML
Executable File
/*
|
|
* AdvoTracker - Hotline tackingtool for Advocats
|
|
*
|
|
* Copyright (c) 2017 Ralf Zerres <ralf.zerres@networkx.de>
|
|
*
|
|
* AdvoTracker is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation; either version 2.1 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* AdvoTracker is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with AdvoTracker; If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import QtQuick 2.10 // Qt 5.10
|
|
import QtQuick.Controls 2.3 // Qt 5.10
|
|
import QtQuick.Layouts 1.3 // Qt 5.10
|
|
import QtQuick.Controls.Material 2.3 // Qt 5.10
|
|
|
|
// AdvoTracker Module
|
|
import de.networkx.AdvoTracker 1.0 as Nwx
|
|
|
|
/**
|
|
* @brief Add relevant NumberHarm informations to db
|
|
* @param numberHarm - Schadensnummer
|
|
* @param numberPolicyholder - Policennummer des Versicherungsnehmers
|
|
* @param numberCallback - Rückrufnummer
|
|
* @param dateCallback - Rückrufdatum
|
|
* @param dateRecorded - Schadensdatum
|
|
* @param clerkId - integer representation of assigned cleark
|
|
*
|
|
* @return QSqlError
|
|
*/
|
|
|
|
Page {
|
|
id: pageNumberHarmStatic
|
|
// test with given numberHarm database entry
|
|
property string numberHarm: "47114711"
|
|
property bool doneCME: false
|
|
|
|
Action {
|
|
id: actionNumberHarmData
|
|
shortcut: "Ctrl+H"
|
|
onTriggered: {
|
|
//loaderNumberHarmData.source = "PaneNumberHarmData.qml"
|
|
loaderNumberHarmData.setSource("qrc:/pages/PaneNumberHarmData.qml", {"numberHarm": numberHarm});
|
|
swipeNumberHarm.setCurrentIndex(0)
|
|
console.log(shortcut)
|
|
console.log("numberHarm:", numberHarm)
|
|
console.log("loader.setSource: loaderNumberHarmData")
|
|
}
|
|
} // actionNumberHarmData
|
|
|
|
Action {
|
|
id: actionNumberHarmAdmin
|
|
shortcut: "Ctrl+D"
|
|
onTriggered: {
|
|
//loaderNumberHarmAdmin.source = "PaneNumberHarmAdmin.qml"
|
|
loaderNumberHarmAdmin.setSource("qrc:/pages/PaneNumberHarmAdmin.qml", {"numberHarm": numberHarm});
|
|
swipeNumberHarm.setCurrentIndex(1)
|
|
console.log(shortcut)
|
|
console.log("numberHarm:", numberHarm)
|
|
console.log("loader.setSource: loaderNumberHarmAdmin")
|
|
}
|
|
} // actionNumberHarmAdmin
|
|
|
|
header: TabBar {
|
|
id: tabBar
|
|
width: parent.width
|
|
position: TabBar.Header
|
|
contentWidth: 150
|
|
padding: 4
|
|
//font.pointSize: 12
|
|
wheelEnabled: false
|
|
spacing: 8
|
|
antialiasing: true
|
|
background: Rectangle {
|
|
//color: tabbar.down ? "#d6d6d6": "#f6f6f6"
|
|
border.width: 1
|
|
radius: 4
|
|
}
|
|
currentIndex: swipeNumberHarm.currentIndex
|
|
onCurrentIndexChanged: {
|
|
swipeNumberHarm.currentIndex = currentIndex
|
|
}
|
|
|
|
TabButton {
|
|
text: qsTr("&Harm data")
|
|
action: actionNumberHarmData
|
|
}
|
|
//TabButton {
|
|
// text: qsTr("Extended")
|
|
// action: actionPolicyExtended
|
|
//}
|
|
TabButton {
|
|
text: qsTr("Administative &data")
|
|
action: actionNumberHarmAdmin
|
|
}
|
|
} // tabBar
|
|
|
|
SwipeView {
|
|
id: swipeNumberHarm
|
|
anchors.fill: parent
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: parent.height * 0.85
|
|
currentIndex: tabBar.currentIndex
|
|
//signal handlerLoader(string name, int index)
|
|
|
|
Loader {
|
|
// Declaration of a Loader. It will be activated later.
|
|
id: loaderNumberHarmData
|
|
focus: true
|
|
}
|
|
|
|
Loader {
|
|
// Declaration of a Loader. It will be activated later.
|
|
id: loaderNumberHarmAdmin
|
|
focus: true
|
|
}
|
|
|
|
} // swipeNumberHarm
|
|
|
|
PageIndicator {
|
|
id: indicatorPolicy
|
|
count: swipeNumberHarm.count
|
|
currentIndex: swipeNumberHarm.currentIndex
|
|
|
|
anchors.bottom: swipeNumberHarm.bottom
|
|
anchors.horizontalCenter: swipeNumberHarm.horizontalCenter
|
|
}
|
|
|
|
} // pagePolicy
|