main.qml
author sl
Tue, 27 May 2014 22:14:29 +0200
changeset 5 62a1d3631dcb
parent 2 780ee91f4ffb
child 7 b3cce7791326
permissions -rw-r--r--
Adding font property and example C++ code for rendering font in bitmap.
Cleaning up our MiniDisplay signal names.
     1 import QtQuick 2.2
     2 import QtQuick.Controls 1.2
     3 import QtPositioning 5.3
     4 import QtWinExtras 1.0
     5 import QtQuick.Dialogs 1.2
     6 import QtQuick.Window 2.1
     7 import Qt.labs.settings 1.0
     8 import MiniDisplay 1.0
     9 
    10 
    11 
    12 ApplicationWindow {
    13     id: appWindow
    14     visible: true
    15     width: 640
    16     height: 480
    17     title: qsTr("MiniDisplay Manager")
    18     SystemPalette { id: palette }
    19 
    20     Settings {
    21         property alias x: appWindow.x
    22         property alias y: appWindow.y
    23         property alias width: appWindow.width
    24         property alias height: appWindow.height
    25     }
    26 
    27     /*
    28     menuBar: MenuBar {
    29         Menu {
    30             title: qsTr("File")
    31             MenuItem {
    32                 text: qsTr("Exit")
    33                 onTriggered: Qt.quit();
    34             }
    35         }
    36 
    37     }*/
    38 
    39     MiniDisplay {
    40         id: display
    41         onOpened:{ textDisplayStatus.text=qsTr("Connected");}
    42         onClosed:textDisplayStatus.text=qsTr("Disconnected")
    43         onOpenError:{ textDisplayStatus.text=qsTr("Connection error");}
    44     }
    45 
    46     TabView {
    47         anchors.fill: parent
    48         anchors.margins: 8
    49         Tab {
    50             title: qsTr("Display")
    51             DisplayTab { anchors.fill: parent }
    52         }
    53         Tab {
    54             title: qsTr("Fonts")
    55             FontsTab { anchors.fill: parent }
    56         }
    57         Tab {
    58             title: qsTr("Tests")
    59             TestsTab { anchors.fill: parent }
    60         }
    61 
    62     }
    63 }