From dbe1c2bb4eda63205b744411ddcaf12d5d6436fb Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 31 Jan 2010 21:57:58 +0000 Subject: optimized settings dialog git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1533 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmp/effect.cpp | 4 +- src/qmmp/effect.h | 4 +- src/qmmp/output.cpp | 8 +- src/qmmp/output.h | 4 +- src/qmmpui/general.cpp | 32 ++- src/qmmpui/general.h | 9 +- src/qmmpui/generalhandler.cpp | 4 +- src/ui/aboutdialog.cpp | 6 +- src/ui/configdialog.cpp | 468 +++++++++----------------------------- src/ui/configdialog.h | 29 +-- src/ui/forms/configdialog.ui | 312 ++++++++++++------------- src/ui/mainwindow.cpp | 16 +- src/ui/pixmapwidget.cpp | 1 + src/ui/pluginitem.cpp | 270 +++++++++++----------- src/ui/pluginitem.h | 134 +++-------- src/ui/translations/qmmp_cs.ts | 221 +++++++++--------- src/ui/translations/qmmp_de.ts | 221 +++++++++--------- src/ui/translations/qmmp_it.ts | 223 +++++++++--------- src/ui/translations/qmmp_lt.ts | 223 +++++++++--------- src/ui/translations/qmmp_pl_PL.ts | 223 +++++++++--------- src/ui/translations/qmmp_pt_BR.ts | 223 +++++++++--------- src/ui/translations/qmmp_ru.ts | 223 +++++++++--------- src/ui/translations/qmmp_tr.ts | 223 +++++++++--------- src/ui/translations/qmmp_uk_UA.ts | 223 +++++++++--------- src/ui/translations/qmmp_zh_CN.ts | 223 +++++++++--------- src/ui/translations/qmmp_zh_TW.ts | 223 +++++++++--------- src/ui/visualmenu.cpp | 26 ++- src/ui/visualmenu.h | 18 +- 28 files changed, 1638 insertions(+), 2156 deletions(-) (limited to 'src') diff --git a/src/qmmp/effect.cpp b/src/qmmp/effect.cpp index 27d6b98d1..87d342001 100644 --- a/src/qmmp/effect.cpp +++ b/src/qmmp/effect.cpp @@ -122,13 +122,13 @@ QList Effect::create() return effects; } -QList *Effect::effectFactories() +QList *Effect::factories() { checkFactories(); return m_factories; } -QStringList Effect::effectFiles() +QStringList Effect::files() { checkFactories(); return m_files; diff --git a/src/qmmp/effect.h b/src/qmmp/effect.h index 05873cda4..ed84815f3 100644 --- a/src/qmmp/effect.h +++ b/src/qmmp/effect.h @@ -77,11 +77,11 @@ public: /*! * Returns a list of effect factories. */ - static QList *effectFactories(); + static QList *factories(); /*! * Returns a list of effect plugin file names. */ - static QStringList effectFiles(); + static QStringList files(); /*! * Sets whether the effect plugin is enabled. * @param factory Effect plugin factory. diff --git a/src/qmmp/output.cpp b/src/qmmp/output.cpp index 07a7a02e4..6adb7ef5b 100644 --- a/src/qmmp/output.cpp +++ b/src/qmmp/output.cpp @@ -359,9 +359,9 @@ void Output::checkFactories() } } -void Output::registerFactory ( OutputFactory *fact ) +void Output::registerFactory (OutputFactory *fact) { - m_factories->append ( fact ); + m_factories->append (fact); } Output *Output::create (QObject *parent) @@ -382,13 +382,13 @@ Output *Output::create (QObject *parent) return output; } -QList *Output::outputFactories() +QList *Output::factories() { checkFactories(); return m_factories; } -QStringList Output::outputFiles() +QStringList Output::files() { checkFactories(); return m_files; diff --git a/src/qmmp/output.h b/src/qmmp/output.h index c5a4d704b..265f118a1 100644 --- a/src/qmmp/output.h +++ b/src/qmmp/output.h @@ -115,11 +115,11 @@ public: /*! * Returns a list of output factories. */ - static QList *outputFactories(); + static QList *factories(); /*! * Returns a list of output plugin file names. */ - static QStringList outputFiles(); + static QStringList files(); /*! * Selects current output \b factory. */ diff --git a/src/qmmpui/general.cpp b/src/qmmpui/general.cpp index 7bf9514d7..d8cfe1989 100644 --- a/src/qmmpui/general.cpp +++ b/src/qmmpui/general.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -23,19 +23,17 @@ #include #include #include - #include "general.h" +QList *General::m_factories = 0; +QStringList General::m_files; -static QList *factories = 0; -static QStringList files; - -static void checkFactories() +void General::checkFactories() { - if (! factories) + if (!m_factories) { - files.clear(); - factories = new QList; + m_files.clear(); + m_factories = new QList; QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("General"); foreach (QString fileName, pluginsDir.entryList(QDir::Files)) @@ -53,8 +51,8 @@ static void checkFactories() if (factory) { - factories->append(factory); - files << pluginsDir.absoluteFilePath(fileName); + m_factories->append(factory); + m_files << pluginsDir.absoluteFilePath(fileName); qApp->installTranslator(factory->createTranslator(qApp)); } } @@ -81,22 +79,22 @@ void General::toggleVisibility() emit toggleVisibilityCalled(); } -QList *General::generalFactories() +QList *General::factories() { checkFactories(); - return factories; + return m_factories; } -QStringList General::generalFiles() +QStringList General::files() { checkFactories(); - return files; + return m_files; } void General::setEnabled(GeneralFactory* factory, bool enable) { checkFactories(); - if (!factories->contains(factory)) + if (!m_factories->contains(factory)) return; QString name = factory->properties().shortName; @@ -116,7 +114,7 @@ void General::setEnabled(GeneralFactory* factory, bool enable) bool General::isEnabled(GeneralFactory* factory) { checkFactories(); - if (!factories->contains(factory)) + if (!m_factories->contains(factory)) return FALSE; QSettings settings (Qmmp::configFile(), QSettings::IniFormat ); QStringList genList = settings.value("General/enabled_plugins").toStringList(); diff --git a/src/qmmpui/general.h b/src/qmmpui/general.h index 244d02114..8ead65b37 100644 --- a/src/qmmpui/general.h +++ b/src/qmmpui/general.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -44,11 +44,11 @@ public: /*! * Returns a list of the loaded general plugin factories. */ - static QList *generalFactories(); + static QList *factories(); /*! * Returns a list of the loaded general plugin files. */ - static QStringList generalFiles(); + static QStringList files(); /*! * Sets whether the general plugin is enabled. * @param factory General plugin factory. @@ -84,6 +84,9 @@ public slots: private: QMap m_strValues; QMap m_numValues; + static QList *m_factories; + static QStringList m_files; + static void checkFactories(); }; #endif diff --git a/src/qmmpui/generalhandler.cpp b/src/qmmpui/generalhandler.cpp index 06025586f..744591243 100644 --- a/src/qmmpui/generalhandler.cpp +++ b/src/qmmpui/generalhandler.cpp @@ -38,7 +38,7 @@ GeneralHandler::GeneralHandler(QObject *parent) m_toolsMenu = 0; m_playlistMenu = 0; GeneralFactory* factory; - foreach(factory, *General::generalFactories()) + foreach(factory, *General::factories()) { if (General::isEnabled(factory)) { @@ -94,7 +94,7 @@ void GeneralHandler::showSettings(GeneralFactory* factory, QWidget* parentWidget bool GeneralHandler::visibilityControl() { GeneralFactory* factory; - foreach(factory, *General::generalFactories()) + foreach(factory, *General::factories()) { if (General::isEnabled(factory) && factory->properties().visibilityControl) return TRUE; diff --git a/src/ui/aboutdialog.cpp b/src/ui/aboutdialog.cpp index a2ad8fd2c..f9a407f07 100644 --- a/src/ui/aboutdialog.cpp +++ b/src/ui/aboutdialog.cpp @@ -92,7 +92,7 @@ QString AboutDialog::loadAbout() text.append(""); text.append("
"+tr("Output plugins:")+"
"); text.append("
    "); - foreach(OutputFactory *fact, *Output::outputFactories()) + foreach(OutputFactory *fact, *Output::factories()) { text.append("
  • "); text.append(fact->properties().name); @@ -110,7 +110,7 @@ QString AboutDialog::loadAbout() text.append("
"); text.append("
"+tr("Effect plugins:")+"
"); text.append("
    "); - foreach(EffectFactory *fact, *Effect::effectFactories()) + foreach(EffectFactory *fact, *Effect::factories()) { text.append("
  • "); text.append(fact->properties().name); @@ -119,7 +119,7 @@ QString AboutDialog::loadAbout() text.append("
"); text.append("
"+tr("General plugins:")+"
"); text.append("
    "); - foreach(GeneralFactory *fact, *General::generalFactories()) + foreach(GeneralFactory *fact, *General::factories()) { text.append("
  • "); text.append(fact->properties().name); diff --git a/src/ui/configdialog.cpp b/src/ui/configdialog.cpp index cf8741439..b0803a779 100644 --- a/src/ui/configdialog.cpp +++ b/src/ui/configdialog.cpp @@ -57,22 +57,10 @@ ConfigDialog::ConfigDialog (QWidget *parent) setAttribute(Qt::WA_DeleteOnClose, FALSE); ui.preferencesButton->setEnabled(FALSE); ui.informationButton->setEnabled(FALSE); - connect (ui. contentsWidget, - SIGNAL (currentItemChanged (QListWidgetItem *, QListWidgetItem *)), - this, SLOT (changePage (QListWidgetItem *, QListWidgetItem*))); connect (ui.mainFontButton, SIGNAL (clicked()), SLOT (setMainFont())); connect (ui.plFontButton, SIGNAL (clicked()), SLOT (setPlFont())); - connect (ui.preferencesButton, SIGNAL(clicked()), SLOT (showPluginSettings())); - connect (ui.informationButton, SIGNAL(clicked()), SLOT (showPluginInfo())); - connect (this, SIGNAL(accepted()),SLOT(saveSettings())); - connect (ui.inputPluginTable, SIGNAL(cellPressed(int, int)), SLOT(updateButtons())); - connect (ui.outputPluginTable, SIGNAL(cellPressed(int, int)), SLOT(updateButtons())); - connect (ui.visualPluginTable, SIGNAL(cellPressed(int, int)), SLOT(updateButtons())); - connect (ui.generalPluginTable, SIGNAL(cellPressed(int, int)), SLOT(updateButtons())); - connect (ui.effectPluginTable, SIGNAL(cellPressed(int, int)), SLOT(updateButtons())); - connect (ui.pluginsTab, SIGNAL(currentChanged(int)), SLOT(updateButtons())); + connect (this, SIGNAL(rejected()),SLOT(saveSettings())); connect (ui.fileDialogComboBox, SIGNAL (currentIndexChanged (int)), SLOT(updateDialogButton(int))); - connect (ui.fdInformationButton, SIGNAL (clicked()), SLOT(showFileDialogInfo())); connect (ui.skinInstallButton, SIGNAL (clicked()), SLOT(installSkin())); connect (ui.skinReloadButton, SIGNAL (clicked()), SLOT(loadSkins())); connect (ui.listWidget, SIGNAL (itemClicked (QListWidgetItem *)), this, SLOT (changeSkin())); @@ -90,18 +78,7 @@ ConfigDialog::ConfigDialog (QWidget *parent) } ConfigDialog::~ConfigDialog() -{ - while (!m_enginePluginItems.isEmpty()) - delete m_enginePluginItems.takeFirst(); - while (!m_outputPluginItems.isEmpty()) - delete m_outputPluginItems.takeFirst(); - while (!m_inputPluginItems.isEmpty()) - delete m_inputPluginItems.takeFirst(); - while (!m_visualPluginItems.isEmpty()) - delete m_visualPluginItems.takeFirst(); - while (!m_effectPluginItems.isEmpty()) - delete m_effectPluginItems.takeFirst(); -} +{} void ConfigDialog::readSettings() { @@ -159,7 +136,8 @@ void ConfigDialog::readSettings() ui.use16BitCheckBox->setChecked(gs->use16BitOutput()); } -void ConfigDialog::changePage (QListWidgetItem *current, QListWidgetItem *previous) +void ConfigDialog::on_contentsWidget_currentItemChanged (QListWidgetItem *current, + QListWidgetItem *previous) { if (!current) current = previous; @@ -234,194 +212,79 @@ void ConfigDialog::findSkins(const QString &path) void ConfigDialog::loadPluginsInfo() { + ui.treeWidget->blockSignals(TRUE); /* load input plugins information */ - QList *decoders = 0; - decoders = Decoder::factories(); + QTreeWidgetItem *item = new QTreeWidgetItem (ui.treeWidget, QStringList() << tr("Decoders")); + QList *decoders = Decoder::factories(); QStringList files = Decoder::files(); - ui.inputPluginTable->setColumnCount (3); - ui.inputPluginTable->verticalHeader()->hide(); - ui.inputPluginTable->setHorizontalHeaderLabels (QStringList() - << tr ("Enabled") << tr ("Description") << tr ("Filename")); - ui.inputPluginTable->setRowCount (decoders->count ()); for (int i = 0; i < decoders->count (); ++i) - { - InputPluginItem *item = new InputPluginItem(this, decoders->at(i)); - m_inputPluginItems.append(item); - QCheckBox* checkBox = new QCheckBox (ui.inputPluginTable); - checkBox->setFocusPolicy (Qt::NoFocus); - ui.inputPluginTable->setCellWidget (i, 0, checkBox); - checkBox->setChecked(item->isSelected()); - connect(checkBox, SIGNAL(toggled(bool)), item, SLOT(setSelected(bool))); - ui.inputPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.inputPluginTable->setItem (i,2, new QTableWidgetItem (files.at (i).section('/',-1))); - ui.inputPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.inputPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.inputPluginTable->item(i,2)->setToolTip(files.at (i)); - } + new PluginItem (item, decoders->at(i), files.at (i)); + ui.treeWidget->addTopLevelItem(item); + item->setExpanded(TRUE); /* load audio engines information */ + item = new QTreeWidgetItem (ui.treeWidget, QStringList() << tr("Engines")); QList *engines = AbstractEngine::factories(); files = AbstractEngine::files(); - ui.inputPluginTable->setRowCount (decoders->count () + engines->count()); - for (int i = decoders->count (); i < decoders->count () + engines->count (); ++i) - { - QString filePath = files.at (i - decoders->count ()); - EnginePluginItem *item = new EnginePluginItem(this, engines->at(i - decoders->count ())); - m_enginePluginItems.append(item); - QCheckBox* checkBox = new QCheckBox (ui.inputPluginTable); - checkBox->setFocusPolicy (Qt::NoFocus); - ui.inputPluginTable->setCellWidget (i, 0, checkBox); - checkBox->setChecked(item->isSelected()); - connect(checkBox, SIGNAL(toggled(bool)), item, SLOT(setSelected(bool))); - ui.inputPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.inputPluginTable->setItem (i,2, new QTableWidgetItem (filePath.section('/',-1))); - ui.inputPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.inputPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.inputPluginTable->item(i,2)->setToolTip(filePath); - } - ui.inputPluginTable->resizeColumnToContents (0); - ui.inputPluginTable->resizeColumnToContents (1); - ui.inputPluginTable->resizeRowsToContents (); + for (int i = 0; i < engines->count (); ++i) + new PluginItem (item, engines->at(i), files.at (i)); + ui.treeWidget->addTopLevelItem(item); + item->setExpanded(TRUE); /* - load output plugins information + load effect plugin information */ - QList *outputs = 0; - outputs = Output::outputFactories(); - files = Output::outputFiles(); - ui.outputPluginTable->setColumnCount (3); - ui.outputPluginTable->verticalHeader()->hide(); - ui.outputPluginTable->setHorizontalHeaderLabels (QStringList() - << tr ("Enabled") << tr ("Description") << tr ("Filename")); - ui.outputPluginTable->setRowCount (outputs->count ()); - - for (int i = 0; i < outputs->count (); ++i) - { - OutputPluginItem *item = new OutputPluginItem(this,outputs->at(i)); - m_outputPluginItems.append(item); - QRadioButton* button = new QRadioButton (ui.outputPluginTable); - button->setFocusPolicy (Qt::NoFocus); - ui.outputPluginTable->setCellWidget (i, 0, button); - button->setChecked (item->isSelected()); - connect(button, SIGNAL(pressed ()), item, SLOT(select())); - ui.outputPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.outputPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i).section('/',-1))); - ui.outputPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.outputPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.outputPluginTable->item(i,2)->setToolTip(files.at (i)); - } - - ui.outputPluginTable->resizeColumnToContents (0); - ui.outputPluginTable->resizeColumnToContents (1); - ui.outputPluginTable->resizeRowsToContents (); + item = new QTreeWidgetItem (ui.treeWidget, QStringList() << tr("Effects")); + QList *effects = Effect::factories(); + files = Effect::files(); + for (int i = 0; i < effects->count (); ++i) + new PluginItem (item, effects->at(i), files.at (i)); + ui.treeWidget->addTopLevelItem(item); + item->setExpanded(TRUE); /* load visual plugin information */ - QList *visuals = 0; - visuals = Visual::factories(); + item = new QTreeWidgetItem (ui.treeWidget, QStringList() << tr("Visualization")); + QList *visuals = Visual::factories(); files = Visual::files(); - ui.visualPluginTable->setColumnCount (3); - ui.visualPluginTable->verticalHeader()->hide(); - ui.visualPluginTable->setHorizontalHeaderLabels (QStringList() - << tr ("Enabled") << tr ("Description") << tr ("Filename")); - ui.visualPluginTable->setRowCount (visuals->count ()); - for (int i = 0; i < visuals->count (); ++i) - { - VisualPluginItem *item = new VisualPluginItem(this,visuals->at(i)); - m_visualPluginItems.append(item); - QCheckBox* button = new QCheckBox (ui.visualPluginTable); - button->setFocusPolicy (Qt::NoFocus); - ui.visualPluginTable->setCellWidget (i, 0, button); - button->setChecked (item->isSelected()); - connect(button, SIGNAL(clicked (bool)), item, SLOT(select(bool))); - ui.visualPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.visualPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i).section('/',-1))); - ui.visualPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.visualPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.visualPluginTable->item(i,2)->setToolTip(files.at (i)); - } - - ui.visualPluginTable->resizeColumnToContents (0); - ui.visualPluginTable->resizeColumnToContents (1); - ui.visualPluginTable->resizeRowsToContents (); - + new PluginItem (item, visuals->at(i), files.at (i)); + ui.treeWidget->addTopLevelItem(item); + item->setExpanded(TRUE); /* - load effect plugin information + load general plugin information */ - QList *effects = 0; - effects = Effect::effectFactories(); - files = Effect::effectFiles(); - ui.effectPluginTable->setColumnCount (3); - ui.effectPluginTable->verticalHeader()->hide(); - ui.effectPluginTable->setHorizontalHeaderLabels (QStringList() - << tr ("Enabled") << tr ("Description") << tr ("Filename")); - ui.effectPluginTable->setRowCount (effects->count ()); - - for (int i = 0; i < effects->count (); ++i) - { - EffectPluginItem *item = new EffectPluginItem(this,effects->at(i)); - m_effectPluginItems.append(item); - QCheckBox* button = new QCheckBox (ui.effectPluginTable); - button->setFocusPolicy (Qt::NoFocus); - ui.effectPluginTable->setCellWidget (i, 0, button); - button->setChecked (item->isSelected()); - connect(button, SIGNAL(clicked (bool)), item, SLOT(select(bool))); - ui.effectPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.effectPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i).section('/',-1))); - ui.effectPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.effectPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.effectPluginTable->item(i,2)->setToolTip(files.at (i)); - } - - ui.effectPluginTable->resizeColumnToContents (0); - ui.effectPluginTable->resizeColumnToContents (1); - ui.effectPluginTable->resizeRowsToContents (); + item = new QTreeWidgetItem (ui.treeWidget, QStringList() << tr("General")); + QList *generals = General::factories(); + files = General::files(); + for (int i = 0; i < generals->count (); ++i) + new PluginItem (item, generals->at(i), files.at (i)); + ui.treeWidget->addTopLevelItem(item); + item->setExpanded(TRUE); + ui.treeWidget->blockSignals(FALSE); + ui.treeWidget->resizeColumnToContents(0); + ui.treeWidget->resizeColumnToContents(1); /* - load general plugin information + load output plugins information */ - QList *generals = 0; - generals = General::generalFactories(); - files = General::generalFiles(); - ui.generalPluginTable->setColumnCount (3); - ui.generalPluginTable->verticalHeader()->hide(); - ui.generalPluginTable->setHorizontalHeaderLabels (QStringList() - << tr ("Enabled") << tr ("Description") << tr ("Filename")); - ui.generalPluginTable->setRowCount (generals->count ()); - - for (int i = 0; i < generals->count (); ++i) + ui.outputInformationButton->setEnabled(FALSE); + ui.outputPreferencesButton->setEnabled(FALSE); + QList *outputs = Output::factories(); + for (int i = 0; i < outputs->count (); ++i) { - GeneralPluginItem *item = new GeneralPluginItem(this,generals->at(i)); - m_generalPluginItems.append(item); - QCheckBox* button = new QCheckBox (ui.generalPluginTable); - button->setFocusPolicy (Qt::NoFocus); - ui.generalPluginTable->setCellWidget (i, 0, button); - button->setChecked (item->isSelected()); - connect(button, SIGNAL(clicked (bool)), item, SLOT(select(bool))); - ui.generalPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->properties().name)); - ui.generalPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i).section('/',-1))); - ui.generalPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.generalPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - ui.generalPluginTable->item(i,2)->setToolTip(files.at (i)); + ui.outputComboBox->addItem(outputs->at(i)->properties().name); + if(Output::currentFactory() == outputs->at(i)) + { + ui.outputComboBox->setCurrentIndex(i); + on_outputComboBox_activated (i); + } } - - ui.generalPluginTable->resizeColumnToContents (0); - ui.generalPluginTable->resizeColumnToContents (1); - ui.generalPluginTable->resizeRowsToContents (); - /* load file dialog information */ - foreach(FileDialogFactory *factory, FileDialog::registeredFactories()) { ui.fileDialogComboBox->addItem(factory->properties().name); @@ -477,116 +340,19 @@ void ConfigDialog::setMainFont() } } -void ConfigDialog::showPluginSettings() +void ConfigDialog::on_preferencesButton_clicked() { - switch ((int) ui.pluginsTab -> currentIndex ()) - { - case 0: - { - int row = ui.inputPluginTable->currentRow (); - if(row < 0) - return; - if(row < m_inputPluginItems.count() && !m_inputPluginItems.isEmpty()) - { - m_inputPluginItems.at(row)->factory()->showSettings (this); - } - else if(row - m_inputPluginItems.count() < m_enginePluginItems.count() && - !m_enginePluginItems.isEmpty()) - { - row -= m_inputPluginItems.count(); - m_enginePluginItems.at(row)->factory()->showSettings (this); - } - break; - } - case 1: - { - int row = ui.outputPluginTable->currentRow (); - if (m_outputPluginItems.isEmpty() || row < 0) - return; - m_outputPluginItems.at(row)->factory()->showSettings (this); - break; - } - case 2: - { - int row = ui.visualPluginTable->currentRow (); - if (m_visualPluginItems.isEmpty() || row < 0) - return; - Visual::showSettings(m_visualPluginItems.at(row)->factory(), this); - break; - } - case 3: - { - int row = ui.effectPluginTable->currentRow (); - if (m_effectPluginItems.isEmpty() || row < 0) - return; - m_effectPluginItems.at(row)->factory()->showSettings (this); - break; - } - case 4: - { - int row = ui.generalPluginTable->currentRow (); - if (m_generalPluginItems.isEmpty() || row < 0) - return; - GeneralHandler::instance()->showSettings(m_generalPluginItems.at(row)->factory(), this); - break; - } - } + QTreeWidgetItem *item = ui.treeWidget->currentItem(); + if(item && item->type() >= PluginItem::TRANSPORT) + dynamic_cast(item)->showSettings(this); + } -void ConfigDialog::showPluginInfo() +void ConfigDialog::on_informationButton_clicked() { - switch ((int) ui.pluginsTab -> currentIndex ()) - { - case 0: - { - int row = ui.inputPluginTable->currentRow (); - if(row < 0) - return; - if(row < m_inputPluginItems.count() && !m_inputPluginItems.isEmpty()) - { - m_inputPluginItems.at(row)->factory()->showAbout (this); - } - else if(row - m_inputPluginItems.count() < m_enginePluginItems.count() && - !m_enginePluginItems.isEmpty()) - { - row -= m_inputPluginItems.count(); - m_enginePluginItems.at(row)->factory()->showAbout (this); - } - break; - } - case 1: - { - int row = ui.outputPluginTable->currentRow (); - if (m_outputPluginItems.isEmpty() || row < 0) - return; - m_outputPluginItems.at(row)->factory()->showAbout (this); - break; - } - case 2: - { - int row = ui.visualPluginTable->currentRow (); - if (m_visualPluginItems.isEmpty() || row < 0) - return; - m_visualPluginItems.at(row)->factory()->showAbout (this); - break; - } - case 3: - { - int row = ui.effectPluginTable->currentRow (); - if (m_effectPluginItems.isEmpty() || row < 0) - return; - m_effectPluginItems.at(row)->factory()->showAbout (this); - break; - } - case 4: - { - int row = ui.generalPluginTable->currentRow (); - if (m_generalPluginItems.isEmpty() || row < 0) - return; - m_generalPluginItems.at(row)->factory()->showAbout (this); - break; - } - } + QTreeWidgetItem *item = ui.treeWidget->currentItem(); + if(item && item->type() >= PluginItem::TRANSPORT) + dynamic_cast(item)->showAbout(this); } void ConfigDialog::createMenus() @@ -667,78 +433,9 @@ void ConfigDialog::saveSettings() ui.defaultGainDoubleSpinBox->value(), ui.clippingCheckBox->isChecked()); gs->setAudioSettings(ui.softVolumeCheckBox->isChecked(), ui.use16BitCheckBox->isChecked()); -} - -void ConfigDialog::updateButtons() -{ - bool preferences = FALSE; - bool information = FALSE; - switch ((int) ui.pluginsTab -> currentIndex ()) - { - case 0: - { - int row = ui.inputPluginTable->currentRow (); - if (row < 0) - break; - if(row < m_inputPluginItems.count() && !m_inputPluginItems.isEmpty()) - { - DecoderFactory *factory = m_inputPluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - } - else if(row - m_inputPluginItems.count() < m_enginePluginItems.count() && - !m_enginePluginItems.isEmpty()) - { - row -= m_inputPluginItems.count(); - EngineFactory *factory = m_enginePluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - } - break; - } - case 1: - { - int row = ui.outputPluginTable->currentRow (); - if (m_outputPluginItems.isEmpty() || row < 0) - break; - OutputFactory *factory = m_outputPluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - break; - } - case 2: - { - int row = ui.visualPluginTable->currentRow (); - if (m_visualPluginItems.isEmpty() || row < 0) - break; - VisualFactory *factory = m_visualPluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - break; - } - case 3: - { - int row = ui.effectPluginTable->currentRow (); - if (m_effectPluginItems.isEmpty() || row < 0) - break; - EffectFactory *factory = m_effectPluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - break; - } - case 4: - { - int row = ui.generalPluginTable->currentRow (); - if (m_generalPluginItems.isEmpty() || row < 0) - break; - GeneralFactory *factory = m_generalPluginItems.at(row)->factory(); - information = factory->properties().hasAbout; - preferences = factory->properties().hasSettings; - break; - } - } - ui.preferencesButton->setEnabled(preferences); - ui.informationButton->setEnabled(information); + QList *outputs = Output::factories(); + if(ui.outputComboBox->currentIndex() >= 0 && outputs->count()) + Output::setCurrentFactory(outputs->at(ui.outputComboBox->currentIndex())); } void ConfigDialog::updateDialogButton(int index) @@ -746,7 +443,7 @@ void ConfigDialog::updateDialogButton(int index) ui.fdInformationButton->setEnabled(FileDialog::registeredFactories()[index]->properties().hasAbout); } -void ConfigDialog::showFileDialogInfo() +void ConfigDialog::on_fdInformationButton_clicked() { int index = ui.fileDialogComboBox->currentIndex (); FileDialog::registeredFactories()[index]->showAbout(this); @@ -770,3 +467,42 @@ void ConfigDialog::on_popupCustomizeButton_clicked() p->exec(); p->deleteLater(); } + +void ConfigDialog::on_treeWidget_itemChanged (QTreeWidgetItem *item, int column) +{ + if(column == 0 && item->type() >= PluginItem::TRANSPORT) + dynamic_cast(item)->setEnabled(item->checkState(0) == Qt::Checked); +} + +void ConfigDialog::on_treeWidget_currentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *) +{ + if(current->type() >= PluginItem::TRANSPORT) + { + ui.preferencesButton->setEnabled(dynamic_cast(current)->hasSettings()); + ui.informationButton->setEnabled(dynamic_cast(current)->hasAbout()); + } + else + { + ui.preferencesButton->setEnabled(FALSE); + ui.informationButton->setEnabled(FALSE); + } +} + + void ConfigDialog::on_outputComboBox_activated (int index) + { + OutputFactory *factory = Output::factories()->at(index); + ui.outputInformationButton->setEnabled(factory->properties().hasAbout); + ui.outputPreferencesButton->setEnabled(factory->properties().hasSettings); + } + + void ConfigDialog::on_outputPreferencesButton_clicked() + { + int index = ui.outputComboBox->currentIndex(); + Output::factories()->at(index)->showSettings(this); + } + + void ConfigDialog::on_outputInformationButton_clicked() + { + int index = ui.outputComboBox->currentIndex(); + Output::factories()->at(index)->showAbout(this); + } diff --git a/src/ui/configdialog.h b/src/ui/configdialog.h index fbec0850f..7136b2cfc 100644 --- a/src/ui/configdialog.h +++ b/src/ui/configdialog.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -32,12 +32,6 @@ class QFileInfo; class Skin; -class EnginePluginItem; -class InputPluginItem; -class OutputPluginItem; -class VisualPluginItem; -class EffectPluginItem; -class GeneralPluginItem; class SkinReader; class ConfigDialog : public QDialog @@ -49,20 +43,24 @@ public: ~ConfigDialog(); private slots: - void changePage(QListWidgetItem *current, QListWidgetItem *previous); + void on_contentsWidget_currentItemChanged (QListWidgetItem *current, QListWidgetItem *previous); void changeSkin(); void setPlFont(); void setMainFont(); - void showPluginSettings(); - void showPluginInfo(); + void on_preferencesButton_clicked(); + void on_informationButton_clicked(); void addTitleString(QAction *); void saveSettings(); - void updateButtons(); void updateDialogButton(int); - void showFileDialogInfo(); + void on_fdInformationButton_clicked(); void installSkin(); void loadSkins(); void on_popupCustomizeButton_clicked(); + void on_treeWidget_itemChanged (QTreeWidgetItem *item, int column); + void on_treeWidget_currentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *); + void on_outputComboBox_activated (int index); + void on_outputPreferencesButton_clicked(); + void on_outputInformationButton_clicked(); private: void readSettings(); @@ -77,13 +75,6 @@ private: Skin *m_skin; QPixmap pixmap; SkinReader *m_reader; - - QList m_inputPluginItems; - QList m_enginePluginItems; - QList m_outputPluginItems; - QList m_visualPluginItems; - QList m_effectPluginItems; - QList m_generalPluginItems; }; #endif diff --git a/src/ui/forms/configdialog.ui b/src/ui/forms/configdialog.ui index 78823091f..6ad7c2517 100644 --- a/src/ui/forms/configdialog.ui +++ b/src/ui/forms/configdialog.ui @@ -6,8 +6,8 @@ 0 0 - 633 - 437 + 659 + 448 @@ -47,7 +47,7 @@ - 170 + 180 16777215 @@ -662,107 +662,32 @@ - - - QTabWidget::North + + + true - - QTabWidget::Rounded + + QAbstractItemView::SelectRows - - 0 + + true - - - Input - - - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - 0 - - - 0 - - - - - - - - Output - - - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - - - - - - Visualization - - - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - - - - - - Effects - - - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - - - - - - General - - - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - - - + + false + + + 2 + + + + Description + + + + + Filename + + @@ -1183,15 +1108,52 @@ Audio - - + + + + + Output: + + + + + + + + + + Preferences + + + + + + + Information + + + + + + + Qt::Horizontal + + + + 110 + 20 + + + + + Use software volume control - + 16-bit output @@ -1249,9 +1211,9 @@ - - - Close + + + QDialogButtonBox::Close @@ -1263,22 +1225,6 @@ - - closeButton - clicked() - ConfigDialog - accept() - - - 625 - 429 - - - 316 - 340 - - - enableProxyCheckBox toggled(bool) @@ -1286,12 +1232,12 @@ setEnabled(bool) - 472 - 60 + 272 + 40 - 581 - 86 + 272 + 40 @@ -1302,12 +1248,12 @@ setEnabled(bool) - 472 - 60 + 272 + 40 - 581 - 112 + 272 + 39 @@ -1318,12 +1264,12 @@ setEnabled(bool) - 472 - 138 + 272 + 38 - 581 - 164 + 272 + 38 @@ -1334,12 +1280,12 @@ setEnabled(bool) - 472 - 138 + 272 + 38 - 581 - 190 + 272 + 37 @@ -1350,12 +1296,12 @@ setEnabled(bool) - 357 - 287 + 226 + 33 - 435 - 290 + 256 + 33 @@ -1366,12 +1312,12 @@ setNum(int) - 296 - 275 + 252 + 90 - 296 - 275 + 283 + 90 @@ -1382,12 +1328,12 @@ setNum(int) - 296 - 275 + 252 + 84 - 296 - 275 + 274 + 84 @@ -1398,12 +1344,12 @@ setNum(int) - 296 - 275 + 252 + 78 - 296 - 275 + 274 + 78 @@ -1414,12 +1360,12 @@ setEnabled(bool) - 264 - 207 + 263 + 54 - 290 - 238 + 263 + 50 @@ -1430,12 +1376,12 @@ setEnabled(bool) - 232 - 208 + 263 + 54 - 292 - 259 + 263 + 45 @@ -1446,12 +1392,44 @@ setEnabled(bool) - 209 - 214 + 263 + 54 + + + 256 + 41 + + + + + buttonBox + rejected() + ConfigDialog + reject() + + + 587 + 415 + + + 225 + 421 + + + + + buttonBox + accepted() + ConfigDialog + accept() + + + 603 + 422 - 360 - 289 + 141 + 414 diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index c31a5d9d1..b43c65aaf 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -342,15 +342,13 @@ void MainWindow::writeSettings() void MainWindow::showSettings() { m_confDialog = new ConfigDialog(this); - if (m_confDialog->exec() == QDialog::Accepted) - { - readSettings(); - m_playlist->readSettings(); - TextScroller::getPointer()->readSettings(); - m_visMenu->updateActions(); - m_skin->reloadSkin(); - Dock::instance()->updateDock(); - } + m_confDialog->exec(); + readSettings(); + m_playlist->readSettings(); + TextScroller::getPointer()->readSettings(); + m_visMenu->updateActions(); + m_skin->reloadSkin(); + Dock::instance()->updateDock(); delete m_confDialog; } diff --git a/src/ui/pixmapwidget.cpp b/src/ui/pixmapwidget.cpp index 2384caaa3..a312a46ae 100644 --- a/src/ui/pixmapwidget.cpp +++ b/src/ui/pixmapwidget.cpp @@ -40,6 +40,7 @@ void PixmapWidget::setPixmap(const QPixmap pixmap) void PixmapWidget::paintEvent (QPaintEvent *e) { + Q_UNUSED(e); QPainter paint(this); paint.drawPixmap(0,0, m_pixmap); } diff --git a/src/ui/pluginitem.cpp b/src/ui/pluginitem.cpp index a4dafba4f..bddcf1892 100644 --- a/src/ui/pluginitem.cpp +++ b/src/ui/pluginitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -35,152 +36,143 @@ #include "pluginitem.h" -/*Input*/ -InputPluginItem::InputPluginItem(QObject *parent, DecoderFactory *fact) - : QObject(parent) +PluginItem::PluginItem(QTreeWidgetItem *parent, DecoderFactory *factory, const QString &path) + : QTreeWidgetItem(parent, QStringList() << factory->properties().name << path.section('/',-1), DECODER) { - m_factory = fact; + setCheckState(0, Decoder::isEnabled(factory) ? Qt::Checked : Qt::Unchecked); + m_has_about = factory->properties().hasAbout; + m_has_config = factory->properties().hasSettings; + m_factory = factory; } -InputPluginItem::~InputPluginItem() -{} - -bool InputPluginItem::isSelected() -{ - return Decoder::isEnabled(m_factory); -} - -DecoderFactory* InputPluginItem::factory() -{ - return m_factory; -} - -void InputPluginItem::setSelected(bool select) -{ - Decoder::setEnabled(m_factory, select); -} - -/*Engines*/ -EnginePluginItem::EnginePluginItem(QObject *parent, EngineFactory *fact) - : QObject(parent) -{ - m_factory = fact; -} - -EnginePluginItem::~EnginePluginItem() -{} - -bool EnginePluginItem::isSelected() -{ - return AbstractEngine::isEnabled(m_factory); -} - -EngineFactory* EnginePluginItem::factory() -{ - return m_factory; -} - -void EnginePluginItem::setSelected(bool select) -{ - AbstractEngine::setEnabled(m_factory, select); -} - -/*Output*/ -OutputPluginItem::OutputPluginItem(QObject *parent, OutputFactory *fact): QObject(parent) -{ - m_factory = fact; -} - - -OutputPluginItem::~OutputPluginItem() -{} - -void OutputPluginItem::select() -{ - Output::setCurrentFactory(m_factory); -} - -bool OutputPluginItem::isSelected() -{ - return Output::currentFactory() == m_factory; -} - -OutputFactory *OutputPluginItem::factory() -{ - return m_factory; -} - -/*Visual*/ -VisualPluginItem::VisualPluginItem(QObject *parent, VisualFactory *fact): QObject(parent) -{ - m_factory = fact; -} - - -VisualPluginItem::~VisualPluginItem() -{} - -void VisualPluginItem::select(bool on) -{ - Visual::setEnabled(m_factory, on); -} - -bool VisualPluginItem::isSelected() +PluginItem::PluginItem(QTreeWidgetItem *parent, EngineFactory *factory, const QString &path) + : QTreeWidgetItem(parent, QStringList() << factory->properties().name << path.section('/',-1), ENGINE) { - return Visual::isEnabled(m_factory); + setCheckState(0, AbstractEngine::isEnabled(factory) ? Qt::Checked : Qt::Unchecked); + m_has_about = factory->properties().hasAbout; + m_has_config = factory->properties().hasSettings; + m_factory = factory; } -VisualFactory *VisualPluginItem::factory() -{ - return m_factory; -} - -/*Effect*/ -EffectPluginItem::EffectPluginItem(QObject *parent, EffectFactory *fact): QObject(parent) -{ - m_factory = fact; -} - - -EffectPluginItem::~EffectPluginItem() -{} - -void EffectPluginItem::select(bool on) +PluginItem::PluginItem(QTreeWidgetItem *parent, EffectFactory *factory, const QString &path) + : QTreeWidgetItem(parent, QStringList() << factory->properties().name << path.section('/',-1), EFFECT) { - Effect::setEnabled(m_factory, on); + setCheckState(0, Effect::isEnabled(factory) ? Qt::Checked : Qt::Unchecked); + m_has_about = factory->properties().hasAbout; + m_has_config = factory->properties().hasSettings; + m_factory = factory; } -bool EffectPluginItem::isSelected() +PluginItem::PluginItem(QTreeWidgetItem *parent, VisualFactory *factory, const QString &path) + : QTreeWidgetItem(parent, QStringList() << factory->properties().name << path.section('/',-1), VISUAL) { - return Effect::isEnabled(m_factory); + setCheckState(0, Visual::isEnabled(factory) ? Qt::Checked : Qt::Unchecked); + m_has_about = factory->properties().hasAbout; + m_has_config = factory->properties().hasSettings; + m_factory = factory; +} + +PluginItem::PluginItem(QTreeWidgetItem *parent, GeneralFactory *factory, const QString &path) + : QTreeWidgetItem(parent, QStringList() << factory->properties().name << path.section('/',-1), GENERAL) +{ + setCheckState(0, General::isEnabled(factory) ? Qt::Checked : Qt::Unchecked); + m_has_about = factory->properties().hasAbout; + m_has_config = factory->properties().hasSettings; + m_factory = factory; +} + +PluginItem::~PluginItem() +{ + +} + +bool PluginItem::hasAbout() const +{ + return m_has_about; +} +bool PluginItem::hasSettings() const +{ + return m_has_config; +} + +void PluginItem::showAbout(QWidget *parent) +{ + switch(type()) + { + case PluginItem::TRANSPORT: + //dynamic_cast(m_factory) + break; + case PluginItem::DECODER: + static_cast(m_factory)->showAbout(parent); + break; + case PluginItem::ENGINE: + static_cast(m_factory)->showAbout(parent); + break; + case PluginItem::EFFECT: + static_cast(m_factory)->showAbout(parent); + break; + case PluginItem::VISUAL: + static_cast(m_factory)->showAbout(parent); + break; + case PluginItem::GENERAL: + static_cast(m_factory)->showAbout(parent); + break; + default: + ; + } + +} + +void PluginItem::showSettings(QWidget *parent) +{ + switch(type()) + { + case PluginItem::TRANSPORT: + //dynamic_cast(m_factory) + break; + case PluginItem::DECODER: + static_cast(m_factory)->showSettings (parent); + break; + case PluginItem::ENGINE: + static_cast(m_factory)->showSettings (parent); + break; + case PluginItem::EFFECT: + static_cast(m_factory)->showSettings (parent); + break; + case PluginItem::VISUAL: + Visual::showSettings(static_cast(m_factory), parent); + break; + case PluginItem::GENERAL: + GeneralHandler::instance()->showSettings(static_cast(m_factory), parent); + break; + default: + ; + } +} + +void PluginItem::setEnabled(bool enabled) +{ + switch(type()) + { + case PluginItem::TRANSPORT: + //dynamic_cast(m_factory) + break; + case PluginItem::DECODER: + Decoder::setEnabled(static_cast(m_factory), enabled); + break; + case PluginItem::ENGINE: + AbstractEngine::setEnabled(static_cast(m_factory), enabled); + break; + case PluginItem::EFFECT: + Effect::setEnabled(static_cast(m_factory), enabled); + break; + case PluginItem::VISUAL: + Visual::setEnabled(static_cast(m_factory), enabled); + break; + case PluginItem::GENERAL: + GeneralHandler::instance()->setEnabled(static_cast(m_factory), enabled); + break; + default: + ; + } } - -EffectFactory *EffectPluginItem::factory() -{ - return m_factory; -} - -/*General*/ -GeneralPluginItem::GeneralPluginItem(QObject *parent, GeneralFactory *fact): QObject(parent) -{ - m_factory = fact; -} - -GeneralPluginItem::~GeneralPluginItem() -{} - -void GeneralPluginItem::select(bool on) -{ - GeneralHandler::instance()->setEnabled(m_factory, on); -} - -bool GeneralPluginItem::isSelected() -{ - return General::isEnabled(m_factory); -} - -GeneralFactory *GeneralPluginItem::factory() -{ - return m_factory; -} - diff --git a/src/ui/pluginitem.h b/src/ui/pluginitem.h index 80dfc8887..3931b88c2 100644 --- a/src/ui/pluginitem.h +++ b/src/ui/pluginitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -20,12 +20,13 @@ #ifndef PLUGINITEM_H #define PLUGINITEM_H -#include +#include /** @author Ilya Kotov */ +class QWidget; class DecoderFactory; class EngineFactory; class OutputFactory; @@ -33,115 +34,38 @@ class VisualFactory; class EffectFactory; class GeneralFactory; -class InputPluginItem : public QObject +class PluginItem : public QTreeWidgetItem { - Q_OBJECT public: - InputPluginItem(QObject *parent, DecoderFactory *fact); - ~InputPluginItem(); + PluginItem(QTreeWidgetItem *parent, DecoderFactory *factory, const QString &path); + PluginItem(QTreeWidgetItem *parent, EngineFactory *factory, const QString &path); + PluginItem(QTreeWidgetItem *parent, EffectFactory *factory, const QString &path); + PluginItem(QTreeWidgetItem *parent, VisualFactory *factory, const QString &path); + PluginItem(QTreeWidgetItem *parent, GeneralFactory *factory, const QString &path); + ~PluginItem(); + + enum PluginType + { + TRANSPORT = QTreeWidgetItem::UserType, + DECODER, + ENGINE, + EFFECT, + VISUAL, + GENERAL + }; + + bool hasAbout() const; + bool hasSettings() const; + void showAbout(QWidget *parent); + void showSettings(QWidget *parent); + void setEnabled(bool enabled); - bool isSelected(); - DecoderFactory * factory(); - -public slots: - void setSelected(bool); - -private: - DecoderFactory *m_factory; - -}; - -class EnginePluginItem : public QObject -{ - Q_OBJECT -public: - EnginePluginItem(QObject *parent, EngineFactory *fact); - - ~EnginePluginItem(); - - bool isSelected(); - EngineFactory *factory(); - -public slots: - void setSelected(bool); - -private: - EngineFactory *m_factory; - -}; - -class OutputPluginItem : public QObject -{ - Q_OBJECT -public: - OutputPluginItem(QObject *parent, OutputFactory *fact); - - ~OutputPluginItem(); - - bool isSelected(); - OutputFactory * factory(); - -public slots: - void select(); - -private: - OutputFactory *m_factory; - -}; - -class VisualPluginItem : public QObject -{ - Q_OBJECT -public: - VisualPluginItem(QObject *parent, VisualFactory *fact); - - ~VisualPluginItem(); - - bool isSelected(); - VisualFactory * factory(); - -public slots: - void select(bool); - -private: - VisualFactory *m_factory; -}; - -class EffectPluginItem : public QObject -{ - Q_OBJECT -public: - EffectPluginItem(QObject *parent, EffectFactory *fact); - - ~EffectPluginItem(); - - bool isSelected(); - EffectFactory * factory(); - -public slots: - void select(bool); - -private: - EffectFactory *m_factory; -}; - -class GeneralPluginItem : public QObject -{ - Q_OBJECT -public: - GeneralPluginItem(QObject *parent, GeneralFactory *fact); - - ~GeneralPluginItem(); - - bool isSelected(); - GeneralFactory * factory(); - -public slots: - void select(bool); private: - GeneralFactory *m_factory; + bool m_has_about; + bool m_has_config; + void *m_factory; }; #endif diff --git a/src/ui/translations/qmmp_cs.ts b/src/ui/translations/qmmp_cs.ts index fc0efba0b..00b94d6d1 100644 --- a/src/ui/translations/qmmp_cs.ts +++ b/src/ui/translations/qmmp_cs.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Povoleno - - - - - - - + Description Popis - - - - - + Filename Soubor - + Artist Umělec - - + + Album Album - + Track Stopa - + Disabled Vypnuto - + + Decoders + + + + + Engines + + + + Title Název - + Track number Číslo stopy - + Two-digit track number Dvoumístné číslo stopy - + Disc number Číslo disku - + Condition Stav - + Composer Skladatel - + File name Název souboru - + File path Cesta k souboru - + Genre Žánr - + Year Rok - + Comment Poznámka @@ -328,7 +321,7 @@ ??? - + Replay Gain Zisk při přehrávání @@ -406,100 +399,92 @@ + Preferences Nastavení - + + Information Informace - - Input - Vstup - - - - Output - Výstup - - - + Compatibility Kompatibilita - + Openbox compatibility Kompatibilita s Openbox - + Metacity compatibility Kompatibilita s Metacity - + Cover Image Retrieve Získat obrázek obalu - + Use separate image files - + Include files: Zahrnout soubory: - + Exclude files: Vynechat soubory: - + Recursive search depth: Hloubka rekurzivního hledání: - + Replay Gain mode: Režim úpravy zisku při přehrávání: - + Preamp: Předzesílení: - - + + dB dB - + Default gain: Výchozí zisk: - + Use peak info to prevent clipping Použít informaci o vrcholu k zabránění ořezu - - 16-bit output + + Output: - - Close - Zavřít + + 16-bit output + @@ -507,93 +492,93 @@ Síť - + File Dialog Souborový dialog - + Proxy Proxy - + Enable proxy usage Povolit používání proxy - + Proxy host name: Adresa proxy: - + Proxy port: Port proxy: - + Use authentication with proxy Použít autorizaci pro proxy - + Proxy user name: Uživatelské jméno: - + Proxy password: Heslo: - + Archived skin Sbalené téma - + Unarchived skin Rozbalené téma - + Visualization Vizualizace - + Effects Efekty - + General Obecné - + Audio Zvuk - + Use software volume control Používat softwarové ovládání hlasitosti - + Visibility Control Viditelnost - + Hide on close Skrýt při zavření - + Start hidden Spustit skryté @@ -608,12 +593,12 @@ Převést %20 na mezery - + Select Skin Files Vybrat soubory s tématy - + Skin files Soubory s tématy @@ -974,118 +959,118 @@ Vyberte jeden či více souborů k otevření - + &Play Pře&hrát - + X X - + &Pause Pau&za - + C C - + &Stop &Stop - + V V - + &Previous &Předchozí - + Z Z - + &Next &Další - + B B - + &Jump To File Přeskočit na soubo&r - + J J - + &Settings &Nastavení - + Ctrl+P Ctrl+P - + &About O &aplikaci - + &Exit U&končit - + Ctrl+Q Ctrl+Q - - + + Playlist Files Seznamy skladeb - + Open Playlist Načíst seznam skladeb - + Save Playlist Uložit seznam skladeb - + Space Mezerník - + &About Qt O knihovně &Qt - + &Play/Pause &Přehrát/Pauza @@ -1095,37 +1080,37 @@ Všechny podporované formáty - + &Repeat Track &Opakovat stopu - + &Shuffle Za&míchat - + R O - + Ctrl+R Ctrl+R - + S M - + &Repeat Playlist &Opakovat seznam skladeb - + Tools Nástroje @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Vizualizace diff --git a/src/ui/translations/qmmp_de.ts b/src/ui/translations/qmmp_de.ts index 42180ddff..53a91c8fc 100644 --- a/src/ui/translations/qmmp_de.ts +++ b/src/ui/translations/qmmp_de.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Aktiviert - - - - - - - + Description Beschreibung - - - - - + Filename Dateiname - + Artist Interpret - - + + Album Album - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title Titel - + Track number Stücknummer - + Two-digit track number Zweistellige Stücknummer - + Disc number CD-Nummer - + Condition - + Genre Genre - + Composer Komponist - + File name Dateiname - + File path Dateipfad - + Year Jahr - + Comment Kommentar @@ -328,7 +321,7 @@ ??? - + Replay Gain @@ -406,100 +399,92 @@ + Preferences Konfiguration - + + Information Information - - Input - Eingabe - - - - Output - Ausgabe - - - + Compatibility Kompatibilität - + Openbox compatibility Openbox-Kompatibilität - + Metacity compatibility Metacity-Kompatibilität - + Cover Image Retrieve - + Use separate image files - + Include files: - + Exclude files: - + Recursive search depth: - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - - 16-bit output + + Output: - - Close - Schließen + + 16-bit output + @@ -507,93 +492,93 @@ Verbindung - + File Dialog Datei-Dialog - + Proxy Proxyserver - + Enable proxy usage Proxyserver verwenden - + Proxy host name: Name des Proxyservers: - + Proxy port: Port: - + Use authentication with proxy Authentisierung verwenden - + Proxy user name: Benutzername: - + Proxy password: Passwort: - + Archived skin Archiviertes Design - + Unarchived skin Nicht archiviertes Design - + Visualization Visualisierung - + Effects Effekte - + General Sonstige - + Audio Audio - + Use software volume control Softwaregesteuerte Lautstärkeregelung - + Visibility Control Tray-Steuerung - + Hide on close Beim Schließen in den Systemabschnitt der Kontrollleiste minimieren - + Start hidden Minimiert starten @@ -608,12 +593,12 @@ %20 in Leerzeichen umwandeln - + Select Skin Files Design-Dateien auswählen - + Skin files Design-Dateien @@ -974,118 +959,118 @@ Dateien hinzufügen - + &Play &Wiedergabe - + X X - + &Pause &Pause - + C C - + &Stop &Stopp - + V V - + &Previous &Vorheriger Titel - + Z Z - + &Next &Nächster Titel - + B B - + &Jump To File Springe zu &Titel - + J J - + &Settings &Einstellungen - + Ctrl+P Strg+P - + &About Ü&ber - + &Exit Be&enden - + Ctrl+Q Strg+Q - - + + Playlist Files Wiedergabelisten - + Open Playlist Wiedergabeliste öffnen - + Save Playlist Wiedergabeliste speichern - + Space Leertaste - + &About Qt Übe&r Qt - + &Play/Pause Wieder&gabe/Pause @@ -1095,37 +1080,37 @@ Alle unterstützten Formate - + &Repeat Track Tite&l wiederholen - + &Shuffle &Zufallswiedergabe - + R R - + Ctrl+R Strg+R - + S S - + &Repeat Playlist W&iedergabeliste wiederholen - + Tools Werkzeuge @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Visualisierung diff --git a/src/ui/translations/qmmp_it.ts b/src/ui/translations/qmmp_it.ts index 1f285c8e7..77605e30e 100644 --- a/src/ui/translations/qmmp_it.ts +++ b/src/ui/translations/qmmp_it.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Attivo - - - - - - - + Description Descrizione - - - - - + Filename File - + Artist Interprete - - + + Album Album - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title Titolo - + Track number Traccia n° - + Two-digit track number Traccia n° a due cifre - + Disc number Disco n° - + Condition Condizione - + Genre Genere - + Composer Compositore - + File name Nome file - + File path Percorso file - + Year Anno - + Comment Commento @@ -333,24 +326,16 @@ Title format: Formato del titolo : - - - Input - Entrata - - - - Output - Uscita - + Preferences Impostazioni preferite - + + Information Informazioni @@ -376,22 +361,17 @@ Avanzato - + 16-bit output - - Close - Chiudi - - - + Archived skin Tema archiviato - + Unarchived skin Tema non archiviato @@ -401,33 +381,33 @@ Connettività - + Visualization Visualizzazione - + Effects Effetti - + General Generale - + File Dialog Menu brani - + Audio Audio - + Replay Gain Guadagno riesecuzione @@ -477,123 +457,128 @@ Personalizza - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control Utilizza il controllo volume del programma - + Visibility Control Controllo dell'aspetto - + Hide on close Nascondi alla chiusura - + Start hidden Avvia nascosto - + Compatibility Compatibilità - + Openbox compatibility Compatibilità openbox - + Metacity compatibility Compatibilità Metacity - + Cover Image Retrieve Trova immagine copertina - + Use separate image files - + Include files: Includi i file: - + Exclude files: Escludi i file: - + Recursive search depth: Profondità ricerca ricorsiva: - + Proxy Proxy - + Enable proxy usage Attiva il proxy - + Proxy host name: Nome del server : - + Proxy port: Porta del server : - + Use authentication with proxy Usa autenticazione con il proxy - + Proxy user name: Utente: - + Proxy password: Password : @@ -608,12 +593,12 @@ Converti il carattere « %20 » in spazi - + Select Skin Files Seleziona aspetto - + Skin files Aspetto @@ -974,118 +959,118 @@ Seleziona uno o più brani da aprire - + &Play &Esegui - + X X - + &Pause &Pausa - + C C - + &Stop &Arresta - + V V - + &Previous &Precedente - + Z Z - + &Next &Successivo - + B B - + &Jump To File &Vai al brano - + J J - + &Settings &Configurazione - + Ctrl+P Ctrl+P - + &Exit &Esci - + Ctrl+Q Ctrl+Q - + Open Playlist Apri lista di brani - + Save Playlist Salva lista di brani - + &About &Informazioni - - + + Playlist Files Brani della lista - + Space Spazio - + &About Qt &Informazioni su Qt - + &Play/Pause &Esegui / Pausa @@ -1095,37 +1080,37 @@ Elenco di tutti i tipi di flusso accettati - + &Repeat Track &Ripeti brano - + &Shuffle &Ordine casuale - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist &Ripeti lista brani - + Tools Strumenti @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Visualizzazione diff --git a/src/ui/translations/qmmp_lt.ts b/src/ui/translations/qmmp_lt.ts index bdcb070b7..b41314f54 100644 --- a/src/ui/translations/qmmp_lt.ts +++ b/src/ui/translations/qmmp_lt.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Įjungtas - - - - - - - + Description Aprašymas - - - - - + Filename Bylos pavadinimas - + Artist Atlikėjas - - + + Album Albumas - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title Pavadinimas - + Track number Takelio numeris - + Two-digit track number Dviejų skaičių takelio numeris - + Disc number Disko numeris - + Condition Būklė - + Composer Autorius - + File name Bylos pavadinimas - + File path Bylos kelias - + Genre Žanras - + Year Metai - + Comment Komentaras @@ -333,24 +326,16 @@ Title format: Pavadinimo formatas: - - - Input - Įvestis - - - - Output - Išvestis - + Preferences Nustatymai - + + Information Informacija @@ -376,22 +361,17 @@ Papildomi - + 16-bit output - - Close - Užverti - - - + Archived skin Suspausta tema - + Unarchived skin Išskleista tema @@ -401,33 +381,33 @@ Tinklas - + Visualization Vizualizacija - + Effects Efektai - + General Bendri - + File Dialog Pasirinkimo langas - + Audio Audio - + Replay Gain Neįsivaizduoju kaip verst @@ -478,123 +458,128 @@ Nustatyti - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control Naudoti programinį garso valdymą - + Visibility Control Matomumo valdymas - + Hide on close Paslėpti išjungus - + Start hidden Įjungti paslėptą - + Compatibility Suderinamumas - + Openbox compatibility Openbox suderinamumas - + Metacity compatibility Metacity suderinamumas - + Cover Image Retrieve Parsiųsti cd viršelį - + Use separate image files - + Include files: Įtraukti bylas - + Exclude files: Išskirti bylas - + Recursive search depth: Rekursinės paieškos gylis - + Proxy Proxy - + Enable proxy usage Įjungti proxy palaikymą - + Proxy host name: Proxy serveris: - + Proxy port: Proxy portas: - + Use authentication with proxy Naudoti proxy autentifikavimą - + Proxy user name: Proxy vartotojo vardas: - + Proxy password: Proxy slaptažodis: @@ -609,12 +594,12 @@ Paversti %20 į tarpus - + Select Skin Files Pasirinkti temų bylas - + Skin files Temų bylos @@ -975,118 +960,118 @@ Pasirinkite vieną ar kelias bylas atvėrimui - + &Play &Groti - + X - + &Pause &Pristabdyti - + C - + &Stop &Sustabdyti - + V - + &Previous &Ankstesnis - + Z - + &Next &Sekantis - + B - + &Jump To File &Pereiti prie bylos - + J - + &Settings &Nustatymai - + Ctrl+P - + &Exit &Išeiti - + Ctrl+Q - + Open Playlist Atverti grojaraštį - + Save Playlist Išsaugoti grojaraštį - + &About &Apie - - + + Playlist Files Grojaraščio bylos - + Space - + &About Qt &Apie Qt - + &Play/Pause &Groti/Pristabdyti @@ -1096,37 +1081,37 @@ Palaikomi bylų tipai - + &Repeat Track &Kartoti takelį - + &Shuffle &Atsitiktine tvarka - + R - + Ctrl+R - + S - + &Repeat Playlist &Kartoti grojaraštį - + Tools Įrankiai @@ -1597,7 +1582,7 @@ VisualMenu - + Visualization Vizualizacija diff --git a/src/ui/translations/qmmp_pl_PL.ts b/src/ui/translations/qmmp_pl_PL.ts index 52cf346b0..f612cf1d1 100644 --- a/src/ui/translations/qmmp_pl_PL.ts +++ b/src/ui/translations/qmmp_pl_PL.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Włączone - - - - - - - + Description Opis - - - - - + Filename Nazwa pliku - + Artist Artysta - - + + Album Album - + Track Utwór - + Disabled Wyłączone - + + Decoders + + + + + Engines + + + + Title Tytuł - + Track number Numer utworu - + Two-digit track number Dwuznakowy numer utworu - + Disc number Numer albumu - + Condition Warunek - + Genre Gatunek - + Composer Kompozytor - + File name Nazwa pliku - + File path Lokalizacja - + Year Rok - + Comment Komentarz @@ -333,24 +326,16 @@ Title format: Format tytułu: - - - Input - Wejście - - - - Output - Wyjście - + Preferences Ustawienia - + + Information Informacje @@ -376,22 +361,17 @@ Zaawansowane - + 16-bit output - - Close - Zamknij - - - + Archived skin Skompresowana skórka - + Unarchived skin Niekompresowana skórka @@ -401,33 +381,33 @@ Sieć - + Visualization Wizualizacje - + Effects Efekty - + General Ogólne - + File Dialog Okno dialogowe - + Audio Dźwięk - + Replay Gain @@ -477,123 +457,128 @@ Dostosuj - + Replay Gain mode: Tryb Replay Gain: - + Preamp: - - + + dB - + Default gain: Domyślne wzmocnienie: - + Use peak info to prevent clipping Użyj informacji peak by zapobiec "klipnięciom" - + + Output: + + + + Use software volume control Użyj programowej regulacji głośności - + Visibility Control Sterowanie - + Hide on close Zminimalizuj przy zamykaniu - + Start hidden Uruchom zminimalizowany - + Compatibility Kompatybilność - + Openbox compatibility Zgodność z Openbox - + Metacity compatibility Zgodność z Metacity - + Cover Image Retrieve Pobieranie okładek - + Use separate image files - + Include files: Użyj plików: - + Exclude files: Wyłącz pliki: - + Recursive search depth: Głębokość rekursywnego przeszukiwania: - + Proxy Proxy - + Enable proxy usage Włącz proxy - + Proxy host name: Nazwa hosta proxy: - + Proxy port: Port proxy: - + Use authentication with proxy Użyj autoryzacji z proxy - + Proxy user name: Nazwa użytkownika: - + Proxy password: Hasło: @@ -608,12 +593,12 @@ Konwertuj sekwencje %20 na spacje - + Select Skin Files Wybierz skórę - + Skin files Pliki skór @@ -974,118 +959,118 @@ Wybierz jeden lub więcej plików do otwarcia - + &Play &Odtwarzaj - + X X - + &Pause &Wstrzymaj - + C C - + &Stop &Zatrzymaj - + V V - + &Previous &Poprzedni - + Z Z - + &Next &Następny - + B B - + &Jump To File &Skocz do pliku - + J J - + &Settings &Ustawienia - + Ctrl+P Ctrl+P - + &Exit &Wyjście - + Ctrl+Q Ctrl+Q - + Open Playlist Otwórz listę odtwarzania - + Save Playlist Zapisz listę odtwarzania - + &About &O programie - - + + Playlist Files Pliki listy odtwarzania - + Space - + &About Qt &O Qt - + &Play/Pause &Odtwarzaj/Wstrzymaj @@ -1095,37 +1080,37 @@ Wszystkie wspierane formaty - + &Repeat Track &Powtórz utwór - + &Shuffle &Losowo - + R - + Ctrl+R - + S - + &Repeat Playlist Powtó&rz listę odtwarzania - + Tools Narzędzia @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Wizualizacja diff --git a/src/ui/translations/qmmp_pt_BR.ts b/src/ui/translations/qmmp_pt_BR.ts index 0ff300ed2..8499f647e 100644 --- a/src/ui/translations/qmmp_pt_BR.ts +++ b/src/ui/translations/qmmp_pt_BR.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Ligado - - - - - - - + Description Descrição - - - - - + Filename Nome do Arquivo - + Artist Artista - - + + Album Álbum - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title Título - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre Gênero - + Composer - + File name - + File path - + Year Ano - + Comment Comentário @@ -333,24 +326,16 @@ Title format: Tipo de Formato: - - - Input - Entrada - - - - Output - Saída - + Preferences Preferências - + + Information Informações @@ -376,22 +361,17 @@ Avançado - + 16-bit output - - Close - Fechar - - - + Archived skin - + Unarchived skin @@ -401,33 +381,33 @@ - + Visualization - + Effects - + General - + File Dialog - + Audio - + Replay Gain @@ -477,123 +457,128 @@ - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control - + Visibility Control - + Hide on close - + Start hidden - + Compatibility - + Openbox compatibility - + Metacity compatibility - + Cover Image Retrieve - + Use separate image files - + Include files: - + Exclude files: - + Recursive search depth: - + Proxy - + Enable proxy usage - + Proxy host name: - + Proxy port: - + Use authentication with proxy - + Proxy user name: - + Proxy password: @@ -608,12 +593,12 @@ - + Select Skin Files - + Skin files @@ -974,118 +959,118 @@ Selecionar um ou mais arquivos - + &Play Tocar - + X - + &Pause Pausar - + C - + &Stop Parar - + V - + &Previous Anterior - + Z - + &Next Próximo - + B - + &Jump To File Pular para arquivo - + J - + &Settings Configurações - + Ctrl+P - + &Exit Sair - + Ctrl+Q - + Open Playlist Abrir Playlist - + Save Playlist Salvar Playlist - + &About &Sobre - - + + Playlist Files ФArquivos de lista de músicas - + Space - + &About Qt - + &Play/Pause @@ -1095,37 +1080,37 @@ - + &Repeat Track - + &Shuffle - + R - + Ctrl+R - + S - + &Repeat Playlist - + Tools @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization diff --git a/src/ui/translations/qmmp_ru.ts b/src/ui/translations/qmmp_ru.ts index e4b485510..4c00181bd 100644 --- a/src/ui/translations/qmmp_ru.ts +++ b/src/ui/translations/qmmp_ru.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Включён - - - - - - - + Description Описание - - - - - + Filename Имя файла - + Artist Исполнитель - - + + Album Альбом - + Track Дорожка - + Disabled Отключено - + + Decoders + Декодеры + + + + Engines + Внешние проигрыватели + + + Title Название - + Track number Номер трека - + Two-digit track number 2-x разрядный номер трека - + Disc number Номер диска - + Condition Условие - + Genre Жанр - + Composer Композитор - + File name Имя файла - + File path Путь к файлу - + Year Год - + Comment Комментарий @@ -333,24 +326,16 @@ Title format: Формат названия: - - - Input - Ввод - - - - Output - Вывод - + Preferences Настройки - + + Information Информация @@ -376,22 +361,17 @@ Дополнительно - + 16-bit output 16-битный вывод - - Close - Закрыть - - - + Archived skin Упакованная тема - + Unarchived skin Распакованная тема @@ -401,33 +381,33 @@ Сеть - + Visualization Визуализация - + Effects Эффекты - + General Общие - + File Dialog Файловый диалог - + Audio Аудио - + Replay Gain Выравнивание громкости (Replay Gain) @@ -477,123 +457,128 @@ Настроить - + Replay Gain mode: Режим Replay Gain: - + Preamp: Предусиление: - - + + dB дБ - + Default gain: Усиление по умолчанию: - + Use peak info to prevent clipping Использовать пиковое значение для предотвращения срезания - + + Output: + Вывод: + + + Use software volume control Использовать программную регулировку громкости - + Visibility Control Управление видимостью - + Hide on close Скрывать при закрытии - + Start hidden Запускать скрытым - + Compatibility Совместимость - + Openbox compatibility Совместимость с Openbox - + Metacity compatibility Совместимость с Metacity - + Cover Image Retrieve Поиск обложки альбома - + Use separate image files Использовать отдельные файлы с изображениями - + Include files: Включить файлы: - + Exclude files: Исключить файлы: - + Recursive search depth: Глубина рекурсивного поиска: - + Proxy Прокси - + Enable proxy usage Использовать прокси - + Proxy host name: Прокси сервер: - + Proxy port: Прокси порт: - + Use authentication with proxy Использовать авторизацию на прокси - + Proxy user name: Имя пользователя прокси: - + Proxy password: Пароль прокси: @@ -608,12 +593,12 @@ Преобразовывать %20 в пробел - + Select Skin Files Выберите файлы обложек - + Skin files Файлы обложек @@ -974,118 +959,118 @@ Выберите один или несколько файлов - + &Play &Воспроизвести - + X - + &Pause &Приостановить - + C - + &Stop &Стоп - + V - + &Previous &Предыдущий фрагмент - + Z - + &Next &Следующий фрагмент - + B - + &Jump To File &Перейти к файлу - + J - + &Settings &Настройки - + Ctrl+P - + &Exit &Выход - + Ctrl+Q - + Open Playlist Открыть список - + Save Playlist Сохранить список - + &About &О программе - - + + Playlist Files Файлы списков - + Space - + &About Qt &О библиотеке Qt - + &Play/Pause &Воспр/приост @@ -1095,37 +1080,37 @@ Все форматы - + &Repeat Track &Повторять трек - + &Shuffle &В случайном порядке - + R - + Ctrl+R - + S - + &Repeat Playlist &Повторять список - + Tools Сервис @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Визуализация diff --git a/src/ui/translations/qmmp_tr.ts b/src/ui/translations/qmmp_tr.ts index 6225f052e..910ecf93d 100644 --- a/src/ui/translations/qmmp_tr.ts +++ b/src/ui/translations/qmmp_tr.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Etkinleştirildi - - - - - - - + Description Açıklama - - - - - + Filename Dosya adı - + Artist Sanatçı - - + + Album Albüm - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title Başlık - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre Tarz - + Composer - + File name - + File path - + Year Yıl - + Comment Yorum @@ -333,24 +326,16 @@ Title format: Başlık formatı: - - - Input - Giriş - - - - Output - Çıkış - + Preferences Tercihler - + + Information Bilgi @@ -376,22 +361,17 @@ Gelişmiş - + 16-bit output - - Close - Kapat - - - + Archived skin Arşivlenmiş kabuk - + Unarchived skin Arşivlenmemiş kabuk @@ -401,33 +381,33 @@ Bağlanırlık - + Visualization Görsellik - + Effects Efektler - + General Genel - + File Dialog Dosya Diyaloğu - + Audio Ses - + Replay Gain @@ -477,123 +457,128 @@ - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control Yazılımsal ses kontrolünü kullan - + Visibility Control Görünürlük Kontrolü - + Hide on close Kapatınca saklan - + Start hidden Gizli başlat - + Compatibility Uyumluluk - + Openbox compatibility Openbox uyumluluğu - + Metacity compatibility - + Cover Image Retrieve - + Use separate image files - + Include files: - + Exclude files: - + Recursive search depth: - + Proxy Vekil sunucu - + Enable proxy usage Vekil sunucu kullanımını etkinleştir - + Proxy host name: Vekil sunucu adı: - + Proxy port: Vekil sunucu portu: - + Use authentication with proxy Vekil sunucu yetkilendirmesi kullan - + Proxy user name: Vekil sunucu kullanıcı adı: - + Proxy password: Vekil sunucu parolası: @@ -608,12 +593,12 @@ %20 yi boşluğa çevir - + Select Skin Files Kabuk Dosyası Seç - + Skin files Kabuk dosyaları @@ -974,118 +959,118 @@ Açmak için bir yada daha çok dosya seçin - + &Play &Çal - + X X - + &Pause &Duraklat - + C C - + &Stop &Durdur - + V V - + &Previous &Önceki - + Z Z - + &Next &Sonraki - + B B - + &Jump To File &Parçaya Git - + J J - + &Settings &Ayarlar - + Ctrl+P Ctrl+P - + &Exit &Çıkış - + Ctrl+Q Ctrl+Q - + Open Playlist Çalma Listesini Aç - + Save Playlist Çalma Listesini Kaydet - + &About &Hakkında - - + + Playlist Files Çalma Listesi Dosyaları - + Space Boşluk - + &About Qt &Qt Hakkında - + &Play/Pause &Oynat/Duraklat @@ -1095,37 +1080,37 @@ Tüm Desteklenen Bitstreamler - + &Repeat Track &Parçayı Yinele - + &Shuffle &Rastgele - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist &Çalma Listesini Yinele - + Tools Araçlar @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Görüntüleme diff --git a/src/ui/translations/qmmp_uk_UA.ts b/src/ui/translations/qmmp_uk_UA.ts index b05b79092..c87a1b108 100644 --- a/src/ui/translations/qmmp_uk_UA.ts +++ b/src/ui/translations/qmmp_uk_UA.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - Увімкнено - - - - - - - + Description Пояснення - - - - - + Filename Ім'я файлу - + Artist Виконавець - - + + Album Альбом - + Track Трек - + Disabled Вимкнено - + + Decoders + + + + + Engines + + + + Title Назва - + Track number Номер треку - + Two-digit track number 2- розрядний номер трека - + Disc number Номер диску - + Condition Умова - + Genre Жанр - + Composer Композитор - + File name Ім'я файлу - + File path Шлях файлу - + Year Рік - + Comment Коментар @@ -333,24 +326,16 @@ Title format: Формат назви: - - - Input - Введення - - - - Output - Виведення - + Preferences Налаштування - + + Information Інформація @@ -376,22 +361,17 @@ Додатково - + 16-bit output 16-бітний вивід - - Close - Закрити - - - + Archived skin Упакована тема - + Unarchived skin Розпакована тема @@ -401,33 +381,33 @@ Мережа - + Visualization Візуалізація - + Effects Ефекти - + General Загальне - + File Dialog Файловий діалог - + Audio Звук - + Replay Gain Нормалізація гучності @@ -477,123 +457,128 @@ Налаштувати - + Replay Gain mode: Режим нормалізації гучності: - + Preamp: Преамплітуда: - - + + dB - + Default gain: Нормалізація за умовчанням: - + Use peak info to prevent clipping Використовувати інформацію піків для запобігання відсікання - + + Output: + + + + Use software volume control Використовувати програмний контроль гучності - + Visibility Control Керування видимістю - + Hide on close Ховати при закритті - + Start hidden Запускати схованим - + Compatibility Сумісність - + Openbox compatibility Сумісність з Openbox - + Metacity compatibility Сумісність з Metacity - + Cover Image Retrieve Пошук обладинки альбома - + Use separate image files Використовувати окремі файли зображень - + Include files: Включити файли: - + Exclude files: Виключити файли: - + Recursive search depth: Глибина рекурсивного пошуку: - + Proxy Проксі - + Enable proxy usage Використосувати проксі - + Proxy host name: Сервер проксі: - + Proxy port: Порт проксі: - + Use authentication with proxy Використовувати авторизацію на проксі - + Proxy user name: Ім'я користвача проксі: - + Proxy password: Пароль проксі: @@ -608,12 +593,12 @@ Конвертувати %20 в пробіл - + Select Skin Files Вибрати файли скінів - + Skin files Файли скінів @@ -974,118 +959,118 @@ Виберіть один чи кілька файлів - + &Play &Відтворити - + X - + &Pause &Пауза - + C - + &Stop &Стоп - + V - + &Previous &Назад - + Z - + &Next &Вперед - + B - + &Jump To File &Перейти до файлу - + J - + &Settings &Налаштування - + Ctrl+P - + &Exit &Вихід - + Ctrl+Q - + Open Playlist Відкрити список - + Save Playlist Зберегти список - + &About &Про програму - - + + Playlist Files Файли списків - + Space - + &About Qt &Про Qt - + &Play/Pause &Грати/Пауза @@ -1095,37 +1080,37 @@ Усі формати - + &Repeat Track &Повторити трек - + &Shuffle &Перемішати - + R - + Ctrl+R - + S - + &Repeat Playlist &Повторити список - + Tools Утиліти @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization Візуалізація diff --git a/src/ui/translations/qmmp_zh_CN.ts b/src/ui/translations/qmmp_zh_CN.ts index e5dc8f5a5..cc1e47082 100644 --- a/src/ui/translations/qmmp_zh_CN.ts +++ b/src/ui/translations/qmmp_zh_CN.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - 启用 - - - - - - - + Description 描述 - - - - - + Filename 文件名 - + Artist 艺术家 - - + + Album 专辑 - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title 标题 - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre 流派 - + Composer - + File name - + File path - + Year 年代 - + Comment 备注 @@ -333,24 +326,16 @@ Title format: 标题格式: - - - Input - 输入 - - - - Output - 输出 - + Preferences 参数设置 - + + Information 信息 @@ -376,22 +361,17 @@ 高级 - + 16-bit output - - Close - 关闭 - - - + Archived skin 压缩皮肤 - + Unarchived skin 未压缩皮肤 @@ -401,33 +381,33 @@ 连接 - + Visualization 可视化 - + Effects 特效 - + General 常规 - + File Dialog 文件对话 - + Audio 音频 - + Replay Gain @@ -477,123 +457,128 @@ - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control 使用软设备音量控制 - + Visibility Control 可见性控制 - + Hide on close 关闭时隐藏 - + Start hidden 启动时隐藏 - + Compatibility - + Openbox compatibility - + Metacity compatibility - + Cover Image Retrieve - + Use separate image files - + Include files: - + Exclude files: - + Recursive search depth: - + Proxy 代理 - + Enable proxy usage 启用代理 - + Proxy host name: 主机名: - + Proxy port: 端口: - + Use authentication with proxy 需要身份验证 - + Proxy user name: 用户名: - + Proxy password: 密码: @@ -608,12 +593,12 @@ 转换 %20 为空格 - + Select Skin Files 选择皮肤文件 - + Skin files 皮肤文件 @@ -974,118 +959,118 @@ 选择打开一个或更多文件 - + &Play 播放(&P) - + X X - + &Pause 暂停(&P) - + C C - + &Stop 停止(&S) - + V V - + &Previous 上一曲(&P) - + Z Z - + &Next 下一曲(&N) - + B B - + &Jump To File 跳到文件(&J) - + J J - + &Settings 设置(&S) - + Ctrl+P Ctrl+P - + &Exit 退出(&E) - + Ctrl+Q Ctrl+Q - + Open Playlist 打开播放列表 - + Save Playlist 保存播放列表 - + &About 关于(&A) - - + + Playlist Files 播放列表文件 - + Space 空格 - + &About Qt 关于 Qt (&A) - + &Play/Pause 播放/暂停(&P) @@ -1095,37 +1080,37 @@ 支持的全部文件 - + &Repeat Track 重复音轨(&R) - + &Shuffle 乱序(&S) - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist 重复播放列表(&R) - + Tools 工具 @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization 可视化 diff --git a/src/ui/translations/qmmp_zh_TW.ts b/src/ui/translations/qmmp_zh_TW.ts index 93939cb7d..0d9af999c 100644 --- a/src/ui/translations/qmmp_zh_TW.ts +++ b/src/ui/translations/qmmp_zh_TW.ts @@ -173,105 +173,98 @@ ConfigDialog - - - - - - Enabled - 啟用 - - - - - - - + Description 說明 - - - - - + Filename 檔名 - + Artist 藝術家 - - + + Album 專輯 - + Track - + Disabled - + + Decoders + + + + + Engines + + + + Title 標題 - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre 流派 - + Composer - + File name - + File path - + Year 年代 - + Comment 備註 @@ -333,24 +326,16 @@ Title format: 標題格式: - - - Input - 匯入 - - - - Output - 匯出 - + Preferences 引數設定 - + + Information 資訊 @@ -376,22 +361,17 @@ 進階 - + 16-bit output - - Close - 關閉 - - - + Archived skin 封包皮膚 - + Unarchived skin 未封包皮膚 @@ -401,33 +381,33 @@ 連線 - + Visualization 可視化 - + Effects 特效 - + General 常規 - + File Dialog 檔案對話 - + Audio 聲訊 - + Replay Gain @@ -477,123 +457,128 @@ - + Replay Gain mode: - + Preamp: - - + + dB - + Default gain: - + Use peak info to prevent clipping - + + Output: + + + + Use software volume control 使用軟裝置音量控制 - + Visibility Control 可見性控制 - + Hide on close 關閉時隱藏 - + Start hidden 啟動時隱藏 - + Compatibility - + Openbox compatibility - + Metacity compatibility - + Cover Image Retrieve - + Use separate image files - + Include files: - + Exclude files: - + Recursive search depth: - + Proxy 代理 - + Enable proxy usage 啟用代理 - + Proxy host name: 主機名: - + Proxy port: 通訊埠: - + Use authentication with proxy 需要身份驗證 - + Proxy user name: 用戶名: - + Proxy password: 密碼: @@ -608,12 +593,12 @@ 轉換 %20 為空格 - + Select Skin Files 選取皮膚檔案 - + Skin files 皮膚檔案 @@ -974,118 +959,118 @@ 選取開啟一個或更多檔案 - + &Play 播放(&P) - + X X - + &Pause 暫停(&P) - + C C - + &Stop 停止(&S) - + V V - + &Previous 上一曲(&P) - + Z Z - + &Next 下一曲(&N) - + B B - + &Jump To File 跳到檔案(&J) - + J J - + &Settings 設定(&S) - + Ctrl+P Ctrl+P - + &Exit 結束(&E) - + Ctrl+Q Ctrl+Q - + Open Playlist 開啟播放清單 - + Save Playlist 儲存播放清單 - + &About 關於(&A) - - + + Playlist Files 播放清單檔案 - + Space 空格 - + &About Qt 關於 Qt (&A) - + &Play/Pause 播放/暫停(&P) @@ -1095,37 +1080,37 @@ 支援的全部檔案 - + &Repeat Track 重復音軌(&R) - + &Shuffle 亂序(&S) - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist 重復播放清單(&R) - + Tools 工具 @@ -1596,7 +1581,7 @@ VisualMenu - + Visualization 可視化 diff --git a/src/ui/visualmenu.cpp b/src/ui/visualmenu.cpp index 94a116057..6e5ff2d90 100644 --- a/src/ui/visualmenu.cpp +++ b/src/ui/visualmenu.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Ilya Kotov * + * Copyright (C) 2007-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -26,17 +26,13 @@ #include "pluginitem.h" #include "visualmenu.h" -VisualMenu::VisualMenu(QWidget *parent) - : QMenu(tr("Visualization"), parent) +VisualMenu::VisualMenu(QWidget *parent) : QMenu(tr("Visualization"), parent) { VisualFactory *factory = 0; foreach(factory, *Visual::factories()) { - QAction *act = this->addAction(factory->properties().name); - act->setCheckable (TRUE); - act->setChecked (Visual::isEnabled(factory)); - VisualPluginItem *vi = new VisualPluginItem(this,factory); - connect(act, SIGNAL(toggled(bool)), vi, SLOT(select(bool))); + VisualAction *act = new VisualAction(factory, this); + addAction(act); } } @@ -51,3 +47,17 @@ void VisualMenu::updateActions() actions()[i]->setChecked(Visual::isEnabled(Visual::factories()->at(i))); } } + +VisualAction::VisualAction(VisualFactory *factory, QWidget *parent) : + QAction(factory->properties().name, parent) +{ + setCheckable (TRUE); + setChecked (Visual::isEnabled(factory)); + m_factory = factory; + connect(this, SIGNAL(triggered(bool)), SLOT(select(bool))); +} + +void VisualAction::select(bool select) +{ + Visual::setEnabled(m_factory, select); +} diff --git a/src/ui/visualmenu.h b/src/ui/visualmenu.h index a4833974d..0039c7aaf 100644 --- a/src/ui/visualmenu.h +++ b/src/ui/visualmenu.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Ilya Kotov * + * Copyright (C) 2007-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -21,6 +21,9 @@ #define VISUALMENU_H #include +#include + +class VisualFactory; /** @author Ilya Kotov @@ -35,6 +38,19 @@ public: public slots: void updateActions(); +}; + +class VisualAction : public QAction +{ + Q_OBJECT +public: + VisualAction(VisualFactory *factory, QWidget *parent = 0); + +private slots: + void select(bool); + +private: + VisualFactory *m_factory; }; -- cgit v1.2.3-13-gbd6f