Mercurial > trustbridge
changeset 201:45f6b62f91e7
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 26 Mar 2014 13:30:33 +0100 |
parents | fe424c5fc875 (diff) 56ae02b4a0fc (current diff) |
children | 0861069fd6d0 a3f542bf38f7 |
files | |
diffstat | 4 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/CMakeLists.txt Wed Mar 26 12:38:10 2014 +0100 +++ b/ui/CMakeLists.txt Wed Mar 26 13:30:33 2014 +0100 @@ -17,6 +17,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_SOURCE_DIR}/listupdatedialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/helpdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/aboutdialog.cpp ${CERTIFICATELIST_SOURCES} ${DOWNLOADER_SOURCES} )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/aboutdialog.cpp Wed Mar 26 13:30:33 2014 +0100 @@ -0,0 +1,28 @@ +#include "aboutdialog.h" +#include <QDebug> +#include <QVBoxLayout> +#include <QTextEdit> +#include <QPushButton> + +AboutDialog::AboutDialog(QMainWindow *parent) : + QDialog(parent) +{ + setupGUI(); +} + +void AboutDialog::setupGUI() +{ + QVBoxLayout *mainLayout = new QVBoxLayout(this); + QTextEdit *helpText = new QTextEdit; + helpText->setReadOnly(true); + helpText->setPlainText(tr("This dialog contains some text about the application")); + + QHBoxLayout *buttonLayout = new QHBoxLayout; + QPushButton *closeButton = new QPushButton(tr("Close")); + connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); + buttonLayout->insertStretch(0, 10); + buttonLayout->addWidget(closeButton); + + mainLayout->addWidget(helpText); + mainLayout->addLayout(buttonLayout); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/aboutdialog.h Wed Mar 26 13:30:33 2014 +0100 @@ -0,0 +1,21 @@ +#ifndef ABOUTDIALOG_H +#define ABOUTDIALOG_H + +#include <QDialog> +#include <QMainWindow> +/** + * @file aboutdialog.h + * @brief The dialog for information about the application. + */ + +class AboutDialog : public QDialog +{ +public: + /** @brief Create a help dialog */ + AboutDialog(QMainWindow *parent); + +private: + void setupGUI(); + +}; +#endif // ABOUTDIALOG_H
--- a/ui/mainwindow.cpp Wed Mar 26 12:38:10 2014 +0100 +++ b/ui/mainwindow.cpp Wed Mar 26 13:30:33 2014 +0100 @@ -27,6 +27,7 @@ #include "downloader.h" #include "listupdatedialog.h" #include "helpdialog.h" +#include "aboutdialog.h" MainWindow::MainWindow() { createActions(); @@ -298,6 +299,8 @@ void MainWindow::showAbout() { qDebug() << "show aboutdialog"; + AboutDialog *about = new AboutDialog(this); + about->show(); } void MainWindow::showDetails(QListWidgetItem *item)