diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2020-07-29 17:38:48 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2020-07-29 17:38:48 +0200 |
commit | ec36fa958d13da26ad6e110e9306ea017f50ced8 (patch) | |
tree | 25f6693ad257068f2ee1d86de019cfec6ad0499e /src | |
parent | f79085abfaa24ba7b70ea067519ebdf13b358cf7 (diff) | |
download | RWA.Support.DesktopApp-ec36fa958d13da26ad6e110e9306ea017f50ced8.tar.gz RWA.Support.DesktopApp-ec36fa958d13da26ad6e110e9306ea017f50ced8.tar.bz2 RWA.Support.DesktopApp-ec36fa958d13da26ad6e110e9306ea017f50ced8.zip |
Add showWindow() function
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 | ||||
-rw-r--r-- | src/main_qmladaptor.h | 1 | ||||
-rw-r--r-- | src/session.cpp | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index b29c58e..96fcab2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,6 +48,11 @@ int main(int argc, char *argv[]) { engine.rootObjects().takeFirst(), SLOT(minimizeWindow())); + QObject::connect(main_gui.data(), + SIGNAL(showWindow()), + engine.rootObjects().takeFirst(), + SLOT(showWindow())); + // We don't want users to have multiple instances of this app running QString tmpDirPath = QDir::tempPath() + "/rwa"; QString tmpFilePath = tmpDirPath + "/remote-support-desktop-application-prevent-multiple-instances.lock"; diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h index eb88b3a..5cf2c9a 100644 --- a/src/main_qmladaptor.h +++ b/src/main_qmladaptor.h @@ -41,6 +41,7 @@ signals: void messageDialogIconChanged(int iconindex); void minimizeWindow(); + void showWindow(); void onConnectButtonClick(bool checked); diff --git a/src/session.cpp b/src/session.cpp index 92ec5fc..eefa337 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -88,15 +88,20 @@ void Session::setStatus(QString status) { // Clear current variables this->init_vars(); _main_gui->setStatusIndicator(true, QColor(255, 0, 0, 127)); + + emit _main_gui->showWindow(); } else if (status == "stopped") { /* Session is stopped */ guiString = tr("Remote Support session was stopped"); // Clear current variables this->init_vars(); + + emit _main_gui->showWindow(); } else if (status == "active") { /* Partner is connected */ if (!_minimizedBefore) { + qDebug() << "Minimizing window now..."; emit _main_gui->minimizeWindow(); _minimizedBefore = true; } |