summaryrefslogtreecommitdiffstats
path: root/src/gui/aboutDialog.cpp
blob: a52f70be2a3420b369627c020d8befdb3cc0cca1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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()
{
}