5import QtQuick.Window 2.2
6import QtQuick.Controls 2.0
7import QtQuick.Layouts 1.2
8import Qt.labs.settings 1.0
10import "../constants" 1.0
14 objectName:
"indiControlPanel"
15 title:
xi18n(
"INDI Control Panel")
18 property alias webMStatusText: webMStatusLabel.text
19 property alias webMStatusTextVisible: webMStatusLabel.visible
20 property alias webMActiveProfileText: webMActiveProfileLabel.text
21 property alias webMActiveProfileLayoutVisible: webMActiveProfileLayout.visible
22 property alias webMBrowserButtonVisible: webMBrowserButton.visible
23 property alias webMProfileListVisible: webMProfileList.visible
25 function connectIndiServer() {
26 indiServerConnectButton.clicked()
36 for (var i = 0; i < devicesModel.count; ++i) {
37 devicesModel.get(i).panel.destroy()
41 skyMapLite.notification.showNotification(
"Disconnected from the server")
58 text:
xi18n(
"IP Address or Hostname")
69 placeholderText:
xi18n(
"xxx.xxx.xxx.xxx")
71 Layout.maximumWidth: parent.width*0.8
73 font.capitalization: Font.AllLowercase
85 text:
xi18n(
"Web Manager Port")
96 placeholderText:
xi18n(
"xxxx")
98 Layout.maximumWidth: parent.width*0.2
110 id: webMConnectButton
111 text:
xi18n(
"Get Status")
115 Qt.inputMethod.hide()
122 text:
xi18n(
"Web Manager Status:")
127 id: webMActiveProfileLayout
131 id: webMActiveProfileLabel
132 text:
xi18n(
"Active Profile:")
150 height: childrenRect.height
153 delegate: RowLayout {
154 height: webMConnectButton.height
157 width: webMStatusLabel.width
158 height: webMConnectButton.height
160 text:
xi18n(
"Profile: %1", modelData)
165 height: webMConnectButton.height
176 id: webMBrowserButton
177 text:
xi18n(
"Manage Profiles")
181 Qt.openUrlExternally(
"http://"+ipHost.text+
":"+portWebManager.text)
186 text:
xi18n(
"Server Port")
197 placeholderText:
xi18n(
"INDI Server Port")
199 Layout.maximumWidth: parent.width*0.2
211 id: indiServerConnectButton
217 skyMapLite.notification.showNotification(
xi18n(
"Successfully connected to the server"))
219 skyMapLite.notification.showNotification(
xi18n(
"Could not connect to the server"))
225 Qt.inputMethod.hide()
252 text:
xi18n(
"Available Devices")
262 var component =
Qt.createComponent(
Qt.resolvedUrl(
"./DevicePanel.qml"));
268 for (i = 0; i < devicesModel.count; ++i) {
269 if(devicesModel.get(i).name == deviceName) {
270 devicesModel.panel.destroy()
271 devicesModel.remove(i)
276 skyMapLite.notification.showNotification(message)
290 stackView.push(devicesModel.get(currentIndex).panel)
298 text:
xi18n(
"Disconnect INDI");
Q_INVOKABLE void getWebManagerProfiles(const QString &ip, unsigned int port)
Get the profiles from Web Manager.
Q_INVOKABLE void startWebManagerProfile(const QString &profile)
Start an INDI server with a Web Manager profile.
Q_INVOKABLE void stopWebManagerProfile()
Stop the INDI server with an active Web Manager profile.
QString xi18n(const char *text, const TYPE &arg...)
QString name(StandardShortcut id)
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)