123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- import QtQuick 2.6
- import QtQuick.Window 2.2
- import QtQuick.Controls 1.5
- import QtQuick.Controls.Styles 1.4
- import QtQuick.Controls.Private 1.0
- import com.gfa.ipc.appctrl 1.0
- Window {
- visible: true
- width: 800
- height: 480
- Component {
- id: imageDelegate
- Item {
- Image {
- anchors.centerIn: parent
- fillMode: Image.PreserveAspectFit
- height:20
- source: (styleData.value) === "usb" ? "qrc:/img/usb64.png" : (((styleData.value) === "ata" || (styleData.value) === "int") ? "qrc:/img/ata64.png" : "qrc:/img/mmc64.png")
- }
- }
- }
- Component {
- id: idTreeItemStyle
- Text {
- font.pointSize: 8
- font.italic: styleData.column ? false : true
- verticalAlignment: Text.AlignVCenter
- elide: styleData.elideMode
- color: styleData.textColor
- text: styleData.value
- }
- }
- Component {
- id: idButtonStyle
- ButtonStyle {
- label: Text {
- renderType: Text.NativeRendering
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.pointSize: 8
- text: StyleHelpers.stylizeMnemonics(control.text)
- color: SystemPaletteSingleton.buttonText(control.enabled)
- }
- }
- }
- Component {
- id: idTableViewHeaderStyle
- BorderImage {
- height: Math.round(textItem.implicitHeight * 1.2)
- source: "qrc:/img/header.png"
- border.left: 4
- border.bottom: 2
- border.top: 2
- Text {
- id: textItem
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: styleData.textAlignment
- anchors.leftMargin: horizontalAlignment === Text.AlignLeft ? 12 : 1
- anchors.rightMargin: horizontalAlignment === Text.AlignRight ? 8 : 1
- font.pointSize: 8
- font.bold: true
- text: styleData.value
- elide: Text.ElideRight
- color: styleData.textColor ? styleData.textColor : "black"
- renderType: Text.NativeRendering
- }
- Rectangle {
- width: 1
- height: parent.height - 2
- y: 1
- color: "#ccc"
- }
- }
- }
- Component {
- id: idTableViewItemStyle
- Item {
- height: Math.max(16, label.implicitHeight)
- property int implicitWidth: label.implicitWidth + 20
- Text {
- id: label
- objectName: "label"
- width: parent.width - x - (horizontalAlignment === Text.AlignRight ? 8 : 1)
- x: (styleData.hasOwnProperty("depth") && styleData.column === 0) ? 0 :
- horizontalAlignment === Text.AlignRight ? 1 : 8
- horizontalAlignment: styleData.textAlignment
- anchors.verticalCenter: parent.verticalCenter
- anchors.verticalCenterOffset: 1
- elide: styleData.elideMode
- font.pointSize: 8
- text: styleData.value !== undefined ? styleData.value.toString() : ""
- color: styleData.textColor
- renderType: Text.NativeRendering
- }
- }
- }
- Loader {
- id: idPageLoader
- source: "appctrl.qml"
- }
- }
|