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