diff options
Diffstat (limited to 'src/gui/editors/segment/ControlEditorDialog.cpp')
-rw-r--r-- | src/gui/editors/segment/ControlEditorDialog.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/src/gui/editors/segment/ControlEditorDialog.cpp b/src/gui/editors/segment/ControlEditorDialog.cpp index 3c4cc47..5fb1fa1 100644 --- a/src/gui/editors/segment/ControlEditorDialog.cpp +++ b/src/gui/editors/segment/ControlEditorDialog.cpp @@ -24,7 +24,7 @@ #include "ControlEditorDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -52,27 +52,27 @@ #include <kmainwindow.h> #include <kstdaccel.h> #include <kstdaction.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -const QString notShowing(i18n("<not showing>")); +const TQString notShowing(i18n("<not showing>")); -ControlEditorDialog::ControlEditorDialog(QWidget *parent, +ControlEditorDialog::ControlEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId device): KMainWindow(parent, "controleditordialog"), @@ -83,22 +83,22 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, { RG_DEBUG << "ControlEditorDialog::ControlEditorDialog: device is " << m_device << endl; - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Control Events")); - QString deviceName(i18n("<no device>")); + TQString deviceName(i18n("<no device>")); MidiDevice *md = dynamic_cast<MidiDevice *>(m_studio->getDevice(m_device)); if (md) deviceName = strtoqstr(md->getName()); // spacing hack! - new QLabel("", mainFrame); - new QLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). + new TQLabel("", mainFrame); + new TQLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). arg(device), mainFrame); - new QLabel("", mainFrame); + new TQLabel("", mainFrame); m_listView = new KListView(mainFrame); m_listView->addColumn(i18n("Control Event name ")); @@ -119,27 +119,27 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, m_listView->restoreLayout(kapp->config(), ControlEditorConfigGroup); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_addButton = new QPushButton(i18n("Add"), btnBox); - m_deleteButton = new QPushButton(i18n("Delete"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Control Parameter to the Studio")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Control Parameter from the Studio")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Control Parameter editor")); @@ -151,25 +151,25 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_addButton, SIGNAL(released()), - SLOT(slotAdd())); + connect(m_addButton, TQT_SIGNAL(released()), + TQT_SLOT(slotAdd())); - connect(m_deleteButton, SIGNAL(released()), - SLOT(slotDelete())); + connect(m_deleteButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDelete())); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem *)), - SLOT(slotEdit(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + TQT_SLOT(slotEdit(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); initDialog(); @@ -198,7 +198,7 @@ ControlEditorDialog::slotUpdate() { RG_DEBUG << "ControlEditorDialog::slotUpdate" << endl; - //QPtrList<QListViewItem> selection = m_listView->selectedItems(); + //TQPtrList<TQListViewItem> selection = m_listView->selectedItems(); MidiDevice *md = dynamic_cast<MidiDevice *>(m_studio->getDevice(m_device)); @@ -206,7 +206,7 @@ ControlEditorDialog::slotUpdate() return ; ControlList::const_iterator it = md->beginControllers(); - QListViewItem *item; + TQListViewItem *item; int i = 0; m_listView->clear(); @@ -214,17 +214,17 @@ ControlEditorDialog::slotUpdate() for (; it != md->endControllers(); ++it) { Composition &comp = m_doc->getComposition(); - QString colour = + TQString colour = strtoqstr(comp.getGeneralColourMap().getNameByIndex(it->getColourIndex())); if (colour == "") colour = i18n("<default>"); - QString position = QString("%1").arg(it->getIPBPosition()); + TQString position = TQString("%1").arg(it->getIPBPosition()); if (position.toInt() == -1) position = notShowing; - QString value; + TQString value; value.sprintf("%d (0x%x)", it->getControllerValue(), it->getControllerValue()); @@ -233,11 +233,11 @@ ControlEditorDialog::slotUpdate() m_listView, strtoqstr(it->getName()), strtoqstr(it->getType()), - QString("-"), + TQString("-"), strtoqstr(it->getDescription()), - QString("%1").arg(it->getMin()), - QString("%1").arg(it->getMax()), - QString("%1").arg(it->getDefault()), + TQString("%1").arg(it->getMin()), + TQString("%1").arg(it->getMax()), + TQString("%1").arg(it->getDefault()), colour, position); } else { @@ -247,9 +247,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), value, strtoqstr(it->getDescription()), - QString("%1").arg(it->getMin()), - QString("%1").arg(it->getMax()), - QString("%1").arg(it->getDefault()), + TQString("%1").arg(it->getMin()), + TQString("%1").arg(it->getMax()), + TQString("%1").arg(it->getDefault()), colour, position); } @@ -257,21 +257,21 @@ ControlEditorDialog::slotUpdate() // create and set a colour pixmap // - QPixmap colourPixmap(16, 16); + TQPixmap colourPixmap(16, 16); Colour c = comp.getGeneralColourMap().getColourByIndex(it->getColourIndex()); - colourPixmap.fill(QColor(c.getRed(), c.getGreen(), c.getBlue())); + colourPixmap.fill(TQColor(c.getRed(), c.getGreen(), c.getBlue())); item->setPixmap(7, colourPixmap); m_listView->insertItem(item); } if (m_listView->childCount() == 0) { - QListViewItem *item = new QListViewItem(m_listView, i18n("<none>")); + TQListViewItem *item = new TQListViewItem(m_listView, i18n("<none>")); m_listView->insertItem(item); - m_listView->setSelectionMode(QListView::NoSelection); + m_listView->setSelectionMode(TQListView::NoSelection); } else { - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); } @@ -338,11 +338,11 @@ void ControlEditorDialog::setupActions() { KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -397,7 +397,7 @@ ControlEditorDialog::slotEdit() {} void -ControlEditorDialog::slotEdit(QListViewItem *i) +ControlEditorDialog::slotEdit(TQListViewItem *i) { RG_DEBUG << "ControlEditorDialog::slotEdit" << endl; @@ -412,7 +412,7 @@ ControlEditorDialog::slotEdit(QListViewItem *i) (this, md->getControlParameter(item->getId()), m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyControlParameterCommand *command = new ModifyControlParameterCommand(m_studio, m_device, @@ -425,7 +425,7 @@ ControlEditorDialog::slotEdit(QListViewItem *i) } void -ControlEditorDialog::closeEvent(QCloseEvent *e) +ControlEditorDialog::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); |