# HG changeset patch # User Teemu Piippo # Date 1479249875 -7200 # Node ID 28ab6cad2c3247bc65a264b54b474cf3683f4267 # Parent 848ad1516e4d3f4052e5607de10bd68a4892d657 Moved the about dialog into the file toolset and removed the mail button (the forums are better for this anyway) diff -r 848ad1516e4d -r 28ab6cad2c32 src/dialogs.cpp --- 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 (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 ?subject=LDForge")); -} diff -r 848ad1516e4d -r 28ab6cad2c32 src/dialogs.h --- 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(); -}; diff -r 848ad1516e4d -r 28ab6cad2c32 src/toolsets/filetoolset.cpp --- 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 +} diff -r 848ad1516e4d -r 28ab6cad2c32 ui/about.ui --- 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 @@ - Copyright (C) 2013, 2014 Teemu Piippo + Copyright (C) 2013 - 2016 Teemu Piippo Qt::AlignCenter @@ -117,7 +117,6 @@ -