changeset 199:4790a26c2e8b

Added about dialog.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 13:29:49 +0100
parents 17eb8ad43984
children fe424c5fc875
files ui/CMakeLists.txt ui/aboutdialog.cpp ui/aboutdialog.h
diffstat 3 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Wed Mar 26 12:22:24 2014 +0100
+++ b/ui/CMakeLists.txt	Wed Mar 26 13:29:49 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:29:49 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:29:49 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

http://wald.intevation.org/projects/trustbridge/