[X2Go-Commits] [x2goclient] 01/01: Add Class HelpDialog to show options in scroll area.
git-admin at x2go.org
git-admin at x2go.org
Fri Jan 24 13:02:57 CET 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit d5ce144633d38baf0ee0e4273d6c498f863a2368
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Fri Jan 24 13:02:50 2014 +0100
Add Class HelpDialog to show options in scroll area.
---
debian/changelog | 1 +
helpdialog.cpp | 33 ++++++++++++++++++++++++++++
helpdialog.h | 29 +++++++++++++++++++++++++
helpdialog.ui | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
onmainwindow.cpp | 6 +++--
onmainwindow_privat.h | 1 +
x2goclient.pro | 9 +++++---
7 files changed, 132 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9c576bb..6912f5e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ x2goclient (4.0.2.0-0x2go1) UNRELEASED; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (4.0.2.0):
- Revrite SSH Classes to support libssh fix.
+ - Add Class HelpDialog to show options in scroll area.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Wed, 22 Jan 2014 09:20:08 +0100
diff --git a/helpdialog.cpp b/helpdialog.cpp
new file mode 100644
index 0000000..b383535
--- /dev/null
+++ b/helpdialog.cpp
@@ -0,0 +1,33 @@
+/**************************************************************************
+* Copyright (C) 2005-2014 by Oleksandr Shneyder *
+* o.shneyder at phoca-gmbh.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+***************************************************************************/
+
+#include "helpdialog.h"
+
+HelpDialog::HelpDialog(QWidget* parent): QDialog(parent)
+{
+ setupUi(this);
+}
+
+void HelpDialog::setText(QString text)
+{
+ text.replace("\t\t\t","\t");
+ text.replace("\t\t","\t");
+ plainTextEdit->setTabStopWidth(320);
+ plainTextEdit->setWordWrapMode(QTextOption::NoWrap);
+ plainTextEdit->setPlainText(text);
+}
+
diff --git a/helpdialog.h b/helpdialog.h
new file mode 100644
index 0000000..d4625fd
--- /dev/null
+++ b/helpdialog.h
@@ -0,0 +1,29 @@
+/**************************************************************************
+* Copyright (C) 2005-2014 by Oleksandr Shneyder *
+* o.shneyder at phoca-gmbh.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+***************************************************************************/
+
+#ifndef HELPDIALOG_H
+#define HELPDIALOG_H
+
+#include "ui_helpdialog.h"
+class HelpDialog:public QDialog, public Ui_HelpDialog
+{
+public:
+ HelpDialog(QWidget* parent=0);
+ void setText(QString text);
+};
+
+#endif // HELPDIALOG_H
diff --git a/helpdialog.ui b/helpdialog.ui
new file mode 100644
index 0000000..0a32254
--- /dev/null
+++ b/helpdialog.ui
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HelpDialog</class>
+ <widget class="QDialog" name="HelpDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Options</string>
+ </property>
+ <property name="windowIcon">
+ <iconset resource="resources.rcc">
+ <normaloff>:/icons/32x32/x2goclient.png</normaloff>:/icons/32x32/x2goclient.png</iconset>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPlainTextEdit" name="plainTextEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="resources.rcc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>clicked(QAbstractButton*)</signal>
+ <receiver>HelpDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>330</x>
+ <y>277</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>4</x>
+ <y>184</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 5c3d2b8..3e50ad9 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -7145,7 +7145,7 @@ void ONMainWindow::showHelp()
"--geometry=<W>x<H>|fullscreen\t set default geometry, default "
"value '800x600'\n"
"--dpi=<dpi>\t\t\t set dpi of x2goagent to dpi, default set to same as local display\n"
- "--link=<modem|isdn|adsl|wan|lan> set default link type, "
+ "--link=<modem|isdn|adsl|wan|lan>\t set default link type, "
"default 'adsl'\n"
"--pack=<packmethod>\t\t set default pack method, default "
"'16m-jpeg-9'\n"
@@ -7162,7 +7162,9 @@ void ONMainWindow::showHelp()
qCritical ( "%s",helpMsg.toLocal8Bit().data() );
if (!startHidden)
{
- QMessageBox::information ( this,tr ( "Options" ),helpMsg );
+ HelpDialog dlg(this);
+ dlg.setText(helpMsg);
+ dlg.exec();
}
}
diff --git a/onmainwindow_privat.h b/onmainwindow_privat.h
index 3507f88..c93ddba 100644
--- a/onmainwindow_privat.h
+++ b/onmainwindow_privat.h
@@ -31,6 +31,7 @@
#include "userbutton.h"
#include "exportdialog.h"
#include "printprocess.h"
+#include "helpdialog.h"
#include "appdialog.h"
#include <QDesktopServices>
#include <QApplication>
diff --git a/x2goclient.pro b/x2goclient.pro
index de4d59c..3d6b904 100755
--- a/x2goclient.pro
+++ b/x2goclient.pro
@@ -18,7 +18,8 @@ FORMS += cupsprintsettingsdialog.ui \
xsettingsui.ui \
brokerpassdialog.ui \
contest.ui \
- appdialog.ui
+ appdialog.ui \
+ helpdialog.ui
TRANSLATIONS += \
x2goclient_de.ts \
@@ -67,7 +68,8 @@ HEADERS += configdialog.h \
contest.h \
xsettingswidget.h \
appdialog.h \
- x2goutils.h
+ x2goutils.h \
+ helpdialog.h
SOURCES += sharewidget.cpp \
settingswidget.cpp\
@@ -103,7 +105,8 @@ SOURCES += sharewidget.cpp \
contest.cpp \
xsettingswidget.cpp \
appdialog.cpp \
- x2goutils.cpp
+ x2goutils.cpp \
+ helpdialog.cpp
LIBS += -lssh
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list