summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Schwabe2014-03-21 18:25:20 +0100
committerNils Schwabe2014-03-21 18:25:20 +0100
commitf8be3f2da30e0b834124bd52dda75e6a724b4b76 (patch)
tree636da82354a3e924eb0f7a70c0529161b4298744
parentadded functionality to filter box (diff)
downloadvmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.tar.gz
vmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.tar.xz
vmchooser2-f8be3f2da30e0b834124bd52dda75e6a724b4b76.zip
added help and news box
-rw-r--r--src/dialog.cpp13
-rw-r--r--src/dialog.h1
-rw-r--r--src/globals.h4
-rw-r--r--src/ui/dialog.ui75
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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Tabs&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Lorem ipsum&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Filter&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Dolor sit amet&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Heute gibt es nichts neues.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>