diff options
Diffstat (limited to 'src/gui/editors/segment')
74 files changed, 1434 insertions, 1434 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); diff --git a/src/gui/editors/segment/ControlEditorDialog.h b/src/gui/editors/segment/ControlEditorDialog.h index 9270d2c..369a9b1 100644 --- a/src/gui/editors/segment/ControlEditorDialog.h +++ b/src/gui/editors/segment/ControlEditorDialog.h @@ -31,10 +31,10 @@ #include <kmainwindow.h> -class QWidget; -class QPushButton; -class QListViewItem; -class QCloseEvent; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQCloseEvent; class KListView; class KCommand; @@ -52,7 +52,7 @@ class ControlEditorDialog : public KMainWindow Q_OBJECT public: - ControlEditorDialog(QWidget *parent, + ControlEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId device); @@ -84,14 +84,14 @@ public slots: void slotClose(); void slotEdit(); - void slotEdit(QListViewItem *); + void slotEdit(TQListViewItem *); signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); @@ -100,13 +100,13 @@ protected: RosegardenGUIDoc *m_doc; DeviceId m_device; - QPushButton *m_closeButton; + TQPushButton *m_closeButton; - QPushButton *m_copyButton; - QPushButton *m_pasteButton; + TQPushButton *m_copyButton; + TQPushButton *m_pasteButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; KListView *m_listView; diff --git a/src/gui/editors/segment/ControlParameterEditDialog.cpp b/src/gui/editors/segment/ControlParameterEditDialog.cpp index bc779f5..1f4e9fd 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.cpp +++ b/src/gui/editors/segment/ControlParameterEditDialog.cpp @@ -24,7 +24,7 @@ #include "ControlParameterEditDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -37,25 +37,25 @@ #include "document/RosegardenGUIDoc.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qcolor.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpixmap.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpixmap.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -const QString notShowing(i18n("<not showing>")); +const TQString notShowing(i18n("<not showing>")); ControlParameterEditDialog::ControlParameterEditDialog( - QWidget *parent, + TQWidget *parent, ControlParameter *control, RosegardenGUIDoc *doc): KDialogBase(parent, 0, true, @@ -65,81 +65,81 @@ ControlParameterEditDialog::ControlParameterEditDialog( { m_dialogControl = *control; // copy in the ControlParameter - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Control Event Properties"), vbox); - QFrame *frame = new QFrame(groupBox); + TQFrame *frame = new TQFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new QLabel(i18n("Name:"), frame), 0, 0); - m_nameEdit = new QLineEdit(frame); + layout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); + m_nameEdit = new TQLineEdit(frame); layout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new QLabel(i18n("Type:"), frame), 1, 0); + layout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); m_typeCombo = new KComboBox(frame); layout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); - layout->addWidget(new QLabel(i18n("Description:"), frame), 2, 0); - m_description = new QLineEdit(frame); + layout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); + m_description = new TQLineEdit(frame); layout->addMultiCellWidget(m_description, 2, 2, 1, 2); // hex value alongside decimal value - m_hexValue = new QLabel(frame); + m_hexValue = new TQLabel(frame); layout->addWidget(m_hexValue, 3, 1); - layout->addWidget(new QLabel(i18n("Control Event value:"), frame), 3, 0); - m_controllerBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); + m_controllerBox = new TQSpinBox(frame); layout->addWidget(m_controllerBox, 3, 2); - layout->addWidget(new QLabel(i18n("Minimum value:"), frame), 4, 0); - m_minBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); + m_minBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); - layout->addWidget(new QLabel(i18n("Maximum value:"), frame), 5, 0); - m_maxBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); + m_maxBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); - layout->addWidget(new QLabel(i18n("Default value:"), frame), 6, 0); - m_defaultBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); + m_defaultBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); - layout->addWidget(new QLabel(i18n("Color:"), frame), 7, 0); + layout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); m_colourCombo = new KComboBox(frame); layout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); - layout->addWidget(new QLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); + layout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); m_ipbPosition = new KComboBox(frame); layout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); - connect(m_nameEdit, SIGNAL(textChanged(const QString&)), - SLOT(slotNameChanged(const QString&))); + connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotNameChanged(const TQString&))); - connect(m_typeCombo, SIGNAL(activated(int)), - SLOT(slotTypeChanged(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTypeChanged(int))); - connect(m_description, SIGNAL(textChanged(const QString&)), - SLOT(slotDescriptionChanged(const QString &))); + connect(m_description, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotDescriptionChanged(const TQString &))); - connect(m_controllerBox, SIGNAL(valueChanged(int)), - SLOT(slotControllerChanged(int))); + connect(m_controllerBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotControllerChanged(int))); - connect(m_minBox, SIGNAL(valueChanged(int)), - SLOT(slotMinChanged(int))); + connect(m_minBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotMinChanged(int))); - connect(m_maxBox, SIGNAL(valueChanged(int)), - SLOT(slotMaxChanged(int))); + connect(m_maxBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotMaxChanged(int))); - connect(m_defaultBox, SIGNAL(valueChanged(int)), - SLOT(slotDefaultChanged(int))); + connect(m_defaultBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotDefaultChanged(int))); - connect(m_colourCombo, SIGNAL(activated(int)), - SLOT(slotColourChanged(int))); + connect(m_colourCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColourChanged(int))); - connect(m_ipbPosition, SIGNAL(activated(int)), - SLOT(slotIPBPositionChanged(int))); + connect(m_ipbPosition, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotIPBPositionChanged(int))); //m_nameEdit->selectAll(); //m_description->selectAll(); @@ -170,11 +170,11 @@ ControlParameterEditDialog::ControlParameterEditDialog( // ColourMap &colourMap = m_doc->getComposition().getGeneralColourMap(); RCMap::const_iterator it; - QPixmap colourPixmap(16, 16); + TQPixmap colourPixmap(16, 16); for (it = colourMap.begin(); it != colourMap.end(); ++it) { Colour c = it->second.first; - colourPixmap.fill(QColor(c.getRed(), c.getGreen(), c.getBlue())); + colourPixmap.fill(TQColor(c.getRed(), c.getGreen(), c.getBlue())); m_colourCombo->insertItem(colourPixmap, strtoqstr(it->second.second)); } @@ -182,7 +182,7 @@ ControlParameterEditDialog::ControlParameterEditDialog( // m_ipbPosition->insertItem(notShowing); for (unsigned int i = 0; i < 32; i++) - m_ipbPosition->insertItem(QString("%1").arg(i)); + m_ipbPosition->insertItem(TQString("%1").arg(i)); if (m_control->getType() == Controller::EventType) m_typeCombo->setCurrentItem(0); @@ -206,7 +206,7 @@ ControlParameterEditDialog::populate() m_description->setText(strtoqstr(m_control->getDescription())); m_controllerBox->setValue(int(m_control->getControllerValue())); - QString hexValue; + TQString hexValue; hexValue.sprintf("(0x%x)", m_control->getControllerValue()); m_hexValue->setText(hexValue); @@ -252,7 +252,7 @@ ControlParameterEditDialog::populate() } void -ControlParameterEditDialog::slotNameChanged(const QString &str) +ControlParameterEditDialog::slotNameChanged(const TQString &str) { RG_DEBUG << "ControlParameterEditDialog::slotNameChanged" << endl; m_dialogControl.setName(qstrtostr(str)); @@ -268,7 +268,7 @@ ControlParameterEditDialog::slotTypeChanged(int value) } void -ControlParameterEditDialog::slotDescriptionChanged(const QString &str) +ControlParameterEditDialog::slotDescriptionChanged(const TQString &str) { RG_DEBUG << "ControlParameterEditDialog::slotDescriptionChanged" << endl; m_dialogControl.setDescription(qstrtostr(str)); @@ -281,7 +281,7 @@ ControlParameterEditDialog::slotControllerChanged(int value) m_dialogControl.setControllerValue(value); // set hex value - QString hexValue; + TQString hexValue; hexValue.sprintf("(0x%x)", value); m_hexValue->setText(hexValue); } diff --git a/src/gui/editors/segment/ControlParameterEditDialog.h b/src/gui/editors/segment/ControlParameterEditDialog.h index b9f4606..1c6bc01 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.h +++ b/src/gui/editors/segment/ControlParameterEditDialog.h @@ -30,11 +30,11 @@ #include <kdialogbase.h> -class QWidget; -class QString; -class QSpinBox; -class QLineEdit; -class QLabel; +class TQWidget; +class TQString; +class TQSpinBox; +class TQLineEdit; +class TQLabel; class KComboBox; @@ -48,7 +48,7 @@ class ControlParameterEditDialog : public KDialogBase { Q_OBJECT public: - ControlParameterEditDialog(QWidget *parent, + ControlParameterEditDialog(TQWidget *parent, ControlParameter *control, RosegardenGUIDoc *doc); @@ -56,9 +56,9 @@ public: public slots: - void slotNameChanged(const QString &); + void slotNameChanged(const TQString &); void slotTypeChanged(int); - void slotDescriptionChanged(const QString &); + void slotDescriptionChanged(const TQString &); void slotControllerChanged(int); void slotMinChanged(int); void slotMaxChanged(int); @@ -73,16 +73,16 @@ protected: ControlParameter *m_control; ControlParameter m_dialogControl; - QLineEdit *m_nameEdit; + TQLineEdit *m_nameEdit; KComboBox *m_typeCombo; - QLineEdit *m_description; - QSpinBox *m_controllerBox; - QSpinBox *m_minBox; - QSpinBox *m_maxBox; - QSpinBox *m_defaultBox; + TQLineEdit *m_description; + TQSpinBox *m_controllerBox; + TQSpinBox *m_minBox; + TQSpinBox *m_maxBox; + TQSpinBox *m_defaultBox; KComboBox *m_colourCombo; KComboBox *m_ipbPosition; - QLabel *m_hexValue; + TQLabel *m_hexValue; }; diff --git a/src/gui/editors/segment/ControlParameterItem.cpp b/src/gui/editors/segment/ControlParameterItem.cpp index beb0922..8fdeabb 100644 --- a/src/gui/editors/segment/ControlParameterItem.cpp +++ b/src/gui/editors/segment/ControlParameterItem.cpp @@ -25,8 +25,8 @@ #include "ControlParameterItem.h" -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> namespace Rosegarden diff --git a/src/gui/editors/segment/ControlParameterItem.h b/src/gui/editors/segment/ControlParameterItem.h index 6746ca2..7be91b3 100644 --- a/src/gui/editors/segment/ControlParameterItem.h +++ b/src/gui/editors/segment/ControlParameterItem.h @@ -26,7 +26,7 @@ #ifndef _RG_CONTROLPARAMETERITEM_H_ #define _RG_CONTROLPARAMETERITEM_H_ -#include <qstring.h> +#include <tqstring.h> #include <klistview.h> @@ -38,16 +38,16 @@ class ControlParameterItem : public KListViewItem { public: ControlParameterItem(int id, - QListView *parent, - QString str1, - QString str2, - QString str3, - QString str4, - QString str5, - QString str6, - QString str7, - QString str8, - QString str9): + TQListView *parent, + TQString str1, + TQString str2, + TQString str3, + TQString str4, + TQString str5, + TQString str6, + TQString str7, + TQString str8, + TQString str9): KListViewItem(parent, str1, str2, str3, str4, str5, str6, str7, str8), m_id(id) { setText(8, str9); } @@ -56,7 +56,7 @@ public: protected: int m_id; - QString m_string9; + TQString m_string9; }; diff --git a/src/gui/editors/segment/MarkerEditor.cpp b/src/gui/editors/segment/MarkerEditor.cpp index 61caaa7..d9df8a2 100644 --- a/src/gui/editors/segment/MarkerEditor.cpp +++ b/src/gui/editors/segment/MarkerEditor.cpp @@ -25,7 +25,7 @@ #include "MarkerEditor.h" #include "MarkerEditorViewItem.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -51,33 +51,33 @@ #include <kmainwindow.h> #include <kstdaccel.h> #include <kstdaction.h> -#include <qaccel.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcanvas.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcanvas.h> namespace Rosegarden { -MarkerEditor::MarkerEditor(QWidget *parent, +MarkerEditor::MarkerEditor(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "markereditordialog"), m_doc(doc), m_modified(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Markers")); @@ -91,44 +91,44 @@ MarkerEditor::MarkerEditor(QWidget *parent, for (int i = 0; i < 3; ++i) m_listView->setColumnAlignment(i, Qt::AlignHCenter); - QGroupBox *posGroup = new QGroupBox(2, Horizontal, + TQGroupBox *posGroup = new TQGroupBox(2, Horizontal, i18n("Pointer position"), mainFrame); - new QLabel(i18n("Absolute time:"), posGroup); - m_absoluteTime = new QLabel(posGroup); + new TQLabel(i18n("Absolute time:"), posGroup); + m_absoluteTime = new TQLabel(posGroup); - new QLabel(i18n("Real time:"), posGroup); - m_realTime = new QLabel(posGroup); + new TQLabel(i18n("Real time:"), posGroup); + m_realTime = new TQLabel(posGroup); - new QLabel(i18n("In measure:"), posGroup); - m_barTime = new QLabel(posGroup); + new TQLabel(i18n("In measure:"), posGroup); + m_barTime = new TQLabel(posGroup); - 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_deleteAllButton = new QPushButton(i18n("Delete All"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); + m_deleteAllButton = new TQPushButton(i18n("Delete All"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Marker")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Marker")); - QToolTip::add + TQToolTip::add (m_deleteAllButton, i18n("Delete All Markers")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Marker Editor")); @@ -141,48 +141,48 @@ MarkerEditor::MarkerEditor(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())); - connect(m_closeButton, SIGNAL(released()), - SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), + TQT_SLOT(slotClose())); - connect(m_deleteAllButton, SIGNAL(released()), - SLOT(slotDeleteAll())); + connect(m_deleteAllButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDeleteAll())); 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 *))); - connect(m_listView, SIGNAL(pressed(QListViewItem *)), - this, SLOT(slotItemClicked(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem *)), + this, TQT_SLOT(slotItemClicked(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); m_listView->setItemsRenameable(true); initDialog(); setAutoSaveSettings(MarkerEditorConfigGroup, true); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } void MarkerEditor::updatePosition() { timeT pos = m_doc->getComposition().getPosition(); - m_absoluteTime->setText(QString("%1").arg(pos)); + m_absoluteTime->setText(TQString("%1").arg(pos)); RealTime rT = m_doc->getComposition().getElapsedRealTime(pos); long hours = rT.sec / (60 * 60); @@ -190,11 +190,11 @@ MarkerEditor::updatePosition() long secs = rT.sec; long msecs = rT.msec(); - QString realTime, secsStr; + TQString realTime, secsStr; if (hours) - realTime += QString("%1h ").arg(hours); + realTime += TQString("%1h ").arg(hours); if (mins) - realTime += QString("%1m ").arg(mins); + realTime += TQString("%1m ").arg(mins); secsStr.sprintf("%ld.%03lds", secs, msecs); realTime += secsStr; @@ -202,8 +202,8 @@ MarkerEditor::updatePosition() if (m_realTime->text() != realTime) m_realTime->setText(realTime); - QString barTime = - QString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); + TQString barTime = + TQString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); // again only update if needed if (m_barTime->text() != barTime) @@ -243,7 +243,7 @@ MarkerEditor::slotUpdate() { RG_DEBUG << "MarkerEditor::slotUpdate" << endl; - //QPtrList<QListViewItem> selection = m_listView->selectedItems(); + //TQPtrList<TQListViewItem> selection = m_listView->selectedItems(); MarkerEditorViewItem *item; @@ -258,7 +258,7 @@ MarkerEditor::slotUpdate() int timeMode = kapp->config()->readNumEntry("timemode", 0); for (it = markers.begin(); it != markers.end(); ++it) { - QString timeString = makeTimeString((*it)->getTime(), timeMode); + TQString timeString = makeTimeString((*it)->getTime(), timeMode); item = new MarkerEditorViewItem(m_listView, @@ -275,14 +275,14 @@ MarkerEditor::slotUpdate() } if (m_listView->childCount() == 0) { - QListViewItem *item = + TQListViewItem *item = new MarkerEditorViewItem(m_listView, 0, i18n("<none>")); ((MarkerEditorViewItem *)item)->setFake(true); 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); } updatePosition(); @@ -295,7 +295,7 @@ MarkerEditor::slotDeleteAll() RG_DEBUG << "MarkerEditor::slotDeleteAll" << endl; KMacroCommand *command = new KMacroCommand(i18n("Remove all markers")); - QListViewItem *item = m_listView->firstChild(); + TQListViewItem *item = m_listView->firstChild(); do { MarkerEditorViewItem *ei = @@ -333,7 +333,7 @@ void MarkerEditor::slotDelete() { RG_DEBUG << "MarkerEditor::slotDelete" << endl; - QListViewItem *item = m_listView->currentItem(); + TQListViewItem *item = m_listView->currentItem(); MarkerEditorViewItem *ei = dynamic_cast<MarkerEditorViewItem *>(item); @@ -368,11 +368,11 @@ void MarkerEditor::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"), @@ -387,37 +387,37 @@ MarkerEditor::setupActions() actionCollection(), KStdAction::stdName(KStdAction::Redo)); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); kapp->config()->setGroup(MarkerEditorConfigGroup); int timeMode = kapp->config()->readNumEntry("timemode", 0); KRadioAction *action; - QCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); - QIconSet icon(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); + TQIconSet icon(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -459,11 +459,11 @@ MarkerEditor::checkModified() } void -MarkerEditor::slotEdit(QListViewItem *i) +MarkerEditor::slotEdit(TQListViewItem *i) { RG_DEBUG << "MarkerEditor::slotEdit" << endl; - if (m_listView->selectionMode() == QListView::NoSelection) { + if (m_listView->selectionMode() == TQListView::NoSelection) { // The marker list is empty, so we shouldn't allow editing the // <none> placeholder return ; @@ -483,7 +483,7 @@ MarkerEditor::slotEdit(QListViewItem *i) item->text(1), item->text(2)); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyMarkerCommand *command = new ModifyMarkerCommand(&m_doc->getComposition(), item->getID(), @@ -499,7 +499,7 @@ MarkerEditor::slotEdit(QListViewItem *i) } void -MarkerEditor::closeEvent(QCloseEvent *e) +MarkerEditor::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -516,7 +516,7 @@ MarkerEditor::setDocument(RosegardenGUIDoc *doc) } void -MarkerEditor::slotItemClicked(QListViewItem *item) +MarkerEditor::slotItemClicked(TQListViewItem *item) { RG_DEBUG << "MarkerEditor::slotItemClicked" << endl; MarkerEditorViewItem *ei = @@ -541,7 +541,7 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) m_doc->getComposition().getMusicalTimeForAbsoluteTime (time, bar, beat, fraction, remainder); ++bar; - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -557,12 +557,12 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) { RealTime rt = m_doc->getComposition().getElapsedRealTime(time); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(time); + return TQString("%1 ").arg(time); } } diff --git a/src/gui/editors/segment/MarkerEditor.h b/src/gui/editors/segment/MarkerEditor.h index d3c9ac7..8d6de0e 100644 --- a/src/gui/editors/segment/MarkerEditor.h +++ b/src/gui/editors/segment/MarkerEditor.h @@ -27,16 +27,16 @@ #define _RG_MARKEREDITOR_H_ #include <kmainwindow.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QPushButton; -class QListViewItem; -class QLabel; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQLabel; +class TQCloseEvent; +class TQAccel; class KListView; class KCommand; @@ -53,7 +53,7 @@ class MarkerEditor : public KMainWindow Q_OBJECT public: - MarkerEditor(QWidget *parent, + MarkerEditor(TQWidget *parent, RosegardenGUIDoc *doc); ~MarkerEditor(); @@ -71,7 +71,7 @@ public: // update pointer position void updatePosition(); - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } public slots: void slotUpdate(); @@ -80,8 +80,8 @@ public slots: void slotDelete(); void slotDeleteAll(); void slotClose(); - void slotEdit(QListViewItem *); - void slotItemClicked(QListViewItem *); + void slotEdit(TQListViewItem *); + void slotItemClicked(TQListViewItem *); void slotMusicalTime(); void slotRealTime(); @@ -92,30 +92,30 @@ signals: void jumpToMarker(timeT); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); - QString makeTimeString(timeT time, int timeMode); + TQString makeTimeString(timeT time, int timeMode); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QLabel *m_absoluteTime; - QLabel *m_realTime; - QLabel *m_barTime; + TQLabel *m_absoluteTime; + TQLabel *m_realTime; + TQLabel *m_barTime; - QPushButton *m_closeButton; + TQPushButton *m_closeButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; - QPushButton *m_deleteAllButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; + TQPushButton *m_deleteAllButton; KListView *m_listView; bool m_modified; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/editors/segment/MarkerEditorViewItem.cpp b/src/gui/editors/segment/MarkerEditorViewItem.cpp index 9ff2bda..004f9d9 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.cpp +++ b/src/gui/editors/segment/MarkerEditorViewItem.cpp @@ -27,7 +27,7 @@ namespace Rosegarden { int -MarkerEditorViewItem::compare(QListViewItem * i, int col, bool ascending) const +MarkerEditorViewItem::compare(TQListViewItem * i, int col, bool ascending) const { MarkerEditorViewItem *ei = dynamic_cast<MarkerEditorViewItem *>(i); diff --git a/src/gui/editors/segment/MarkerEditorViewItem.h b/src/gui/editors/segment/MarkerEditorViewItem.h index 010d227..9852202 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.h +++ b/src/gui/editors/segment/MarkerEditorViewItem.h @@ -35,20 +35,20 @@ namespace Rosegarden { class MarkerEditorViewItem : public KListViewItem { public: - MarkerEditorViewItem(QListView * parent, int id, - QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null): + MarkerEditorViewItem(TQListView * parent, int id, + TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null): KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_rawTime(0), m_fake(false), m_id(id) { ; } - virtual int compare(QListViewItem * i, int col, bool ascending) const; + virtual int compare(TQListViewItem * i, int col, bool ascending) const; void setRawTime(Rosegarden::timeT rawTime) { m_rawTime = rawTime; } Rosegarden::timeT getRawTime() const { return m_rawTime; } diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp index bfc795c..da56edc 100644 --- a/src/gui/editors/segment/PlayList.cpp +++ b/src/gui/editors/segment/PlayList.cpp @@ -27,43 +27,43 @@ #include "PlayListView.h" #include "PlayListViewItem.h" #include "document/ConfigGroups.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kconfig.h> #include <kfiledialog.h> #include <kglobal.h> #include <kurl.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qdragobject.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqdragobject.h> namespace Rosegarden { -PlayList::PlayList(QWidget *parent, const char *name) - : QVBox(parent, name), +PlayList::PlayList(TQWidget *parent, const char *name) + : TQVBox(parent, name), m_listView(new PlayListView(this)), - m_buttonBar(new QFrame(this)), - m_barLayout(new QHBoxLayout(m_buttonBar)), + m_buttonBar(new TQFrame(this)), + m_barLayout(new TQHBoxLayout(m_buttonBar)), m_playButton(0), m_moveUpButton(0), m_moveDownButton(0), m_deleteButton(0), m_clearButton(0) { - m_openButton = new QPushButton(m_buttonBar); - m_playButton = new QPushButton(m_buttonBar); - m_moveUpButton = new QPushButton(m_buttonBar); - m_moveDownButton = new QPushButton(m_buttonBar); - m_deleteButton = new QPushButton(m_buttonBar); - m_clearButton = new QPushButton(m_buttonBar); + m_openButton = new TQPushButton(m_buttonBar); + m_playButton = new TQPushButton(m_buttonBar); + m_moveUpButton = new TQPushButton(m_buttonBar); + m_moveDownButton = new TQPushButton(m_buttonBar); + m_deleteButton = new TQPushButton(m_buttonBar); + m_clearButton = new TQPushButton(m_buttonBar); m_barLayout->addWidget(m_openButton); m_barLayout->addWidget(m_playButton); m_barLayout->addWidget(m_moveUpButton); @@ -80,29 +80,29 @@ PlayList::PlayList(QWidget *parent, const char *name) m_deleteButton ->setText(i18n("Delete")); m_clearButton ->setText(i18n("Clear")); - connect(m_openButton, SIGNAL(clicked()), - SLOT(slotOpenFiles())); + connect(m_openButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotOpenFiles())); - connect(m_playButton, SIGNAL(clicked()), - SLOT(slotPlay())); + connect(m_playButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPlay())); - connect(m_deleteButton, SIGNAL(clicked()), - SLOT(slotDeleteCurrent())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotDeleteCurrent())); - connect(m_clearButton, SIGNAL(clicked()), - SLOT(slotClear())); + connect(m_clearButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotClear())); - connect(m_moveUpButton, SIGNAL(clicked()), - SLOT(slotMoveUp())); + connect(m_moveUpButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveUp())); - connect(m_moveDownButton, SIGNAL(clicked()), - SLOT(slotMoveDown())); + connect(m_moveDownButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveDown())); - connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), - SLOT(slotCurrentItemChanged(QListViewItem*))); + connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), + TQT_SLOT(slotCurrentItemChanged(TQListViewItem*))); - connect(m_listView, SIGNAL(dropped(QDropEvent*, QListViewItem*)), - SLOT(slotDropped(QDropEvent*, QListViewItem*))); + connect(m_listView, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), + TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*))); restore(); @@ -133,17 +133,17 @@ void PlayList::slotOpenFiles() } void -PlayList::slotDropped(QDropEvent *event, QListViewItem* after) +PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after) { - QStrList uri; + TQStrList uri; // see if we can decode a URI.. if not, just ignore it - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { // okay, we have a URI.. process it // weed out non-rg files // - for (QString url = uri.first(); url; url = uri.next()) { + for (TQString url = uri.first(); url; url = uri.next()) { if (url.right(3).lower() == ".rg") new PlayListViewItem(m_listView, after, KURL(url)); @@ -163,8 +163,8 @@ void PlayList::slotPlay() void PlayList::slotMoveUp() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *previousItem = m_listView->previousSibling(currentItem); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *previousItem = m_listView->previousSibling(currentItem); if (previousItem) previousItem->moveItem(currentItem); @@ -174,8 +174,8 @@ void PlayList::slotMoveUp() void PlayList::slotMoveDown() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *nextItem = currentItem->nextSibling(); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *nextItem = currentItem->nextSibling(); if (nextItem) currentItem->moveItem(nextItem); @@ -191,17 +191,17 @@ void PlayList::slotClear() void PlayList::slotDeleteCurrent() { - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (currentItem) delete currentItem; } -void PlayList::slotCurrentItemChanged(QListViewItem* currentItem) +void PlayList::slotCurrentItemChanged(TQListViewItem* currentItem) { enableButtons(currentItem); } -void PlayList::enableButtons(QListViewItem* currentItem) +void PlayList::enableButtons(TQListViewItem* currentItem) { bool enable = (currentItem != 0); @@ -221,7 +221,7 @@ void PlayList::enableButtons(QListViewItem* currentItem) void PlayList::save() { - QStringList urlList; + TQStringList urlList; PlayListViewItem* item = dynamic_cast<PlayListViewItem*>(getListView()->firstChild()); while (item) { @@ -242,9 +242,9 @@ void PlayList::restore() getListView()->restoreLayout(kc, PlayListConfigGroup); KConfigGroupSaver cs(kc, PlayListConfigGroup); - QStringList urlList = kc->readListEntry("Playlist Files"); + TQStringList urlList = kc->readListEntry("Playlist Files"); - for (QStringList::Iterator it = urlList.begin(); + for (TQStringList::Iterator it = urlList.begin(); it != urlList.end(); ++it) { new PlayListViewItem(getListView(), KURL(*it)); } diff --git a/src/gui/editors/segment/PlayList.h b/src/gui/editors/segment/PlayList.h index 8e40c8c..8c04553 100644 --- a/src/gui/editors/segment/PlayList.h +++ b/src/gui/editors/segment/PlayList.h @@ -26,15 +26,15 @@ #ifndef _RG_PLAYLIST_H_ #define _RG_PLAYLIST_H_ -#include <qvbox.h> +#include <tqvbox.h> -class QWidget; -class QPushButton; -class QListViewItem; -class QHBoxLayout; -class QFrame; -class QDropEvent; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQHBoxLayout; +class TQFrame; +class TQDropEvent; namespace Rosegarden @@ -48,16 +48,16 @@ class PlayList : public QVBox Q_OBJECT public: - PlayList(QWidget *parent = 0, const char *name = 0); + PlayList(TQWidget *parent = 0, const char *name = 0); ~PlayList(); PlayListView* getListView() { return m_listView; } - void enableButtons(QListViewItem*); + void enableButtons(TQListViewItem*); signals: - void play(QString); + void play(TQString); protected slots: void slotOpenFiles(); @@ -66,8 +66,8 @@ protected slots: void slotMoveDown(); void slotDeleteCurrent(); void slotClear(); - void slotCurrentItemChanged(QListViewItem*); - void slotDropped(QDropEvent*, QListViewItem*); + void slotCurrentItemChanged(TQListViewItem*); + void slotDropped(TQDropEvent*, TQListViewItem*); protected: void save(); @@ -75,15 +75,15 @@ protected: //--------------- Data members --------------------------------- PlayListView* m_listView; - QFrame* m_buttonBar; - QHBoxLayout* m_barLayout; - - QPushButton* m_openButton; - QPushButton* m_playButton; - QPushButton* m_moveUpButton; - QPushButton* m_moveDownButton; - QPushButton* m_deleteButton; - QPushButton* m_clearButton; + TQFrame* m_buttonBar; + TQHBoxLayout* m_barLayout; + + TQPushButton* m_openButton; + TQPushButton* m_playButton; + TQPushButton* m_moveUpButton; + TQPushButton* m_moveDownButton; + TQPushButton* m_deleteButton; + TQPushButton* m_clearButton; }; diff --git a/src/gui/editors/segment/PlayListDialog.cpp b/src/gui/editors/segment/PlayListDialog.cpp index 7aa03a5..b519b6e 100644 --- a/src/gui/editors/segment/PlayListDialog.cpp +++ b/src/gui/editors/segment/PlayListDialog.cpp @@ -28,15 +28,15 @@ #include "document/ConfigGroups.h" #include "PlayList.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -PlayListDialog::PlayListDialog(QString caption, - QWidget* parent, const char* name) +PlayListDialog::PlayListDialog(TQString caption, + TQWidget* parent, const char* name) : KDialogBase(parent, name, false, caption, KDialogBase::Close, // standard buttons KDialogBase::Close, // default button @@ -58,7 +58,7 @@ void PlayListDialog::restore() setInitialSize(configDialogSize(PlayListConfigGroup)); } -void PlayListDialog::closeEvent(QCloseEvent *e) +void PlayListDialog::closeEvent(TQCloseEvent *e) { save(); emit closing(); diff --git a/src/gui/editors/segment/PlayListDialog.h b/src/gui/editors/segment/PlayListDialog.h index 51db8ca..5130ee3 100644 --- a/src/gui/editors/segment/PlayListDialog.h +++ b/src/gui/editors/segment/PlayListDialog.h @@ -27,11 +27,11 @@ #define _RG_PLAYLISTDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QCloseEvent; +class TQWidget; +class TQCloseEvent; namespace Rosegarden @@ -45,7 +45,7 @@ class PlayListDialog : public KDialogBase Q_OBJECT public: - PlayListDialog(QString caption, QWidget* parent = 0, const char* name = 0); + PlayListDialog(TQString caption, TQWidget* parent = 0, const char* name = 0); PlayList* getPlayList() { return m_playList; } @@ -56,7 +56,7 @@ signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); void save(); void restore(); diff --git a/src/gui/editors/segment/PlayListView.cpp b/src/gui/editors/segment/PlayListView.cpp index 8c17076..ff4d1c8 100644 --- a/src/gui/editors/segment/PlayListView.cpp +++ b/src/gui/editors/segment/PlayListView.cpp @@ -25,11 +25,11 @@ #include "PlayListView.h" #include <klocale.h> -#include <qdragobject.h> +#include <tqdragobject.h> namespace Rosegarden { -PlayListView::PlayListView(QWidget *parent, const char *name) +PlayListView::PlayListView(TQWidget *parent, const char *name) : KListView(parent, name) { addColumn(i18n("Title")); @@ -46,15 +46,15 @@ PlayListView::PlayListView(QWidget *parent, const char *name) setSorting(-1); } -bool PlayListView::acceptDrag(QDropEvent* e) const +bool PlayListView::acceptDrag(TQDropEvent* e) const { - return QUriDrag::canDecode(e) || KListView::acceptDrag(e); + return TQUriDrag::canDecode(e) || KListView::acceptDrag(e); } -QListViewItem* PlayListView::previousSibling(QListViewItem* item) +TQListViewItem* PlayListView::previousSibling(TQListViewItem* item) { - QListViewItem* prevSib = firstChild(); + TQListViewItem* prevSib = firstChild(); while(prevSib && prevSib->nextSibling() != item) prevSib = prevSib->nextSibling(); diff --git a/src/gui/editors/segment/PlayListView.h b/src/gui/editors/segment/PlayListView.h index a18b8e8..43390d0 100644 --- a/src/gui/editors/segment/PlayListView.h +++ b/src/gui/editors/segment/PlayListView.h @@ -32,16 +32,16 @@ namespace Rosegarden { class PlayListView : public KListView { public: - PlayListView(QWidget *parent=0, const char *name=0); + PlayListView(TQWidget *parent=0, const char *name=0); - QListViewItem* previousSibling(QListViewItem*); + TQListViewItem* previousSibling(TQListViewItem*); protected: -// virtual void dragEnterEvent(QDragEnterEvent *event); -// virtual void dropEvent(QDropEvent*); +// virtual void dragEnterEvent(TQDragEnterEvent *event); +// virtual void dropEvent(TQDropEvent*); -// virtual void dragEnterEvent(QDragEnterEvent*); - virtual bool acceptDrag(QDropEvent*) const; +// virtual void dragEnterEvent(TQDragEnterEvent*); + virtual bool acceptDrag(TQDropEvent*) const; }; diff --git a/src/gui/editors/segment/PlayListViewItem.cpp b/src/gui/editors/segment/PlayListViewItem.cpp index df04a2e..ab0c25c 100644 --- a/src/gui/editors/segment/PlayListViewItem.cpp +++ b/src/gui/editors/segment/PlayListViewItem.cpp @@ -32,7 +32,7 @@ PlayListViewItem::PlayListViewItem(KListView* parent, KURL kurl) { } -PlayListViewItem::PlayListViewItem(KListView* parent, QListViewItem* after, KURL kurl) +PlayListViewItem::PlayListViewItem(KListView* parent, TQListViewItem* after, KURL kurl) : KListViewItem(parent, after, kurl.fileName(), kurl.prettyURL()), m_kurl(kurl) { diff --git a/src/gui/editors/segment/PlayListViewItem.h b/src/gui/editors/segment/PlayListViewItem.h index b88de0f..a622682 100644 --- a/src/gui/editors/segment/PlayListViewItem.h +++ b/src/gui/editors/segment/PlayListViewItem.h @@ -34,7 +34,7 @@ class PlayListViewItem : public KListViewItem { public: PlayListViewItem(KListView* parent, KURL); - PlayListViewItem(KListView* parent, QListViewItem*, KURL); + PlayListViewItem(KListView* parent, TQListViewItem*, KURL); const KURL& getURL() { return m_kurl; } diff --git a/src/gui/editors/segment/TrackButtons.cpp b/src/gui/editors/segment/TrackButtons.cpp index 5cf9908..39e19d2 100644 --- a/src/gui/editors/segment/TrackButtons.cpp +++ b/src/gui/editors/segment/TrackButtons.cpp @@ -24,7 +24,7 @@ #include "TrackButtons.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kstddirs.h> @@ -50,19 +50,19 @@ #include <kglobal.h> #include <kled.h> #include <kmessagebox.h> -#include <qcursor.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpopupmenu.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqtooltip.h> namespace Rosegarden { @@ -72,16 +72,16 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f) - : QFrame(parent, name, f), + : TQFrame(parent, name, f), m_doc(doc), - m_layout(new QVBoxLayout(this)), - m_recordSigMapper(new QSignalMapper(this)), - m_muteSigMapper(new QSignalMapper(this)), - m_clickedSigMapper(new QSignalMapper(this)), - m_instListSigMapper(new QSignalMapper(this)), + m_layout(new TQVBoxLayout(this)), + m_recordSigMapper(new TQSignalMapper(this)), + m_muteSigMapper(new TQSignalMapper(this)), + m_clickedSigMapper(new TQSignalMapper(this)), + m_instListSigMapper(new TQSignalMapper(this)), m_tracks(doc->getComposition().getNbTracks()), m_offset(4), m_cellSize(trackCellHeight), @@ -108,18 +108,18 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, m_layout->addStretch(20); - connect(m_recordSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotToggleRecordTrack(int))); + connect(m_recordSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotToggleRecordTrack(int))); - connect(m_muteSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotToggleMutedTrack(int))); + connect(m_muteSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotToggleMutedTrack(int))); // connect signal mappers - connect(m_instListSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotInstrumentSelection(int))); + connect(m_instListSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotInstrumentSelection(int))); - connect(m_clickedSigMapper, SIGNAL(mapped(int)), - this, SIGNAL(trackSelected(int))); + connect(m_clickedSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SIGNAL(trackSelected(int))); // // Populate instrument popup menu just once at start-up // // @@ -149,7 +149,7 @@ TrackButtons::makeButtons() Track *track = m_doc->getComposition().getTrackByPosition(i); if (track) { - QFrame *trackHBox = makeButton(track->getId()); + TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { m_layout->addWidget(trackHBox); @@ -161,7 +161,7 @@ TrackButtons::makeButtons() populateButtons(); } -void TrackButtons::setButtonMapping(QObject* obj, TrackId trackId) +void TrackButtons::setButtonMapping(TQObject* obj, TrackId trackId) { m_clickedSigMapper->setMapping(obj, trackId); m_instListSigMapper->setMapping(obj, trackId); @@ -271,7 +271,7 @@ TrackButtons::removeButtons(unsigned int position) delete m_trackHBoxes[position]; // deletes all child widgets (button, led, label...) - std::vector<QFrame*>::iterator it = m_trackHBoxes.begin(); + std::vector<TQFrame*>::iterator it = m_trackHBoxes.begin(); it += position; m_trackHBoxes.erase(it); @@ -293,7 +293,7 @@ TrackButtons::slotUpdateTracks() for (unsigned int i = m_tracks; i < newNbTracks; ++i) { track = m_doc->getComposition().getTrackByPosition(i); if (track) { - QFrame *trackHBox = makeButton(track->getId()); + TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { trackHBox->show(); @@ -343,7 +343,7 @@ TrackButtons::slotUpdateTracks() if (track) { m_trackLabels[i]->setId(track->getId()); - QLabel *trackLabel = m_trackLabels[i]->getTrackLabel(); + TQLabel *trackLabel = m_trackLabels[i]->getTrackLabel(); if (track->getLabel() == std::string("")) { Instrument *ins = @@ -530,7 +530,7 @@ TrackButtons::getHighlightedTracks() } void -TrackButtons::slotRenameTrack(QString newName, TrackId trackId) +TrackButtons::slotRenameTrack(TQString newName, TrackId trackId) { m_doc->getCommandHistory()->addCommand (new RenameTrackCommand(&m_doc->getComposition(), @@ -582,7 +582,7 @@ TrackButtons::slotInstrumentSelection(int trackId) int position = comp.getTrackById(trackId)->getPosition(); - QString instrumentName = i18n("<no instrument>"); + TQString instrumentName = i18n("<no instrument>"); Track *track = comp.getTrackByPosition(position); Instrument *instrument = 0; @@ -603,7 +603,7 @@ TrackButtons::slotInstrumentSelection(int trackId) // Device/Bank dialog then we reload the whole menu here. // - QPopupMenu instrumentPopup(this); + TQPopupMenu instrumentPopup(this); populateInstrumentPopup(instrument, &instrumentPopup); @@ -611,7 +611,7 @@ TrackButtons::slotInstrumentSelection(int trackId) // m_popupItem = position; - instrumentPopup.exec(QCursor::pos()); + instrumentPopup.exec(TQCursor::pos()); // Restore the label back to what it was showing m_trackLabels[position]->showLabel(m_trackInstrumentLabels); @@ -634,30 +634,30 @@ TrackButtons::slotInstrumentSelection(int trackId) } void -TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* instrumentPopup) +TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* instrumentPopup) { - static QPixmap connectedPixmap, unconnectedPixmap, + static TQPixmap connectedPixmap, unconnectedPixmap, connectedUsedPixmap, unconnectedUsedPixmap, connectedSelectedPixmap, unconnectedSelectedPixmap; static bool havePixmaps = false; if (!havePixmaps) { - QString pixmapDir = + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); connectedPixmap.load - (QString("%1/misc/connected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected.xpm").arg(pixmapDir)); connectedUsedPixmap.load - (QString("%1/misc/connected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-used.xpm").arg(pixmapDir)); connectedSelectedPixmap.load - (QString("%1/misc/connected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-selected.xpm").arg(pixmapDir)); unconnectedPixmap.load - (QString("%1/misc/unconnected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected.xpm").arg(pixmapDir)); unconnectedUsedPixmap.load - (QString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); unconnectedSelectedPixmap.load - (QString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); havePixmaps = true; } @@ -668,7 +668,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in // clear the popup instrumentPopup->clear(); - std::vector<QPopupMenu*> instrumentSubMenus; + std::vector<TQPopupMenu*> instrumentSubMenus; // position index int i = 0; @@ -684,8 +684,8 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in if (! (*it)) continue; // sanity check - QString iname(strtoqstr((*it)->getPresentationName())); - QString pname(strtoqstr((*it)->getProgramName())); + TQString iname(strtoqstr((*it)->getPresentationName())); + TQString pname(strtoqstr((*it)->getProgramName())); Device *device = (*it)->getDevice(); DeviceId devId = device->getId(); bool connected = false; @@ -696,17 +696,17 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in (Instrument::SYNTH_PLUGIN_POSITION); if (plugin) { pname = strtoqstr(plugin->getProgram()); - QString identifier = strtoqstr(plugin->getIdentifier()); + TQString identifier = strtoqstr(plugin->getIdentifier()); if (identifier != "") { connected = true; - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier (identifier, type, soName, label); if (pname == "") { pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = QString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").arg(label).arg(pname); } else { pname = label; } @@ -753,7 +753,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in } } - QIconSet iconSet + TQIconSet iconSet (connected ? (deviceUsedByAnyone ? connectedUsedPixmap : connectedPixmap) : @@ -762,15 +762,15 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in currentDevId = int(devId); - QPopupMenu *subMenu = new QPopupMenu(instrumentPopup); - QString deviceName = strtoqstr(device->getName()); + TQPopupMenu *subMenu = new TQPopupMenu(instrumentPopup); + TQString deviceName = strtoqstr(device->getName()); instrumentPopup->insertItem(iconSet, deviceName, subMenu); instrumentSubMenus.push_back(subMenu); // Connect up the submenu // - connect(subMenu, SIGNAL(activated(int)), - SLOT(slotInstrumentPopupActivated(int))); + connect(subMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotInstrumentPopupActivated(int))); } else if (!instrUsedByMe) { @@ -785,7 +785,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in } } - QIconSet iconSet + TQIconSet iconSet (connected ? (instrUsedByAnyone ? instrUsedByMe ? @@ -866,7 +866,7 @@ TrackButtons::changeTrackInstrumentLabels(TrackLabel::InstrumentTrackLabels labe } void -TrackButtons::changeInstrumentLabel(InstrumentId id, QString label) +TrackButtons::changeInstrumentLabel(InstrumentId id, TQString label) { Composition &comp = m_doc->getComposition(); Track *track; @@ -895,7 +895,7 @@ TrackButtons::changeInstrumentLabel(InstrumentId id, QString label) } void -TrackButtons::changeTrackLabel(TrackId id, QString label) +TrackButtons::changeTrackLabel(TrackId id, TQString label) { Composition &comp = m_doc->getComposition(); Track *track; @@ -932,7 +932,7 @@ TrackButtons::slotSynchroniseWithComposition() Instrument *ins = studio. getInstrumentById(track->getInstrument()); - QString instrumentName(i18n("<no instrument>")); + TQString instrumentName(i18n("<no instrument>")); if (ins) instrumentName = strtoqstr(ins->getPresentationName()); @@ -990,13 +990,13 @@ TrackButtons::slotTrackInstrumentSelection(TrackId trackId, int item) slotInstrumentPopupActivated( item ); } -QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) +TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) { // The buttonGap sets up the sizes of the buttons // static const int buttonGap = 8; - QFrame *trackHBox = 0; + TQFrame *trackHBox = 0; KLedButton *mute = 0; KLedButton *record = 0; @@ -1020,8 +1020,8 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Create a horizontal box for each track // - trackHBox = new QFrame(this); - QHBoxLayout *hblayout = new QHBoxLayout(trackHBox); + trackHBox = new TQFrame(this); + TQHBoxLayout *hblayout = new TQHBoxLayout(trackHBox); trackHBox->setMinimumSize(labelWidth, m_cellSize * multiple - m_borderGap); trackHBox->setFixedHeight(m_cellSize * multiple - m_borderGap); @@ -1055,12 +1055,12 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) mute = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::MuteTrackLED), trackHBox); - QToolTip::add(mute, i18n("Mute track")); + TQToolTip::add(mute, i18n("Mute track")); hblayout->addWidget(mute); record = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::RecordMIDITrackLED), trackHBox); - QToolTip::add(record, i18n("Record on this track")); + TQToolTip::add(record, i18n("Record on this track")); hblayout->addWidget(record); record->setLook(KLed::Sunken); @@ -1068,10 +1068,10 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) record->off(); // Connect them to their sigmappers - connect(record, SIGNAL(stateChanged(bool)), - m_recordSigMapper, SLOT(map())); - connect(mute, SIGNAL(stateChanged(bool)), - m_muteSigMapper, SLOT(map())); + connect(record, TQT_SIGNAL(stateChanged(bool)), + m_recordSigMapper, TQT_SLOT(map())); + connect(mute, TQT_SIGNAL(stateChanged(bool)), + m_muteSigMapper, TQT_SLOT(map())); m_recordSigMapper->setMapping(record, track->getPosition()); m_muteSigMapper->setMapping(mute, track->getPosition()); @@ -1103,8 +1103,8 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) trackLabel->setFixedHeight(m_cellSize - buttonGap); trackLabel->setIndent(7); - connect(trackLabel, SIGNAL(renameTrack(QString, TrackId)), - SLOT(slotRenameTrack(QString, TrackId))); + connect(trackLabel, TQT_SIGNAL(renameTrack(TQString, TrackId)), + TQT_SLOT(slotRenameTrack(TQString, TrackId))); // Store the TrackLabel pointer // @@ -1113,10 +1113,10 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Connect it setButtonMapping(trackLabel, trackId); - connect(trackLabel, SIGNAL(changeToInstrumentList()), - m_instListSigMapper, SLOT(map())); - connect(trackLabel, SIGNAL(clicked()), - m_clickedSigMapper, SLOT(map())); + connect(trackLabel, TQT_SIGNAL(changeToInstrumentList()), + m_instListSigMapper, TQT_SLOT(map())); + connect(trackLabel, TQT_SIGNAL(clicked()), + m_clickedSigMapper, TQT_SLOT(map())); // // instrument label @@ -1124,7 +1124,7 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) Rosegarden::Instrument *ins = m_doc->getStudio().getInstrumentById(track->getInstrument()); - QString instrumentName(i18n("<no instrument>")); + TQString instrumentName(i18n("<no instrument>")); if (ins) instrumentName = strtoqstr(ins->getPresentationName()); // Set label to program change if it's being sent diff --git a/src/gui/editors/segment/TrackButtons.h b/src/gui/editors/segment/TrackButtons.h index a61601d..7f2b5dd 100644 --- a/src/gui/editors/segment/TrackButtons.h +++ b/src/gui/editors/segment/TrackButtons.h @@ -30,16 +30,16 @@ #include "base/Track.h" #include "gui/application/RosegardenGUIApp.h" #include "TrackLabel.h" -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QVBoxLayout; -class QSignalMapper; -class QPopupMenu; -class QObject; +class TQWidget; +class TQVBoxLayout; +class TQSignalMapper; +class TQPopupMenu; +class TQObject; namespace Rosegarden @@ -61,7 +61,7 @@ public: unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); @@ -80,9 +80,9 @@ public: * an actual program name rather than a meaningless * device number and midi channel */ - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); - void changeTrackLabel(TrackId id, QString label); + void changeTrackLabel(TrackId id, TQString label); // Select a label from outside this class by position // @@ -105,7 +105,7 @@ public: * * @see RosegardenGUIApp#slotPopulateTrackInstrumentPopup() */ - void populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* instrumentPopup); + void populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* instrumentPopup); signals: // to emit what Track has been selected @@ -138,7 +138,7 @@ public slots: void slotToggleRecordTrack(int position); void slotToggleMutedTrack(int mutedTrack); void slotUpdateTracks(); - void slotRenameTrack(QString newName, TrackId trackId); + void slotRenameTrack(TQString newName, TrackId trackId); void slotSetTrackMeter(float value, int position); void slotSetMetersByInstrument(float value, InstrumentId id); @@ -176,27 +176,27 @@ protected: */ void makeButtons(); - QFrame* makeButton(TrackId trackId); - QString getPresentationName(Instrument *); + TQFrame* makeButton(TrackId trackId); + TQString getPresentationName(Instrument *); - void setButtonMapping(QObject*, TrackId); + void setButtonMapping(TQObject*, TrackId); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QVBoxLayout *m_layout; + TQVBoxLayout *m_layout; std::vector<KLedButton *> m_muteLeds; std::vector<KLedButton *> m_recordLeds; std::vector<TrackLabel *> m_trackLabels; std::vector<TrackVUMeter *> m_trackMeters; - std::vector<QFrame *> m_trackHBoxes; + std::vector<TQFrame *> m_trackHBoxes; - QSignalMapper *m_recordSigMapper; - QSignalMapper *m_muteSigMapper; - QSignalMapper *m_clickedSigMapper; - QSignalMapper *m_instListSigMapper; + TQSignalMapper *m_recordSigMapper; + TQSignalMapper *m_muteSigMapper; + TQSignalMapper *m_clickedSigMapper; + TQSignalMapper *m_instListSigMapper; // Number of tracks on our view // diff --git a/src/gui/editors/segment/TrackEditor.cpp b/src/gui/editors/segment/TrackEditor.cpp index 32c2b02..9eeb21b 100644 --- a/src/gui/editors/segment/TrackEditor.cpp +++ b/src/gui/editors/segment/TrackEditor.cpp @@ -24,7 +24,7 @@ #include "TrackEditor.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -64,33 +64,33 @@ #include <kcommand.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qfont.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qwidget.h> -#include <qvalidator.h> -#include <qdragobject.h> -#include <qtextstream.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqfont.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqwidget.h> +#include <tqvalidator.h> +#include <tqdragobject.h> +#include <tqtextstream.h> namespace Rosegarden { TrackEditor::TrackEditor(RosegardenGUIDoc* doc, - QWidget* rosegardenguiview, + TQWidget* rosegardenguiview, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel, - QWidget* parent, const char* name, + TQWidget* parent, const char* name, WFlags) : DCOPObject("TrackEditorIface"), - QWidget(parent, name), + TQWidget(parent, name), m_doc(doc), m_rulerScale(rulerScale), m_topStandardRuler(0), @@ -118,9 +118,9 @@ TrackEditor::~TrackEditor() } void -TrackEditor::init(QWidget* rosegardenguiview) +TrackEditor::init(TQWidget* rosegardenguiview) { - QGridLayout *grid = new QGridLayout(this, 4, 2); + TQGridLayout *grid = new TQGridLayout(this, 4, 2); int trackLabelWidth = 230; int barButtonsHeight = 25; @@ -164,18 +164,18 @@ TrackEditor::init(QWidget* rosegardenguiview) m_doc->getStudio(), m_rulerScale, getTrackCellHeight()); - connect(rosegardenguiview, SIGNAL(instrumentParametersChanged(InstrumentId)), - m_compositionModel, SLOT(slotInstrumentParametersChanged(InstrumentId))); - connect(rosegardenguiview->parent(), SIGNAL(instrumentParametersChanged(InstrumentId)), - m_compositionModel, SLOT(slotInstrumentParametersChanged(InstrumentId))); + connect(rosegardenguiview, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); + connect(rosegardenguiview->parent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); m_segmentCanvas = new CompositionView(m_doc, m_compositionModel, this); kapp->config()->setGroup(GeneralOptionsConfigGroup); if (kapp->config()->readBoolEntry("backgroundtextures", true)) { - QPixmap background; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - if (background.load(QString("%1/misc/bg-segmentcanvas.xpm"). + TQPixmap background; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + if (background.load(TQString("%1/misc/bg-segmentcanvas.xpm"). arg(pixmapDir))) { m_segmentCanvas->setBackgroundPixmap(background); m_segmentCanvas->viewport()->setBackgroundPixmap(background); @@ -202,7 +202,7 @@ TrackEditor::init(QWidget* rosegardenguiview) // Track Buttons // - // (must be put in a QScrollView) + // (must be put in a TQScrollView) // m_trackButtonScroll = new QDeferScrollView(this); grid->addWidget(m_trackButtonScroll, 3, 0); @@ -217,111 +217,111 @@ TrackEditor::init(QWidget* rosegardenguiview) canvasHeight, m_trackButtonScroll->viewport()); m_trackButtonScroll->addChild(m_trackButtons); - m_trackButtonScroll->setHScrollBarMode(QScrollView::AlwaysOff); - m_trackButtonScroll->setVScrollBarMode(QScrollView::AlwaysOff); - m_trackButtonScroll->setResizePolicy(QScrollView::AutoOneFit); + m_trackButtonScroll->setHScrollBarMode(TQScrollView::AlwaysOff); + m_trackButtonScroll->setVScrollBarMode(TQScrollView::AlwaysOff); + m_trackButtonScroll->setResizePolicy(TQScrollView::AutoOneFit); m_trackButtonScroll->setBottomMargin(m_bottomStandardRuler->height() + m_segmentCanvas->horizontalScrollBar()->height()); - connect(m_trackButtons, SIGNAL(widthChanged()), - this, SLOT(slotTrackButtonsWidthChanged())); + connect(m_trackButtons, TQT_SIGNAL(widthChanged()), + this, TQT_SLOT(slotTrackButtonsWidthChanged())); - connect(m_trackButtons, SIGNAL(trackSelected(int)), - rosegardenguiview, SLOT(slotSelectTrackSegments(int))); + connect(m_trackButtons, TQT_SIGNAL(trackSelected(int)), + rosegardenguiview, TQT_SLOT(slotSelectTrackSegments(int))); - connect(m_trackButtons, SIGNAL(instrumentSelected(int)), - rosegardenguiview, SLOT(slotUpdateInstrumentParameterBox(int))); + connect(m_trackButtons, TQT_SIGNAL(instrumentSelected(int)), + rosegardenguiview, TQT_SLOT(slotUpdateInstrumentParameterBox(int))); - connect(this, SIGNAL(stateChange(QString, bool)), - rosegardenguiview, SIGNAL(stateChange(QString, bool))); + connect(this, TQT_SIGNAL(stateChange(TQString, bool)), + rosegardenguiview, TQT_SIGNAL(stateChange(TQString, bool))); - connect(m_trackButtons, SIGNAL(modified()), - m_doc, SLOT(slotDocumentModified())); + connect(m_trackButtons, TQT_SIGNAL(modified()), + m_doc, TQT_SLOT(slotDocumentModified())); - connect(m_trackButtons, SIGNAL(muteButton(TrackId, bool)), - rosegardenguiview, SLOT(slotSetMuteButton(TrackId, bool))); + connect(m_trackButtons, TQT_SIGNAL(muteButton(TrackId, bool)), + rosegardenguiview, TQT_SLOT(slotSetMuteButton(TrackId, bool))); // connect loop rulers' follow-scroll signals - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_segmentCanvas, SLOT(startAutoScroll(int))); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_segmentCanvas, SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_segmentCanvas, SLOT(startAutoScroll(int))); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_segmentCanvas, SLOT(stopAutoScroll())); - - connect(m_segmentCanvas, SIGNAL(contentsMoving(int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_segmentCanvas, TQT_SLOT(startAutoScroll(int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_segmentCanvas, TQT_SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_segmentCanvas, TQT_SLOT(startAutoScroll(int))); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_segmentCanvas, TQT_SLOT(stopAutoScroll())); + + connect(m_segmentCanvas, TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); // Synchronize bar buttons' scrollview with segment canvas' scrollbar // - connect(m_segmentCanvas->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollTrackButtons(int))); + connect(m_segmentCanvas->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollTrackButtons(int))); - connect(m_segmentCanvas->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollTrackButtons(int))); + connect(m_segmentCanvas->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollTrackButtons(int))); // scrolling with mouse wheel - connect(m_trackButtonScroll, SIGNAL(gotWheelEvent(QWheelEvent*)), - m_segmentCanvas, SLOT(slotExternalWheelEvent(QWheelEvent*))); + connect(m_trackButtonScroll, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + m_segmentCanvas, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // Connect horizontal scrollbar // - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_tempoRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_tempoRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_tempoRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_tempoRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_chordNameRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_chordNameRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_chordNameRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_chordNameRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(this, SIGNAL(needUpdate()), m_segmentCanvas, SLOT(slotUpdateSegmentsDrawBuffer())); + connect(this, TQT_SIGNAL(needUpdate()), m_segmentCanvas, TQT_SLOT(slotUpdateSegmentsDrawBuffer())); connect(m_segmentCanvas->getModel(), - SIGNAL(selectedSegments(const SegmentSelection &)), + TQT_SIGNAL(selectedSegments(const SegmentSelection &)), rosegardenguiview, - SLOT(slotSelectedSegments(const SegmentSelection &))); + TQT_SLOT(slotSelectedSegments(const SegmentSelection &))); - connect(m_segmentCanvas, SIGNAL(zoomIn()), - RosegardenGUIApp::self(), SLOT(slotZoomIn())); - connect(m_segmentCanvas, SIGNAL(zoomOut()), - RosegardenGUIApp::self(), SLOT(slotZoomOut())); + connect(m_segmentCanvas, TQT_SIGNAL(zoomIn()), + RosegardenGUIApp::self(), TQT_SLOT(slotZoomIn())); + connect(m_segmentCanvas, TQT_SIGNAL(zoomOut()), + RosegardenGUIApp::self(), TQT_SLOT(slotZoomOut())); - connect(getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - connect(m_doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // // pointer and loop drag signals from top and bottom bar buttons (loop rulers actually) // - connect(m_topStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotPointerDraggedToPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotPointerDraggedToPosition(timeT))); + connect(m_topStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotPointerDraggedToPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotPointerDraggedToPosition(timeT))); - connect(m_topStandardRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SLOT(slotLoopDraggedToPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SLOT(slotLoopDraggedToPosition(timeT))); + connect(m_topStandardRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SLOT(slotLoopDraggedToPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SLOT(slotLoopDraggedToPosition(timeT))); - connect(m_doc, SIGNAL(loopChanged(timeT, + connect(m_doc, TQT_SIGNAL(loopChanged(timeT, timeT)), - this, SLOT(slotSetLoop(timeT, timeT))); + this, TQT_SLOT(slotSetLoop(timeT, timeT))); } void TrackEditor::slotReadjustCanvasSize() @@ -342,17 +342,17 @@ void TrackEditor::slotTrackButtonsWidthChanged() int TrackEditor::getTrackCellHeight() const { int size; - static QFont defaultFont; + static TQFont defaultFont; // do some scrabbling around for a reasonable size // size = defaultFont.pixelSize(); if (size < 8) { - if (QApplication::font(this).pixelSize() < 8) + if (TQApplication::font(this).pixelSize() < 8) size = 12; else - size = QApplication::font(this).pixelSize(); + size = TQApplication::font(this).pixelSize(); } return size + 12; @@ -382,7 +382,7 @@ void TrackEditor::updateRulers() getBottomStandardRuler()->update(); } -void TrackEditor::paintEvent(QPaintEvent* e) +void TrackEditor::paintEvent(TQPaintEvent* e) { if (isCompositionModified()) { @@ -407,7 +407,7 @@ void TrackEditor::paintEvent(QPaintEvent* e) setCompositionModified(false); } - QWidget::paintEvent(e); + TQWidget::paintEvent(e); } void TrackEditor::slotAddTracks(unsigned int nbNewTracks, @@ -443,7 +443,7 @@ void TrackEditor::addSegment(int track, int time, unsigned int duration) void TrackEditor::slotSegmentOrderChanged(int section, int fromIdx, int toIdx) { - RG_DEBUG << QString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") + RG_DEBUG << TQString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") .arg(section).arg(fromIdx).arg(toIdx) << endl; //!!! how do we get here? need to involve a command @@ -461,7 +461,7 @@ TrackEditor::slotCanvasScrolled(int x, int y) m_bottomStandardRuler->getLoopRuler()->hasActiveMousePress() && !m_bottomStandardRuler->getLoopRuler()->getLoopingMode())) { - int mx = m_segmentCanvas->viewport()->mapFromGlobal(QCursor::pos()).x(); + int mx = m_segmentCanvas->viewport()->mapFromGlobal(TQCursor::pos()).x(); m_segmentCanvas->setPointerPos(x + mx); // bad idea, creates a feedback loop @@ -642,7 +642,7 @@ TrackEditor::slotTurnRepeatingSegmentToRealCopies() if (segments.size() == 0) return ; - QString text; + TQString text; if (segments.size() == 1) text = i18n("Turn Repeating Segment into Real Copies"); @@ -668,16 +668,16 @@ TrackEditor::slotVerticalScrollTrackButtons(int y) m_trackButtonScroll->setContentsPos(0, y); } -void TrackEditor::dragEnterEvent(QDragEnterEvent *event) +void TrackEditor::dragEnterEvent(TQDragEnterEvent *event) { - event->accept(QUriDrag::canDecode(event) || - QTextDrag::canDecode(event)); + event->accept(TQUriDrag::canDecode(event) || + TQTextDrag::canDecode(event)); } -void TrackEditor::dropEvent(QDropEvent* event) +void TrackEditor::dropEvent(TQDropEvent* event) { - QStrList uri; - QString text; + TQStrList uri; + TQString text; int heightAdjust = 0; //int widthAdjust = 0; @@ -693,7 +693,7 @@ void TrackEditor::dropEvent(QDropEvent* event) if (m_chordNameRuler && m_chordNameRuler->isVisible()) heightAdjust += m_chordNameRuler->height(); - QPoint posInSegmentCanvas = + TQPoint posInSegmentCanvas = m_segmentCanvas->viewportToContents (m_segmentCanvas-> viewport()->mapFrom(this, event->pos())); @@ -706,20 +706,20 @@ void TrackEditor::dropEvent(QDropEvent* event) m_segmentCanvas->grid().snapX(posInSegmentCanvas.x()); - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { RG_DEBUG << "TrackEditor::dropEvent() : got URI :" << uri.first() << endl; - QString uriPath = uri.first(); + TQString uriPath = uri.first(); if (uriPath.endsWith(".rg")) { emit droppedDocument(uriPath); } else { - QStrList uris; - QString uri; - if (QUriDrag::decode(event, uris)) uri = uris.first(); -// QUriDrag::decodeLocalFiles(event, files); -// QString filePath = files.first(); + TQStrList uris; + TQString uri; + if (TQUriDrag::decode(event, uris)) uri = uris.first(); +// TQUriDrag::decodeLocalFiles(event, files); +// TQString filePath = files.first(); RG_DEBUG << "TrackEditor::dropEvent() : got URI: " << uri << endl; @@ -736,8 +736,8 @@ void TrackEditor::dropEvent(QDropEvent* event) Track* track = m_doc->getComposition().getTrackByPosition(trackPos); if (track) { - QString audioText; - QTextOStream t(&audioText); + TQString audioText; + TQTextOStream t(&audioText); t << uri << "\n"; t << track->getId() << "\n"; @@ -748,7 +748,7 @@ void TrackEditor::dropEvent(QDropEvent* event) } - } else if (QTextDrag::decode(event, text)) { + } else if (TQTextDrag::decode(event, text)) { RG_DEBUG << "TrackEditor::dropEvent() : got text info " << endl; //<< text << endl; @@ -758,14 +758,14 @@ void TrackEditor::dropEvent(QDropEvent* event) // WARNING // // DO NOT PERFORM ANY OPERATIONS AFTER THAT - // EMITTING THIS SIGNAL TRIGGERS THE LOADING OF A NEW DOCUMENT + // EMITTING THIS TQT_SIGNAL TRIGGERS THE LOADING OF A NEW DOCUMENT // AND AS A CONSEQUENCE THE DELETION OF THIS TrackEditor OBJECT // } else { - QTextIStream s(&text); + TQTextIStream s(&text); - QString id; + TQString id; AudioFileId audioFileId; RealTime startTime, endTime; @@ -796,8 +796,8 @@ void TrackEditor::dropEvent(QDropEvent* event) << posInSegmentCanvas.x() << endl; - QString audioText; - QTextOStream t(&audioText); + TQString audioText; + TQTextOStream t(&audioText); t << audioFileId << "\n"; t << track->getId() << "\n"; t << time << "\n"; // time on canvas diff --git a/src/gui/editors/segment/TrackEditor.h b/src/gui/editors/segment/TrackEditor.h index 6670a15..b2c2bd2 100644 --- a/src/gui/editors/segment/TrackEditor.h +++ b/src/gui/editors/segment/TrackEditor.h @@ -29,15 +29,15 @@ #include "base/MidiProgram.h" #include <map> #include "TrackEditorIface.h" -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> #include "base/Event.h" #include "gui/editors/segment/TrackButtons.h" -class QPaintEvent; -class QDropEvent; -class QDragEnterEvent; +class TQPaintEvent; +class TQDropEvent; +class TQDragEnterEvent; class KCommand; @@ -65,7 +65,7 @@ class StandardRuler; * * @see CompositionView */ -class TrackEditor : public QWidget, virtual public TrackEditorIface +class TrackEditor : public TQWidget, virtual public TrackEditorIface { Q_OBJECT public: @@ -73,11 +73,11 @@ public: * Create a new TrackEditor representing the document \a doc */ TrackEditor(RosegardenGUIDoc* doc, - QWidget* rosegardenguiview, + TQWidget* rosegardenguiview, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel = 0, - QWidget* parent = 0, const char* name = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); ~TrackEditor(); @@ -181,35 +181,35 @@ signals: /** * sent back to RosegardenGUI */ - void stateChange(QString, bool); + void stateChange(TQString, bool); /** * A URI to a Rosegarden document was dropped on the canvas * * @see RosegardenGUI#slotOpenURL() */ - void droppedDocument(QString uri); + void droppedDocument(TQString uri); /** * An audio file was dropped from the audio manager dialog */ - void droppedAudio(QString audioDesc); + void droppedAudio(TQString audioDesc); /** * And audio file was dropped from konqi say and needs to be * inserted into AudioManagerDialog before adding to the * composition. */ - void droppedNewAudio(QString audioDesc); + void droppedNewAudio(TQString audioDesc); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent*); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent*); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); - void init(QWidget *); + void init(TQWidget *); bool isCompositionModified(); void setCompositionModified(bool); diff --git a/src/gui/editors/segment/TrackHeader.cpp b/src/gui/editors/segment/TrackHeader.cpp index d7ca6d3..367d02b 100644 --- a/src/gui/editors/segment/TrackHeader.cpp +++ b/src/gui/editors/segment/TrackHeader.cpp @@ -25,10 +25,10 @@ #include "TrackHeader.h" -#include <qheader.h> -#include <qpainter.h> -#include <qrect.h> -#include <qwidget.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqwidget.h> namespace Rosegarden @@ -38,9 +38,9 @@ TrackHeader::~TrackHeader() {} void -TrackHeader::paintEvent(QPaintEvent *e) +TrackHeader::paintEvent(TQPaintEvent *e) { - QPainter p( this ); + TQPainter p( this ); p.setPen( colorGroup().buttonText() ); int pos = (orientation() == Horizontal) ? e->rect().left() @@ -52,7 +52,7 @@ TrackHeader::paintEvent(QPaintEvent *e) else id = 0; for ( int i = id; i < count(); i++ ) { - QRect r = sRect( i ); + TQRect r = sRect( i ); paintSection( &p, i, r ); if ( orientation() == Horizontal && r. right() >= e->rect().right() || orientation() == Vertical && r. bottom() >= e->rect().bottom() ) diff --git a/src/gui/editors/segment/TrackHeader.h b/src/gui/editors/segment/TrackHeader.h index fe404c3..91bef26 100644 --- a/src/gui/editors/segment/TrackHeader.h +++ b/src/gui/editors/segment/TrackHeader.h @@ -26,11 +26,11 @@ #ifndef _RG_TRACKHEADER_H_ #define _RG_TRACKHEADER_H_ -#include <qheader.h> +#include <tqheader.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -43,16 +43,16 @@ class TrackHeader : public QHeader public: TrackHeader(int number, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0 ): - QHeader(number, parent, name) {;} + TQHeader(number, parent, name) {;} ~TrackHeader(); protected: - virtual void paintEvent(QPaintEvent *pe); -// void paintSection(QPainter * p, int index, QRect fr); -// void paintSectionLabel (QPainter * p, int index, const QRect & fr); -// QRect sRect (int index); + virtual void paintEvent(TQPaintEvent *pe); +// void paintSection(TQPainter * p, int index, TQRect fr); +// void paintSectionLabel (TQPainter * p, int index, const TQRect & fr); +// TQRect sRect (int index); private: diff --git a/src/gui/editors/segment/TrackLabel.cpp b/src/gui/editors/segment/TrackLabel.cpp index 90561d1..9df485f 100644 --- a/src/gui/editors/segment/TrackLabel.cpp +++ b/src/gui/editors/segment/TrackLabel.cpp @@ -28,16 +28,16 @@ #include <klocale.h> #include "base/Track.h" #include <klineeditdlg.h> -#include <qfont.h> -#include <qframe.h> -#include <qlabel.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qvalidator.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqvalidator.h> namespace Rosegarden @@ -45,15 +45,15 @@ namespace Rosegarden TrackLabel::TrackLabel(TrackId id, int position, - QWidget *parent, + TQWidget *parent, const char *name): - QWidgetStack(parent, name), - m_instrumentLabel(new QLabel(this)), - m_trackLabel(new QLabel(this)), + TQWidgetStack(parent, name), + m_instrumentLabel(new TQLabel(this)), + m_trackLabel(new TQLabel(this)), m_id(id), m_position(position) { - QFont font; + TQFont font; font.setPointSize(font.pointSize() * 95 / 100); if (font.pixelSize() > 14) font.setPixelSize(14); @@ -65,15 +65,15 @@ TrackLabel::TrackLabel(TrackId id, addWidget(m_trackLabel, ShowTrack); raiseWidget(ShowTrack); - m_instrumentLabel->setFrameShape(QFrame::NoFrame); - m_trackLabel->setFrameShape(QFrame::NoFrame); + m_instrumentLabel->setFrameShape(TQFrame::NoFrame); + m_trackLabel->setFrameShape(TQFrame::NoFrame); - m_pressTimer = new QTimer(this); + m_pressTimer = new TQTimer(this); - connect(m_pressTimer, SIGNAL(timeout()), - this, SIGNAL(changeToInstrumentList())); + connect(m_pressTimer, TQT_SIGNAL(timeout()), + this, TQT_SIGNAL(changeToInstrumentList())); - QToolTip::add + TQToolTip::add (this, i18n("Click and hold with left mouse button to assign this Track to an Instrument.")); } @@ -87,7 +87,7 @@ void TrackLabel::setIndent(int i) m_trackLabel->setIndent(i); } -void TrackLabel::setAlternativeLabel(const QString &label) +void TrackLabel::setAlternativeLabel(const TQString &label) { // recover saved original if (label.isEmpty()) { @@ -142,7 +142,7 @@ TrackLabel::setSelected(bool on) } void -TrackLabel::mousePressEvent(QMouseEvent *e) +TrackLabel::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) { @@ -157,7 +157,7 @@ TrackLabel::mousePressEvent(QMouseEvent *e) } void -TrackLabel::mouseReleaseEvent(QMouseEvent *e) +TrackLabel::mouseReleaseEvent(TQMouseEvent *e) { // stop the timer if running if (m_pressTimer->isActive()) @@ -169,7 +169,7 @@ TrackLabel::mouseReleaseEvent(QMouseEvent *e) } void -TrackLabel::mouseDoubleClickEvent(QMouseEvent *e) +TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) { if (e->button() != LeftButton) return ; @@ -186,9 +186,9 @@ TrackLabel::mouseDoubleClickEvent(QMouseEvent *e) bool ok = false; - QRegExpValidator validator(QRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK - QString newText = KLineEditDlg::getText(i18n("Change track name"), + TQString newText = KLineEditDlg::getText(i18n("Change track name"), i18n("Enter new track name"), m_trackLabel->text(), &ok, diff --git a/src/gui/editors/segment/TrackLabel.h b/src/gui/editors/segment/TrackLabel.h index e56d0e5..b7aac70 100644 --- a/src/gui/editors/segment/TrackLabel.h +++ b/src/gui/editors/segment/TrackLabel.h @@ -27,14 +27,14 @@ #define _RG_TRACKLABEL_H_ #include "base/Track.h" -#include <qstring.h> -#include <qwidgetstack.h> +#include <tqstring.h> +#include <tqwidgetstack.h> -class QWidget; -class QTimer; -class QMouseEvent; -class QLabel; +class TQWidget; +class TQTimer; +class TQMouseEvent; +class TQLabel; namespace Rosegarden @@ -43,7 +43,7 @@ namespace Rosegarden /** - * Specialises QLabel to create in effect a toggleable and hence + * Specialises TQLabel to create in effect a toggleable and hence * selectable label/label list. In conjunction with TrackButtons * provides a framework for Track selection on the TrackCanvas. */ @@ -61,17 +61,17 @@ public: TrackLabel(TrackId id, int position, - QWidget *parent, + TQWidget *parent, const char *name=0); ~TrackLabel(); - // QLabel API delegation - applies on both labels + // TQLabel API delegation - applies on both labels void setIndent(int); - QLabel* getInstrumentLabel() { return m_instrumentLabel; } - QLabel* getTrackLabel() { return m_trackLabel; } - void setAlternativeLabel(const QString &label); + TQLabel* getInstrumentLabel() { return m_instrumentLabel; } + TQLabel* getTrackLabel() { return m_trackLabel; } + void setAlternativeLabel(const TQString &label); void clearAlternativeLabel(); void showLabel(InstrumentTrackLabels); @@ -91,29 +91,29 @@ signals: // We emit this once we've renamed a track // - void renameTrack(QString, TrackId); + void renameTrack(TQString, TrackId); void changeToInstrumentList(); protected: - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); - QLabel* getVisibleLabel(); + TQLabel* getVisibleLabel(); //--------------- Data members --------------------------------- - QLabel *m_instrumentLabel; - QLabel *m_trackLabel; - QString m_alternativeLabel; + TQLabel *m_instrumentLabel; + TQLabel *m_trackLabel; + TQString m_alternativeLabel; TrackId m_id; int m_position; bool m_selected; - QTimer *m_pressTimer; + TQTimer *m_pressTimer; }; diff --git a/src/gui/editors/segment/TrackVUMeter.cpp b/src/gui/editors/segment/TrackVUMeter.cpp index a638ee7..f8acbe8 100644 --- a/src/gui/editors/segment/TrackVUMeter.cpp +++ b/src/gui/editors/segment/TrackVUMeter.cpp @@ -26,15 +26,15 @@ #include "TrackVUMeter.h" #include "gui/widgets/VUMeter.h" -#include <qfont.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TrackVUMeter::TrackVUMeter(QWidget *parent, +TrackVUMeter::TrackVUMeter(TQWidget *parent, VUMeterType type, int width, int height, @@ -45,7 +45,7 @@ TrackVUMeter::TrackVUMeter(QWidget *parent, { setAlignment(AlignCenter); - QFont font; + TQFont font; font.setPointSize(font.pointSize() * 95 / 100); if (font.pointSize() > 14) font.setPointSize(14); @@ -67,7 +67,7 @@ TrackVUMeter::meterStop() { setMinimumHeight(m_textHeight); setMaximumHeight(m_textHeight); - setText(QString("%1").arg(m_position + 1)); + setText(TQString("%1").arg(m_position + 1)); if (m_active) { m_active = false; update(); diff --git a/src/gui/editors/segment/TrackVUMeter.h b/src/gui/editors/segment/TrackVUMeter.h index 26b8e4e..dad0455 100644 --- a/src/gui/editors/segment/TrackVUMeter.h +++ b/src/gui/editors/segment/TrackVUMeter.h @@ -29,7 +29,7 @@ #include "gui/widgets/VUMeter.h" -class QWidget; +class TQWidget; namespace Rosegarden @@ -40,7 +40,7 @@ namespace Rosegarden class TrackVUMeter: public VUMeter { public: - TrackVUMeter(QWidget *parent = 0, + TrackVUMeter(TQWidget *parent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/editors/segment/TriggerManagerItem.cpp b/src/gui/editors/segment/TriggerManagerItem.cpp index 2e7402d..bd3d64a 100644 --- a/src/gui/editors/segment/TriggerManagerItem.cpp +++ b/src/gui/editors/segment/TriggerManagerItem.cpp @@ -27,12 +27,12 @@ namespace Rosegarden { int -TriggerManagerItem::compare(QListViewItem * i, int col, bool ascending) const +TriggerManagerItem::compare(TQListViewItem * i, int col, bool ascending) const { TriggerManagerItem *ei = dynamic_cast<TriggerManagerItem *>(i); - if (!ei) return QListViewItem::compare(i, col, ascending); + if (!ei) return TQListViewItem::compare(i, col, ascending); // col 0 -> index -- numeric compare // col 1 -> ID -- numeric compare @@ -43,7 +43,7 @@ TriggerManagerItem::compare(QListViewItem * i, int col, bool ascending) const // col 6 -> usage count -- numeric compare // if (col == 2) { - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } else if (col == 3) { if (m_rawDuration < ei->getRawDuration()) return -1; else if (ei->getRawDuration() < m_rawDuration) return 1; diff --git a/src/gui/editors/segment/TriggerManagerItem.h b/src/gui/editors/segment/TriggerManagerItem.h index c1eb95a..7af5619 100644 --- a/src/gui/editors/segment/TriggerManagerItem.h +++ b/src/gui/editors/segment/TriggerManagerItem.h @@ -35,18 +35,18 @@ namespace Rosegarden { class TriggerManagerItem : public QListViewItem { public: - TriggerManagerItem(QListView * parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null): - QListViewItem(parent, label1, label2, label3, label4, + TriggerManagerItem(TQListView * parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null): + TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { ; } - virtual int compare(QListViewItem * i, int col, bool ascending) const; + virtual int compare(TQListViewItem * i, int col, bool ascending) const; void setRawDuration(timeT raw) { m_rawDuration = raw; } timeT getRawDuration() const { return m_rawDuration; } diff --git a/src/gui/editors/segment/TriggerSegmentManager.cpp b/src/gui/editors/segment/TriggerSegmentManager.cpp index 3fb1732..76e71bf 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.cpp +++ b/src/gui/editors/segment/TriggerSegmentManager.cpp @@ -25,7 +25,7 @@ #include "TriggerSegmentManager.h" #include "TriggerManagerItem.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "base/BaseProperties.h" @@ -56,30 +56,30 @@ #include <kstdaccel.h> #include <kstdaction.h> #include <kconfig.h> -#include <qaccel.h> -#include <qdialog.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcanvas.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcanvas.h> namespace Rosegarden { -TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, +TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "triggereditordialog"), m_doc(doc), m_modified(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Triggered Segments")); @@ -97,32 +97,32 @@ TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, for (int i = 0; i < 2; ++i) m_listView->setColumnAlignment(i, Qt::AlignHCenter); - 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_deleteAllButton = new QPushButton(i18n("Delete All"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); + m_deleteAllButton = new TQPushButton(i18n("Delete All"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteAllButton, i18n("Delete All Triggered Segments")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Triggered Segment Manager")); @@ -135,41 +135,41 @@ TriggerSegmentManager::TriggerSegmentManager(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())); - connect(m_closeButton, SIGNAL(released()), - SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), + TQT_SLOT(slotClose())); - connect(m_deleteAllButton, SIGNAL(released()), - SLOT(slotDeleteAll())); + connect(m_deleteAllButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDeleteAll())); 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 *))); - connect(m_listView, SIGNAL(pressed(QListViewItem *)), - this, SLOT(slotItemClicked(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem *)), + this, TQT_SLOT(slotItemClicked(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); m_listView->setItemsRenameable(true); initDialog(); setAutoSaveSettings(TriggerManagerConfigGroup, true); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } TriggerSegmentManager::~TriggerSegmentManager() @@ -237,25 +237,25 @@ TriggerSegmentManager::slotUpdate() (*it)->getSegment()->getEndMarkerTime() - (*it)->getSegment()->getStartTime(); - QString timeString = makeDurationString + TQString timeString = makeDurationString (first, duration, timeMode); - QString label = strtoqstr((*it)->getSegment()->getLabel()); + TQString label = strtoqstr((*it)->getSegment()->getLabel()); if (label == "") label = i18n("<no label>"); - QString used = i18n("%1 on 1 track", + TQString used = i18n("%1 on 1 track", "%1 on %n tracks", tracks.size()).arg(uses); - QString pitch = QString("%1 (%2)") + TQString pitch = TQString("%1 (%2)") .arg(MidiPitchLabel((*it)->getBasePitch()).getQString()) .arg((*it)->getBasePitch()); - QString velocity = QString("%1").arg((*it)->getBaseVelocity()); + TQString velocity = TQString("%1").arg((*it)->getBaseVelocity()); item = new TriggerManagerItem - (m_listView, QString("%1").arg(i + 1), QString("%1").arg((*it)->getId()), + (m_listView, TQString("%1").arg(i + 1), TQString("%1").arg((*it)->getId()), label, timeString, pitch, velocity, used); item->setRawDuration(duration); @@ -268,13 +268,13 @@ TriggerSegmentManager::slotUpdate() } if (m_listView->childCount() == 0) { - QListViewItem *item = + TQListViewItem *item = new TriggerManagerItem(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); } } @@ -287,7 +287,7 @@ TriggerSegmentManager::slotDeleteAll() RG_DEBUG << "TriggerSegmentManager::slotDeleteAll" << endl; KMacroCommand *command = new KMacroCommand(i18n("Remove all triggered segments")); - QListViewItem *it = m_listView->firstChild(); + TQListViewItem *it = m_listView->firstChild(); do { @@ -314,7 +314,7 @@ TriggerSegmentManager::slotAdd() &m_doc->getComposition(), 0, 3840, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { addCommandToHistory(new AddTriggerSegmentCommand (m_doc, dialog.getTime(), 64)); } @@ -376,13 +376,13 @@ void TriggerSegmentManager::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())); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -398,7 +398,7 @@ TriggerSegmentManager::setupActions() KStdAction::stdName(KStdAction::Redo)); new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, this, - SLOT(slotPasteAsNew()), actionCollection(), + TQT_SLOT(slotPasteAsNew()), actionCollection(), "paste_to_trigger_segment"); kapp->config()->setGroup(TriggerManagerConfigGroup); @@ -406,31 +406,31 @@ TriggerSegmentManager::setupActions() KRadioAction *action; - QCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); - QIconSet icon(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); + TQIconSet icon(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -469,7 +469,7 @@ TriggerSegmentManager::checkModified() } void -TriggerSegmentManager::slotEdit(QListViewItem *i) +TriggerSegmentManager::slotEdit(TQListViewItem *i) { RG_DEBUG << "TriggerSegmentManager::slotEdit" << endl; @@ -487,7 +487,7 @@ TriggerSegmentManager::slotEdit(QListViewItem *i) } void -TriggerSegmentManager::closeEvent(QCloseEvent *e) +TriggerSegmentManager::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -504,7 +504,7 @@ TriggerSegmentManager::setDocument(RosegardenGUIDoc *doc) } void -TriggerSegmentManager::slotItemClicked(QListViewItem *item) +TriggerSegmentManager::slotItemClicked(TQListViewItem *item) { RG_DEBUG << "TriggerSegmentManager::slotItemClicked" << endl; } @@ -522,7 +522,7 @@ TriggerSegmentManager::makeDurationString(timeT time, int bar, beat, fraction, remainder; m_doc->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -539,12 +539,12 @@ TriggerSegmentManager::makeDurationString(timeT time, RealTime rt = m_doc->getComposition().getRealTimeDifference (time, time + duration); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(duration); + return TQString("%1 ").arg(duration); } } diff --git a/src/gui/editors/segment/TriggerSegmentManager.h b/src/gui/editors/segment/TriggerSegmentManager.h index 2de6488..4746a0e 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.h +++ b/src/gui/editors/segment/TriggerSegmentManager.h @@ -27,15 +27,15 @@ #define _RG_TRIGGERSEGMENTMANAGER_H_ #include <kmainwindow.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QPushButton; -class QListViewItem; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQCloseEvent; +class TQAccel; class KListView; class KCommand; @@ -52,7 +52,7 @@ class TriggerSegmentManager : public KMainWindow Q_OBJECT public: - TriggerSegmentManager(QWidget *parent, + TriggerSegmentManager(TQWidget *parent, RosegardenGUIDoc *doc); ~TriggerSegmentManager(); @@ -67,7 +67,7 @@ public: // reset the document void setDocument(RosegardenGUIDoc *doc); - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } public slots: void slotUpdate(); @@ -76,8 +76,8 @@ public slots: void slotDelete(); void slotDeleteAll(); void slotClose(); - void slotEdit(QListViewItem *); - void slotItemClicked(QListViewItem *); + void slotEdit(TQListViewItem *); + void slotItemClicked(TQListViewItem *); void slotPasteAsNew(); void slotMusicalTime(); @@ -89,25 +89,25 @@ signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); - QString makeDurationString(timeT startTime, + TQString makeDurationString(timeT startTime, timeT duration, int timeMode); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QPushButton *m_closeButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; - QPushButton *m_deleteAllButton; + TQPushButton *m_closeButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; + TQPushButton *m_deleteAllButton; KListView *m_listView; bool m_modified; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp index 1b982dc..b0d3f3b 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp @@ -34,8 +34,8 @@ #include "misc/Debug.h" #include "document/ConfigGroups.h" -#include <qimage.h> -#include <qapplication.h> +#include <tqimage.h> +#include <tqapplication.h> #include <kapp.h> #include <kconfig.h> @@ -57,7 +57,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, { int pixWidth = std::min(m_rect.getBaseWidth(), tileWidth()); - m_image = QImage(pixWidth, m_rect.height(), 8, 4); + m_image = TQImage(pixWidth, m_rect.height(), 8, 4); m_image.setAlphaBuffer(true); m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2); @@ -67,7 +67,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, int AudioPreviewPainter::tileWidth() { static int tw = -1; - if (tw == -1) tw = QApplication::desktop()->width(); + if (tw == -1) tw = TQApplication::desktop()->width(); return tw; } @@ -294,7 +294,7 @@ void AudioPreviewPainter::finalizeCurrentSlice() m_image.setColor(0, qRgba(255, 255, 255, 0)); // foreground from computeSegmentPreviewColor - QColor c = m_model.computeSegmentPreviewColor(m_segment); + TQColor c = m_model.computeSegmentPreviewColor(m_segment); QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255); m_image.setColor(1, rgba); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h index b3c1cac..202b5dd 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h @@ -27,8 +27,8 @@ #include "CompositionModel.h" -#include <qpainter.h> -#include <qcolor.h> +#include <tqpainter.h> +#include <tqcolor.h> namespace Rosegarden { @@ -60,12 +60,12 @@ protected: const Segment* m_segment; CompositionRect m_rect; - QImage m_image; + TQImage m_image; PixmapArray m_previewPixmaps; - QPainter m_p; - QPainter m_pb; - QColor m_defaultCol; + TQPainter m_p; + TQPainter m_pb; + TQColor m_defaultCol; int m_penWidth; int m_height; int m_halfRectHeight; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp index ae64134..b686b35 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp @@ -28,11 +28,11 @@ #include "base/RealTime.h" #include "sound/AudioFileManager.h" #include "sound/PeakFileManager.h" -#include <qapplication.h> -#include <qevent.h> -#include <qmutex.h> -#include <qobject.h> -#include <qthread.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqobject.h> +#include <tqthread.h> namespace Rosegarden @@ -59,8 +59,8 @@ AudioPreviewThread::run() if (m_queue.empty()) { if (m_emptyQueueListener && !emptyQueueSignalled) { - QApplication::postEvent(m_emptyQueueListener, - new QCustomEvent(AudioPreviewQueueEmpty, 0)); + TQApplication::postEvent(m_emptyQueueListener, + new TQCustomEvent(AudioPreviewQueueEmpty, 0)); emptyQueueSignalled = true; } @@ -159,10 +159,10 @@ AudioPreviewThread::process() unsigned int channels = m_manager->getAudioFile(req.audioFileId)->getChannels(); m_results[token] = ResultsPair(channels, results); - QObject *notify = req.notify; - QApplication::postEvent + TQObject *notify = req.notify; + TQApplication::postEvent (notify, - new QCustomEvent(AudioPreviewReady, (void *)token)); + new TQCustomEvent(AudioPreviewReady, (void *)token)); } m_mutex.unlock(); @@ -261,7 +261,7 @@ AudioPreviewThread::getPreview(int token, unsigned int &channels, return ; } -const QEvent::Type AudioPreviewThread::AudioPreviewReady = QEvent::Type(QEvent::User + 1); -const QEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = QEvent::Type(QEvent::User + 2); +const TQEvent::Type AudioPreviewThread::AudioPreviewReady = TQEvent::Type(TQEvent::User + 1); +const TQEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = TQEvent::Type(TQEvent::User + 2); } diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h index ae3ac81..0337346 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h @@ -28,14 +28,14 @@ #include "base/RealTime.h" #include <map> -#include <qevent.h> -#include <qmutex.h> -#include <qthread.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqthread.h> #include <utility> #include <vector> -class QObject; +class TQObject; namespace Rosegarden @@ -58,7 +58,7 @@ public: RealTime audioEndTime; int width; bool showMinima; - QObject *notify; + TQObject *notify; }; virtual int requestPreview(const Request &request); @@ -66,10 +66,10 @@ public: virtual void getPreview(int token, unsigned int &channels, std::vector<float> &values); - void setEmptyQueueListener(QObject* o) { m_emptyQueueListener = o; } + void setEmptyQueueListener(TQObject* o) { m_emptyQueueListener = o; } - static const QEvent::Type AudioPreviewReady; - static const QEvent::Type AudioPreviewQueueEmpty; + static const TQEvent::Type AudioPreviewReady; + static const TQEvent::Type AudioPreviewQueueEmpty; protected: @@ -80,7 +80,7 @@ protected: int m_nextToken; bool m_exiting; - QObject* m_emptyQueueListener; + TQObject* m_emptyQueueListener; typedef std::pair<int, Request> RequestRec; typedef std::multimap<int, RequestRec> RequestQueue; @@ -90,7 +90,7 @@ protected: typedef std::map<int, ResultsPair> ResultsQueue; ResultsQueue m_results; - QMutex m_mutex; + TQMutex m_mutex; }; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp index 76497b9..182eb9b 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp @@ -31,9 +31,9 @@ #include "base/RealTime.h" #include "base/Segment.h" #include "CompositionModelImpl.h" -#include <qevent.h> -#include <qobject.h> -#include <qrect.h> +#include <tqevent.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden @@ -43,9 +43,9 @@ static int apuExtantCount = 0; AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread, const Composition& c, const Segment* s, - const QRect& r, + const TQRect& r, CompositionModelImpl* parent) - : QObject(parent), + : TQObject(parent), m_thread(thread), m_composition(c), m_segment(s), @@ -100,12 +100,12 @@ void AudioPreviewUpdater::cancel() m_previewToken = -1; } -bool AudioPreviewUpdater::event(QEvent *e) +bool AudioPreviewUpdater::event(TQEvent *e) { RG_DEBUG << "AudioPreviewUpdater(" << this << ")::event (" << e << ")" << endl; if (e->type() == AudioPreviewThread::AudioPreviewReady) { - QCustomEvent *ev = dynamic_cast<QCustomEvent *>(e); + TQCustomEvent *ev = dynamic_cast<TQCustomEvent *>(e); if (ev) { intptr_t token = (intptr_t)ev->data(); m_channels = 0; // to be filled as getPreview return value @@ -142,7 +142,7 @@ bool AudioPreviewUpdater::event(QEvent *e) } } - return QObject::event(e); + return TQObject::event(e); } } diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h index ffc97c9..347ba16 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h @@ -26,12 +26,12 @@ #ifndef _RG_AUDIOPREVIEWUPDATER_H_ #define _RG_AUDIOPREVIEWUPDATER_H_ -#include <qobject.h> -#include <qrect.h> +#include <tqobject.h> +#include <tqrect.h> #include <vector> -class QEvent; +class TQEvent; namespace Rosegarden @@ -51,15 +51,15 @@ public: AudioPreviewUpdater(AudioPreviewThread &thread, const Composition &composition, const Segment *segment, - const QRect &displayExtent, + const TQRect &displayExtent, CompositionModelImpl *parent); ~AudioPreviewUpdater(); void update(); void cancel(); - QRect getDisplayExtent() const { return m_rect; } - void setDisplayExtent(const QRect &rect) { m_rect = rect; } + TQRect getDisplayExtent() const { return m_rect; } + void setDisplayExtent(const TQRect &rect) { m_rect = rect; } const Segment *getSegment() const { return m_segment; } @@ -70,13 +70,13 @@ signals: void audioPreviewComplete(AudioPreviewUpdater*); protected: - virtual bool event(QEvent*); + virtual bool event(TQEvent*); AudioPreviewThread& m_thread; const Composition& m_composition; const Segment* m_segment; - QRect m_rect; + TQRect m_rect; bool m_showMinima; unsigned int m_channels; std::vector<float> m_values; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp index b36d6e0..b9f05d4 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp @@ -26,7 +26,7 @@ #include "CompositionColourCache.h" #include "gui/general/GUIPalette.h" -#include <qcolor.h> +#include <tqcolor.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h index 32d4719..c9dcafc 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h @@ -26,7 +26,7 @@ #ifndef _RG_COMPOSITIONCOLOURCACHE_H_ #define _RG_COMPOSITIONCOLOURCACHE_H_ -#include <qcolor.h> +#include <tqcolor.h> @@ -43,19 +43,19 @@ public: void init(); - QColor SegmentCanvas; - QColor SegmentAudioPreview; - QColor SegmentInternalPreview; - QColor SegmentLabel; - QColor SegmentBorder; - QColor RepeatSegmentBorder; - QColor RecordingSegmentBorder; - QColor RecordingAudioSegmentBlock; - QColor RecordingInternalSegmentBlock; - QColor Pointer; - QColor MovementGuide; - QColor RotaryFloatBackground; - QColor RotaryFloatForeground; + TQColor SegmentCanvas; + TQColor SegmentAudioPreview; + TQColor SegmentInternalPreview; + TQColor SegmentLabel; + TQColor SegmentBorder; + TQColor RepeatSegmentBorder; + TQColor RecordingSegmentBorder; + TQColor RecordingAudioSegmentBlock; + TQColor RecordingInternalSegmentBlock; + TQColor Pointer; + TQColor MovementGuide; + TQColor RotaryFloatBackground; + TQColor RotaryFloatForeground; protected: CompositionColourCache() { init(); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp index 798178a..f37487b 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp @@ -25,8 +25,8 @@ #include "CompositionItem.h" -#include <qobject.h> -#include <qrect.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.h b/src/gui/editors/segment/segmentcanvas/CompositionItem.h index b5e749b..f86f1b0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItem.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.h @@ -26,18 +26,18 @@ #ifndef _RG_COMPOSITIONITEM_H_ #define _RG_COMPOSITIONITEM_H_ -#include <qguardedptr.h> -#include <qobject.h> -#include <qrect.h> +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden { -class _CompositionItem : public QObject { +class _CompositionItem : public TQObject { public: virtual bool isRepeating() const = 0; - virtual QRect rect() const = 0; + virtual TQRect rect() const = 0; virtual void moveBy(int x, int y) = 0; virtual void moveTo(int x, int y) = 0; virtual void setX(int x) = 0; @@ -51,14 +51,14 @@ public: // used by itemcontainer virtual long hashKey() = 0; - QRect savedRect() const { return m_savedRect; } + TQRect savedRect() const { return m_savedRect; } void saveRect() const { m_savedRect = rect(); } protected: - mutable QRect m_savedRect; + mutable TQRect m_savedRect; }; -typedef QGuardedPtr<_CompositionItem> CompositionItem; +typedef TQGuardedPtr<_CompositionItem> CompositionItem; bool operator<(const CompositionItem&, const CompositionItem&); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp index e1705cd..9579ba2 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp @@ -31,9 +31,9 @@ #include "misc/Debug.h" #include "CompositionModel.h" #include "CompositionItemImpl.h" -#include <qcolor.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqrect.h> namespace Rosegarden { @@ -60,7 +60,7 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg timeT t = 0; if (item) { - QRect itemRect = item->rect(); + TQRect itemRect = item->rect(); t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L); @@ -102,8 +102,8 @@ void CompositionItemHelper::setEndTime(CompositionItem& item, timeT time, { if (item) { int x = int(nearbyint(grid.getRulerScale()->getXForTime(time))); - QRect r = item->rect(); - QPoint topRight = r.topRight(); + TQRect r = item->rect(); + TQPoint topRight = r.topRight(); topRight.setX(x); r.setTopRight(topRight); item->setWidth(r.width()); @@ -127,7 +127,7 @@ Rosegarden::Segment* CompositionItemHelper::getSegment(CompositionItem item) CompositionItem CompositionItemHelper::makeCompositionItem(Rosegarden::Segment* segment) { - return CompositionItem(new CompositionItemImpl(*segment, QRect())); + return CompositionItem(new CompositionItemImpl(*segment, TQRect())); } CompositionItem CompositionItemHelper::findSiblingCompositionItem(const CompositionModel::itemcontainer& items, diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp index 5508ad2..12984a0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp @@ -28,13 +28,13 @@ #include "misc/Debug.h" #include "base/Segment.h" #include "CompositionRect.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> namespace Rosegarden @@ -46,9 +46,9 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect m_z(0) {} -QRect CompositionItemImpl::rect() const +TQRect CompositionItemImpl::rect() const { - QRect res = m_rect; + TQRect res = m_rect; if (m_rect.isRepeating()) { CompositionRect::repeatmarks repeatMarks = m_rect.getRepeatMarks(); int neww = m_rect.getBaseWidth(); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h index b5b3ef7..bd61bd0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h @@ -28,7 +28,7 @@ #include "CompositionRect.h" #include "CompositionItem.h" -#include <qrect.h> +#include <tqrect.h> @@ -43,7 +43,7 @@ class CompositionItemImpl : public _CompositionItem { public: CompositionItemImpl(Segment& s, const CompositionRect&); virtual bool isRepeating() const { return m_rect.isRepeating(); } - virtual QRect rect() const; + virtual TQRect rect() const; virtual void moveBy(int x, int y) { m_rect.moveBy(x, y); } virtual void moveTo(int x, int y) { m_rect.setRect(x, y, m_rect.width(), m_rect.height()); } virtual void setX(int x) { m_rect.setX(x); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h index beafc2e..63412c0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h @@ -29,11 +29,11 @@ #include "base/Composition.h" #include "base/Segment.h" #include <set> -#include <qcolor.h> -#include <qobject.h> -#include <qimage.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqobject.h> +#include <tqimage.h> +#include <tqpoint.h> +#include <tqrect.h> #include <utility> #include <vector> #include "base/Event.h" @@ -50,10 +50,10 @@ namespace Rosegarden { class SnapGrid; -typedef std::vector<QImage> PixmapArray; +typedef std::vector<TQImage> PixmapArray; -class CompositionModel : public QObject, public CompositionObserver, public SegmentObserver +class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver { Q_OBJECT public: @@ -62,17 +62,17 @@ public: bool operator()(const CompositionItem &c1, const CompositionItem &c2) const; }; - typedef std::vector<QRect> rectlist; + typedef std::vector<TQRect> rectlist; typedef std::vector<int> heightlist; typedef std::vector<CompositionRect> rectcontainer; typedef std::set<CompositionItem, CompositionItemCompare> itemcontainer; struct AudioPreviewDrawDataItem { - AudioPreviewDrawDataItem(PixmapArray p, QPoint bp, QRect r) : + AudioPreviewDrawDataItem(PixmapArray p, TQPoint bp, TQRect r) : pixmap(p), basePoint(bp), rect(r), resizeOffset(0) {}; PixmapArray pixmap; - QPoint basePoint; - QRect rect; + TQPoint basePoint; + TQRect rect; // when showing a segment that is being resized from the // beginning, this contains the offset between the current @@ -84,8 +84,8 @@ public: struct RectRange { std::pair<rectlist::iterator, rectlist::iterator> range; - QPoint basePoint; - QColor color; + TQPoint basePoint; + TQColor color; }; typedef std::vector<RectRange> RectRanges; @@ -104,14 +104,14 @@ public: const std::vector<float> &getValues() const { return m_values; } void setValues(const std::vector<float>&v) { m_values = v; } - QRect getSegmentRect() { return m_segmentRect; } - void setSegmentRect(const QRect& r) { m_segmentRect = r; } + TQRect getSegmentRect() { return m_segmentRect; } + void setSegmentRect(const TQRect& r) { m_segmentRect = r; } protected: std::vector<float> m_values; bool m_showMinima; unsigned int m_channels; - QRect m_segmentRect; + TQRect m_segmentRect; private: // no copy ctor @@ -122,13 +122,13 @@ public: virtual ~CompositionModel() {}; virtual unsigned int getNbRows() = 0; - virtual const rectcontainer& getRectanglesIn(const QRect& rect, + virtual const rectcontainer& getRectanglesIn(const TQRect& rect, RectRanges* notationRects, AudioPreviewDrawData* audioRects) = 0; - virtual heightlist getTrackDividersIn(const QRect& rect) = 0; + virtual heightlist getTrackDividersIn(const TQRect& rect) = 0; - virtual itemcontainer getItemsAt (const QPoint&) = 0; - virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&) = 0; + virtual itemcontainer getItemsAt (const TQPoint&) = 0; + virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&) = 0; virtual SnapGrid& grid() = 0; @@ -140,9 +140,9 @@ public: virtual bool haveSelection() const = 0; virtual bool haveMultipleSelection() const = 0; virtual void signalSelection() = 0; - virtual void setSelectionRect(const QRect&) = 0; + virtual void setSelectionRect(const TQRect&) = 0; virtual void finalizeSelectionRect() = 0; - virtual QRect getSelectionContentsRect() = 0; + virtual TQRect getSelectionContentsRect() = 0; virtual void signalContentChange() = 0; virtual void addRecordingItem(const CompositionItem&) = 0; @@ -163,7 +163,7 @@ public: signals: void needContentUpdate(); - void needContentUpdate(const QRect&); + void needContentUpdate(const TQRect&); void needArtifactsUpdate(); protected: diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp index 39deb2e..9627b16 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp @@ -50,14 +50,14 @@ #include "AudioPreviewPainter.h" #include "gui/general/GUIPalette.h" #include "SegmentOrderer.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qregexp.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqregexp.h> +#include <tqsize.h> +#include <tqstring.h> @@ -120,13 +120,13 @@ CompositionModelImpl::~CompositionModelImpl() } struct RectCompare { - bool operator()(const QRect &r1, const QRect &r2) const { + bool operator()(const TQRect &r1, const TQRect &r2) const { return r1.x() < r2.x(); } }; -void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint basePoint, - const Segment* segment, const QRect& clipRect) +void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, TQPoint basePoint, + const Segment* segment, const TQRect& clipRect) { rectlist* cachedNPData = getNotationPreviewData(segment); @@ -167,8 +167,8 @@ void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint npRects->push_back(interval); } -void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, QPoint basePoint, - const Segment* segment, const QRect& currentSR) +void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, TQPoint basePoint, + const Segment* segment, const TQRect& currentSR) { CompositionRect unmovedSR = computeSegmentRect(*segment); @@ -222,14 +222,14 @@ void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npR } void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment* segment, - const CompositionRect& segRect, const QRect& clipRect) + const CompositionRect& segRect, const TQRect& clipRect) { Profiler profiler("CompositionModelImpl::makeAudioPreviewRects", true); RG_DEBUG << "CompositionModelImpl::makeAudioPreviewRects - segRect = " << segRect << endl; PixmapArray previewImage = getAudioPreviewPixmap(segment); - QPoint basePoint = segRect.topLeft(); + TQPoint basePoint = segRect.topLeft(); AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect); @@ -392,7 +392,7 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s if (y > y1 - height + 1) y = y1 - height + 1; - QRect r(x, (int)y, width, height); + TQRect r(x, (int)y, width, height); // RG_DEBUG << "CompositionModelImpl::updatePreviewCacheForNotationSegment() : npData = " // << npData << ", preview rect = " @@ -402,10 +402,10 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s } -QColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment) +TQColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment) { // compute the preview color so it's as visible as possible over the segment's color - QColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex())); + TQColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex())); int h, s, v; segColor.hsv(&h, &s, &v); @@ -440,7 +440,7 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm CompositionRect segRect = computeSegmentRect(*segment); segRect.setWidth(segRect.getBaseWidth()); // don't use repeating area - segRect.moveTopLeft(QPoint(0, 0)); + segRect.moveTopLeft(TQPoint(0, 0)); if (apData) apData->setSegmentRect(segRect); @@ -451,8 +451,8 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm AudioPreviewUpdater *updater = new AudioPreviewUpdater (*m_audioPreviewThread, m_composition, segment, segRect, this); - connect(updater, SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)), - this, SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*))); + connect(updater, TQT_SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)), + this, TQT_SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*))); m_audioPreviewUpdaterMap[segment] = updater; @@ -473,7 +473,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete()\n"; AudioPreviewData *apData = getAudioPreviewData(apu->getSegment()); - QRect updateRect; + TQRect updateRect; if (apData) { RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl; @@ -492,7 +492,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) emit needContentUpdate(updateRect); } -QRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment) +TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment) { // RG_DEBUG << "CompositionModelImpl::postProcessAudioPreview()\n"; @@ -608,7 +608,7 @@ void CompositionModelImpl::segmentRemoved(const Composition *, Segment *s) { setTrackHeights(); - QRect r = computeSegmentRect(*s); + TQRect r = computeSegmentRect(*s); m_selectedSegments.erase(s); @@ -658,7 +658,7 @@ void CompositionModelImpl::endMarkerTimeChanged(const Composition *, bool) emit needSizeUpdate(); } -void CompositionModelImpl::setSelectionRect(const QRect& r) +void CompositionModelImpl::setSelectionRect(const TQRect& r) { m_selectionRect = r.normalize(); @@ -668,7 +668,7 @@ void CompositionModelImpl::setSelectionRect(const QRect& r) const Composition::segmentcontainer& segments = m_composition.getSegments(); Composition::segmentcontainer::iterator segEnd = segments.end(); - QRect updateRect = m_selectionRect; + TQRect updateRect = m_selectionRect; for (Composition::segmentcontainer::iterator i = segments.begin(); i != segEnd; ++i) { @@ -711,13 +711,13 @@ void CompositionModelImpl::finalizeSelectionRect() } } - m_previousSelectionUpdateRect = m_selectionRect = QRect(); + m_previousSelectionUpdateRect = m_selectionRect = TQRect(); m_tmpSelectedSegments.clear(); } -QRect CompositionModelImpl::getSelectionContentsRect() +TQRect CompositionModelImpl::getSelectionContentsRect() { - QRect selectionRect; + TQRect selectionRect; SegmentSelection sel = getSelectedSegments(); for (SegmentSelection::iterator i = sel.begin(); @@ -784,7 +784,7 @@ bool CompositionModelImpl::isRecording(const Segment* s) const return m_recordingSegments.find(const_cast<Segment*>(s)) != m_recordingSegments.end(); } -CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const QPoint& point) +CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint& point) { itemcontainer res; @@ -953,7 +953,7 @@ int CompositionModelImpl::getLength() return w; } -timeT CompositionModelImpl::getRepeatTimeAt(const QPoint& p, const CompositionItem& cItem) +timeT CompositionModelImpl::getRepeatTimeAt(const TQPoint& p, const CompositionItem& cItem) { // timeT timeAtClick = m_grid.getRulerScale()->getTimeForX(p.x()); @@ -1009,14 +1009,14 @@ bool CompositionModelImpl::setTrackHeights(Segment *s) return heightsChanged; } -QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) +TQPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) { // Profiler profiler("CompositionModelImpl::computeSegmentOrigin", true); int trackPosition = m_composition.getTrackPositionById(s.getTrack()); timeT startTime = s.getStartTime(); - QPoint res; + TQPoint res; res.setX(int(nearbyint(m_grid.getRulerScale()->getXForTime(startTime)))); @@ -1027,7 +1027,7 @@ QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) return res; } -bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, QPoint cachedSegmentOrigin, timeT cachedSegmentEndTime) +bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, TQPoint cachedSegmentOrigin, timeT cachedSegmentEndTime) { return s.isRepeating() == r.isRepeating() && ((cachedSegmentOrigin.x() != r.x() && s.getEndMarkerTime() != cachedSegmentEndTime) || @@ -1059,7 +1059,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool { // Profiler profiler("CompositionModelImpl::computeSegmentRect", true); - QPoint origin = computeSegmentOrigin(s); + TQPoint origin = computeSegmentOrigin(s); bool isRecordingSegment = isRecording(&s); @@ -1119,11 +1119,11 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool // << " w = " << w << " (x for time at start is " << m_grid.getRulerScale()->getXForTime(startTime) << ", end is " << m_grid.getRulerScale()->getXForTime(endTime) << ")" << endl; } - CompositionRect cr(origin, QSize(w, h)); - QString label = strtoqstr(s.getLabel()); + CompositionRect cr(origin, TQSize(w, h)); + TQString label = strtoqstr(s.getLabel()); if (s.getType() == Segment::Audio) { - static QRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) - static QRegExp re2("\\.[^.]+$"); // filename suffix + static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) + static TQRegExp re2("\\.[^.]+$"); // filename suffix label.replace(re1, "").replace(re2, ""); } cr.setLabel(label); @@ -1155,7 +1155,7 @@ unsigned int CompositionModelImpl::getNbRows() return m_composition.getNbTracks(); } -const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const QRect& rect, +const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const TQRect& rect, RectRanges* npData, AudioPreviewDrawData* apData) { @@ -1199,7 +1199,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con bool isAudio = (s && s->getType() == Segment::Audio); if (!isRecording(s)) { - QColor brushColor = GUIPalette::convertColour(m_composition. + TQColor brushColor = GUIPalette::convertColour(m_composition. getSegmentColourMap().getColourByIndex(s->getColourIndex())); sr.setBrush(brushColor); sr.setPen(CompositionColourCache::getInstance()->SegmentBorder); @@ -1217,7 +1217,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con // Notation preview data if (npData && s->getType() == Segment::Internal) { - makeNotationPreviewRects(npData, QPoint(0, sr.y()), s, rect); + makeNotationPreviewRects(npData, TQPoint(0, sr.y()), s, rect); // Audio preview data } else if (apData && s->getType() == Segment::Audio) { makeAudioPreviewRects(apData, s, sr, rect); @@ -1238,7 +1238,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con if (sr.intersects(rect)) { Segment* s = CompositionItemHelper::getSegment(*i); sr.setSelected(true); - QColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex())); + TQColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex())); sr.setBrush(brushColor); sr.setPen(CompositionColourCache::getInstance()->SegmentBorder); @@ -1259,7 +1259,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con } CompositionModel::heightlist -CompositionModelImpl::getTrackDividersIn(const QRect& rect) +CompositionModelImpl::getTrackDividersIn(const TQRect& rect) { int top = m_grid.getYBin(rect.y()); int bottom = m_grid.getYBin(rect.y() + rect.height()); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h index 6e1c9d6..2d3fd64 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h @@ -33,10 +33,10 @@ #include <map> #include "SegmentOrderer.h" #include <set> -#include <qcolor.h> -#include <qpoint.h> -#include <qptrdict.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqptrdict.h> +#include <tqrect.h> #include <vector> #include "base/Event.h" @@ -72,11 +72,11 @@ public: virtual ~CompositionModelImpl(); virtual unsigned int getNbRows(); - virtual const rectcontainer& getRectanglesIn(const QRect& rect, + virtual const rectcontainer& getRectanglesIn(const TQRect& rect, RectRanges* notationRects, AudioPreviewDrawData* audioRects); - virtual heightlist getTrackDividersIn(const QRect& rect); - virtual itemcontainer getItemsAt (const QPoint&); - virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&); + virtual heightlist getTrackDividersIn(const TQRect& rect); + virtual itemcontainer getItemsAt (const TQPoint&); + virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&); virtual SnapGrid& grid() { return m_grid; } @@ -88,9 +88,9 @@ public: virtual bool haveSelection() const { return !m_selectedSegments.empty(); } virtual bool haveMultipleSelection() const { return m_selectedSegments.size() > 1; } virtual void signalSelection(); - virtual void setSelectionRect(const QRect&); + virtual void setSelectionRect(const TQRect&); virtual void finalizeSelectionRect(); - virtual QRect getSelectionContentsRect(); + virtual TQRect getSelectionContentsRect(); virtual void signalContentChange(); virtual void addRecordingItem(const CompositionItem&); @@ -117,8 +117,8 @@ public: AudioPreviewData* makeAudioPreviewDataCache(const Segment *s); CompositionRect computeSegmentRect(const Segment&, bool computeZ = false); - QColor computeSegmentPreviewColor(const Segment*); - QPoint computeSegmentOrigin(const Segment&); + TQColor computeSegmentPreviewColor(const Segment*); + TQPoint computeSegmentOrigin(const Segment&); void computeRepeatMarks(CompositionItem&); SegmentSelection getSelectedSegments() { return m_selectedSegments; } @@ -173,21 +173,21 @@ protected: rectlist* getNotationPreviewData(const Segment* s); AudioPreviewData* getAudioPreviewData(const Segment* s); PixmapArray getAudioPreviewPixmap(const Segment* s); - QRect postProcessAudioPreview(AudioPreviewData*, const Segment*); + TQRect postProcessAudioPreview(AudioPreviewData*, const Segment*); void makePreviewCache(const Segment* s); void removePreviewCache(const Segment* s); - void makeNotationPreviewRects(RectRanges* npData, QPoint basePoint, const Segment*, const QRect&); - void makeNotationPreviewRectsMovingSegment(RectRanges* npData, QPoint basePoint, const Segment*, - const QRect&); + void makeNotationPreviewRects(RectRanges* npData, TQPoint basePoint, const Segment*, const TQRect&); + void makeNotationPreviewRectsMovingSegment(RectRanges* npData, TQPoint basePoint, const Segment*, + const TQRect&); void makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment*, - const CompositionRect& segRect, const QRect& clipRect); + const CompositionRect& segRect, const TQRect& clipRect); void clearInCache(const Segment*, bool clearPreviewCache = false); void putInCache(const Segment*, const CompositionRect&); const CompositionRect& getFromCache(const Segment*, timeT& endTime); bool isCachedRectCurrent(const Segment& s, const CompositionRect& r, - QPoint segmentOrigin, timeT segmentEndTime); + TQPoint segmentOrigin, timeT segmentEndTime); //--------------- Data members --------------------------------- Composition& m_composition; @@ -206,8 +206,8 @@ protected: AudioPreviewThread* m_audioPreviewThread; - typedef QPtrDict<rectlist> NotationPreviewDataCache; - typedef QPtrDict<AudioPreviewData> AudioPreviewDataCache; + typedef TQPtrDict<rectlist> NotationPreviewDataCache; + typedef TQPtrDict<AudioPreviewData> AudioPreviewDataCache; NotationPreviewDataCache m_notationPreviewDataCache; AudioPreviewDataCache m_audioPreviewDataCache; @@ -217,8 +217,8 @@ protected: ChangeType m_changeType; itemgc m_itemGC; - QRect m_selectionRect; - QRect m_previousSelectionUpdateRect; + TQRect m_selectionRect; + TQRect m_previousSelectionUpdateRect; std::map<const Segment*, CompositionRect> m_segmentRectMap; std::map<const Segment*, timeT> m_segmentEndTimeMap; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp index 9e34d71..9f867a5 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp @@ -26,17 +26,17 @@ #include "CompositionRect.h" #include "base/ColourMap.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> namespace Rosegarden { - const QColor CompositionRect::DefaultPenColor = Qt::black; - const QColor CompositionRect::DefaultBrushColor = QColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B); + const TQColor CompositionRect::DefaultPenColor = Qt::black; + const TQColor CompositionRect::DefaultBrushColor = TQColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.h b/src/gui/editors/segment/segmentcanvas/CompositionRect.h index 3c3d2b6..45c5f50 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h @@ -26,16 +26,16 @@ #ifndef _RG_COMPOSITIONRECT_H_ #define _RG_COMPOSITIONRECT_H_ -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qrect.h> -#include <qstring.h> -#include <qvaluevector.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqvaluevector.h> -class QSize; -class QPoint; +class TQSize; +class TQPoint; namespace Rosegarden @@ -44,22 +44,22 @@ namespace Rosegarden class CompositionRect : public QRect { public: - typedef QValueVector<int> repeatmarks; + typedef TQValueVector<int> repeatmarks; friend bool operator<(const CompositionRect&, const CompositionRect&); - CompositionRect() : QRect(), m_selected(false), + CompositionRect() : TQRect(), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor) {}; - CompositionRect(const QRect& r) : QRect(r), m_resized(false), m_selected(false), + CompositionRect(const TQRect& r) : TQRect(r), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; - CompositionRect(const QPoint & topLeft, const QPoint & bottomRight) - : QRect(topLeft, bottomRight), m_resized(false), m_selected(false), + CompositionRect(const TQPoint & topLeft, const TQPoint & bottomRight) + : TQRect(topLeft, bottomRight), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; - CompositionRect(const QPoint & topLeft, const QSize & size) - : QRect(topLeft, size), m_resized(false), m_selected(false), + CompositionRect(const TQPoint & topLeft, const TQSize & size) + : TQRect(topLeft, size), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; CompositionRect(int left, int top, int width, int height) - : QRect(left, top, width, height), m_resized(false), m_selected(false), + : TQRect(left, top, width, height), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; void setResized(bool s) { m_resized = s; } @@ -73,10 +73,10 @@ public: int z() const { return m_z; } // brush, pen draw info - void setBrush(QBrush b) { m_brush = b; } - QBrush getBrush() const { return m_brush; } - void setPen(QPen b) { m_pen = b; } - QPen getPen() const { return m_pen; } + void setBrush(TQBrush b) { m_brush = b; } + TQBrush getBrush() const { return m_brush; } + void setPen(TQPen b) { m_pen = b; } + TQPen getPen() const { return m_pen; } // repeating segments void setRepeatMarks(const repeatmarks& rm) { m_repeatMarks = rm; } @@ -84,21 +84,21 @@ public: bool isRepeating() const { return m_repeatMarks.size() > 0; } int getBaseWidth() const { return m_baseWidth; } void setBaseWidth(int bw) { m_baseWidth = bw; } - QString getLabel() const { return m_label; } - void setLabel(QString l) { m_label = l; } + TQString getLabel() const { return m_label; } + void setLabel(TQString l) { m_label = l; } - static const QColor DefaultPenColor; - static const QColor DefaultBrushColor; + static const TQColor DefaultPenColor; + static const TQColor DefaultBrushColor; protected: bool m_resized; bool m_selected; bool m_needUpdate; - QBrush m_brush; - QPen m_pen; + TQBrush m_brush; + TQPen m_pen; repeatmarks m_repeatMarks; int m_baseWidth; - QString m_label; + TQString m_label; int m_z; }; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp index 8e83a6b..1ff0263 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp @@ -47,22 +47,22 @@ #include "SegmentToolBox.h" #include "SegmentTool.h" #include <kmessagebox.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qmemarray.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqmemarray.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <kapplication.h> #include <kconfig.h> #include <algorithm> @@ -71,24 +71,24 @@ namespace Rosegarden { -class PreviewRect : public QRect { +class PreviewRect : public TQRect { public: PreviewRect(int left, int top, int width, int height) : - QRect(left, top, width, height) {}; + TQRect(left, top, width, height) {}; - PreviewRect(const QRect& r) : - QRect(r) {}; + PreviewRect(const TQRect& r) : + TQRect(r) {}; - const QColor& getColor() const { return m_color; } - void setColor(QColor c) { m_color = c; } + const TQColor& getColor() const { return m_color; } + void setColor(TQColor c) { m_color = c; } protected: - QColor m_color; + TQColor m_color; }; CompositionView::CompositionView(RosegardenGUIDoc* doc, CompositionModel* model, - QWidget * parent, const char * name, WFlags f) + TQWidget * parent, const char * name, WFlags f) #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) : RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents), #else @@ -110,8 +110,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, m_pointerPos(0), m_pointerColor(GUIPalette::getColour(GUIPalette::Pointer)), m_pointerWidth(4), - m_pointerPen(QPen(m_pointerColor, m_pointerWidth)), - m_tmpRect(QRect(QPoint(0, 0), QPoint( -1, -1))), + m_pointerPen(TQPen(m_pointerColor, m_pointerWidth)), + m_tmpRect(TQRect(TQPoint(0, 0), TQPoint( -1, -1))), m_tmpRectFill(CompositionRect::DefaultBrushColor), m_trackDividerColor(GUIPalette::getColour(GUIPalette::TrackDivider)), m_drawGuides(false), @@ -132,8 +132,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, if (doc) { m_toolBox = new SegmentToolBox(this, doc); - connect(m_toolBox, SIGNAL(showContextHelp(const QString &)), - this, SLOT(slotToolHelpChanged(const QString &))); + connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), + this, TQT_SLOT(slotToolHelpChanged(const TQString &))); } setDragAutoScroll(true); @@ -143,46 +143,46 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, slotUpdateSize(); - QScrollBar* hsb = horizontalScrollBar(); + TQScrollBar* hsb = horizontalScrollBar(); // dynamically adjust content size when scrolling past current composition's end - connect(hsb, SIGNAL(nextLine()), - this, SLOT(scrollRight())); - connect(hsb, SIGNAL(prevLine()), - this, SLOT(scrollLeft())); - - // connect(this, SIGNAL(contentsMoving(int, int)), - // this, SLOT(slotAllDrawBuffersNeedRefresh())); - - // connect(this, SIGNAL(contentsMoving(int, int)), - // this, SLOT(slotContentsMoving(int, int))); - - connect(model, SIGNAL(needContentUpdate()), - this, SLOT(slotUpdateSegmentsDrawBuffer())); - connect(model, SIGNAL(needContentUpdate(const QRect&)), - this, SLOT(slotUpdateSegmentsDrawBuffer(const QRect&))); - connect(model, SIGNAL(needArtifactsUpdate()), - this, SLOT(slotArtifactsDrawBufferNeedsRefresh())); - connect(model, SIGNAL(needSizeUpdate()), - this, SLOT(slotUpdateSize())); + connect(hsb, TQT_SIGNAL(nextLine()), + this, TQT_SLOT(scrollRight())); + connect(hsb, TQT_SIGNAL(prevLine()), + this, TQT_SLOT(scrollLeft())); + + // connect(this, TQT_SIGNAL(contentsMoving(int, int)), + // this, TQT_SLOT(slotAllDrawBuffersNeedRefresh())); + + // connect(this, TQT_SIGNAL(contentsMoving(int, int)), + // this, TQT_SLOT(slotContentsMoving(int, int))); + + connect(model, TQT_SIGNAL(needContentUpdate()), + this, TQT_SLOT(slotUpdateSegmentsDrawBuffer())); + connect(model, TQT_SIGNAL(needContentUpdate(const TQRect&)), + this, TQT_SLOT(slotUpdateSegmentsDrawBuffer(const TQRect&))); + connect(model, TQT_SIGNAL(needArtifactsUpdate()), + this, TQT_SLOT(slotArtifactsDrawBufferNeedsRefresh())); + connect(model, TQT_SIGNAL(needSizeUpdate()), + this, TQT_SLOT(slotUpdateSize())); if (doc) { - connect(doc, SIGNAL(docColoursChanged()), - this, SLOT(slotRefreshColourCache())); + connect(doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotRefreshColourCache())); // recording-related signals - connect(doc, SIGNAL(newMIDIRecordingSegment(Segment*)), - this, SLOT(slotNewMIDIRecordingSegment(Segment*))); - connect(doc, SIGNAL(newAudioRecordingSegment(Segment*)), - this, SLOT(slotNewAudioRecordingSegment(Segment*))); - // connect(doc, SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)), - // this, SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT))); - connect(doc, SIGNAL(stoppedAudioRecording()), - this, SLOT(slotStoppedRecording())); - connect(doc, SIGNAL(stoppedMIDIRecording()), - this, SLOT(slotStoppedRecording())); - connect(doc, SIGNAL(audioFileFinalized(Segment*)), - getModel(), SLOT(slotAudioFileFinalized(Segment*))); + connect(doc, TQT_SIGNAL(newMIDIRecordingSegment(Segment*)), + this, TQT_SLOT(slotNewMIDIRecordingSegment(Segment*))); + connect(doc, TQT_SIGNAL(newAudioRecordingSegment(Segment*)), + this, TQT_SLOT(slotNewAudioRecordingSegment(Segment*))); + // connect(doc, TQT_SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)), + // this, TQT_SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT))); + connect(doc, TQT_SIGNAL(stoppedAudioRecording()), + this, TQT_SLOT(slotStoppedRecording())); + connect(doc, TQT_SIGNAL(stoppedMIDIRecording()), + this, TQT_SLOT(slotStoppedRecording())); + connect(doc, TQT_SIGNAL(audioFileFinalized(Segment*)), + getModel(), TQT_SLOT(slotAudioFileFinalized(Segment*))); } CompositionModelImpl* cmi = dynamic_cast<CompositionModelImpl*>(model); @@ -194,8 +194,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, doc->getAudioPreviewThread().setEmptyQueueListener(this); } - m_segmentsDrawBuffer.setOptimization(QPixmap::BestOptim); - m_artifactsDrawBuffer.setOptimization(QPixmap::BestOptim); + m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim); + m_artifactsDrawBuffer.setOptimization(TQPixmap::BestOptim); viewport()->setMouseTracking(true); } @@ -208,7 +208,7 @@ void CompositionView::endAudioPreviewGeneration() } } -void CompositionView::setBackgroundPixmap(const QPixmap &m) +void CompositionView::setBackgroundPixmap(const TQPixmap &m) { m_backgroundPixmap = m; // viewport()->setErasePixmap(m_backgroundPixmap); @@ -216,7 +216,7 @@ void CompositionView::setBackgroundPixmap(const QPixmap &m) void CompositionView::initStepSize() { - QScrollBar* hsb = horizontalScrollBar(); + TQScrollBar* hsb = horizontalScrollBar(); m_stepSize = hsb->lineStep(); } @@ -265,7 +265,7 @@ void CompositionView::scrollLeft() } -void CompositionView::setSelectionRectPos(const QPoint& pos) +void CompositionView::setSelectionRectPos(const TQPoint& pos) { m_selectionRect.setRect(pos.x(), pos.y(), 0, 0); getModel()->setSelectionRect(m_selectionRect); @@ -273,7 +273,7 @@ void CompositionView::setSelectionRectPos(const QPoint& pos) void CompositionView::setSelectionRectSize(int w, int h) { - m_selectionRect.setSize(QSize(w, h)); + m_selectionRect.setSize(TQSize(w, h)); getModel()->setSelectionRect(m_selectionRect); } @@ -303,7 +303,7 @@ void CompositionView::updateSelectionContents() return ; - QRect selectionRect = getModel()->getSelectionContentsRect(); + TQRect selectionRect = getModel()->getSelectionContentsRect(); updateContents(selectionRect); } @@ -312,7 +312,7 @@ void CompositionView::slotContentsMoving(int x, int y) // qDebug("contents moving : x=%d", x); } -void CompositionView::slotSetTool(const QString& toolName) +void CompositionView::slotSetTool(const TQString& toolName) { RG_DEBUG << "CompositionView::slotSetTool(" << toolName << ")" << this << "\n"; @@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const QString& toolName) if (m_tool) m_tool->ready(); else { - KMessageBox::error(0, QString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); + KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); } } @@ -335,7 +335,7 @@ void CompositionView::slotSelectSegments(const SegmentSelection &segments) { RG_DEBUG << "CompositionView::slotSelectSegments\n"; - static QRect dummy; + static TQRect dummy; getModel()->clearSelected(); @@ -383,13 +383,13 @@ void CompositionView::slotHideSplitLine() m_splitLinePos.setY( -1); } -void CompositionView::slotExternalWheelEvent(QWheelEvent* e) +void CompositionView::slotExternalWheelEvent(TQWheelEvent* e) { e->accept(); wheelEvent(e); } -CompositionItem CompositionView::getFirstItemAt(QPoint pos) +CompositionItem CompositionView::getFirstItemAt(TQPoint pos) { CompositionModel::itemcontainer items = getModel()->getItemsAt(pos); @@ -443,7 +443,7 @@ void CompositionView::slotUpdateSegmentsDrawBuffer() updateContents(); } -void CompositionView::slotUpdateSegmentsDrawBuffer(const QRect& rect) +void CompositionView::slotUpdateSegmentsDrawBuffer(const TQRect& rect) { // RG_DEBUG << "CompositionView::slotUpdateSegmentsDrawBuffer() rect " // << rect << " - valid : " << rect.isValid() << endl; @@ -479,9 +479,9 @@ void CompositionView::slotStoppedRecording() getModel()->clearRecordingItems(); } -void CompositionView::resizeEvent(QResizeEvent* e) +void CompositionView::resizeEvent(TQResizeEvent* e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); slotUpdateSize(); int w = std::max(m_segmentsDrawBuffer.width(), visibleWidth()); @@ -493,18 +493,18 @@ void CompositionView::resizeEvent(QResizeEvent* e) // RG_DEBUG << "CompositionView::resizeEvent() : drawBuffer size = " << m_segmentsDrawBuffer.size() << endl; } -void CompositionView::viewportPaintEvent(QPaintEvent* e) +void CompositionView::viewportPaintEvent(TQPaintEvent* e) { - QMemArray<QRect> rects = e->region().rects(); + TQMemArray<TQRect> rects = e->region().rects(); for (unsigned int i = 0; i < rects.size(); ++i) { viewportPaintRect(rects[i]); } } -void CompositionView::viewportPaintRect(QRect r) +void CompositionView::viewportPaintRect(TQRect r) { - QRect updateRect = r; + TQRect updateRect = r; r &= viewport()->rect(); r.moveBy(contentsX(), contentsY()); @@ -520,7 +520,7 @@ void CompositionView::viewportPaintRect(QRect r) if (changed || m_artifactsDrawBufferRefresh.isValid()) { // r was modified by checkScrollAndRefreshDrawBuffer - QRect copyRect(r | m_artifactsDrawBufferRefresh); + TQRect copyRect(r | m_artifactsDrawBufferRefresh); copyRect.moveBy( -contentsX(), -contentsY()); // RG_DEBUG << "copying from segment to artifacts buffer: " << copyRect << endl; @@ -534,7 +534,7 @@ void CompositionView::viewportPaintRect(QRect r) if (m_artifactsDrawBufferRefresh.isValid()) { refreshArtifactsDrawBuffer(m_artifactsDrawBufferRefresh); - m_artifactsDrawBufferRefresh = QRect(); + m_artifactsDrawBufferRefresh = TQRect(); } if (scroll) { @@ -549,17 +549,17 @@ void CompositionView::viewportPaintRect(QRect r) // DEBUG - // QPainter pdebug(viewport()); - // static QPen framePen(Qt::red, 1); + // TQPainter pdebug(viewport()); + // static TQPen framePen(Qt::red, 1); // pdebug.setPen(framePen); // pdebug.drawRect(updateRect); } -bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) +bool CompositionView::checkScrollAndRefreshDrawBuffer(TQRect &rect, bool& scroll) { bool all = false; - QRect refreshRect = m_segmentsDrawBufferRefresh; + TQRect refreshRect = m_segmentsDrawBufferRefresh; int w = visibleWidth(), h = visibleHeight(); int cx = contentsX(), cy = contentsY(); @@ -591,13 +591,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (dx > -w && dx < w) { - QPainter cp(&m_segmentsDrawBuffer); + TQPainter cp(&m_segmentsDrawBuffer); cp.drawPixmap(dx, 0, m_segmentsDrawBuffer); if (dx < 0) { - refreshRect |= QRect(cx + w + dx, cy, -dx, h); + refreshRect |= TQRect(cx + w + dx, cy, -dx, h); } else { - refreshRect |= QRect(cx, cy, dx, h); + refreshRect |= TQRect(cx, cy, dx, h); } } else { @@ -613,13 +613,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (dy > -h && dy < h) { - QPainter cp(&m_segmentsDrawBuffer); + TQPainter cp(&m_segmentsDrawBuffer); cp.drawPixmap(0, dy, m_segmentsDrawBuffer); if (dy < 0) { - refreshRect |= QRect(cx, cy + h + dy, w, -dy); + refreshRect |= TQRect(cx, cy + h + dy, w, -dy); } else { - refreshRect |= QRect(cx, cy, w, dy); + refreshRect |= TQRect(cx, cy, w, dy); } } else { @@ -640,7 +640,7 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (needRefresh) refreshSegmentsDrawBuffer(refreshRect); - m_segmentsDrawBufferRefresh = QRect(); + m_segmentsDrawBufferRefresh = TQRect(); m_lastBufferRefreshX = cx; m_lastBufferRefreshY = cy; @@ -650,17 +650,17 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) return needRefresh; } -void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect) +void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect) { // Profiler profiler("CompositionView::refreshDrawBuffer", true); // RG_DEBUG << "CompositionView::refreshSegmentsDrawBuffer() r = " // << rect << endl; - QPainter p(&m_segmentsDrawBuffer, viewport()); + TQPainter p(&m_segmentsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); if (!m_backgroundPixmap.isNull()) { - QPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width()); + TQPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width()); p.drawTiledPixmap(rect, m_backgroundPixmap, pp); } else { p.eraseRect(rect); @@ -669,29 +669,29 @@ void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect) drawArea(&p, rect); // DEBUG - show what's updated - // QPen framePen(Qt::red, 1); + // TQPen framePen(Qt::red, 1); // p.setPen(framePen); // p.drawRect(rect); // m_segmentsDrawBufferNeedsRefresh = false; } -void CompositionView::refreshArtifactsDrawBuffer(const QRect& rect) +void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect) { // RG_DEBUG << "CompositionView::refreshArtifactsDrawBuffer() r = " // << rect << endl; - QPainter p; + TQPainter p; p.begin(&m_artifactsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); - // QRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); + // TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); drawAreaArtifacts(&p, rect); p.end(); // m_artifactsDrawBufferNeedsRefresh = false; } -void CompositionView::drawArea(QPainter *p, const QRect& clipRect) +void CompositionView::drawArea(TQPainter *p, const TQRect& clipRect) { // Profiler profiler("CompositionView::drawArea", true); @@ -705,7 +705,7 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) if (!lineHeights.empty()) { p->save(); - QColor light = m_trackDividerColor.light(); + TQColor light = m_trackDividerColor.light(); p->setPen(light); for (CompositionModel::heightlist::const_iterator hi = lineHeights.begin(); @@ -802,8 +802,8 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) for (; interval.range.first != interval.range.second; ++interval.range.first) { const PreviewRect& pr = *(interval.range.first); - QColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview; - QColor col = interval.color.isValid() ? interval.color : defaultCol; + TQColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview; + TQColor col = interval.color.isValid() ? interval.color : defaultCol; p->setBrush(col); p->setPen(col); // RG_DEBUG << "CompositionView::drawArea : drawing preview rect at x = " << pr.x() << endl; @@ -828,15 +828,15 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) } -void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect) +void CompositionView::drawAreaAudioPreviews(TQPainter * p, const TQRect& clipRect) { CompositionModel::AudioPreviewDrawData::const_iterator api = m_audioPreviewRects.begin(); CompositionModel::AudioPreviewDrawData::const_iterator apEnd = m_audioPreviewRects.end(); - QRect rectToFill, // rect to fill on canvas + TQRect rectToFill, // rect to fill on canvas localRect; // the rect of the tile to draw on the canvas - QPoint basePoint, // origin of segment rect + TQPoint basePoint, // origin of segment rect drawBasePoint; // origin of rect to fill on canvas - QRect r; + TQRect r; for (; api != apEnd; ++api) { rectToFill = api->rect; basePoint = api->basePoint; @@ -891,7 +891,7 @@ void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect) } } -void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect) +void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect) { // // Playback Pointer @@ -938,10 +938,10 @@ void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect) } } -void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/) +void CompositionView::drawGuides(TQPainter * p, const TQRect& /*clipRect*/) { // no need to check for clipping, these guides are meant to follow the mouse cursor - QPoint guideOrig(m_topGuidePos, m_foreGuidePos); + TQPoint guideOrig(m_topGuidePos, m_foreGuidePos); p->save(); p->setPen(m_guideColor); @@ -950,15 +950,15 @@ void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/) p->restore(); } -void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect, +void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect, int intersectLvl, bool fill) { p->save(); - QBrush brush = r.getBrush(); + TQBrush brush = r.getBrush(); if (r.isRepeating()) { - QColor brushColor = brush.color(); + TQColor brushColor = brush.color(); brush.setColor(brushColor.light(150)); } @@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const // draw 'start' rectangle with original brush // - QRect startRect = r; + TQRect startRect = r; startRect.setWidth(repeatMarks[0] - r.x()); p->setBrush(r.getBrush()); drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill); @@ -992,7 +992,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const break; if (pos >= clipRect.left()) { - QPoint p1(pos, r.y() + penWidth), + TQPoint p1(pos, r.y() + penWidth), p2(pos, r.y() + r.height() - penWidth - 1); // RG_DEBUG << "CompositionView::drawCompRect() : drawing repeat mark at " @@ -1007,7 +1007,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const p->restore(); } -void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect) +void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect) { // draw segment label // @@ -1017,10 +1017,10 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c p->save(); p->setPen(GUIPalette::getColour(GUIPalette::SegmentLabel)); p->setBrush(white); - QRect textRect(r); + TQRect textRect(r); textRect.setX(textRect.x() + 3); - QString label = " " + r.getLabel() + " "; - QRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + TQString label = " " + r.getLabel() + " "; + TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); p->drawRect(textBoundingRect & r); p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); p->restore(); @@ -1030,13 +1030,13 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c p->save(); - QFont font; + TQFont font; font.setPixelSize(r.height() / 2.2); - font.setWeight(QFont::Bold); + font.setWeight(TQFont::Bold); font.setItalic(false); p->setFont(font); - QRect labelRect = QRect + TQRect labelRect = QRect (r.x(), r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1, r.width(), @@ -1045,8 +1045,8 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c int x = labelRect.x() + p->fontMetrics().width('x'); int y = labelRect.y(); - QBrush brush = r.getBrush(); - QColor surroundColour = brush.color().light(110); + TQBrush brush = r.getBrush(); + TQColor surroundColour = brush.color().light(110); int h, s, v; surroundColour.hsv(&h, &s, &v); @@ -1090,7 +1090,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c #endif } -void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRect, +void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clipRect, bool isSelected, int intersectLvl, bool fill) { // RG_DEBUG << "CompositionView::drawRect : intersectLvl = " << intersectLvl @@ -1101,22 +1101,22 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec p->save(); - QRect rect = r; + TQRect rect = r; if (fill) { if (isSelected) { - QColor fillColor = p->brush().color(); + TQColor fillColor = p->brush().color(); fillColor = fillColor.dark(200); - QBrush b = p->brush(); + TQBrush b = p->brush(); b.setColor(fillColor); p->setBrush(b); // RG_DEBUG << "CompositionView::drawRect : selected color : " << fillColor << endl; } if (intersectLvl > 0) { - QColor fillColor = p->brush().color(); + TQColor fillColor = p->brush().color(); fillColor = fillColor.dark((intersectLvl) * 105); - QBrush b = p->brush(); + TQBrush b = p->brush(); b.setColor(fillColor); p->setBrush(b); // RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl; @@ -1126,7 +1126,7 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec } // Paint using the small coordinates... - QRect intersection = rect.intersect(clipRect); + TQRect intersection = rect.intersect(clipRect); if (clipRect.contains(rect)) { p->drawRect(rect); @@ -1166,9 +1166,9 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec p->restore(); } -QColor CompositionView::mixBrushes(QBrush a, QBrush b) +TQColor CompositionView::mixBrushes(TQBrush a, TQBrush b) { - QColor ac = a.color(), bc = b.color(); + TQColor ac = a.color(), bc = b.color(); int aR = ac.red(), aG = ac.green(), aB = ac.blue(), bR = bc.red(), bG = bc.green(), bB = ac.blue(); @@ -1179,7 +1179,7 @@ QColor CompositionView::mixBrushes(QBrush a, QBrush b) } void CompositionView::drawIntersections(const CompositionModel::rectcontainer& rects, - QPainter * p, const QRect& clipRect) + TQPainter * p, const TQRect& clipRect) { if (! (rects.size() > 1)) return ; @@ -1262,7 +1262,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r } -void CompositionView::drawPointer(QPainter *p, const QRect& clipRect) +void CompositionView::drawPointer(TQPainter *p, const TQRect& clipRect) { // RG_DEBUG << "CompositionView::drawPointer: clipRect " // << clipRect.x() << "," << clipRect.y() << " " << clipRect.width() @@ -1277,11 +1277,11 @@ void CompositionView::drawPointer(QPainter *p, const QRect& clipRect) } -void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) +void CompositionView::drawTextFloat(TQPainter *p, const TQRect& clipRect) { - QFontMetrics metrics(p->fontMetrics()); + TQFontMetrics metrics(p->fontMetrics()); - QRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText); + TQRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText); p->save(); @@ -1290,7 +1290,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) bound.setTop(bound.top() - 2); bound.setBottom(bound.bottom() + 2); - QPoint pos(m_textFloatPos); + TQPoint pos(m_textFloatPos); if (pos.y() < 0 && getModel()) { if (pos.y() + bound.height() < 0) { pos.setY(pos.y() + getModel()->grid().getYSnap() * 3); @@ -1316,7 +1316,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) p->restore(); } -bool CompositionView::event(QEvent* e) +bool CompositionView::event(TQEvent* e) { if (e->type() == AudioPreviewThread::AudioPreviewQueueEmpty) { RG_DEBUG << "CompositionView::event - AudioPreviewQueueEmpty\n"; @@ -1328,7 +1328,7 @@ bool CompositionView::event(QEvent* e) return RosegardenScrollView::event(e); } -void CompositionView::enterEvent(QEvent *e) +void CompositionView::enterEvent(TQEvent *e) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -1337,13 +1337,13 @@ void CompositionView::enterEvent(QEvent *e) m_contextHelpShown = true; } -void CompositionView::leaveEvent(QEvent *e) +void CompositionView::leaveEvent(TQEvent *e) { emit showContextHelp(""); m_contextHelpShown = false; } -void CompositionView::slotToolHelpChanged(const QString &text) +void CompositionView::slotToolHelpChanged(const TQString &text) { if (m_toolContextHelp == text) return; m_toolContextHelp = text; @@ -1354,7 +1354,7 @@ void CompositionView::slotToolHelpChanged(const QString &text) if (m_contextHelpShown) emit showContextHelp(text); } -void CompositionView::contentsMousePressEvent(QMouseEvent* e) +void CompositionView::contentsMousePressEvent(TQMouseEvent* e) { Qt::ButtonState bs = e->state(); slotSetSelectCopy((bs & Qt::ControlButton) != 0); @@ -1385,7 +1385,7 @@ void CompositionView::contentsMousePressEvent(QMouseEvent* e) } } -void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e) +void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e) { RG_DEBUG << "CompositionView::contentsMouseReleaseEvent()\n"; @@ -1399,7 +1399,7 @@ void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e) m_tool->handleMouseButtonRelease(e); } -void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e) +void CompositionView::contentsMouseDoubleClickEvent(TQMouseEvent* e) { m_currentItem = getFirstItemAt(e->pos()); @@ -1429,7 +1429,7 @@ void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e) } } -void CompositionView::contentsMouseMoveEvent(QMouseEvent* e) +void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e) { if (!m_tool) return ; @@ -1500,7 +1500,7 @@ void CompositionView::setPointerPos(int pos) if (deltaW <= m_pointerPen.width() * 2) { // use one rect instead of two separate ones - QRect updateRect + TQRect updateRect (std::min(m_pointerPos, oldPos) - m_pointerPen.width(), 0, deltaW + m_pointerPen.width() * 2, contentsHeight()); @@ -1509,11 +1509,11 @@ void CompositionView::setPointerPos(int pos) } else { slotArtifactsDrawBufferNeedsRefresh - (QRect(m_pointerPos - m_pointerPen.width(), 0, + (TQRect(m_pointerPos - m_pointerPen.width(), 0, m_pointerPen.width() * 2, contentsHeight())); slotArtifactsDrawBufferNeedsRefresh - (QRect(oldPos - m_pointerPen.width(), 0, + (TQRect(oldPos - m_pointerPen.width(), 0, m_pointerPen.width() * 2, contentsHeight())); } } @@ -1525,7 +1525,7 @@ void CompositionView::setGuidesPos(int x, int y) slotArtifactsDrawBufferNeedsRefresh(); } -void CompositionView::setGuidesPos(const QPoint& p) +void CompositionView::setGuidesPos(const TQPoint& p) { m_topGuidePos = p.x(); m_foreGuidePos = p.y(); @@ -1538,20 +1538,20 @@ void CompositionView::setDrawGuides(bool d) slotArtifactsDrawBufferNeedsRefresh(); } -void CompositionView::setTmpRect(const QRect& r) +void CompositionView::setTmpRect(const TQRect& r) { setTmpRect(r, m_tmpRectFill); } -void CompositionView::setTmpRect(const QRect& r, const QColor &c) +void CompositionView::setTmpRect(const TQRect& r, const TQColor &c) { - QRect pRect = m_tmpRect; + TQRect pRect = m_tmpRect; m_tmpRect = r; m_tmpRectFill = c; slotUpdateSegmentsDrawBuffer(m_tmpRect | pRect); } -void CompositionView::setTextFloat(int x, int y, const QString &text) +void CompositionView::setTextFloat(int x, int y, const TQString &text) { m_textFloatPos.setX(x); m_textFloatPos.setY(y); @@ -1562,7 +1562,7 @@ void CompositionView::setTextFloat(int x, int y, const QString &text) // most of the time when the floating text is drawn // we want to update a larger part of the view // so don't update here - // QRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText); + // TQRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText); // slotUpdateSegmentsDrawBuffer(r); @@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout() { hideTextFloat(); slotArtifactsDrawBufferNeedsRefresh(); - // rgapp->slotSetStatusMessage(QString::null); + // rgapp->slotSetStatusMessage(TQString::null); } } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h index ff0d440..c31cf96 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h @@ -30,23 +30,23 @@ #include "CompositionModel.h" #include "CompositionItem.h" #include "gui/general/RosegardenScrollView.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QWheelEvent; -class QResizeEvent; -class QPaintEvent; -class QPainter; -class QMouseEvent; -class QEvent; +class TQWidget; +class TQWheelEvent; +class TQResizeEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; +class TQEvent; namespace Rosegarden @@ -66,31 +66,31 @@ class CompositionView : public RosegardenScrollView Q_OBJECT public: CompositionView(RosegardenGUIDoc*, CompositionModel*, - QWidget * parent=0, const char* name=0, WFlags f=0); + TQWidget * parent=0, const char* name=0, WFlags f=0); void setPointerPos(int pos); int getPointerPos() { return m_pointerPos; } void setGuidesPos(int x, int y); - void setGuidesPos(const QPoint& p); + void setGuidesPos(const TQPoint& p); void setDrawGuides(bool d); - QRect getSelectionRect() const { return m_selectionRect; } - void setSelectionRectPos(const QPoint& pos); + TQRect getSelectionRect() const { return m_selectionRect; } + void setSelectionRectPos(const TQPoint& pos); void setSelectionRectSize(int w, int h); void setDrawSelectionRect(bool d); SnapGrid& grid() { return m_model->grid(); } - CompositionItem getFirstItemAt(QPoint pos); + CompositionItem getFirstItemAt(TQPoint pos); SegmentToolBox* getToolBox() { return m_toolBox; } CompositionModel* getModel() { return m_model; } - void setTmpRect(const QRect& r); - void setTmpRect(const QRect& r, const QColor &c); - const QRect& getTmpRect() const { return m_tmpRect; } + void setTmpRect(const TQRect& r); + void setTmpRect(const TQRect& r, const TQColor &c); + const TQRect& getTmpRect() const { return m_tmpRect; } /** * Set the snap resolution of the grid to something suitable. @@ -149,12 +149,12 @@ public: * explicitly. * */ - void setTextFloat(int x, int y, const QString &text); + void setTextFloat(int x, int y, const TQString &text); void hideTextFloat() { m_drawTextFloat = false; } void setShowSegmentLabels(bool b) { m_showSegmentLabels = b; } - void setBackgroundPixmap(const QPixmap &m); + void setBackgroundPixmap(const TQPixmap &m); void endAudioPreviewGeneration(); @@ -164,7 +164,7 @@ public slots: void slotContentsMoving(int x, int y); /// Set the current segment editing tool - void slotSetTool(const QString& toolName); + void slotSetTool(const TQString& toolName); // This method only operates if we're of the "Selector" // tool type - it's called from the View to enable it @@ -188,13 +188,13 @@ public slots: void slotShowSplitLine(int x, int y); void slotHideSplitLine(); - void slotExternalWheelEvent(QWheelEvent*); + void slotExternalWheelEvent(TQWheelEvent*); // TextFloat timer void slotTextFloatTimeout(); void slotUpdateSegmentsDrawBuffer(); - void slotUpdateSegmentsDrawBuffer(const QRect&); + void slotUpdateSegmentsDrawBuffer(const TQRect&); void slotRefreshColourCache(); @@ -217,73 +217,73 @@ signals: void setPointerPosition(timeT); - void showContextHelp(const QString &); + void showContextHelp(const TQString &); protected: - virtual bool event(QEvent *); + virtual bool event(TQEvent *); - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); - virtual void viewportPaintEvent(QPaintEvent*); - virtual void resizeEvent(QResizeEvent*); + virtual void viewportPaintEvent(TQPaintEvent*); + virtual void resizeEvent(TQResizeEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); - virtual void viewportPaintRect(QRect); + virtual void viewportPaintRect(TQRect); /** * if something changed, returns true and sets rect accordingly * sets 'scroll' if some scrolling occurred */ - bool checkScrollAndRefreshDrawBuffer(QRect &, bool& scroll); - void refreshSegmentsDrawBuffer(const QRect&); - void refreshArtifactsDrawBuffer(const QRect&); - void drawArea(QPainter * p, const QRect& rect); - void drawAreaAudioPreviews(QPainter * p, const QRect& rect); - void drawAreaArtifacts(QPainter * p, const QRect& rect); - void drawRect(const QRect& rect, QPainter * p, const QRect& clipRect, + bool checkScrollAndRefreshDrawBuffer(TQRect &, bool& scroll); + void refreshSegmentsDrawBuffer(const TQRect&); + void refreshArtifactsDrawBuffer(const TQRect&); + void drawArea(TQPainter * p, const TQRect& rect); + void drawAreaAudioPreviews(TQPainter * p, const TQRect& rect); + void drawAreaArtifacts(TQPainter * p, const TQRect& rect); + void drawRect(const TQRect& rect, TQPainter * p, const TQRect& clipRect, bool isSelected = false, int intersectLvl = 0, bool fill = true); - void drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect, + void drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect, int intersectLvl = 0, bool fill = true); - void drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect); - void drawIntersections(const CompositionModel::rectcontainer&, QPainter * p, const QRect& clipRect); + void drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect); + void drawIntersections(const CompositionModel::rectcontainer&, TQPainter * p, const TQRect& clipRect); - void drawPointer(QPainter * p, const QRect& clipRect); - void drawGuides(QPainter * p, const QRect& clipRect); - void drawTextFloat(QPainter * p, const QRect& clipRect); + void drawPointer(TQPainter * p, const TQRect& clipRect); + void drawGuides(TQPainter * p, const TQRect& clipRect); + void drawTextFloat(TQPainter * p, const TQRect& clipRect); void initStepSize(); void releaseCurrentItem(); - static QColor mixBrushes(QBrush a, QBrush b); + static TQColor mixBrushes(TQBrush a, TQBrush b); SegmentSelector* getSegmentSelectorTool(); protected slots: void slotSegmentsDrawBufferNeedsRefresh() { m_segmentsDrawBufferRefresh = - QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); + TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); } - void slotSegmentsDrawBufferNeedsRefresh(QRect r) { + void slotSegmentsDrawBufferNeedsRefresh(TQRect r) { m_segmentsDrawBufferRefresh |= - (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) + (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) & r); } void slotArtifactsDrawBufferNeedsRefresh() { m_artifactsDrawBufferRefresh = - QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); + TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); updateContents(); } - void slotArtifactsDrawBufferNeedsRefresh(QRect r) { + void slotArtifactsDrawBufferNeedsRefresh(TQRect r) { m_artifactsDrawBufferRefresh |= - (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) + (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) & r); updateContents(r); } @@ -293,12 +293,12 @@ protected slots: slotArtifactsDrawBufferNeedsRefresh(); } - void slotAllDrawBuffersNeedRefresh(QRect r) { + void slotAllDrawBuffersNeedRefresh(TQRect r) { slotSegmentsDrawBufferNeedsRefresh(r); slotArtifactsDrawBufferNeedsRefresh(r); } - void slotToolHelpChanged(const QString &); + void slotToolHelpChanged(const TQString &); protected: @@ -318,42 +318,42 @@ protected: int m_minWidth; int m_stepSize; - QColor m_rectFill; - QColor m_selectedRectFill; + TQColor m_rectFill; + TQColor m_selectedRectFill; int m_pointerPos; - QColor m_pointerColor; + TQColor m_pointerColor; int m_pointerWidth; - QPen m_pointerPen; + TQPen m_pointerPen; - QRect m_tmpRect; - QColor m_tmpRectFill; - QPoint m_splitLinePos; + TQRect m_tmpRect; + TQColor m_tmpRectFill; + TQPoint m_splitLinePos; - QColor m_trackDividerColor; + TQColor m_trackDividerColor; bool m_drawGuides; - QColor m_guideColor; + TQColor m_guideColor; int m_topGuidePos; int m_foreGuidePos; bool m_drawSelectionRect; - QRect m_selectionRect; + TQRect m_selectionRect; bool m_drawTextFloat; - QString m_textFloatText; - QPoint m_textFloatPos; + TQString m_textFloatText; + TQPoint m_textFloatPos; - QPixmap m_segmentsDrawBuffer; - QPixmap m_artifactsDrawBuffer; - QRect m_segmentsDrawBufferRefresh; - QRect m_artifactsDrawBufferRefresh; + TQPixmap m_segmentsDrawBuffer; + TQPixmap m_artifactsDrawBuffer; + TQRect m_segmentsDrawBufferRefresh; + TQRect m_artifactsDrawBufferRefresh; int m_lastBufferRefreshX; int m_lastBufferRefreshY; int m_lastPointerRefreshX; - QPixmap m_backgroundPixmap; + TQPixmap m_backgroundPixmap; - QString m_toolContextHelp; + TQString m_toolContextHelp; bool m_contextHelpShown; mutable CompositionModel::AudioPreviewDrawData m_audioPreviewRects; diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp index fa09644..659a9de 100644 --- a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp @@ -25,8 +25,8 @@ #include "PreviewRect.h" -#include <qcolor.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqrect.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.h b/src/gui/editors/segment/segmentcanvas/PreviewRect.h index 59f3113..1e4bc76 100644 --- a/src/gui/editors/segment/segmentcanvas/PreviewRect.h +++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.h @@ -26,8 +26,8 @@ #ifndef _RG_PREVIEWRECT_H_ #define _RG_PREVIEWRECT_H_ -#include <qcolor.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqrect.h> #include <vector> @@ -38,22 +38,22 @@ namespace Rosegarden -class PreviewRect : public QRect { +class PreviewRect : public TQRect { public: PreviewRect(int left, int top, int width, int height) : - QRect(left, top, width, height) {}; + TQRect(left, top, width, height) {}; - PreviewRect(const QRect& r) : - QRect(r) {}; + PreviewRect(const TQRect& r) : + TQRect(r) {}; - const QColor& getColor() const { return m_color; } - void setColor(QColor c) { m_color = c; } + const TQColor& getColor() const { return m_color; } + void setColor(TQColor c) { m_color = c; } protected: - QColor m_color; + TQColor m_color; }; -typedef std::vector<QImage> PixmapArray; +typedef std::vector<TQImage> PixmapArray; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp index 3d1e26f..f519c8a 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp @@ -34,8 +34,8 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> #include <klocale.h> @@ -54,12 +54,12 @@ void SegmentEraser::ready() setBasicContextHelp(); } -void SegmentEraser::handleMouseButtonPress(QMouseEvent *e) +void SegmentEraser::handleMouseButtonPress(TQMouseEvent *e) { setCurrentItem(m_canvas->getFirstItemAt(e->pos())); } -void SegmentEraser::handleMouseButtonRelease(QMouseEvent*) +void SegmentEraser::handleMouseButtonRelease(TQMouseEvent*) { if (m_currentItem) { // no need to test the result, we know it's good (see handleMouseButtonPress) @@ -71,7 +71,7 @@ void SegmentEraser::handleMouseButtonRelease(QMouseEvent*) setCurrentItem(CompositionItem()); } -int SegmentEraser::handleMouseMove(QMouseEvent*) +int SegmentEraser::handleMouseMove(TQMouseEvent*) { setBasicContextHelp(); return RosegardenCanvasView::NoFollow; @@ -82,7 +82,7 @@ void SegmentEraser::setBasicContextHelp() setContextHelp(i18n("Click on a segment to delete it")); } -const QString SegmentEraser::ToolName = "segmenteraser"; +const TQString SegmentEraser::ToolName = "segmenteraser"; } #include "SegmentEraser.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h index f428c28..78165b9 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h @@ -27,10 +27,10 @@ #define _RG_SEGMENTERASER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -50,11 +50,11 @@ public: virtual void ready(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentEraser(CompositionView*, RosegardenGUIDoc*); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp index f0c4598..3fb4e33 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp @@ -27,9 +27,9 @@ #include "base/RulerScale.h" #include "base/Segment.h" -#include <qpainter.h> -#include <qrect.h> -#include <qwmatrix.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqwmatrix.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h index e190a5c..d1bb9a7 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h @@ -26,11 +26,11 @@ #ifndef _RG_SEGMENTITEMPREVIEW_H_ #define _RG_SEGMENTITEMPREVIEW_H_ -#include <qrect.h> +#include <tqrect.h> -class QWMatrix; -class QPainter; +class TQWMatrix; +class TQPainter; namespace Rosegarden @@ -54,7 +54,7 @@ public: PreviewCurrent }; - virtual void drawShape(QPainter&) = 0; + virtual void drawShape(TQPainter&) = 0; PreviewState getPreviewState() const { return m_previewState; } @@ -71,10 +71,10 @@ public: */ virtual void clearPreview() = 0; - QRect rect(); + TQRect rect(); protected: - virtual void updatePreview(const QWMatrix &matrix) = 0; + virtual void updatePreview(const TQWMatrix &matrix) = 0; //--------------- Data members --------------------------------- diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp index 5129202..71a3ca3 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp @@ -32,8 +32,8 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> #include <klocale.h> @@ -50,24 +50,24 @@ SegmentJoiner::~SegmentJoiner() {} void -SegmentJoiner::handleMouseButtonPress(QMouseEvent*) +SegmentJoiner::handleMouseButtonPress(TQMouseEvent*) {} void -SegmentJoiner::handleMouseButtonRelease(QMouseEvent*) +SegmentJoiner::handleMouseButtonRelease(TQMouseEvent*) {} int -SegmentJoiner::handleMouseMove(QMouseEvent*) +SegmentJoiner::handleMouseMove(TQMouseEvent*) { return RosegardenCanvasView::NoFollow; } void -SegmentJoiner::contentsMouseDoubleClickEvent(QMouseEvent*) +SegmentJoiner::contentsMouseDoubleClickEvent(TQMouseEvent*) {} -const QString SegmentJoiner::ToolName = "segmentjoiner"; +const TQString SegmentJoiner::ToolName = "segmentjoiner"; } #include "SegmentJoiner.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h index 2c83a26..946edee 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h @@ -27,10 +27,10 @@ #define _RG_SEGMENTJOINER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -50,14 +50,14 @@ public: virtual ~SegmentJoiner(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // don't do double clicks - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentJoiner(CompositionView*, RosegardenGUIDoc*); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp index a3d2a59..bc621fe 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp @@ -43,11 +43,11 @@ #include "SegmentToolBox.h" #include "SegmentSelector.h" #include <kcommand.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include <klocale.h> @@ -63,26 +63,26 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d) void SegmentMover::ready() { m_canvas->viewport()->setCursor(Qt::sizeAllCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(); } void SegmentMover::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentMover::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentMover::handleMouseButtonPress(QMouseEvent *e) +void SegmentMover::handleMouseButtonPress(TQMouseEvent *e) { CompositionItem item = m_canvas->getFirstItemAt(e->pos()); SegmentSelector* selector = dynamic_cast<SegmentSelector*> @@ -141,7 +141,7 @@ void SegmentMover::handleMouseButtonPress(QMouseEvent *e) } -void SegmentMover::handleMouseButtonRelease(QMouseEvent *e) +void SegmentMover::handleMouseButtonRelease(TQMouseEvent *e) { Composition &comp = m_doc->getComposition(); @@ -214,7 +214,7 @@ void SegmentMover::handleMouseButtonRelease(QMouseEvent *e) setBasicContextHelp(); } -int SegmentMover::handleMouseMove(QMouseEvent *e) +int SegmentMover::handleMouseMove(TQMouseEvent *e) { m_canvas->setSnapGrain(true); @@ -239,7 +239,7 @@ int SegmentMover::handleMouseMove(QMouseEvent *e) CompositionModel::itemcontainer::iterator it; int guideX = 0; int guideY = 0; - QRect updateRect; + TQRect updateRect; for (it = changingItems.begin(); it != changingItems.end(); @@ -321,13 +321,13 @@ int SegmentMover::handleMouseMove(QMouseEvent *e) timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x()); RealTime time = comp.getElapsedRealTime(currentItemStartTime); - QString ms; + TQString ms; ms.sprintf("%03d", time.msec()); int bar, beat, fraction, remainder; comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); - QString posString = QString("%1.%2s (%3, %4, %5)") + TQString posString = TQString("%1.%2s (%3, %4, %5)") .arg(time.sec).arg(ms) .arg(bar + 1).arg(beat).arg(fraction); @@ -342,7 +342,7 @@ void SegmentMover::setBasicContextHelp() setContextHelp(i18n("Click and drag to move a segment")); } -const QString SegmentMover::ToolName = "segmentmover"; +const TQString SegmentMover::ToolName = "segmentmover"; } #include "SegmentMover.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h index 776189e..580fff0 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTMOVER_H_ #include "SegmentTool.h" -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -52,11 +52,11 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); @@ -68,7 +68,7 @@ protected: //--------------- Data members --------------------------------- - QPoint m_clickPoint; + TQPoint m_clickPoint; bool m_passedInertiaEdge; }; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp index 68ca020..60a74f4 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp @@ -42,11 +42,11 @@ #include "SegmentTool.h" #include <kcommand.h> #include <klocale.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -65,26 +65,26 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d) void SegmentPencil::ready() { m_canvas->viewport()->setCursor(Qt::ibeamCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); - setContextHelpFor(QPoint(0, 0)); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); + setContextHelpFor(TQPoint(0, 0)); } void SegmentPencil::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentPencil::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) +void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) { if (e->button() == RightButton) return; @@ -134,7 +134,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) .getMaxContemporaneousSegmentsOnTrack(trackId); if (multiple < 1) multiple = 1; - QRect tmpRect; + TQRect tmpRect; tmpRect.setX(int(nearbyint(m_canvas->grid().getRulerScale()->getXForTime(time)))); tmpRect.setY(m_canvas->grid().getYBinCoordinate(trackPosition) + 1); tmpRect.setHeight(m_canvas->grid().getYSnap() * multiple - 2); @@ -151,7 +151,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) m_canvas->updateContents(tmpRect); } -void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) +void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) { if (e->button() == RightButton) return ; @@ -160,7 +160,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) if (m_newRect) { - QRect tmpRect = m_canvas->getTmpRect(); + TQRect tmpRect = m_canvas->getTmpRect(); int trackPosition = m_canvas->grid().getYBin(tmpRect.y()); Track *track = m_doc->getComposition().getTrackByPosition(trackPosition); @@ -205,7 +205,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) m_canvas->getModel()->clearSelected(); m_canvas->getModel()->setSelected(item); m_canvas->getModel()->signalSelection(); - m_canvas->setTmpRect(QRect()); + m_canvas->setTmpRect(TQRect()); m_canvas->slotUpdateSegmentsDrawBuffer(); } else { @@ -214,7 +214,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) } } -int SegmentPencil::handleMouseMove(QMouseEvent *e) +int SegmentPencil::handleMouseMove(TQMouseEvent *e) { if (!m_newRect) { setContextHelpFor(e->pos()); @@ -227,8 +227,8 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e) clearContextHelp(); } - QRect tmpRect = m_canvas->getTmpRect(); - QRect oldTmpRect = tmpRect; + TQRect tmpRect = m_canvas->getTmpRect(); + TQRect oldTmpRect = tmpRect; m_canvas->setSnapGrain(false); @@ -271,7 +271,7 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal; } -void SegmentPencil::setContextHelpFor(QPoint p) +void SegmentPencil::setContextHelpFor(TQPoint p) { int trackPosition = m_canvas->grid().getYBin(p.y()); @@ -289,7 +289,7 @@ void SegmentPencil::setContextHelpFor(QPoint p) setContextHelp(i18n("Click and drag to draw an empty segment. Control+Alt click and drag to draw in overlap mode.")); } -const QString SegmentPencil::ToolName = "segmentpencil"; +const TQString SegmentPencil::ToolName = "segmentpencil"; } #include "SegmentPencil.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h index 8b55917..f283f15 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h @@ -28,11 +28,11 @@ #include "base/Track.h" #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,18 +56,18 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); protected: SegmentPencil(CompositionView*, RosegardenGUIDoc*); - void setContextHelpFor(QPoint p); + void setContextHelpFor(TQPoint p); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp index 6ae7433..99241f1 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp @@ -49,11 +49,11 @@ #include "SegmentTool.h" #include <kcommand.h> #include <kmessagebox.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -70,26 +70,26 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d, void SegmentResizer::ready() { m_canvas->viewport()->setCursor(Qt::sizeHorCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(false); } void SegmentResizer::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentResizer::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentResizer::handleMouseButtonPress(QMouseEvent *e) +void SegmentResizer::handleMouseButtonPress(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonPress" << endl; m_canvas->getModel()->clearSelected(); @@ -112,7 +112,7 @@ void SegmentResizer::handleMouseButtonPress(QMouseEvent *e) } } -void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) +void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl; @@ -179,10 +179,10 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) progressDlg.setLabel(i18n("Generating audio preview...")); command->disconnectProgressDialog(&progressDlg); - connect(&m_doc->getAudioFileManager(), SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(&progressDlg, SIGNAL(cancelClicked()), - &m_doc->getAudioFileManager(), SLOT(slotStopPreview())); + connect(&m_doc->getAudioFileManager(), TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &m_doc->getAudioFileManager(), TQT_SLOT(slotStopPreview())); int fid = command->getNewAudioFileId(); if (fid >= 0) { @@ -239,7 +239,7 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) setBasicContextHelp(); } -int SegmentResizer::handleMouseMove(QMouseEvent *e) +int SegmentResizer::handleMouseMove(TQMouseEvent *e) { // RG_DEBUG << "SegmentResizer::handleMouseMove" << endl; @@ -278,7 +278,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e) } */ - QRect oldRect = m_currentItem->rect(); + TQRect oldRect = m_currentItem->rect(); m_canvas->setSnapGrain(true); @@ -364,7 +364,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal; } -bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const QPoint &coord, +bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const TQPoint &coord, int edgeThreshold, bool &start) { if (abs(p->rect().x() + p->rect().width() - coord.x()) < edgeThreshold) { @@ -387,7 +387,7 @@ void SegmentResizer::setBasicContextHelp(bool ctrlPressed) } } -const QString SegmentResizer::ToolName = "segmentresizer"; +const TQString SegmentResizer::ToolName = "segmentresizer"; } #include "SegmentResizer.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h index 9d54573..7a0600d 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTRESIZER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QPoint; -class QMouseEvent; +class TQPoint; +class TQMouseEvent; class CompositionItem; @@ -57,16 +57,16 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const QPoint&, int, bool &); + static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const TQPoint&, int, bool &); void setEdgeThreshold(int e) { m_edgeThreshold = e; } int getEdgeThreshold() { return m_edgeThreshold; } - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp index 35ec639..d601c16 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp @@ -48,11 +48,11 @@ #include "SegmentToolBox.h" #include <kapplication.h> #include <kconfig.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -76,8 +76,8 @@ SegmentSelector::~SegmentSelector() void SegmentSelector::ready() { m_canvas->viewport()->setCursor(Qt::arrowCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelp(i18n("Click and drag to select segments")); } @@ -86,14 +86,14 @@ void SegmentSelector::stow() void SegmentSelector::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } void -SegmentSelector::handleMouseButtonPress(QMouseEvent *e) +SegmentSelector::handleMouseButtonPress(TQMouseEvent *e) { RG_DEBUG << "SegmentSelector::handleMouseButtonPress\n"; m_buttonPressed = true; @@ -205,7 +205,7 @@ SegmentSelector::handleMouseButtonPress(QMouseEvent *e) } void -SegmentSelector::handleMouseButtonRelease(QMouseEvent *e) +SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) { m_buttonPressed = false; @@ -310,7 +310,7 @@ SegmentSelector::handleMouseButtonRelease(QMouseEvent *e) } int -SegmentSelector::handleMouseMove(QMouseEvent *e) +SegmentSelector::handleMouseMove(TQMouseEvent *e) { if (!m_buttonPressed) { setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton)); @@ -328,7 +328,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) // RG_DEBUG << "SegmentSelector::handleMouseMove: no current item\n"; // do a bounding box - QRect selectionRect = m_canvas->getSelectionRect(); + TQRect selectionRect = m_canvas->getSelectionRect(); m_canvas->setDrawSelectionRect(true); @@ -459,13 +459,13 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x()); RealTime time = comp.getElapsedRealTime(currentItemStartTime); - QString ms; + TQString ms; ms.sprintf("%03d", time.msec()); int bar, beat, fraction, remainder; comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); - QString posString = QString("%1.%2s (%3, %4, %5)") + TQString posString = TQString("%1.%2s (%3, %4, %5)") .arg(time.sec).arg(ms) .arg(bar + 1).arg(beat).arg(fraction); @@ -479,7 +479,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed) +void SegmentSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -526,7 +526,7 @@ void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed) } } -const QString SegmentSelector::ToolName = "segmentselector"; +const TQString SegmentSelector::ToolName = "segmentselector"; } #include "SegmentSelector.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h index a6d8d9c..3c602fa 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTSELECTOR_H_ #include "SegmentTool.h" -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -55,9 +55,9 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // These two alter the behaviour of the selection mode // @@ -77,7 +77,7 @@ public: // SegmentItemList* getSegmentItemList() { return &m_selectedItems; } - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); @@ -85,7 +85,7 @@ protected slots: protected: SegmentSelector(CompositionView*, RosegardenGUIDoc*); - void setContextHelpFor(QPoint p, bool ctrlPressed = false); + void setContextHelpFor(TQPoint p, bool ctrlPressed = false); //--------------- Data members --------------------------------- @@ -93,7 +93,7 @@ protected: bool m_segmentAddMode; bool m_segmentCopyMode; - QPoint m_clickPoint; + TQPoint m_clickPoint; bool m_segmentQuickCopyDone; bool m_passedInertiaEdge; bool m_buttonPressed; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp index 4fd48c3..1149cd9 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp @@ -37,9 +37,9 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include <klocale.h> @@ -64,7 +64,7 @@ void SegmentSplitter::ready() } void -SegmentSplitter::handleMouseButtonPress(QMouseEvent *e) +SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e) { // Remove cursor and replace with line on a SegmentItem // at where the cut will be made @@ -81,7 +81,7 @@ SegmentSplitter::handleMouseButtonPress(QMouseEvent *e) } void -SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e) +SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e) { setBasicContextHelp(); @@ -111,7 +111,7 @@ SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e) } int -SegmentSplitter::handleMouseMove(QMouseEvent *e) +SegmentSplitter::handleMouseMove(TQMouseEvent *e) { setBasicContextHelp(); @@ -130,7 +130,7 @@ SegmentSplitter::handleMouseMove(QMouseEvent *e) } void -SegmentSplitter::drawSplitLine(QMouseEvent *e) +SegmentSplitter::drawSplitLine(TQMouseEvent *e) { m_canvas->setSnapGrain(true); @@ -146,7 +146,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e) m_canvas->slotShowSplitLine(x, y); - QRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y, + TQRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y, std::max(m_prevX, x) + 5, m_prevY + m_canvas->grid().getYSnap()); m_canvas->updateContents(updateRect); m_prevX = x; @@ -154,7 +154,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e) } void -SegmentSplitter::contentsMouseDoubleClickEvent(QMouseEvent*) +SegmentSplitter::contentsMouseDoubleClickEvent(TQMouseEvent*) { // DO NOTHING } @@ -169,7 +169,7 @@ SegmentSplitter::setBasicContextHelp() } } -const QString SegmentSplitter::ToolName = "segmentsplitter"; +const TQString SegmentSplitter::ToolName = "segmentsplitter"; } #include "SegmentSplitter.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h index 06201ec..3f21ece 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTSPLITTER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,21 +54,21 @@ public: virtual void ready(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // don't do double clicks - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentSplitter(CompositionView*, RosegardenGUIDoc*); void setBasicContextHelp(); - void drawSplitLine(QMouseEvent*); + void drawSplitLine(TQMouseEvent*); void splitSegment(Segment *segment, timeT &splitTime); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp index 9bd7e69..438cc51 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp @@ -34,8 +34,8 @@ #include "SegmentToolBox.h" #include <kcommand.h> #include <kmainwindow.h> -#include <qpoint.h> -#include <qpopupmenu.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> namespace Rosegarden @@ -58,7 +58,7 @@ void SegmentTool::ready() } void -SegmentTool::handleRightButtonPress(QMouseEvent *e) +SegmentTool::handleRightButtonPress(TQMouseEvent *e) { if (m_currentItem) // mouse button is pressed for some tool return ; @@ -89,7 +89,7 @@ SegmentTool::createMenu() dynamic_cast<RosegardenGUIApp*>(m_doc->parent()); if (app) { - m_menu = static_cast<QPopupMenu*> + m_menu = static_cast<TQPopupMenu*> //(app->factory()->container("segment_tool_menu", app)); (m_parentFactory->container("segment_tool_menu", app)); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h index 90ed961..5b054a8 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h @@ -28,12 +28,12 @@ #include "gui/general/BaseTool.h" #include "CompositionItem.h" -#include <qpoint.h> +#include <tqpoint.h> #include <utility> #include <vector> -class QMouseEvent; +class TQMouseEvent; class KCommand; @@ -53,7 +53,7 @@ class SegmentSelector; // Allow the tools to share the Selector tool's selection // through these. // -typedef std::pair<QPoint, CompositionItem> SegmentItemPair; +typedef std::pair<TQPoint, CompositionItem> SegmentItemPair; typedef std::vector<SegmentItemPair> SegmentItemList; class SegmentTool : public BaseTool @@ -70,10 +70,10 @@ public: */ virtual void ready(); - virtual void handleRightButtonPress(QMouseEvent*); - virtual void handleMouseButtonPress(QMouseEvent*) = 0; - virtual void handleMouseButtonRelease(QMouseEvent*) = 0; - virtual int handleMouseMove(QMouseEvent*) = 0; + virtual void handleRightButtonPress(TQMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*) = 0; + virtual void handleMouseButtonRelease(TQMouseEvent*) = 0; + virtual int handleMouseMove(TQMouseEvent*) = 0; void addCommandToHistory(KCommand *command); @@ -95,7 +95,7 @@ protected: CompositionView* m_canvas; CompositionItem m_currentItem; RosegardenGUIDoc* m_doc; - QPoint m_origPos; + TQPoint m_origPos; bool m_changeMade; }; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp index cb0dec9..5ce8a58 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp @@ -36,7 +36,7 @@ #include "SegmentPencil.h" #include "SegmentResizer.h" #include "SegmentSplitter.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -48,11 +48,11 @@ SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc) m_doc(doc) {} -SegmentTool* SegmentToolBox::createTool(const QString& toolName) +SegmentTool* SegmentToolBox::createTool(const TQString& toolName) { SegmentTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == SegmentPencil::ToolName) @@ -83,7 +83,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName) tool = new SegmentJoiner(m_canvas, m_doc); else { - KMessageBox::error(0, QString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } @@ -93,7 +93,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName) return tool; } -SegmentTool* SegmentToolBox::getTool(const QString& toolName) +SegmentTool* SegmentToolBox::getTool(const TQString& toolName) { return dynamic_cast<SegmentTool*>(BaseToolBox::getTool(toolName)); } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h index 7a46fb6..2609708 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h @@ -30,7 +30,7 @@ #include "SegmentTool.h" -class QString; +class TQString; namespace Rosegarden @@ -46,10 +46,10 @@ class SegmentToolBox : public BaseToolBox public: SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*); - virtual SegmentTool* getTool(const QString& toolName); + virtual SegmentTool* getTool(const TQString& toolName); protected: - virtual SegmentTool* createTool(const QString& toolName); + virtual SegmentTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- |