diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-04 18:19:15 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-04 18:19:15 +0000 |
| commit | 899a15f90c2845cd44e0e6aa1dc4eae5dcc68f2b (patch) | |
| tree | e81614170ef7ea506acf809e125990cf2adff348 /src/plugins/General/converter/preseteditor.cpp | |
| parent | 4e1820f359a8e50cfc48274cb45753a9d8d6307b (diff) | |
| download | qmmp-899a15f90c2845cd44e0e6aa1dc4eae5dcc68f2b.tar.gz qmmp-899a15f90c2845cd44e0e6aa1dc4eae5dcc68f2b.tar.bz2 qmmp-899a15f90c2845cd44e0e6aa1dc4eae5dcc68f2b.zip | |
converter: added preset editor
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2378 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/converter/preseteditor.cpp')
| -rw-r--r-- | src/plugins/General/converter/preseteditor.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/plugins/General/converter/preseteditor.cpp b/src/plugins/General/converter/preseteditor.cpp index 36228f37f..4a1865d92 100644 --- a/src/plugins/General/converter/preseteditor.cpp +++ b/src/plugins/General/converter/preseteditor.cpp @@ -21,14 +21,34 @@ #include "preseteditor.h" #include "ui_preseteditor.h" -PresetEditor::PresetEditor(QWidget *parent) : - QDialog(parent), - ui(new Ui::PresetEditor) +PresetEditor::PresetEditor(const QString &name, const QVariantMap &data, QWidget *parent) : + QDialog(parent), m_ui(new Ui::PresetEditor) { - ui->setupUi(this); + m_ui->setupUi(this); + m_ui->nameLineEdit->setText(name); + m_ui->extensionLineEdit->setText(data.value("ext").toString()); + m_ui->commandLineEdit->setText(data.value("command").toString()); + m_ui->us16bitCheckBox->setChecked(data.value("use_16bit").toBool()); + m_ui->tagsCheckBox->setChecked(data.value("tags").toBool()); } PresetEditor::~PresetEditor() { - delete ui; + delete m_ui; +} + +const QString PresetEditor::name() const +{ + return m_ui->nameLineEdit->text(); +} + +const QVariantMap PresetEditor::data() const +{ + QVariantMap data; + data.insert("ext", m_ui->extensionLineEdit->text()); + data.insert("command", m_ui->commandLineEdit->text()); + data.insert("use_16bit", m_ui->us16bitCheckBox->isChecked()); + data.insert("tags", m_ui->tagsCheckBox->isChecked()); + data.insert("read_only", false); + return data; } |
