author | sl |
Wed, 28 May 2014 10:20:32 +0200 | |
changeset 7 | b3cce7791326 |
parent 4 | 7d34342ac6e9 |
child 8 | 9543e1703afb |
permissions | -rw-r--r-- |
sl@2 | 1 |
import QtQuick 2.2 |
sl@2 | 2 |
import QtQuick.Controls 1.2 |
sl@2 | 3 |
import MiniDisplay 1.0 |
sl@4 | 4 |
import QtQuick.Layouts 1.1 |
sl@4 | 5 |
import Qt.labs.settings 1.0 |
sl@4 | 6 |
|
sl@2 | 7 |
|
sl@2 | 8 |
Item { |
sl@2 | 9 |
width: 100 |
sl@2 | 10 |
height: 62 |
sl@2 | 11 |
//SystemPalette { id: palette } |
sl@2 | 12 |
clip: true |
sl@4 | 13 |
// |
sl@5 | 14 |
|
sl@2 | 15 |
|
sl@4 | 16 |
// |
sl@4 | 17 |
ColumnLayout { |
sl@4 | 18 |
anchors.fill: parent |
sl@4 | 19 |
anchors.margins: 8 |
sl@4 | 20 |
spacing: 8 |
sl@4 | 21 |
|
sl@4 | 22 |
Text { |
sl@4 | 23 |
id: textDisplayStatus |
sl@4 | 24 |
text: qsTr("Disconnect") |
sl@4 | 25 |
} |
sl@4 | 26 |
|
sl@4 | 27 |
Button { |
sl@4 | 28 |
id: buttonOpenClose |
sl@4 | 29 |
text: display.isOpen ? qsTr("Disconnect") : qsTr("Connect") |
sl@4 | 30 |
onClicked: display.isOpen ? display.close() : display.open() |
sl@4 | 31 |
} |
sl@4 | 32 |
|
sl@4 | 33 |
Button { |
sl@4 | 34 |
text: qsTr("Clear") |
sl@4 | 35 |
onClicked: {display.clear(); display.swapBuffers();} |
sl@4 | 36 |
enabled: display.isOpen |
sl@4 | 37 |
activeFocusOnPress: false |
sl@4 | 38 |
} |
sl@4 | 39 |
|
sl@4 | 40 |
Button { |
sl@4 | 41 |
text: qsTr("Fill") |
sl@4 | 42 |
onClicked: {display.fill(); display.swapBuffers();} |
sl@4 | 43 |
enabled: display.isOpen |
sl@4 | 44 |
activeFocusOnPress: false |
sl@4 | 45 |
} |
sl@4 | 46 |
|
sl@4 | 47 |
} //ColumnLayout |
sl@4 | 48 |
} //Item |