125 lines
3.6 KiB
QML
Executable File
125 lines
3.6 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 QtQml.Models 2.2
|
|
|
|
// our adapted Module
|
|
import de.networkx.AdvoTracker 1.0 as Nwx
|
|
|
|
Pane {
|
|
id: userRoleTable
|
|
|
|
// define a new qml: UserRoleToolBar
|
|
// ToolBar {
|
|
// }
|
|
//header: userRoleToolBar
|
|
|
|
/*
|
|
header: ToolBar {
|
|
ToolButton {
|
|
text: qsTr("Back")
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 10
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
onClicked: root.StackView.view.pop()
|
|
}
|
|
|
|
Label {
|
|
text: qsTr("Available User Roles")
|
|
font.pixelSize: 12
|
|
anchors.centerIn: parent
|
|
}
|
|
}
|
|
*/
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
|
|
ListView {
|
|
id: listViewUserRoles
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Layout.margins: userRoleTable.leftPadding
|
|
displayMarginBeginning: 40
|
|
displayMarginEnd: 40
|
|
spacing: 6
|
|
|
|
model: visualModel
|
|
|
|
ScrollBar.vertical: ScrollBar {
|
|
//policy: AlwaysVisible
|
|
}
|
|
}
|
|
}
|
|
|
|
DelegateModel {
|
|
id: visualModel
|
|
model: modelUserRole
|
|
|
|
delegate: ItemDelegate {
|
|
//anchors.left: parent.left
|
|
id: itemDelegateUserRole
|
|
width: parent.width
|
|
spacing: 6
|
|
|
|
contentItem: Frame {
|
|
id: frameUserRole
|
|
|
|
Row {
|
|
id: rowUserRole
|
|
//anchors.left: parent.left
|
|
spacing: 6;
|
|
|
|
Text {
|
|
id: pkId
|
|
Layout.minimumWidth: 10
|
|
Layout.preferredWidth: 50
|
|
text: id
|
|
}
|
|
Text {
|
|
id: roleId
|
|
Layout.minimumWidth: 10
|
|
Layout.preferredWidth: 50
|
|
text: userRoleId
|
|
}
|
|
Text {
|
|
id: roleName
|
|
Layout.minimumWidth: 100
|
|
Layout.preferredWidth: 120
|
|
text: userRoleName
|
|
}
|
|
/*
|
|
Label {
|
|
id: roleName
|
|
text: model.roleName
|
|
}
|
|
Label {
|
|
id: dateChanged
|
|
text: model.dateChanged
|
|
}
|
|
*/
|
|
} // frameUserRole
|
|
} // rowUserRole
|
|
} // itemDelegateUserRole
|
|
}
|
|
} // Pane
|