summaryrefslogtreecommitdiffstats
path: root/src/gui/clientInfoDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/clientInfoDialog.cpp')
-rw-r--r--src/gui/clientInfoDialog.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/gui/clientInfoDialog.cpp b/src/gui/clientInfoDialog.cpp
new file mode 100644
index 0000000..02a6fd8
--- /dev/null
+++ b/src/gui/clientInfoDialog.cpp
@@ -0,0 +1,60 @@
+/*
+ # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of
+ # Freiburg
+ #
+ # This program is free software distributed under the GPL version 2.
+ # See http://openslx.org/COPYING
+ #
+ # If you have any feedback please consult http://openslx.org/feedback and
+ # send your suggestions, praise, or complaints to feedback@openslx.org
+ #
+ # General information about OpenSLX can be found at http://openslx.org/
+ # -----------------------------------------------------------------------------
+ # clientInfoDialog.cpp
+ # - shows big info dialog (connected host and passwd)
+ # -----------------------------------------------------------------------------
+ */
+
+#include "clientInfoDialog.h"
+
+ClientInfoDialog::ClientInfoDialog(QWidget *parent) :
+ QDialog(parent)
+{
+ setupUi(this);
+}
+
+ClientInfoDialog::~ClientInfoDialog()
+{
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Public
+
+void ClientInfoDialog::setHost(QString host)
+{
+ hostLabel->setText("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" "
+ "\"http://www.w3.org/TR/REC-html40/strict.dtd\"><html>"
+ "<head><meta name=\"qrichtext\" content=\"1\" />"
+ "<style type=\"text/css\">p, li { white-space: pre-wrap; }</style>"
+ "</head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; "
+ "font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; "
+ "margin-bottom:0px; margin-left:0px; margin-right:0px; "
+ "-qt-block-indent:0; text-indent:0px;\"><span style=\" "
+ "font-size:72pt; font-weight:600; color:#0000ff;\">"
+ + host + "</span></p></body></html>");
+}
+
+void ClientInfoDialog::setPasswd(QString passwd)
+{
+ passwdLabel->setText("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" "
+ "\"http://www.w3.org/TR/REC-html40/strict.dtd\"><html>"
+ "<head><meta name=\"qrichtext\" content=\"1\" />"
+ "<style type=\"text/css\">p, li { white-space: pre-wrap; }</style>"
+ "</head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; "
+ "font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; "
+ "margin-bottom:0px; margin-left:0px; margin-right:0px; "
+ "-qt-block-indent:0; text-indent:0px;\"><span style=\" "
+ "font-size:48pt; font-weight:600; color:#ff0000;\">"
+ + passwd + "</span></p></body></html>");
+}