From f8be3f2da30e0b834124bd52dda75e6a724b4b76 Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Fri, 21 Mar 2014 18:25:20 +0100 Subject: added help and news box --- src/dialog.cpp | 13 ++++++++++ src/dialog.h | 1 + src/globals.h | 4 +-- src/ui/dialog.ui | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 90 insertions(+), 3 deletions(-) (limited to 'src') 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 @@ 0 - 0 + 4 0 @@ -39,6 +39,9 @@ 0 + + 0 + @@ -100,6 +103,69 @@ margin-bottom:0px;} + + + + 0 + + + + + + 0 + 0 + + + + Help + + + + + + <!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> + + + + + + + + + + + 0 + 0 + + + + News + + + + + + <!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> + + + + + + + + @@ -495,6 +561,13 @@ p, li { white-space: pre-wrap; } + + + + Help/News + + + -- cgit v1.2.3-55-g7522