diff options
Diffstat (limited to 'utils/themeeditor/gui/newprojectdialog.cpp')
-rw-r--r-- | utils/themeeditor/gui/newprojectdialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/themeeditor/gui/newprojectdialog.cpp b/utils/themeeditor/gui/newprojectdialog.cpp index 50a8bc4631..0df3250c5b 100644 --- a/utils/themeeditor/gui/newprojectdialog.cpp +++ b/utils/themeeditor/gui/newprojectdialog.cpp | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "newprojectdialog.h" | 22 | #include "newprojectdialog.h" |
23 | #include "ui_newprojectdialog.h" | 23 | #include "ui_newprojectdialog.h" |
24 | #include "targetdata.h" | ||
24 | 25 | ||
25 | #include <QSettings> | 26 | #include <QSettings> |
26 | #include <QFileDialog> | 27 | #include <QFileDialog> |
@@ -42,6 +43,13 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) : | |||
42 | 43 | ||
43 | settings.endGroup(); | 44 | settings.endGroup(); |
44 | 45 | ||
46 | /* Populating the target box */ | ||
47 | TargetData targets; | ||
48 | for(int i = 0; i < targets.count(); i++) | ||
49 | { | ||
50 | ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i)); | ||
51 | } | ||
52 | |||
45 | /* Connecting the browse button */ | 53 | /* Connecting the browse button */ |
46 | QObject::connect(ui->browseButton, SIGNAL(clicked()), | 54 | QObject::connect(ui->browseButton, SIGNAL(clicked()), |
47 | this, SLOT(browse())); | 55 | this, SLOT(browse())); |
@@ -56,6 +64,8 @@ void NewProjectDialog::accept() | |||
56 | { | 64 | { |
57 | status.name = ui->nameBox->text(); | 65 | status.name = ui->nameBox->text(); |
58 | status.path = ui->locationBox->text(); | 66 | status.path = ui->locationBox->text(); |
67 | status.target = ui->targetBox->itemData(ui->targetBox->currentIndex()) | ||
68 | .toString(); | ||
59 | status.sbs = ui->sbsBox->isChecked(); | 69 | status.sbs = ui->sbsBox->isChecked(); |
60 | status.wps = ui->wpsBox->isChecked(); | 70 | status.wps = ui->wpsBox->isChecked(); |
61 | status.fms = ui->fmsBox->isChecked(); | 71 | status.fms = ui->fmsBox->isChecked(); |
@@ -77,6 +87,7 @@ void NewProjectDialog::reject() | |||
77 | { | 87 | { |
78 | ui->nameBox->setText(status.name); | 88 | ui->nameBox->setText(status.name); |
79 | ui->locationBox->setText(status.path); | 89 | ui->locationBox->setText(status.path); |
90 | ui->targetBox->setCurrentIndex(0); | ||
80 | ui->sbsBox->setChecked(status.sbs); | 91 | ui->sbsBox->setChecked(status.sbs); |
81 | ui->wpsBox->setChecked(status.wps); | 92 | ui->wpsBox->setChecked(status.wps); |
82 | ui->fmsBox->setChecked(status.fms); | 93 | ui->fmsBox->setChecked(status.fms); |