77 #define act(N) extern_cfg (KeySequence, key_##N); |
77 #define act(N) extern_cfg (KeySequence, key_##N); |
78 #include "actions.h" |
78 #include "actions.h" |
79 |
79 |
80 // ============================================================================= |
80 // ============================================================================= |
81 // ----------------------------------------------------------------------------- |
81 // ----------------------------------------------------------------------------- |
82 ConfigDialog::ConfigDialog (ForgeWindow* parent) : QDialog (parent) { |
82 ConfigDialog::ConfigDialog (ConfigDialog::Tab deftab, QWidget* parent, Qt::WindowFlags f) : |
|
83 QDialog (parent, f) |
|
84 { |
83 ui = new Ui_ConfigUI; |
85 ui = new Ui_ConfigUI; |
84 ui->setupUi (this); |
86 ui->setupUi (this); |
85 |
87 |
86 initMainTab(); |
88 initMainTab(); |
87 initShortcutsTab(); |
89 initShortcutsTab(); |
95 connect (ui->findDownloadPath, SIGNAL (clicked(bool)), this, SLOT (slot_findDownloadFolder())); |
97 connect (ui->findDownloadPath, SIGNAL (clicked(bool)), this, SLOT (slot_findDownloadFolder())); |
96 |
98 |
97 ui->m_profileName->setText (ld_defaultname); |
99 ui->m_profileName->setText (ld_defaultname); |
98 ui->m_profileUsername->setText (ld_defaultuser); |
100 ui->m_profileUsername->setText (ld_defaultuser); |
99 ui->m_profileLicense->setCurrentIndex (ld_defaultlicense); |
101 ui->m_profileLicense->setCurrentIndex (ld_defaultlicense); |
|
102 |
|
103 ui->tabs->setCurrentIndex (deftab); |
100 } |
104 } |
101 |
105 |
102 // ============================================================================= |
106 // ============================================================================= |
103 // ----------------------------------------------------------------------------- |
107 // ----------------------------------------------------------------------------- |
104 ConfigDialog::~ConfigDialog() { |
108 ConfigDialog::~ConfigDialog() { |
581 } |
585 } |
582 |
586 |
583 // ============================================================================= |
587 // ============================================================================= |
584 // ----------------------------------------------------------------------------- |
588 // ----------------------------------------------------------------------------- |
585 void ConfigDialog::staticDialog() { |
589 void ConfigDialog::staticDialog() { |
586 ConfigDialog dlg (g_win); |
590 ConfigDialog dlg (InterfaceTab, g_win); |
587 |
591 |
588 if (dlg.exec()) { |
592 if (dlg.exec()) { |
589 const alias ui = *dlg.getUI(); |
593 const alias ui = *dlg.getUI(); |
590 |
594 |
591 // Apply configuration |
595 // Apply configuration |