summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/mainWindow.cpp20
-rw-r--r--src/gui/mainWindow.h3
-rw-r--r--src/gui/ui/mainwindowtouch.ui6
3 files changed, 19 insertions, 10 deletions
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp
index 6bb84a4..7cd0b02 100644
--- a/src/gui/mainWindow.cpp
+++ b/src/gui/mainWindow.cpp
@@ -47,8 +47,6 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) :
{
ui->setupUi(this);
- _info = new QLabel("");
-
if (!QFile::exists(_settings.fileName()))
{
QDir::root().mkpath(QFileInfo(_settings.fileName()).path());
@@ -131,6 +129,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) :
qualityActionGroup->addAction(ui->action_quality_Low);
// define the slots we want to use
+ connect(ui->action_Info, SIGNAL(triggered()), this, SLOT(info()));
connect(ui->action_Quit, SIGNAL(triggered()), this, SLOT(close()));
connect(ui->action_Manage_Profiles, SIGNAL(triggered()), this, SLOT(createProfile()));
connect(ui->action_Reset, SIGNAL(triggered()), this, SLOT(resetall()));
@@ -200,8 +199,6 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags) :
connect(ui->action_quality_Low, SIGNAL(triggered()), qualitySignalMapper, SLOT (map()));
connect(qualitySignalMapper, SIGNAL(mapped(int)), this, SLOT(setVNCQuality(int)));
- ui->toolBar->addWidget(_info);
-
#else
// toolbar and actions in pvsmgr
connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(close()));
@@ -361,7 +358,7 @@ void MainWindow::loadSettings()
title.append(" [" + _sessionName + " : ");
title.append(_pwdCon + "]");
setWindowTitle(title);
- _info->setText(title);
+ _info = title;
}
else
{
@@ -370,7 +367,7 @@ void MainWindow::loadSettings()
title.append(" [" + _sessionName + " : ");
title.append(_pwdCon + "]");
setWindowTitle(title);
- _info->setText(title);
+ _info = title;
settings.beginGroup(current);
QStringList keys = settings.childKeys();
for (int i = 0; i < keys.size(); i++)
@@ -446,7 +443,7 @@ void MainWindow::loadSettings(QString profilname) // loads the current profile
title.append(" [" + _sessionName + " : ");
title.append(_pwdCon + "]");
setWindowTitle(title);
- _info->setText(title);
+ _info = title;
}
}
@@ -1122,7 +1119,7 @@ void MainWindow::setPasswordForConnection(int enabled)
title.append(_profilName);
title.append(" [" + _sessionName + " : ]");
setWindowTitle(title);
- _info->setText(title);
+ _info = title;
}
else if (enabled == 2) //password is needed, we show it in the titlebar
{
@@ -1133,7 +1130,7 @@ void MainWindow::setPasswordForConnection(int enabled)
title.append(" [" + _sessionName + " : ");
title.append(_pwdCon + "]");
setWindowTitle(title);
- _info->setText(title);
+ _info = title;
}
}
//#endif
@@ -1318,6 +1315,11 @@ int MainWindow::getDisplayedClientNameEnum()
return displayedClientNameEnum;
}
+void MainWindow::info()
+{
+ QMessageBox::information(this, tr("Information"), _info);
+}
+
MainWindow* MainWindow::myself = NULL;
ConnectionList* MainWindow::conList = NULL;
ConnectionWindow* MainWindow::conWin = NULL;
diff --git a/src/gui/mainWindow.h b/src/gui/mainWindow.h
index bbe9c49..cf618f0 100644
--- a/src/gui/mainWindow.h
+++ b/src/gui/mainWindow.h
@@ -123,7 +123,7 @@ private:
QString _pwdCon;
QString _sessionName;
QString _profilName;
- QLabel *_info;
+ QString _info;
int displayedClientNameEnum; //to tell if username, loginname or ip is shown in clientList
@@ -182,6 +182,7 @@ public slots:
void unCloseUp(ConnectionFrame* connFrame);
void closeUp();
void foto();
+ void info();
void backgroundpicture();
void repaintbackgroundpicture();
void setdozenttoolbar();
diff --git a/src/gui/ui/mainwindowtouch.ui b/src/gui/ui/mainwindowtouch.ui
index 7241895..651217e 100644
--- a/src/gui/ui/mainwindowtouch.ui
+++ b/src/gui/ui/mainwindowtouch.ui
@@ -116,6 +116,7 @@
<string>&amp;File</string>
</property>
<addaction name="separator"/>
+ <addaction name="action_Info"/>
<addaction name="action_Save_Profile"/>
<addaction name="action_Manage_Profiles"/>
<addaction name="separator"/>
@@ -491,6 +492,11 @@
<string>Use Password</string>
</property>
</action>
+ <action name="action_Info">
+ <property name="text">
+ <string>&amp;Info</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="../../../pvsmgr.qrc"/>