From 4d9261bf04a49e149f92705fe2e72309ff048c51 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 10 Oct 2011 20:00:44 +0000 Subject: converter: added menu to preset editor git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2390 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/converter/preseteditor.cpp | 18 ++++++++++++++++++ src/plugins/General/converter/preseteditor.h | 4 ++++ src/plugins/General/converter/preseteditor.ui | 2 +- .../converter/translations/converter_plugin_cs.ts | 10 ++++++++++ .../converter/translations/converter_plugin_de.ts | 10 ++++++++++ .../converter/translations/converter_plugin_es.ts | 10 ++++++++++ .../converter/translations/converter_plugin_it.ts | 10 ++++++++++ .../converter/translations/converter_plugin_ja.ts | 10 ++++++++++ .../converter/translations/converter_plugin_lt.ts | 10 ++++++++++ .../converter/translations/converter_plugin_nl.ts | 10 ++++++++++ .../converter/translations/converter_plugin_pl.ts | 10 ++++++++++ .../converter/translations/converter_plugin_ru.ts | 10 ++++++++++ .../converter/translations/converter_plugin_tr.ts | 10 ++++++++++ .../converter/translations/converter_plugin_uk_UA.ts | 10 ++++++++++ .../converter/translations/converter_plugin_zh_CN.ts | 10 ++++++++++ .../converter/translations/converter_plugin_zh_TW.ts | 10 ++++++++++ 16 files changed, 153 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/General/converter/preseteditor.cpp b/src/plugins/General/converter/preseteditor.cpp index e1e75e217..4bf27bf67 100644 --- a/src/plugins/General/converter/preseteditor.cpp +++ b/src/plugins/General/converter/preseteditor.cpp @@ -18,6 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include #include "preseteditor.h" #include "ui_preseteditor.h" @@ -30,6 +31,7 @@ PresetEditor::PresetEditor(const QVariantMap &data, QWidget *parent) : 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()); + createMenus(); } PresetEditor::~PresetEditor() @@ -48,3 +50,19 @@ const QVariantMap PresetEditor::data() const data.insert("read_only", false); return data; } + +void PresetEditor::createMenus() +{ + QMenu *commandMenu = new QMenu(this); + commandMenu->addAction(tr("Output file"))->setData("%o"); + commandMenu->addAction(tr("Input file"))->setData("%i"); + + m_ui->commandToolButton->setMenu(commandMenu); + m_ui->commandToolButton->setPopupMode(QToolButton::InstantPopup); + connect(commandMenu, SIGNAL(triggered(QAction *)), SLOT(addCommandString(QAction *))); +} + +void PresetEditor::addCommandString(QAction *a) +{ + m_ui->commandLineEdit->insert(a->data().toString()); +} diff --git a/src/plugins/General/converter/preseteditor.h b/src/plugins/General/converter/preseteditor.h index babf2a028..22df959e3 100644 --- a/src/plugins/General/converter/preseteditor.h +++ b/src/plugins/General/converter/preseteditor.h @@ -41,7 +41,11 @@ public: const QVariantMap data() const; +private slots: + void addCommandString(QAction *); + private: + void createMenus(); Ui::PresetEditor *m_ui; }; diff --git a/src/plugins/General/converter/preseteditor.ui b/src/plugins/General/converter/preseteditor.ui index 9aa375dce..e3d250fa2 100644 --- a/src/plugins/General/converter/preseteditor.ui +++ b/src/plugins/General/converter/preseteditor.ui @@ -62,7 +62,7 @@ - + ... diff --git a/src/plugins/General/converter/translations/converter_plugin_cs.ts b/src/plugins/General/converter/translations/converter_plugin_cs.ts index 7b0a5b341..ef6760ed1 100644 --- a/src/plugins/General/converter/translations/converter_plugin_cs.ts +++ b/src/plugins/General/converter/translations/converter_plugin_cs.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_de.ts b/src/plugins/General/converter/translations/converter_plugin_de.ts index 3d8f894b8..709db95b3 100644 --- a/src/plugins/General/converter/translations/converter_plugin_de.ts +++ b/src/plugins/General/converter/translations/converter_plugin_de.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_es.ts b/src/plugins/General/converter/translations/converter_plugin_es.ts index 17674cd56..915817552 100644 --- a/src/plugins/General/converter/translations/converter_plugin_es.ts +++ b/src/plugins/General/converter/translations/converter_plugin_es.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_it.ts b/src/plugins/General/converter/translations/converter_plugin_it.ts index 8e3ea94cc..535ed1470 100644 --- a/src/plugins/General/converter/translations/converter_plugin_it.ts +++ b/src/plugins/General/converter/translations/converter_plugin_it.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_ja.ts b/src/plugins/General/converter/translations/converter_plugin_ja.ts index e841149c7..fe05d7155 100644 --- a/src/plugins/General/converter/translations/converter_plugin_ja.ts +++ b/src/plugins/General/converter/translations/converter_plugin_ja.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_lt.ts b/src/plugins/General/converter/translations/converter_plugin_lt.ts index d9f6d46fe..3abbc7107 100644 --- a/src/plugins/General/converter/translations/converter_plugin_lt.ts +++ b/src/plugins/General/converter/translations/converter_plugin_lt.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_nl.ts b/src/plugins/General/converter/translations/converter_plugin_nl.ts index 53a6f5ace..d30f137f4 100644 --- a/src/plugins/General/converter/translations/converter_plugin_nl.ts +++ b/src/plugins/General/converter/translations/converter_plugin_nl.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_pl.ts b/src/plugins/General/converter/translations/converter_plugin_pl.ts index b0ec298ac..d73496ec2 100644 --- a/src/plugins/General/converter/translations/converter_plugin_pl.ts +++ b/src/plugins/General/converter/translations/converter_plugin_pl.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_ru.ts b/src/plugins/General/converter/translations/converter_plugin_ru.ts index 4c5f4c84e..71f8045e5 100644 --- a/src/plugins/General/converter/translations/converter_plugin_ru.ts +++ b/src/plugins/General/converter/translations/converter_plugin_ru.ts @@ -233,5 +233,15 @@ using external command-line encoders Convert to 16 bit Преобразовать в 16 бит + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_tr.ts b/src/plugins/General/converter/translations/converter_plugin_tr.ts index 6017e4dde..2d591b6b6 100644 --- a/src/plugins/General/converter/translations/converter_plugin_tr.ts +++ b/src/plugins/General/converter/translations/converter_plugin_tr.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts b/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts index 2a5de0d8a..eae92ccc7 100644 --- a/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts +++ b/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit Конвертувати в 16 біт + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts b/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts index 0bbcdb37b..a8e25e4ee 100644 --- a/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts +++ b/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + diff --git a/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts b/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts index f0f836af2..2308fb96b 100644 --- a/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts +++ b/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts @@ -231,5 +231,15 @@ using external command-line encoders Convert to 16 bit + + + Output file + + + + + Input file + + -- cgit v1.2.3-13-gbd6f