18 |
18 |
19 #include <QTableWidget> |
19 #include <QTableWidget> |
20 #include <commonlib/misc.h> |
20 #include <commonlib/misc.h> |
21 #include "addversionprompt.h" |
21 #include "addversionprompt.h" |
22 #include "configwindow.h" |
22 #include "configwindow.h" |
|
23 #include "versionguientry.h" |
23 #include "ui_addversion.h" |
24 #include "ui_addversion.h" |
24 |
25 |
25 // |
26 // |
26 // ------------------------------------------------------------------------------------------------- |
27 // ------------------------------------------------------------------------------------------------- |
27 // |
28 // |
34 ui.setupUi (this); |
35 ui.setupUi (this); |
35 connect (ui.buttonBox, SIGNAL (accepted()), this, SLOT (acceptPressed())); |
36 connect (ui.buttonBox, SIGNAL (accepted()), this, SLOT (acceptPressed())); |
36 connect (ui.buttonBox, SIGNAL (rejected()), this, SLOT (reject())); |
37 connect (ui.buttonBox, SIGNAL (rejected()), this, SLOT (reject())); |
37 connect (ui.findExeButton, SIGNAL (clicked()), this, SLOT (findExePath())); |
38 connect (ui.findExeButton, SIGNAL (clicked()), this, SLOT (findExePath())); |
38 |
39 |
39 ui.nameField->setText (entry->name); |
40 ui.nameField->setText (entry->name()); |
40 ui.exePathField->setText (entry->pathItem->text()); |
41 ui.exePathField->setText (entry->pathItem()->text()); |
41 ui.releaseCheckbox->setChecked (entry->isRelease); |
42 ui.releaseCheckbox->setChecked (entry->isRelease()); |
42 } |
43 } |
43 |
44 |
44 // |
45 // |
45 // ------------------------------------------------------------------------------------------------- |
46 // ------------------------------------------------------------------------------------------------- |
46 // |
47 // |
47 |
48 |
48 void AddVersionPrompt::acceptPressed() |
49 void AddVersionPrompt::acceptPressed() |
49 { |
50 { |
50 m_entry->name = ui.nameField->text(); |
51 m_entry->setName (ui.nameField->text()); |
51 m_entry->isRelease = ui.releaseCheckbox->isChecked(); |
52 m_entry->setRelease (ui.releaseCheckbox->isChecked()); |
52 m_entry->labelItem->setText (m_entry->name); |
53 m_entry->pathItem()->setText (ui.exePathField->text()); |
53 m_entry->pathItem->setText (ui.exePathField->text()); |
|
54 accept(); |
54 accept(); |
55 } |
55 } |
56 |
56 |
57 // |
57 // |
58 // ------------------------------------------------------------------------------------------------- |
58 // ------------------------------------------------------------------------------------------------- |