diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-10 20:00:44 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-10 20:00:44 +0000 |
| commit | 4d9261bf04a49e149f92705fe2e72309ff048c51 (patch) | |
| tree | 7063c413b4574e6d8aaa49bf38d62b16cb843117 /src/plugins | |
| parent | b95c9bd09245efe50741b806ca8ae7d7970b221a (diff) | |
| download | qmmp-4d9261bf04a49e149f92705fe2e72309ff048c51.tar.gz qmmp-4d9261bf04a49e149f92705fe2e72309ff048c51.tar.bz2 qmmp-4d9261bf04a49e149f92705fe2e72309ff048c51.zip | |
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
Diffstat (limited to 'src/plugins')
16 files changed, 153 insertions, 1 deletions
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 <QMenu> #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 @@ <widget class="QLineEdit" name="commandLineEdit"/> </item> <item> - <widget class="QToolButton" name="toolButton"> + <widget class="QToolButton" name="commandToolButton"> <property name="text"> <string notr="true">...</string> </property> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation>Преобразовать в 16 бит</translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation>Конвертувати в 16 біт</translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> 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</source> <source>Convert to 16 bit</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../preseteditor.cpp" line="57"/> + <source>Output file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../preseteditor.cpp" line="58"/> + <source>Input file</source> + <translation type="unfinished"></translation> + </message> </context> </TS> |
