From ce3329047d378a14006ce74ec273ac59e3375303 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 12 May 2010 19:42:27 +0200 Subject: initial import of latest svn version --- src/gui/aboutDialog.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/gui/aboutDialog.cpp (limited to 'src/gui/aboutDialog.cpp') diff --git a/src/gui/aboutDialog.cpp b/src/gui/aboutDialog.cpp new file mode 100644 index 0000000..a52f70b --- /dev/null +++ b/src/gui/aboutDialog.cpp @@ -0,0 +1,58 @@ +/* + # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of + # Freiburg + # + # This program is free software distributed under the GPL version 2. + # See http://openslx.org/COPYING + # + # If you have any feedback please consult http://openslx.org/feedback and + # send your suggestions, praise, or complaints to feedback@openslx.org + # + # General information about OpenSLX can be found at http://openslx.org/ + # ----------------------------------------------------------------------------- + # aboutDialog.cpp + # - shows about dialog + # ----------------------------------------------------------------------------- + */ + +#include "aboutDialog.h" +#include "src/version.h" + +AboutDialog::AboutDialog(QWidget *parent) : + QDialog(parent) +{ + setupUi(this); + + // set version + QString version = tr("Version: ") + (VERSION_STRING); + label_version->setText(version); + + // read authors and write to textEdit + QString authors = ""; + QFile f1(":/AUTHORS"); + if (f1.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QTextStream in(&f1); + authors = in.readAll(); + f1.close(); + } + plainTextEdit_authors->insertPlainText(authors); + plainTextEdit_authors->moveCursor(QTextCursor::Start); + + // read translation and write to textEdit + QString translation = ""; + QFile f2(":/TRANSLATION"); + if (f2.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QTextStream in(&f2); + translation = in.readAll(); + f2.close(); + } + plainTextEdit_translation->insertPlainText(translation); + plainTextEdit_translation->moveCursor(QTextCursor::Start); + +} + +AboutDialog::~AboutDialog() +{ +} -- cgit v1.2.3-55-g7522