merged aboutDialog.cpp to dialogs.cpp

Thu, 22 Aug 2013 18:13:20 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 22 Aug 2013 18:13:20 +0300
changeset 472
8986414c6ad5
parent 471
fc58b67d445c
child 473
2a84149fe642

merged aboutDialog.cpp to dialogs.cpp

src/aboutDialog.cpp file | annotate | diff | comparison | revisions
src/aboutDialog.h file | annotate | diff | comparison | revisions
src/dialogs.cpp file | annotate | diff | comparison | revisions
src/dialogs.h file | annotate | diff | comparison | revisions
src/gui_actions.cpp file | annotate | diff | comparison | revisions
--- 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 <http://www.gnu.org/licenses/>.
- */
-
-#include <QDesktopServices>
-#include <QPushButton>
-#include <QUrl>
-#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<QAbstractButton*> (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 <arezey@gmail.com>?subject=LDForge"));
-}
\ No newline at end of file
--- 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 <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ZZ_ABOUTDIALOG_H
-#define ZZ_ABOUTDIALOG_H
-
-#include <QDialog>
-#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
--- 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 <QGridLayout>
 #include <QProgressBar>
 #include <QCheckBox>
+#include <QDesktopServices>
+#include <QUrl>
 
 #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<QAbstractButton*> (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 <slatenails64@gmail.com>?subject=LDForge"));
 }
\ No newline at end of file
--- 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
--- 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"

mercurial