diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/dialogs/AudioPluginDialog.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/dialogs/AudioPluginDialog.cpp')
-rw-r--r-- | src/gui/dialogs/AudioPluginDialog.cpp | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/src/gui/dialogs/AudioPluginDialog.cpp b/src/gui/dialogs/AudioPluginDialog.cpp index 7f54f71..16e4500 100644 --- a/src/gui/dialogs/AudioPluginDialog.cpp +++ b/src/gui/dialogs/AudioPluginDialog.cpp @@ -24,7 +24,7 @@ #include "AudioPluginDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -42,25 +42,25 @@ #include "sound/PluginIdentifier.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qaccel.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <set> namespace Rosegarden { -AudioPluginDialog::AudioPluginDialog(QWidget *parent, +AudioPluginDialog::AudioPluginDialog(TQWidget *parent, AudioPluginManager *aPM, #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *aGM, @@ -86,78 +86,78 @@ AudioPluginDialog::AudioPluginDialog(QWidget *parent, { setHelp("studio-plugins"); - setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Fixed)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + TQSizePolicy::Fixed)); #ifdef HAVE_LIBLO setButtonText(Details, i18n("Editor")); #endif - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *pluginSelectionBox = new QGroupBox + TQGroupBox *pluginSelectionBox = new QGroupBox (1, Horizontal, i18n("Plugin"), vbox); makePluginParamsBox(vbox, 0, 10); - m_pluginCategoryBox = new QHBox(pluginSelectionBox); - new QLabel(i18n("Category:"), m_pluginCategoryBox); + m_pluginCategoryBox = new TQHBox(pluginSelectionBox); + new TQLabel(i18n("Category:"), m_pluginCategoryBox); m_pluginCategoryList = new KComboBox(m_pluginCategoryBox); m_pluginCategoryList->setSizeLimit(20); - QHBox *hbox = new QHBox(pluginSelectionBox); - m_pluginLabel = new QLabel(i18n("Plugin:"), hbox); + TQHBox *hbox = new TQHBox(pluginSelectionBox); + m_pluginLabel = new TQLabel(i18n("Plugin:"), hbox); m_pluginList = new KComboBox(hbox); m_pluginList->setSizeLimit(20); - QToolTip::add + TQToolTip::add (m_pluginList, i18n("Select a plugin from this list.")); - QHBox *h = new QHBox(pluginSelectionBox); + TQHBox *h = new TQHBox(pluginSelectionBox); // top line - m_bypass = new QCheckBox(i18n("Bypass"), h); - QToolTip::add + m_bypass = new TQCheckBox(i18n("Bypass"), h); + TQToolTip::add (m_bypass, i18n("Bypass this plugin.")); - connect(m_bypass, SIGNAL(toggled(bool)), - this, SLOT(slotBypassChanged(bool))); + connect(m_bypass, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotBypassChanged(bool))); - m_insOuts = new QLabel(i18n("<ports>"), h); + m_insOuts = new TQLabel(i18n("<ports>"), h); m_insOuts->setAlignment(AlignRight); - QToolTip::add + TQToolTip::add (m_insOuts, i18n("Input and output port counts.")); - m_pluginId = new QLabel(i18n("<id>"), h); + m_pluginId = new TQLabel(i18n("<id>"), h); m_pluginId->setAlignment(AlignRight); - QToolTip::add + TQToolTip::add (m_pluginId, i18n("Unique ID of plugin.")); - connect(m_pluginList, SIGNAL(activated(int)), - this, SLOT(slotPluginSelected(int))); + connect(m_pluginList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPluginSelected(int))); - connect(m_pluginCategoryList, SIGNAL(activated(int)), - this, SLOT(slotCategorySelected(int))); + connect(m_pluginCategoryList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotCategorySelected(int))); // new line - h = new QHBox(pluginSelectionBox); - m_copyButton = new QPushButton(i18n("Copy"), h); - connect(m_copyButton, SIGNAL(clicked()), - this, SLOT(slotCopy())); - QToolTip::add + h = new TQHBox(pluginSelectionBox); + m_copyButton = new TQPushButton(i18n("Copy"), h); + connect(m_copyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopy())); + TQToolTip::add (m_copyButton, i18n("Copy plugin parameters")); - m_pasteButton = new QPushButton(i18n("Paste"), h); - connect(m_pasteButton, SIGNAL(clicked()), - this, SLOT(slotPaste())); - QToolTip::add + m_pasteButton = new TQPushButton(i18n("Paste"), h); + connect(m_pasteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPaste())); + TQToolTip::add (m_pasteButton, i18n("Paste plugin parameters")); - m_defaultButton = new QPushButton(i18n("Default"), h); - connect(m_defaultButton, SIGNAL(clicked()), - this, SLOT(slotDefault())); - QToolTip::add + m_defaultButton = new TQPushButton(i18n("Default"), h); + connect(m_defaultButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDefault())); + TQToolTip::add (m_defaultButton, i18n("Set to defaults")); populatePluginCategoryList(); @@ -165,7 +165,7 @@ AudioPluginDialog::AudioPluginDialog(QWidget *parent, m_generating = false; - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } #ifdef HAVE_LIBLO @@ -192,8 +192,8 @@ AudioPluginDialog::populatePluginCategoryList() { AudioPluginInstance *inst = m_pluginContainer->getPlugin(m_index); std::set - <QString> categories; - QString currentCategory; + <TQString> categories; + TQString currentCategory; for (PluginIterator i = m_pluginManager->begin(); i != m_pluginManager->end(); ++i) { @@ -227,7 +227,7 @@ AudioPluginDialog::populatePluginCategoryList() m_pluginCategoryList->setCurrentItem(0); for (std::set - <QString>::iterator i = categories.begin(); + <TQString>::iterator i = categories.begin(); i != categories.end(); ++i) { m_pluginCategoryList->insertItem(*i); @@ -247,7 +247,7 @@ AudioPluginDialog::populatePluginList() m_pluginList->insertItem(i18n("(none)")); m_pluginsInList.push_back(0); - QString category; + TQString category; bool needCategory = false; if (m_pluginCategoryList->currentItem() > 0) { @@ -267,7 +267,7 @@ AudioPluginDialog::populatePluginList() // Use this temporary map to ensure that the plugins are sorted // by name when they go into the combobox typedef std::pair<int, AudioPlugin *> PluginPair; - typedef std::map<QString, PluginPair> PluginMap; + typedef std::map<TQString, PluginPair> PluginMap; PluginMap plugins; int count = 0; @@ -280,22 +280,22 @@ AudioPluginDialog::populatePluginList() (!isSynth() && (*i)->isEffect())) { if (needCategory) { - QString cat = ""; + TQString cat = ""; if ((*i)->getCategory()) cat = (*i)->getCategory(); if (cat != category) continue; } - QString name = (*i)->getName(); + TQString name = (*i)->getName(); bool store = true; if (plugins.find(name) != plugins.end()) { // We already have a plugin of this name. If it's a // LADSPA plugin, replace it (this one might be // something better); otherwise leave it alone. - QString id = plugins[name].second->getIdentifier(); - QString type, soname, label; + TQString id = plugins[name].second->getIdentifier(); + TQString type, soname, label; PluginIdentifier::parseIdentifier(id, type, soname, label); if (type != "ladspa") { store = false; @@ -314,7 +314,7 @@ AudioPluginDialog::populatePluginList() for (PluginMap::iterator i = plugins.begin(); i != plugins.end(); ++i) { - QString name = i->first; + TQString name = i->first; if (name.endsWith(" VST")) name = name.left(name.length() - 4); @@ -330,10 +330,10 @@ AudioPluginDialog::populatePluginList() } void -AudioPluginDialog::makePluginParamsBox(QWidget *parent, int portCount, +AudioPluginDialog::makePluginParamsBox(TQWidget *parent, int portCount, int tooManyPorts) { - m_pluginParamsBox = new QFrame(parent); + m_pluginParamsBox = new TQFrame(parent); int columns = 2; if (portCount > tooManyPorts) { @@ -351,7 +351,7 @@ AudioPluginDialog::makePluginParamsBox(QWidget *parent, int portCount, perColumn = 2; } - m_gridLayout = new QGridLayout(m_pluginParamsBox, + m_gridLayout = new TQGridLayout(m_pluginParamsBox, 1, // rows (will expand) columns * perColumn, 5); // margin @@ -381,20 +381,20 @@ AudioPluginDialog::slotPluginSelected(int i) RG_DEBUG << "AudioPluginDialog::::slotPluginSelected - " << "setting up plugin from position " << number << " at menu item " << i << endl; - QString caption = + TQString caption = strtoqstr(m_pluginContainer->getName()) + - QString(" [ %1 ] - ").arg(m_index + 1); + TQString(" [ %1 ] - ").arg(m_index + 1); if (number == 0) { setCaption(caption + i18n("<no plugin>")); m_insOuts->setText(i18n("<ports>")); m_pluginId->setText(i18n("<id>")); - QToolTip::hide(); - QToolTip::remove + TQToolTip::hide(); + TQToolTip::remove (m_pluginList); - QToolTip::add + TQToolTip::add (m_pluginList, i18n("Select a plugin from this list.")); } @@ -402,7 +402,7 @@ AudioPluginDialog::slotPluginSelected(int i) // Destroy old param widgets // - QWidget* parent = dynamic_cast<QWidget*>(m_pluginParamsBox->parent()); + TQWidget* parent = dynamic_cast<TQWidget*>(m_pluginParamsBox->parent()); delete m_pluginParamsBox; m_pluginWidgets.clear(); // The widgets are deleted with the parameter box @@ -424,7 +424,7 @@ AudioPluginDialog::slotPluginSelected(int i) if (portCount > tooManyPorts) { m_gridLayout->addMultiCellWidget( - new QLabel(i18n("This plugin has too many controls to edit here."), + new TQLabel(i18n("This plugin has too many controls to edit here."), m_pluginParamsBox), 1, 1, 0, m_gridLayout->numCols() - 1, Qt::AlignCenter); } @@ -437,13 +437,13 @@ AudioPluginDialog::slotPluginSelected(int i) setCaption(caption + plugin->getName()); m_pluginId->setText(i18n("Id: %1").arg(plugin->getUniqueId())); - QString pluginInfo = plugin->getAuthor() + QString("\n") + + TQString pluginInfo = plugin->getAuthor() + TQString("\n") + plugin->getCopyright(); - QToolTip::hide(); - QToolTip::remove + TQToolTip::hide(); + TQToolTip::remove (m_pluginList); - QToolTip::add + TQToolTip::add (m_pluginList, pluginInfo); std::string identifier = plugin->getIdentifier().data(); @@ -493,7 +493,7 @@ AudioPluginDialog::slotPluginSelected(int i) else m_insOuts->setText(i18n("%1 in, %2 out").arg(ins).arg(outs)); - QString shortName(plugin->getName()); + TQString shortName(plugin->getName()); int parenIdx = shortName.find(" ("); if (parenIdx > 0) { shortName = shortName.left(parenIdx); @@ -511,11 +511,11 @@ AudioPluginDialog::slotPluginSelected(int i) if (plugin) { int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { - m_programLabel = new QLabel(i18n("Program: "), m_pluginParamsBox); + m_programLabel = new TQLabel(i18n("Program: "), m_pluginParamsBox); m_programCombo = new KComboBox(m_pluginParamsBox); m_programCombo->setSizeLimit(20); @@ -525,8 +525,8 @@ AudioPluginDialog::slotPluginSelected(int i) m_gridLayout->addMultiCellWidget(m_programCombo, 0, 0, 1, m_gridLayout->numCols() - 1, Qt::AlignLeft); - connect(m_programCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotPluginProgramChanged(const QString &))); + connect(m_programCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotPluginProgramChanged(const TQString &))); m_programCombo->clear(); m_programCombo->insertItem(i18n("<none selected>")); @@ -555,8 +555,8 @@ AudioPluginDialog::slotPluginSelected(int i) showBounds, portCount > tooManyPorts); - connect(control, SIGNAL(valueChanged(float)), - this, SLOT(slotPluginPortChanged(float))); + connect(control, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotPluginPortChanged(float))); m_pluginWidgets.push_back(control); } @@ -582,9 +582,9 @@ AudioPluginDialog::slotPluginSelected(int i) QStringList AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤t) { - QStringList list; + TQStringList list; int mappedId = inst->getMappedId(); - QString currentProgram = strtoqstr(inst->getProgram()); + TQString currentProgram = strtoqstr(inst->getProgram()); MappedObjectPropertyList propertyList = StudioControl::getStudioObjectProperty (mappedId, MappedPluginSlot::Programs); @@ -604,7 +604,7 @@ AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤ void AudioPluginDialog::slotPluginPortChanged(float value) { - const QObject* object = sender(); + const TQObject* object = sender(); const PluginControl* control = dynamic_cast<const PluginControl*>(object); @@ -619,7 +619,7 @@ AudioPluginDialog::slotPluginPortChanged(float value) } void -AudioPluginDialog::slotPluginProgramChanged(const QString &value) +AudioPluginDialog::slotPluginProgramChanged(const TQString &value) { // store the new value AudioPluginInstance *inst = m_pluginContainer->getPlugin(m_index); @@ -697,11 +697,11 @@ AudioPluginDialog::updatePluginProgramList() if (!m_programCombo) { int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { - m_programLabel = new QLabel(i18n("Program: "), m_pluginParamsBox); + m_programLabel = new TQLabel(i18n("Program: "), m_pluginParamsBox); m_programCombo = new KComboBox(m_pluginParamsBox); m_programCombo->setSizeLimit(20); @@ -722,8 +722,8 @@ AudioPluginDialog::updatePluginProgramList() m_programCombo->show(); m_programCombo->blockSignals(true); - connect(m_programCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotPluginProgramChanged(const QString &))); + connect(m_programCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotPluginProgramChanged(const TQString &))); } else { return ; @@ -736,7 +736,7 @@ AudioPluginDialog::updatePluginProgramList() } int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { m_programCombo->show(); @@ -773,7 +773,7 @@ AudioPluginDialog::windowActivationChange(bool oldState) } void -AudioPluginDialog::closeEvent(QCloseEvent *e) +AudioPluginDialog::closeEvent(TQCloseEvent *e) { e->accept(); emit destroyed(m_containerId, m_index); |