src/aboutDialog.cpp

changeset 487
a350c4b25133
parent 443
a70dd25dd4bb
parent 486
25747c37c7be
child 488
0ea49207a4ec
equal deleted inserted replaced
443:a70dd25dd4bb 487:a350c4b25133
1 /*
2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri Piippo
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include <QDesktopServices>
20 #include <QPushButton>
21 #include <QUrl>
22 #include "aboutDialog.h"
23 #include "ui_about.h"
24 #include "gui.h"
25
26 AboutDialog::AboutDialog (QWidget* parent, Qt::WindowFlags f) :
27 QDialog (parent, f) {
28
29 Ui::AboutUI ui;
30 ui.setupUi (this);
31 ui.versionInfo->setText (fmt (tr ("LDForge %1"), fullVersionString()));
32
33 QPushButton* mailButton = new QPushButton;
34 mailButton->setText ("Contact");
35 mailButton->setIcon (getIcon ("mail"));
36 ui.buttonBox->addButton (static_cast<QAbstractButton*> (mailButton), QDialogButtonBox::HelpRole);
37 connect (ui.buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_mail()));
38
39 setWindowTitle ("About " APPNAME);
40 }
41
42 void AboutDialog::slot_mail() {
43 QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo <arezey@gmail.com>?subject=LDForge"));
44 }
45
46 #include "build/moc_aboutDialog.cpp"

mercurial