diff options
author | Nils Schwabe | 2014-03-21 18:25:20 +0100 |
---|---|---|
committer | Nils Schwabe | 2014-03-21 18:25:20 +0100 |
commit | f8be3f2da30e0b834124bd52dda75e6a724b4b76 (patch) | |
tree | 636da82354a3e924eb0f7a70c0529161b4298744 | |
parent | added functionality to filter box (diff) | |
download | vmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.tar.gz vmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.tar.xz vmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.zip |
added help and news box
-rw-r--r-- | src/dialog.cpp | 13 | ||||
-rw-r--r-- | src/dialog.h | 1 | ||||
-rw-r--r-- | src/globals.h | 4 | ||||
-rw-r--r-- | src/ui/dialog.ui | 75 |
4 files changed, 90 insertions, 3 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index 2a50c11..1249561 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -36,6 +36,9 @@ Dialog::Dialog(QWidget *parent) ui->tabButtonLocal->setChecked(true); ui->filterEdit->setEnabled(false); + ui->helpBox->hide(); + ui->newsBox->hide(); + setListModel(model_[0]); QObject::connect(ui->treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex&, const QModelIndex&)), @@ -465,3 +468,13 @@ void Dialog::setListModel(QAbstractItemModel *model) { } ui->treeView->setModel(model); } + +void Dialog::on_helpNewsButton_clicked() { + if (ui->helpBox->isVisible()) { + ui->helpBox->hide(); + ui->newsBox->hide(); + } else { + ui->helpBox->show(); + ui->newsBox->show(); + } +} diff --git a/src/dialog.h b/src/dialog.h index aa2fa30..8386e1d 100644 --- a/src/dialog.h +++ b/src/dialog.h @@ -56,6 +56,7 @@ class Dialog : public QDialog { void on_tabButtonAllClasses_clicked(); void on_filterEdit_textChanged(); void treeView_selectionChanged(const QModelIndex& current, const QModelIndex&); + void on_helpNewsButton_clicked(); void onCenterTimer(); public slots: diff --git a/src/globals.h b/src/globals.h index 0b8739c..8215c19 100644 --- a/src/globals.h +++ b/src/globals.h @@ -13,8 +13,8 @@ #define VMCHOOSER_SESSION_START_SCRIPT "/opt/openslx/vmchooser/sessionstart" -#define VMCHOOSER_DEFAULT_WIDTH 1024 -#define VMCHOOSER_DEFAULT_HEIGHT 768 +#define VMCHOOSER_DEFAULT_WIDTH 800 +#define VMCHOOSER_DEFAULT_HEIGHT 600 #define OPENSLXCONFIG "/opt/openslx/config" diff --git a/src/ui/dialog.ui b/src/ui/dialog.ui index a7e7124..fdbb402 100644 --- a/src/ui/dialog.ui +++ b/src/ui/dialog.ui @@ -23,7 +23,7 @@ <number>0</number> </property> <property name="leftMargin"> - <number>0</number> + <number>4</number> </property> <property name="topMargin"> <number>0</number> @@ -39,6 +39,9 @@ <property name="spacing"> <number>0</number> </property> + <property name="bottomMargin"> + <number>0</number> + </property> <item> <widget class="QLabel" name="label_l"> <property name="minimumSize"> @@ -101,6 +104,69 @@ margin-bottom:0px;}</string> </layout> </item> <item> + <layout class="QHBoxLayout" name="help_news"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QGroupBox" name="helpBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Help</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item> + <widget class="QTextBrowser" name="textBrowser_2"> + <property name="html"> + <string><!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:'Sans'; font-size:10pt; 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-weight:600;">Tabs</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lorem ipsum</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Filter</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dolor sit amet</p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="newsBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>News</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <widget class="QTextBrowser" name="textBrowser_3"> + <property name="html"> + <string><!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:'Sans'; font-size:10pt; 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;">Heute gibt es nichts neues.</p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + <item> <layout class="QHBoxLayout" name="horizontalLayout_3"> <property name="leftMargin"> <number>3</number> @@ -496,6 +562,13 @@ p, li { white-space: pre-wrap; } </spacer> </item> <item> + <widget class="QPushButton" name="helpNewsButton"> + <property name="text"> + <string>Help/News</string> + </property> + </widget> + </item> + <item> <widget class="QPushButton" name="pushButtonAbort"> <property name="text"> <string>Abort</string> |