blob: 976faa2c061917d119939c5d7bdda6958ac05a47 [file] [log] [blame]
taylorchuc27dd482014-05-17 20:06:49 -07001import QtQuick 2.2
2import QtQuick.Window 2.1
3import QtQuick.Controls 1.1
4import QtQuick.Layouts 1.0
5
6ApplicationWindow {
7 visible: false
8 id: window
9 title: "NFD Control Center"
10 minimumWidth: 600
11 minimumHeight: 400
12
13 TabView {
14 anchors.fill: parent
15 anchors.topMargin: 20
16 anchors.bottomMargin: 20
17 anchors.leftMargin: 20
18 anchors.rightMargin: 20
19
20 Tab {
21 title: "General"
22 ColumnLayout {
23 anchors.fill: parent
24 GroupBox {
25 title: "Basic"
26 id: checkboxControl
27 anchors.top: parent.top
28 anchors.left: parent.left
29 anchors.right: parent.right
30 anchors.topMargin: 20
31 anchors.leftMargin: 20
32 anchors.rightMargin: 20
33 anchors.bottomMargin: 20
34 Column {
35 spacing: 5
36 anchors.fill: parent
37 anchors.topMargin: 10
38 anchors.bottomMargin: 10
39 anchors.leftMargin: 10
40 anchors.rightMargin: 10
41 CheckBox {
42 id: startOnLogin
43 enabled: false
44 text: "Automatically start NFD Control Center on login"
45 }
46 CheckBox {
47 id: discoverHub
48 text: "Discover nearest NDN hub"
49 onCheckedChanged: {
50 if (this.checked) {
51 trayModel.autoConfig()
52 }
53 }
54 }
Alexander Afanasyev4086d512014-07-11 15:56:33 -070055 // CheckBox {
56 // id: checkUpdate
57 // enabled: false
58 // text: "Check for software updates"
59 // }
taylorchuc27dd482014-05-17 20:06:49 -070060 }
61 }
62 GroupBox {
63 title: "Status"
64 id: status
65 anchors.top: checkboxControl.bottom
66 anchors.left: parent.left
67 anchors.right: parent.right
68 anchors.topMargin: 20
69 anchors.leftMargin: 20
70 anchors.rightMargin: 20
71 anchors.bottomMargin: 20
72 Row {
73 spacing: 20
74 anchors.topMargin: 10
75 anchors.leftMargin: 10
76 anchors.rightMargin: 10
77 anchors.bottomMargin: 10
78 anchors.fill: parent
79 Button {
80 text: "Traffic map"
81 onClicked: Qt.openUrlExternally('http://ndnmap.arl.wustl.edu')
82 }
83 Button {
84 text: "Routing status"
85 onClicked: Qt.openUrlExternally('http://netlab.cs.memphis.edu/script/htm/status.htm')
86 }
87 }
88 }
Alexander Afanasyev4086d512014-07-11 15:56:33 -070089 Button {
90 id: startStopButton
91 text: startStopButtonText
92
93 anchors.top: status.bottom
94 anchors.left: parent.left
95 anchors.right: parent.right
96 anchors.topMargin: 20
97 anchors.leftMargin: 20
98 anchors.rightMargin: 20
99 anchors.bottomMargin: 20
100
101 onClicked: trayModel.startStopNfd()
102 }
taylorchuc27dd482014-05-17 20:06:49 -0700103 }
104 }
Alexander Afanasyev4086d512014-07-11 15:56:33 -0700105 // Tab {
106 // title: "FIB status"
107 // TableView {
108 // anchors.fill: parent
109 // anchors.topMargin: 20
110 // anchors.bottomMargin: 20
111 // anchors.leftMargin: 20
112 // anchors.rightMargin: 20
113 // TableViewColumn{
114 // role: "prefix"
115 // title: "NDN prefix"
116 // width: 300
117 // }
118 // TableViewColumn{
119 // role: "faceId"
120 // title: "Face ID"
121 // width: 50
122 // }
123 // TableViewColumn{
124 // role: "cost"
125 // title: "Cost"
126 // width: 50
127 // }
128 // model: fibModel
129 // }
130 // }
taylorchuc27dd482014-05-17 20:06:49 -0700131 Tab {
132 title: "Forwarder status"
133 TableView {
134 anchors.fill: parent
135 anchors.topMargin: 20
136 anchors.bottomMargin: 20
137 anchors.leftMargin: 20
138 anchors.rightMargin: 20
139 model: forwarderModel
140 TableViewColumn{
141 role: "type"
142 title: "Type"
143 width: 200
144 }
145 TableViewColumn{
146 role: "value"
147 title: "Value"
148 width: 200
149 }
150 }
151 }
152 Tab {
153 title: "Security"
154 Column {
155 spacing: 2
156 anchors.fill: parent
157 anchors.topMargin: 20
158 anchors.bottomMargin: 20
159 anchors.leftMargin: 20
160 anchors.rightMargin: 20
161 Button {
162 text: "Obtain NDN Certificate"
163 onClicked: Qt.openUrlExternally('http://ndncert.named-data.net')
164 }
165 }
166 }
167 }
168 Connections {
169 target: trayModel;
170 onShowApp: {
171 window.show()
172 window.raise()
173 }
174 }
Alexander Afanasyev4086d512014-07-11 15:56:33 -0700175 // Timer {
176 // interval: 1000; running: true; repeat: true
177 // onTriggered: {
178 // fibModel.fetchFibInformation()
179 // }
180 // }
taylorchuc27dd482014-05-17 20:06:49 -0700181}