# HG changeset patch # User Santeri Piippo # Date 1377184400 -10800 # Node ID 8986414c6ad56efe995b6ba0bbc0e9e7bb713679 # Parent fc58b67d445c32309eb4b03c5e55523d3b49c3b1 merged aboutDialog.cpp to dialogs.cpp diff -r fc58b67d445c -r 8986414c6ad5 src/aboutDialog.cpp --- a/src/aboutDialog.cpp Wed Aug 21 14:07:02 2013 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013 Santeri Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include "build/moc_aboutDialog.cpp" -#include "aboutDialog.h" -#include "ui_about.h" -#include "gui.h" - -// ============================================================================= -// ----------------------------------------------------------------------------- -AboutDialog::AboutDialog (QWidget* parent, Qt::WindowFlags f) : - QDialog (parent, f) { - - Ui::AboutUI ui; - ui.setupUi (this); - ui.versionInfo->setText (fmt (tr ("LDForge %1"), fullVersionString())); - - QPushButton* mailButton = new QPushButton; - mailButton->setText ("Contact"); - mailButton->setIcon (getIcon ("mail")); - ui.buttonBox->addButton (static_cast (mailButton), QDialogButtonBox::HelpRole); - connect (ui.buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_mail())); - - setWindowTitle ("About " APPNAME); -} - -// ============================================================================= -// ----------------------------------------------------------------------------- -void AboutDialog::slot_mail() { - QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo ?subject=LDForge")); -} \ No newline at end of file diff -r fc58b67d445c -r 8986414c6ad5 src/aboutDialog.h --- a/src/aboutDialog.h Wed Aug 21 14:07:02 2013 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013 Santeri Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef ZZ_ABOUTDIALOG_H -#define ZZ_ABOUTDIALOG_H - -#include -#include "common.h" -#include "types.h" - -class QPushButton; - -class AboutDialog : public QDialog { - Q_OBJECT - -public: - AboutDialog (QWidget* parent = null, Qt::WindowFlags f = 0); - -private slots: - void slot_mail(); -}; - -#endif // ZZ_ABOUTDIALOG_H \ No newline at end of file diff -r fc58b67d445c -r 8986414c6ad5 src/dialogs.cpp --- a/src/dialogs.cpp Wed Aug 21 14:07:02 2013 +0300 +++ b/src/dialogs.cpp Thu Aug 22 18:13:20 2013 +0300 @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include "dialogs.h" #include "widgets.h" @@ -39,6 +41,7 @@ #include "ui_ldrawpath.h" #include "ui_openprogress.h" #include "ui_extprogpath.h" +#include "ui_about.h" #include "build/moc_dialogs.cpp" extern const char* g_extProgPathFilter; @@ -307,4 +310,28 @@ // ----------------------------------------------------------------------------- str ExtProgPathPrompt::getPath() const { return ui->m_path->text(); +} + +// ============================================================================= +// ----------------------------------------------------------------------------- +AboutDialog::AboutDialog (QWidget* parent, Qt::WindowFlags f) : + QDialog (parent, f) +{ + Ui::AboutUI ui; + ui.setupUi (this); + ui.versionInfo->setText (fmt (tr ("LDForge %1"), fullVersionString())); + + QPushButton* mailButton = new QPushButton; + mailButton->setText ("Contact"); + mailButton->setIcon (getIcon ("mail")); + ui.buttonBox->addButton (static_cast (mailButton), QDialogButtonBox::HelpRole); + connect (ui.buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_mail())); + + setWindowTitle ("About " APPNAME); +} + +// ============================================================================= +// ----------------------------------------------------------------------------- +void AboutDialog::slot_mail() { + QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo ?subject=LDForge")); } \ No newline at end of file diff -r fc58b67d445c -r 8986414c6ad5 src/dialogs.h --- a/src/dialogs.h Wed Aug 21 14:07:02 2013 +0300 +++ b/src/dialogs.h Thu Aug 22 18:13:20 2013 +0300 @@ -124,4 +124,15 @@ Ui_ExtProgPath* ui; }; +// ============================================================================= +class AboutDialog : public QDialog { + Q_OBJECT + +public: + AboutDialog (QWidget* parent = null, Qt::WindowFlags f = 0); + +private slots: + void slot_mail(); +}; + #endif // DIALOGS_H \ No newline at end of file diff -r fc58b67d445c -r 8986414c6ad5 src/gui_actions.cpp --- a/src/gui_actions.cpp Wed Aug 21 14:07:02 2013 +0300 +++ b/src/gui_actions.cpp Thu Aug 22 18:13:20 2013 +0300 @@ -29,7 +29,6 @@ #include "history.h" #include "configDialog.h" #include "addObjectDialog.h" -#include "aboutDialog.h" #include "misc.h" #include "gldraw.h" #include "dialogs.h"