summaryrefslogtreecommitdiff
path: root/testapp/qml/testapp/main.qml
blob: fe30f3ed3d3e26246cc84092ea0fae305fbd83e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import QtQuick 2.0
import QtQuick.Controls 1.0
import browserdbusinterface 1.0

ApplicationWindow {
    id: root
    title: "Genivi Browser PoC test application"
    width: 800
    height: 1000
    color: "gray"

    BrowserInterface {
        id: browserinterface
    }

    Item {
        id: header
        width: parent.width
        height: 40

        Rectangle {
            width: parent.width
            height: 2
            color: "black"
            anchors.bottom: parent.bottom
        }
        Text {
            id: instancetxt
            anchors.left: parent.left
            anchors.leftMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            text: qsTr("Instance Id:")
        }
        TextField {
            id: inputstring
            width: 30
            height: 30
            text: "1"
            font.pixelSize: 14
            anchors.left: instancetxt.right
            anchors.leftMargin: 3
            anchors.verticalCenter: parent.verticalCenter
        }
        Button {
            id: connectbtn
            width: 70
            height: inputstring.height
            anchors.top: inputstring.top
            anchors.left: inputstring.right
            anchors.leftMargin: 20
            text: "Connect"
            onClicked: browserinterface.connectdbussession(inputstring.text)
        }
        Component {
            id: hallo
            BookmarkManager{}
        }

        Text {
            id: tabs
            anchors.left: connectbtn.right
            anchors.leftMargin: 30
            anchors.verticalCenter: parent.verticalCenter
            text: qsTr("Window:")
            visible: browserinterface.connected
        }
        Button {
            id: tab1
            width: 30
            height: width
            anchors.left: tabs.right
            anchors.leftMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            text: "1"
            onClicked: browserinterface.selectTab(1)
            visible: browserinterface.connected
        }
        Button {
            id: tab2
            width: 30
            height: width
            anchors.left: tab1.right
            anchors.leftMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            text: "2"
            onClicked: browserinterface.selectTab(2)
            visible: browserinterface.connected
        }
        Button {
            id: tab3
            width: 30
            height: width
            anchors.left: tab2.right
            anchors.leftMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            text: "3"
            onClicked: browserinterface.selectTab(3)
            visible: browserinterface.connected
        }
        Button {
            id: tab4
            width: 30
            height: width
            anchors.left: tab3.right
            anchors.leftMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            text: "4"
            onClicked: browserinterface.selectTab(4)
            visible: browserinterface.connected
        }
    }

    TabView {
        id: tabview
        anchors.top: header.bottom
        anchors.topMargin: 3
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        anchors.right: parent.right

        visible: browserinterface.connected

        Tab {
            id: browser
            title: "IBrowser"
            anchors.fill: parent
            clip: true
            Browser {}
        }
        Tab {
            id: webpage
            title: "IWebPageWindow"
            anchors.fill: parent
            clip: true
            WebPageWindow {}
        }
        Tab {
            id: userinput
            title: "IUserInput"
            anchors.fill: parent
            clip: true
            UserInput {}
        }
        Tab {
            id: bookmarks
            title: "IBookmarkManager"
            anchors.fill: parent
            clip: true
            BookmarkManager {}
        }
    }
}