37 #include "dialogs.h" |
39 #include "dialogs.h" |
38 #include "ui_overlay.h" |
40 #include "ui_overlay.h" |
39 #include "ui_ldrawpath.h" |
41 #include "ui_ldrawpath.h" |
40 #include "ui_openprogress.h" |
42 #include "ui_openprogress.h" |
41 #include "ui_extprogpath.h" |
43 #include "ui_extprogpath.h" |
|
44 #include "ui_about.h" |
42 #include "build/moc_dialogs.cpp" |
45 #include "build/moc_dialogs.cpp" |
43 |
46 |
44 extern const char* g_extProgPathFilter; |
47 extern const char* g_extProgPathFilter; |
45 extern_cfg (String, io_ldpath); |
48 extern_cfg (String, io_ldpath); |
46 |
49 |
306 // ============================================================================= |
309 // ============================================================================= |
307 // ----------------------------------------------------------------------------- |
310 // ----------------------------------------------------------------------------- |
308 str ExtProgPathPrompt::getPath() const { |
311 str ExtProgPathPrompt::getPath() const { |
309 return ui->m_path->text(); |
312 return ui->m_path->text(); |
310 } |
313 } |
|
314 |
|
315 // ============================================================================= |
|
316 // ----------------------------------------------------------------------------- |
|
317 AboutDialog::AboutDialog (QWidget* parent, Qt::WindowFlags f) : |
|
318 QDialog (parent, f) |
|
319 { |
|
320 Ui::AboutUI ui; |
|
321 ui.setupUi (this); |
|
322 ui.versionInfo->setText (fmt (tr ("LDForge %1"), fullVersionString())); |
|
323 |
|
324 QPushButton* mailButton = new QPushButton; |
|
325 mailButton->setText ("Contact"); |
|
326 mailButton->setIcon (getIcon ("mail")); |
|
327 ui.buttonBox->addButton (static_cast<QAbstractButton*> (mailButton), QDialogButtonBox::HelpRole); |
|
328 connect (ui.buttonBox, SIGNAL (helpRequested()), this, SLOT (slot_mail())); |
|
329 |
|
330 setWindowTitle ("About " APPNAME); |
|
331 } |
|
332 |
|
333 // ============================================================================= |
|
334 // ----------------------------------------------------------------------------- |
|
335 void AboutDialog::slot_mail() { |
|
336 QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo <slatenails64@gmail.com>?subject=LDForge")); |
|
337 } |