aboutsummaryrefslogtreecommitdiff
path: root/src/main_qmladaptor.cpp
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-08-01 02:19:15 +0200
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-08-01 02:19:50 +0200
commit766a90125df68f065495354c20412faf9e1df77a (patch)
treecdba9fef32fe0b29a74aa9305b38c362db5a1a4e /src/main_qmladaptor.cpp
parentd75db83442a01dcd003ea39a5ec61baad7d344a0 (diff)
downloadRWA.Support.DesktopApp-766a90125df68f065495354c20412faf9e1df77a.tar.gz
RWA.Support.DesktopApp-766a90125df68f065495354c20412faf9e1df77a.tar.bz2
RWA.Support.DesktopApp-766a90125df68f065495354c20412faf9e1df77a.zip
move scenes/Scene_remote_control.qml into scenes/remote_control/Scene_remote_control.qml
Diffstat (limited to 'src/main_qmladaptor.cpp')
-rw-r--r--src/main_qmladaptor.cpp57
1 files changed, 7 insertions, 50 deletions
diff --git a/src/main_qmladaptor.cpp b/src/main_qmladaptor.cpp
index 7e85157..5da0abb 100644
--- a/src/main_qmladaptor.cpp
+++ b/src/main_qmladaptor.cpp
@@ -81,16 +81,20 @@ QList<QObject*> MainQMLAdaptor::getRWAHostModel() {
void MainQMLAdaptor::setRWAHostSelected(bool value) {
// Find item via 'objectName'
- QObject *sidebar_drawer = _engine->rootObjects().takeFirst()->findChild<QObject*>("sidebar_drawer");
+ QObject *sidebar_drawer = _engine->rootObjects().takeFirst()->
+ findChild<QObject*>("sidebar_drawer");
if (sidebar_drawer) {
sidebar_drawer->setProperty("rwaHostIsSelected", value);
} else {
qWarning() << "Unable to find 'sidebar_drawer' Item!";
}
- QObject *server_chooser = _engine->rootObjects().takeFirst()->findChild<QObject*>("server_chooser");
+ QObject *server_chooser = _engine->rootObjects().takeFirst()->
+ findChild<QObject*>("server_chooser");
if (server_chooser) {
- server_chooser->setProperty("displayText", value ? server_chooser->property("currentText") : tr("No RWA host available!"));
+ server_chooser->setProperty("displayText", value ?
+ server_chooser->property("currentText") :
+ tr("No RWA host available!"));
server_chooser->setProperty("enabled", value);
} else {
qWarning() << "Unable to find 'server_chooser' Item!";
@@ -273,53 +277,6 @@ void MainQMLAdaptor::main_content_replace(QString scene) {
}
}
-bool MainQMLAdaptor::setConnectButtonEnabled(bool enabled) {
- // Find item via 'objectName'
- QQuickItem *scene_remote_control = _engine->rootObjects().takeFirst()->findChild<QQuickItem*>("Scene_remote_control");
- QQuickItem *item = scene_remote_control->findChild<QQuickItem*>("start_support_button");
- if (item) {
- item->setProperty("enabled", enabled);
- if (item->property("checked").toBool()) {
- item->setProperty("text", tr("Stop remote support session"));
- } else {
- item->setProperty("text", tr("Start remote support session"));
- }
- } else {
- qWarning() << "Unable to find 'start_support_button' Item!";
- return false;
- }
-
- return true;
-}
-
-bool MainQMLAdaptor::setConnectButtonChecked(bool checked) {
- // Find item via 'objectName'
- QQuickItem *scene_remote_control = _engine->rootObjects().at(0)->findChild<QQuickItem*>("Scene_remote_control");
- QQuickItem *item = scene_remote_control->findChild<QQuickItem*>("start_support_button");
- if (item) {
- item->setProperty("checked", checked);
- } else {
- qWarning() << "Unable to find 'start_support_button' Item!";
- return false;
- }
-
- return true;
-}
-
-bool MainQMLAdaptor::setStatus(QString status) {
- // Find item via 'objectName'
- QQuickItem *scene_remote_control = _engine->rootObjects().at(0)->findChild<QQuickItem*>("Scene_remote_control");
- QQuickItem *item = scene_remote_control->findChild<QQuickItem*>("dbus_api_status_text");
- if (item) {
- item->setProperty("text", status);
- } else {
- qWarning() << "Unable to find 'dbus_api_status_text' Item!";
- return false;
- }
-
- return true;
-}
-
bool MainQMLAdaptor::openMessageDialog(QString title, QString text, QMessageBox::Icon icon) {
_messageDialogText = text;
_messageDialogTitle = title;