blob: c73f0a7893d363f8d49ae62ed946abb005e814bf [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
Qi Zhao6d0399e2017-02-23 16:24:39 -08009 title: "NDN Control Center"
Qi Zhao7e524492017-03-02 15:05:45 -080010 minimumWidth: 700
taylorchuc27dd482014-05-17 20:06:49 -070011 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
Qi Zhao6d0399e2017-02-23 16:24:39 -080043 text: "Launch NDN Control Center on login"
Qi Zhaoae9c4312017-02-02 11:36:12 -080044 checked: trayModel.isNccAutoStartEnabled()
45 onCheckedChanged: trayModel.enableDisableNccAutoStart(this.checked)
46 }
47 CheckBox {
48 id: autoStart
49 text: "Automatically start NFD"
50 checked: trayModel.isNfdAutoStartEnabled()
51 onCheckedChanged: trayModel.enableDisableNfdAutoStart(this.checked)
taylorchuc27dd482014-05-17 20:06:49 -070052 }
53 CheckBox {
Qi Zhao86f2b212016-12-06 12:44:16 -080054 id: autoConfig
55 text: "Automatically start NDN auto configuration"
Qi Zhaoae9c4312017-02-02 11:36:12 -080056 checked: trayModel.isNdnAutoConfigEnabled()
57 onCheckedChanged: trayModel.enableDisableNdnAutoConfig(this.checked)
58 }
59 CheckBox {
60 id: shutdownOnQuit
61 text: "Shutdown NFD daemon on quit"
62 checked: trayModel.isNfdStopOnExitEnabled()
63 onCheckedChanged: trayModel.enableDisableNfdStopOnExit(this.checked)
taylorchuc27dd482014-05-17 20:06:49 -070064 }
taylorchuc27dd482014-05-17 20:06:49 -070065 }
66 }
67 GroupBox {
68 title: "Status"
69 id: status
70 anchors.top: checkboxControl.bottom
71 anchors.left: parent.left
72 anchors.right: parent.right
73 anchors.topMargin: 20
74 anchors.leftMargin: 20
75 anchors.rightMargin: 20
76 anchors.bottomMargin: 20
77 Row {
78 spacing: 20
79 anchors.topMargin: 10
80 anchors.leftMargin: 10
81 anchors.rightMargin: 10
82 anchors.bottomMargin: 10
83 anchors.fill: parent
84 Button {
85 text: "Traffic map"
86 onClicked: Qt.openUrlExternally('http://ndnmap.arl.wustl.edu')
87 }
88 Button {
89 text: "Routing status"
90 onClicked: Qt.openUrlExternally('http://netlab.cs.memphis.edu/script/htm/status.htm')
91 }
92 }
93 }
Qi Zhao3615a102017-02-02 20:38:34 -080094 GridLayout {
95 anchors.left: parent.left
96 anchors.bottom: parent.bottom
97 Label {
Qi Zhao6d0399e2017-02-23 16:24:39 -080098 text: "NDN Control Center version:"
Qi Zhao3615a102017-02-02 20:38:34 -080099 font.pixelSize: 10
100 }
101 Label {
102 text: nccVersion
103 font.pixelSize: 10
104 font.bold: true
105 }
106 }
taylorchuc27dd482014-05-17 20:06:49 -0700107 }
108 }
taylorchuc27dd482014-05-17 20:06:49 -0700109 Tab {
Qi Zhao7e524492017-03-02 15:05:45 -0800110 title: "Auto-config"
Qi Zhao86f2b212016-12-06 12:44:16 -0800111 TextArea {
Qi Zhaoae9c4312017-02-02 11:36:12 -0800112 id: ndnAutoConfigTextId
Qi Zhao86f2b212016-12-06 12:44:16 -0800113 anchors.fill: parent
114 anchors.topMargin: 20
115 anchors.bottomMargin: 20
116 anchors.leftMargin: 20
117 anchors.rightMargin: 20
118 readOnly: true
Qi Zhaoae9c4312017-02-02 11:36:12 -0800119 text: ndnAutoConfigText
Qi Zhao86f2b212016-12-06 12:44:16 -0800120 }
121 }
122 Tab {
susmit4fe3cb92016-03-20 17:08:41 -0700123 title: "Add/Delete Route"
124 Column {
125 spacing: 2
126 anchors.fill: parent
127 anchors.topMargin: 20
128 anchors.bottomMargin: 20
129 anchors.leftMargin: 20
130 }
susmit4fe3cb92016-03-20 17:08:41 -0700131 Row {
132 spacing: 20
133 anchors.topMargin: 30
134 anchors.leftMargin: 10
135 anchors.rightMargin: 10
136 anchors.bottomMargin: 10
137 anchors.fill: parent
138 TextField {
139 focus: true
140 }
141 Button {
142 text: "Add Route"
143 onClicked: trayModel.addRoute(TextField.text);
144 }
145 Button {
146 text: "Delete Route"
147 onClicked: trayModel.deleteRoute(TextField.text);
148 }
149 }
150 }
taylorchuc27dd482014-05-17 20:06:49 -0700151 }
152 Connections {
153 target: trayModel;
154 onShowApp: {
155 window.show()
156 window.raise()
157 }
158 }
taylorchuc27dd482014-05-17 20:06:49 -0700159}