diff --git a/gui/about.ui b/gui/about.ui
new file mode 100644
index 000000000..e6b1c57d9
--- /dev/null
+++ b/gui/about.ui
@@ -0,0 +1,146 @@
+
+
+ About
+
+
+
+ 0
+ 0
+ 478
+ 300
+
+
+
+ About Cppcheck
+
+
+
+
+
+
+
+
+
+
+
+
+ :/icon.png
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+ Version %1
+
+
+
+
+
+
+ Cppcheck - A tool for static C/C++ code analysis.
+
+
+
+
+
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+
+
+
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+
+
+ true
+
+
+
+
+
+
+ Visit Cppcheck homepage at %1
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+
+
+ mButtons
+ accepted()
+ About
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ mButtons
+ rejected()
+ About
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/gui/aboutdialog.cpp b/gui/aboutdialog.cpp
index 6734abc7e..f3be271d4 100644
--- a/gui/aboutdialog.cpp
+++ b/gui/aboutdialog.cpp
@@ -24,52 +24,11 @@
AboutDialog::AboutDialog(const QString &version, QWidget *parent)
: QDialog(parent)
- , mVersion(version)
{
- setWindowTitle(tr("About cppcheck"));
- // Left icon area and right text area
- QHBoxLayout *iconLayout = new QHBoxLayout();
- // Keep icon at the top of the dialog
- QVBoxLayout *iconVLayout = new QVBoxLayout();
- // Texts
- QVBoxLayout *mainLayout = new QVBoxLayout();
- // Keep close button in right
- QHBoxLayout *btnLayout = new QHBoxLayout();
+ mUI.setupUi(this);
- QIcon *icon = new QIcon(":icon.png");
- QLabel *iconLabel = new QLabel();
- iconLabel->setPixmap(icon->pixmap(QSize(48, 48)));
- QLabel *name = new QLabel(tr("Cppcheck - A tool for static C/C++ code analysis."));
- QLabel *ver = new QLabel(QString(tr("Version %1")).arg(mVersion));
- QLabel *copy = new QLabel(("Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team."));
- copy->setWordWrap(true);
- QLabel *gpl = new QLabel(tr("This program is licensed under the terms " \
- "of the GNU General Public License version 3"));
- gpl->setWordWrap(true);
+ mUI.mVersion->setText(mUI.mVersion->text().arg(version));
QString url = "http://cppcheck.wiki.sourceforge.net/";
- QString homepageText = QString(tr("Visit Cppcheck homepage at %1")).arg(url);
- QLabel *homepage = new QLabel(homepageText);
- homepage->setOpenExternalLinks(true);
- homepage->setWordWrap(true);
- QPushButton *quit = new QPushButton(tr("Close"));
-
- mainLayout->addWidget(name);
- mainLayout->addWidget(ver);
- mainLayout->addWidget(copy);
- mainLayout->addWidget(gpl);
- mainLayout->addWidget(homepage);
- mainLayout->addStretch();
-
- mainLayout->addLayout(btnLayout);
-
- iconVLayout->addWidget(iconLabel);
- iconVLayout->addStretch();
- iconLayout->addLayout(iconVLayout);
- iconLayout->addLayout(mainLayout);
-
- btnLayout->addStretch();
- btnLayout->addWidget(quit);
- setLayout(iconLayout);
-
- connect(quit, SIGNAL(clicked()), this, SLOT(close()));
+ mUI.mHomepage->setText(mUI.mHomepage->text().arg(url));
+ connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept()));
}
diff --git a/gui/aboutdialog.h b/gui/aboutdialog.h
index 9f0250e3c..bb4e2fcd0 100644
--- a/gui/aboutdialog.h
+++ b/gui/aboutdialog.h
@@ -22,7 +22,8 @@
#include
#include
-class QWidget;
+#include "ui_about.h"
+
/**
* @brief About dialog
@@ -35,7 +36,7 @@ public:
AboutDialog(const QString &version, QWidget *parent = 0);
private:
- QString mVersion;
+ Ui::About mUI;
};
#endif // ABOUT_DIALOG_H
diff --git a/gui/cppcheck_de.ts b/gui/cppcheck_de.ts
index b01bbed45..b63f49005 100644
--- a/gui/cppcheck_de.ts
+++ b/gui/cppcheck_de.ts
@@ -2,37 +2,38 @@
- AboutDialog
+ About
-
- About cppcheck
+
+ About Cppcheck
-
- Cppcheck - A tool for static C/C++ code analysis.
-
-
-
-
+ Version %1
-
- This program is licensed under the terms of the GNU General Public License version 3
+
+ Cppcheck - A tool for static C/C++ code analysis.
-
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+
+
+
+ Visit Cppcheck homepage at %1
-
-
- Close
-
- ApplicationDialog
diff --git a/gui/cppcheck_en.ts b/gui/cppcheck_en.ts
index fd546d4bc..c09a4ddce 100644
--- a/gui/cppcheck_en.ts
+++ b/gui/cppcheck_en.ts
@@ -2,36 +2,38 @@
- AboutDialog
+ About
-
- About cppcheck
+
+ About CppcheckAbout Cppcheck
-
- Cppcheck - A tool for static C/C++ code analysis.
- Cppcheck - A tool for static C/C++ code analysis.
-
-
-
+ Version %1Version %1
-
- This program is licensed under the terms of the GNU General Public License version 3
- This program is licensed under the terms of the GNU General Public License version 3
+
+ Cppcheck - A tool for static C/C++ code analysis.
+ Cppcheck - A tool for static C/C++ code analysis.
-
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+ This program is licensed under the terms
+of the GNU General Public License version 3
+
+
+ Visit Cppcheck homepage at %1
-
-
-
-
- Close
- Close
+ Visit Cppcheck homepage at %1
diff --git a/gui/cppcheck_fi.ts b/gui/cppcheck_fi.ts
index 1735f1cf6..b324d3c53 100644
--- a/gui/cppcheck_fi.ts
+++ b/gui/cppcheck_fi.ts
@@ -2,36 +2,38 @@
- AboutDialog
+ About
-
- About cppcheck
+
+ About CppcheckTietoa ohjelmasta Cppcheck
-
- Cppcheck - A tool for static C/C++ code analysis.
- Cppcheck - Työkalu C/C++ koodin staattiseen analysointiin.
-
-
-
+ Version %1Versio %1
-
- This program is licensed under the terms of the GNU General Public License version 3
- Tämä ohjelma on lisensoitu GNU General Public Lisenssin version 3 alaiseksi
+
+ Cppcheck - A tool for static C/C++ code analysis.
+ Cppcheck - Työkalu C/C++ koodin staattiseen analysointiin.
-
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+ Copyright (C) 2007-2009 Daniel Marjamäki ja cppcheck tiimi.
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+ Tämä ohjelma on lisensoitu GNU General
+Public lisenssin version 3 alaisuuteen
+
+
+ Visit Cppcheck homepage at %1
-
-
-
-
- Close
- Sulje
+ Cppcheckin kotisivu löytyy osoitteesta %1
diff --git a/gui/cppcheck_ru.ts b/gui/cppcheck_ru.ts
index 7820ec21d..d281e7efb 100644
--- a/gui/cppcheck_ru.ts
+++ b/gui/cppcheck_ru.ts
@@ -2,37 +2,38 @@
- AboutDialog
+ About
-
- About cppcheck
+
+ About Cppcheck
-
- Cppcheck - A tool for static C/C++ code analysis.
-
-
-
-
+ Version %1
-
- This program is licensed under the terms of the GNU General Public License version 3
+
+ Cppcheck - A tool for static C/C++ code analysis.
-
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+
+
+
+ Visit Cppcheck homepage at %1
-
-
- Close
-
- ApplicationDialog
diff --git a/gui/cppcheck_se.ts b/gui/cppcheck_se.ts
index 7820ec21d..d281e7efb 100644
--- a/gui/cppcheck_se.ts
+++ b/gui/cppcheck_se.ts
@@ -2,37 +2,38 @@
- AboutDialog
+ About
-
- About cppcheck
+
+ About Cppcheck
-
- Cppcheck - A tool for static C/C++ code analysis.
-
-
-
-
+ Version %1
-
- This program is licensed under the terms of the GNU General Public License version 3
+
+ Cppcheck - A tool for static C/C++ code analysis.
-
+
+ Copyright (C) 2007-2009 Daniel Marjamäki and cppcheck team.
+
+
+
+
+ This program is licensed under the terms
+of the GNU General Public License version 3
+
+
+
+ Visit Cppcheck homepage at %1
-
-
- Close
-
- ApplicationDialog
diff --git a/gui/gui.pro b/gui/gui.pro
index 5b8d2ea91..75e73b1ab 100644
--- a/gui/gui.pro
+++ b/gui/gui.pro
@@ -14,7 +14,8 @@ RESOURCES = gui.qrc
FORMS = main.ui \
resultsview.ui \
application.ui \
- settings.ui
+ settings.ui \
+ about.ui
TRANSLATIONS = cppcheck_fi.ts \
cppcheck_en.ts \