Wed, 16 Nov 2016 00:44:35 +0200
Moved the about dialog into the file toolset and removed the mail button (the forums are better for this anyway)
src/dialogs.cpp | file | annotate | diff | comparison | revisions | |
src/dialogs.h | file | annotate | diff | comparison | revisions | |
src/toolsets/filetoolset.cpp | file | annotate | diff | comparison | revisions | |
ui/about.ui | file | annotate | diff | comparison | revisions |
--- a/src/dialogs.cpp Tue Nov 15 17:44:54 2016 +0200 +++ b/src/dialogs.cpp Wed Nov 16 00:44:35 2016 +0200 @@ -39,7 +39,6 @@ #include "dialogs.h" #include "ui_overlay.h" #include "ui_extprogpath.h" -#include "ui_about.h" extern const char* g_extProgPathFilter; @@ -190,28 +189,3 @@ { return ui->m_path->text(); } - -// ============================================================================= -// ============================================================================= -AboutDialog::AboutDialog (QWidget* parent, Qt::WindowFlags f) : - QDialog (parent, f) -{ - Ui::AboutUI ui; - ui.setupUi (this); - ui.versionInfo->setText (APPNAME " " + QString (fullVersionString())); - - QPushButton* mailButton = new QPushButton; - mailButton->setText (tr ("Contact")); - mailButton->setIcon (GetIcon ("mail")); - ui.buttonBox->addButton (static_cast<QAbstractButton*> (mailButton), QDialogButtonBox::HelpRole); - connect (ui.buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_mail())); - - setWindowTitle (format (tr ("About %1"), APPNAME)); -} - -// ============================================================================= -// ============================================================================= -void AboutDialog::slot_mail() -{ - QDesktopServices::openUrl (QUrl ("mailto:Teemu Piippo <arezey@gmail.com>?subject=LDForge")); -}
--- a/src/dialogs.h Tue Nov 15 17:44:54 2016 +0200 +++ b/src/dialogs.h Wed Nov 16 00:44:35 2016 +0200 @@ -80,15 +80,3 @@ private: Ui_ExtProgPath* ui; }; - -// ============================================================================= -class AboutDialog : public QDialog -{ - Q_OBJECT - -public: - AboutDialog (QWidget* parent = nullptr, Qt::WindowFlags f = 0); - -private slots: - void slot_mail(); -};
--- a/src/toolsets/filetoolset.cpp Tue Nov 15 17:44:54 2016 +0200 +++ b/src/toolsets/filetoolset.cpp Wed Nov 16 00:44:35 2016 +0200 @@ -30,6 +30,7 @@ #include "../dialogs/generateprimitivedialog.h" #include "../documentmanager.h" #include "filetoolset.h" +#include "ui_about.h" FileToolset::FileToolset (MainWindow* parent) : Toolset (parent) {} @@ -218,10 +219,15 @@ void FileToolset::about() { - AboutDialog().exec(); + QDialog *dialog = new QDialog(m_window); + Ui::AboutUI ui; + ui.setupUi(dialog); + ui.versionInfo->setText(APPNAME " " + QString (fullVersionString())); + dialog->setWindowTitle(format(tr("About %1"), APPNAME)); + dialog->exec(); } void FileToolset::aboutQt() { QMessageBox::aboutQt (m_window); -} \ No newline at end of file +}
--- a/ui/about.ui Tue Nov 15 17:44:54 2016 +0200 +++ b/ui/about.ui Wed Nov 16 00:44:35 2016 +0200 @@ -64,7 +64,7 @@ <item> <widget class="QLabel" name="label_2"> <property name="text"> - <string>Copyright (C) 2013, 2014 Teemu Piippo</string> + <string>Copyright (C) 2013 - 2016 Teemu Piippo</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> @@ -117,7 +117,6 @@ </widget> <resources> <include location="../ldforge.qrc"/> - <include location="../../ldforge.qrc"/> </resources> <connections> <connection>