diff options
Diffstat (limited to 'src/gui/editors')
209 files changed, 4840 insertions, 4837 deletions
diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp index 13bd294..cdf73cc 100644 --- a/src/gui/editors/eventlist/EventView.cpp +++ b/src/gui/editors/eventlist/EventView.cpp @@ -68,23 +68,23 @@ #include <klineeditdlg.h> #include <klistview.h> #include <kxmlguiclient.h> -#include <qbuttongroup.h> -#include <qcanvas.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcanvas.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> @@ -97,7 +97,7 @@ EventView::m_lastSetEventFilter = -1; EventView::EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent): + TQWidget *parent): EditViewBase(doc, segments, 2, parent, "eventview"), m_eventFilter(Note | Text | SystemExclusive | Controller | ProgramChange | PitchBend | Indication | Other), @@ -126,25 +126,25 @@ EventView::EventView(RosegardenGUIDoc *doc, // define some note filtering buttons in a group // m_filterGroup = - new QButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); - - m_noteCheckBox = new QCheckBox(i18n("Note"), m_filterGroup); - m_programCheckBox = new QCheckBox(i18n("Program Change"), m_filterGroup); - m_controllerCheckBox = new QCheckBox(i18n("Controller"), m_filterGroup); - m_pitchBendCheckBox = new QCheckBox(i18n("Pitch Bend"), m_filterGroup); - m_sysExCheckBox = new QCheckBox(i18n("System Exclusive"), m_filterGroup); - m_keyPressureCheckBox = new QCheckBox(i18n("Key Pressure"), m_filterGroup); - m_channelPressureCheckBox = new QCheckBox(i18n("Channel Pressure"), m_filterGroup); - m_restCheckBox = new QCheckBox(i18n("Rest"), m_filterGroup); - m_indicationCheckBox = new QCheckBox(i18n("Indication"), m_filterGroup); - m_textCheckBox = new QCheckBox(i18n("Text"), m_filterGroup); - m_otherCheckBox = new QCheckBox(i18n("Other"), m_filterGroup); + new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); + + m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup); + m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup); + m_controllerCheckBox = new TQCheckBox(i18n("Controller"), m_filterGroup); + m_pitchBendCheckBox = new TQCheckBox(i18n("Pitch Bend"), m_filterGroup); + m_sysExCheckBox = new TQCheckBox(i18n("System Exclusive"), m_filterGroup); + m_keyPressureCheckBox = new TQCheckBox(i18n("Key Pressure"), m_filterGroup); + m_channelPressureCheckBox = new TQCheckBox(i18n("Channel Pressure"), m_filterGroup); + m_restCheckBox = new TQCheckBox(i18n("Rest"), m_filterGroup); + m_indicationCheckBox = new TQCheckBox(i18n("Indication"), m_filterGroup); + m_textCheckBox = new TQCheckBox(i18n("Text"), m_filterGroup); + m_otherCheckBox = new TQCheckBox(i18n("Other"), m_filterGroup); m_grid->addWidget(m_filterGroup, 2, 0); // Connect up // - connect(m_filterGroup, SIGNAL(released(int)), - SLOT(slotModifyFilter(int))); + connect(m_filterGroup, TQT_SIGNAL(released(int)), + TQT_SLOT(slotModifyFilter(int))); m_eventList = new KListView(getCentralWidget()); m_eventList->setItemsRenameable(true); @@ -157,41 +157,41 @@ EventView::EventView(RosegardenGUIDoc *doc, TriggerSegmentRec *rec = segments[0]->getComposition()->getTriggerSegmentRec(id); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); - QFrame *frame = new QFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 5, 3, 5, 5); + TQFrame *frame = new TQFrame(groupBox); + TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5); - layout->addWidget(new QLabel(i18n("Label: "), frame), 0, 0); - QString label = strtoqstr(segments[0]->getLabel()); + layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); + TQString label = strtoqstr(segments[0]->getLabel()); if (label == "") label = i18n("<no label>"); - m_triggerName = new QLabel(label, frame); + m_triggerName = new TQLabel(label, frame); layout->addWidget(m_triggerName, 0, 1); - QPushButton *editButton = new QPushButton(i18n("edit"), frame); + TQPushButton *editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 0, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerName())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName())); - layout->addWidget(new QLabel(i18n("Base pitch: "), frame), 1, 0); - m_triggerPitch = new QLabel(QString("%1").arg(rec->getBasePitch()), frame); + layout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); + m_triggerPitch = new TQLabel(TQString("%1").arg(rec->getBasePitch()), frame); layout->addWidget(m_triggerPitch, 1, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 1, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerPitch())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch())); - layout->addWidget(new QLabel(i18n("Base velocity: "), frame), 2, 0); - m_triggerVelocity = new QLabel(QString("%1").arg(rec->getBaseVelocity()), frame); + layout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); + m_triggerVelocity = new TQLabel(TQString("%1").arg(rec->getBaseVelocity()), frame); layout->addWidget(m_triggerVelocity, 2, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 2, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerVelocity())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity())); /*!!! Comment out these two options, which are not yet used anywhere else -- intended for use with library ornaments, not yet implemented - layout->addWidget(new QLabel(i18n("Default timing: "), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); KComboBox *adjust = new KComboBox(frame); layout->addMultiCellWidget(adjust, 3, 3, 1, 2); @@ -211,11 +211,11 @@ EventView::EventView(RosegardenGUIDoc *doc, adjust->setCurrentItem(2); } - connect(adjust, SIGNAL(activated(int)), this, SLOT(slotTriggerTimeAdjustChanged(int))); + connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int))); - QCheckBox *retune = new QCheckBox(i18n("Adjust pitch to trigger note by default"), frame); + TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame); retune->setChecked(rec->getDefaultRetune()); - connect(retune, SIGNAL(clicked()), this, SLOT(slotTriggerRetuneChanged())); + connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged())); layout->addMultiCellWidget(retune, 4, 4, 1, 2); */ @@ -232,15 +232,15 @@ EventView::EventView(RosegardenGUIDoc *doc, // Connect double clicker // - connect(m_eventList, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotPopupEventEditor(QListViewItem*))); + connect(m_eventList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotPopupEventEditor(TQListViewItem*))); connect(m_eventList, - SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), - SLOT(slotPopupMenu(QListViewItem*, const QPoint&, int))); + TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)), + TQT_SLOT(slotPopupMenu(TQListViewItem*, const TQPoint&, int))); m_eventList->setAllColumnsShowFocus(true); - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); m_eventList->addColumn(i18n("Time ")); m_eventList->addColumn(i18n("Duration ")); @@ -299,11 +299,11 @@ EventView::applyLayout(int /*staffNo*/) // of the view. // if (m_listSelection.size() == 0) { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -327,11 +327,11 @@ EventView::applyLayout(int /*staffNo*/) timeT eventTime = helper.getSoundingAbsoluteTime(it); - QString velyStr; - QString pitchStr; - QString data1Str = ""; - QString data2Str = ""; - QString durationStr; + TQString velyStr; + TQString pitchStr; + TQString data1Str = ""; + TQString data2Str = ""; + TQString durationStr; // Event filters // @@ -386,14 +386,14 @@ EventView::applyLayout(int /*staffNo*/) if ((*it)->has(BaseProperties::PITCH)) { int p = (*it)->get <Int>(BaseProperties::PITCH); - pitchStr = QString("%1 %2 ") + pitchStr = TQString("%1 %2 ") .arg(p).arg(MidiPitchLabel(p).getQString()); } else if ((*it)->isa(Note::EventType)) { pitchStr = "<not set>"; } if ((*it)->has(BaseProperties::VELOCITY)) { - velyStr = QString("%1 "). + velyStr = TQString("%1 "). arg((*it)->get <Int>(BaseProperties::VELOCITY)); } else if ((*it)->isa(Note::EventType)) { @@ -401,60 +401,60 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(Controller::NUMBER)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(Controller::NUMBER)); } else if ((*it)->has(Text::TextTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextTypePropertyName))); } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Indication:: IndicationTypePropertyName))); } else if ((*it)->has(::Rosegarden::Key::KeyPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (::Rosegarden::Key::KeyPropertyName))); } else if ((*it)->has(Clef::ClefPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Clef::ClefPropertyName))); } else if ((*it)->has(PitchBend::MSB)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::MSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_TYPE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (BaseProperties::BEAMED_GROUP_TYPE))); } if ((*it)->has(Controller::VALUE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(Controller::VALUE)); } else if ((*it)->has(Text::TextPropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextPropertyName))); /*!!! } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get<Int>(Indication:: IndicationDurationPropertyName)); */ } else if ((*it)->has(PitchBend::LSB)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::LSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_ID)) { @@ -464,26 +464,26 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(ProgramChange::PROGRAM)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ProgramChange::PROGRAM) + 1); } if ((*it)->has(ChannelPressure::PRESSURE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ChannelPressure::PRESSURE)); } if ((*it)->isa(KeyPressure::EventType) && (*it)->has(KeyPressure::PITCH)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PITCH)); } if ((*it)->has(KeyPressure::PRESSURE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PRESSURE)); } @@ -497,7 +497,7 @@ EventView::applyLayout(int /*staffNo*/) timeMode); } - QString timeStr = makeTimeString(eventTime, timeMode); + TQString timeStr = makeTimeString(eventTime, timeMode); new EventViewItem(m_segments[i], *it, @@ -515,15 +515,15 @@ EventView::applyLayout(int /*staffNo*/) if (m_eventList->childCount() == 0) { if (m_segments.size()) - new QListViewItem(m_eventList, + new TQListViewItem(m_eventList, i18n("<no events at this filter level>")); else - new QListViewItem(m_eventList, i18n("<no events>")); + new TQListViewItem(m_eventList, i18n("<no events>")); - m_eventList->setSelectionMode(QListView::NoSelection); + m_eventList->setSelectionMode(TQListView::NoSelection); stateChanged("have_selection", KXMLGUIClient::StateReverse); } else { - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); // If no selection then select the first event if (m_listSelection.size() == 0) @@ -566,7 +566,7 @@ EventView::makeInitialSelection(timeT time) int i = 0; - for (QListViewItem *child = m_eventList->firstChild(); + for (TQListViewItem *child = m_eventList->firstChild(); child; child = child->nextSibling()) { @@ -612,7 +612,7 @@ EventView::makeTimeString(timeT time, int timeMode) getDocument()->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) @@ -628,12 +628,12 @@ EventView::makeTimeString(timeT time, int timeMode) { RealTime rt = getDocument()->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); } } @@ -648,7 +648,7 @@ EventView::makeDurationString(timeT time, int bar, beat, fraction, remainder; getDocument()->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) @@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time, RealTime rt = getDocument()->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); } } @@ -693,7 +693,7 @@ void EventView::slotEditTriggerName() { bool ok = false; - QString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), + TQString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), strtoqstr(m_segments[0]->getLabel()), &ok, this); @@ -716,10 +716,10 @@ EventView::slotEditTriggerPitch() PitchDialog *dlg = new PitchDialog(this, i18n("Base pitch"), rec->getBasePitch()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBasePitchCommand (&getDocument()->getComposition(), id, dlg->getPitch())); - m_triggerPitch->setText(QString("%1").arg(dlg->getPitch())); + m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch())); } } @@ -734,10 +734,10 @@ EventView::slotEditTriggerVelocity() TrivialVelocityDialog *dlg = new TrivialVelocityDialog (this, i18n("Base velocity"), rec->getBaseVelocity()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand (&getDocument()->getComposition(), id, dlg->getVelocity())); - m_triggerVelocity->setText(QString("%1").arg(dlg->getVelocity())); + m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity())); } } @@ -789,7 +789,7 @@ EventView::slotTriggerRetuneChanged() void EventView::slotEditCut() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -797,8 +797,8 @@ EventView::slotEditCut() RG_DEBUG << "EventView::slotEditCut - cutting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *cutSelection = 0; int itemIndex = -1; @@ -833,7 +833,7 @@ EventView::slotEditCut() void EventView::slotEditCopy() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -841,8 +841,8 @@ EventView::slotEditCopy() RG_DEBUG << "EventView::slotEditCopy - copying " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *copySelection = 0; @@ -883,7 +883,7 @@ EventView::slotEditPaste() timeT insertionTime = 0; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { EventViewItem *item = dynamic_cast<EventViewItem*>(selection.at(0)); @@ -894,8 +894,8 @@ EventView::slotEditPaste() // m_listSelection.clear(); - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -920,15 +920,15 @@ EventView::slotEditPaste() void EventView::slotEditDelete() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; RG_DEBUG << "EventView::slotEditDelete - deleting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *deleteSelection = 0; int itemIndex = -1; @@ -974,7 +974,7 @@ EventView::slotEditInsert() timeT insertTime = m_segments[0]->getStartTime(); timeT insertDuration = 960; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -999,7 +999,7 @@ EventView::slotEditInsert() SimpleEventEditDialog dialog(this, getDocument(), *event, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { EventInsertionCommand *command = new EventInsertionCommand(*m_segments[0], new Event(dialog.getEvent())); @@ -1012,7 +1012,7 @@ EventView::slotEditEvent() { RG_DEBUG << "EventView::slotEditEvent" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1022,7 +1022,7 @@ EventView::slotEditEvent() Event *event = item->getEvent(); SimpleEventEditDialog dialog(this, getDocument(), *event, false); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1039,7 +1039,7 @@ EventView::slotEditEventAdvanced() { RG_DEBUG << "EventView::slotEditEventAdvanced" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1049,7 +1049,7 @@ EventView::slotEditEventAdvanced() Event *event = item->getEvent(); EventEditDialog dialog(this, *event); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1084,15 +1084,15 @@ void EventView::slotFilterSelection() { m_listSelection.clear(); - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { @@ -1117,45 +1117,45 @@ EventView::setupActions() { EditViewBase::setupActions("eventlist.rc"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert.png")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); new KAction(i18n("&Insert Event"), icon, Key_I, this, - SLOT(slotEditInsert()), actionCollection(), + TQT_SLOT(slotEditInsert()), actionCollection(), "insert"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); + icon = TQIconSet(pixmap); new KAction(i18n("&Delete Event"), icon, Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Edit Event"), icon, Key_E, this, - SLOT(slotEditEvent()), actionCollection(), + TQT_SLOT(slotEditEvent()), actionCollection(), "edit_simple"); pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this, - SLOT(slotEditEventAdvanced()), actionCollection(), + TQT_SLOT(slotEditEventAdvanced()), actionCollection(), "edit_advanced"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); m_config->setGroup(EventViewConfigGroup); @@ -1164,30 +1164,30 @@ EventView::setupActions() KRadioAction *action; pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(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) @@ -1211,8 +1211,8 @@ EventView::initStatusBar() KStatusBar* sb = statusBar(); /* - m_hoveredOverNoteName = new QLabel(sb); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); m_hoveredOverAbsoluteTime->setMinimumWidth(160); @@ -1226,7 +1226,7 @@ EventView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - //m_selectionCounter = new QLabel(sb); + //m_selectionCounter = new TQLabel(sb); //sb->addWidget(m_selectionCounter); } @@ -1237,7 +1237,7 @@ EventView::getViewSize() } void -EventView::setViewSize(QSize s) +EventView::setViewSize(TQSize s) { m_eventList->setFixedSize(s); } @@ -1271,7 +1271,7 @@ EventView::getCurrentSegment() void EventView::slotModifyFilter(int button) { - QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); if (checkBox == 0) return ; @@ -1468,7 +1468,7 @@ EventView::slotRawTime() } void -EventView::slotPopupEventEditor(QListViewItem *item) +EventView::slotPopupEventEditor(TQListViewItem *item) { EventViewItem *eItem = dynamic_cast<EventViewItem*>(item); @@ -1479,7 +1479,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1492,7 +1492,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) } void -EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) +EventView::slotPopupMenu(TQListViewItem *item, const TQPoint &pos, int) { if (!item) return ; @@ -1505,7 +1505,7 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) createMenu(); if (m_menu) - //m_menu->exec(QCursor::pos()); + //m_menu->exec(TQCursor::pos()); m_menu->exec(pos); else RG_DEBUG << "EventView::showMenu() : no menu to show\n"; @@ -1514,12 +1514,12 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) void EventView::createMenu() { - m_menu = new QPopupMenu(this); + m_menu = new TQPopupMenu(this); m_menu->insertItem(i18n("Open in Event Editor"), 0); m_menu->insertItem(i18n("Open in Expert Event Editor"), 1); - connect(m_menu, SIGNAL(activated(int)), - SLOT(slotMenuActivated(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotMenuActivated(int))); } void @@ -1536,7 +1536,7 @@ EventView::slotMenuActivated(int value) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1554,7 +1554,7 @@ EventView::slotMenuActivated(int value) Event *event = eItem->getEvent(); EventEditDialog *dialog = new EventEditDialog(this, *event); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, diff --git a/src/gui/editors/eventlist/EventView.h b/src/gui/editors/eventlist/EventView.h index 4c540e6..fc4719a 100644 --- a/src/gui/editors/eventlist/EventView.h +++ b/src/gui/editors/eventlist/EventView.h @@ -31,19 +31,19 @@ #include "base/Segment.h" #include "gui/general/EditViewBase.h" #include <set> -#include <qsize.h> -#include <qstring.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QPopupMenu; -class QPoint; -class QListViewItem; -class QLabel; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQPopupMenu; +class TQPoint; +class TQListViewItem; +class TQLabel; +class TQCheckBox; +class TQButtonGroup; class KListView; @@ -80,7 +80,7 @@ class EventView : public EditViewBase, public SegmentObserver public: EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent); + TQWidget *parent); virtual ~EventView(); @@ -94,8 +94,8 @@ public: virtual void setupActions(); virtual void initStatusBar(); - virtual QSize getViewSize(); - virtual void setViewSize(QSize); + virtual TQSize getViewSize(); + virtual void setViewSize(TQSize); // Set the button states to the current filter positions // @@ -128,12 +128,12 @@ public slots: // Show RMB menu // - void slotPopupMenu(QListViewItem*, const QPoint&, int); + void slotPopupMenu(TQListViewItem*, const TQPoint&, int); void slotMenuActivated(int); // on double click on the event list // - void slotPopupEventEditor(QListViewItem*); + void slotPopupEventEditor(TQListViewItem*); // Change filter parameters // @@ -160,8 +160,8 @@ protected: virtual void readOptions(); void makeInitialSelection(timeT); - QString makeTimeString(timeT time, int timeMode); - QString makeDurationString(timeT time, + TQString makeTimeString(timeT time, int timeMode); + TQString makeDurationString(timeT time, timeT duration, int timeMode); virtual Segment *getCurrentSegment(); @@ -170,32 +170,32 @@ protected: //--------------- Data members --------------------------------- bool m_isTriggerSegment; - QLabel *m_triggerName; - QLabel *m_triggerPitch; - QLabel *m_triggerVelocity; + TQLabel *m_triggerName; + TQLabel *m_triggerPitch; + TQLabel *m_triggerVelocity; KListView *m_eventList; int m_eventFilter; static int m_lastSetEventFilter; - QButtonGroup *m_filterGroup; - QCheckBox *m_noteCheckBox; - QCheckBox *m_textCheckBox; - QCheckBox *m_sysExCheckBox; - QCheckBox *m_programCheckBox; - QCheckBox *m_controllerCheckBox; - QCheckBox *m_restCheckBox; - QCheckBox *m_pitchBendCheckBox; - QCheckBox *m_keyPressureCheckBox; - QCheckBox *m_channelPressureCheckBox; - QCheckBox *m_indicationCheckBox; - QCheckBox *m_otherCheckBox; + TQButtonGroup *m_filterGroup; + TQCheckBox *m_noteCheckBox; + TQCheckBox *m_textCheckBox; + TQCheckBox *m_sysExCheckBox; + TQCheckBox *m_programCheckBox; + TQCheckBox *m_controllerCheckBox; + TQCheckBox *m_restCheckBox; + TQCheckBox *m_pitchBendCheckBox; + TQCheckBox *m_keyPressureCheckBox; + TQCheckBox *m_channelPressureCheckBox; + TQCheckBox *m_indicationCheckBox; + TQCheckBox *m_otherCheckBox; std::vector<int> m_listSelection; std::set<Event *> m_deletedEvents; // deleted since last refresh - QPopupMenu *m_menu; + TQPopupMenu *m_menu; }; diff --git a/src/gui/editors/eventlist/EventViewItem.cpp b/src/gui/editors/eventlist/EventViewItem.cpp index 4435a2b..b5f4d38 100644 --- a/src/gui/editors/eventlist/EventViewItem.cpp +++ b/src/gui/editors/eventlist/EventViewItem.cpp @@ -30,13 +30,13 @@ namespace Rosegarden // Reimplementation of sort for numeric columns - taking the // right hand argument from the left is equivalent to the -// the QString compare(). +// the TQString compare(). // int -EventViewItem::compare(QListViewItem *i, int col, bool ascending) const +EventViewItem::compare(TQListViewItem *i, int col, bool ascending) const { EventViewItem *ei = dynamic_cast<EventViewItem *>(i); - if (!ei) return QListViewItem::compare(i, col, ascending); + if (!ei) return TQListViewItem::compare(i, col, ascending); if (col == 0) { // time Rosegarden::Event &e1 = *m_event; diff --git a/src/gui/editors/eventlist/EventViewItem.h b/src/gui/editors/eventlist/EventViewItem.h index 832e652..a94e29f 100644 --- a/src/gui/editors/eventlist/EventViewItem.h +++ b/src/gui/editors/eventlist/EventViewItem.h @@ -33,7 +33,7 @@ namespace Rosegarden class Segment; class Event; -// EventView specialisation of a QListViewItem with the +// EventView specialisation of a TQListViewItem with the // addition of a segment pointer // class EventViewItem : public KListViewItem @@ -55,14 +55,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - 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) : + 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) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -70,14 +70,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *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) : + KListViewItem *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) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -88,7 +88,7 @@ public: // Reimplement so that we can sort numerically // - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp index 4e609d4..6b9f748 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp @@ -24,18 +24,18 @@ #include "TrivialVelocityDialog.h" -#include <qspinbox.h> -#include <qlabel.h> -#include <qhbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqhbox.h> namespace Rosegarden { -TrivialVelocityDialog::TrivialVelocityDialog(QWidget *parent, QString label, int deft) : +TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *parent, TQString label, int deft) : KDialogBase(parent, 0, true, label, Ok | Cancel) { - QHBox *hbox = makeHBoxMainWidget(); - new QLabel(label, hbox); - m_spin = new QSpinBox(0, 127, 1, hbox); + TQHBox *hbox = makeHBoxMainWidget(); + new TQLabel(label, hbox); + m_spin = new TQSpinBox(0, 127, 1, hbox); m_spin->setValue(deft); } diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.h b/src/gui/editors/eventlist/TrivialVelocityDialog.h index ca19de9..c164110 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.h +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.h @@ -27,20 +27,20 @@ #include <kdialogbase.h> -class QHBox; -class QSpinBox; +class TQHBox; +class TQSpinBox; namespace Rosegarden { class TrivialVelocityDialog : public KDialogBase { public: - TrivialVelocityDialog(QWidget *parent, QString label, int deft); + TrivialVelocityDialog(TQWidget *parent, TQString label, int deft); int getVelocity(); protected: - QSpinBox *m_spin; + TQSpinBox *m_spin; }; } diff --git a/src/gui/editors/guitar/Chord.cpp b/src/gui/editors/guitar/Chord.cpp index 23efe7d..c697e96 100644 --- a/src/gui/editors/guitar/Chord.cpp +++ b/src/gui/editors/guitar/Chord.cpp @@ -25,7 +25,7 @@ #include "Chord.h" #include "base/Event.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { @@ -44,13 +44,13 @@ Chord::Chord() { } -Chord::Chord(const QString& root, const QString& ext) +Chord::Chord(const TQString& root, const TQString& ext) : m_root(root), m_ext(ext), m_isUserChord(false) { if (m_ext.isEmpty()) - m_ext = QString::null; + m_ext = TQString::null; } Chord::Chord(const Event& e) @@ -66,15 +66,15 @@ Chord::Chord(const Event& e) ok = e.get<String>(ExtPropertyName, f); if (ok) { if (f.length() == 0) - m_ext = QString::null; + m_ext = TQString::null; else m_ext = f; } ok = e.get<String>(FingeringPropertyName, f); if (ok) { - QString qf(f); - QString errString; + TQString qf(f); + TQString errString; Fingering fingering = Fingering::parseFingering(qf, errString); setFingering(fingering); @@ -90,7 +90,7 @@ Event* Chord::getAsEvent(timeT absoluteTime) const return e; } -const QRegExp Chord::ALT_BASS_REGEXP("/[A-G]"); +const TQRegExp Chord::ALT_BASS_REGEXP("/[A-G]"); bool operator<(const Chord& a, const Chord& b) { diff --git a/src/gui/editors/guitar/Chord.h b/src/gui/editors/guitar/Chord.h index 9e84cc3..f519c9c 100644 --- a/src/gui/editors/guitar/Chord.h +++ b/src/gui/editors/guitar/Chord.h @@ -30,8 +30,8 @@ #include "misc/Debug.h" #include <vector> -#include <qstring.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqregexp.h> namespace Rosegarden { @@ -53,7 +53,7 @@ public: static const PropertyName FingeringPropertyName; Chord(); - Chord(const QString& root, const QString& ext = QString::null); + Chord(const TQString& root, const TQString& ext = TQString::null); Chord(const Event&); Event* getAsEvent(timeT absoluteTime) const; @@ -64,11 +64,11 @@ public: bool isUserChord() const { return m_isUserChord; } void setUserChord(bool c) { m_isUserChord = c; } - QString getRoot() const { return m_root; } - void setRoot(QString r) { m_root = r; } + TQString getRoot() const { return m_root; } + void setRoot(TQString r) { m_root = r; } - QString getExt() const { return m_ext; } - void setExt(QString r) { m_ext = r.isEmpty() ? QString::null : r; } + TQString getExt() const { return m_ext; } + void setExt(TQString r) { m_ext = r.isEmpty() ? TQString::null : r; } bool hasAltBass() const { return m_ext.contains(ALT_BASS_REGEXP); } @@ -87,10 +87,10 @@ public: protected: - static const QRegExp ALT_BASS_REGEXP; + static const TQRegExp ALT_BASS_REGEXP; - QString m_root; - QString m_ext; + TQString m_root; + TQString m_ext; Fingering m_fingering; diff --git a/src/gui/editors/guitar/ChordMap.cpp b/src/gui/editors/guitar/ChordMap.cpp index 06662d9..207a336 100644 --- a/src/gui/editors/guitar/ChordMap.cpp +++ b/src/gui/editors/guitar/ChordMap.cpp @@ -25,8 +25,8 @@ #include "misc/Debug.h" #include "ChordMap.h" -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> namespace Rosegarden { @@ -47,7 +47,7 @@ void ChordMap::insert(const Chord& c) ChordMap::chordarray -ChordMap::getChords(const QString& root, const QString& ext) const +ChordMap::getChords(const TQString& root, const TQString& ext) const { chordarray res; @@ -74,15 +74,15 @@ ChordMap::getChords(const QString& root, const QString& ext) const QStringList ChordMap::getRootList() const { - static QStringList rootNotes; + static TQStringList rootNotes; if (rootNotes.count() == 0) { - rootNotes = QStringList::split(QString(","), "A,A#/Bb,B,C,C#/Db,D,D#/Eb,E,F,F#/Gb,G,G#/Ab"); + rootNotes = TQStringList::split(TQString(","), "A,A#/Bb,B,C,C#/Db,D,D#/Eb,E,F,F#/Gb,G,G#/Ab"); } // extract roots from map itself - not a very good idea // -// QString currentRoot; +// TQString currentRoot; // // for(chordset::const_iterator i = m_map.begin(); i != m_map.end(); ++i) { // const Chord& chord = *i; @@ -96,10 +96,10 @@ ChordMap::getRootList() const } QStringList -ChordMap::getExtList(const QString& root) const +ChordMap::getExtList(const TQString& root) const { - QStringList extList; - QString currentExt = "ZZ"; + TQStringList extList; + TQString currentExt = "ZZ"; Chord tmp(root); @@ -134,14 +134,14 @@ ChordMap::remove(const Chord& c) m_needSave = true; } -bool ChordMap::saveDocument(const QString& filename, bool userChordsOnly, QString& errMsg) +bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQString& errMsg) { - QFile file(filename); + TQFile file(filename); file.open(IO_WriteOnly); - QTextStream outStream(&file); + TQTextStream outStream(&file); - outStream.setEncoding(QTextStream::UnicodeUTF8); + outStream.setEncoding(TQTextStream::UnicodeUTF8); outStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<!DOCTYPE rosegarden-chord-data>\n" @@ -153,7 +153,7 @@ bool ChordMap::saveDocument(const QString& filename, bool userChordsOnly, QStrin outStream << "<chords>\n"; - QString currentExt, currentRoot; + TQString currentExt, currentRoot; for(iterator i = begin(); i != end(); ++i) { const Chord& chord = *i; diff --git a/src/gui/editors/guitar/ChordMap.h b/src/gui/editors/guitar/ChordMap.h index 5b7488d..7c7ba04 100644 --- a/src/gui/editors/guitar/ChordMap.h +++ b/src/gui/editors/guitar/ChordMap.h @@ -27,7 +27,7 @@ #include "Chord.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <set> namespace Rosegarden @@ -56,17 +56,17 @@ public: void substitute(const Chord& oldChord, const Chord& newChord); void remove(const Chord&); - chordarray getChords(const QString& root, const QString& ext) const; + chordarray getChords(const TQString& root, const TQString& ext) const; - QStringList getRootList() const; - QStringList getExtList(const QString& root) const; + TQStringList getRootList() const; + TQStringList getExtList(const TQString& root) const; void debugDump() const; bool needSave() const { return m_needSave; } void clearNeedSave() { m_needSave = false; } - bool saveDocument(const QString& filename, bool userChordsOnly, QString& errMsg); + bool saveDocument(const TQString& filename, bool userChordsOnly, TQString& errMsg); iterator begin() { return m_map.begin(); } iterator end() { return m_map.end(); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.cpp b/src/gui/editors/guitar/ChordXmlHandler.cpp index 701c43c..6802485 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.cpp +++ b/src/gui/editors/guitar/ChordXmlHandler.cpp @@ -41,12 +41,12 @@ bool ChordXmlHandler::startDocument() return true; } -bool ChordXmlHandler::startElement(const QString& namespaceURI, - const QString& localName, - const QString& qName, - const QXmlAttributes& atts) +bool ChordXmlHandler::startElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName, + const TQXmlAttributes& atts) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "chordset") { // start new chord set @@ -60,7 +60,7 @@ bool ChordXmlHandler::startElement(const QString& namespaceURI, m_currentChord.setExt(atts.value("ext").stripWhiteSpace()); if (atts.index("user") >= 0) { - QString userVal = atts.value("user").stripWhiteSpace().lower(); + TQString userVal = atts.value("user").stripWhiteSpace().lower(); bool res = (userVal == "yes" || userVal == "1" || userVal == "true"); m_currentChord.setUserChord(res); } else { @@ -74,11 +74,11 @@ bool ChordXmlHandler::startElement(const QString& namespaceURI, return true; } -bool ChordXmlHandler::endElement(const QString& namespaceURI, - const QString& localName, - const QString& qName) +bool ChordXmlHandler::endElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "fingering") { @@ -97,9 +97,9 @@ bool ChordXmlHandler::endElement(const QString& namespaceURI, return true; } -bool ChordXmlHandler::characters(const QString& ch) +bool ChordXmlHandler::characters(const TQString& ch) { - QString ch2 = ch.simplifyWhiteSpace(); + TQString ch2 = ch.simplifyWhiteSpace(); if (!ch2.isEmpty() && m_inFingering) { if (!parseFingering(ch2)) @@ -114,9 +114,9 @@ bool ChordXmlHandler::endDocument() return true; } -bool ChordXmlHandler::parseFingering(const QString& ch) { +bool ChordXmlHandler::parseFingering(const TQString& ch) { - QString errString; + TQString errString; Guitar::Fingering fingering = Guitar::Fingering::parseFingering(ch, errString); @@ -131,23 +131,23 @@ bool ChordXmlHandler::parseFingering(const QString& ch) { } bool -ChordXmlHandler::error(const QXmlParseException& exception) +ChordXmlHandler::error(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3") + m_errorString = TQString("%1 at line %2, column %3") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - return QXmlDefaultHandler::error( exception ); + return TQXmlDefaultHandler::error( exception ); } bool -ChordXmlHandler::fatalError(const QXmlParseException& exception) +ChordXmlHandler::fatalError(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3") + m_errorString = TQString("%1 at line %2, column %3") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - return QXmlDefaultHandler::fatalError( exception ); + return TQXmlDefaultHandler::fatalError( exception ); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.h b/src/gui/editors/guitar/ChordXmlHandler.h index ca25168..f9c2e8b 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.h +++ b/src/gui/editors/guitar/ChordXmlHandler.h @@ -30,7 +30,7 @@ #include "Chord.h" #include "ChordMap.h" -#include <qxml.h> +#include <tqxml.h> namespace Rosegarden @@ -44,31 +44,31 @@ public: /// overloaded handler functions virtual bool startDocument(); - virtual bool startElement(const QString& namespaceURI, - const QString& localName, - const QString& qName, - const QXmlAttributes& atts); + virtual bool startElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName, + const TQXmlAttributes& atts); - virtual bool endElement(const QString& namespaceURI, - const QString& localName, - const QString& qName); + virtual bool endElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName); - virtual bool characters(const QString& ch); + virtual bool characters(const TQString& ch); virtual bool endDocument (); /// Return the error string set during the parsing (if any) - QString errorString() { return m_errorString; } - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + TQString errorString() { return m_errorString; } + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); protected: - bool parseFingering(const QString& ch); + bool parseFingering(const TQString& ch); Guitar::Chord m_currentChord; - QString m_currentRoot; - QString m_errorString; + TQString m_currentRoot; + TQString m_errorString; bool m_inFingering; Guitar::ChordMap& m_chordMap; }; diff --git a/src/gui/editors/guitar/Fingering.cpp b/src/gui/editors/guitar/Fingering.cpp index dd1edbd..59459e9 100644 --- a/src/gui/editors/guitar/Fingering.cpp +++ b/src/gui/editors/guitar/Fingering.cpp @@ -26,7 +26,7 @@ #include "misc/Debug.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <sstream> #include <algorithm> #include <klocale.h> @@ -42,9 +42,9 @@ Fingering::Fingering(unsigned int nbStrings) : { } -Fingering::Fingering(QString s) +Fingering::Fingering(TQString s) { - QString errString; + TQString errString; Fingering t = parseFingering(s, errString); m_strings = t.m_strings; } @@ -97,15 +97,15 @@ Fingering::getBarre() const } Fingering -Fingering::parseFingering(const QString& ch, QString& errorString) +Fingering::parseFingering(const TQString& ch, TQString& errorString) { - QStringList tokens = QStringList::split(' ', ch); + TQStringList tokens = TQStringList::split(' ', ch); unsigned int idx = 0; Fingering fingering; - for(QStringList::iterator i = tokens.begin(); i != tokens.end() && idx < fingering.getNbStrings(); ++i, ++idx) { - QString t = *i; + for(TQStringList::iterator i = tokens.begin(); i != tokens.end() && idx < fingering.getNbStrings(); ++i, ++idx) { + TQString t = *i; bool b = false; unsigned int fn = t.toUInt(&b); if (b) { diff --git a/src/gui/editors/guitar/Fingering.h b/src/gui/editors/guitar/Fingering.h index 41d9799..32693dd 100644 --- a/src/gui/editors/guitar/Fingering.h +++ b/src/gui/editors/guitar/Fingering.h @@ -26,7 +26,7 @@ #define _RG_FINGERING_H_ #include <vector> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" namespace Rosegarden @@ -52,7 +52,7 @@ public: static const unsigned int DEFAULT_NB_STRINGS = 6; Fingering(unsigned int nbStrings = DEFAULT_NB_STRINGS); - Fingering(QString); + Fingering(TQString); enum { MUTED = -1, OPEN = 0 }; @@ -78,7 +78,7 @@ public: const_iterator begin() const { return m_strings.begin(); } const_iterator end() const { return m_strings.end(); } - static Fingering parseFingering(const QString&, QString& errorString); + static Fingering parseFingering(const TQString&, TQString& errorString); std::string toString() const; protected: diff --git a/src/gui/editors/guitar/FingeringBox.cpp b/src/gui/editors/guitar/FingeringBox.cpp index 885ba83..6695a66 100644 --- a/src/gui/editors/guitar/FingeringBox.cpp +++ b/src/gui/editors/guitar/FingeringBox.cpp @@ -31,8 +31,8 @@ namespace Rosegarden { -FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, QWidget *parent, const char* name) - : QFrame(parent, name), +FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name) + : TQFrame(parent, name), m_nbFretsDisplayed(nbFrets), m_startFret(1), m_nbStrings(nbStrings), @@ -44,8 +44,8 @@ FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool ed init(); } -FingeringBox::FingeringBox(bool editable, QWidget *parent, const char* name) - : QFrame(parent, name), +FingeringBox::FingeringBox(bool editable, TQWidget *parent, const char* name) + : TQFrame(parent, name), m_nbFretsDisplayed(DEFAULT_NB_DISPLAYED_FRETS), m_startFret(1), m_nbStrings(Guitar::Fingering::DEFAULT_NB_STRINGS), @@ -58,7 +58,7 @@ FingeringBox::FingeringBox(bool editable, QWidget *parent, const char* name) void FingeringBox::init() { - setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); setFixedSize(IMG_WIDTH, IMG_HEIGHT); setBackgroundMode(PaletteBase); if (m_editable) @@ -67,7 +67,7 @@ FingeringBox::init() } void -FingeringBox::drawContents(QPainter* p) +FingeringBox::drawContents(TQPainter* p) { // NOTATION_DEBUG << "FingeringBox::drawContents()" << endl; @@ -140,7 +140,7 @@ FingeringBox::setFingering(const Guitar::Fingering& f) { } unsigned int -FingeringBox::getStringNumber(const QPoint& pos) +FingeringBox::getStringNumber(const TQPoint& pos) { PositionPair result = m_noteSymbols.getStringNumber(maximumHeight(), pos.x(), @@ -156,7 +156,7 @@ FingeringBox::getStringNumber(const QPoint& pos) } unsigned int -FingeringBox::getFretNumber(const QPoint& pos) +FingeringBox::getFretNumber(const TQPoint& pos) { unsigned int fretNum = 0; @@ -178,7 +178,7 @@ FingeringBox::getFretNumber(const QPoint& pos) } void -FingeringBox::mousePressEvent(QMouseEvent *event) +FingeringBox::mousePressEvent(TQMouseEvent *event) { if (!m_editable) return; @@ -194,7 +194,7 @@ FingeringBox::mousePressEvent(QMouseEvent *event) } void -FingeringBox::mouseReleaseEvent(QMouseEvent *event) +FingeringBox::mouseReleaseEvent(TQMouseEvent *event) { if(!m_editable) return ; @@ -250,7 +250,7 @@ FingeringBox::processMouseRelease(unsigned int release_string_num, void -FingeringBox::mouseMoveEvent( QMouseEvent *event ) +FingeringBox::mouseMoveEvent( TQMouseEvent *event ) { if (!m_editable) return; @@ -261,12 +261,12 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) if (transientStringNb != m_transientStringNb || transientFretNb != m_transientFretNb) { - QRect r1 = m_noteSymbols.getTransientNoteSymbolRect(size(), + TQRect r1 = m_noteSymbols.getTransientNoteSymbolRect(size(), m_transientStringNb, m_transientFretNb - (m_startFret - 1)); m_transientStringNb = transientStringNb; m_transientFretNb = transientFretNb; - QRect r2 = m_noteSymbols.getTransientNoteSymbolRect(size(), + TQRect r2 = m_noteSymbols.getTransientNoteSymbolRect(size(), m_transientStringNb, m_transientFretNb - (m_startFret - 1)); @@ -275,7 +275,7 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) // RG_DEBUG << "Fingering::updateTransientPos r1 = " << r1 << " - r2 = " << r2 << endl; -// QRect updateRect = r1 | r2; +// TQRect updateRect = r1 | r2; // update(updateRect); update(); @@ -285,7 +285,7 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) } void -FingeringBox::leaveEvent(QEvent*) +FingeringBox::leaveEvent(TQEvent*) { update(); } diff --git a/src/gui/editors/guitar/FingeringBox.h b/src/gui/editors/guitar/FingeringBox.h index b54c0a8..aa76e52 100644 --- a/src/gui/editors/guitar/FingeringBox.h +++ b/src/gui/editors/guitar/FingeringBox.h @@ -27,7 +27,7 @@ #ifndef _RG_FINGERINGBOX_H_ #define _RG_FINGERINGBOX_H_ -#include <qframe.h> +#include <tqframe.h> #include "NoteSymbols.h" #include "Fingering.h" @@ -43,8 +43,8 @@ class FingeringBox : public QFrame static const unsigned int IMG_HEIGHT = 200; public: - FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, QWidget *parent, const char* name = 0); - FingeringBox(bool editable, QWidget *parent, const char* name = 0); + FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name = 0); + FingeringBox(bool editable, TQWidget *parent, const char* name = 0); void setStartFret(unsigned int f) { m_startFret = f; update(); } unsigned int getStartFret() const { return m_startFret; } @@ -59,20 +59,20 @@ public: protected: void init(); - virtual void drawContents(QPainter*); + virtual void drawContents(TQPainter*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void leaveEvent(QEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void leaveEvent(TQEvent*); void processMouseRelease( unsigned int release_string_num, unsigned int release_fret_num); typedef std::pair<bool, unsigned int> PositionPair; - unsigned int getStringNumber(const QPoint&); + unsigned int getStringNumber(const TQPoint&); - unsigned int getFretNumber(const QPoint&); + unsigned int getFretNumber(const TQPoint&); //! Maximum number of frets displayed by FingeringBox unsigned int m_nbFretsDisplayed; @@ -98,7 +98,7 @@ protected: Guitar::NoteSymbols m_noteSymbols; - QRect m_r1, m_r2; + TQRect m_r1, m_r2; }; } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.cpp b/src/gui/editors/guitar/FingeringListBoxItem.cpp index 31b92e9..aeb8fcd 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.cpp +++ b/src/gui/editors/guitar/FingeringListBoxItem.cpp @@ -27,8 +27,8 @@ namespace Rosegarden { -FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, QListBox* parent, QPixmap pixmap, QString fingeringString) - : QListBoxPixmap(parent, pixmap, fingeringString), +FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString) + : TQListBoxPixmap(parent, pixmap, fingeringString), m_chord(chord) { } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.h b/src/gui/editors/guitar/FingeringListBoxItem.h index b7625e2..8b0a81a 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.h +++ b/src/gui/editors/guitar/FingeringListBoxItem.h @@ -26,7 +26,7 @@ #ifndef _RG_FINGERINGLISTBOXITEM_H_ #define _RG_FINGERINGLISTBOXITEM_H_ -#include <qlistbox.h> +#include <tqlistbox.h> #include "Chord.h" namespace Rosegarden { @@ -34,7 +34,7 @@ namespace Rosegarden { class FingeringListBoxItem : public QListBoxPixmap { public: - FingeringListBoxItem(const Guitar::Chord& chord, QListBox* parent, QPixmap pixmap, QString fingeringString); + FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString); const Guitar::Chord& getChord() { return m_chord; } protected: diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp index 60da8b6..8a4fb3e 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp @@ -28,42 +28,42 @@ #include "ChordMap.h" #include <klineedit.h> -#include <qcombobox.h> -#include <qspinbox.h> +#include <tqcombobox.h> +#include <tqspinbox.h> #include <klocale.h> #include <kmessagebox.h> #include <kstddirs.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> namespace Rosegarden { -GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, QWidget *parent) +GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *parent) : KDialogBase(parent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), m_chord(chord), m_chordMap(chordMap) { - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QGridLayout *topLayout = new QGridLayout(page, 7, 2, spacingHint()); + TQGridLayout *topLayout = new TQGridLayout(page, 7, 2, spacingHint()); - topLayout->addWidget(new QLabel(i18n("Start fret"), page), 0, 1); - m_startFret = new QSpinBox(1, 24, 1, page); + topLayout->addWidget(new TQLabel(i18n("Start fret"), page), 0, 1); + m_startFret = new TQSpinBox(1, 24, 1, page); topLayout->addWidget(m_startFret, 1, 1); - connect(m_startFret, SIGNAL(valueChanged(int)), - this, SLOT(slotStartFretChanged(int))); + connect(m_startFret, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotStartFretChanged(int))); - topLayout->addWidget(new QLabel(i18n("Root"), page), 2, 1); - m_rootNotesList = new QComboBox(page); + topLayout->addWidget(new TQLabel(i18n("Root"), page), 2, 1); + m_rootNotesList = new TQComboBox(page); topLayout->addWidget(m_rootNotesList, 3, 1); - topLayout->addWidget(new QLabel(i18n("Extension"), page), 4, 1); - m_ext = new QComboBox(true, page); + topLayout->addWidget(new TQLabel(i18n("Extension"), page), 4, 1); + m_ext = new TQComboBox(true, page); topLayout->addWidget(m_ext, 5, 1); - topLayout->addItem(new QSpacerItem(1, 1), 6, 1); + topLayout->addItem(new TQSpacerItem(1, 1), 6, 1); m_fingeringBox = new FingeringBox(true, page); m_fingeringBox->setFingering(m_chord.getFingering()); @@ -72,13 +72,13 @@ GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Gui NOTATION_DEBUG << "GuitarChordEditorDialog : chord = " << m_chord << endl; - QStringList rootList = m_chordMap.getRootList(); + TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); m_rootNotesList->setCurrentItem(rootList.findIndex(m_chord.getRoot())); } - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); if (extList.count() > 0) { m_ext->insertStringList(extList); m_ext->setCurrentItem(extList.findIndex(m_chord.getExt())); diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.h b/src/gui/editors/guitar/GuitarChordEditorDialog.h index fc01605..f26fcd3 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.h +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.h @@ -30,8 +30,8 @@ #include "Chord.h" #include "ChordMap.h" -class QComboBox; -class QSpinBox; +class TQComboBox; +class TQSpinBox; namespace Rosegarden { @@ -44,7 +44,7 @@ class GuitarChordEditorDialog : public KDialogBase Q_OBJECT public: - GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, QWidget *parent=0); + GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *parent=0); protected slots: void slotStartFretChanged(int); @@ -52,12 +52,12 @@ protected slots: protected: - void populateExtensions(const QStringList&); + void populateExtensions(const TQStringList&); FingeringBox* m_fingeringBox; - QComboBox* m_rootNotesList; - QSpinBox* m_startFret; - QComboBox* m_ext; + TQComboBox* m_rootNotesList; + TQSpinBox* m_startFret; + TQComboBox* m_ext; Guitar::Chord& m_chord; const Guitar::ChordMap& m_chordMap; }; diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp index bd62c1f..5430098 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp @@ -29,11 +29,11 @@ #include "FingeringListBoxItem.h" #include "misc/Debug.h" -#include <qlistbox.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqlistbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <klocale.h> #include <kmessagebox.h> #include <kstddirs.h> @@ -41,34 +41,34 @@ namespace Rosegarden { -GuitarChordSelectorDialog::GuitarChordSelectorDialog(QWidget *parent) +GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *parent) : KDialogBase(parent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) { - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QGridLayout *topLayout = new QGridLayout(page, 3, 4, spacingHint()); + TQGridLayout *topLayout = new TQGridLayout(page, 3, 4, spacingHint()); - topLayout->addWidget(new QLabel(i18n("Root"), page), 0, 0); - m_rootNotesList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Root"), page), 0, 0); + m_rootNotesList = new TQListBox(page); topLayout->addWidget(m_rootNotesList, 1, 0); - topLayout->addWidget(new QLabel(i18n("Extension"), page), 0, 1); - m_chordExtList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Extension"), page), 0, 1); + m_chordExtList = new TQListBox(page); topLayout->addWidget(m_chordExtList, 1, 1); - m_newFingeringButton = new QPushButton(i18n("New"), page); - m_deleteFingeringButton = new QPushButton(i18n("Delete"), page); - m_editFingeringButton = new QPushButton(i18n("Edit"), page); + m_newFingeringButton = new TQPushButton(i18n("New"), page); + m_deleteFingeringButton = new TQPushButton(i18n("Delete"), page); + m_editFingeringButton = new TQPushButton(i18n("Edit"), page); - m_chordComplexityCombo = new QComboBox(page); + m_chordComplexityCombo = new TQComboBox(page); m_chordComplexityCombo->insertItem(i18n("beginner")); m_chordComplexityCombo->insertItem(i18n("common")); m_chordComplexityCombo->insertItem(i18n("all")); - connect(m_chordComplexityCombo, SIGNAL(activated(int)), - this, SLOT(slotComplexityChanged(int))); + connect(m_chordComplexityCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotComplexityChanged(int))); - QVBoxLayout* vboxLayout = new QVBoxLayout(page, 5); + TQVBoxLayout* vboxLayout = new TQVBoxLayout(page, 5); topLayout->addMultiCellLayout(vboxLayout, 1, 3, 2, 2); vboxLayout->addWidget(m_chordComplexityCombo); vboxLayout->addStretch(10); @@ -76,26 +76,26 @@ GuitarChordSelectorDialog::GuitarChordSelectorDialog(QWidget *parent) vboxLayout->addWidget(m_deleteFingeringButton); vboxLayout->addWidget(m_editFingeringButton); - connect(m_newFingeringButton, SIGNAL(clicked()), - this, SLOT(slotNewFingering())); - connect(m_deleteFingeringButton, SIGNAL(clicked()), - this, SLOT(slotDeleteFingering())); - connect(m_editFingeringButton, SIGNAL(clicked()), - this, SLOT(slotEditFingering())); + connect(m_newFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewFingering())); + connect(m_deleteFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteFingering())); + connect(m_editFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditFingering())); - topLayout->addWidget(new QLabel(i18n("Fingerings"), page), 0, 3); - m_fingeringsList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Fingerings"), page), 0, 3); + m_fingeringsList = new TQListBox(page); topLayout->addMultiCellWidget(m_fingeringsList, 1, 2, 3, 3); m_fingeringBox = new FingeringBox(false, page); topLayout->addMultiCellWidget(m_fingeringBox, 2, 2, 0, 1); - connect(m_rootNotesList, SIGNAL(highlighted(int)), - this, SLOT(slotRootHighlighted(int))); - connect(m_chordExtList, SIGNAL(highlighted(int)), - this, SLOT(slotChordExtHighlighted(int))); - connect(m_fingeringsList, SIGNAL(highlighted(QListBoxItem*)), - this, SLOT(slotFingeringHighlighted(QListBoxItem*))); + connect(m_rootNotesList, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotRootHighlighted(int))); + connect(m_chordExtList, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotChordExtHighlighted(int))); + connect(m_fingeringsList, TQT_SIGNAL(highlighted(TQListBoxItem*)), + this, TQT_SLOT(slotFingeringHighlighted(TQListBoxItem*))); } void @@ -103,7 +103,7 @@ GuitarChordSelectorDialog::init() { // populate the listboxes // - std::vector<QString> chordFiles = getAvailableChordFiles(); + std::vector<TQString> chordFiles = getAvailableChordFiles(); parseChordFiles(chordFiles); @@ -115,11 +115,11 @@ GuitarChordSelectorDialog::init() void GuitarChordSelectorDialog::populate() { - QStringList rootList = m_chordMap.getRootList(); + TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); - QStringList extList = m_chordMap.getExtList(rootList.first()); + TQStringList extList = m_chordMap.getExtList(rootList.first()); populateExtensions(extList); Guitar::ChordMap::chordarray chords = m_chordMap.getChords(rootList.first(), extList.first()); @@ -156,7 +156,7 @@ GuitarChordSelectorDialog::slotRootHighlighted(int i) m_chord.setRoot(m_rootNotesList->text(i)); - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); populateExtensions(extList); if (m_chordExtList->count() > 0) m_chordExtList->setCurrentItem(0); @@ -176,7 +176,7 @@ GuitarChordSelectorDialog::slotChordExtHighlighted(int i) } void -GuitarChordSelectorDialog::slotFingeringHighlighted(QListBoxItem* listBoxItem) +GuitarChordSelectorDialog::slotFingeringHighlighted(TQListBoxItem* listBoxItem) { NOTATION_DEBUG << "GuitarChordSelectorDialog::slotFingeringHighlighted\n"; @@ -193,7 +193,7 @@ GuitarChordSelectorDialog::slotComplexityChanged(int) { // simply repopulate the extension list box // - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); populateExtensions(extList); if (m_chordExtList->count() > 0) m_chordExtList->setCurrentItem(0); @@ -210,7 +210,7 @@ GuitarChordSelectorDialog::slotNewFingering() GuitarChordEditorDialog* chordEditorDialog = new GuitarChordEditorDialog(newChord, m_chordMap, this); - if (chordEditorDialog->exec() == QDialog::Accepted) { + if (chordEditorDialog->exec() == TQDialog::Accepted) { m_chordMap.insert(newChord); // populate lists // @@ -245,7 +245,7 @@ GuitarChordSelectorDialog::slotEditFingering() Guitar::Chord newChord = m_chord; GuitarChordEditorDialog* chordEditorDialog = new GuitarChordEditorDialog(newChord, m_chordMap, this); - if (chordEditorDialog->exec() == QDialog::Accepted) { + if (chordEditorDialog->exec() == TQDialog::Accepted) { NOTATION_DEBUG << "GuitarChordSelectorDialog::slotEditFingering() - current map state :\n"; m_chordMap.debugDump(); m_chordMap.substitute(m_chord, newChord); @@ -280,13 +280,13 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) // select the chord's root // m_rootNotesList->setCurrentItem(0); - QListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); + TQListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); if (correspondingRoot) m_rootNotesList->setSelected(correspondingRoot, true); // update the dialog's complexity setting if needed, then populate the extension list // - QString chordExt = chord.getExt(); + TQString chordExt = chord.getExt(); int complexityLevel = m_chordComplexityCombo->currentItem(); int chordComplexity = evaluateChordComplexity(chordExt); @@ -294,7 +294,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) m_chordComplexityCombo->setCurrentItem(chordComplexity); } - QStringList extList = m_chordMap.getExtList(chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(chord.getRoot()); populateExtensions(extList); // select the chord's extension @@ -303,7 +303,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) chordExt = ""; m_chordExtList->setSelected(0, true); } else { - QListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); + TQListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); if (correspondingExt) m_chordExtList->setSelected(correspondingExt, true); } @@ -321,9 +321,9 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray for(Guitar::ChordMap::chordarray::const_iterator i = chords.begin(); i != chords.end(); ++i) { const Guitar::Chord& chord = *i; - QString fingeringString = chord.getFingering().toString(); + TQString fingeringString = chord.getFingering().toString(); NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings " << chord << endl; - QPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); + TQPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); FingeringListBoxItem *item = new FingeringListBoxItem(chord, m_fingeringsList, fingeringPixmap, fingeringString); if (refFingering == chord.getFingering()) { NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings - fingering found " << fingeringString << endl; @@ -337,11 +337,11 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray QPixmap GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering) const { - QPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); + TQPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); pixmap.fill(); - QPainter pp(&pixmap); - QPainter *p = &pp; + TQPainter pp(&pixmap); + TQPainter *p = &pp; p->setViewport(FINGERING_PIXMAP_H_MARGIN, FINGERING_PIXMAP_W_MARGIN, FINGERING_PIXMAP_WIDTH - FINGERING_PIXMAP_W_MARGIN, @@ -353,7 +353,7 @@ GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering } void -GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) +GuitarChordSelectorDialog::populateExtensions(const TQStringList& extList) { m_chordExtList->clear(); @@ -361,8 +361,8 @@ GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) // some filtering needs to be done int complexityLevel = m_chordComplexityCombo->currentItem(); - QStringList filteredList; - for(QStringList::const_iterator i = extList.constBegin(); i != extList.constEnd(); ++i) { + TQStringList filteredList; + for(TQStringList::const_iterator i = extList.constBegin(); i != extList.constEnd(); ++i) { if (evaluateChordComplexity((*i).lower().stripWhiteSpace()) <= complexityLevel) { NOTATION_DEBUG << "GuitarChordSelectorDialog::populateExtensions - adding '" << *i << "'\n"; filteredList.append(*i); @@ -377,7 +377,7 @@ GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) } int -GuitarChordSelectorDialog::evaluateChordComplexity(const QString& ext) +GuitarChordSelectorDialog::evaluateChordComplexity(const TQString& ext) { if (ext.isEmpty() || ext == "7" || @@ -402,24 +402,24 @@ GuitarChordSelectorDialog::evaluateChordComplexity(const QString& ext) } void -GuitarChordSelectorDialog::parseChordFiles(const std::vector<QString>& chordFiles) +GuitarChordSelectorDialog::parseChordFiles(const std::vector<TQString>& chordFiles) { - for(std::vector<QString>::const_iterator i = chordFiles.begin(); i != chordFiles.end(); ++i) { + for(std::vector<TQString>::const_iterator i = chordFiles.begin(); i != chordFiles.end(); ++i) { parseChordFile(*i); } } void -GuitarChordSelectorDialog::parseChordFile(const QString& chordFileName) +GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) { ChordXmlHandler handler(m_chordMap); - QFile chordFile(chordFileName); + TQFile chordFile(chordFileName); bool ok = chordFile.open(IO_ReadOnly); if (!ok) KMessageBox::error(0, i18n("couldn't open file '%1'").arg(handler.errorString())); - QXmlInputSource source(chordFile); - QXmlSimpleReader reader; + TQXmlInputSource source(chordFile); + TQXmlSimpleReader reader; reader.setContentHandler(&handler); reader.setErrorHandler(&handler); NOTATION_DEBUG << "GuitarChordSelectorDialog::parseChordFile() parsing " << chordFileName << endl; @@ -436,15 +436,15 @@ GuitarChordSelectorDialog::setEditionEnabled(bool enabled) m_editFingeringButton->setEnabled(enabled); } -std::vector<QString> +std::vector<TQString> GuitarChordSelectorDialog::getAvailableChordFiles() { - std::vector<QString> names; + std::vector<TQString> names; // Read config for default directory - QStringList chordDictFiles = KGlobal::dirs()->findAllResources("appdata", "chords/*.xml"); + TQStringList chordDictFiles = KGlobal::dirs()->findAllResources("appdata", "chords/*.xml"); - for(QStringList::iterator i = chordDictFiles.begin(); i != chordDictFiles.end(); ++i) { + for(TQStringList::iterator i = chordDictFiles.begin(); i != chordDictFiles.end(); ++i) { NOTATION_DEBUG << "GuitarChordSelectorDialog::getAvailableChordFiles : adding file " << *i << endl; names.push_back(*i); } @@ -456,12 +456,12 @@ bool GuitarChordSelectorDialog::saveUserChordMap() { // Read config for user directory - QString userDir = KGlobal::dirs()->saveLocation("appdata", "chords/"); + TQString userDir = KGlobal::dirs()->saveLocation("appdata", "chords/"); - QString userChordDictPath = userDir + "/user_chords.xml"; + TQString userChordDictPath = userDir + "/user_chords.xml"; NOTATION_DEBUG << "GuitarChordSelectorDialog::saveUserChordMap() : saving user chord map to " << userChordDictPath << endl; - QString errMsg; + TQString errMsg; m_chordMap.saveDocument(userChordDictPath, true, errMsg); diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.h b/src/gui/editors/guitar/GuitarChordSelectorDialog.h index 6c8f1ad..17b1eff 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.h +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.h @@ -30,13 +30,13 @@ #include "ChordMap.h" #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QListBox; -class QListBoxItem; -class QComboBox; -class QPushButton; +class TQListBox; +class TQListBoxItem; +class TQComboBox; +class TQPushButton; namespace Rosegarden { @@ -50,7 +50,7 @@ class GuitarChordSelectorDialog : public KDialogBase enum { COMPLEXITY_BEGINNER, COMPLEXITY_COMMON, COMPLEXITY_ALL }; public: - GuitarChordSelectorDialog(QWidget *parent=0); + GuitarChordSelectorDialog(TQWidget *parent=0); void init(); @@ -61,7 +61,7 @@ public: protected slots: void slotRootHighlighted(int); void slotChordExtHighlighted(int); - void slotFingeringHighlighted(QListBoxItem*); + void slotFingeringHighlighted(TQListBoxItem*); void slotComplexityChanged(int); void slotNewFingering(); @@ -72,10 +72,10 @@ protected slots: protected: - void parseChordFiles(const std::vector<QString>& chordFiles); - void parseChordFile(const QString& chordFileName); + void parseChordFiles(const std::vector<TQString>& chordFiles); + void parseChordFile(const TQString& chordFileName); void populateFingerings(const Guitar::ChordMap::chordarray&, const Guitar::Fingering& refFingering=Guitar::Fingering(0)); - void populateExtensions(const QStringList& extList); + void populateExtensions(const TQStringList& extList); /// set enabled state of edit/delete buttons void setEditionEnabled(bool); @@ -85,12 +85,12 @@ protected: void refresh(); bool saveUserChordMap(); - int evaluateChordComplexity(const QString& ext); + int evaluateChordComplexity(const TQString& ext); - QPixmap getFingeringPixmap(const Guitar::Fingering& fingering) const; + TQPixmap getFingeringPixmap(const Guitar::Fingering& fingering) const; /// Find all chord list files on the system - std::vector<QString> getAvailableChordFiles(); + std::vector<TQString> getAvailableChordFiles(); Guitar::ChordMap m_chordMap; @@ -98,15 +98,15 @@ protected: Guitar::Chord m_chord; // Chord data - QListBox* m_rootNotesList; - QListBox* m_chordExtList; - QListBox* m_fingeringsList; + TQListBox* m_rootNotesList; + TQListBox* m_chordExtList; + TQListBox* m_fingeringsList; FingeringBox* m_fingeringBox; - QComboBox* m_chordComplexityCombo; - QPushButton* m_newFingeringButton; - QPushButton* m_deleteFingeringButton; - QPushButton* m_editFingeringButton; + TQComboBox* m_chordComplexityCombo; + TQPushButton* m_newFingeringButton; + TQPushButton* m_deleteFingeringButton; + TQPushButton* m_editFingeringButton; static const unsigned int FINGERING_PIXMAP_HEIGHT = 75; static const unsigned int FINGERING_PIXMAP_WIDTH = 75; diff --git a/src/gui/editors/guitar/NoteSymbols.cpp b/src/gui/editors/guitar/NoteSymbols.cpp index 14379de..b7ed8f4 100644 --- a/src/gui/editors/guitar/NoteSymbols.cpp +++ b/src/gui/editors/guitar/NoteSymbols.cpp @@ -63,10 +63,10 @@ NoteSymbols::getY ( int imgHeight, unsigned int fretNb, unsigned int nbOfFrets ) } void -NoteSymbols::drawMuteSymbol ( QPainter* p, +NoteSymbols::drawMuteSymbol ( TQPainter* p, unsigned int position ) const { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), position, m_nbOfStrings ); unsigned int y_pos = getTopBorder( v.height() ) / 2; @@ -89,10 +89,10 @@ NoteSymbols::drawMuteSymbol ( QPainter* p, } void -NoteSymbols::drawOpenSymbol ( QPainter* p, +NoteSymbols::drawOpenSymbol ( TQPainter* p, unsigned int position ) const { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), position, m_nbOfStrings ); unsigned int y_pos = getTopBorder( v.height() ) / 2; double columnWidth = x_pos.second; @@ -101,7 +101,7 @@ NoteSymbols::drawOpenSymbol ( QPainter* p, //std::cout << "NoteSymbols::drawOpenSymbol - drawing Open symbol at string #" << position //<< std::endl; - p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); p->drawEllipse( x_pos.first - ( radius / 2 ), y_pos - ( radius / 2 ), radius, @@ -109,14 +109,14 @@ NoteSymbols::drawOpenSymbol ( QPainter* p, } void -NoteSymbols::drawNoteSymbol ( QPainter* p, +NoteSymbols::drawNoteSymbol ( TQPainter* p, unsigned int stringNb, int fretNb, bool transient ) const { // NOTATION_DEBUG << "NoteSymbols::drawNoteSymbol - string: " << stringNb << ", fret:" << fretNb << endl; - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), stringNb, m_nbOfStrings ); posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets ); double columnWidth = x_pos.second; @@ -124,10 +124,10 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, if (transient) { radius = static_cast<unsigned int>( columnWidth /* * 0.9 */ ); - p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); } else { radius = static_cast<unsigned int>( columnWidth * 0.7 ); - p->setBrush( QBrush(p->brush().color(), Qt::SolidPattern) ); + p->setBrush( TQBrush(p->brush().color(), Qt::SolidPattern) ); } int x = x_pos.first - ( radius / 2 ), @@ -135,7 +135,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, // y = y_pos.first - (radius / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN; -// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << QRect(x,y, radius, radius) << endl; +// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << TQRect(x,y, radius, radius) << endl; p->drawEllipse( x, y, @@ -149,7 +149,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, } void -NoteSymbols::drawBarreSymbol ( QPainter* p, +NoteSymbols::drawBarreSymbol ( TQPainter* p, int fretNb, unsigned int start, unsigned int end ) const @@ -160,7 +160,7 @@ NoteSymbols::drawBarreSymbol ( QPainter* p, drawNoteSymbol ( p, start, fretNb ); if ( ( end - start ) >= 1 ) { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair startXPos = getX ( v.width(), start, m_nbOfStrings ); posPair endXPos = getX ( v.width(), end, m_nbOfStrings ); posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets ); @@ -177,20 +177,20 @@ NoteSymbols::drawBarreSymbol ( QPainter* p, } void -NoteSymbols::drawFretNumber ( QPainter* p, +NoteSymbols::drawFretNumber ( TQPainter* p, unsigned int fret_num ) const { if ( fret_num > 1 ) { - QRect v = p->viewport(); + TQRect v = p->viewport(); unsigned int imgWidth = v.width(); unsigned int imgHeight = v.height(); p->save(); - QFont font; + TQFont font; font.setPixelSize(getFontPixelSize(v.width(), v.height())); p->setFont(font); - QString tmp; + TQString tmp; tmp.setNum( fret_num ); // Use NoteSymbols to grab X and Y for first fret @@ -205,7 +205,7 @@ NoteSymbols::drawFretNumber ( QPainter* p, } void -NoteSymbols::drawFrets ( QPainter* p ) const +NoteSymbols::drawFrets ( TQPainter* p ) const { /* std::cout << "NoteSymbols::drawFretHorizontalLines" << std::endl @@ -214,7 +214,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const << " max string: " << maxStringNum << std::endl; */ - QRect v = p->viewport(); + TQRect v = p->viewport(); unsigned int imgWidth = v.width(); unsigned int imgHeight = v.height(); //unsigned int endXPos = getGuitarChordWidth(imgWidth) + getLeftBorder(imgWidth); @@ -223,7 +223,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const unsigned int yGuitarChord = getGuitarChordHeight( imgHeight ); unsigned int rowHeight = yGuitarChord / m_nbOfFrets; - QPen pen(p->pen()); + TQPen pen(p->pen()); pen.setWidth(imgHeight >= 100 ? FRET_PEN_WIDTH : FRET_PEN_WIDTH / 2); p->save(); p->setPen(pen); @@ -239,8 +239,8 @@ NoteSymbols::drawFrets ( QPainter* p ) const y_pos, endXPos.first, y_pos); -// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << QPoint(getLeftBorder(imgWidth), y_pos) -// << " to " << QPoint(endXPos.first, y_pos) << endl; +// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << TQPoint(getLeftBorder(imgWidth), y_pos) +// << " to " << TQPoint(endXPos.first, y_pos) << endl; y_pos += rowHeight; @@ -251,10 +251,10 @@ NoteSymbols::drawFrets ( QPainter* p ) const } void -NoteSymbols::drawStrings ( QPainter* p ) const +NoteSymbols::drawStrings ( TQPainter* p ) const { // Vertical lines - QRect v = p->viewport(); + TQRect v = p->viewport(); int imgHeight = v.height(); int imgWidth = v.width(); @@ -266,7 +266,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const unsigned int x_pos = (getX ( imgWidth, 0, m_nbOfStrings )).first; - QPen pen(p->pen()); + TQPen pen(p->pen()); pen.setWidth(imgWidth >= 100 ? STRING_PEN_WIDTH : STRING_PEN_WIDTH / 2); p->save(); p->setPen(pen); @@ -286,7 +286,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const } -QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize, +TQRect NoteSymbols::getTransientNoteSymbolRect(TQSize guitarChordSize, unsigned int stringNb, int fretNb) const { @@ -298,7 +298,7 @@ QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize, int x = x_pos.first - ( radius / 2 ), y = y_pos.first + ( (y_pos.second - radius) / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN; - return QRect(x, y, radius, radius); + return TQRect(x, y, radius, radius); } unsigned int @@ -438,7 +438,7 @@ NoteSymbols::getFretNumber ( int imgHeight, } void -NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, QPainter *p) +NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, TQPainter *p) { unsigned int startFret = fingering.getStartFret(); diff --git a/src/gui/editors/guitar/NoteSymbols.h b/src/gui/editors/guitar/NoteSymbols.h index f90fefb..9222a9a 100644 --- a/src/gui/editors/guitar/NoteSymbols.h +++ b/src/gui/editors/guitar/NoteSymbols.h @@ -27,8 +27,8 @@ #ifndef _RG_SYMBOLS_H_ #define _RG_SYMBOLS_H_ -#include <qbrush.h> -#include <qpainter.h> +#include <tqbrush.h> +#include <tqpainter.h> namespace Rosegarden { @@ -105,40 +105,40 @@ public: m_nbOfStrings(nbOfStrings), m_nbOfFrets(nbOfFrets) {}; - //! Display a mute symbol in the QPainter object + //! Display a mute symbol in the TQPainter object void - drawMuteSymbol ( QPainter* p, + drawMuteSymbol ( TQPainter* p, unsigned int position ) const; /* This code borrowed from KGuitar 0.5 */ - //! Display a open symbol in the QPainter object (KGuitar) - void drawOpenSymbol ( QPainter* p, + //! Display a open symbol in the TQPainter object (KGuitar) + void drawOpenSymbol ( TQPainter* p, unsigned int position ) const; /* This code borrowed from KGuitar 0.5 */ - //! Display a note symbol in the QPainter object (KGuitar) - void drawNoteSymbol ( QPainter* p, + //! Display a note symbol in the TQPainter object (KGuitar) + void drawNoteSymbol ( TQPainter* p, unsigned int stringNb, int fretNb, bool transient = false ) const; /* This code borrowed from KGuitar 0.5 */ /** - * Display a bar symbol in the QPainter object (KGuitar) + * Display a bar symbol in the TQPainter object (KGuitar) * The code from the KGuitar project was modified to display a bar. This feature was not * available in that project */ - void drawBarreSymbol ( QPainter* p, + void drawBarreSymbol ( TQPainter* p, int fretNb, unsigned int start, unsigned int end ) const; - void drawFretNumber ( QPainter* p, + void drawFretNumber ( TQPainter* p, unsigned int fret_num ) const; - void drawFrets ( QPainter* p ) const; + void drawFrets ( TQPainter* p ) const; - void drawStrings ( QPainter* p ) const; + void drawStrings ( TQPainter* p ) const; unsigned int getTopBorder ( unsigned int imgHeight ) const; @@ -164,11 +164,11 @@ public: unsigned int y_pos, unsigned int maxFretNum ) const; - QRect getTransientNoteSymbolRect(QSize guitarChordSize, + TQRect getTransientNoteSymbolRect(TQSize guitarChordSize, unsigned int stringNb, int fretNb) const; - static void drawFingeringPixmap(const Fingering& fingering, const NoteSymbols& noteSymbols, QPainter *p); + static void drawFingeringPixmap(const Fingering& fingering, const NoteSymbols& noteSymbols, TQPainter *p); private: diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp index c92b4aa..f97ceaf 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.cpp +++ b/src/gui/editors/matrix/MatrixCanvasView.cpp @@ -32,9 +32,9 @@ #include "MatrixStaff.h" #include "QCanvasMatrixRectangle.h" #include "QCanvasMatrixDiamond.h" -#include <qcanvas.h> -#include <qpoint.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqpoint.h> +#include <tqwidget.h> #include "misc/Debug.h" @@ -45,7 +45,7 @@ namespace Rosegarden MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, SnapGrid *snapGrid, bool drumMode, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_staff(staff), @@ -65,9 +65,9 @@ MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, MatrixCanvasView::~MatrixCanvasView() {} -void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); updateGridSnap(e); @@ -95,14 +95,14 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView::contentsMousePressEvent() at pitch " // << evPitch << ", time " << evTime << std::endl; - QCanvasItemList itemList = canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; @@ -117,9 +117,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: point is " << p.x() << "," << p.y()<< std::endl; - QRect rect = mRect->rect(); + TQRect rect = mRect->rect(); if (dynamic_cast<QCanvasMatrixDiamond*>(mRect)) { - rect = QRect(rect.x() - rect.height()/2, + rect = TQRect(rect.x() - rect.height()/2, rect.y(), rect.width(), rect.height()); @@ -127,7 +127,7 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: adjusted rect " << rect.x() << "," << rect.y() << " (" << rect.width() << "x" << rect.height() << ")" << std::endl; - // QCanvas::collisions() can be a bit optimistic and report + // TQCanvas::collisions() can be a bit optimistic and report // items which are close to the point but not actually under it. // So a little sanity check helps. if (!rect.contains(p, true)) continue; @@ -154,9 +154,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) m_ignoreClick = true; } -void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); /* if (m_snapGrid->getSnapTime(double(p.x()))) m_lastSnap = m_snapGrid->getSnapTime(double(p.x())); @@ -188,13 +188,13 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) m_previousEvTime = evTime; } - QCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList itemList = canvas()->collisions(p); MatrixElement* mel = 0; - for (QCanvasItemList::iterator it = itemList.begin(); + for (TQCanvasItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { @@ -223,9 +223,9 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) } -void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) +void MatrixCanvasView::contentsMouseDoubleClickEvent (TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (!m_staff.containsCanvasCoords(p.x(), p.y())) { m_ignoreClick = true; @@ -235,9 +235,9 @@ void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) contentsMousePressEvent(e); } -void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseReleaseEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (m_ignoreClick) { m_ignoreClick = false; @@ -261,12 +261,12 @@ void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) m_mouseWasPressed = false; } -void MatrixCanvasView::slotExternalWheelEvent(QWheelEvent* e) +void MatrixCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } -void MatrixCanvasView::updateGridSnap(QMouseEvent *e) +void MatrixCanvasView::updateGridSnap(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -288,12 +288,12 @@ void MatrixCanvasView::updateGridSnap(QMouseEvent *e) } } -void MatrixCanvasView::enterEvent(QEvent *e) +void MatrixCanvasView::enterEvent(TQEvent *e) { emit mouseEntered(); } -void MatrixCanvasView::leaveEvent(QEvent *e) +void MatrixCanvasView::leaveEvent(TQEvent *e) { emit mouseLeft(); } diff --git a/src/gui/editors/matrix/MatrixCanvasView.h b/src/gui/editors/matrix/MatrixCanvasView.h index 2ec4c7e..694856e 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.h +++ b/src/gui/editors/matrix/MatrixCanvasView.h @@ -30,11 +30,11 @@ #include "base/Event.h" -class QWidget; -class QWheelEvent; -class QMouseEvent; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQWheelEvent; +class TQMouseEvent; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -53,8 +53,8 @@ public: MatrixCanvasView(MatrixStaff&, SnapGrid *, bool drumMode, - QCanvas *viewing, - QWidget *parent=0, const char *name=0, WFlags f=0); + TQCanvas *viewing, + TQWidget *parent=0, const char *name=0, WFlags f=0); ~MatrixCanvasView(); @@ -64,12 +64,12 @@ public: signals: /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** * Emitted when the mouse cursor moves to a different height @@ -88,33 +88,33 @@ signals: void hoveredOverAbsoluteTimeChanged(unsigned int time); void mousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void mouseMoved(timeT time, int pitch, QMouseEvent*); + void mouseMoved(timeT time, int pitch, TQMouseEvent*); - void mouseReleased(timeT time, int pitch, QMouseEvent*); + void mouseReleased(timeT time, int pitch, TQMouseEvent*); void mouseEntered(); void mouseLeft(); public slots: - void slotExternalWheelEvent(QWheelEvent*); + void slotExternalWheelEvent(TQWheelEvent*); protected: /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse double-click event in the canvas @@ -122,10 +122,10 @@ protected: * NOTE: a double click event is always preceded by a mouse press * event */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); /** * Update the value of snap grid according to the button's state @@ -136,7 +136,7 @@ protected: * @see #setSmoothModifier * @see #getSmoothModifier */ - void updateGridSnap(QMouseEvent *e); + void updateGridSnap(TQMouseEvent *e); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixElement.cpp b/src/gui/editors/matrix/MatrixElement.cpp index 1101284..c706c87 100644 --- a/src/gui/editors/matrix/MatrixElement.cpp +++ b/src/gui/editors/matrix/MatrixElement.cpp @@ -32,9 +32,9 @@ #include "gui/general/GUIPalette.h" #include "QCanvasMatrixDiamond.h" #include "QCanvasMatrixRectangle.h" -#include <qbrush.h> -#include <qcanvas.h> -#include <qcolor.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcolor.h> namespace Rosegarden @@ -62,7 +62,7 @@ MatrixElement::~MatrixElement() removeOverlapRectangles(); } -void MatrixElement::setCanvas(QCanvas* c) +void MatrixElement::setCanvas(TQCanvas* c) { if (!m_canvasRect->canvas()) { @@ -86,10 +86,10 @@ void MatrixElement::drawOverlapRectangles() { if (m_overlapRectangles) removeOverlapRectangles(); - QRect elRect = m_canvasRect->rect(); + TQRect elRect = m_canvasRect->rect(); QCanvasItemList itemList = m_canvasRect->canvas()->collisions(elRect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; @@ -101,14 +101,14 @@ void MatrixElement::drawOverlapRectangles() // Element does'nt collide with itself if (mRect == m_canvasRect) continue; - QRect rect = mRect->rect() & elRect; + TQRect rect = mRect->rect() & elRect; if (!rect.isEmpty()) { if (!m_overlapRectangles) { m_overlapRectangles = new OverlapRectangles(); } - QCanvasRectangle * - overlap = new QCanvasRectangle(rect, m_canvasRect->canvas()); + TQCanvasRectangle * + overlap = new TQCanvasRectangle(rect, m_canvasRect->canvas()); overlap->setBrush(GUIPalette::getColour(GUIPalette::MatrixOverlapBlock)); overlap->setZ(getCanvasZ() + 1); overlap->show(); @@ -118,11 +118,11 @@ void MatrixElement::drawOverlapRectangles() } } -void MatrixElement::redrawOverlaps(QRect rect) +void MatrixElement::redrawOverlaps(TQRect rect) { QCanvasItemList itemList = m_canvasRect->canvas()->collisions(rect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { @@ -147,7 +147,7 @@ void MatrixElement::removeOverlapRectangles() m_overlapRectangles = NULL; } -bool MatrixElement::getVisibleRectangle(QRect &rectangle) +bool MatrixElement::getVisibleRectangle(TQRect &rectangle) { if (m_canvasRect && m_canvasRect->isVisible()) { rectangle = m_canvasRect->rect(); diff --git a/src/gui/editors/matrix/MatrixElement.h b/src/gui/editors/matrix/MatrixElement.h index d330991..921297c 100644 --- a/src/gui/editors/matrix/MatrixElement.h +++ b/src/gui/editors/matrix/MatrixElement.h @@ -27,11 +27,11 @@ #define _RG_MATRIXELEMENT_H_ #include "base/ViewElement.h" -#include <qbrush.h> -#include <qcanvas.h> +#include <tqbrush.h> +#include <tqcanvas.h> #include "QCanvasMatrixRectangle.h" -class QColor; +class TQColor; namespace Rosegarden @@ -42,7 +42,7 @@ class Event; class MatrixElement : public ViewElement { - typedef std::vector <QCanvasRectangle *> OverlapRectangles; + typedef std::vector <TQCanvasRectangle *> OverlapRectangles; public: @@ -50,7 +50,7 @@ public: virtual ~MatrixElement(); - void setCanvas(QCanvas* c); + void setCanvas(TQCanvas* c); /** * Returns the actual x coordinate of the element on the canvas @@ -94,8 +94,8 @@ public: /* * Set the colour of the element */ - void setColour(const QColor &colour) - { m_canvasRect->setBrush(QBrush(colour)); } + void setColour(const TQColor &colour) + { m_canvasRect->setBrush(TQBrush(colour)); } /** * Draws overlap rectangles (if any) @@ -112,12 +112,12 @@ public: * If element rectangle is currently visible gets its size and returns true. * Returns false if element rectangle is undefined or not visible. */ - bool getVisibleRectangle(QRect &rectangle); + bool getVisibleRectangle(TQRect &rectangle); /** * Redraw overlap rectangles of all matrix elements colliding with rect */ - void redrawOverlaps(QRect rect); + void redrawOverlaps(TQRect rect); protected: diff --git a/src/gui/editors/matrix/MatrixEraser.cpp b/src/gui/editors/matrix/MatrixEraser.cpp index 6c2373e..226c4a8 100644 --- a/src/gui/editors/matrix/MatrixEraser.cpp +++ b/src/gui/editors/matrix/MatrixEraser.cpp @@ -36,8 +36,8 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -47,26 +47,26 @@ MatrixEraser::MatrixEraser(MatrixView* parent) : MatrixTool("MatrixEraser", parent), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixeraser.rc"); @@ -75,7 +75,7 @@ MatrixEraser::MatrixEraser(MatrixView* parent) void MatrixEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el) { MATRIX_DEBUG << "MatrixEraser::handleLeftButtonPress : el = " @@ -105,6 +105,6 @@ void MatrixEraser::setBasicContextHelp() setContextHelp(i18n("Click on a note to delete it")); } -const QString MatrixEraser::ToolName = "eraser"; +const TQString MatrixEraser::ToolName = "eraser"; } diff --git a/src/gui/editors/matrix/MatrixEraser.h b/src/gui/editors/matrix/MatrixEraser.h index 4e3d65f..a79d70d 100644 --- a/src/gui/editors/matrix/MatrixEraser.h +++ b/src/gui/editors/matrix/MatrixEraser.h @@ -27,9 +27,9 @@ #define _RG_MATRIXERASER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -49,10 +49,10 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); - static const QString ToolName; + static const TQString ToolName; virtual void ready(); diff --git a/src/gui/editors/matrix/MatrixMover.cpp b/src/gui/editors/matrix/MatrixMover.cpp index d725f16..adf558d 100644 --- a/src/gui/editors/matrix/MatrixMover.cpp +++ b/src/gui/editors/matrix/MatrixMover.cpp @@ -45,9 +45,9 @@ #include "MatrixVLayout.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -60,26 +60,26 @@ MatrixMover::MatrixMover(MatrixView* parent) : m_currentStaff(0), m_lastPlayedPitch(-1) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixmover.rc"); @@ -95,7 +95,7 @@ void MatrixMover::handleEventRemoved(Event *event) void MatrixMover::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixMover::handleLeftButtonPress() : time = " << time << ", el = " << el << endl; @@ -177,7 +177,7 @@ void MatrixMover::handleLeftButtonPress(timeT time, } timeT -MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) +MatrixMover::getDragTime(TQMouseEvent *e, timeT candidate) { int x = m_mParentView->inverseMapPoint(e->pos()).x(); int xdiff = x - m_clickX; @@ -201,7 +201,7 @@ MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) int MatrixMover::handleMouseMove(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseMove() time = " << newTime << endl; @@ -280,7 +280,7 @@ int MatrixMover::handleMouseMove(timeT newTime, void MatrixMover::handleMouseRelease(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseRelease() - newPitch = " << newPitch << endl; @@ -322,7 +322,7 @@ void MatrixMover::handleMouseRelease(timeT newTime, m_lastPlayedPitch = newPitch; } - QString commandLabel; + TQString commandLabel; if (m_quickCopy) { if (selection->getAddedEvents() < 2) { commandLabel = i18n("Copy and Move Event"); @@ -420,20 +420,20 @@ void MatrixMover::handleMouseRelease(timeT newTime, void MatrixMover::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - connect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + connect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); m_mParentView->setCanvasCursor(Qt::sizeAllCursor); setBasicContextHelp(); } void MatrixMover::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - disconnect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + disconnect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); } void MatrixMover::slotMatrixScrolled(int newX, int newY) @@ -441,14 +441,14 @@ void MatrixMover::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint offset = newP1 - oldP1; + TQPoint offset = newP1 - oldP1; offset = m_mParentView->inverseMapPoint(offset); - QPoint p(m_currentElement->getCanvasX(), m_currentElement->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -475,7 +475,7 @@ void MatrixMover::setBasicContextHelp(bool ctrlPressed) } } -const QString MatrixMover::ToolName = "mover"; +const TQString MatrixMover::ToolName = "mover"; } #include "MatrixMover.moc" diff --git a/src/gui/editors/matrix/MatrixMover.h b/src/gui/editors/matrix/MatrixMover.h index ac95c5f..258b465 100644 --- a/src/gui/editors/matrix/MatrixMover.h +++ b/src/gui/editors/matrix/MatrixMover.h @@ -27,11 +27,11 @@ #define _RG_MATRIXMOVER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -93,7 +93,7 @@ protected: void setBasicContextHelp(bool ctrlPressed = false); - timeT getDragTime(QMouseEvent *e, timeT candidate); + timeT getDragTime(TQMouseEvent *e, timeT candidate); MatrixElement* m_currentElement; MatrixStaff* m_currentStaff; diff --git a/src/gui/editors/matrix/MatrixPainter.cpp b/src/gui/editors/matrix/MatrixPainter.cpp index be63bd7..11bbc0b 100644 --- a/src/gui/editors/matrix/MatrixPainter.cpp +++ b/src/gui/editors/matrix/MatrixPainter.cpp @@ -44,9 +44,9 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -58,32 +58,32 @@ MatrixPainter::MatrixPainter(MatrixView* parent) m_currentElement(0), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixpainter.rc"); } -MatrixPainter::MatrixPainter(QString name, MatrixView* parent) +MatrixPainter::MatrixPainter(TQString name, MatrixView* parent) : MatrixTool(name, parent), m_currentElement(0), m_currentStaff(0) @@ -99,13 +99,13 @@ void MatrixPainter::handleEventRemoved(Event *event) void MatrixPainter::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, ViewElement *element) { MATRIX_DEBUG << "MatrixPainter::handleLeftButtonPress : pitch = " << pitch << ", time : " << time << endl; - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -159,7 +159,7 @@ void MatrixPainter::handleLeftButtonPress(timeT time, int MatrixPainter::handleMouseMove(timeT time, int pitch, - QMouseEvent *e) + TQMouseEvent *e) { // sanity check if (!m_currentElement) @@ -175,7 +175,7 @@ int MatrixPainter::handleMouseMove(timeT time, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); time = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (time >= m_currentElement->getViewAbsoluteTime()) { time = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -226,7 +226,7 @@ int MatrixPainter::handleMouseMove(timeT time, void MatrixPainter::handleMouseRelease(timeT endTime, int, - QMouseEvent *e) + TQMouseEvent *e) { // This can happen in case of screen/window capture - // we only get a mouse release, the window snapshot tool @@ -238,7 +238,7 @@ void MatrixPainter::handleMouseRelease(timeT endTime, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (endTime >= m_currentElement->getViewAbsoluteTime()) { endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -320,8 +320,8 @@ void MatrixPainter::handleMouseRelease(timeT endTime, void MatrixPainter::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); m_mParentView->setCanvasCursor(Qt::crossCursor); @@ -330,8 +330,8 @@ void MatrixPainter::ready() void MatrixPainter::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixPainter::slotMatrixScrolled(int newX, int newY) @@ -339,14 +339,14 @@ void MatrixPainter::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint offset = newP1 - oldP1; + TQPoint offset = newP1 - oldP1; offset = m_mParentView->inverseMapPoint(offset); - QPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -364,7 +364,7 @@ void MatrixPainter::setBasicContextHelp() } } -const QString MatrixPainter::ToolName = "painter"; +const TQString MatrixPainter::ToolName = "painter"; } #include "MatrixPainter.moc" diff --git a/src/gui/editors/matrix/MatrixPainter.h b/src/gui/editors/matrix/MatrixPainter.h index 570243a..e04cda9 100644 --- a/src/gui/editors/matrix/MatrixPainter.h +++ b/src/gui/editors/matrix/MatrixPainter.h @@ -27,11 +27,11 @@ #define _RG_MATRIXPAINTER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -55,7 +55,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -63,16 +63,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -89,7 +89,7 @@ protected slots: protected: MatrixPainter(MatrixView*); - MatrixPainter(QString name, MatrixView*); + MatrixPainter(TQString name, MatrixView*); void setBasicContextHelp(); diff --git a/src/gui/editors/matrix/MatrixParameterBox.cpp b/src/gui/editors/matrix/MatrixParameterBox.cpp index c330b94..75228c3 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.cpp +++ b/src/gui/editors/matrix/MatrixParameterBox.cpp @@ -31,19 +31,19 @@ #include "document/RosegardenGUIDoc.h" #include "gui/editors/parameters/InstrumentParameterBox.h" #include <kcombobox.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlayout.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqwidget.h> namespace Rosegarden { MatrixParameterBox::MatrixParameterBox(RosegardenGUIDoc *doc, - QWidget *parent, const char* name): - QFrame(parent, name), + TQWidget *parent, const char* name): + TQFrame(parent, name), m_quantizations(BasicQuantizer::getStandardQuantizations()), m_doc(doc) { @@ -57,19 +57,19 @@ MatrixParameterBox::~MatrixParameterBox() void MatrixParameterBox::initBox() { - QFont boldFont; + TQFont boldFont; boldFont.setPointSize(int(boldFont.pointSize() * 9.5 / 10.0 + 0.5)); boldFont.setBold(true); - QFont plainFont; + TQFont plainFont; plainFont.setPointSize(plainFont.pointSize() * 9 / 10); - QFont font = plainFont; + TQFont font = plainFont; - QFontMetrics fontMetrics(font); + TQFontMetrics fontMetrics(font); // magic numbers: 13 is the height of the menu pixmaps, 10 is just 10 //int comboHeight = std::max(fontMetrics.height(), 13) + 10; - QGridLayout *gridLayout = new QGridLayout(this, 20, 3, 8, 1); + TQGridLayout *gridLayout = new TQGridLayout(this, 20, 3, 8, 1); m_instrumentParameterBox = new InstrumentParameterBox(m_doc, this); gridLayout->addMultiCellWidget(m_instrumentParameterBox, 0, 7, 0, 2); diff --git a/src/gui/editors/matrix/MatrixParameterBox.h b/src/gui/editors/matrix/MatrixParameterBox.h index d8d4a4d..036571b 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.h +++ b/src/gui/editors/matrix/MatrixParameterBox.h @@ -26,12 +26,12 @@ #ifndef _RG_MATRIXPARAMETERBOX_H_ #define _RG_MATRIXPARAMETERBOX_H_ -#include <qframe.h> +#include <tqframe.h> #include <vector> #include "base/Event.h" -class QWidget; +class TQWidget; class KComboBox; @@ -49,7 +49,7 @@ class MatrixParameterBox : public QFrame Q_OBJECT public: - MatrixParameterBox(RosegardenGUIDoc *doc=0, QWidget *parent=0, const char* name=0); + MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *parent=0, const char* name=0); ~MatrixParameterBox(); void initBox(); diff --git a/src/gui/editors/matrix/MatrixResizer.cpp b/src/gui/editors/matrix/MatrixResizer.cpp index 2fab5e8..fce4306 100644 --- a/src/gui/editors/matrix/MatrixResizer.cpp +++ b/src/gui/editors/matrix/MatrixResizer.cpp @@ -42,9 +42,9 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -56,24 +56,24 @@ MatrixResizer::MatrixResizer(MatrixView* parent) m_currentElement(0), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); createMenu("matrixresizer.rc"); @@ -89,7 +89,7 @@ void MatrixResizer::handleEventRemoved(Event *event) void MatrixResizer::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixResizer::handleLeftButtonPress() : el = " @@ -130,7 +130,7 @@ void MatrixResizer::handleLeftButtonPress(timeT, int MatrixResizer::handleMouseMove(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { setBasicContextHelp(); @@ -148,7 +148,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, // the closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -192,7 +192,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, void MatrixResizer::handleMouseRelease(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_currentElement || !m_currentStaff) return ; @@ -202,7 +202,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, // closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -215,7 +215,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, if (selection->getAddedEvents() == 0) return ; else { - QString commandLabel = i18n("Resize Event"); + TQString commandLabel = i18n("Resize Event"); if (selection->getAddedEvents() > 1) commandLabel = i18n("Resize Events"); @@ -289,24 +289,24 @@ void MatrixResizer::handleMouseRelease(timeT newTime, void MatrixResizer::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); m_mParentView->setCanvasCursor(Qt::sizeHorCursor); setBasicContextHelp(); } void MatrixResizer::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixResizer::slotMatrixScrolled(int newX, int newY) { - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint p(newX, newY); + TQPoint p(newX, newY); if (newP1.x() > oldP1.x()) { p.setX(newX + m_parentView->getCanvasView()->visibleWidth()); @@ -327,7 +327,7 @@ void MatrixResizer::setBasicContextHelp() } } -const QString MatrixResizer::ToolName = "resizer"; +const TQString MatrixResizer::ToolName = "resizer"; } #include "MatrixResizer.moc" diff --git a/src/gui/editors/matrix/MatrixResizer.h b/src/gui/editors/matrix/MatrixResizer.h index e623cac..f851fba 100644 --- a/src/gui/editors/matrix/MatrixResizer.h +++ b/src/gui/editors/matrix/MatrixResizer.h @@ -27,11 +27,11 @@ #define _RG_MATRIXRESIZER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp index fbb9689..ef553a5 100644 --- a/src/gui/editors/matrix/MatrixSelector.cpp +++ b/src/gui/editors/matrix/MatrixSelector.cpp @@ -50,10 +50,10 @@ #include <kglobal.h> #include <kapplication.h> #include <kconfig.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -71,27 +71,27 @@ MatrixSelector::MatrixSelector(MatrixView* view) m_matrixView(view), m_selectionToMerge(0) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixselector.rc"); @@ -114,7 +114,7 @@ void MatrixSelector::slotClickTimeout() void MatrixSelector::handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { MATRIX_DEBUG << "MatrixSelector::handleMousePress" << endl; @@ -125,7 +125,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, return ; } - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -220,7 +220,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, void MatrixSelector::handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { m_clickedElement = 0; // should be used for left-button clicks only @@ -240,7 +240,7 @@ void MatrixSelector::handleMidButtonPress(timeT time, void MatrixSelector::handleMouseDoubleClick(timeT , int , int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { /* @@ -272,7 +272,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , EventEditDialog dialog(m_mParentView, *m_clickedElement->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -287,7 +287,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , SimpleEventEditDialog dialog(m_mParentView, m_mParentView->getDocument(), *m_clickedElement->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -307,7 +307,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , else { - QRect rect = staff->getBarExtents(ev->x(), ev->y()); + TQRect rect = staff->getBarExtents(ev->x(), ev->y()); m_selectionRect->setX(rect.x() + 2); m_selectionRect->setY(rect.y()); @@ -317,15 +317,15 @@ void MatrixSelector::handleMouseDoubleClick(timeT , m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } */ } void MatrixSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { if (!m_justSelectedBar) @@ -355,9 +355,9 @@ void MatrixSelector::handleMouseTripleClick(timeT t, } int MatrixSelector::handleMouseMove(timeT time, int height, - QMouseEvent *e) + TQMouseEvent *e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); if (m_dispatchTool) { return m_dispatchTool->handleMouseMove(time, height, e); @@ -399,7 +399,7 @@ int MatrixSelector::handleMouseMove(timeT time, int height, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) +void MatrixSelector::handleMouseRelease(timeT time, int height, TQMouseEvent *e) { MATRIX_DEBUG << "MatrixSelector::handleMouseRelease" << endl; @@ -439,16 +439,16 @@ void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) void MatrixSelector::ready() { if (m_mParentView) { - m_selectionRect = new QCanvasRectangle(m_mParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_mParentView->canvas()); m_selectionRect->hide(); - m_selectionRect->setPen(QPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); + m_selectionRect->setPen(TQPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); m_mParentView->setCanvasCursor(Qt::arrowCursor); //m_mParentView->setPositionTracking(false); } - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); setContextHelp(i18n("Click and drag to select; middle-click and drag to draw new note")); } @@ -461,8 +461,8 @@ void MatrixSelector::stow() m_mParentView->canvas()->update(); } - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -527,13 +527,13 @@ EventSelection* MatrixSelector::getSelection() // get the selections // - QCanvasItemList l = m_selectionRect->collisions(true); + TQCanvasItemList l = m_selectionRect->collisions(true); if (l.count()) { - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *matrixRect = 0; if ((matrixRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) @@ -552,7 +552,7 @@ EventSelection* MatrixSelector::getSelection() } } -void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) +void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -561,14 +561,14 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) // same logic as in MatrixCanvasView::contentsMousePressEvent - QCanvasItemList itemList = m_mParentView->canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_mParentView->canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if (item->active()) { @@ -623,7 +623,7 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) } } -const QString MatrixSelector::ToolName = "selector"; +const TQString MatrixSelector::ToolName = "selector"; } #include "MatrixSelector.moc" diff --git a/src/gui/editors/matrix/MatrixSelector.h b/src/gui/editors/matrix/MatrixSelector.h index a1d1ca4..caa9e4f 100644 --- a/src/gui/editors/matrix/MatrixSelector.h +++ b/src/gui/editors/matrix/MatrixSelector.h @@ -27,12 +27,12 @@ #define _RG_MATRIXSELECTOR_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; namespace Rosegarden @@ -58,22 +58,22 @@ public: virtual void handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual void handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual int handleMouseMove(timeT time, int height, - QMouseEvent *event); + TQMouseEvent *event); virtual void handleMouseRelease(timeT, int height, - QMouseEvent *event); + TQMouseEvent *event); /** * Double-click: edit an event or make a whole-bar selection @@ -81,7 +81,7 @@ public: virtual void handleMouseDoubleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); /** @@ -90,7 +90,7 @@ public: virtual void handleMouseTripleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); @@ -122,7 +122,7 @@ public: */ virtual void handleEventRemoved(Event *event); - static const QString ToolName; + static const TQString ToolName; public slots: /** @@ -146,13 +146,13 @@ signals: protected: MatrixSelector(MatrixView*); - void setContextHelpFor(QPoint p, bool ctrlPressed = false); + void setContextHelpFor(TQPoint p, bool ctrlPressed = false); void setViewCurrentSelection(); //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; int m_clickedStaff; diff --git a/src/gui/editors/matrix/MatrixStaff.cpp b/src/gui/editors/matrix/MatrixStaff.cpp index b6be79f..55491d0 100644 --- a/src/gui/editors/matrix/MatrixStaff.cpp +++ b/src/gui/editors/matrix/MatrixStaff.cpp @@ -46,13 +46,13 @@ #include "MatrixElement.h" #include "MatrixView.h" #include "MatrixVLayout.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { -MatrixStaff::MatrixStaff(QCanvas *canvas, +MatrixStaff::MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, @@ -144,7 +144,7 @@ void MatrixStaff::positionElement(ViewElement* vel) // Memorize initial rectangle position. May be some overlap rectangles // belonging to other notes are here and should be refreshed after // current element is moved. - QRect initialRect; + TQRect initialRect; bool rectWasVisible; if (! m_view->isDrumMode()) rectWasVisible = el->getVisibleRectangle(initialRect); diff --git a/src/gui/editors/matrix/MatrixStaff.h b/src/gui/editors/matrix/MatrixStaff.h index cd0a9dc..24b9e57 100644 --- a/src/gui/editors/matrix/MatrixStaff.h +++ b/src/gui/editors/matrix/MatrixStaff.h @@ -31,7 +31,7 @@ #include "base/Event.h" -class QCanvas; +class TQCanvas; namespace Rosegarden @@ -49,7 +49,7 @@ class Event; class MatrixStaff : public LinedStaff { public: - MatrixStaff(QCanvas *canvas, + MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, diff --git a/src/gui/editors/matrix/MatrixTool.cpp b/src/gui/editors/matrix/MatrixTool.cpp index b036559..a478aa3 100644 --- a/src/gui/editors/matrix/MatrixTool.cpp +++ b/src/gui/editors/matrix/MatrixTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "MatrixView.h" #include <kaction.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -MatrixTool::MatrixTool(const QString& menuName, MatrixView* parent) +MatrixTool::MatrixTool(const TQString& menuName, MatrixView* parent) : EditTool(menuName, parent), m_mParentView(parent) {} diff --git a/src/gui/editors/matrix/MatrixTool.h b/src/gui/editors/matrix/MatrixTool.h index 5127f57..9972176 100644 --- a/src/gui/editors/matrix/MatrixTool.h +++ b/src/gui/editors/matrix/MatrixTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -61,7 +61,7 @@ protected slots: const SnapGrid &getSnapGrid() const; protected: - MatrixTool(const QString& menuName, MatrixView*); + MatrixTool(const TQString& menuName, MatrixView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixToolBox.cpp b/src/gui/editors/matrix/MatrixToolBox.cpp index 466cfea..dab9632 100644 --- a/src/gui/editors/matrix/MatrixToolBox.cpp +++ b/src/gui/editors/matrix/MatrixToolBox.cpp @@ -34,7 +34,7 @@ #include "MatrixMover.h" #include "MatrixResizer.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -45,11 +45,11 @@ MatrixToolBox::MatrixToolBox(MatrixView* parent) m_mParentView(parent) {} -EditTool* MatrixToolBox::createTool(const QString& toolName) +EditTool* MatrixToolBox::createTool(const TQString& toolName) { MatrixTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == MatrixPainter::ToolName) @@ -72,7 +72,7 @@ EditTool* MatrixToolBox::createTool(const QString& toolName) tool = new MatrixResizer(m_mParentView); else { - KMessageBox::error(0, QString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/matrix/MatrixToolBox.h b/src/gui/editors/matrix/MatrixToolBox.h index 3bf0818..4f28c57 100644 --- a/src/gui/editors/matrix/MatrixToolBox.h +++ b/src/gui/editors/matrix/MatrixToolBox.h @@ -28,7 +28,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -47,7 +47,7 @@ public: protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index 38abe20..66c1b0d 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -113,20 +113,20 @@ #include <kstatusbar.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qlayout.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qslider.h> -#include <qstring.h> -#include <qwidget.h> -#include <qwmatrix.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqlayout.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -137,7 +137,7 @@ static double xorigin = 0.0; MatrixView::MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool drumMode) : EditView(doc, segments, 3, parent, "matrixview"), m_hlayout(&doc->getComposition()), @@ -166,8 +166,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, { RG_DEBUG << "MatrixView ctor: drumMode " << drumMode << "\n"; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); - QPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); + TQPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); m_dockLeft = createDockWidget("params dock", matrixPixmap, 0L, i18n("Instrument Parameters")); @@ -175,14 +175,14 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, KDockWidget::DockLeft, // dock site 20); // relation target/this (in percent) - connect(m_dockLeft, SIGNAL(iMBeingClosed()), - this, SLOT(slotParametersClosed())); - connect(m_dockLeft, SIGNAL(hasUndocked()), - this, SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), + this, TQT_SLOT(slotParametersClosed())); // Apparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. - connect(m_mainDockWidget, SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), + this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); Composition &comp = doc->getComposition(); @@ -190,20 +190,20 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, initStatusBar(); - 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 &))); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); m_config->setGroup(MatrixViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures-1.6-plus", true)) { - QPixmap background; - QString pixmapDir = + TQPixmap background; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // We now use a lined background for the non-percussion matrix, // suggested and supplied by Alessandro Preziosi - QString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; - if (background.load(QString("%1/misc/%2"). + TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; + if (background.load(TQString("%1/misc/%2"). arg(pixmapDir, backgroundPixmap))) { tCanvas->setBackgroundPixmap(background); } @@ -255,7 +255,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pianoView = new QDeferScrollView(getCentralWidget()); - QWidget* vport = m_pianoView->viewport(); + TQWidget* vport = m_pianoView->viewport(); if (isDrumMode() && mapping && !m_localMapping->getMap().empty()) { @@ -266,8 +266,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pitchRuler = new PianoKeyboard(vport); } - m_pianoView->setVScrollBarMode(QScrollView::AlwaysOff); - m_pianoView->setHScrollBarMode(QScrollView::AlwaysOff); + m_pianoView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_pianoView->setHScrollBarMode(TQScrollView::AlwaysOff); m_pianoView->addChild(m_pitchRuler); m_pianoView->setFixedWidth(m_pianoView->contentsWidth()); @@ -278,33 +278,33 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, RosegardenGUIApp *app = RosegardenGUIApp::self(); connect(app, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_parameterBox, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(app, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_parameterBox, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); connect(app, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_parameterBox, - SLOT(slotInstrumentParametersChanged(InstrumentId))); + TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), app, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), app, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_parameterBox, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), app, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); connect(parent, // RosegardenGUIView - SIGNAL(checkTrackAssignments()), + TQT_SIGNAL(checkTrackAssignments()), this, - SLOT(slotCheckTrackAssignments())); + TQT_SLOT(slotCheckTrackAssignments())); // Assign the instrument // @@ -312,9 +312,9 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, if (m_drumMode) { connect(m_parameterBox, - SIGNAL(instrumentPercussionSetChanged(Instrument *)), + TQT_SIGNAL(instrumentPercussionSetChanged(Instrument *)), this, - SLOT(slotPercussionSetChanged(Instrument *))); + TQT_SLOT(slotPercussionSetChanged(Instrument *))); } // Set the snap grid from the stored size in the segment @@ -352,83 +352,83 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Connect vertical scrollbars between matrix and piano // - connect(m_canvasView->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView, SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); - connect(m_canvasView, SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + connect(m_canvasView, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); + connect(m_canvasView, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - connect(m_pianoView, SIGNAL(gotWheelEvent(QWheelEvent*)), - m_canvasView, SLOT(slotExternalWheelEvent(QWheelEvent*))); + connect(m_pianoView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + m_canvasView, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // ensure the piano keyb keeps the right margins when the user toggles // the canvas view rulers // - connect(m_canvasView, SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(m_canvasView, TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); - connect(m_canvasView, SIGNAL(mouseEntered()), - this, SLOT(slotMouseEnteredCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseEntered()), + this, TQT_SLOT(slotMouseEnteredCanvasView())); - connect(m_canvasView, SIGNAL(mouseLeft()), - this, SLOT(slotMouseLeftCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseLeft()), + this, TQT_SLOT(slotMouseLeftCanvasView())); /* - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (activeItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (activeItemPressed(TQMouseEvent*, TQCanvasItem*))); */ - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mousePressed(timeT, - int, QMouseEvent*, MatrixElement*)), + TQT_SIGNAL(mousePressed(timeT, + int, TQMouseEvent*, MatrixElement*)), this, - SLOT(slotMousePressed(timeT, - int, QMouseEvent*, MatrixElement*))); + TQT_SLOT(slotMousePressed(timeT, + int, TQMouseEvent*, MatrixElement*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseMoved(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseMoved(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseMoved(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseMoved(timeT, int, TQMouseEvent*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseReleased(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseReleased(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseReleased(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseReleased(timeT, int, TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - this, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + this, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); - QObject::connect - (m_pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (m_pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); MATRIX_DEBUG << "MatrixView : applying layout\n"; @@ -463,34 +463,34 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Disconnect the default connections for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // Force height for the moment // @@ -568,9 +568,9 @@ MatrixView::~MatrixView() // This looks silly but the reason is that on destruction of the // MatrixCanvasView, setCanvas() is called (this is in - // ~QCanvasView so we can't do anything about it). This calls - // QCanvasView::updateContentsSize(), which in turn updates the - // view's scrollbars, hence calling QScrollBar::setValue(), and + // ~TQCanvasView so we can't do anything about it). This calls + // TQCanvasView::updateContentsSize(), which in turn updates the + // view's scrollbars, hence calling TQScrollBar::setValue(), and // sending the QSCrollbar::valueChanged() signal. But we have a // slot connected to that signal // (MatrixView::slotVerticalScrollPianoKeyboard), which scrolls @@ -635,224 +635,224 @@ void MatrixView::setupActions() // KRadioAction* toolAction = 0; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/select.xpm")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, SLOT(slotPaintSelected()), + this, TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, SLOT(slotMoveSelected()), + this, TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + icon = TQIconSet(pixmap); toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, - this, SLOT(slotResizeSelected()), + this, TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, - SLOT(slotTransformsRepeatQuantize()), actionCollection(), + TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("&Legato"), Key_Minus, this, - SLOT(slotTransformsLegato()), actionCollection(), + TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); new KAction(ChangeVelocityCommand::getGlobalName(10), 0, Key_Up + SHIFT, this, - SLOT(slotVelocityUp()), actionCollection(), + TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, Key_Down + SHIFT, this, - SLOT(slotVelocityDown()), actionCollection(), + TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); new KAction(i18n("Set to Current Velocity"), 0, this, - SLOT(slotSetVelocitiesToCurrent()), actionCollection(), + TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); new KAction(i18n("Set Event &Velocities..."), 0, this, - SLOT(slotSetVelocities()), actionCollection(), + TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); new KAction(i18n("Trigger Se&gment..."), 0, this, - SLOT(slotTriggerSegment()), actionCollection(), + TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); new KAction(i18n("Remove Triggers..."), 0, this, - SLOT(slotRemoveTriggers()), actionCollection(), + TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("&Delete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); timeT crotchetDuration = Note(Note::Crotchet).getDuration(); @@ -877,22 +877,22 @@ void MatrixView::setupActions() if (d == SnapGrid::NoSnap) { new KAction(i18n("&No Snap"), 0, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_none"); } else if (d == SnapGrid::SnapToUnit) { } else if (d == SnapGrid::SnapToBeat) { new KAction(i18n("Snap to Bea&t"), Key_1, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { new KAction(i18n("Snap to &Bar"), Key_5, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); KShortcut cut = 0; @@ -903,10 +903,10 @@ void MatrixView::setupActions() else if (d == crotchetDuration) cut = Key_4; else if (d == crotchetDuration * 2) cut = Key_2; - QString actionName = QString("snap_%1").arg(int((crotchetDuration * 4) / d)); + TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; new KAction(i18n("Snap to %1").arg(label), pixmap, cut, this, - SLOT(slotSetSnapFromAction()), actionCollection(), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName); } } @@ -915,16 +915,16 @@ void MatrixView::setupActions() // Settings menu // new KAction(i18n("Show Instrument Parameters"), 0, this, - SLOT(slotDockParametersBack()), + TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); createGUI(getRCFileName(), false); @@ -977,8 +977,8 @@ void MatrixView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverAbsoluteTime = new QLabel(sb); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(175); m_hoveredOverNoteName->setMinimumWidth(65); @@ -986,7 +986,7 @@ void MatrixView::initStatusBar() sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - m_insertModeLabel = new QLabel(sb); + m_insertModeLabel = new TQLabel(sb); m_insertModeLabel->setMinimumWidth(20); sb->addWidget(m_insertModeLabel); @@ -995,13 +995,13 @@ void MatrixView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); } -void MatrixView::slotToolHelpChanged(const QString &s) +void MatrixView::slotToolHelpChanged(const TQString &s) { - QString msg = " " + s; + TQString msg = " " + s; if (m_toolContextHelp == msg) return; m_toolContextHelp = msg; @@ -1081,12 +1081,12 @@ void MatrixView::refreshSegment(Segment *segment, repaintRulers(); } -QSize MatrixView::getViewSize() +TQSize MatrixView::getViewSize() { return canvas()->size(); } -void MatrixView::setViewSize(QSize s) +void MatrixView::setViewSize(TQSize s) { MATRIX_DEBUG << "MatrixView::setViewSize() w = " << s.width() << endl; @@ -1314,11 +1314,11 @@ void MatrixView::slotSelectSelected() { EditTool* selector = m_toolBox->getTool(MatrixSelector::ToolName); - connect(selector, SIGNAL(gotSelection()), - this, SLOT(slotNewSelection())); + connect(selector, TQT_SIGNAL(gotSelection()), + this, TQT_SLOT(slotNewSelection())); - connect(selector, SIGNAL(editTriggerSegment(int)), - this, SIGNAL(editTriggerSegment(int))); + connect(selector, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SIGNAL(editTriggerSegment(int))); setTool(selector); } @@ -1344,7 +1344,7 @@ void MatrixView::slotTransformsQuantize() QuantizeDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -1385,7 +1385,7 @@ void MatrixView::slotTransformsLegato() } void MatrixView::slotMousePressed(timeT time, int pitch, - QMouseEvent* e, MatrixElement* el) + TQMouseEvent* e, MatrixElement* el) { MATRIX_DEBUG << "MatrixView::mousePressed at pitch " << pitch << ", time " << time << endl; @@ -1406,7 +1406,7 @@ void MatrixView::slotMousePressed(timeT time, int pitch, //playPreview(pitch); } -void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseMoved(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1434,7 +1434,7 @@ void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) } -void MatrixView::slotMouseReleased(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseReleased(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1473,14 +1473,14 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, getDocument()->getComposition().getElapsedRealTime(evTime); long ms = rt.msec(); - QString msg = i18n("Note: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString msg = i18n("Note: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(msg); } @@ -1503,7 +1503,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y) if (evPitch != m_previousEvPitch) { MidiPitchLabel label(evPitch); - m_hoveredOverNoteName->setText(QString("%1 (%2)"). + m_hoveredOverNoteName->setText(TQString("%1 (%2)"). arg(label.getQString()).arg(evPitch)); m_previousEvPitch = evPitch; } @@ -1524,18 +1524,18 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getElapsedRealTime(t); long ms = rt.msec(); - // At the advice of doc.trolltech.com/3.0/qstring.html#sprintf - // we replaced this QString format("%ld (%ld.%03lds)"); + // At the advice of doc.trolltech.com/3.0/tqstring.html#sprintf + // we replaced this TQString format("%ld (%ld.%03lds)"); // to support Unicode - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString message = i18n("Time: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -1810,8 +1810,8 @@ void MatrixView::slotVerticalScrollPianoKeyboard(int y) void MatrixView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = *getCurrentSegment(); int pitch = 0; @@ -2017,8 +2017,8 @@ MatrixView::slotSetSnapFromIndex(int s) void MatrixView::slotSetSnapFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(5) == "snap_") { int snap = name.right(name.length() - 5).toInt(); @@ -2117,10 +2117,10 @@ MatrixView::initActionsToolbar() // The SnapGrid combo and Snap To... menu items // - QLabel *sLabel = new QLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); + TQLabel *sLabel = new TQLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); sLabel->setIndent(10); - QPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); m_snapGridCombo = new KComboBox(actionsToolbar); @@ -2138,8 +2138,8 @@ MatrixView::initActionsToolbar() m_snapGridCombo->insertItem(i18n("Bar")); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); m_snapGridCombo->insertItem((err ? noMap : pixmap), label); } @@ -2149,25 +2149,25 @@ MatrixView::initActionsToolbar() } } - connect(m_snapGridCombo, SIGNAL(activated(int)), - this, SLOT(slotSetSnapFromIndex(int))); + connect(m_snapGridCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetSnapFromIndex(int))); // Velocity combo. Not a spin box, because the spin box is too // slow to use unless we make it typeable into, and then it takes // focus away from our more important widgets - QLabel *vlabel = new QLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); + TQLabel *vlabel = new TQLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); vlabel->setIndent(10); m_velocityCombo = new KComboBox(actionsToolbar); for (int i = 0; i <= 127; ++i) { - m_velocityCombo->insertItem(QString("%1").arg(i)); + m_velocityCombo->insertItem(TQString("%1").arg(i)); } m_velocityCombo->setCurrentItem(100); //!!! associate with segment // Quantize combo // - QLabel *qLabel = new QLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); + TQLabel *qLabel = new TQLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); qLabel->setIndent(10); m_quantizeCombo = new KComboBox(actionsToolbar); @@ -2176,15 +2176,15 @@ MatrixView::initActionsToolbar() timeT time = m_quantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeCombo->insertItem(error ? noMap : pmap, label); } m_quantizeCombo->insertItem(noMap, i18n("Off")); - connect(m_quantizeCombo, SIGNAL(activated(int)), - this, SLOT(slotQuantizeSelection(int))); + connect(m_quantizeCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotQuantizeSelection(int))); } void @@ -2217,17 +2217,17 @@ MatrixView::initZoomToolbar() } m_hZoomSlider = new ZoomSlider<double> - (zoomSizes, -1, QSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); m_hZoomSlider->setTracking(true); - m_hZoomSlider->setFocusPolicy(QWidget::NoFocus); + m_hZoomSlider->setFocusPolicy(TQWidget::NoFocus); - m_zoomLabel = new QLabel(zoomToolbar, "kde toolbar widget"); + m_zoomLabel = new TQLabel(zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); m_zoomLabel->setFixedWidth(80); connect(m_hZoomSlider, - SIGNAL(valueChanged(int)), - SLOT(slotChangeHorizontalZoom(int))); + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChangeHorizontalZoom(int))); } @@ -2251,7 +2251,7 @@ MatrixView::slotChangeHorizontalZoom(int) // Set zoom matrix // - QWMatrix zoomMatrix; + TQWMatrix zoomMatrix; zoomMatrix.scale(zoomValue, 1.0); m_canvasView->setWorldMatrix(zoomMatrix); @@ -2521,7 +2521,7 @@ void MatrixView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -2572,7 +2572,7 @@ MatrixView::readjustCanvasSize() int newWidth = computePostLayoutWidth(); // now get the EditView to do the biz - readjustViewSize(QSize(newWidth, maxHeight), true); + readjustViewSize(TQSize(newWidth, maxHeight), true); repaintRulers(); } @@ -2612,7 +2612,7 @@ MatrixView::slotSetVelocities() BaseProperties::VELOCITY, getCurrentVelocity()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Setting Velocities..."), this); addCommandToHistory(new SelectionPropertyCommand (m_currentEventSelection, @@ -2643,7 +2643,7 @@ MatrixView::slotTriggerSegment() return ; TriggerSegmentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -2678,7 +2678,7 @@ MatrixView::slotToggleTempoRuler() } void -MatrixView::paintEvent(QPaintEvent* e) +MatrixView::paintEvent(TQPaintEvent* e) { //!!! There's a lot of code shared between matrix and notation for // dealing with step recording (the insertable note event stuff). @@ -2706,7 +2706,7 @@ MatrixView::updateViewCaption() { // Set client label // - QString view = i18n("Matrix"); + TQString view = i18n("Matrix"); if (isDrumMode()) view = i18n("Percussion"); @@ -2930,7 +2930,7 @@ MatrixView::slotToggleStepByStep() void MatrixView::slotUpdateInsertModeStatus() { - QString message; + TQString message; if (isInChordMode()) { message = i18n(" Chord "); } else { @@ -2940,7 +2940,7 @@ MatrixView::slotUpdateInsertModeStatus() } void -MatrixView::slotStepByStepTargetRequested(QObject *obj) +MatrixView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -3010,7 +3010,7 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) delete m_pitchRuler; - QWidget *vport = m_pianoView->viewport(); + TQWidget *vport = m_pianoView->viewport(); // Create a new pitchruler widget PitchRuler *pitchRuler; @@ -3024,21 +3024,21 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) } - QObject::connect - (pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); // Replace the old pitchruler widget m_pitchRuler = pitchRuler; diff --git a/src/gui/editors/matrix/MatrixView.h b/src/gui/editors/matrix/MatrixView.h index 49e0358..0951c8c 100644 --- a/src/gui/editors/matrix/MatrixView.h +++ b/src/gui/editors/matrix/MatrixView.h @@ -35,20 +35,20 @@ #include "MatrixVLayout.h" #include "MatrixCanvasView.h" #include <kdockwidget.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqpoint.h> +#include <tqsize.h> #include <vector> #include "base/Event.h" #include "document/ConfigGroups.h" -class QWidget; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvas; +class TQWidget; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvas; class KComboBox; @@ -88,7 +88,7 @@ class MatrixView : public EditView public: MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, bool drumMode); + TQWidget *parent, bool drumMode); virtual ~MatrixView(); @@ -100,9 +100,9 @@ public: timeT startTime = 0, timeT endTime = 0); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -194,7 +194,7 @@ public: double getXbyInverseWorldMatrix(double value) { return m_canvasView->inverseWorldMatrix().m11() * value; } - QPoint inverseMapPoint(const QPoint& p) { return m_canvasView->inverseMapPoint(p); } + TQPoint inverseMapPoint(const TQPoint& p) { return m_canvasView->inverseMapPoint(p); } /* * Repaint the control rulers @@ -240,7 +240,7 @@ signals: void jumpPlaybackTo(timeT); void panic(); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void editTriggerSegment(int); @@ -316,10 +316,10 @@ public slots: * or somewhere on the staff */ void slotMousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void slotMouseMoved(timeT time, int pitch, QMouseEvent*); - void slotMouseReleased(timeT time, int pitch, QMouseEvent*); + void slotMouseMoved(timeT time, int pitch, TQMouseEvent*); + void slotMouseReleased(timeT time, int pitch, TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -468,8 +468,8 @@ public slots: /// Note-on or note-off received asynchronously -- as above void slotInsertableNoteEventReceived(int pitch, int velocity, bool noteOn); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); void slotInstrumentLevelsChanged(InstrumentId, const LevelInfo &); @@ -506,7 +506,7 @@ protected slots: */ void slotCheckTrackAssignments(); - void slotToolHelpChanged(const QString &); + void slotToolHelpChanged(const TQString &); void slotMouseEnteredCanvasView(); void slotMouseLeftCanvasView(); @@ -547,12 +547,12 @@ protected: /** * Return the size of the MatrixCanvasView */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Set the size of the MatrixCanvasView */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); virtual MatrixCanvasView *getCanvasView(); @@ -571,7 +571,7 @@ protected: */ bool canPreviewAnotherNote(); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); virtual void updateViewCaption(); @@ -600,10 +600,10 @@ protected: timeT m_lastEndMarkerTime; // Status bar elements - QLabel* m_hoveredOverAbsoluteTime; - QLabel* m_hoveredOverNoteName; - QLabel *m_selectionCounter; - QLabel *m_insertModeLabel; + TQLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverNoteName; + TQLabel *m_selectionCounter; + TQLabel *m_insertModeLabel; bool m_haveHoveredOverNote; /** @@ -642,7 +642,7 @@ protected: KComboBox *m_snapGridCombo; ZoomSlider<double> *m_hZoomSlider; ZoomSlider<double> *m_vZoomSlider; - QLabel *m_zoomLabel; + TQLabel *m_zoomLabel; // Hold our matrix quantization values and snap values // @@ -652,7 +652,7 @@ protected: std::vector<std::pair<PropertyViewRuler*, PropertyBox*> > m_propertyViewRulers; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; // ruler used to scale tempo and chord name ruler ZoomableMatrixHLayoutRulerScale* m_referenceRuler; @@ -664,7 +664,7 @@ protected: bool m_drumMode; bool m_mouseInCanvasView; - QString m_toolContextHelp; + TQString m_toolContextHelp; }; // Commented this out - was a MatrixView inner class, but we get a warning diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index e4641d0..47f8413 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -31,13 +31,13 @@ #include "gui/rulers/PitchRuler.h" #include "MatrixStaff.h" #include "MatrixView.h" -#include <qcolor.h> -#include <qcursor.h> -#include <qevent.h> -#include <qfont.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden @@ -46,32 +46,32 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(QWidget *parent, int keys) +PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) : PitchRuler(parent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), m_mouseDown(false), - m_hoverHighlight(new QWidget(this)), + m_hoverHighlight(new TQWidget(this)), m_lastHoverHighlight(0), m_lastKeyPressed(0) { m_hoverHighlight->hide(); m_hoverHighlight->setPaletteBackgroundColor(GUIPalette::getColour(GUIPalette::MatrixKeyboardFocus)); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); computeKeyPos(); setMouseTracking(true); } -QSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::sizeHint() const { - return QSize(m_keySize.width(), + return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -QSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::minimumSizeHint() const { return m_keySize; } @@ -125,15 +125,15 @@ void PianoKeyboard::computeKeyPos() } } -void PianoKeyboard::paintEvent(QPaintEvent*) +void PianoKeyboard::paintEvent(TQPaintEvent*) { - static QFont *pFont = 0; + static TQFont *pFont = 0; if (!pFont) { - pFont = new QFont(); + pFont = new TQFont(); pFont->setPixelSize(9); } - QPainter paint(this); + TQPainter paint(this); paint.setFont(*pFont); @@ -161,12 +161,12 @@ void PianoKeyboard::paintEvent(QPaintEvent*) m_blackKeySize.width(), m_blackKeySize.height()); } -void PianoKeyboard::enterEvent(QEvent *) +void PianoKeyboard::enterEvent(TQEvent *) { //drawHoverNote(e->y()); } -void PianoKeyboard::leaveEvent(QEvent*) +void PianoKeyboard::leaveEvent(TQEvent*) { m_hoverHighlight->hide(); @@ -241,7 +241,7 @@ void PianoKeyboard::drawHoverNote(int evPitch) } -void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) +void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) { // The routine to work out where this should appear doesn't coincide with the note // that we send to the sequencer - hence this is a bit pointless and crap at the moment. @@ -270,7 +270,7 @@ void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PianoKeyboard::mousePressEvent(QMouseEvent *e) +void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -286,7 +286,7 @@ void PianoKeyboard::mousePressEvent(QMouseEvent *e) } } -void PianoKeyboard::mouseReleaseEvent(QMouseEvent *e) +void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; diff --git a/src/gui/editors/matrix/PianoKeyboard.h b/src/gui/editors/matrix/PianoKeyboard.h index e8b06bb..82c2be6 100644 --- a/src/gui/editors/matrix/PianoKeyboard.h +++ b/src/gui/editors/matrix/PianoKeyboard.h @@ -27,14 +27,14 @@ #define _RG_PIANOKEYBOARD_H_ #include "gui/rulers/PitchRuler.h" -#include <qsize.h> +#include <tqsize.h> #include <vector> -class QWidget; -class QPaintEvent; -class QMouseEvent; -class QEvent; +class TQWidget; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; namespace Rosegarden @@ -46,10 +46,10 @@ class PianoKeyboard : public PitchRuler { Q_OBJECT public: - PianoKeyboard(QWidget *parent, int keys = 88); + PianoKeyboard(TQWidget *parent, int keys = 88); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /* * We want to be able to call this from the matrix view @@ -96,21 +96,21 @@ signals: protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); // compute all key positions and store them // void computeKeyPos(); //--------------- Data members --------------------------------- - QSize m_keySize; - QSize m_blackKeySize; + TQSize m_keySize; + TQSize m_blackKeySize; unsigned int m_nbKeys; std::vector<unsigned int> m_whiteKeyPos; @@ -122,7 +122,7 @@ protected: bool m_selecting; // highlight element on the keyboard - QWidget *m_hoverHighlight; + TQWidget *m_hoverHighlight; int m_lastHoverHighlight; int m_lastKeyPressed; }; diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 582b53a..128d3f9 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -27,17 +27,17 @@ #include "MatrixElement.h" #include "QCanvasMatrixRectangle.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpointarray.h> -#include <qpoint.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpointarray.h> +#include <tqpoint.h> namespace Rosegarden { QCanvasMatrixDiamond::QCanvasMatrixDiamond(MatrixElement &n, - QCanvas* canvas) : + TQCanvas* canvas) : QCanvasMatrixRectangle(n, canvas) {} @@ -46,34 +46,34 @@ QCanvasMatrixDiamond::~QCanvasMatrixDiamond() hide(); } -QPointArray QCanvasMatrixDiamond::areaPoints() const +TQPointArray QCanvasMatrixDiamond::areaPoints() const { - QPointArray pa(4); + TQPointArray pa(4); int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; if ( pen() == NoPen ) pw = 0; - pa[0] = QPoint((int)x() - height() / 2 - pw, (int)y() - pw); - pa[1] = pa[0] + QPoint(height() + pw * 2, 0); - pa[2] = pa[1] + QPoint(0, height() + pw * 2); - pa[3] = pa[0] + QPoint(0, height() + pw * 2); + pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); + pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); + pa[2] = pa[1] + TQPoint(0, height() + pw * 2); + pa[3] = pa[0] + TQPoint(0, height() + pw * 2); return pa; } -void QCanvasMatrixDiamond::drawShape(QPainter & p) +void QCanvasMatrixDiamond::drawShape(TQPainter & p) { p.save(); p.setWorldXForm(false); - QPointArray pa(4); + TQPointArray pa(4); int q = height() / 2 + 2; - QPoint mapPos = p.worldMatrix().map(QPoint(int(x()), int(y()))); + TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); - pa[0] = QPoint(mapPos.x(), mapPos.y() - 3); - pa[1] = QPoint(mapPos.x() + q, mapPos.y() - 3 + q); - pa[2] = pa[0] + QPoint(0, q * 2); - pa[3] = pa[1] - QPoint(q * 2, 0); + pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); + pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); + pa[2] = pa[0] + TQPoint(0, q * 2); + pa[3] = pa[1] - TQPoint(q * 2, 0); p.drawConvexPolygon(pa); p.restore(); diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.h b/src/gui/editors/matrix/QCanvasMatrixDiamond.h index 5163b12..547d7f1 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.h +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.h @@ -27,11 +27,11 @@ #define _RG_QCANVASMATRIXDIAMOND_H_ #include "QCanvasMatrixRectangle.h" -#include <qpointarray.h> +#include <tqpointarray.h> -class QPainter; -class QCanvas; +class TQPainter; +class TQCanvas; namespace Rosegarden @@ -41,18 +41,18 @@ class MatrixElement; /** - * A QCanvas diamond shape referencing a MatrixElement + * A TQCanvas diamond shape referencing a MatrixElement */ class QCanvasMatrixDiamond : public QCanvasMatrixRectangle { public: - QCanvasMatrixDiamond(MatrixElement&, QCanvas *); + QCanvasMatrixDiamond(MatrixElement&, TQCanvas *); ~QCanvasMatrixDiamond(); - QPointArray areaPoints() const; + TQPointArray areaPoints() const; protected: - void drawShape(QPainter &); + void drawShape(TQPainter &); }; diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp index a27b480..bbee6de 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp @@ -26,15 +26,15 @@ #include "QCanvasMatrixRectangle.h" #include "MatrixElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { QCanvasMatrixRectangle::QCanvasMatrixRectangle(MatrixElement& n, - QCanvas* canvas) - : QCanvasRectangle(canvas), + TQCanvas* canvas) + : TQCanvasRectangle(canvas), m_matrixElement(n) {} diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.h b/src/gui/editors/matrix/QCanvasMatrixRectangle.h index 64b6e65..6ef7ed8 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.h +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.h @@ -26,7 +26,7 @@ #ifndef _RG_QCANVASMATRIXRECTANGLE_H_ #define _RG_QCANVASMATRIXRECTANGLE_H_ -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden @@ -36,12 +36,12 @@ class MatrixElement; /** - * A QCanvasRectangle referencing a MatrixElement + * A TQCanvasRectangle referencing a MatrixElement */ class QCanvasMatrixRectangle : public QCanvasRectangle { public: - QCanvasMatrixRectangle(MatrixElement&, QCanvas*); + QCanvasMatrixRectangle(MatrixElement&, TQCanvas*); virtual ~QCanvasMatrixRectangle(); diff --git a/src/gui/editors/notation/ClefInserter.cpp b/src/gui/editors/notation/ClefInserter.cpp index f39327e..5e324a9 100644 --- a/src/gui/editors/notation/ClefInserter.cpp +++ b/src/gui/editors/notation/ClefInserter.cpp @@ -37,8 +37,8 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -48,21 +48,21 @@ ClefInserter::ClefInserter(NotationView* view) : NotationTool("ClefInserter", view), m_clef(Clef::Treble) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("clefinserter.rc"); @@ -97,7 +97,7 @@ void ClefInserter::setClef(std::string clefType) void ClefInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -126,7 +126,7 @@ void ClefInserter::handleLeftButtonPress(timeT, m_nParentView->setSingleSelectedEvent(staffNo, event); } -const QString ClefInserter::ToolName = "clefinserter"; +const TQString ClefInserter::ToolName = "clefinserter"; } #include "ClefInserter.moc" diff --git a/src/gui/editors/notation/ClefInserter.h b/src/gui/editors/notation/ClefInserter.h index 460bfa5..427f885 100644 --- a/src/gui/editors/notation/ClefInserter.h +++ b/src/gui/editors/notation/ClefInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -59,9 +59,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp index ab0498f..d2a668f 100644 --- a/src/gui/editors/notation/FontViewFrame.cpp +++ b/src/gui/editors/notation/FontViewFrame.cpp @@ -28,12 +28,12 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> -#include <qpainter.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpainter.h> #ifdef HAVE_XFT #include <ft2build.h> @@ -46,8 +46,8 @@ namespace Rosegarden { -FontViewFrame::FontViewFrame( int pixelSize, QWidget* parent, const char* name ) : - QFrame(parent, name), +FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) : + TQFrame(parent, name), m_fontSize(pixelSize), m_tableFont(0) { @@ -63,7 +63,7 @@ FontViewFrame::~FontViewFrame() } void -FontViewFrame::setFont(QString font) +FontViewFrame::setFont(TQString font) { m_fontName = font; loadFont(); @@ -104,9 +104,9 @@ FontViewFrame::loadFont() FcChar8 *matchFamily; FcPatternGetString(match, FC_FAMILY, 0, &matchFamily); - if (QString((const char *)matchFamily).lower() != m_fontName.lower()) { + if (TQString((const char *)matchFamily).lower() != m_fontName.lower()) { KMessageBox::sorry(this, i18n("Warning: No good match for font name %1 (best is %2)"). - arg(m_fontName).arg(QString((const char *)matchFamily))); + arg(m_fontName).arg(TQString((const char *)matchFamily))); m_fontName = (const char *)matchFamily; } @@ -114,7 +114,7 @@ FontViewFrame::loadFont() if (!m_tableFont) { KMessageBox::error(this, i18n("Error: Unable to open best-match font %1"). - arg(QString((const char *)matchFamily))); + arg(TQString((const char *)matchFamily))); } #endif } @@ -125,46 +125,46 @@ void FontViewFrame::setGlyphs(bool glyphs) update(); } -QSize FontViewFrame::sizeHint() const +TQSize FontViewFrame::sizeHint() const { - return QSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), + return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); } -QSize FontViewFrame::cellSize() const +TQSize FontViewFrame::cellSize() const { - QFontMetrics fm = fontMetrics(); - return QSize( fm.maxWidth(), fm.lineSpacing() + 1 ); + TQFontMetrics fm = fontMetrics(); + return TQSize( fm.maxWidth(), fm.lineSpacing() + 1 ); } -void FontViewFrame::paintEvent( QPaintEvent* e ) +void FontViewFrame::paintEvent( TQPaintEvent* e ) { #ifdef HAVE_XFT if (!m_tableFont) return ; - QFrame::paintEvent(e); - QPainter p(this); + TQFrame::paintEvent(e); + TQPainter p(this); int ll = 25; int ml = frameWidth() + margin() + ll + 1; int mt = frameWidth() + margin(); - QSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); + TQSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); if ( !cell.width() || !cell.height() ) return ; - QColor body(255, 255, 192); - QColor negative(255, 192, 192); - QColor positive(192, 192, 255); - QColor rnegative(255, 128, 128); - QColor rpositive(128, 128, 255); + TQColor body(255, 255, 192); + TQColor negative(255, 192, 192); + TQColor positive(192, 192, 255); + TQColor rnegative(255, 128, 128); + TQColor rpositive(128, 128, 255); Drawable drawable = (Drawable)handle(); XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable, (Visual *)x11Visual(), x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -185,18 +185,18 @@ void FontViewFrame::paintEvent( QPaintEvent* e ) if (j == 0) continue; p.setFont(kapp->font()); - QFontMetrics afm(kapp->font()); - QString s = QString("%1").arg(m_row * 256 + (j - 1) * 16); + TQFontMetrics afm(kapp->font()); + TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16); p.drawText(x - afm.width(s), y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(0, y, width(), y); p.setPen(Qt::black); continue; } else if (j == 0) { p.setFont(kapp->font()); - QString s = QString("%1").arg(i - 1); + TQString s = TQString("%1").arg(i - 1); p.drawText(x, y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(x, 0, x, height()); p.setPen(Qt::black); continue; diff --git a/src/gui/editors/notation/FontViewFrame.h b/src/gui/editors/notation/FontViewFrame.h index 8a1a946..a344fc1 100644 --- a/src/gui/editors/notation/FontViewFrame.h +++ b/src/gui/editors/notation/FontViewFrame.h @@ -26,13 +26,13 @@ #ifndef _RG_FONTVIEWFRAME_H_ #define _RG_FONTVIEWFRAME_H_ -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -45,24 +45,24 @@ class FontViewFrame : public QFrame Q_OBJECT public: - FontViewFrame(int pixelSize, QWidget *parent = 0, const char *name = 0); + FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); virtual ~FontViewFrame(); - QSize sizeHint() const; + TQSize sizeHint() const; bool hasRow(int row) const; public slots: - void setFont(QString name); + void setFont(TQString name); void setRow(int); void setGlyphs(bool glyphs); protected: - QSize cellSize() const; - void paintEvent( QPaintEvent* ); + TQSize cellSize() const; + void paintEvent( TQPaintEvent* ); void loadFont(); private: - QString m_fontName; + TQString m_fontName; int m_fontSize; void *m_tableFont; int m_row; diff --git a/src/gui/editors/notation/GuitarChordInserter.cpp b/src/gui/editors/notation/GuitarChordInserter.cpp index 2482b87..b4f6839 100644 --- a/src/gui/editors/notation/GuitarChordInserter.cpp +++ b/src/gui/editors/notation/GuitarChordInserter.cpp @@ -41,9 +41,9 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -53,15 +53,15 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) : NotationTool("GuitarChordInserter", view), m_guitarChordSelector(0) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet @@ -69,7 +69,7 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNoteSelected()), actionCollection(), + TQT_SLOT(slotNoteSelected()), actionCollection(), "notes"); m_guitarChordSelector = new GuitarChordSelectorDialog(m_nParentView); @@ -96,7 +96,7 @@ void GuitarChordInserter::slotSelectSelected() void GuitarChordInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "GuitarChordInserter::handleLeftButtonPress" << endl; @@ -119,7 +119,7 @@ bool GuitarChordInserter::processDialog( Staff* staff, { bool result = false; - if (m_guitarChordSelector->exec() == QDialog::Accepted) { + if (m_guitarChordSelector->exec() == TQDialog::Accepted) { Guitar::Chord chord = m_guitarChordSelector->getChord(); GuitarChordInsertionCommand *command = @@ -159,7 +159,7 @@ void GuitarChordInserter::handleSelectedGuitarChord (ViewElement* element, Staff } catch (Exception e) {} } -void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, QMouseEvent* e) +void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, TQMouseEvent* e) { NOTATION_DEBUG << "GuitarChordInserter::createNewGuitarChord" << endl; Event *clef = 0, *key = 0; @@ -179,7 +179,7 @@ void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *sta processDialog( staff, insertionTime ); } -const QString GuitarChordInserter::ToolName = "guitarchordinserter"; +const TQString GuitarChordInserter::ToolName = "guitarchordinserter"; } #include "GuitarChordInserter.moc" diff --git a/src/gui/editors/notation/GuitarChordInserter.h b/src/gui/editors/notation/GuitarChordInserter.h index 3bd5660..d66174b 100644 --- a/src/gui/editors/notation/GuitarChordInserter.h +++ b/src/gui/editors/notation/GuitarChordInserter.h @@ -27,11 +27,11 @@ #define _RG_GUITAR_CHORD_INSERTER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,17 +56,17 @@ public: virtual void handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element); /* virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); */ - static const QString ToolName; + static const TQString ToolName; protected slots: void slotGuitarChordSelected(); @@ -84,7 +84,7 @@ private: void createNewGuitarChord (ViewElement* element, Staff *staff, - QMouseEvent* e); + TQMouseEvent* e); bool processDialog (Staff *staff, timeT& insertionTime); diff --git a/src/gui/editors/notation/HeadersGroup.cpp b/src/gui/editors/notation/HeadersGroup.cpp index c0a2de0..f7dcc82 100644 --- a/src/gui/editors/notation/HeadersGroup.cpp +++ b/src/gui/editors/notation/HeadersGroup.cpp @@ -27,10 +27,10 @@ #include <limits> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> +#include <tqlabel.h> #include "HeadersGroup.h" #include "TrackHeader.h" @@ -43,8 +43,8 @@ namespace Rosegarden HeadersGroup:: -HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp) : - QVBox(parent), +HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp) : + TQVBox(parent), m_notationView(nv), m_composition(comp), m_usedHeight(0), @@ -83,7 +83,7 @@ void HeadersGroup::completeToHeight(int height) { if (height > m_usedHeight) { - if (!m_filler) m_filler = new QLabel(this); + if (!m_filler) m_filler = new TQLabel(this); m_filler->setFixedHeight(height - m_usedHeight); } } @@ -149,7 +149,7 @@ HeadersGroup::setCurrent(TrackId trackId) } void -HeadersGroup::resizeEvent(QResizeEvent * ev) +HeadersGroup::resizeEvent(TQResizeEvent * ev) { // Needed to avoid gray zone at the right of headers // when width is decreasing diff --git a/src/gui/editors/notation/HeadersGroup.h b/src/gui/editors/notation/HeadersGroup.h index 22d25da..b2a9edb 100644 --- a/src/gui/editors/notation/HeadersGroup.h +++ b/src/gui/editors/notation/HeadersGroup.h @@ -33,13 +33,13 @@ #include "base/Track.h" #include <vector> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> -class QLabel; -class QResizeEvent; +class TQLabel; +class TQResizeEvent; namespace Rosegarden @@ -58,7 +58,7 @@ public: /** * Create an empty headers group */ - HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp); + HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp); void removeAllHeaders(); @@ -123,7 +123,7 @@ signals : void headersResized(int newWidth); private: - void resizeEvent(QResizeEvent * ev); + void resizeEvent(TQResizeEvent * ev); NotationView * m_notationView; Composition * m_composition; @@ -132,7 +132,7 @@ private: TrackHeaderVector m_headers; int m_usedHeight; - QLabel * m_filler; + TQLabel * m_filler; int m_lastX; int m_lastWidth; diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp index 55e63ac..fb7d2d9 100644 --- a/src/gui/editors/notation/NotationCanvasView.cpp +++ b/src/gui/editors/notation/NotationCanvasView.cpp @@ -34,22 +34,22 @@ #include "NotationElement.h" #include "NotationProperties.h" #include "NotationStaff.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_linedStaffManager(staffmgr), @@ -74,11 +74,11 @@ NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, m_vert1 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert1->setPoints(0, 0, 0, 8); - m_vert1->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert1->setPen(TQPen(TQColor(64, 64, 64), 1)); m_vert2 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert2->setPoints(17, 0, 17, 8); - m_vert2->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert2->setPen(TQPen(TQColor(64, 64, 64), 1)); m_heightMarker->hide(); } @@ -99,13 +99,13 @@ NotationCanvasView::setHeightTracking(bool t) } void -NotationCanvasView::contentsMouseReleaseEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseReleaseEvent(TQMouseEvent *e) { emit mouseReleased(e); } void -NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) { NotationStaff *prevStaff = m_currentStaff; int prevHeight = m_currentHeight; @@ -115,7 +115,7 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) if (!m_currentStaff) { - emit hoveredOverNoteChanged(QString::null); + emit hoveredOverNoteChanged(TQString::null); if (prevStaff) { m_heightMarker->hide(); canvas()->update(); @@ -156,13 +156,13 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) emit mouseMoved(e); } -void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) +void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e) { NOTATION_DEBUG << "NotationCanvasView::contentsMousePressEvent() - btn : " << e->button() << " - state : " << e->state() << endl; - QCanvasItemList itemList = canvas()->collisions(e->pos()); + TQCanvasItemList itemList = canvas()->collisions(e->pos()); // We don't want to use m_currentStaff/Height, because we want // to make sure the event happens at the point we clicked at @@ -172,7 +172,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; NotationElement *clickedNote = 0; NotationElement *clickedVagueNote = 0; NotationElement *clickedNonNote = 0; @@ -197,7 +197,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) if (dynamic_cast<QCanvasNonElementSprite *>(*it)) { emit nonNotationItemPressed(e, *it); return ; - } else if (dynamic_cast<QCanvasText *>(*it)) { + } else if (dynamic_cast<TQCanvasText *>(*it)) { emit textItemPressed(e, *it); return ; } @@ -267,7 +267,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) handleMousePress(clickHeight, staffNo, e); } -void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) +void NotationCanvasView::contentsMouseDoubleClickEvent(TQMouseEvent* e) { NOTATION_DEBUG << "NotationCanvasView::contentsMouseDoubleClickEvent()\n"; @@ -275,15 +275,15 @@ void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) } void -NotationCanvasView::processActiveItems(QMouseEvent* e, - QCanvasItemList itemList) +NotationCanvasView::processActiveItems(TQMouseEvent* e, + TQCanvasItemList itemList) { - QCanvasItem* pressedItem = 0; - QCanvasItemList::Iterator it; + TQCanvasItem* pressedItem = 0; + TQCanvasItemList::Iterator it; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if (item->active() && !pressedItem) { NOTATION_DEBUG << "mousepress : got active item\n"; pressedItem = item; @@ -298,7 +298,7 @@ NotationCanvasView::processActiveItems(QMouseEvent* e, void NotationCanvasView::handleMousePress(int height, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, NotationElement *el) { NOTATION_DEBUG << "NotationCanvasView::handleMousePress() at height " @@ -308,7 +308,7 @@ NotationCanvasView::handleMousePress(int height, } bool -NotationCanvasView::posIsTooFarFromStaff(const QPoint &pos) +NotationCanvasView::posIsTooFarFromStaff(const TQPoint &pos) { // return true if pos.y is more than m_staffLineThreshold away from // the last pos for which a collision was detected @@ -339,7 +339,7 @@ NotationCanvasView::getLegerLineCount(int height, bool &offset) } void -NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) +NotationCanvasView::setHeightMarkerHeight(TQMouseEvent *e) { NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); @@ -381,7 +381,7 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) QCanvasLineGroupable *line = new QCanvasLineGroupable(canvas(), m_heightMarker); - line->setPen(QPen(QColor(64, 64, 64), 1)); + line->setPen(TQPen(TQColor(64, 64, 64), 1)); int y = (int)m_heightMarker->y() + (above ? -1 : 1) * (i * (spacing + 1)); @@ -403,20 +403,20 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) } NotationElement * -NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element +NotationCanvasView::getElementAtXCoord(TQMouseEvent *e) // any old element { - QRect threshold(e->pos(), QSize(4, 100)); //!!! + TQRect threshold(e->pos(), TQSize(4, 100)); //!!! threshold.moveCenter(e->pos()); - QCanvasItemList itemList = canvas()->collisions(threshold); + TQCanvasItemList itemList = canvas()->collisions(threshold); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; QCanvasNotationSprite* sprite = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if ((sprite = dynamic_cast<QCanvasNotationSprite*>(item))) { return & (sprite->getNotationElement()); @@ -427,7 +427,7 @@ NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element } void -NotationCanvasView::viewportPaintEvent(QPaintEvent *e) +NotationCanvasView::viewportPaintEvent(TQPaintEvent *e) { int cx(e->rect().x()), cy(e->rect().y()), @@ -435,7 +435,7 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) ch(e->rect().height())*/; // NOTATION_DEBUG << "NotationCanvasView::viewportPaintEvent: (" << cx << "," // << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::viewportPaintEvent(e); + TQCanvasView::viewportPaintEvent(e); cx += contentsX(); cy += contentsY(); @@ -445,14 +445,14 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) } void -NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) +NotationCanvasView::drawContents(TQPainter *p, int cx, int cy, int cw, int ch) { /* - m_lastRender = QRect(cx, cy, cw, ch); + m_lastRender = TQRect(cx, cy, cw, ch); NOTATION_DEBUG << "NotationCanvasView::drawContents: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; */ - QCanvasView::drawContents(p, cx, cy, cw, ch); + TQCanvasView::drawContents(p, cx, cy, cw, ch); /* emit renderRequired(std::min(contentsX(), cx), std::max(contentsX() + visibleWidth(), cx + cw)); @@ -462,21 +462,21 @@ NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) void NotationCanvasView::slotRenderComplete() { - /* QPainter painter(viewport()); + /* TQPainter painter(viewport()); int cx(m_lastRender.x()), cy(m_lastRender.y()), cw(m_lastRender.width()), ch(m_lastRender.height()); NOTATION_DEBUG << "NotationCanvasView::slotRenderComplete: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::drawContents(&painter, cx, cy, cw, ch); + TQCanvasView::drawContents(&painter, cx, cy, cw, ch); */ - QPaintEvent ev(m_lastRender); - QCanvasView::viewportPaintEvent(&ev); + TQPaintEvent ev(m_lastRender); + TQCanvasView::viewportPaintEvent(&ev); } void -NotationCanvasView::slotExternalWheelEvent(QWheelEvent* e) +NotationCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } diff --git a/src/gui/editors/notation/NotationCanvasView.h b/src/gui/editors/notation/NotationCanvasView.h index 5c88fb0..3c26ded 100644 --- a/src/gui/editors/notation/NotationCanvasView.h +++ b/src/gui/editors/notation/NotationCanvasView.h @@ -27,20 +27,20 @@ #define _RG_NOTATIONCANVASVIEW_H_ #include "gui/general/RosegardenCanvasView.h" -#include <qrect.h> +#include <tqrect.h> #include <vector> -class QWidget; -class QString; -class QPoint; -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQWidget; +class TQString; +class TQPoint; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; class QCanvasLineGroupable; class QCanvasItemGroup; -class QCanvasItem; -class QCanvas; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -69,7 +69,7 @@ class NotationCanvasView : public RosegardenCanvasView public: NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent=0, + TQCanvas *viewing, TQWidget *parent=0, const char *name=0, WFlags f=0); ~NotationCanvasView(); @@ -86,30 +86,30 @@ signals: * \a el points to the NotationElement which was clicked on, if any */ void itemPressed(int pitch, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* el); /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** - * Emitted when the user clicks on a QCanvasItem which is neither + * Emitted when the user clicks on a TQCanvasItem which is neither * active nor a notation element */ - void nonNotationItemPressed(QMouseEvent *, - QCanvasItem *); + void nonNotationItemPressed(TQMouseEvent *, + TQCanvasItem *); /** - * Emitted when the user clicks on a QCanvasItem which is a + * Emitted when the user clicks on a TQCanvasItem which is a * plain QCanvasText */ - void textItemPressed(QMouseEvent *, - QCanvasItem *); + void textItemPressed(TQMouseEvent *, + TQCanvasItem *); /** * Emitted when the mouse cursor moves to a different height @@ -117,7 +117,7 @@ signals: * * \a noteName contains the MIDI name of the corresponding note */ - void hoveredOverNoteChanged(const QString ¬eName); + void hoveredOverNoteChanged(const TQString ¬eName); /** * Emitted when the mouse cursor moves to a note which is at a @@ -131,12 +131,12 @@ signals: /** * Emitted when the mouse cursor moves (used by the selection tool) */ - void mouseMoved(QMouseEvent*); + void mouseMoved(TQMouseEvent*); /** * Emitted when the mouse button is released */ - void mouseReleased(QMouseEvent*); + void mouseReleased(TQMouseEvent*); /** * Emitted when a region is about to be drawn by the canvas view. @@ -148,48 +148,48 @@ signals: public slots: void slotRenderComplete(); - void slotExternalWheelEvent(QWheelEvent* e); + void slotExternalWheelEvent(TQWheelEvent* e); protected: - virtual void viewportPaintEvent(QPaintEvent *e); - virtual void drawContents(QPainter *p, int cx, int cy, int cw, int ch); + virtual void viewportPaintEvent(TQPaintEvent *e); + virtual void drawContents(TQPainter *p, int cx, int cy, int cw, int ch); const LinedStaffManager &m_linedStaffManager; /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse double click event in the canvas */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - void processActiveItems(QMouseEvent*, QCanvasItemList); + void processActiveItems(TQMouseEvent*, TQCanvasItemList); void handleMousePress(int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* pressedNotationElement = 0); - bool posIsTooFarFromStaff(const QPoint &pos); + bool posIsTooFarFromStaff(const TQPoint &pos); int getLegerLineCount(int height, bool &offset); - void setHeightMarkerHeight(QMouseEvent *e); + void setHeightMarkerHeight(TQMouseEvent *e); - NotationElement *getElementAtXCoord(QMouseEvent *e); + NotationElement *getElementAtXCoord(TQMouseEvent *e); //--------------- Data members --------------------------------- @@ -208,7 +208,7 @@ protected: bool m_heightTracking; - QRect m_lastRender; + TQRect m_lastRender; }; diff --git a/src/gui/editors/notation/NotationElement.cpp b/src/gui/editors/notation/NotationElement.cpp index 7df1cd5..c23ebd6 100644 --- a/src/gui/editors/notation/NotationElement.cpp +++ b/src/gui/editors/notation/NotationElement.cpp @@ -32,7 +32,7 @@ #include "base/NotationTypes.h" #include "base/ViewElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -118,7 +118,7 @@ NotationElement::isGrace() const } void -NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { removeCanvasItem(); m_recentlyRegenerated = true; @@ -127,7 +127,7 @@ NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) } void -NotationElement::addCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { if (!m_canvasItem) { std::cerr << "ERROR: Attempt to add extra canvas item to element without main canvas item:"; diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index c756641..2bb036f 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -32,7 +32,7 @@ #include "base/Event.h" -class QCanvasItem; +class TQCanvasItem; class ItemList; @@ -45,7 +45,7 @@ class Event; /** * The Notation H and V layout is performed on a * NotationElementList. Once this is done, each NotationElement is - * affected a QCanvasItem which is set at these coords. + * affected a TQCanvasItem which is set at these coords. * * @see NotationView#showElements() */ @@ -105,7 +105,7 @@ public: * * NOTE: The object takes ownership of its canvas item. */ - void setCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Add an extra canvas item associated with this element, for @@ -115,7 +115,7 @@ public: * The element will take ownership of these canvas items and * delete them when it deletes the main canvas item. */ - void addCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Remove the main canvas item and any additional ones. @@ -151,7 +151,7 @@ public: void setIsColliding(bool value) { m_isColliding = value; } /// Returns the associated canvas item - QCanvasItem* getCanvasItem() { return m_canvasItem; } + TQCanvasItem* getCanvasItem() { return m_canvasItem; } protected: //--------------- Data members --------------------------------- @@ -161,9 +161,9 @@ protected: bool m_recentlyRegenerated; bool m_isColliding; - QCanvasItem *m_canvasItem; + TQCanvasItem *m_canvasItem; - typedef std::vector<QCanvasItem *> ItemList; + typedef std::vector<TQCanvasItem *> ItemList; ItemList *m_extraItems; }; diff --git a/src/gui/editors/notation/NotationEraser.cpp b/src/gui/editors/notation/NotationEraser.cpp index 4124e44..856a622 100644 --- a/src/gui/editors/notation/NotationEraser.cpp +++ b/src/gui/editors/notation/NotationEraser.cpp @@ -36,8 +36,8 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kconfig.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,20 +52,20 @@ NotationEraser::NotationEraser(NotationView* view) m_collapseRest = config->readBoolEntry("collapse", false); new KToggleAction(i18n("Collapse rests after erase"), 0, this, - SLOT(slotToggleRestCollapse()), actionCollection(), + TQT_SLOT(slotToggleRestCollapse()), actionCollection(), "toggle_rest_collapse"); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); createMenu("notationeraser.rc"); @@ -80,7 +80,7 @@ void NotationEraser::ready() void NotationEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* element) { if (!element || staffNo < 0) @@ -109,7 +109,7 @@ void NotationEraser::slotSelectSelected() m_parentView->actionCollection()->action("select")->activate(); } -const QString NotationEraser::ToolName = "notationeraser"; +const TQString NotationEraser::ToolName = "notationeraser"; } #include "NotationEraser.moc" diff --git a/src/gui/editors/notation/NotationEraser.h b/src/gui/editors/notation/NotationEraser.h index 9efdd13..b13ed89 100644 --- a/src/gui/editors/notation/NotationEraser.h +++ b/src/gui/editors/notation/NotationEraser.h @@ -27,11 +27,11 @@ #define _RG_NOTATIONERASER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; public slots: void slotToggleRestCollapse(); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 1b13765..4d891a6 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -47,7 +47,7 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kconfig.h> -#include <qobject.h> +#include <tqobject.h> #include <cmath> namespace Rosegarden @@ -58,7 +58,7 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 9d7366b..878dc17 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -36,7 +36,7 @@ class TieMap; -class QObject; +class TQObject; namespace Rosegarden @@ -68,7 +68,7 @@ public: NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationHLayout(); diff --git a/src/gui/editors/notation/NotationSelectionPaster.cpp b/src/gui/editors/notation/NotationSelectionPaster.cpp index 3b008f2..96d894c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.cpp +++ b/src/gui/editors/notation/NotationSelectionPaster.cpp @@ -55,7 +55,7 @@ NotationSelectionPaster::~NotationSelectionPaster() void NotationSelectionPaster::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) diff --git a/src/gui/editors/notation/NotationSelectionPaster.h b/src/gui/editors/notation/NotationSelectionPaster.h index e6a80dd..110ed6c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.h +++ b/src/gui/editors/notation/NotationSelectionPaster.h @@ -30,7 +30,7 @@ #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -52,7 +52,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); protected: diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp index 221fbe3..2a28545 100644 --- a/src/gui/editors/notation/NotationSelector.cpp +++ b/src/gui/editors/notation/NotationSelector.cpp @@ -49,11 +49,11 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qapplication.h> -#include <qiconset.h> -#include <qrect.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqiconset.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqtimer.h> namespace Rosegarden @@ -71,68 +71,68 @@ NotationSelector::NotationSelector(NotationView* view) m_justSelectedBar(false), m_wholeStaffSelectionComplete(false) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); - connect(this, SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), - m_parentView, SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); + connect(this, TQT_SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), + m_parentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KToggleAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); // (this crashed, and it might be superfluous with ^N anyway, so I'm // commenting it out, but leaving it here in case I change my mind about // fooling with it.) (DMM) // new KAction(i18n("Normalize Rests"), 0, 0, this, - // SLOT(slotCollapseRests()), actionCollection(), + // TQT_SLOT(slotCollapseRests()), actionCollection(), // "collapse_rests"); new KAction(i18n("Collapse Rests"), 0, 0, this, - SLOT(slotCollapseRestsHard()), actionCollection(), + TQT_SLOT(slotCollapseRestsHard()), actionCollection(), "collapse_rests_aggressively"); new KAction(i18n("Respell as Flat"), 0, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); new KAction(i18n("Respell as Sharp"), 0, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); new KAction(i18n("Respell as Natural"), 0, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); new KAction(i18n("Collapse Notes"), 0, 0, this, - SLOT(slotCollapseNotes()), actionCollection(), + TQT_SLOT(slotCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("Interpret"), 0, 0, this, - SLOT(slotInterpret()), actionCollection(), + TQT_SLOT(slotInterpret()), actionCollection(), "interpret"); new KAction(i18n("Move to Staff Above"), 0, 0, this, - SLOT(slotStaffAbove()), actionCollection(), + TQT_SLOT(slotStaffAbove()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, 0, this, - SLOT(slotStaffBelow()), actionCollection(), + TQT_SLOT(slotStaffBelow()), actionCollection(), "move_events_down_staff"); new KAction(i18n("Make Invisible"), 0, 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make Visible"), 0, 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); createMenu("notationselector.rc"); @@ -146,7 +146,7 @@ NotationSelector::~NotationSelector() void NotationSelector::handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleMousePress: time is " << t << ", staffNo is " @@ -194,7 +194,7 @@ void NotationSelector::handleLeftButtonPress(timeT t, void NotationSelector::handleRightButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleRightButtonPress" << std::endl; @@ -228,7 +228,7 @@ void NotationSelector::slotClickTimeout() void NotationSelector::handleMouseDoubleClick(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "NotationSelector::handleMouseDoubleClick" << endl; @@ -247,7 +247,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, } else { - QRect rect = staff->getBarExtents(e->x(), e->y()); + TQRect rect = staff->getBarExtents(e->x(), e->y()); m_selectionRect->setX(rect.x() + 1); m_selectionRect->setY(rect.y()); @@ -257,8 +257,8 @@ void NotationSelector::handleMouseDoubleClick(timeT, m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } return ; @@ -267,7 +267,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, void NotationSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (!m_justSelectedBar) @@ -305,7 +305,7 @@ void NotationSelector::handleMouseTripleClick(timeT t, } int NotationSelector::handleMouseMove(timeT, int, - QMouseEvent* e) + TQMouseEvent* e) { if (!m_updateRect) return RosegardenCanvasView::NoFollow; @@ -345,7 +345,7 @@ int NotationSelector::handleMouseMove(timeT, int, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void NotationSelector::handleMouseRelease(timeT, int, QMouseEvent *e) +void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e) { NOTATION_DEBUG << "NotationSelector::handleMouseRelease" << endl; m_updateRect = false; @@ -706,7 +706,7 @@ void NotationSelector::dragFine(int x, int y, bool final) void NotationSelector::ready() { - m_selectionRect = new QCanvasRectangle(m_nParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_nParentView->canvas()); m_selectionRect->hide(); m_selectionRect->setPen(GUIPalette::getColour(GUIPalette::SelectionRectangle)); @@ -834,10 +834,10 @@ EventSelection* NotationSelector::getSelection() m_selectionRect->height() > -3 && m_selectionRect->height() < 3) return 0; - QCanvasItemList itemList = m_selectionRect->collisions(false); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_selectionRect->collisions(false); + TQCanvasItemList::Iterator it; - QRect rect = m_selectionRect->rect().normalize(); + TQRect rect = m_selectionRect->rect().normalize(); QCanvasNotationSprite *sprite = 0; if (!m_selectedStaff) { @@ -951,7 +951,7 @@ EventSelection* NotationSelector::getSelection() } } -const QString NotationSelector::ToolName = "notationselector"; +const TQString NotationSelector::ToolName = "notationselector"; } #include "NotationSelector.moc" diff --git a/src/gui/editors/notation/NotationSelector.h b/src/gui/editors/notation/NotationSelector.h index 7266fd5..6f9494a 100644 --- a/src/gui/editors/notation/NotationSelector.h +++ b/src/gui/editors/notation/NotationSelector.h @@ -28,12 +28,12 @@ #include "NotationTool.h" #include "NotationElement.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; class m_clickedElement; @@ -64,33 +64,33 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual void handleRightButtonPress(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual void handleMouseTripleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -125,7 +125,7 @@ public: } } - static const QString ToolName; + static const TQString ToolName; signals: void editElement(NotationStaff *, NotationElement *, bool advanced); @@ -173,7 +173,7 @@ protected: //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; NotationStaff *m_selectedStaff; diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index c5219b4..717e418 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -64,16 +64,16 @@ #include "NoteStyleFactory.h" #include <kconfig.h> #include <kmessagebox.h> -#include <qcanvas.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqrect.h> namespace Rosegarden { -NotationStaff::NotationStaff(QCanvas *canvas, Segment *segment, +NotationStaff::NotationStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, NotationView *view, std::string fontName, int resolution) : @@ -148,7 +148,7 @@ NotationStaff::insertTimeSignature(double layoutX, return ; m_notePixmapFactory->setSelected(false); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); QCanvasTimeSigSprite *sprite = new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); @@ -201,7 +201,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -220,7 +220,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -242,7 +242,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); - QCanvasRectangle *rect = new QCanvasRectangle(coords.first, coords.second, + TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); rect->setPen(Qt::black); rect->setBrush(Qt::white); @@ -276,7 +276,7 @@ NotationStaff::drawStaffName() getSegment().getComposition()-> getTrackById(getSegment().getTrack())->getLabel(); - QCanvasPixmap *map = + TQCanvasPixmap *map = m_notePixmapFactory->makeTextPixmap (Text(m_staffNameText, Text::StaffName)); @@ -942,7 +942,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, try { - QCanvasPixmap *pixmap = 0; + TQCanvasPixmap *pixmap = 0; m_notePixmapFactory->setSelected(selected); m_notePixmapFactory->setShaded(invisible); @@ -1343,7 +1343,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, } double -NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, +NotationStaff::setPainterClipping(TQPainter *painter, double lx, int ly, double dx, double w, LinedStaffCoords &coords, FitPolicy policy) { @@ -1369,9 +1369,9 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, clipWidth += clipLeft; clipLeft = 0; } - QRect clip(clipLeft, coords.second - getRowSpacing() / 2, + TQRect clip(clipLeft, coords.second - getRowSpacing() / 2, clipWidth, getRowSpacing()); - painter->setClipRect(clip, QPainter::CoordPainter); + painter->setClipRect(clip, TQPainter::CoordPainter); coords.first -= dx; } if (fit) { @@ -1392,7 +1392,7 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, } void -NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, +NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { double layoutX = elt->getLayoutX(); @@ -1408,7 +1408,7 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, double canvasX = coords.first; int canvasY = coords.second; - QCanvasItem *item = 0; + TQCanvasItem *item = 0; if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { @@ -1428,15 +1428,15 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, // NOTATION_DEBUG << "splitting at " << (rightMargin-canvasX) << endl; - std::pair<QPixmap, QPixmap> split = + std::pair<TQPixmap, TQPixmap> split = PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - QCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap - (split.first, QPoint(pixmap->offsetX(), pixmap->offsetY())); + TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - QCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap - (split.second, QPoint(0, pixmap->offsetY())); + TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + (split.second, TQPoint(0, pixmap->offsetY())); item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); @@ -1736,18 +1736,18 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) // The normal on-screen case bool collision = false; - QCanvasItem * haloItem = 0; + TQCanvasItem * haloItem = 0; if (m_showCollisions) { collision = elt->isColliding(); if (collision) { // Make collision halo - QCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); + TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } - QCanvasPixmap *pixmap = factory->makeNotePixmap(params); + TQCanvasPixmap *pixmap = factory->makeNotePixmap(params); int z = 0; if (factory->isSelected()) @@ -1991,7 +1991,7 @@ NotationStaff::markChanged(timeT from, timeT to, bool movedOnly) } void -NotationStaff::setPrintPainter(QPainter *painter) +NotationStaff::setPrintPainter(TQPainter *painter) { m_printPainter = painter; } diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index 4a0302c..f58e77d 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -38,10 +38,10 @@ #include "NotationElement.h" -class QPainter; -class QCanvasPixmap; -class QCanvasItem; -class QCanvas; +class TQPainter; +class TQCanvasPixmap; +class TQCanvasItem; +class TQCanvas; class LinedStaffCoords; @@ -82,7 +82,7 @@ public: * Creates a new NotationStaff for the specified Segment * \a id is the id of the staff in the NotationView */ - NotationStaff(QCanvas *, Segment *, SnapGrid *, + NotationStaff(TQCanvas *, Segment *, SnapGrid *, int id, NotationView *view, std::string fontName, int resolution); virtual ~NotationStaff(); @@ -210,7 +210,7 @@ public: * painter; those that can, will be rendered by renderPrintable() * instead. */ - virtual void setPrintPainter(QPainter *painter); + virtual void setPrintPainter(TQPainter *painter); /** * Render to the current print painter those elements that can be @@ -423,7 +423,7 @@ protected: * This function calls painter.save(), and the caller must call * painter.restore() after use. */ - virtual double setPainterClipping(QPainter *, double layoutX, int layoutY, + virtual double setPainterClipping(TQPainter *, double layoutX, int layoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy); @@ -432,7 +432,7 @@ protected: * bits if it overruns the end of a row and set the bits * separately. */ - virtual void setPixmap(NotationElement *, QCanvasPixmap *, int z, + virtual void setPixmap(NotationElement *, TQCanvasPixmap *, int z, FitPolicy policy); bool isSelected(NotationElementList::iterator); @@ -440,7 +440,7 @@ protected: typedef std::set<QCanvasSimpleSprite *> SpriteSet; SpriteSet m_timeSigs; - typedef std::set<QCanvasItem *> ItemSet; + typedef std::set<TQCanvasItem *> ItemSet; ItemSet m_repeatedClefsAndKeys; typedef std::pair<int, Clef> ClefChange; @@ -471,7 +471,7 @@ protected: bool m_showCollisions; int m_keySigCancelMode; - QPainter *m_printPainter; + TQPainter *m_printPainter; enum BarStatus { UnRendered = 0, Rendered, Positioned }; typedef std::map<int, BarStatus> BarStatusMap; diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6f8defd..6065323 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -33,14 +33,14 @@ #include "base/NotationTypes.h" #include "gui/configuration/GeneralConfigurationPage.h" #include <kconfig.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { QString -NotationStrings::addDots(QString s, int dots, +NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { if (!dots) @@ -61,14 +61,14 @@ NotationStrings::addDots(QString s, int dots, } else { if (dots > 1) { if (hyphenate) - return QString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").arg(dots).arg(s); else - return QString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").arg(dots).arg(s); } else { if (hyphenate) - return QString("dotted-%1").arg(s); + return TQString("dotted-%1").arg(s); else - return QString("dotted %1").arg(s); + return TQString("dotted %1").arg(s); } } } @@ -79,13 +79,13 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("sixty-fourth note"), i18n("thirty-second note"), i18n("sixteenth note"), i18n("eighth note"), i18n("quarter note"), i18n("half note"), i18n("whole note"), i18n("double whole note") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("sixty-fourth notes"), i18n("thirty-second notes"), i18n("sixteenth notes"), i18n("eighth notes"), i18n("quarter notes"), i18n("half notes"), @@ -109,13 +109,13 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "sixty-fourth note", "thirty-second note", "sixteenth note", "eighth note", "quarter note", "half note", "whole note", "double whole note" }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { "sixty-fourth notes", "thirty-second notes", "sixteenth notes", "eighth notes", "quarter notes", "half notes", @@ -123,11 +123,11 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(QString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(QString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } @@ -139,12 +139,12 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("64th"), i18n("32nd"), i18n("16th"), i18n("8th"), i18n("quarter"), i18n("half"), i18n("whole"), i18n("double whole") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("64ths"), i18n("32nds"), i18n("16ths"), i18n("8ths"), i18n("quarters"), i18n("halves"), i18n("wholes"), i18n("double wholes") @@ -167,19 +167,19 @@ NotationStrings::getReferenceName(Note note, bool isRest) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "hemidemisemi", "demisemi", "semiquaver", "quaver", "crotchet", "minim", "semibreve", "breve" }; - QString name(names[type]); + TQString name(names[type]); if (isRest) name = "rest-" + name; return addDots(name, dots, true, false); } Note -NotationStrings::getNoteForName(QString name) +NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); int pos = name.find('-'); @@ -271,16 +271,16 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return QString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").arg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return QString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").arg(duration / wholeNote); } else { return i18n("%1 ticks").arg(duration); plural = false; } } else { - QString noteName; + TQString noteName; switch (noteNameStyle) { diff --git a/src/gui/editors/notation/NotationStrings.h b/src/gui/editors/notation/NotationStrings.h index d79dff3..d058734 100644 --- a/src/gui/editors/notation/NotationStrings.h +++ b/src/gui/editors/notation/NotationStrings.h @@ -28,7 +28,7 @@ #include "base/Exception.h" #include "base/NotationTypes.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -58,7 +58,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getNoteName(Note note, + static TQString getNoteName(Note note, bool plural = false, bool triplet = false); /** @@ -66,7 +66,7 @@ public: * useful if the user has specified that they'd prefer American * names to local names. */ - static QString getAmericanName(Note note, + static TQString getAmericanName(Note note, bool plural = false, bool triplet = false); /** @@ -76,7 +76,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getShortNoteName(Note note, + static TQString getShortNoteName(Note note, bool plural = false, bool triplet = false); @@ -85,7 +85,7 @@ public: * formal name used to name pixmap files and the like, so the exact * values of these strings are pretty sensitive. */ - static QString getReferenceName(Note note, bool isRest = false); + static TQString getReferenceName(Note note, bool isRest = false); typedef Exception MalformedNoteName; @@ -94,7 +94,7 @@ public: * reference name or an untranslated British, American or short name. * May throw MalformedNoteName. */ - static Note getNoteForName(QString name); + static Note getNoteForName(TQString name); /** * Construct a label to describe the given duration as a note name in @@ -102,7 +102,7 @@ public: * and returns a non-zero value in errorReturn if it was not an exact * match for the required duration. */ - static QString makeNoteMenuLabel(timeT duration, + static TQString makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, bool plural = false); @@ -111,7 +111,7 @@ private: /** * Return a string representing the dotted version of the input str. */ - static QString addDots(QString s, int dots, + static TQString addDots(TQString s, int dots, bool hyphenate, bool internationalize); }; diff --git a/src/gui/editors/notation/NotationTool.cpp b/src/gui/editors/notation/NotationTool.cpp index 8e82107..b187fbb 100644 --- a/src/gui/editors/notation/NotationTool.cpp +++ b/src/gui/editors/notation/NotationTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "NotationView.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -NotationTool::NotationTool(const QString& menuName, NotationView* view) +NotationTool::NotationTool(const TQString& menuName, NotationView* view) : EditTool(menuName, view), m_nParentView(view) {} diff --git a/src/gui/editors/notation/NotationTool.h b/src/gui/editors/notation/NotationTool.h index ab1020a..da9f50d 100644 --- a/src/gui/editors/notation/NotationTool.h +++ b/src/gui/editors/notation/NotationTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -79,7 +79,7 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - NotationTool(const QString& menuName, NotationView*); + NotationTool(const TQString& menuName, NotationView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationToolBox.cpp b/src/gui/editors/notation/NotationToolBox.cpp index 769bcaf..7632413 100644 --- a/src/gui/editors/notation/NotationToolBox.cpp +++ b/src/gui/editors/notation/NotationToolBox.cpp @@ -36,7 +36,7 @@ #include "NotationEraser.h" #include "NotationSelector.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -49,11 +49,11 @@ NotationToolBox::NotationToolBox(NotationView *parent) //m_tools.setAutoDelete(true); } -EditTool* NotationToolBox::createTool(const QString& toolName) +EditTool* NotationToolBox::createTool(const TQString& toolName) { NotationTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == NoteInserter::ToolName) @@ -88,7 +88,7 @@ EditTool* NotationToolBox::createTool(const QString& toolName) tool = new NotationSelector(m_nParentView); else { - KMessageBox::error(0, QString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/notation/NotationToolBox.h b/src/gui/editors/notation/NotationToolBox.h index 48b1202..d6765e6 100644 --- a/src/gui/editors/notation/NotationToolBox.h +++ b/src/gui/editors/notation/NotationToolBox.h @@ -29,7 +29,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -51,7 +51,7 @@ public: NotationToolBox(NotationView* parent); protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index c746a30..5be5532 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -42,9 +42,9 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kmessagebox.h> -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -55,7 +55,7 @@ using namespace BaseProperties; NotationVLayout::NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), m_composition(c), m_npf(npf), @@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) if (!(*chord[j])->event()->get <Int> (m_properties.HEIGHT_ON_STAFF, height)) { - std::cerr << QString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; + std::cerr << TQString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; (*chord[j])->event()->dump(std::cerr); } h.push_back(height); @@ -490,7 +490,7 @@ NotationVLayout::positionSlur(NotationStaff &staff, if (!event->get <Int>(m_properties.HEIGHT_ON_STAFF, h)) { KMessageBox::sorry - ((QWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); + ((TQWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); event->dump(std::cerr); } diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index 83a16c1..2e718c7 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -36,7 +36,7 @@ class SlurList; -class QObject; +class TQObject; namespace Rosegarden @@ -63,7 +63,7 @@ class NotationVLayout : public ProgressReporter, public: NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationVLayout(); diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index 66cb4b3..b3db080 100644 --- a/src/gui/editors/notation/NotationView.cpp +++ b/src/gui/editors/notation/NotationView.cpp @@ -25,7 +25,7 @@ #include "NotationView.h" #include <list> -#include <qlayout.h> +#include <tqlayout.h> #include "misc/Debug.h" #include <kapplication.h> @@ -194,32 +194,32 @@ #include <ktempfile.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qbrush.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpaintdevicemetrics.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qprinter.h> -#include <qrect.h> -#include <qregexp.h> -#include <qsize.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qvalidator.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpaintdevicemetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqprinter.h> +#include <tqrect.h> +#include <tqregexp.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqvalidator.h> #include <algorithm> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> namespace Rosegarden @@ -229,17 +229,17 @@ class NoteActionData { public: NoteActionData(); - NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, + NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, int _dots); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool rest; Note::Type noteType; @@ -257,9 +257,9 @@ NoteActionData::NoteActionData() { } -NoteActionData::NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteActionData::NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, @@ -279,16 +279,16 @@ class NoteChangeActionData { public: NoteChangeActionData(); - NoteChangeActionData(const QString &_title, - QString _actionName, - QString _pixmapName, + NoteChangeActionData(const TQString &_title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool notationOnly; Note::Type noteType; @@ -304,9 +304,9 @@ NoteChangeActionData::NoteChangeActionData() { } -NoteChangeActionData::NoteChangeActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteChangeActionData::NoteChangeActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType) @@ -328,8 +328,8 @@ public: actionName(0), keycode(0) { } - MarkActionData(const QString &_title, - QString _actionName, + MarkActionData(const TQString &_title, + TQString _actionName, int _keycode, Mark _mark) : title(_title), @@ -337,8 +337,8 @@ public: keycode(_keycode), mark(_mark) { } - QString title; - QString actionName; + TQString title; + TQString actionName; int keycode; Mark mark; }; @@ -346,7 +346,7 @@ public: NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive) : EditView(doc, segments, 2, parent, "notationview"), m_properties(getViewLocalPropertyPrefix()), @@ -452,7 +452,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -498,28 +498,28 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // HeadersGroup ctor must not be called before m_staffs initialization m_headersGroupView = new QDeferScrollView(getCentralWidget()); - QWidget * vport = m_headersGroupView->viewport(); + TQWidget * vport = m_headersGroupView->viewport(); m_headersGroup = new HeadersGroup(vport, this, &doc->getComposition()); - m_headersGroupView->setVScrollBarMode(QScrollView::AlwaysOff); - m_headersGroupView->setHScrollBarMode(QScrollView::AlwaysOff); + m_headersGroupView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_headersGroupView->setHScrollBarMode(TQScrollView::AlwaysOff); m_headersGroupView->setFixedWidth(m_headersGroupView->contentsWidth()); m_canvasView->setLeftFixedWidget(m_headersGroupView); // Add a close button just above the track headers. // The grid layout is only here to maintain the button in a // right place - m_headersTopFrame = new QFrame(getCentralWidget()); - QGridLayout * headersTopGrid - = new QGridLayout(m_headersTopFrame, 2, 2); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); - QPushButton * hideHeadersButton - = new QPushButton(m_headersTopFrame); + m_headersTopFrame = new TQFrame(getCentralWidget()); + TQGridLayout * headersTopGrid + = new TQGridLayout(m_headersTopFrame, 2, 2); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); + TQPushButton * hideHeadersButton + = new TQPushButton(m_headersTopFrame); headersTopGrid->addWidget(hideHeadersButton, 1, 1, Qt::AlignRight | Qt::AlignBottom); - hideHeadersButton->setIconSet(QIconSet(pixmap)); + hideHeadersButton->setIconSet(TQIconSet(pixmap)); hideHeadersButton->setFlat(true); - QToolTip::add(hideHeadersButton, i18n("Close track headers")); + TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, @@ -528,19 +528,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); // Following connection have to be done before calling setPageMode()) - connect(m_headersGroup, SIGNAL(headersResized(int)), - this, SLOT(slotHeadersWidthChanged(int))); + connect(m_headersGroup, TQT_SIGNAL(headersResized(int)), + this, TQT_SLOT(slotHeadersWidthChanged(int))); // @@ -616,9 +616,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Connect signals // - QObject::connect - (getCanvasView(), SIGNAL(renderRequired(double, double)), - this, SLOT(slotCheckRendered(double, double))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(renderRequired(double, double)), + this, TQT_SLOT(slotCheckRendered(double, double))); m_topStandardRuler->connectRulerToDocPointer(doc); m_bottomStandardRuler->connectRulerToDocPointer(doc); @@ -626,104 +626,104 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Disconnect the default connection for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (m_topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (getCanvasView(), SIGNAL(itemPressed(int, int, QMouseEvent*, NotationElement*)), - this, SLOT (slotItemPressed(int, int, QMouseEvent*, NotationElement*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(itemPressed(int, int, TQMouseEvent*, NotationElement*)), + this, TQT_SLOT (slotItemPressed(int, int, TQMouseEvent*, NotationElement*))); - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotActiveItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotActiveItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(nonNotationItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotNonNotationItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(nonNotationItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotNonNotationItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(textItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotTextItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(textItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotTextItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseMoved(QMouseEvent*)), - this, SLOT (slotMouseMoved(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseMoved(TQMouseEvent*)), + this, TQT_SLOT (slotMouseMoved(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseReleased(QMouseEvent*)), - this, SLOT (slotMouseReleased(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseReleased(TQMouseEvent*)), + this, TQT_SLOT (slotMouseReleased(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(const QString&)), - this, SLOT (slotHoveredOverNoteChanged(const QString&))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(const TQString&)), + this, TQT_SLOT (slotHoveredOverNoteChanged(const TQString&))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (getCanvasView(), SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); - QObject::connect - (getCanvasView(), SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - QObject::connect - (m_pannerDialog->scrollbox(), SIGNAL(valueChanged(const QPoint &)), - getCanvasView(), SLOT(slotSetScrollPos(const QPoint &))); + TQObject::connect + (m_pannerDialog->scrollbox(), TQT_SIGNAL(valueChanged(const TQPoint &)), + getCanvasView(), TQT_SLOT(slotSetScrollPos(const TQPoint &))); - QObject::connect - (getCanvasView()->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewX(int))); + TQObject::connect + (getCanvasView()->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewX(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewY(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewY(int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // // Connect vertical scrollbars between canvas and notation header - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (m_headersGroupView, SIGNAL(gotWheelEvent(QWheelEvent*)), - getCanvasView(), SLOT(slotExternalWheelEvent(QWheelEvent*))); + TQObject::connect + (m_headersGroupView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + getCanvasView(), TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // Ensure notation header keeps the right bottom margin when user // toggles the canvas view bottom rulers - connect(getCanvasView(), SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(getCanvasView(), TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); // Signal canvas horizontal scroll to notation header - QObject::connect - (getCanvasView(), SIGNAL(contentsMoving(int, int)), - this, SLOT(slotUpdateHeaders(int, int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotUpdateHeaders(int, int))); // Connect the close notation headers button - QObject::connect(hideHeadersButton, SIGNAL(clicked()), - this, SLOT(slotHideHeadersGroup())); + TQObject::connect(hideHeadersButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotHideHeadersGroup())); stateChanged("have_selection", KXMLGUIClient::StateReverse); stateChanged("have_notes_in_selection", KXMLGUIClient::StateReverse); @@ -764,17 +764,17 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // getCanvasView()->repaintContents(); updateView(); - QObject::connect - (this, SIGNAL(renderComplete()), - getCanvasView(), SLOT(slotRenderComplete())); + TQObject::connect + (this, TQT_SIGNAL(renderComplete()), + getCanvasView(), TQT_SLOT(slotRenderComplete())); if (parent) { const TrackButtons * trackLabels = ((RosegardenGUIView*)parent)->getTrackEditor()->getTrackButtons(); - QObject::connect - (trackLabels, SIGNAL(nameChanged()), - this, SLOT(slotUpdateStaffName())); + TQObject::connect + (trackLabels, TQT_SIGNAL(nameChanged()), + this, TQT_SLOT(slotUpdateStaffName())); } setConfigDialogPageIndex(3); @@ -796,7 +796,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView) : EditView(doc, segments, 1, 0, "printview"), m_properties(getViewLocalPropertyPrefix()), @@ -889,7 +889,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); //!!! setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -1046,16 +1046,16 @@ void NotationView::positionStaffs() const Configuration &metadata = getDocument()->getComposition().getMetadata(); - QFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); + TQFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); m_config->setGroup(NotationViewConfigGroup); - QFont font = m_config->readFontEntry("textfont", &defaultFont); + TQFont font = m_config->readFontEntry("textfont", &defaultFont); font.setPixelSize(m_fontSize * 5); - QFontMetrics metrics(font); + TQFontMetrics metrics(font); if (metadata.has(CompositionMetadataKeys::Title)) { - QString title(strtoqstr(metadata.get<String> + TQString title(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Title))); - m_title = new QCanvasText(title, font, canvas()); + m_title = new TQCanvasText(title, font, canvas()); m_title->setX(m_leftGutter + pageWidth / 2 - metrics.width(title) / 2); m_title->setY(20 + topMargin / 4 + metrics.ascent()); m_title->show(); @@ -1063,12 +1063,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 3); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Subtitle)) { - QString subtitle(strtoqstr(metadata.get<String> + TQString subtitle(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Subtitle))); - m_subtitle = new QCanvasText(subtitle, font, canvas()); + m_subtitle = new TQCanvasText(subtitle, font, canvas()); m_subtitle->setX(m_leftGutter + pageWidth / 2 - metrics.width(subtitle) / 2); m_subtitle->setY(20 + titleHeight + metrics.ascent()); m_subtitle->show(); @@ -1076,9 +1076,9 @@ void NotationView::positionStaffs() } if (metadata.has(CompositionMetadataKeys::Composer)) { - QString composer(strtoqstr(metadata.get<String> + TQString composer(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Composer))); - m_composer = new QCanvasText(composer, font, canvas()); + m_composer = new TQCanvasText(composer, font, canvas()); m_composer->setX(m_leftGutter + pageWidth - metrics.width(composer) - leftMargin); m_composer->setY(20 + titleHeight + metrics.ascent()); m_composer->show(); @@ -1086,12 +1086,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 2); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Copyright)) { - QString copyright(strtoqstr(metadata.get<String> + TQString copyright(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Copyright))); - m_copyright = new QCanvasText(copyright, font, canvas()); + m_copyright = new TQCanvasText(copyright, font, canvas()); m_copyright->setX(m_leftGutter + leftMargin); m_copyright->setY(20 + pageHeight - topMargin - metrics.descent()); m_copyright->show(); @@ -1328,20 +1328,20 @@ void NotationView::positionPages() if (m_printMode) return ; - QPixmap background; - QPixmap deskBackground; + TQPixmap background; + TQPixmap deskBackground; bool haveBackground = false; m_config->setGroup(NotationViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures", true)) { - QString pixmapDir = + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - if (background.load(QString("%1/misc/bg-paper-cream.xpm"). + if (background.load(TQString("%1/misc/bg-paper-cream.xpm"). arg(pixmapDir))) { haveBackground = true; } // we're happy to ignore errors from this one: - deskBackground.load(QString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); + deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); } int pageWidth = getPageWidth(); @@ -1378,9 +1378,9 @@ void NotationView::positionPages() getCanvasView()->setErasePixmap(background); } - QFont pageNumberFont; + TQFont pageNumberFont; pageNumberFont.setPixelSize(m_fontSize * 2); - QFontMetrics pageNumberMetrics(pageNumberFont); + TQFontMetrics pageNumberMetrics(pageNumberFont); for (int page = 0; page < maxPageCount; ++page) { @@ -1389,17 +1389,17 @@ void NotationView::positionPages() int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); - QCanvasText *text = new QCanvasText(str, pageNumberFont, canvas()); + TQString str = TQString("%1").arg(page + 1); + TQCanvasText *text = new TQCanvasText(str, pageNumberFont, canvas()); text->setX(m_leftGutter + pageWidth * page + pageWidth - pageNumberMetrics.width(str) - leftMargin); text->setY(y + h - pageNumberMetrics.descent() - topMargin); text->setZ( -999); text->show(); m_pageNumbers.push_back(text); - QCanvasRectangle *rect = new QCanvasRectangle(x, y, w, h, canvas()); + TQCanvasRectangle *rect = new TQCanvasRectangle(x, y, w, h, canvas()); if (haveBackground) - rect->setBrush(QBrush(Qt::white, background)); + rect->setBrush(TQBrush(Qt::white, background)); rect->setPen(Qt::black); rect->setZ( -1000); rect->show(); @@ -1440,7 +1440,7 @@ void NotationView::setOneToolbar(const char *actionName, std::cerr << "WARNING: No such action as " << actionName << std::endl; return ; } - QWidget *toolbar = toolBar(toolbarName); + TQWidget *toolbar = toolBar(toolbarName); if (!toolbar) { std::cerr << "WARNING: No such toolbar as " << toolbarName << std::endl; return ; @@ -1493,16 +1493,16 @@ void NotationView::readOptions() void NotationView::setupActions() { - KStdAction::print(this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview(this, SLOT(slotFilePrintPreview()), + KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview(this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); new KAction(i18n("Print &with LilyPond..."), 0, 0, this, - SLOT(slotPrintLilyPond()), actionCollection(), + TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, - SLOT(slotPreviewLilyPond()), actionCollection(), + TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); EditViewBase::setupActions("notation.rc"); @@ -1522,11 +1522,11 @@ void NotationView::setupActions() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); KToggleAction *fontAction = new KToggleAction - (fontQName, 0, this, SLOT(slotChangeFontFromAction()), + (fontQName, 0, this, TQT_SLOT(slotChangeFontFromAction()), actionCollection(), "note_font_" + fontQName); fontAction->setChecked(*i == m_fontName); @@ -1543,7 +1543,7 @@ void NotationView::setupActions() m_showHeadersMenuEntry = new KAction(i18n("Show Track Headers"), 0, this, - SLOT(slotShowHeadersGroup()), + TQT_SLOT(slotShowHeadersGroup()), actionCollection(), "show_track_headers"); KActionMenu *spacingActionMenu = @@ -1557,9 +1557,9 @@ void NotationView::setupActions() KToggleAction *spacingAction = new KToggleAction - (QString("%1%").arg(*i), 0, this, - SLOT(slotChangeSpacingFromAction()), - actionCollection(), QString("spacing_%1").arg(*i)); + (TQString("%1%").arg(*i), 0, this, + TQT_SLOT(slotChangeSpacingFromAction()), + actionCollection(), TQString("spacing_%1").arg(*i)); spacingAction->setExclusiveGroup("spacing"); spacingAction->setChecked(*i == defaultSpacing); @@ -1577,15 +1577,15 @@ void NotationView::setupActions() for (std::vector<int>::iterator i = proportions.begin(); i != proportions.end(); ++i) { - QString name = QString("%1%").arg(*i); + TQString name = TQString("%1%").arg(*i); if (*i == 0) name = i18n("None"); KToggleAction *proportionAction = new KToggleAction (name, 0, this, - SLOT(slotChangeProportionFromAction()), - actionCollection(), QString("proportion_%1").arg(*i)); + TQT_SLOT(slotChangeProportionFromAction()), + actionCollection(), TQString("proportion_%1").arg(*i)); proportionAction->setExclusiveGroup("proportion"); proportionAction->setChecked(*i == defaultProportion); @@ -1603,11 +1603,11 @@ void NotationView::setupActions() for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - QString styleQName(strtoqstr(*i)); + TQString styleQName(strtoqstr(*i)); KAction *styleAction = new KAction - (styleQName, 0, this, SLOT(slotSetStyleFromAction()), + (styleQName, 0, this, TQT_SLOT(slotSetStyleFromAction()), actionCollection(), "style_" + styleQName); styleActionMenu->insert(styleAction); @@ -1621,22 +1621,22 @@ void NotationView::setupActions() new KAction - (i18n("Insert Rest"), Key_P, this, SLOT(slotInsertRest()), - actionCollection(), QString("insert_rest")); + (i18n("Insert Rest"), Key_P, this, TQT_SLOT(slotInsertRest()), + actionCollection(), TQString("insert_rest")); new KAction (i18n("Switch from Note to Rest"), Key_T, this, - SLOT(slotSwitchFromNoteToRest()), - actionCollection(), QString("switch_from_note_to_rest")); + TQT_SLOT(slotSwitchFromNoteToRest()), + actionCollection(), TQString("switch_from_note_to_rest")); new KAction (i18n("Switch from Rest to Note"), Key_Y, this, - SLOT(slotSwitchFromRestToNote()), - actionCollection(), QString("switch_from_rest_to_note")); + TQT_SLOT(slotSwitchFromRestToNote()), + actionCollection(), TQString("switch_from_rest_to_note")); // setup Notes menu & toolbar - QIconSet icon; + TQIconSet icon; for (NoteActionDataMap::Iterator actionDataIter = m_noteActionDataMap->begin(); actionDataIter != m_noteActionDataMap->end(); @@ -1651,7 +1651,7 @@ void NotationView::setupActions() icon, noteActionData.keycode, this, - SLOT(slotNoteAction()), + TQT_SLOT(slotNoteAction()), actionCollection(), noteActionData.actionName); noteAction->setExclusiveGroup("notes"); @@ -1677,7 +1677,7 @@ void NotationView::setupActions() icon, data.keycode, this, - SLOT(slotNoteChangeAction()), + TQT_SLOT(slotNoteChangeAction()), actionCollection(), data.actionName); } @@ -1685,7 +1685,7 @@ void NotationView::setupActions() // // Accidentals // - static QString actionsAccidental[][4] = + static TQString actionsAccidental[][4] = { { i18n("No accidental"), "1slotNoAccidental()", "no_accidental", "accidental-none" }, { i18n("Follow previous accidental"), "1slotFollowAccidental()", "follow_accidental", "accidental-follow" }, @@ -1699,7 +1699,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap (actionsAccidental[i][3]))); noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, this, actionsAccidental[i][1], @@ -1713,49 +1713,49 @@ void NotationView::setupActions() // // Treble - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, this, - SLOT(slotTrebleClef()), + TQT_SLOT(slotTrebleClef()), actionCollection(), "treble_clef"); noteAction->setExclusiveGroup("notes"); // Alto - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, this, - SLOT(slotAltoClef()), + TQT_SLOT(slotAltoClef()), actionCollection(), "alto_clef"); noteAction->setExclusiveGroup("notes"); // Tenor - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, this, - SLOT(slotTenorClef()), + TQT_SLOT(slotTenorClef()), actionCollection(), "tenor_clef"); noteAction->setExclusiveGroup("notes"); // Bass - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, this, - SLOT(slotBassClef()), + TQT_SLOT(slotBassClef()), actionCollection(), "bass_clef"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, this, - SLOT(slotText()), + TQT_SLOT(slotText()), actionCollection(), "text"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, this, - SLOT(slotGuitarChord()), + TQT_SLOT(slotGuitarChord()), actionCollection(), "guitarchord"); noteAction->setExclusiveGroup("notes"); - /* icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); + /* icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, this, - SLOT(slotLilyPondDirective()), + TQT_SLOT(slotLilyPondDirective()), actionCollection(), "lilypond_directive"); noteAction->setExclusiveGroup("notes"); */ @@ -1764,53 +1764,53 @@ void NotationView::setupActions() // Edition tools (eraser, selector...) // noteAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); noteAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); // Edit menu new KAction(i18n("Select from Sta&rt"), 0, this, - SLOT(slotEditSelectFromStart()), actionCollection(), + TQT_SLOT(slotEditSelectFromStart()), actionCollection(), "select_from_start"); new KAction(i18n("Select to &End"), 0, this, - SLOT(slotEditSelectToEnd()), actionCollection(), + TQT_SLOT(slotEditSelectToEnd()), actionCollection(), "select_to_end"); new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, this, - SLOT(slotEditSelectWholeStaff()), actionCollection(), + TQT_SLOT(slotEditSelectWholeStaff()), actionCollection(), "select_whole_staff"); new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, this, - SLOT(slotEditCutAndClose()), actionCollection(), + TQT_SLOT(slotEditCutAndClose()), actionCollection(), "cut_and_close"); new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, this, - SLOT(slotEditGeneralPaste()), actionCollection(), + TQT_SLOT(slotEditGeneralPaste()), actionCollection(), "general_paste"); new KAction(i18n("De&lete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Move to Staff Above"), 0, this, - SLOT(slotMoveEventsUpStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsUpStaff()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, this, - SLOT(slotMoveEventsDownStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsDownStaff()), actionCollection(), "move_events_down_staff"); // @@ -1818,56 +1818,56 @@ void NotationView::setupActions() // int layoutMode = m_config->readNumEntry("layoutmode", 0); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); + icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction - (i18n("&Linear Layout"), icon, 0, this, SLOT(slotLinearMode()), + (i18n("&Linear Layout"), icon, 0, this, TQT_SLOT(slotLinearMode()), actionCollection(), "linear_mode"); linearModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 0) linearModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/continuous-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *continuousPageModeAction = new KRadioAction - (i18n("&Continuous Page Layout"), icon, 0, this, SLOT(slotContinuousPageMode()), + (i18n("&Continuous Page Layout"), icon, 0, this, TQT_SLOT(slotContinuousPageMode()), actionCollection(), "continuous_page_mode"); continuousPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 1) continuousPageModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/multi-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *multiPageModeAction = new KRadioAction - (i18n("&Multiple Page Layout"), icon, 0, this, SLOT(slotMultiPageMode()), + (i18n("&Multiple Page Layout"), icon, 0, this, TQT_SLOT(slotMultiPageMode()), actionCollection(), "multi_page_mode"); multiPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 2) multiPageModeAction->setChecked(true); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, this, - SLOT(slotToggleRawNoteRuler()), + TQT_SLOT(slotToggleRawNoteRuler()), actionCollection(), "show_raw_note_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); new KToggleAction(i18n("Show &Annotations"), 0, this, - SLOT(slotToggleAnnotations()), + TQT_SLOT(slotToggleAnnotations()), actionCollection(), "show_annotations"); new KToggleAction(i18n("Show Lily&Pond Directives"), 0, this, - SLOT(slotToggleLilyPondDirectives()), + TQT_SLOT(slotToggleLilyPondDirectives()), actionCollection(), "show_lilypond_directives"); - new KAction(i18n("Open L&yric Editor"), 0, this, SLOT(slotEditLyrics()), + new KAction(i18n("Open L&yric Editor"), 0, this, TQT_SLOT(slotEditLyrics()), actionCollection(), "lyric_editor"); // @@ -1878,53 +1878,53 @@ void NotationView::setupActions() ("group-beam"))); new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, this, - SLOT(slotGroupBeam()), actionCollection(), "beam"); + TQT_SLOT(slotGroupBeam()), actionCollection(), "beam"); new KAction(AutoBeamCommand::getGlobalName(), 0, this, - SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); + TQT_SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-unbeam"))); new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, this, - SLOT(slotGroupBreak()), actionCollection(), "break_group"); + TQT_SLOT(slotGroupBreak()), actionCollection(), "break_group"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-simple-tuplet"))); new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, this, - SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); + TQT_SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-tuplet"))); new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, this, - SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); + TQT_SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); new KAction(UnTupletCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); + TQT_SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("triplet"))); (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "triplet_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("group-grace"))); (new KToggleAction(i18n("Grace Insert Mode"), icon, 0, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "grace_mode"))-> setChecked(false); /*!!! @@ -1933,10 +1933,10 @@ void NotationView::setupActions() ("group-grace"))); new KAction(GraceCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupGrace()), actionCollection(), "grace"); + TQT_SLOT(slotGroupGrace()), actionCollection(), "grace"); new KAction(UnGraceCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); + TQT_SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); */ icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1944,11 +1944,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Slur), icon, Key_ParenRight, this, - SLOT(slotGroupSlur()), actionCollection(), "slur"); + TQT_SLOT(slotGroupSlur()), actionCollection(), "slur"); new KAction(AddIndicationCommand::getGlobalName (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, this, - SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); + TQT_SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1956,7 +1956,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Glissando), icon, 0, this, - SLOT(slotGroupGlissando()), actionCollection(), "glissando"); + TQT_SLOT(slotGroupGlissando()), actionCollection(), "glissando"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1964,7 +1964,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Crescendo), icon, Key_Less, this, - SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); + TQT_SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1972,11 +1972,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Decrescendo), icon, Key_Greater, this, - SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); + TQT_SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaUp), 0, 0, this, - SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); + TQT_SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1984,33 +1984,33 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaUp), icon, 0, this, - SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); + TQT_SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaDown), 0, 0, this, - SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); + TQT_SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaDown), 0, 0, this, - SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); + TQT_SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-chord"))); new KAction(MakeChordCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); + TQT_SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); // setup Transforms menu new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, this, - SLOT(slotTransformsNormalizeRests()), actionCollection(), + TQT_SLOT(slotTransformsNormalizeRests()), actionCollection(), "normalize_rests"); new KAction(CollapseRestsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsCollapseRests()), actionCollection(), + TQT_SLOT(slotTransformsCollapseRests()), actionCollection(), "collapse_rests_aggressively"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); icon = QIconSet @@ -2018,15 +2018,15 @@ void NotationView::setupActions() ("transforms-tie"))); new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, this, - SLOT(slotTransformsTieNotes()), actionCollection(), + TQT_SLOT(slotTransformsTieNotes()), actionCollection(), "tie_notes"); new KAction(UntieNotesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsUntieNotes()), actionCollection(), + TQT_SLOT(slotTransformsUntieNotes()), actionCollection(), "untie_notes"); new KAction(MakeNotesViableCommand::getGlobalName(), 0, this, - SLOT(slotTransformsMakeNotesViable()), actionCollection(), + TQT_SLOT(slotTransformsMakeNotesViable()), actionCollection(), "make_notes_viable"); icon = QIconSet @@ -2034,49 +2034,49 @@ void NotationView::setupActions() ("transforms-decounterpoint"))); new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, this, - SLOT(slotTransformsDeCounterpoint()), actionCollection(), + TQT_SLOT(slotTransformsDeCounterpoint()), actionCollection(), "de_counterpoint"); new KAction(ChangeStemsCommand::getGlobalName(true), 0, Key_PageUp + CTRL, this, - SLOT(slotTransformsStemsUp()), actionCollection(), + TQT_SLOT(slotTransformsStemsUp()), actionCollection(), "stems_up"); new KAction(ChangeStemsCommand::getGlobalName(false), 0, Key_PageDown + CTRL, this, - SLOT(slotTransformsStemsDown()), actionCollection(), + TQT_SLOT(slotTransformsStemsDown()), actionCollection(), "stems_down"); new KAction(RestoreStemsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreStems()), actionCollection(), + TQT_SLOT(slotTransformsRestoreStems()), actionCollection(), "restore_stems"); new KAction(ChangeSlurPositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsSlursAbove()), actionCollection(), + TQT_SLOT(slotTransformsSlursAbove()), actionCollection(), "slurs_above"); new KAction(ChangeSlurPositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsSlursBelow()), actionCollection(), + TQT_SLOT(slotTransformsSlursBelow()), actionCollection(), "slurs_below"); new KAction(RestoreSlursCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreSlurs()), actionCollection(), + TQT_SLOT(slotTransformsRestoreSlurs()), actionCollection(), "restore_slurs"); new KAction(ChangeTiePositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsTiesAbove()), actionCollection(), + TQT_SLOT(slotTransformsTiesAbove()), actionCollection(), "ties_above"); new KAction(ChangeTiePositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsTiesBelow()), actionCollection(), + TQT_SLOT(slotTransformsTiesBelow()), actionCollection(), "ties_below"); new KAction(RestoreTiesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreTies()), actionCollection(), + TQT_SLOT(slotTransformsRestoreTies()), actionCollection(), "restore_ties"); icon = QIconSet @@ -2086,7 +2086,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleFlat), icon, 0, this, - SLOT(slotRespellDoubleFlat()), actionCollection(), + TQT_SLOT(slotRespellDoubleFlat()), actionCollection(), "respell_doubleflat"); icon = QIconSet @@ -2096,7 +2096,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Flat), icon, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); icon = QIconSet @@ -2106,7 +2106,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Natural), icon, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); icon = QIconSet @@ -2116,7 +2116,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Sharp), icon, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); icon = QIconSet @@ -2126,35 +2126,35 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleSharp), icon, 0, this, - SLOT(slotRespellDoubleSharp()), actionCollection(), + TQT_SLOT(slotRespellDoubleSharp()), actionCollection(), "respell_doublesharp"); new KAction(RespellCommand::getGlobalName (RespellCommand::Up, Accidentals::NoAccidental), Key_Up + CTRL + SHIFT, this, - SLOT(slotRespellUp()), actionCollection(), + TQT_SLOT(slotRespellUp()), actionCollection(), "respell_up"); new KAction(RespellCommand::getGlobalName (RespellCommand::Down, Accidentals::NoAccidental), Key_Down + CTRL + SHIFT, this, - SLOT(slotRespellDown()), actionCollection(), + TQT_SLOT(slotRespellDown()), actionCollection(), "respell_down"); new KAction(RespellCommand::getGlobalName (RespellCommand::Restore, Accidentals::NoAccidental), 0, this, - SLOT(slotRespellRestore()), actionCollection(), + TQT_SLOT(slotRespellRestore()), actionCollection(), "respell_restore"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(true), 0, this, - SLOT(slotShowCautionary()), actionCollection(), + TQT_SLOT(slotShowCautionary()), actionCollection(), "show_cautionary"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(false), 0, this, - SLOT(slotCancelCautionary()), actionCollection(), + TQT_SLOT(slotCancelCautionary()), actionCollection(), "cancel_cautionary"); icon = QIconSet @@ -2162,37 +2162,37 @@ void NotationView::setupActions() ("quantize"))); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(FixNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsFixQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), "fix_quantization"); new KAction(RemoveNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsRemoveQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), "remove_quantization"); new KAction(InterpretCommand::getGlobalName(), 0, - this, SLOT(slotTransformsInterpret()), actionCollection(), + this, TQT_SLOT(slotTransformsInterpret()), actionCollection(), "interpret"); new KAction(i18n("&Dump selected events to stderr"), 0, this, - SLOT(slotDebugDump()), actionCollection(), "debug_dump"); + TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump"); for (MarkActionDataMap::Iterator i = m_markActionDataMap->begin(); i != m_markActionDataMap->end(); ++i) { const MarkActionData &markActionData = **i; - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeMarkMenuPixmap(markActionData.mark))); new KAction(markActionData.title, icon, markActionData.keycode, this, - SLOT(slotAddMark()), + TQT_SLOT(slotAddMark()), actionCollection(), markActionData.actionName); } @@ -2202,97 +2202,97 @@ void NotationView::setupActions() ("text-mark"))); new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, this, - SLOT(slotMarksAddTextMark()), actionCollection(), + TQT_SLOT(slotMarksAddTextMark()), actionCollection(), "add_text_mark"); new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_0"); new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_1"); new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_2"); new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_3"); new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_4"); new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_5"); new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_plus"); new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, this, - SLOT(slotMarksAddFingeringMark()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMark()), actionCollection(), "add_fingering_mark"); new KAction(RemoveMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveMarks()), actionCollection(), "remove_marks"); new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), "remove_fingering_marks"); new KAction(i18n("Ma&ke Ornament..."), 0, this, - SLOT(slotMakeOrnament()), actionCollection(), + TQT_SLOT(slotMakeOrnament()), actionCollection(), "make_ornament"); new KAction(i18n("Trigger &Ornament..."), 0, this, - SLOT(slotUseOrnament()), actionCollection(), + TQT_SLOT(slotUseOrnament()), actionCollection(), "use_ornament"); new KAction(i18n("Remove Ornament..."), 0, this, - SLOT(slotRemoveOrnament()), actionCollection(), + TQT_SLOT(slotRemoveOrnament()), actionCollection(), "remove_ornament"); - static QString slashTitles[] = { + static TQString slashTitles[] = { i18n("&None"), "&1", "&2", "&3", "&4", "&5" }; for (int i = 0; i <= 5; ++i) { new KAction(slashTitles[i], 0, this, - SLOT(slotAddSlashes()), actionCollection(), - QString("slashes_%1").arg(i)); + TQT_SLOT(slotAddSlashes()), actionCollection(), + TQString("slashes_%1").arg(i)); } new KAction(ClefInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddClef()), actionCollection(), + TQT_SLOT(slotEditAddClef()), actionCollection(), "add_clef"); new KAction(KeyInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddKeySignature()), actionCollection(), + TQT_SLOT(slotEditAddKeySignature()), actionCollection(), "add_key_signature"); new KAction(SustainInsertionCommand::getGlobalName(true), 0, this, - SLOT(slotEditAddSustainDown()), actionCollection(), + TQT_SLOT(slotEditAddSustainDown()), actionCollection(), "add_sustain_down"); new KAction(SustainInsertionCommand::getGlobalName(false), 0, this, - SLOT(slotEditAddSustainUp()), actionCollection(), + TQT_SLOT(slotEditAddSustainUp()), actionCollection(), "add_sustain_up"); new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, this, - SLOT(slotEditTranspose()), actionCollection(), + TQT_SLOT(slotEditTranspose()), actionCollection(), "transpose_segment"); new KAction(i18n("Convert Notation For..."), 0, this, - SLOT(slotEditSwitchPreset()), actionCollection(), + TQT_SLOT(slotEditSwitchPreset()), actionCollection(), "switch_preset"); // setup Settings menu - static QString actionsToolbars[][4] = + static TQString actionsToolbars[][4] = { { i18n("Show T&ools Toolbar"), "1slotToggleToolsToolBar()", "show_tools_toolbar", "palette-tools" }, { i18n("Show &Notes Toolbar"), "1slotToggleNotesToolBar()", "show_notes_toolbar", "palette-notes" }, @@ -2315,7 +2315,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); new KToggleAction(actionsToolbars[i][0], icon, 0, this, actionsToolbars[i][1], @@ -2323,193 +2323,193 @@ void NotationView::setupActions() } new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); /*!!! not here yet new KAction(i18n("Move Selection Left"), Key_Minus, this, - SLOT(slotMoveSelectionLeft()), actionCollection(), + TQT_SLOT(slotMoveSelectionLeft()), actionCollection(), "move_selection_left"); */ new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, this, - SLOT(slotCurrentStaffUp()), actionCollection(), + TQT_SLOT(slotCurrentStaffUp()), actionCollection(), "cursor_up_staff"); new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, this, - SLOT(slotCurrentStaffDown()), actionCollection(), + TQT_SLOT(slotCurrentStaffDown()), actionCollection(), "cursor_down_staff"); new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, this, - SLOT(slotCurrentSegmentPrior()), actionCollection(), + TQT_SLOT(slotCurrentSegmentPrior()), actionCollection(), "cursor_prior_segment"); new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, this, - SLOT(slotCurrentSegmentNext()), actionCollection(), + TQT_SLOT(slotCurrentSegmentNext()), actionCollection(), "cursor_next_segment"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // QString pixmapDir = + // TQString pixmapDir = // KGlobal::dirs()->findResource("appdata", "pixmaps/"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Push &Left"), 0, this, - SLOT(slotFinePositionLeft()), actionCollection(), + TQT_SLOT(slotFinePositionLeft()), actionCollection(), "fine_position_left"); new KAction(i18n("Push &Right"), 0, this, - SLOT(slotFinePositionRight()), actionCollection(), + TQT_SLOT(slotFinePositionRight()), actionCollection(), "fine_position_right"); new KAction(i18n("Push &Up"), 0, this, - SLOT(slotFinePositionUp()), actionCollection(), + TQT_SLOT(slotFinePositionUp()), actionCollection(), "fine_position_up"); new KAction(i18n("Push &Down"), 0, this, - SLOT(slotFinePositionDown()), actionCollection(), + TQT_SLOT(slotFinePositionDown()), actionCollection(), "fine_position_down"); new KAction(i18n("&Restore Positions"), 0, this, - SLOT(slotFinePositionRestore()), actionCollection(), + TQT_SLOT(slotFinePositionRestore()), actionCollection(), "fine_position_restore"); new KAction(i18n("Make &Invisible"), 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make &Visible"), 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); new KAction(i18n("Toggle Dot"), Key_Period, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL, this, - SLOT(slotAddDot()), actionCollection(), + TQT_SLOT(slotAddDot()), actionCollection(), "add_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, this, - SLOT(slotAddDotNotationOnly()), actionCollection(), + TQT_SLOT(slotAddDotNotationOnly()), actionCollection(), "add_notation_dot"); createGUI(getRCFileName(), false); @@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { KAction *action = actionCollection()->action - (QString("note_font_size_%1").arg(sizes[i])); + (TQString("note_font_size_%1").arg(sizes[i])); m_fontSizeActionMenu->remove (action); @@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { - QString actionName = QString("note_font_size_%1").arg(sizes[i]); + TQString actionName = TQString("note_font_size_%1").arg(sizes[i]); KToggleAction *sizeAction = dynamic_cast<KToggleAction *> (actionCollection()->action(actionName)); @@ -2569,7 +2569,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) sizeAction = new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), 0, this, - SLOT(slotChangeFontSizeFromAction()), + TQT_SLOT(slotChangeFontSizeFromAction()), actionCollection(), actionName); } @@ -2616,7 +2616,7 @@ void NotationView::initLayoutToolbar() return ; } - new QLabel(i18n(" Font: "), layoutToolbar, "font label"); + new TQLabel(i18n(" Font: "), layoutToolbar, "font label"); // // font combo @@ -2633,7 +2633,7 @@ void NotationView::initLayoutToolbar() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); m_fontCombo->insertItem(fontQName); if (fontQName.lower() == strtoqstr(m_fontName).lower()) { @@ -2649,12 +2649,12 @@ void NotationView::initLayoutToolbar() m_fontName = NoteFontFactory::getDefaultFontName(); } - connect(m_fontCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotChangeFont(const QString &))); + connect(m_fontCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotChangeFont(const TQString &))); - new QLabel(i18n(" Size: "), layoutToolbar, "size label"); + new TQLabel(i18n(" Size: "), layoutToolbar, "size label"); - QString value; + TQString value; // // font size combo @@ -2671,10 +2671,10 @@ void NotationView::initLayoutToolbar() value.setNum(m_fontSize); m_fontSizeCombo->setCurrentText(value); - connect(m_fontSizeCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeFontSizeFromStringValue(const QString&))); + connect(m_fontSizeCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeFontSizeFromStringValue(const TQString&))); - new QLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); + new TQLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); // // spacing combo @@ -2694,29 +2694,29 @@ void NotationView::initLayoutToolbar() value += "%"; m_spacingCombo->setCurrentText(value); - connect(m_spacingCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeSpacingFromStringValue(const QString&))); + connect(m_spacingCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeSpacingFromStringValue(const TQString&))); } void NotationView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(160); sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - QHBox *hbox = new QHBox(sb); - m_currentNotePixmap = new QLabel(hbox); + TQHBox *hbox = new TQHBox(sb); + m_currentNotePixmap = new TQLabel(hbox); m_currentNotePixmap->setMinimumWidth(20); - m_insertModeLabel = new QLabel(hbox); - m_annotationsLabel = new QLabel(hbox); - m_lilyPondDirectivesLabel = new QLabel(hbox); + m_insertModeLabel = new TQLabel(hbox); + m_annotationsLabel = new TQLabel(hbox); + m_lilyPondDirectivesLabel = new TQLabel(hbox); sb->addWidget(hbox); sb->insertItem(KTmpStatusMsg::getDefaultMsg(), @@ -2724,7 +2724,7 @@ void NotationView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); m_progressBar = new ProgressBar(100, true, sb); @@ -2732,12 +2732,12 @@ void NotationView::initStatusBar() sb->addWidget(m_progressBar); } -QSize NotationView::getViewSize() +TQSize NotationView::getViewSize() { return canvas()->size(); } -void NotationView::setViewSize(QSize s) +void NotationView::setViewSize(TQSize s) { canvas()->resize(s.width(), s.height()); @@ -2916,7 +2916,7 @@ NotationView::getHLayout() } void -NotationView::paintEvent(QPaintEvent *e) +NotationView::paintEvent(TQPaintEvent *e) { m_inPaintEvent = true; @@ -3534,18 +3534,18 @@ void NotationView::print(bool previewOnly) maxPageCount = pageCount; } - KPrinter printer(true, QPrinter::HighResolution); + KPrinter printer(true, TQPrinter::HighResolution); printer.setPageSelection(KPrinter::ApplicationSide); printer.setMinMax(1, maxPageCount + 1); if (previewOnly) printer.setPreviewOnly(true); - else if (!printer.setup((QWidget *)parent())) + else if (!printer.setup((TQWidget *)parent())) return ; - QPaintDeviceMetrics pdm(&printer); - QPainter printpainter(&printer); + TQPaintDeviceMetrics pdm(&printer); + TQPainter printpainter(&printer); // Ideally we should aim to retain the aspect ratio and to move the // staffs so as to be centred after scaling. But because we haven't @@ -3562,9 +3562,9 @@ void NotationView::print(bool previewOnly) // (double)pdm.height() / (double)(pageHeight - topMargin*2)); printpainter.translate( -leftMargin, -topMargin); - QValueList<int> pages = printer.pageList(); + TQValueList<int> pages = printer.pageList(); - for (QValueList<int>::Iterator pli = pages.begin(); + for (TQValueList<int>::Iterator pli = pages.begin(); pli != pages.end(); ) { // incremented just below int page = *pli - 1; @@ -3574,7 +3574,7 @@ void NotationView::print(bool previewOnly) NOTATION_DEBUG << "Printing page " << page << endl; - QRect pageRect(m_leftGutter + leftMargin + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin + pageWidth * page, topMargin, pageWidth - leftMargin, pageHeight - topMargin); @@ -3604,10 +3604,10 @@ void NotationView::print(bool previewOnly) m_config->setGroup(NotationViewConfigGroup); - NOTATION_DEBUG << "NotationView::print: calling QCanvas::drawArea" << endl; + NOTATION_DEBUG << "NotationView::print: calling TQCanvas::drawArea" << endl; { - Profiler profiler("NotationView::print(QCanvas::drawArea)"); + Profiler profiler("NotationView::print(TQCanvas::drawArea)"); if (m_config->readBoolEntry("forcedoublebufferprinting", false)) { getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); @@ -3623,7 +3623,7 @@ void NotationView::print(bool previewOnly) } - NOTATION_DEBUG << "NotationView::print: QCanvas::drawArea done" << endl; + NOTATION_DEBUG << "NotationView::print: TQCanvas::drawArea done" << endl; for (size_t i = 0; i < m_staffs.size(); ++i) { @@ -3685,10 +3685,10 @@ NotationView::updateThumbnails(bool complete) } int thumbScale = 20; - QPixmap thumbnail(canvas()->width() / thumbScale, + TQPixmap thumbnail(canvas()->width() / thumbScale, canvas()->height() / thumbScale); thumbnail.fill(Qt::white); - QPainter thumbPainter(&thumbnail); + TQPainter thumbPainter(&thumbnail); if (complete) { @@ -3697,8 +3697,8 @@ NotationView::updateThumbnails(bool complete) thumbPainter.setBrush(Qt::white); /* - QCanvas *canvas = getCanvasView()->canvas(); - canvas->drawArea(QRect(0, 0, canvas->width(), canvas->height()), + TQCanvas *canvas = getCanvasView()->canvas(); + canvas->drawArea(TQRect(0, 0, canvas->width(), canvas->height()), &thumbPainter, false); */ // hide small texts, as we get a crash in Xft when trying to @@ -3719,12 +3719,12 @@ NotationView::updateThumbnails(bool complete) if (havePageNumber) m_pageNumbers[page]->hide(); - QRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, topMargin * 2, pageWidth - leftMargin*3, pageHeight - topMargin*3); - QCanvas *canvas = getCanvasView()->canvas(); + TQCanvas *canvas = getCanvasView()->canvas(); canvas->drawArea(pageRect, &thumbPainter, false); if (havePageNumber) @@ -3751,7 +3751,7 @@ NotationView::updateThumbnails(bool complete) int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); + TQString str = TQString("%1").arg(page + 1); thumbPainter.drawRect(x / thumbScale, y / thumbScale, w / thumbScale, h / thumbScale); @@ -3927,7 +3927,7 @@ void NotationView::readjustCanvasSize() } // now get the EditView to do the biz - readjustViewSize(QSize(int(maxWidth), maxHeight), true); + readjustViewSize(TQSize(int(maxWidth), maxHeight), true); UPDATE_PROGRESS(2); @@ -3941,11 +3941,11 @@ void NotationView::readjustCanvasSize() m_pannerDialog->show(); m_pannerDialog->setPageSize - (QSize(canvas()->width(), + (TQSize(canvas()->width(), canvas()->height())); m_pannerDialog->scrollbox()->setViewSize - (QSize(getCanvasView()->width(), + (TQSize(getCanvasView()->width(), getCanvasView()->height())); } } @@ -3958,7 +3958,7 @@ void NotationView::readjustCanvasSize() void NotationView::slotNoteAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteActionDataMap::Iterator noteAct = m_noteActionDataMap->find(sigSender->name()); @@ -3989,7 +3989,7 @@ void NotationView::slotLastNoteAction() void NotationView::slotAddMark() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; @@ -4003,7 +4003,7 @@ void NotationView::slotAddMark() void NotationView::slotNoteChangeAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteChangeActionDataMap::Iterator noteAct = m_noteChangeActionDataMap->find(sigSender->name()); @@ -4034,20 +4034,20 @@ void NotationView::initActionDataMaps() if (dots && (type == Note::Longest)) continue; - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, dots), rest == 1)); - QString shortName(refName); - shortName.replace(QRegExp("-"), "_"); + TQString shortName(refName); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, dots))); titleName = titleName.left(1).upper() + titleName.right(titleName.length() - 1); if (rest) { - titleName.replace(QRegExp(i18n("note")), i18n("rest")); + titleName.replace(TQRegExp(i18n("note")), i18n("rest")); } int keycode = keys[type - Note::Shortest]; @@ -4069,14 +4069,14 @@ void NotationView::initActionDataMaps() for (int notationOnly = 0; notationOnly <= 1; ++notationOnly) { for (int type = Note::Longest; type >= Note::Shortest; --type) { - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, 0), false)); - QString shortName(QString("change_%1%2") + TQString shortName(TQString("change_%1%2") .arg(notationOnly ? "notation_" : "").arg(refName)); - shortName.replace(QRegExp("-"), "_"); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, 0))); titleName = titleName.left(1).upper() + @@ -4100,8 +4100,8 @@ void NotationView::initActionDataMaps() for (unsigned int i = 0; i < marks.size(); ++i) { Mark mark = marks[i]; - QString markName(strtoqstr(mark)); - QString actionName = QString("add_%1").arg(markName); + TQString markName(strtoqstr(mark)); + TQString actionName = TQString("add_%1").arg(markName); m_markActionDataMap->insert (actionName, new MarkActionData @@ -4116,24 +4116,24 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_hlayout, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_hlayout, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_hlayout, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); - connect(this, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(this, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(this, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(this, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_staffs[i], TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_staffs[i], SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_staffs[i], TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); } } @@ -4147,28 +4147,28 @@ void NotationView::setupProgress(ProgressDialog* dialog) if (dialog) { setupProgress(dialog->progressBar()); - connect(dialog, SIGNAL(cancelClicked()), - m_hlayout, SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_hlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setOperationName(QString)), - this, SLOT(slotSetOperationNameAndStatus(QString))); + connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), + this, TQT_SLOT(slotSetOperationNameAndStatus(TQString))); - connect(dialog, SIGNAL(cancelClicked()), - m_staffs[i], SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_staffs[i], TQT_SLOT(slotCancel())); } - connect(this, SIGNAL(setOperationName(QString)), - dialog, SLOT(slotSetOperationName(QString))); + connect(this, TQT_SIGNAL(setOperationName(TQString)), + dialog, TQT_SLOT(slotSetOperationName(TQString))); m_progressDisplayer = PROGRESS_DIALOG; } } -void NotationView::slotSetOperationNameAndStatus(QString name) +void NotationView::slotSetOperationNameAndStatus(TQString name) { emit setOperationName(name); - statusBar()->changeItem(QString(" %1").arg(name), + statusBar()->changeItem(TQString(" %1").arg(name), KTmpStatusMsg::getDefaultId()); } @@ -4177,9 +4177,9 @@ void NotationView::disconnectProgress() NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; m_hlayout->disconnect(); - disconnect(SIGNAL(setProgress(int))); - disconnect(SIGNAL(incrementProgress(int))); - disconnect(SIGNAL(setOperationName(QString))); + disconnect(TQT_SIGNAL(setProgress(int))); + disconnect(TQT_SIGNAL(incrementProgress(int))); + disconnect(TQT_SIGNAL(setOperationName(TQString))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->disconnect(); @@ -4238,10 +4238,10 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0; void NotationView::slotUpdateInsertModeStatus() { - QString tripletMessage = i18n("Triplet"); - QString chordMessage = i18n("Chord"); - QString graceMessage = i18n("Grace"); - QString message; + TQString tripletMessage = i18n("Triplet"); + TQString chordMessage = i18n("Chord"); + TQString graceMessage = i18n("Grace"); + TQString message; if (isInTripletMode()) { message = i18n("%1 %2").arg(message).arg(tripletMessage); @@ -4301,7 +4301,7 @@ NotationView::slotUpdateLilyPondDirectivesStatus() } void -NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) +NotationView::slotChangeSpacingFromStringValue(const TQString& spacingT) { // spacingT has a '%' at the end // @@ -4312,8 +4312,8 @@ NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) void NotationView::slotChangeSpacingFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(8) == "spacing_") { int spacing = name.right(name.length() - 8).toInt(); @@ -4338,7 +4338,7 @@ NotationView::slotChangeSpacing(int spacing) // m_spacingSlider->setSize(spacing); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("spacing_%1").arg(spacing))); + (actionCollection()->action(TQString("spacing_%1").arg(spacing))); if (action) action->setChecked(true); else { @@ -4372,8 +4372,8 @@ NotationView::slotChangeProportionFromIndex(int n) void NotationView::slotChangeProportionFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(11) == "proportion_") { int proportion = name.right(name.length() - 11).toInt(); @@ -4396,7 +4396,7 @@ NotationView::slotChangeProportion(int proportion) // m_proportionSlider->setSize(proportion); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("proportion_%1").arg(proportion))); + (actionCollection()->action(TQString("proportion_%1").arg(proportion))); if (action) action->setChecked(true); else { @@ -4421,8 +4421,8 @@ NotationView::slotChangeProportion(int proportion) void NotationView::slotChangeFontFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(10) == "note_font_") { name = name.right(name.length() - 10); slotChangeFont(name); @@ -4435,8 +4435,8 @@ NotationView::slotChangeFontFromAction() void NotationView::slotChangeFontSizeFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(15) == "note_font_size_") { name = name.right(name.length() - 15); @@ -4455,7 +4455,7 @@ NotationView::slotChangeFontSizeFromAction() } void -NotationView::slotChangeFont(const QString &newName) +NotationView::slotChangeFont(const TQString &newName) { NOTATION_DEBUG << "changeFont: " << newName << endl; slotChangeFont(std::string(newName.utf8())); @@ -4488,7 +4488,7 @@ NotationView::slotChangeFontSize(int newSize) } void -NotationView::slotChangeFontSizeFromStringValue(const QString& sizeT) +NotationView::slotChangeFontSizeFromStringValue(const TQString& sizeT) { int size = sizeT.toInt(); slotChangeFont(m_fontName, size); @@ -4566,7 +4566,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) std::vector<int> sizes = NoteFontFactory::getScreenSizes(m_fontName); m_fontSizeCombo->clear(); - QString value; + TQString value; for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { value.setNum(*i); m_fontSizeCombo->insertItem(value); @@ -4619,7 +4619,7 @@ NotationView::slotFilePrint() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print : operation cancelled\n"; @@ -4636,7 +4636,7 @@ NotationView::slotFilePrintPreview() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print preview : operation cancelled\n"; @@ -4651,7 +4651,7 @@ std::map<KProcess *, KTempFile *> NotationView::m_lilyTempFileMap; void NotationView::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4666,8 +4666,8 @@ void NotationView::slotPrintLilyPond() *proc << "--graphical"; *proc << "--print"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4675,7 +4675,7 @@ void NotationView::slotPrintLilyPond() void NotationView::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4690,8 +4690,8 @@ void NotationView::slotPreviewLilyPond() *proc << "--graphical"; *proc << "--pdf"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4703,16 +4703,16 @@ void NotationView::slotLilyPondViewProcessExited(KProcess *p) delete p; } -bool NotationView::exportLilyPondFile(QString file, bool forPreview) +bool NotationView::exportLilyPondFile(TQString file, bool forPreview) { - QString caption = "", heading = ""; + TQString caption = "", heading = ""; if (forPreview) { caption = i18n("LilyPond Preview Options"); heading = i18n("LilyPond preview options"); } LilyPondOptionsDialog dialog(this, m_doc, caption, heading); - if (dialog.exec() != QDialog::Accepted) { + if (dialog.exec() != TQDialog::Accepted) { return false; } @@ -4720,13 +4720,13 @@ bool NotationView::exportLilyPondFile(QString file, bool forPreview) 100, this); - LilyPondExporter e(this, m_doc, std::string(QFile::encodeName(file))); + LilyPondExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { // CurrentProgressDialog::freeze(); @@ -4776,7 +4776,7 @@ void NotationView::slotEditCutAndClose() getDocument()->getClipboard())); } -static const QString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( +static const TQString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( "The Restricted paste type requires enough empty " \ "space (containing only rests) at the paste position " \ "to hold all of the events to be pasted.\n" \ @@ -4855,7 +4855,7 @@ void NotationView::slotEditGeneralPaste() PasteNotationDialog dialog(this, defaultType); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { PasteEventsCommand::PasteType type = dialog.getPasteType(); if (dialog.setAsDefault()) { @@ -5006,7 +5006,7 @@ void NotationView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { NOTATION_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -5150,7 +5150,7 @@ void NotationView::slotToggleTransportToolBar() toggleNamedToolBar("Transport Toolbar"); } -void NotationView::toggleNamedToolBar(const QString& toolBarName, bool* force) +void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force) { KToolBar *namedToolBar = toolBar(toolBarName); @@ -5238,7 +5238,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType, duration); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5267,7 +5267,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5350,7 +5350,7 @@ void NotationView::slotGroupOctave2Down() slotAddIndication(Indication::QuindicesimaDown, i18n("ottava")); } -void NotationView::slotAddIndication(std::string type, QString desc) +void NotationView::slotAddIndication(std::string type, TQString desc) { if (!m_currentEventSelection) return ; @@ -5565,8 +5565,8 @@ void NotationView::slotTransformsRemoveQuantization() void NotationView::slotSetStyleFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (!m_currentEventSelection) return ; @@ -5588,8 +5588,8 @@ void NotationView::slotSetStyleFromAction() void NotationView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = m_staffs[m_currentStaff]->getSegment(); @@ -5663,7 +5663,7 @@ void NotationView::slotSwitchFromRestToNote() Note note(restInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, false); + TQString actionName = NotationStrings::getReferenceName(note, false); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5698,7 +5698,7 @@ void NotationView::slotSwitchFromNoteToRest() Note note(noteInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, true); + TQString actionName = NotationStrings::getReferenceName(note, true); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5865,7 +5865,7 @@ void NotationView::slotTransformsQuantize() QuantizeDialog dialog(this, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -5880,7 +5880,7 @@ void NotationView::slotTransformsInterpret() InterpretDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Interpreting selection..."), this); addCommandToHistory(new InterpretCommand (*m_currentEventSelection, @@ -5915,11 +5915,11 @@ void NotationView::slotAddDotNotationOnly() void NotationView::slotAddSlashes() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; - QString name = s->name(); + TQString name = s->name(); int slashes = name.right(1).toInt(); addCommandToHistory(new AddSlashesCommand @@ -5931,7 +5931,7 @@ void NotationView::slotMarksAddTextMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddTextMarkCommand @@ -5945,7 +5945,7 @@ void NotationView::slotMarksAddFingeringMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddFingeringMarkCommand @@ -5956,12 +5956,12 @@ void NotationView::slotMarksAddFingeringMark() void NotationView::slotMarksAddFingeringMarkFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(14) == "add_fingering_") { - QString fingering = name.right(name.length() - 14); + TQString fingering = name.right(name.length() - 14); if (fingering == "plus") fingering = "+"; @@ -6030,16 +6030,16 @@ NotationView::slotMakeOrnament() Track *track = segment.getComposition()->getTrackById(segment.getTrack()); - QString name; + TQString name; int barNo = segment.getComposition()->getBarNumber(absTime); if (track) { - name = QString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); + name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); } else { - name = QString(i18n("Ornament bar %1").arg(barNo + 1)); + name = TQString(i18n("Ornament bar %1").arg(barNo + 1)); } MakeOrnamentDialog dialog(this, name, basePitch); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; name = dialog.getName(); @@ -6076,7 +6076,7 @@ NotationView::slotUseOrnament() return ; UseOrnamentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -6109,7 +6109,7 @@ void NotationView::slotEditAddClef() ClefDialog dialog(this, m_notePixmapFactory, lastClef); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); @@ -6144,7 +6144,7 @@ void NotationView::slotEditAddKeySignature() (this, m_notePixmapFactory, clef, key, true, true, i18n("Estimated key signature shown")); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6251,7 +6251,7 @@ void NotationView::slotEditSwitchPreset() { PresetHandlerDialog dialog(this, true); - if (dialog.exec() != QDialog::Accepted) return; + if (dialog.exec() != TQDialog::Accepted) return; if (dialog.getConvertAllSegments()) { // get all segments for this track and convert them. @@ -6296,7 +6296,7 @@ void NotationView::slotEditElement(NotationStaff *staff, EventEditDialog dialog(this, *element->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6313,7 +6313,7 @@ void NotationView::slotEditElement(NotationStaff *staff, ClefDialog dialog(this, m_notePixmapFactory, Clef(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); bool shouldChangeOctave = (conversion != ClefDialog::NoConversion); @@ -6338,7 +6338,7 @@ void NotationView::slotEditElement(NotationStaff *staff, (this, m_notePixmapFactory, clef, Rosegarden::Key(*element->event()), false, true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6365,7 +6365,7 @@ void NotationView::slotEditElement(NotationStaff *staff, try { TextEventDialog dialog (this, m_notePixmapFactory, Text(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { TextInsertionCommand *command = new TextInsertionCommand (staff->getSegment(), element->event()->getAbsoluteTime(), @@ -6395,7 +6395,7 @@ void NotationView::slotEditElement(NotationStaff *staff, SimpleEventEditDialog dialog(this, getDocument(), *element->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6835,7 +6835,7 @@ NotationView::doDeferredCursorMove() } } - QScrollBar* hbar = getCanvasView()->horizontalScrollBar(); + TQScrollBar* hbar = getCanvasView()->horizontalScrollBar(); hbar->setValue(int(hbar->value() - (m_deferredCursorScrollToX - ccx))); } @@ -7024,7 +7024,7 @@ void NotationView::slotEditLyrics() LyricEditDialog dialog(this, &segment); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KMacroCommand *macro = new KMacroCommand (SetLyricsCommand::getGlobalName()); @@ -7040,7 +7040,7 @@ void NotationView::slotEditLyrics() } void NotationView::slotItemPressed(int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, NotationElement* el) { NOTATION_DEBUG << "NotationView::slotItemPressed(height = " @@ -7073,7 +7073,7 @@ void NotationView::slotItemPressed(int height, int staffNo, timeT unknownTime = 0; - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { m_tool->handleMouseDoubleClick(unknownTime, height, staffNo, e, el); } else { @@ -7083,9 +7083,9 @@ void NotationView::slotItemPressed(int height, int staffNo, } } -void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; Staff *staff = getStaffForCanvasCoords(e->x(), e->y()); @@ -7101,10 +7101,10 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) getTrackById(staff->getSegment().getTrack())->getLabel(); bool ok = false; - QRegExpValidator validator(QRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK - QString newText = KLineEditDlg::getText(QString("Change staff name"), - QString("Enter new staff name"), + TQString newText = KLineEditDlg::getText(TQString("Change staff name"), + TQString("Enter new staff name"), strtoqstr(name), &ok, this, @@ -7126,9 +7126,9 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) } } -void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; if (it == m_title) { @@ -7146,7 +7146,7 @@ void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) positionStaffs(); } -void NotationView::slotMouseMoved(QMouseEvent *e) +void NotationView::slotMouseMoved(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseMove(e); @@ -7169,7 +7169,7 @@ void NotationView::slotMouseMoved(QMouseEvent *e) } } -void NotationView::slotMouseReleased(QMouseEvent *e) +void NotationView::slotMouseReleased(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseRelease(e); @@ -7181,9 +7181,9 @@ void NotationView::slotMouseReleased(QMouseEvent *e) } void -NotationView::slotHoveredOverNoteChanged(const QString ¬eName) +NotationView::slotHoveredOverNoteChanged(const TQString ¬eName) { - m_hoveredOverNoteName->setText(QString(" ") + noteName); + m_hoveredOverNoteName->setText(TQString(" ") + noteName); } void @@ -7198,19 +7198,19 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (t, bar, beat, fraction, remainder); - // QString message; - // QString format("%ld (%ld.%03lds)"); + // TQString message; + // TQString format("%ld (%ld.%03lds)"); // format = i18n("Time: %1").arg(format); // message.sprintf(format, t, rt.sec, ms); - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString message = i18n("Time: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -7374,7 +7374,7 @@ NotationView::slotToggleStepByStep() } void -NotationView::slotStepByStepTargetRequested(QObject *obj) +NotationView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -7414,8 +7414,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) emit renderComplete(); if (m_renderTimer) delete m_renderTimer; - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); } @@ -7433,8 +7433,8 @@ NotationView::slotRenderSomething() clock_t now = clock(); long elapsed = ((now - lastWork) * 1000 / CLOCKS_PER_SEC); if (elapsed < 70) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } @@ -7444,8 +7444,8 @@ NotationView::slotRenderSomething() if (m_staffs[i]->doRenderWork(m_staffs[i]->getSegment().getStartTime(), m_staffs[i]->getSegment().getEndTime())) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 7678f8a..356960c 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -35,23 +35,23 @@ #include <string> #include <kprocess.h> #include <ktempfile.h> -#include <qmap.h> -#include <qsize.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" #include "gui/general/ClefIndex.h" -class QWidget; -class QTimer; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQTimer; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvasItem; +class TQCanvas; class KProgress; class KComboBox; class KActionMenu; @@ -113,7 +113,7 @@ class NotationView : public EditView, public: explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive); // update during initial render? /** @@ -124,7 +124,7 @@ public: */ explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView); ~NotationView(); @@ -170,9 +170,9 @@ public: /// Return true if the staff at the specified index is the current one bool isCurrentStaff(int i); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -358,7 +358,7 @@ public slots: /** * export a LilyPond file */ - bool exportLilyPondFile(QString url, bool forPreview = false); + bool exportLilyPondFile(TQString url, bool forPreview = false); /** * Export to a temporary file and process @@ -545,7 +545,7 @@ public slots: void slotGroupOctaveUp(); void slotGroupOctaveDown(); void slotGroupOctave2Down(); - void slotAddIndication(std::string type, QString cat); + void slotAddIndication(std::string type, TQString cat); /// transforms slots void slotTransformsNormalizeRests(); @@ -630,20 +630,20 @@ public slots: * Called when a mouse press occurred on a notation element * or somewhere on a staff */ - void slotItemPressed(int height, int staffNo, QMouseEvent*, NotationElement*); + void slotItemPressed(int height, int staffNo, TQMouseEvent*, NotationElement*); /** * Called when a mouse press occurred on a non-notation element */ - void slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *i); /** * Called when a mouse press occurred on a QCanvasText */ - void slotTextItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *i); - void slotMouseMoved(QMouseEvent*); - void slotMouseReleased(QMouseEvent*); + void slotMouseMoved(TQMouseEvent*); + void slotMouseReleased(TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -651,7 +651,7 @@ public slots: * * @see NotationCanvasView#hoveredOverNoteChange() */ - void slotHoveredOverNoteChanged(const QString&); + void slotHoveredOverNoteChanged(const TQString&); /** * Called when the mouse cursor moves over a note which is at a @@ -755,7 +755,7 @@ public slots: void slotChangeFont(std::string newFont, int newSize); /// Changes the font of the staffs on the view - void slotChangeFont(const QString &newFont); + void slotChangeFont(const TQString &newFont); /// Changes the font size of the staffs on the view void slotChangeFontSize(int newSize); @@ -764,7 +764,7 @@ public slots: void slotChangeFontSizeFromAction(); /// Changes the font size of the staffs on the view to the nth size in the available size list - void slotChangeFontSizeFromStringValue(const QString&); + void slotChangeFontSizeFromStringValue(const TQString&); /// Changes to the next font size up void slotZoomIn(); @@ -776,7 +776,7 @@ public slots: void slotChangeSpacing(int newSpacing); /// Changes the hlayout spacing of the staffs on the view - void slotChangeSpacingFromStringValue(const QString&); + void slotChangeSpacingFromStringValue(const TQString&); /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); @@ -802,8 +802,8 @@ public slots: /// A timer set when a note-on event was received has elapsed void slotInsertableTimerElapsed(); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); /// Do on-demand rendering for a region. void slotCheckRendered(double cx0, double cx1); @@ -811,7 +811,7 @@ public slots: /// Do some background rendering work. void slotRenderSomething(); - void slotSetOperationNameAndStatus(QString); + void slotSetOperationNameAndStatus(TQString); // Update notation view based on track/staff name change void slotUpdateStaffName(); @@ -849,23 +849,23 @@ signals: /// progress Report void setProgress(int); void incrementProgress(int); - void setOperationName(QString); + void setOperationName(TQString); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void renderComplete(); void editTimeSignature(timeT); - void editMetadata(QString); + void editMetadata(TQString); void editTriggerSegment(int); - void staffLabelChanged(TrackId id, QString label); + void staffLabelChanged(TrackId id, TQString label); protected: - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); /** * init the action maps for notes, marks etc @@ -937,7 +937,7 @@ protected: * If \a force point to a bool, then the bool's value * is used to show/hide the toolbar. */ - void toggleNamedToolBar(const QString& toolBarName, bool* force = 0); + void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); /// Calls all the relevant preparse and layout methods virtual bool applyLayout(int staffNo = -1, @@ -957,13 +957,13 @@ protected: * Override from EditView * @see EditView#getViewSize */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Override from EditView * @see EditView#setViewSize */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); /** * Set the note pixmap factory @@ -1020,39 +1020,39 @@ protected: NotationProperties m_properties; /// Displayed in the status bar, shows number of events selected - QLabel *m_selectionCounter; + TQLabel *m_selectionCounter; /// Displayed in the status bar, shows insertion mode - QLabel *m_insertModeLabel; + TQLabel *m_insertModeLabel; /// Displayed in the status bar, shows when annotations are hidden - QLabel *m_annotationsLabel; + TQLabel *m_annotationsLabel; /// Displayed in the status bar, shows when LilyPond directives are hidden - QLabel *m_lilyPondDirectivesLabel; + TQLabel *m_lilyPondDirectivesLabel; /// Displayed in the status bar, shows progress of current operation ProgressBar *m_progressBar; /// Displayed in the status bar, holds the pixmap of the current note - QLabel* m_currentNotePixmap; + TQLabel* m_currentNotePixmap; /// Displayed in the status bar, shows the pitch the cursor is at - QLabel* m_hoveredOverNoteName; + TQLabel* m_hoveredOverNoteName; /// Displayed in the status bar, shows the absolute time the cursor is at - QLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverAbsoluteTime; std::vector<NotationStaff*> m_staffs; int m_currentStaff; int m_lastFinishingStaff; - QCanvasItem *m_title; - QCanvasItem *m_subtitle; - QCanvasItem *m_composer; - QCanvasItem *m_copyright; - std::vector<QCanvasItem *> m_pages; - std::vector<QCanvasItem *> m_pageNumbers; + TQCanvasItem *m_title; + TQCanvasItem *m_subtitle; + TQCanvasItem *m_composer; + TQCanvasItem *m_copyright; + std::vector<TQCanvasItem *> m_pages; + std::vector<TQCanvasItem *> m_pageNumbers; timeT m_insertionTime; enum DeferredCursorMoveType { @@ -1064,7 +1064,7 @@ protected: DeferredCursorMoveType m_deferredCursorMove; double m_deferredCursorScrollToX; - QString m_lastNoteAction; + TQString m_lastNoteAction; std::string m_fontName; int m_fontSize; @@ -1077,20 +1077,20 @@ protected: NotationVLayout* m_vlayout; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; RawNoteRuler *m_rawNoteRuler; bool m_annotationsVisible; bool m_lilyPondDirectivesVisible; KAction* m_selectDefaultNote; - typedef QMap<QString, NoteActionData *> NoteActionDataMap; + typedef TQMap<TQString, NoteActionData *> NoteActionDataMap; static NoteActionDataMap* m_noteActionDataMap; - typedef QMap<QString, NoteChangeActionData *> NoteChangeActionDataMap; + typedef TQMap<TQString, NoteChangeActionData *> NoteChangeActionDataMap; static NoteChangeActionDataMap* m_noteChangeActionDataMap; - typedef QMap<QString, MarkActionData *> MarkActionDataMap; + typedef TQMap<TQString, MarkActionData *> MarkActionDataMap; static MarkActionDataMap *m_markActionDataMap; KComboBox *m_fontCombo; @@ -1098,7 +1098,7 @@ protected: KComboBox *m_spacingCombo; KActionMenu *m_fontSizeActionMenu; ScrollBoxDialog *m_pannerDialog; - QTimer *m_renderTimer; + TQTimer *m_renderTimer; bool m_playTracking; @@ -1119,7 +1119,7 @@ protected: int m_showHeadersGroup; QDeferScrollView * m_headersGroupView; HeadersGroup * m_headersGroup; - QFrame * m_headersTopFrame; + TQFrame * m_headersTopFrame; KAction * m_showHeadersMenuEntry; diff --git a/src/gui/editors/notation/NoteCharacter.cpp b/src/gui/editors/notation/NoteCharacter.cpp index fdcb578..2fcff18 100644 --- a/src/gui/editors/notation/NoteCharacter.cpp +++ b/src/gui/editors/notation/NoteCharacter.cpp @@ -25,11 +25,11 @@ #include "NoteCharacter.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qcanvas.h> -#include <qbitmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqcanvas.h> +#include <tqbitmap.h> namespace Rosegarden @@ -37,20 +37,20 @@ namespace Rosegarden NoteCharacter::NoteCharacter() : m_hotspot(0, 0), - m_pixmap(new QPixmap()), + m_pixmap(new TQPixmap()), m_rep(0) {} -NoteCharacter::NoteCharacter(QPixmap pixmap, - QPoint hotspot, NoteCharacterDrawRep *rep) : +NoteCharacter::NoteCharacter(TQPixmap pixmap, + TQPoint hotspot, NoteCharacterDrawRep *rep) : m_hotspot(hotspot), - m_pixmap(new QPixmap(pixmap)), + m_pixmap(new TQPixmap(pixmap)), m_rep(rep) {} NoteCharacter::NoteCharacter(const NoteCharacter &c) : m_hotspot(c.m_hotspot), - m_pixmap(new QPixmap(*c.m_pixmap)), + m_pixmap(new TQPixmap(*c.m_pixmap)), m_rep(c.m_rep) { // nothing else @@ -62,7 +62,7 @@ NoteCharacter::operator=(const NoteCharacter &c) if (&c == this) return * this; m_hotspot = c.m_hotspot; - m_pixmap = new QPixmap(*c.m_pixmap); + m_pixmap = new TQPixmap(*c.m_pixmap); m_rep = c.m_rep; return *this; } @@ -90,20 +90,20 @@ NoteCharacter::getHotspot() const return m_hotspot; } -QPixmap * +TQPixmap * NoteCharacter::getPixmap() const { return m_pixmap; } -QCanvasPixmap * +TQCanvasPixmap * NoteCharacter::getCanvasPixmap() const { - return new QCanvasPixmap(*m_pixmap, m_hotspot); + return new TQCanvasPixmap(*m_pixmap, m_hotspot); } void -NoteCharacter::draw(QPainter *painter, int x, int y) const +NoteCharacter::draw(TQPainter *painter, int x, int y) const { if (!m_rep) { @@ -114,7 +114,7 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const NoteCharacterDrawRep a(m_rep->size()); for (unsigned int i = 0; i < m_rep->size(); ++i) { - QPoint p(m_rep->point(i)); + TQPoint p(m_rep->point(i)); a.setPoint(i, p.x() + x, p.y() + y); } @@ -123,10 +123,10 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const } void -NoteCharacter::drawMask(QPainter *painter, int x, int y) const +NoteCharacter::drawMask(TQPainter *painter, int x, int y) const { - if (!m_rep && m_pixmap->mask()) { - painter->drawPixmap(x, y, *(m_pixmap->mask())); + if (!m_rep && m_pixmap->tqmask()) { + painter->drawPixmap(x, y, *(m_pixmap->tqmask())); } } diff --git a/src/gui/editors/notation/NoteCharacter.h b/src/gui/editors/notation/NoteCharacter.h index bc9359e..3b27e87 100644 --- a/src/gui/editors/notation/NoteCharacter.h +++ b/src/gui/editors/notation/NoteCharacter.h @@ -26,13 +26,13 @@ #ifndef _RG_NOTECHARACTER_H_ #define _RG_NOTECHARACTER_H_ -#include <qpixmap.h> -#include <qpoint.h> -#include <qpointarray.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpointarray.h> -class QPainter; -class QCanvasPixmap; +class TQPainter; +class TQCanvasPixmap; namespace Rosegarden { @@ -40,13 +40,13 @@ namespace Rosegarden class NoteCharacterDrawRep : public QPointArray { public: - NoteCharacterDrawRep(int size = 0) : QPointArray(size) { } + NoteCharacterDrawRep(int size = 0) : TQPointArray(size) { } }; /** * NoteCharacter knows how to draw a character from a font. It may be - * optimised for screen (using QPixmap underneath to produce + * optimised for screen (using TQPixmap underneath to produce * low-resolution colour or greyscale glyphs) or printer (using some * internal representation to draw in high-resolution monochrome on a * print device). You can use screen characters on a printer and vice @@ -67,20 +67,20 @@ public: int getWidth() const; int getHeight() const; - QPoint getHotspot() const; + TQPoint getHotspot() const; - QPixmap *getPixmap() const; - QCanvasPixmap *getCanvasPixmap() const; + TQPixmap *getPixmap() const; + TQCanvasPixmap *getCanvasPixmap() const; - void draw(QPainter *painter, int x, int y) const; - void drawMask(QPainter *painter, int x, int y) const; + void draw(TQPainter *painter, int x, int y) const; + void drawMask(TQPainter *painter, int x, int y) const; private: friend class NoteFont; - NoteCharacter(QPixmap pixmap, QPoint hotspot, NoteCharacterDrawRep *rep); + NoteCharacter(TQPixmap pixmap, TQPoint hotspot, NoteCharacterDrawRep *rep); - QPoint m_hotspot; - QPixmap *m_pixmap; // I own this + TQPoint m_hotspot; + TQPixmap *m_pixmap; // I own this NoteCharacterDrawRep *m_rep; // I don't own this, it's a reference to a static in the NoteFont }; diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp index 95746c3..3a0ea18 100644 --- a/src/gui/editors/notation/NoteFont.cpp +++ b/src/gui/editors/notation/NoteFont.cpp @@ -32,14 +32,14 @@ #include "NoteCharacter.h" #include "NoteFontMap.h" #include "SystemFont.h" -#include <qbitmap.h> -#include <qgarray.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqbitmap.h> +#include <tqgarray.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -48,7 +48,7 @@ namespace Rosegarden NoteFont::FontPixmapMap *NoteFont::m_fontPixmapMap = 0; NoteFont::DrawRepMap *NoteFont::m_drawRepMap = 0; -QPixmap *NoteFont::m_blankPixmap = 0; +TQPixmap *NoteFont::m_blankPixmap = 0; NoteFont::NoteFont(std::string fontName, int size) : @@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) : if (size > 0) { if (sizes.find(size) == sizes.end()) { - throw BadNoteFont(qstrtostr(QString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); + throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); } else { m_size = size; } @@ -79,13 +79,13 @@ NoteFont::NoteFont(std::string fontName, int size) : } if (m_blankPixmap == 0) { - m_blankPixmap = new QPixmap(10, 10); - m_blankPixmap->setMask(QBitmap(10, 10, TRUE)); + m_blankPixmap = new TQPixmap(10, 10); + m_blankPixmap->setMask(TQBitmap(10, 10, TRUE)); } // Locate our font's pixmap map in the font map, create if necessary - std::string fontKey = qstrtostr(QString("__%1__%2__") + std::string fontKey = qstrtostr(TQString("__%1__%2__") .arg(strtoqstr(m_fontMap.getName())) .arg(m_size)); @@ -146,7 +146,7 @@ NoteFont::getLegerLineThickness(unsigned int &thickness) const } bool -NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const +NoteFont::lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -167,7 +167,7 @@ NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const void NoteFont::add -(CharName charName, bool inverted, QPixmap *pixmap) const +(CharName charName, bool inverted, TQPixmap *pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -188,7 +188,7 @@ NoteFont::add } NoteCharacterDrawRep * -NoteFont::lookupDrawRep(QPixmap *pixmap) const +NoteFont::lookupDrawRep(TQPixmap *pixmap) const { if (!m_drawRepMap) m_drawRepMap = new DrawRepMap(); @@ -199,7 +199,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } else { - QImage image = pixmap->convertToImage(); + TQImage image = pixmap->convertToImage(); if (image.isNull()) return 0; @@ -220,7 +220,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const bool pixel = false; if (xi < image.width()) { - if (image.bitOrder() == QImage::LittleEndian) { + if (image.bitOrder() == TQImage::LittleEndian) { if (*(line + (xi >> 3)) & 1 << (xi & 7)) pixel = true; } else { @@ -231,7 +231,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const if (!pixel) { if (startx < xi) { - a->resize(a->size() + 2, QGArray::SpeedOptim); + a->resize(a->size() + 2, TQGArray::SpeedOptim); a->setPoint(a->size() - 2, startx, yi); a->setPoint(a->size() - 1, xi - 1, yi); } @@ -246,9 +246,9 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } bool -NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const +NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const { - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -263,7 +263,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (inverted && !m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -281,11 +281,11 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const NOTATION_DEBUG << "NoteFont::getPixmap: Loading \"" << src << "\"" << endl; - found = new QPixmap(strtoqstr(src)); + found = new TQPixmap(strtoqstr(src)); if (!found->isNull()) { - if (found->mask() == 0) { + if (found->tqmask() == 0) { std::cerr << "NoteFont::getPixmap: Warning: No automatic mask " << "for character \"" << charName << "\"" << (inverted ? " (inverted)" : "") << " in font \"" @@ -332,7 +332,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (!inverted && m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -351,7 +351,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const m_fontMap.getStrategy(m_size, charName); bool success; - found = new QPixmap(systemFont->renderChar(charName, + found = new TQPixmap(systemFont->renderChar(charName, glyph, code + charBase, strategy, @@ -374,12 +374,12 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const } bool -NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap, int hue, int minValue, bool inverted) const { CharName charName(getNameWithColour(baseCharName, hue)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -391,7 +391,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -408,12 +408,12 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } bool -NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap, bool inverted) const { CharName charName(getNameShaded(baseCharName)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -425,7 +425,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -434,7 +434,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, return false; } - found = new QPixmap(PixmapFunctions::shadePixmap(basePixmap)); + found = new TQPixmap(PixmapFunctions::shadePixmap(basePixmap)); add(charName, inverted, found); pixmap = *found; return ok; @@ -443,19 +443,19 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, CharName NoteFont::getNameWithColour(CharName base, int hue) const { - return qstrtostr(QString("%1__%2").arg(hue).arg(strtoqstr(base))); + return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base))); } CharName NoteFont::getNameShaded(CharName base) const { - return qstrtostr(QString("shaded__%1").arg(strtoqstr(base))); + return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base))); } bool NoteFont::getDimensions(CharName charName, int &x, int &y, bool inverted) const { - QPixmap pixmap; + TQPixmap pixmap; bool ok = getPixmap(charName, pixmap, inverted); x = pixmap.width(); y = pixmap.height(); @@ -502,7 +502,7 @@ NoteFont::getHotspot(CharName charName, bool inverted) const { int x, y; (void)getHotspot(charName, x, y, inverted); - return QPoint(x, y); + return TQPoint(x, y); } bool @@ -511,7 +511,7 @@ NoteFont::getCharacter(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getPixmap(charName, pixmap, inverted)) return false; @@ -524,7 +524,7 @@ NoteFont::getCharacter(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; bool found = lookup(charName, inverted, pmapptr); NoteCharacterDrawRep *rep = 0; @@ -556,7 +556,7 @@ NoteFont::getCharacterColoured(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getColouredPixmap(charName, pixmap, hue, minValue, inverted)) { return false; } @@ -572,7 +572,7 @@ NoteFont::getCharacterColoured(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameWithColour(charName, hue)); bool found = lookup(cCharName, inverted, pmapptr); @@ -605,7 +605,7 @@ NoteFont::getCharacterShaded(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getShadedPixmap(charName, pixmap, inverted)) { return false; } @@ -621,7 +621,7 @@ NoteFont::getCharacterShaded(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameShaded(charName)); bool found = lookup(cCharName, inverted, pmapptr); diff --git a/src/gui/editors/notation/NoteFont.h b/src/gui/editors/notation/NoteFont.h index 81a3b19..5bdef07 100644 --- a/src/gui/editors/notation/NoteFont.h +++ b/src/gui/editors/notation/NoteFont.h @@ -32,12 +32,12 @@ #include "NoteFontMap.h" #include <set> #include <string> -#include <qpoint.h> +#include <tqpoint.h> #include <utility> #include "gui/editors/notation/NoteCharacterNames.h" -class QPixmap; +class TQPixmap; class PixmapMap; class NoteCharacterDrawRep; class FontPixmapMap; @@ -130,39 +130,39 @@ public: bool inverted = false) const; /// Ignores problems, returns centre-left of pixmap if necessary - QPoint getHotspot(CharName charName, bool inverted = false) const; + TQPoint getHotspot(CharName charName, bool inverted = false) const; private: /// Returns false + blank pixmap if it can't find the right one - bool getPixmap(CharName charName, QPixmap &pixmap, + bool getPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getColouredPixmap(CharName charName, QPixmap &pixmap, + bool getColouredPixmap(CharName charName, TQPixmap &pixmap, int hue, int minValue, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getShadedPixmap(CharName charName, QPixmap &pixmap, + bool getShadedPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; friend class NoteFontFactory; NoteFont(std::string fontName, int size = 0); std::set<int> getSizes() const { return m_fontMap.getSizes(); } - bool lookup(CharName charName, bool inverted, QPixmap *&pixmap) const; - void add(CharName charName, bool inverted, QPixmap *pixmap) const; + bool lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const; + void add(CharName charName, bool inverted, TQPixmap *pixmap) const; - NoteCharacterDrawRep *lookupDrawRep(QPixmap *pixmap) const; + NoteCharacterDrawRep *lookupDrawRep(TQPixmap *pixmap) const; CharName getNameWithColour(CharName origName, int hue) const; CharName getNameShaded(CharName origName) const; - typedef std::pair<QPixmap *, QPixmap *> PixmapPair; + typedef std::pair<TQPixmap *, TQPixmap *> PixmapPair; typedef std::map<CharName, PixmapPair> PixmapMap; typedef std::map<std::string, PixmapMap *> FontPixmapMap; - typedef std::map<QPixmap *, NoteCharacterDrawRep *> DrawRepMap; + typedef std::map<TQPixmap *, NoteCharacterDrawRep *> DrawRepMap; //--------------- Data members --------------------------------- @@ -174,7 +174,7 @@ private: static FontPixmapMap *m_fontPixmapMap; static DrawRepMap *m_drawRepMap; - static QPixmap *m_blankPixmap; + static TQPixmap *m_blankPixmap; }; diff --git a/src/gui/editors/notation/NoteFontFactory.cpp b/src/gui/editors/notation/NoteFontFactory.cpp index 2decce4..80e0772 100644 --- a/src/gui/editors/notation/NoteFontFactory.cpp +++ b/src/gui/editors/notation/NoteFontFactory.cpp @@ -38,9 +38,9 @@ #include <kconfig.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qdir.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <algorithm> @@ -60,31 +60,31 @@ NoteFontFactory::getFontNames(bool forceRescan) KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); - QString fontNameList = ""; + TQString fontNameList = ""; if (!forceRescan) { fontNameList = config->readEntry("notefontlist"); } NOTATION_DEBUG << "NoteFontFactory::getFontNames: read from cache: " << fontNameList << endl; - QStringList names = QStringList::split(",", fontNameList); + TQStringList names = TQStringList::split(",", fontNameList); if (names.empty()) { NOTATION_DEBUG << "NoteFontFactory::getFontNames: No names available, rescanning..." << endl; - QString mappingDir = + TQString mappingDir = KGlobal::dirs()->findResource("appdata", "fonts/mappings/"); - QDir dir(mappingDir); + TQDir dir(mappingDir); if (!dir.exists()) { std::cerr << "NoteFontFactory::getFontNames: mapping directory \"" << mappingDir << "\" not found" << std::endl; return m_fontNames; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4).lower() == ".xml") { @@ -103,9 +103,9 @@ NoteFontFactory::getFontNames(bool forceRescan) } } - QString savedNames = ""; + TQString savedNames = ""; - for (QStringList::Iterator i = names.begin(); i != names.end(); ++i) { + for (TQStringList::Iterator i = names.begin(); i != names.end(); ++i) { m_fontNames.insert(qstrtostr(*i)); if (i != names.begin()) savedNames += ","; @@ -197,7 +197,7 @@ NoteFontFactory::getDefaultFontName() else if (fontNames.size() > 0) defaultFont = *fontNames.begin(); else { - QString message = i18n("Can't obtain a default font -- no fonts found"); + TQString message = i18n("Can't obtain a default font -- no fonts found"); KStartupLogo::hideIfStillThere(); KMessageBox::error(0, message); throw NoFontsAvailable(qstrtostr(message)); diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp index e11c126..9640087 100644 --- a/src/gui/editors/notation/NoteFontMap.cpp +++ b/src/gui/editors/notation/NoteFontMap.cpp @@ -32,12 +32,12 @@ #include "base/Exception.h" #include "SystemFont.h" #include <kglobal.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpixmap.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpixmap.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -54,23 +54,23 @@ NoteFontMap::NoteFontMap(std::string name) : { m_fontDirectory = KGlobal::dirs()->findResource("appdata", "fonts/"); - QString mapFileName; + TQString mapFileName; - QString mapFileMixedName = QString("%1/mappings/%2.xml") + TQString mapFileMixedName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(strtoqstr(name)); - QFileInfo mapFileMixedInfo(mapFileMixedName); + TQFileInfo mapFileMixedInfo(mapFileMixedName); if (!mapFileMixedInfo.isReadable()) { - QString lowerName = strtoqstr(name).lower(); - lowerName.replace(QRegExp(" "), "_"); - QString mapFileLowerName = QString("%1/mappings/%2.xml") + TQString lowerName = strtoqstr(name).lower(); + lowerName.replace(TQRegExp(" "), "_"); + TQString mapFileLowerName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(lowerName); - QFileInfo mapFileLowerInfo(mapFileLowerName); + TQFileInfo mapFileLowerInfo(mapFileLowerName); if (!mapFileLowerInfo.isReadable()) { if (mapFileLowerName != mapFileMixedName) { @@ -89,10 +89,10 @@ NoteFontMap::NoteFontMap(std::string name) : mapFileName = mapFileMixedName; } - QFile mapFile(mapFileName); + TQFile mapFile(mapFileName); - QXmlInputSource source(mapFile); - QXmlSimpleReader reader; + TQXmlInputSource source(mapFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -112,7 +112,7 @@ NoteFontMap::~NoteFontMap() } bool -NoteFontMap::characters(QString &chars) +NoteFontMap::characters(TQString &chars) { if (!m_characterDestination) return true; @@ -131,11 +131,11 @@ NoteFontMap::toSize(int baseSize, double factor, bool limitAtOne) } bool -NoteFontMap::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteFontMap::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); m_characterDestination = 0; // The element names are actually unique within the whole file; @@ -144,7 +144,7 @@ NoteFontMap::startElement(const QString &, const QString &, if (lcName == "rosegarden-font-encoding") { - QString s; + TQString s; s = attributes.value("name"); if (s) { @@ -154,7 +154,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-information") { - QString s; + TQString s; s = attributes.value("origin"); if (s) @@ -185,7 +185,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-size") { - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of font-size"; return false; @@ -247,7 +247,7 @@ NoteFontMap::startElement(const QString &, const QString &, double legerLineThickness = -1.0; double stemThickness = -1.0; - QString s; + TQString s; s = attributes.value("font-height"); if (s) @@ -334,7 +334,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "src-directory") { - QString d = attributes.value("name"); + TQString d = attributes.value("name"); if (!d) { m_errorString = "name is a required attribute of src-directory"; return false; @@ -346,7 +346,7 @@ NoteFontMap::startElement(const QString &, const QString &, int bn = 0, fn = 0; bool ok; - QString base = attributes.value("base"); + TQString base = attributes.value("base"); if (!base) { m_errorString = "base is a required attribute of codebase"; return false; @@ -354,12 +354,12 @@ NoteFontMap::startElement(const QString &, const QString &, bn = base.toInt(&ok); if (!ok || bn < 0) { m_errorString = - QString("invalid base attribute \"%1\" (must be integer >= 0)"). + TQString("invalid base attribute \"%1\" (must be integer >= 0)"). arg(base); return false; } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (!fontId) { m_errorString = "font-id is a required attribute of codebase"; return false; @@ -367,7 +367,7 @@ NoteFontMap::startElement(const QString &, const QString &, fn = fontId.stripWhiteSpace().toInt(&ok); if (!ok || fn < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -376,16 +376,16 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "symbol") { - QString symbolName = attributes.value("name"); + TQString symbolName = attributes.value("name"); if (!symbolName) { m_errorString = "name is a required attribute of symbol"; return false; } SymbolData symbolData; - QString src = attributes.value("src"); - QString code = attributes.value("code"); - QString glyph = attributes.value("glyph"); + TQString src = attributes.value("src"); + TQString code = attributes.value("code"); + TQString glyph = attributes.value("glyph"); int icode = -1; bool ok = false; @@ -393,7 +393,7 @@ NoteFontMap::startElement(const QString &, const QString &, icode = code.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid code attribute \"%1\" (must be integer >= 0)"). arg(code); return false; } @@ -406,7 +406,7 @@ NoteFontMap::startElement(const QString &, const QString &, iglyph = glyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid glyph attribute \"%1\" (must be integer >= 0)"). arg(glyph); return false; } @@ -420,40 +420,40 @@ NoteFontMap::startElement(const QString &, const QString &, if (src) symbolData.setSrc(qstrtostr(src)); - QString inversionSrc = attributes.value("inversion-src"); + TQString inversionSrc = attributes.value("inversion-src"); if (inversionSrc) symbolData.setInversionSrc(qstrtostr(inversionSrc)); - QString inversionCode = attributes.value("inversion-code"); + TQString inversionCode = attributes.value("inversion-code"); if (inversionCode) { icode = inversionCode.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). arg(inversionCode); return false; } symbolData.setInversionCode(icode); } - QString inversionGlyph = attributes.value("inversion-glyph"); + TQString inversionGlyph = attributes.value("inversion-glyph"); if (inversionGlyph) { iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). arg(inversionGlyph); return false; } symbolData.setInversionGlyph(iglyph); } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (fontId) { int n = fontId.stripWhiteSpace().toInt(&ok); if (!ok || n < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -466,7 +466,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "hotspot") { - QString s = attributes.value("name"); + TQString s = attributes.value("name"); if (!s) { m_errorString = "name is a required attribute of hotspot"; return false; @@ -480,7 +480,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); double x = -1.0; if (s) x = qstrtodouble(s); @@ -507,7 +507,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); int x = 0; if (s) x = s.toInt(); @@ -532,7 +532,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of when"; return false; @@ -563,14 +563,14 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-requirement") { - QString id = attributes.value("font-id"); + TQString id = attributes.value("font-id"); int n = -1; bool ok = false; if (id) { n = id.stripWhiteSpace().toInt(&ok); if (!ok) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(id); return false; } @@ -579,8 +579,8 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString name = attributes.value("name"); - QString names = attributes.value("names"); + TQString name = attributes.value("name"); + TQString names = attributes.value("names"); if (name) { if (names) { @@ -595,15 +595,15 @@ NoteFontMap::startElement(const QString &, const QString &, m_systemFontNames[n] = name; delete font; } else { - std::cerr << QString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; + std::cerr << TQString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; m_ok = false; } } else if (names) { bool have = false; - QStringList list = QStringList::split(",", names, false); - for (QStringList::Iterator i = list.begin(); i != list.end(); ++i) { + TQStringList list = TQStringList::split(",", names, false); + for (TQStringList::Iterator i = list.begin(); i != list.end(); ++i) { SystemFont *font = SystemFont::loadSystemFont (SystemFontSpec(*i, 12)); if (font) { @@ -614,7 +614,7 @@ NoteFontMap::startElement(const QString &, const QString &, } } if (!have) { - std::cerr << QString("Warning: Unable to load any of the fonts in \"%1\""). + std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). arg(names) << std::endl; m_ok = false; } @@ -624,7 +624,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("strategy").lower(); + TQString s = attributes.value("strategy").lower(); SystemFont::Strategy strategy = SystemFont::PreferGlyphs; if (s) { @@ -654,25 +654,25 @@ NoteFontMap::startElement(const QString &, const QString &, } bool -NoteFontMap::error(const QXmlParseException& exception) +NoteFontMap::error(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::error(exception); + return TQXmlDefaultHandler::error(exception); } bool -NoteFontMap::fatalError(const QXmlParseException& exception) +NoteFontMap::fatalError(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::fatalError(exception); + return TQXmlDefaultHandler::fatalError(exception); } std::set<int> @@ -704,23 +704,23 @@ NoteFontMap::getCharNames() const bool NoteFontMap::checkFile(int size, std::string &src) const { - QString pixmapFileMixedName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileMixedName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory)) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileMixedInfo(pixmapFileMixedName); + TQFileInfo pixmapFileMixedInfo(pixmapFileMixedName); if (!pixmapFileMixedInfo.isReadable()) { - QString pixmapFileLowerName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileLowerName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory).lower()) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileLowerInfo(pixmapFileLowerName); + TQFileInfo pixmapFileLowerInfo(pixmapFileLowerName); if (!pixmapFileLowerInfo.isReadable()) { if (pixmapFileMixedName != pixmapFileLowerName) { @@ -803,7 +803,7 @@ const SystemFontNameMap::const_iterator fni = m_systemFontNames.find(fontId); if (fontId < 0 || fni == m_systemFontNames.end()) return false; - QString fontName = fni->second; + TQString fontName = fni->second; CharBaseMap::const_iterator bi = m_bases.find(fontId); if (bi == m_bases.end()) @@ -994,7 +994,7 @@ NoteFontMap::HotspotData::getHotspot(int size, int width, int height, QStringList NoteFontMap::getSystemFontNames() const { - QStringList names; + TQStringList names; for (SystemFontNameMap::const_iterator i = m_systemFontNames.begin(); i != m_systemFontNames.end(); ++i) { names.append(i->second); diff --git a/src/gui/editors/notation/NoteFontMap.h b/src/gui/editors/notation/NoteFontMap.h index 119db76..52d87fa 100644 --- a/src/gui/editors/notation/NoteFontMap.h +++ b/src/gui/editors/notation/NoteFontMap.h @@ -31,15 +31,15 @@ #include <set> #include <string> #include "SystemFont.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <utility> -#include <qxml.h> +#include <tqxml.h> #include "gui/editors/notation/NoteCharacterNames.h" -class QXmlParseException; -class QXmlAttributes; +class TQXmlParseException; +class TQXmlAttributes; namespace Rosegarden @@ -97,18 +97,18 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); - virtual bool characters(QString &); + virtual bool characters(TQString &); - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); void dump() const; // Not for general use, but very handy for diagnostic display - QStringList getSystemFontNames() const; + TQStringList getSystemFontNames() const; // want this to be private, but need access from HotspotData static int toSize(int baseSize, double factor, bool limitAtOne); @@ -300,7 +300,7 @@ private: typedef std::map<int, SizeData> SizeDataMap; SizeDataMap m_sizes; - typedef std::map<int, QString> SystemFontNameMap; + typedef std::map<int, TQString> SystemFontNameMap; SystemFontNameMap m_systemFontNames; typedef std::map<int, SystemFont::Strategy> SystemFontStrategyMap; @@ -316,10 +316,10 @@ private: bool m_expectingCharacters; std::string *m_characterDestination; std::string m_hotspotCharName; - QString m_errorString; + TQString m_errorString; bool checkFile(int size, std::string &src) const; - QString m_fontDirectory; + TQString m_fontDirectory; bool m_ok; }; diff --git a/src/gui/editors/notation/NoteFontViewer.cpp b/src/gui/editors/notation/NoteFontViewer.cpp index 81f07e9..d3dc2a3 100644 --- a/src/gui/editors/notation/NoteFontViewer.cpp +++ b/src/gui/editors/notation/NoteFontViewer.cpp @@ -30,11 +30,11 @@ #include <kcombobox.h> #include <kdialogbase.h> #include <ktoolbar.h> -#include <qlabel.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -50,7 +50,7 @@ NoteFontViewer::slotViewChanged(int i) for (int r = 0; r < 256; ++r) { if (m_frame->hasRow(r)) { - m_rows->insertItem(QString("%1").arg(r)); + m_rows->insertItem(TQString("%1").arg(r)); if (firstRow < 0) firstRow = r; } @@ -66,7 +66,7 @@ NoteFontViewer::slotViewChanged(int i) } void -NoteFontViewer::slotRowChanged(const QString &s) +NoteFontViewer::slotRowChanged(const TQString &s) { bool ok; int i = s.toInt(&ok); @@ -75,48 +75,48 @@ NoteFontViewer::slotRowChanged(const QString &s) } void -NoteFontViewer::slotFontChanged(const QString &s) +NoteFontViewer::slotFontChanged(const TQString &s) { m_frame->setFont(s); slotViewChanged(m_view->currentItem()); } -NoteFontViewer::NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList fontNames, int pixelSize) : +NoteFontViewer::NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList fontNames, int pixelSize) : KDialogBase(parent, 0, true, i18n("Note Font Viewer: %1").arg(noteFontName), Close) { - QVBox *box = makeVBoxMainWidget(); + TQVBox *box = makeVBoxMainWidget(); KToolBar* controls = new KToolBar(box); controls->setMargin(3); - (void) new QLabel(i18n(" Component: "), controls); + (void) new TQLabel(i18n(" Component: "), controls); m_font = new KComboBox(controls); - for (QStringList::iterator i = fontNames.begin(); i != fontNames.end(); + for (TQStringList::iterator i = fontNames.begin(); i != fontNames.end(); ++i) { m_font->insertItem(*i); } - (void) new QLabel(i18n(" View: "), controls); + (void) new TQLabel(i18n(" View: "), controls); m_view = new KComboBox(controls); m_view->insertItem(i18n("Glyphs")); m_view->insertItem(i18n("Codes")); - (void) new QLabel(i18n(" Page: "), controls); + (void) new TQLabel(i18n(" Page: "), controls); m_rows = new KComboBox(controls); m_frame = new FontViewFrame(pixelSize, box); - connect(m_font, SIGNAL(activated(const QString &)), - this, SLOT(slotFontChanged(const QString &))); + connect(m_font, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotFontChanged(const TQString &))); - connect(m_view, SIGNAL(activated(int)), - this, SLOT(slotViewChanged(int))); + connect(m_view, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotViewChanged(int))); - connect(m_rows, SIGNAL(activated(const QString &)), - this, SLOT(slotRowChanged(const QString &))); + connect(m_rows, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotRowChanged(const TQString &))); slotFontChanged(m_font->currentText()); } diff --git a/src/gui/editors/notation/NoteFontViewer.h b/src/gui/editors/notation/NoteFontViewer.h index 31c8613..b31df03 100644 --- a/src/gui/editors/notation/NoteFontViewer.h +++ b/src/gui/editors/notation/NoteFontViewer.h @@ -27,11 +27,11 @@ #define _RG_NOTEFONTVIEWER_H_ #include <kdialogbase.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> -class QWidget; +class TQWidget; class KComboBox; @@ -46,13 +46,13 @@ class NoteFontViewer : public KDialogBase Q_OBJECT public: - NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList systemFontNames, int pixelSize); + NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList systemFontNames, int pixelSize); protected slots: - void slotFontChanged(const QString &); + void slotFontChanged(const TQString &); void slotViewChanged(int); - void slotRowChanged(const QString &); + void slotRowChanged(const TQString &); private: KComboBox *m_font; diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp index 66adafe..c2533e5 100644 --- a/src/gui/editors/notation/NoteInserter.cpp +++ b/src/gui/editors/notation/NoteInserter.cpp @@ -52,9 +52,9 @@ #include <kaction.h> #include <kcommand.h> #include <kconfig.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -69,7 +69,7 @@ NoteInserter::NoteInserter(NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - QIconSet icon; + TQIconSet icon; KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -80,7 +80,7 @@ NoteInserter::NoteInserter(NotationView* view) KToggleAction *autoBeamAction = new KToggleAction(i18n("Auto-Beam when appropriate"), 0, this, - SLOT(slotToggleAutoBeam()), actionCollection(), + TQT_SLOT(slotToggleAutoBeam()), actionCollection(), "toggle_auto_beam"); autoBeamAction->setChecked(m_autoBeam); @@ -101,33 +101,33 @@ NoteInserter::NoteInserter(NotationView* view) (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-crotchet"))); new KToggleAction(i18n("Dotted note"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("rest-crotchet"))); new KAction(i18n("Switch to Inserting Rests"), icon, 0, this, - SLOT(slotRestsSelected()), actionCollection(), + TQT_SLOT(slotRestsSelected()), actionCollection(), "rests"); createMenu("noteinserter.rc"); - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } -NoteInserter::NoteInserter(const QString& menuName, NotationView* view) +NoteInserter::NoteInserter(const TQString& menuName, NotationView* view) : NotationTool(menuName, view), m_noteType(Note::Quaver), m_noteDots(0), @@ -137,8 +137,8 @@ NoteInserter::NoteInserter(const QString& menuName, NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } NoteInserter::~NoteInserter() @@ -155,7 +155,7 @@ void NoteInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -166,7 +166,7 @@ NoteInserter::handleLeftButtonPress(timeT, int NoteInserter::handleMouseMove(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (m_clickHappened) { computeLocationAndPreview(e); @@ -178,7 +178,7 @@ NoteInserter::handleMouseMove(timeT, void NoteInserter::handleMouseRelease(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_clickHappened) return ; @@ -262,7 +262,7 @@ NoteInserter::insertNote(Segment &segment, timeT insertionTime, } bool -NoteInserter::computeLocationAndPreview(QMouseEvent *e) +NoteInserter::computeLocationAndPreview(TQMouseEvent *e) { double x = e->x(); int y = (int)e->y(); @@ -660,8 +660,8 @@ void NoteInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -688,8 +688,8 @@ void NoteInserter::slotSelectSelected() void NoteInserter::slotRestsSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -716,7 +716,7 @@ const char* NoteInserter::m_actionsAccidental[][4] = "accidental-doubleflat" } }; -const QString NoteInserter::ToolName = "noteinserter"; +const TQString NoteInserter::ToolName = "noteinserter"; } #include "NoteInserter.moc" diff --git a/src/gui/editors/notation/NoteInserter.h b/src/gui/editors/notation/NoteInserter.h index cb46b38..a2467a1 100644 --- a/src/gui/editors/notation/NoteInserter.h +++ b/src/gui/editors/notation/NoteInserter.h @@ -30,11 +30,11 @@ #include "NotationTool.h" #include "NotationElement.h" #include "NoteStyle.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -61,16 +61,16 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual int handleMouseMove(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void ready(); @@ -85,7 +85,7 @@ public: Accidental accidental, bool suppressPreview = false); - static const QString ToolName; + static const TQString ToolName; public slots: /// Set the type of note (quaver, breve...) which will be inserted @@ -101,7 +101,7 @@ protected: NoteInserter(NotationView*); /// this ctor is used by RestInserter - NoteInserter(const QString& menuName, NotationView*); + NoteInserter(const TQString& menuName, NotationView*); timeT getOffsetWithinRest(int staffNo, const NotationElementList::iterator&, @@ -115,7 +115,7 @@ protected: const Note &, int pitch, Accidental); - virtual bool computeLocationAndPreview(QMouseEvent *e); + virtual bool computeLocationAndPreview(TQMouseEvent *e); virtual void showPreview(); virtual void clearPreview(); diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp index c2a99ee..b41ecae 100644 --- a/src/gui/editors/notation/NotePixmapFactory.cpp +++ b/src/gui/editors/notation/NotePixmapFactory.cpp @@ -56,20 +56,20 @@ #include "NoteStyle.h" #include <kglobal.h> #include <kmessagebox.h> -#include <qbitmap.h> -#include <qcolor.h> -#include <qfile.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpointarray.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwmatrix.h> +#include <tqbitmap.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpointarray.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -82,7 +82,7 @@ static clock_t makeNotesTime = 0; static int drawBeamsCount = 0; static int drawBeamsBeamCount = 0; -class NotePixmapCache : public std::map<CharName, QCanvasPixmap*> +class NotePixmapCache : public std::map<CharName, TQCanvasPixmap*> { // nothing to add -- just so we can predeclare it in the header }; @@ -94,23 +94,23 @@ const char* const NotePixmapFactory::defaultTimeSigFontFamily = "Bitstream Vera NotePixmapFactory::NotePixmapFactory(std::string fontName, int size) : m_selected(false), m_shaded(false), - m_tupletCountFont(defaultSerifFontFamily, 8, QFont::Bold), + m_tupletCountFont(defaultSerifFontFamily, 8, TQFont::Bold), m_tupletCountFontMetrics(m_tupletCountFont), - m_textMarkFont(defaultSerifFontFamily, 8, QFont::Bold, true), + m_textMarkFont(defaultSerifFontFamily, 8, TQFont::Bold, true), m_textMarkFontMetrics(m_textMarkFont), - m_fingeringFont(defaultSerifFontFamily, 8, QFont::Bold), + m_fingeringFont(defaultSerifFontFamily, 8, TQFont::Bold), m_fingeringFontMetrics(m_fingeringFont), - m_timeSigFont(defaultTimeSigFontFamily, 8, QFont::Bold), + m_timeSigFont(defaultTimeSigFontFamily, 8, TQFont::Bold), m_timeSigFontMetrics(m_timeSigFont), - m_bigTimeSigFont(defaultTimeSigFontFamily, 12, QFont::Normal), + m_bigTimeSigFont(defaultTimeSigFontFamily, 12, TQFont::Normal), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -136,13 +136,13 @@ NotePixmapFactory::NotePixmapFactory(const NotePixmapFactory &npf) : m_timeSigFontMetrics(m_timeSigFont), m_bigTimeSigFont(npf.m_bigTimeSigFont), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -162,23 +162,23 @@ NotePixmapFactory::operator=(const NotePixmapFactory &npf) m_selected = npf.m_selected; m_shaded = npf.m_shaded; m_timeSigFont = npf.m_timeSigFont; - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = npf.m_bigTimeSigFont; - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = npf.m_tupletCountFont; - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = npf.m_textMarkFont; - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = npf.m_fingeringFont; - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = npf.m_ottavaFont; - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = npf.m_clefOttavaFont; - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = npf.m_trackHeaderFont; - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = npf.m_trackHeaderBoldFont; - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); init(npf.m_font->getName(), npf.m_font->getSize()); m_dottedRestCache->clear(); m_textFontCache.clear(); @@ -224,7 +224,7 @@ NotePixmapFactory::init(std::string fontName, int size) // Resize the fonts, because the original constructor used point // sizes only and we want pixels - QFont timeSigFont(defaultTimeSigFontFamily), + TQFont timeSigFont(defaultTimeSigFontFamily), textFont(defaultSerifFontFamily); KConfig* config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -232,43 +232,43 @@ NotePixmapFactory::init(std::string fontName, int size) m_timeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_timeSigFont.setBold(true); m_timeSigFont.setPixelSize(size * 5 / 2); - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_bigTimeSigFont.setPixelSize(size * 4 + 2); - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = config->readFontEntry("textfont", &textFont); m_tupletCountFont.setBold(true); m_tupletCountFont.setPixelSize(size * 2); - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = config->readFontEntry("textfont", &textFont); m_textMarkFont.setBold(true); m_textMarkFont.setItalic(true); m_textMarkFont.setPixelSize(size * 2); - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = config->readFontEntry("textfont", &textFont); m_fingeringFont.setBold(true); m_fingeringFont.setPixelSize(size * 5 / 3); - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = config->readFontEntry("textfont", &textFont); m_ottavaFont.setPixelSize(size * 2); - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = config->readFontEntry("textfont", &textFont); m_clefOttavaFont.setPixelSize(getLineSpacing() * 3 / 2); - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = config->readFontEntry("sansfont", &m_trackHeaderFont); m_trackHeaderFont.setPixelSize(12); - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = m_trackHeaderFont; m_trackHeaderBoldFont.setBold(true); - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); } NotePixmapFactory::~NotePixmapFactory() @@ -290,9 +290,9 @@ NotePixmapFactory::getSize() const } QPixmap -NotePixmapFactory::toQPixmap(QCanvasPixmap* cp) +NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp) { - QPixmap p = *cp; + TQPixmap p = *cp; delete cp; return p; } @@ -317,7 +317,7 @@ NotePixmapFactory::dumpStats(std::ostream &s) (void)s; // avoid warnings } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeNotePixmap"); @@ -325,7 +325,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) drawNoteAux(params, 0, 0, 0); - QPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); + TQPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); //#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY #ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY @@ -354,7 +354,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawNote"); m_inPrinterMethod = true; @@ -364,7 +364,7 @@ NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, void NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { NoteFont::CharacterType charType = m_inPrinterMethod ? NoteFont::Printer : NoteFont::Screen; @@ -471,7 +471,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } } - QPoint startPoint, endPoint; + TQPoint startPoint, endPoint; if (isStemmed && params.m_drawStem) { makeRoomForStemAndFlags(drawFlag ? flagCount : 0, stemLength, params, startPoint, endPoint); @@ -526,7 +526,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, params.m_inRange ? PlainColour : OutRangeColour, inverted); - QPoint bodyLocation(m_left - m_borderX, + TQPoint bodyLocation(m_left - m_borderX, m_above - m_borderY + getStaffLineThickness() / 2); if (params.m_shifted) { if (params.m_stemGoesUp) { @@ -603,7 +603,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) { int nbh0 = getNoteBodyHeight(); @@ -614,19 +614,19 @@ NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) createPixmapAndMask(nbw + nbw0, nbh + nbh0); drawNoteHalo(0, 0, nbw + nbw0, nbh + nbh0); - return makeCanvasPixmap(QPoint(nbw0 / 2, nbh0)); + return makeCanvasPixmap(TQPoint(nbw0 / 2, nbh0)); } void NotePixmapFactory::drawNoteHalo(int x, int y, int w, int h) { - m_p->painter().setPen(QPen(QColor(GUIPalette::CollisionHaloHue, + m_p->painter().setPen(TQPen(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv), 1)); - m_p->painter().setBrush(QColor(GUIPalette::CollisionHaloHue, + 255, TQColor::Hsv), 1)); + m_p->painter().setBrush(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv)); + 255, TQColor::Hsv)); m_p->drawEllipse(x, y, w, h); } @@ -699,7 +699,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter ac (m_font->getCharacter(m_style->getAccidentalCharName(a))); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); m_left += ac.getWidth() + (m_noteBodyWidth / 4 - m_borderX); @@ -725,7 +725,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter acSharp (m_font->getCharacter(m_style->getAccidentalCharName (Accidentals::Sharp))); - QPoint ahSharp + TQPoint ahSharp (m_font->getHotspot(m_style->getAccidentalCharName (Accidentals::Sharp))); step = std::max(step, acSharp.getWidth() - ahSharp.x()); @@ -753,7 +753,7 @@ NotePixmapFactory::drawAccidental(Accidental a, bool cautionary) NoteCharacter ac = getCharacter (m_style->getAccidentalCharName(a), PlainColour, false); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); int ax = 0; @@ -792,8 +792,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks, but // text marks are not all that common - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); height += bounds.height() + gap; if (bounds.width() > width) width = bounds.width(); @@ -836,8 +836,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); height += bounds.height() + gap + 3; if (bounds.width() > width) width = bounds.width(); @@ -888,8 +888,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } else { - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); m_p->painter().setFont(m_textMarkFont); if (!m_inPrinterMethod) @@ -973,8 +973,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } } else { - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); m_p->painter().setFont(m_fingeringFont); if (!m_inPrinterMethod) @@ -1107,7 +1107,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters ¶ms) void NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &s0, QPoint &s1) + TQPoint &s0, TQPoint &s1) { // The coordinates we set in s0 and s1 are relative to (m_above, m_left) @@ -1194,7 +1194,7 @@ NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, void NotePixmapFactory::drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &, const QPoint &s1) + const TQPoint &, const TQPoint &s1) { if (flagCount < 1) return ; @@ -1219,7 +1219,7 @@ NotePixmapFactory::drawFlags(int flagCount, return ; } - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); NoteCharacter oneFlagChar; bool foundOne = @@ -1270,7 +1270,7 @@ NotePixmapFactory::drawFlags(int flagCount, } else { // the normal case - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); int y = m_above + s1.y(); if (!params.m_stemGoesUp) @@ -1282,7 +1282,7 @@ NotePixmapFactory::drawFlags(int flagCount, void NotePixmapFactory::drawStem(const NotePixmapParameters ¶ms, - const QPoint &s0, const QPoint &s1, + const TQPoint &s0, const TQPoint &s1, int shortening) { if (params.m_stemGoesUp) @@ -1336,7 +1336,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } } else { Profiler profiler("NotePixmapFactory::drawShallowLine(polygon)"); - QPointArray qp(4); + TQPointArray qp(4); qp.setPoint(0, x0, y0); qp.setPoint(1, x0, y0 + thickness); qp.setPoint(2, x1, y1 + thickness); @@ -1352,14 +1352,14 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, int dv = y1 - y0; int dh = x1 - x0; - static std::vector<QColor> colours, selectedColours; + static std::vector<TQColor> colours, selectedColours; if (colours.size() == 0) { int h, s, v; - QColor c = GUIPalette::getColour(GUIPalette::SelectedElement); + TQColor c = GUIPalette::getColour(GUIPalette::SelectedElement); c.hsv(&h, &s, &v); for (int step = 0; step < 256; step += (step == 0 ? 63 : 64)) { - colours.push_back(QColor( -1, 0, step, QColor::Hsv)); - selectedColours.push_back(QColor(h, 255 - step, v, QColor::Hsv)); + colours.push_back(TQColor( -1, 0, step, TQColor::Hsv)); + selectedColours.push_back(TQColor(h, 255 - step, v, TQColor::Hsv)); } } @@ -1444,7 +1444,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } void -NotePixmapFactory::drawBeams(const QPoint &s1, +NotePixmapFactory::drawBeams(const TQPoint &s1, const NotePixmapParameters ¶ms, int beamCount) { @@ -1521,7 +1521,7 @@ NotePixmapFactory::drawBeams(const QPoint &s1, } void -NotePixmapFactory::drawSlashes(const QPoint &s0, +NotePixmapFactory::drawSlashes(const TQPoint &s0, const NotePixmapParameters ¶ms, int slashCount) { @@ -1587,9 +1587,9 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters ¶ms) int thickness = getStaffLineThickness() * 3 / 2; int countSpace = thickness * 2; - QString count; + TQString count; count.setNum(params.m_tupletCount); - QRect cr = m_tupletCountFontMetrics.boundingRect(count); + TQRect cr = m_tupletCountFontMetrics.boundingRect(count); int tlw = params.m_tuplingLineWidth; int indent = m_noteBodyWidth / 2; @@ -1722,7 +1722,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) // We can't request a smooth slur here, because that always involves // creating a new pixmap - QPoint hotspot; + TQPoint hotspot; drawSlurAux(length, 0, above, false, true, false, hotspot, &m_p->painter(), x, @@ -1733,7 +1733,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) #endif } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeRestPixmap"); @@ -1759,19 +1759,19 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) NotePixmapCache::iterator ci(m_dottedRestCache->find(charName)); if (ci != m_dottedRestCache->end()) return new QCanvasPixmap - (*ci->second, QPoint(ci->second->offsetX(), + (*ci->second, TQPoint(ci->second->offsetX(), ci->second->offsetY())); else encache = true; } } - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); drawRestAux(params, hotspot, 0, 0, 0); - QCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); + TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); if (encache) { - m_dottedRestCache->insert(std::pair<CharName, QCanvasPixmap*> + m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*> (charName, new QCanvasPixmap (*canvasMap, hotspot))); } @@ -1780,18 +1780,18 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawRest(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawRest"); m_inPrinterMethod = true; - QPoint hotspot; // unused + TQPoint hotspot; // unused drawRestAux(params, hotspot, &painter, x, y); m_inPrinterMethod = false; } void NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { CharName charName(m_style->getRestCharName(params.m_noteType, params.m_restOutsideStave)); @@ -1862,7 +1862,7 @@ NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefPixmap(const Clef &clef) { Profiler profiler("NotePixmapFactory::makeClefPixmap"); @@ -1880,8 +1880,8 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); createPixmapAndMask(plain.getWidth(), plain.getHeight() + rect.height()); @@ -1901,26 +1901,26 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) rect.height(), text); m_p->painter().setPen(Qt::black); - QPoint hotspot(plain.getHotspot()); + TQPoint hotspot(plain.getHotspot()); if (oct > 0) hotspot.setY(hotspot.y() + rect.height()); return makeCanvasPixmap(hotspot, true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalDownPixmap() { return getCharacter(NoteCharacterNames::PEDAL_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalUpPixmap() { return getCharacter(NoteCharacterNames::PEDAL_UP_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeUnknownPixmap() { Profiler profiler("NotePixmapFactory::makeUnknownPixmap"); @@ -1928,26 +1928,26 @@ NotePixmapFactory::makeUnknownPixmap() .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeToolbarPixmap(const char *name, bool menuSize) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString fileBase = pixmapDir + "/toolbar/"; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileBase = pixmapDir + "/toolbar/"; if (menuSize) fileBase += "menu-"; fileBase += name; - if (QFile(fileBase + ".png").exists()) { - return new QCanvasPixmap(fileBase + ".png"); - } else if (QFile(fileBase + ".xpm").exists()) { - return new QCanvasPixmap(fileBase + ".xpm"); + if (TQFile(fileBase + ".png").exists()) { + return new TQCanvasPixmap(fileBase + ".png"); + } else if (TQFile(fileBase + ".xpm").exists()) { + return new TQCanvasPixmap(fileBase + ".xpm"); } else if (menuSize) { return makeToolbarPixmap(name, false); } else { // this will fail, but we don't want to return a null pointer - return new QCanvasPixmap(fileBase + ".png"); + return new TQCanvasPixmap(fileBase + ".png"); } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteMenuPixmap(timeT duration, timeT &errorReturn) { @@ -1965,14 +1965,14 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration, } } - QString noteName = NotationStrings::getReferenceName(nearestNote); + TQString noteName = NotationStrings::getReferenceName(nearestNote); if (triplet) noteName = "3-" + noteName; noteName = "menu-" + noteName; return makeToolbarPixmap(noteName); } -QCanvasPixmap * +TQCanvasPixmap * NotePixmapFactory::makeMarkMenuPixmap(Mark mark) { if (mark == Marks::Sforzando || @@ -1995,7 +1995,7 @@ NotePixmapFactory::makeMarkMenuPixmap(Mark mark) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey) @@ -2090,10 +2090,10 @@ NotePixmapFactory::makeKeyPixmap(const Key &key, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) { - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = clefPixmap->width() + 6 * getNoteBodyWidth(); @@ -2115,7 +2115,7 @@ NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) { std::vector<int> ah = key.getAccidentalHeights(clef); @@ -2124,9 +2124,9 @@ NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) NoteCharacterNames::SHARP : NoteCharacterNames::FLAT); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); - QPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); - QPoint hotspot(m_font->getHotspot(charName)); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); + TQPoint hotspot(m_font->getHotspot(charName)); int lw = getLineSpacing(); int delta = accidentalPixmap.width() - hotspot.x(); @@ -2176,7 +2176,7 @@ NotePixmapFactory::getClefAndKeyWidth(const Key &key, const Clef &clef) return width; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTrackHeaderPixmap( int width, int height, TrackHeader *header) { @@ -2188,14 +2188,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lw = getLineSpacing(); int h; - QColor colour; + TQColor colour; int maxDelta = getAccidentalWidth(Sharp); // Staff Y position inside the whole header int offset = (height - 10 * lw -1) / 2; // Draw staff lines - m_p->painter().setPen(QPen(Qt::black, getStaffLineThickness())); + m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness())); for (h = 0; h <= 8; h += 2) { int y = (lw * 3) + ((8 - h) * lw) / 2; m_p->drawLine(maxDelta/2, y + offset, m_generatedWidth - maxDelta/2, y + offset); @@ -2228,8 +2228,8 @@ NotePixmapFactory::makeTrackHeaderPixmap( else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); m_p->painter().setPen(colour); @@ -2258,7 +2258,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( NoteCharacter accident = m_font->getCharacterColoured(charName, hue, val, NoteFont::Screen, false); - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); int delta = accident.getWidth() - hotspot.x(); int x = clefChar.getWidth() + maxDelta; @@ -2275,14 +2275,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( m_p->painter().setFont(m_trackHeaderFont); // m_p->maskPainter().setFont(m_trackHeaderFont); - QString text; - QString textLine; + TQString text; + TQString textLine; int charHeight = m_trackHeaderFontMetrics.height(); int charWidth = m_trackHeaderFontMetrics.maxWidth(); - const QString transposeText = header->getTransposeText(); - QRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); + const TQString transposeText = header->getTransposeText(); + TQRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); int transposeWidth = bounds.width(); @@ -2338,7 +2338,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lowerTextY = m_generatedHeight - 4 // -4 : adjust - (numberOfTextLines - l) * getTrackHeaderTextLineSpacing(); - QString textLine = getOneLine(text, width - charWidth / 2); + TQString textLine = getOneLine(text, width - charWidth / 2); if (textLine.isEmpty()) break; if ((l == numberOfTextLines) && !text.isEmpty()) { @@ -2363,9 +2363,9 @@ NotePixmapFactory::getTrackHeaderNTL(int height) } int -NotePixmapFactory::getTrackHeaderTextWidth(QString str) +NotePixmapFactory::getTrackHeaderTextWidth(TQString str) { - QRect bounds = m_trackHeaderFontMetrics.boundingRect(str); + TQRect bounds = m_trackHeaderFontMetrics.boundingRect(str); return bounds.width(); } @@ -2377,17 +2377,17 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing() } QString -NotePixmapFactory::getOneLine(QString &text, int width) +NotePixmapFactory::getOneLine(TQString &text, int width) { - QString str; + TQString str; int n; // Immediately stop if string is empty or only contains white spaces ... - if (text.stripWhiteSpace().isEmpty()) return QString(""); + if (text.stripWhiteSpace().isEmpty()) return TQString(""); // ... or if width is too small. if (width < m_trackHeaderFontMetrics.boundingRect(text.left(1)).width()) - return QString(""); + return TQString(""); // Get a first approx. string length int totalLength = text.length(); @@ -2399,7 +2399,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) if (n == 0) { str = text; - text = QString(""); + text = TQString(""); } else { str = text.left(n); text.remove(0, n); @@ -2408,7 +2408,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) return str; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, bool useSharps) { @@ -2418,7 +2418,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental(pitch.getAccidental(useSharps)); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2438,7 +2438,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2473,7 +2473,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, int octave, int step) { @@ -2483,7 +2483,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental = pitch.getDisplayAccidental(Key("C major")); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2505,7 +2505,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2540,17 +2540,17 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeHairpinPixmap(int length, bool isCrescendo) { Profiler profiler("NotePixmapFactory::makeHairpinPixmap"); drawHairpinAux(length, isCrescendo, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight / 2)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight / 2)); } void NotePixmapFactory::drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawHairpin"); m_inPrinterMethod = true; @@ -2560,7 +2560,7 @@ NotePixmapFactory::drawHairpin(int length, bool isCrescendo, void NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int nbh = getNoteBodyHeight(); int nbw = getNoteBodyWidth(); @@ -2610,7 +2610,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) { Profiler profiler("NotePixmapFactory::makeSlurPixmap"); @@ -2619,7 +2619,7 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) // sizing so that any horizontal part was rescaled down to exactly // 1 pixel wide instead of blurring bool smooth = m_font->isSmooth() && getNoteBodyHeight() > 5; - QPoint hotspot; + TQPoint hotspot; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; drawSlurAux(length, dy, above, smooth, false, phrasing, hotspot, 0, 0, 0); @@ -2628,22 +2628,22 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) if (smooth) { - QImage i = m_generatedPixmap->convertToImage(); + TQImage i = m_generatedPixmap->convertToImage(); if (i.depth() == 1) i = i.convertDepth(32); i = i.smoothScale(i.width() / 2, i.height() / 2); delete m_generatedPixmap; delete m_generatedMask; - QPixmap newPixmap(i); - QCanvasPixmap *p = new QCanvasPixmap(newPixmap, hotspot); + TQPixmap newPixmap(i); + TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(newPixmap, Qt::white.rgb())); return p; } else { - QCanvasPixmap *p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap, Qt::white.rgb())); delete m_generatedPixmap; @@ -2654,10 +2654,10 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) void NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawSlur"); - QPoint hotspot; + TQPoint hotspot; m_inPrinterMethod = true; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; @@ -2668,10 +2668,10 @@ NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, void NotePixmapFactory::drawSlurAux(int length, int dy, bool above, bool smooth, bool flat, bool phrasing, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { - QWMatrix::TransformationMode mode = QWMatrix::transformationMode(); - QWMatrix::setTransformationMode(QWMatrix::Points); + TQWMatrix::TransformationMode mode = TQWMatrix::transformationMode(); + TQWMatrix::setTransformationMode(TQWMatrix::Points); int thickness = getStaffLineThickness() * 2; if (phrasing) @@ -2707,7 +2707,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, my = -my; bool havePixmap = false; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; if (smooth) thickness += 2; @@ -2717,31 +2717,31 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, Spline::PointList pl; if (!phrasing) { - pl.push_back(QPoint(length / 6, my)); - pl.push_back(QPoint(length - length / 6, my)); + pl.push_back(TQPoint(length / 6, my)); + pl.push_back(TQPoint(length - length / 6, my)); } else { - pl.push_back(QPoint(abs(my) / 4, my / 3)); - pl.push_back(QPoint(length / 6, my)); + pl.push_back(TQPoint(abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length / 6, my)); if (theta > 1) { - pl.push_back(QPoint(length * 3 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 3 / 8, my * 3 / 2)); } else if (theta < -1) { - pl.push_back(QPoint(length * 5 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 5 / 8, my * 3 / 2)); } else { - pl.push_back(QPoint(length / 2, my * 4 / 3)); + pl.push_back(TQPoint(length / 2, my * 4 / 3)); } - pl.push_back(QPoint(length - length / 6, my)); - pl.push_back(QPoint(length - abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length - length / 6, my)); + pl.push_back(TQPoint(length - abs(my) / 4, my / 3)); } Spline::PointList *polyPoints = Spline::calculate - (QPoint(0, y0), QPoint(length - 1, y0), pl, topLeft, bottomRight); + (TQPoint(0, y0), TQPoint(length - 1, y0), pl, topLeft, bottomRight); if (!havePixmap) { int width = bottomRight.x() - topLeft.x(); int height = bottomRight.y() - topLeft.y() + thickness - 1 + abs(dy); - hotspot = QPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); + hotspot = TQPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); // NOTATION_DEBUG << "slur: bottomRight (" << bottomRight.x() << "," << bottomRight.y() << "), topLeft (" << topLeft.x() << "," << topLeft.y() << "), width " << width << ", height " << height << ", hotspot (" << hotspot.x() << "," << hotspot.y() << "), dy " << dy << ", thickness " << thickness << endl; @@ -2773,7 +2773,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, smooth ? height*2 + thickness*2 : height + thickness, width, height); - QWMatrix m; + TQWMatrix m; if (smooth) m.translate(2 * hotspot.x(), 2 * hotspot.y()); else @@ -2800,7 +2800,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } */ int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); for (int j = 0; j < ppc; ++j) { qp.setPoint(j, (*polyPoints)[j].x(), (*polyPoints)[j].y()); @@ -2838,7 +2838,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, m_p->painter().setPen(Qt::black); } - QWMatrix::setTransformationMode(mode); + TQWMatrix::setTransformationMode(mode); if (painter) { painter->restore(); @@ -2847,18 +2847,18 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeOttavaPixmap(int length, int octavesUp) { Profiler profiler("NotePixmapFactory::makeOttavaPixmap"); m_inPrinterMethod = false; drawOttavaAux(length, octavesUp, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight - 1)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight - 1)); } void NotePixmapFactory::drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawOttava"); m_inPrinterMethod = true; @@ -2868,12 +2868,12 @@ NotePixmapFactory::drawOttava(int length, int octavesUp, void NotePixmapFactory::drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int height = m_ottavaFontMetrics.height(); int backpedal = 0; - QString label; - QRect r; + TQString label; + TQRect r; if (octavesUp == 2 || octavesUp == -2) { label = "15ma "; @@ -2895,7 +2895,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, } int thickness = getStemThickness(); - QPen pen(Qt::black, thickness, Qt::DotLine); + TQPen pen(Qt::black, thickness, Qt::DotLine); if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); @@ -2931,9 +2931,9 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->drawLine(x1, y0, x1, y1); - m_p->painter().setPen(QPen()); + m_p->painter().setPen(TQPen()); if (!m_inPrinterMethod) - m_p->maskPainter().setPen(QPen()); + m_p->maskPainter().setPen(TQPen()); if (painter) { painter->restore(); @@ -2962,13 +2962,13 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) if (left) moff = -moff; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; for (int i = 0; i < thickness; ++i) { Spline::PointList pl; - pl.push_back(QPoint((int)moff, m1)); - pl.push_back(QPoint((int)moff, m2)); + pl.push_back(TQPoint((int)moff, m1)); + pl.push_back(TQPoint((int)moff, m2)); /* NOTATION_DEBUG << "bracket spline controls: " << moff << "," << m1 << ", " << moff << "," << m2 << "; end points " @@ -2976,10 +2976,10 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) << endl; */ Spline::PointList *polyPoints = Spline::calculate - (QPoint(off0, 0), QPoint(off0, length - 1), pl, topLeft, bottomRight); + (TQPoint(off0, 0), TQPoint(off0, length - 1), pl, topLeft, bottomRight); int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); /* NOTATION_DEBUG << "bracket spline polypoints: " << endl; for (int j = 0; j < ppc; ++j) { @@ -3007,7 +3007,7 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) { Profiler profiler("NotePixmapFactory::makeTimeSigPixmap"); @@ -3026,11 +3026,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (getCharacter(charName, character, PlainColour, false)) { createPixmapAndMask(character.getWidth(), character.getHeight()); m_p->drawNoteCharacter(0, 0, character); - return makeCanvasPixmap(QPoint(0, character.getHeight() / 2)); + return makeCanvasPixmap(TQPoint(0, character.getHeight() / 2)); } - QString c("c"); - QRect r = m_bigTimeSigFontMetrics.boundingRect(c); + TQString c("c"); + TQRect r = m_bigTimeSigFontMetrics.boundingRect(c); int dy = getLineSpacing() / 4; createPixmapAndMask(r.width(), r.height() + dy*2); @@ -3057,14 +3057,14 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) } m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, r.height() / 2 + dy)); + return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy)); } else { int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); @@ -3104,11 +3104,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) denominator /= 10; } - return makeCanvasPixmap(QPoint(0, height / 2)); + return makeCanvasPixmap(TQPoint(0, height / 2)); } - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; int x; @@ -3132,7 +3132,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, denomR.height() + + return makeCanvasPixmap(TQPoint(0, denomR.height() + (getNoteBodyHeight() / 4) - 1), true); } @@ -3142,7 +3142,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const { if (sig.isCommon()) { - QRect r(m_bigTimeSigFontMetrics.boundingRect("c")); + TQRect r(m_bigTimeSigFontMetrics.boundingRect("c")); return r.width() + 2; } else { @@ -3150,13 +3150,13 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; return width; @@ -3189,7 +3189,7 @@ NotePixmapFactory::getTextFont(const Text &text) const * LilyPondDirective: Very small sans-serif, in a green box */ - int weight = QFont::Normal; + int weight = TQFont::Normal; bool italic = false; bool large = false; bool tiny = false; @@ -3199,7 +3199,7 @@ NotePixmapFactory::getTextFont(const Text &text) const type == Text::LocalTempo || type == Text::LocalDirection || type == Text::Chord) { - weight = QFont::Bold; + weight = TQFont::Bold; } if (type == Text::Dynamic || @@ -3221,18 +3221,18 @@ NotePixmapFactory::getTextFont(const Text &text) const KConfig* config = kapp->config(); - QFont textFont; + TQFont textFont; if (serif) { - textFont = QFont(defaultSerifFontFamily); + textFont = TQFont(defaultSerifFontFamily); textFont = config->readFontEntry("textfont", &textFont); } else { - textFont = QFont(defaultSansSerifFontFamily); + textFont = TQFont(defaultSansSerifFontFamily); textFont = config->readFontEntry("sansfont", &textFont); } - textFont.setStyleStrategy(QFont::StyleStrategy(QFont::PreferDefault | - QFont::PreferMatch)); + textFont.setStyleStrategy(TQFont::StyleStrategy(TQFont::PreferDefault | + TQFont::PreferMatch)); int size; if (large) @@ -3245,7 +3245,7 @@ NotePixmapFactory::getTextFont(const Text &text) const size = (getLineSpacing() * 3) / 2; textFont.setPixelSize(size); - textFont.setStyleHint(serif ? QFont::Serif : QFont::SansSerif); + textFont.setStyleHint(serif ? TQFont::Serif : TQFont::SansSerif); textFont.setWeight(weight); textFont.setItalic(italic); @@ -3260,7 +3260,7 @@ NotePixmapFactory::getTextFont(const Text &text) const return textFont; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTextPixmap(const Text &text) { Profiler profiler("NotePixmapFactory::makeTextPixmap"); @@ -3273,10 +3273,10 @@ NotePixmapFactory::makeTextPixmap(const Text &text) } drawTextAux(text, 0, 0, 0); - return makeCanvasPixmap(QPoint(2, 2), true); + return makeCanvasPixmap(TQPoint(2, 2), true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y) @@ -3300,12 +3300,12 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS); Guitar::NoteSymbols::drawFingeringPixmap(fingering, ns, &(m_p->painter())); - return makeCanvasPixmap(QPoint (x, y), true); + return makeCanvasPixmap(TQPoint (x, y), true); } void NotePixmapFactory::drawText(const Text &text, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawText"); @@ -3316,7 +3316,7 @@ NotePixmapFactory::drawText(const Text &text, if (type == Text::Annotation || type == Text::LilyPondDirective) { - QCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); + TQCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); painter.drawPixmap(x, y, *map); return ; } @@ -3328,11 +3328,11 @@ NotePixmapFactory::drawText(const Text &text, void NotePixmapFactory::drawTextAux(const Text &text, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { - QString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQString s(strtoqstr(text.getText())); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int offset = 2; int width = textMetrics.width(s) + 2 * offset; @@ -3364,19 +3364,19 @@ NotePixmapFactory::drawTextAux(const Text &text, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text) { return makeAnnotationPixmap(text, false); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective) { - QString s(strtoqstr(text.getText())); + TQString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int annotationWidth = getLineSpacing() * 16; int annotationHeight = getLineSpacing() * 6; @@ -3385,7 +3385,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD int bottomGap = getLineSpacing() / 3 + 1; int sideGap = getLineSpacing() / 4 + 1; - QRect r = textMetrics.boundingRect + TQRect r = textMetrics.boundingRect (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s); int pixmapWidth = r.width() + sideGap * 2; @@ -3411,18 +3411,18 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD m_p->drawRect(0, 0, pixmapWidth, pixmapHeight); m_p->painter().setBrush(Qt::black); - m_p->painter().drawText(QRect(sideGap, topGap, + m_p->painter().drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, pixmapHeight - bottomGap), Qt::WordBreak, s); /* unnecessary following the rectangle draw - m_pm.drawText(QRect(sideGap, topGap, + m_pm.drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, annotationHeight + topGap), Qt::WordBreak, s); */ - return makeCanvasPixmap(QPoint(0, 0)); + return makeCanvasPixmap(TQPoint(0, 0)); } void @@ -3436,8 +3436,8 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_generatedWidth = width; m_generatedHeight = height; - m_generatedPixmap = new QPixmap(width, height); - m_generatedMask = new QBitmap(maskWidth, maskHeight); + m_generatedPixmap = new TQPixmap(width, height); + m_generatedMask = new TQBitmap(maskWidth, maskHeight); static unsigned long total = 0; total += width * height; @@ -3456,12 +3456,12 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_p->maskPainter().setBrush(Qt::white); } -QCanvasPixmap* -NotePixmapFactory::makeCanvasPixmap(QPoint hotspot, bool generateMask) +TQCanvasPixmap* +NotePixmapFactory::makeCanvasPixmap(TQPoint hotspot, bool generateMask) { m_p->end(); - QCanvasPixmap* p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap* p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); if (generateMask) { p->setMask(PixmapFunctions::generateMask(*p)); @@ -3682,7 +3682,7 @@ int NotePixmapFactory::getKeyWidth(const Key &key, int NotePixmapFactory::getTextWidth(const Text &text) const { - QFontMetrics metrics(getTextFont(text)); + TQFontMetrics metrics(getTextFont(text)); return metrics.boundingRect(strtoqstr(text.getText())).width() + 4; } diff --git a/src/gui/editors/notation/NotePixmapFactory.h b/src/gui/editors/notation/NotePixmapFactory.h index 14b4773..20d2ae6 100644 --- a/src/gui/editors/notation/NotePixmapFactory.h +++ b/src/gui/editors/notation/NotePixmapFactory.h @@ -29,17 +29,17 @@ #include <map> #include "NoteCharacter.h" #include <string> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpixmap.h> -#include <qpoint.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpixmap.h> +#include <tqpoint.h> #include "base/Event.h" #include "gui/editors/notation/NoteCharacterNames.h" -class QPainter; -class QCanvasPixmap; -class QBitmap; +class TQPainter; +class TQCanvasPixmap; +class TQBitmap; namespace Rosegarden @@ -83,61 +83,61 @@ public: // Display methods -- create canvas pixmaps: - QCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeClefPixmap(const Clef &clef); - QCanvasPixmap* makeKeyPixmap(const Key &key, + TQCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeClefPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey = Key::DefaultKey); - QCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); - QCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); - QCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); - QCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); - QCanvasPixmap* makePedalDownPixmap(); - QCanvasPixmap* makePedalUpPixmap(); - QCanvasPixmap* makeUnknownPixmap(); - QCanvasPixmap* makeTextPixmap(const Text &text); - QCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, + TQCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); + TQCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); + TQCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); + TQCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); + TQCanvasPixmap* makePedalDownPixmap(); + TQCanvasPixmap* makePedalUpPixmap(); + TQCanvasPixmap* makeUnknownPixmap(); + TQCanvasPixmap* makeTextPixmap(const Text &text); + TQCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y); - QCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); // Printing methods -- draw direct to a paint device: void drawNote(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawRest(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawText(const Text &text, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); // Other support methods for producing pixmaps for other contexts: - static QCanvasPixmap *makeToolbarPixmap(const char *name, + static TQCanvasPixmap *makeToolbarPixmap(const char *name, bool menuSize = false); - static QCanvasPixmap *makeNoteMenuPixmap(timeT duration, + static TQCanvasPixmap *makeNoteMenuPixmap(timeT duration, timeT &errorReturn); - static QCanvasPixmap *makeMarkMenuPixmap(Mark); + static TQCanvasPixmap *makeMarkMenuPixmap(Mark); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, bool useSharps); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, int octave, int step); - QCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); - QCanvasPixmap* makeKeyDisplayPixmap(const Key &key, + TQCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyDisplayPixmap(const Key &key, const Clef &clef); - QCanvasPixmap* makeTrackHeaderPixmap(int width, int height, + TQCanvasPixmap* makeTrackHeaderPixmap(int width, int height, TrackHeader *header); // Bounding box and other geometry methods: @@ -183,7 +183,7 @@ public: /** * Returns the width of a text string written in a track header. */ - int getTrackHeaderTextWidth(QString str); + int getTrackHeaderTextWidth(TQString str); /** * Returns the spacing of a text lines written in a track header. @@ -195,19 +195,19 @@ public: * "width" (when written with m_trackHeaderFont) and removes it * from "text". */ - QString getOneLine(QString &text, int width); + TQString getOneLine(TQString &text, int width); /** * We need this function because as of Qt 3.1, QCanvasPixmap - * is no longer copyable by value, while QPixmap still is. + * is no longer copyable by value, while TQPixmap still is. * - * So all the makeXXPixmap are now returning QCanvasPixmap* - * instead of QCanvasPixmap, but we need an easy way to - * convert them to QPixmap, since we use them that + * So all the makeXXPixmap are now returning TQCanvasPixmap* + * instead of TQCanvasPixmap, but we need an easy way to + * convert them to TQPixmap, since we use them that * way quite often (to generate toolbar button icons for instance). */ - static QPixmap toQPixmap(QCanvasPixmap*); + static TQPixmap toQPixmap(TQCanvasPixmap*); static void dumpStats(std::ostream &); @@ -221,18 +221,18 @@ protected: void initMaybe() { if (!m_font) init("", -1); } void drawNoteAux(const NotePixmapParameters ¶meters, - QPainter *painter, int x, int y); - void drawRestAux(const NotePixmapParameters ¶meters, QPoint &hotspot, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); + void drawRestAux(const NotePixmapParameters ¶meters, TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawSlurAux(int length, int dy, bool above, bool smooth, bool tie, bool phrasing, - QPoint &hotspot, - QPainter *painter, int x, int y); + TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawTextAux(const Text &text, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); int getStemLength(const NotePixmapParameters &) const; @@ -247,18 +247,18 @@ protected: void makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &startPoint, QPoint &endPoint); + TQPoint &startPoint, TQPoint &endPoint); void drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint); + const TQPoint &startPoint, const TQPoint &endPoint); void drawStem(const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint, + const TQPoint &startPoint, const TQPoint &endPoint, int shortening); void makeRoomForBeams(const NotePixmapParameters ¶ms); - void drawBeams(const QPoint &, const NotePixmapParameters ¶ms, + void drawBeams(const TQPoint &, const NotePixmapParameters ¶ms, int beamCount); - void drawSlashes(const QPoint &, const NotePixmapParameters ¶ms, + void drawSlashes(const TQPoint &, const NotePixmapParameters ¶ms, int slashCount); void makeRoomForTuplingLine(const NotePixmapParameters ¶ms); @@ -270,15 +270,15 @@ protected: void drawBracket(int length, bool left, bool curly, int x, int y); - QFont getTextFont(const Text &text) const; + TQFont getTextFont(const Text &text) const; - QCanvasPixmap* makeAnnotationPixmap(const Text &text); - QCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); void createPixmapAndMask(int width, int height, int maskWidth = -1, int maskHeight = -1); - QCanvasPixmap* makeCanvasPixmap(QPoint hotspot, bool generateMask = false); + TQCanvasPixmap* makeCanvasPixmap(TQPoint hotspot, bool generateMask = false); enum ColourType { PlainColour, @@ -307,35 +307,35 @@ protected: int m_left, m_right, m_above, m_below; int m_borderX, m_borderY; - QFont m_tupletCountFont; - QFontMetrics m_tupletCountFontMetrics; + TQFont m_tupletCountFont; + TQFontMetrics m_tupletCountFontMetrics; - QFont m_textMarkFont; - QFontMetrics m_textMarkFontMetrics; + TQFont m_textMarkFont; + TQFontMetrics m_textMarkFontMetrics; - QFont m_fingeringFont; - QFontMetrics m_fingeringFontMetrics; + TQFont m_fingeringFont; + TQFontMetrics m_fingeringFontMetrics; - QFont m_timeSigFont; - QFontMetrics m_timeSigFontMetrics; + TQFont m_timeSigFont; + TQFontMetrics m_timeSigFontMetrics; - QFont m_bigTimeSigFont; - QFontMetrics m_bigTimeSigFontMetrics; + TQFont m_bigTimeSigFont; + TQFontMetrics m_bigTimeSigFontMetrics; - QFont m_ottavaFont; - QFontMetrics m_ottavaFontMetrics; + TQFont m_ottavaFont; + TQFontMetrics m_ottavaFontMetrics; - QFont m_clefOttavaFont; - QFontMetrics m_clefOttavaFontMetrics; + TQFont m_clefOttavaFont; + TQFontMetrics m_clefOttavaFontMetrics; - QFont m_trackHeaderFont; - QFontMetrics m_trackHeaderFontMetrics; + TQFont m_trackHeaderFont; + TQFontMetrics m_trackHeaderFontMetrics; - QFont m_trackHeaderBoldFont; - QFontMetrics m_trackHeaderBoldFontMetrics; + TQFont m_trackHeaderBoldFont; + TQFontMetrics m_trackHeaderBoldFontMetrics; - QPixmap *m_generatedPixmap; - QBitmap *m_generatedMask; + TQPixmap *m_generatedPixmap; + TQBitmap *m_generatedMask; int m_generatedWidth; int m_generatedHeight; @@ -345,10 +345,10 @@ protected: mutable NotePixmapCache *m_dottedRestCache; - typedef std::map<const char *, QFont> TextFontCache; + typedef std::map<const char *, TQFont> TextFontCache; mutable TextFontCache m_textFontCache; - static QPoint m_pointZero; + static TQPoint m_pointZero; }; diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ed9d541..ff8edae 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -26,7 +26,7 @@ #ifndef _RG_NOTEPIXMAPPAINTER_H_ #define _RG_NOTEPIXMAPPAINTER_H_ -#include <qpainter.h> +#include <tqpainter.h> namespace Rosegarden { @@ -40,12 +40,12 @@ public: NotePixmapPainter() : m_painter(&m_myPainter) { } - void beginExternal(QPainter *painter) { + void beginExternal(TQPainter *painter) { m_externalPainter = painter; m_useMask = false; - painter->setPen(QPen(Qt::black, 1, Qt::SolidLine, + painter->setPen(TQPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); if (m_externalPainter) { @@ -55,7 +55,7 @@ public: } } - bool begin(QPaintDevice *device, QPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { m_externalPainter = 0; @@ -75,11 +75,11 @@ public: return m_painter->end(); } - QPainter &painter() { + TQPainter &painter() { return *m_painter; } - QPainter &maskPainter() { + TQPainter &maskPainter() { return m_maskPainter; } @@ -103,24 +103,24 @@ public: if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); } - void drawPolygon(const QPointArray &a, bool winding = false, + void drawPolygon(const TQPointArray &a, bool winding = false, int index = 0, int n = -1) { m_painter->drawPolygon(a, winding, index, n); if (m_useMask) m_maskPainter.drawPolygon(a, winding, index, n); } - void drawPolyline(const QPointArray &a, int index = 0, int n = -1) { + void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) { m_painter->drawPolyline(a, index, n); if (m_useMask) m_maskPainter.drawPolyline(a, index, n); } - void drawPixmap(int x, int y, const QPixmap &pm, + void drawPixmap(int x, int y, const TQPixmap &pm, int sx = 0, int sy = 0, int sw = -1, int sh = -1) { m_painter->drawPixmap(x, y, pm, sx, sy, sw, sh); if (m_useMask) m_maskPainter.drawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh); } - void drawText(int x, int y, const QString &string) { + void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); if (m_useMask) m_maskPainter.drawText(x, y, string); } @@ -137,10 +137,10 @@ public: private: bool m_useMask; - QPainter m_myPainter; - QPainter m_maskPainter; - QPainter *m_externalPainter; - QPainter *m_painter; + TQPainter m_myPainter; + TQPainter m_maskPainter; + TQPainter *m_externalPainter; + TQPainter *m_painter; }; } diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp index d4a8be8..f585117 100644 --- a/src/gui/editors/notation/NoteStyleFactory.cpp +++ b/src/gui/editors/notation/NoteStyleFactory.cpp @@ -33,10 +33,10 @@ #include "NoteStyle.h" #include "NoteStyleFileReader.h" #include <kglobal.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -49,21 +49,21 @@ NoteStyleFactory::getAvailableStyleNames() { std::vector<NoteStyleName> names; - QString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); - QDir dir(styleDir); + TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); + TQDir dir(styleDir); if (!dir.exists()) { std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir << "\" not found" << std::endl; return names; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); bool foundDefault = false; - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4) == ".xml") { - QFileInfo fileInfo(QString("%1/%2").arg(styleDir).arg(*i)); + TQFileInfo fileInfo(TQString("%1/%2").arg(styleDir).arg(*i)); if (fileInfo.exists() && fileInfo.isReadable()) { std::string styleName = qstrtostr((*i).left((*i).length() - 4)); if (styleName == DefaultStyle) diff --git a/src/gui/editors/notation/NoteStyleFileReader.cpp b/src/gui/editors/notation/NoteStyleFileReader.cpp index b3f3464..41da5ed 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -26,8 +26,8 @@ #include <string> #include "NoteStyle.h" -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kglobal.h> #include <kstddirs.h> @@ -44,23 +44,23 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : m_style(new NoteStyle(name)), m_haveNote(false) { - QString styleDirectory = + TQString styleDirectory = KGlobal::dirs()->findResource("appdata", "styles/"); - QString styleFileName = - QString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString styleFileName = + TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); - QFileInfo fileInfo(styleFileName); + TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); } - QFile styleFile(styleFileName); + TQFile styleFile(styleFileName); - QXmlInputSource source(styleFile); - QXmlSimpleReader reader; + TQXmlInputSource source(styleFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -72,22 +72,22 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : } bool -NoteStyleFileReader::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteStyleFileReader::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "rosegarden-note-style") { - QString s = attributes.value("base-style"); + TQString s = attributes.value("base-style"); if (s) m_style->setBaseStyle(qstrtostr(s)); } else if (lcName == "note") { m_haveNote = true; - QString s = attributes.value("type"); + TQString s = attributes.value("type"); if (!s) { m_errorString = i18n("type is a required attribute of note"); return false; @@ -120,9 +120,9 @@ NoteStyleFileReader::startElement(const QString &, const QString &, bool NoteStyleFileReader::setFromAttributes(Note::Type type, - const QXmlAttributes &attributes) + const TQXmlAttributes &attributes) { - QString s; + TQString s; bool haveShape = false; s = attributes.value("shape"); diff --git a/src/gui/editors/notation/NoteStyleFileReader.h b/src/gui/editors/notation/NoteStyleFileReader.h index d3dfbbe..8584ce8 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.h +++ b/src/gui/editors/notation/NoteStyleFileReader.h @@ -25,7 +25,7 @@ #ifndef _RG_NOTESTYLEFILEREADER_H_ #define _RG_NOTESTYLEFILEREADER_H_ -#include <qxml.h> +#include <tqxml.h> #include "NoteStyle.h" @@ -43,13 +43,13 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); private: - bool setFromAttributes(Note::Type type, const QXmlAttributes &attributes); + bool setFromAttributes(Note::Type type, const TQXmlAttributes &attributes); - QString m_errorString; + TQString m_errorString; NoteStyle *m_style; bool m_haveNote; }; diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp index 399cf2d..e9b6bdb 100644 --- a/src/gui/editors/notation/RestInserter.cpp +++ b/src/gui/editors/notation/RestInserter.cpp @@ -41,9 +41,9 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kcommand.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -54,30 +54,30 @@ using namespace BaseProperties; RestInserter::RestInserter(NotationView* view) : NoteInserter("RestInserter", view) { - QIconSet icon; + TQIconSet icon; icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-rest-crotchet"))); new KToggleAction(i18n("Dotted rest"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("restinserter.rc"); @@ -126,8 +126,8 @@ void RestInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -139,12 +139,12 @@ void RestInserter::slotToggleDot() void RestInserter::slotNotesSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp(" "), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp(" "), "_"); m_parentView->actionCollection()->action(actionName)->activate(); } -const QString RestInserter::ToolName = "restinserter"; +const TQString RestInserter::ToolName = "restinserter"; } #include "RestInserter.moc" diff --git a/src/gui/editors/notation/RestInserter.h b/src/gui/editors/notation/RestInserter.h index 90239fb..94834d2 100644 --- a/src/gui/editors/notation/RestInserter.h +++ b/src/gui/editors/notation/RestInserter.h @@ -27,7 +27,7 @@ #define _RG_RESTINSERTER_H_ #include "NoteInserter.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -53,7 +53,7 @@ class RestInserter : public NoteInserter public: - static const QString ToolName; + static const TQString ToolName; protected: RestInserter(NotationView*); diff --git a/src/gui/editors/notation/SystemFont.cpp b/src/gui/editors/notation/SystemFont.cpp index 71f0ce7..62b4280 100644 --- a/src/gui/editors/notation/SystemFont.cpp +++ b/src/gui/editors/notation/SystemFont.cpp @@ -22,6 +22,7 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> #include "SystemFont.h" #include "SystemFontQt.h" @@ -31,10 +32,10 @@ #include <kstddirs.h> #include "NoteFontMap.h" -#include <qfont.h> -#include <qfontinfo.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqfont.h> +#include <tqfontinfo.h> +#include <tqpixmap.h> +#include <tqstring.h> namespace Rosegarden @@ -43,13 +44,13 @@ namespace Rosegarden SystemFont * SystemFont::loadSystemFont(const SystemFontSpec &spec) { - QString name = spec.first; + TQString name = spec.first; int size = spec.second; NOTATION_DEBUG << "SystemFont::loadSystemFont: name is " << name << ", size " << size << endl; if (name == "DEFAULT") { - QFont font; + TQFont font; font.setPixelSize(size); return new SystemFontQt(font); } @@ -61,7 +62,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) FcChar8 *matchFamily; XftFont *xfont = 0; - Display *dpy = QPaintDevice::x11AppDisplay(); + Display *dpy = TQPaintDevice::x11AppDisplay(); static bool haveFcDirectory = false; if (!dpy) { @@ -70,7 +71,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) } if (!haveFcDirectory) { - QString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); + TQString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); if (!FcConfigAppFontAddDir(FcConfigGetCurrent(), (const FcChar8 *)fontDir.latin1())) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Failed to add font directory " << fontDir << " to fontconfig, continuing without it" << endl; @@ -90,7 +91,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!match || result != FcResultMatch) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: No match for font " << name << " (result is " << result - << "), falling back on QFont" << endl; + << "), falling back on TQFont" << endl; if (match) FcPatternDestroy(match); goto qfont; @@ -100,8 +101,8 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: match family is " << (char *)matchFamily << endl; - if (QString((char *)matchFamily).lower() != name.lower()) { - NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on QFont" << endl; + if (TQString((char *)matchFamily).lower() != name.lower()) { + NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on TQFont" << endl; FcPatternDestroy(match); goto qfont; } @@ -110,7 +111,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!xfont) { FcPatternDestroy(match); NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Unable to load font " - << name << " via Xft, falling back on QFont" << endl; + << name << " via Xft, falling back on TQFont" << endl; goto qfont; } @@ -124,10 +125,10 @@ qfont: #endif - QFont qfont(name, size, QFont::Normal); + TQFont qfont(name, size, TQFont::Normal); qfont.setPixelSize(size); - QFontInfo info(qfont); + TQFontInfo info(qfont); NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: have family " << info.family() << " (exactMatch " << info.exactMatch() << ")" << endl; @@ -135,7 +136,7 @@ qfont: // The Qt documentation says: // - // bool QFontInfo::exactMatch() const + // bool TQFontInfo::exactMatch() const // Returns TRUE if the matched window system font is exactly the // same as the one specified by the font; otherwise returns FALSE. // @@ -146,7 +147,7 @@ qfont: // "Fughetta [macromedia]", and exactMatch returns false. Just as // useless, but in a different way. - QString family = info.family().lower(); + TQString family = info.family().lower(); if (family == name.lower()) return new SystemFontQt(qfont); diff --git a/src/gui/editors/notation/SystemFont.h b/src/gui/editors/notation/SystemFont.h index 0acc2dd..a7ae521 100644 --- a/src/gui/editors/notation/SystemFont.h +++ b/src/gui/editors/notation/SystemFont.h @@ -26,7 +26,7 @@ #ifndef _RG_SYSTEMFONT_H_ #define _RG_SYSTEMFONT_H_ -#include <qpixmap.h> +#include <tqpixmap.h> #include "gui/editors/notation/NoteCharacterNames.h" @@ -36,7 +36,7 @@ class SystemFontSpec; namespace Rosegarden { -typedef std::pair<QString, int> SystemFontSpec; +typedef std::pair<TQString, int> SystemFontSpec; class SystemFont @@ -46,7 +46,7 @@ public: PreferGlyphs, PreferCodes, OnlyGlyphs, OnlyCodes }; - virtual QPixmap renderChar(CharName charName, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) = 0; diff --git a/src/gui/editors/notation/SystemFontQt.cpp b/src/gui/editors/notation/SystemFontQt.cpp index f9c99b1..ad969e8 100644 --- a/src/gui/editors/notation/SystemFontQt.cpp +++ b/src/gui/editors/notation/SystemFontQt.cpp @@ -27,10 +27,10 @@ #include "misc/Debug.h" #include "gui/general/PixmapFunctions.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> namespace Rosegarden { @@ -42,29 +42,29 @@ SystemFontQt::renderChar(CharName charName, int glyph, int code, if (strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by Qt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0) { NOTATION_DEBUG << "SystemFontQt::renderChar: Can't render using Qt with only glyph value (" << glyph << ") for character " << charName.getName() << ", need a code point" << endl; - return QPixmap(); + return TQPixmap(); } - QFontMetrics metrics(m_font); - QChar qc(code); + TQFontMetrics metrics(m_font); + TQChar qc(code); - QPixmap map; - map = QPixmap(metrics.width(qc), metrics.height()); + TQPixmap map; + map = TQPixmap(metrics.width(qc), metrics.height()); map.fill(); - QPainter painter; + TQPainter painter; painter.begin(&map); painter.setFont(m_font); painter.setPen(Qt::black); NOTATION_DEBUG << "NoteFont: Drawing character code " << code << " for " << charName.getName() - << " using QFont" << endl; + << " using TQFont" << endl; painter.drawText(0, metrics.ascent(), qc); diff --git a/src/gui/editors/notation/SystemFontQt.h b/src/gui/editors/notation/SystemFontQt.h index ea8f5f2..a3698f9 100644 --- a/src/gui/editors/notation/SystemFontQt.h +++ b/src/gui/editors/notation/SystemFontQt.h @@ -22,26 +22,26 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SYSTEMFONTQT_H_ -#define _RG_SYSTEMFONTQT_H_ +#ifndef _RG_SYSTEMFONQT_H_ +#define _RG_SYSTEMFONQT_H_ #include "SystemFont.h" -#include <qfont.h> +#include <tqfont.h> namespace Rosegarden { class SystemFontQt : public SystemFont { public: - SystemFontQt(QFont &font) : m_font(font) { } + SystemFontQt(TQFont &font) : m_font(font) { } virtual ~SystemFontQt() { } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: - QFont m_font; + TQFont m_font; }; } diff --git a/src/gui/editors/notation/SystemFontXft.cpp b/src/gui/editors/notation/SystemFontXft.cpp index ce42f61..6388167 100644 --- a/src/gui/editors/notation/SystemFontXft.cpp +++ b/src/gui/editors/notation/SystemFontXft.cpp @@ -22,6 +22,8 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> + #include "SystemFontXft.h" #ifdef HAVE_XFT @@ -71,17 +73,17 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, if (glyph < 0 && code < 0) { NOTATION_DEBUG << "SystemFontXft::renderChar: Have neither glyph nor code point for character " << charName.getName() << ", can't render" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0 && strategy == OnlyCodes) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyCodes but no code point provided for character " << charName.getName() << " (glyph is " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (glyph < 0 && strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyGlyphs but no glyph index provided for character " << charName.getName() << " (code is " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } XGlyphInfo extents; @@ -100,7 +102,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } } else { FcChar32 char32(code); @@ -109,11 +111,11 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (code " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } } - QPixmap map(extents.width, extents.height); + TQPixmap map(extents.width, extents.height); map.fill(); Drawable drawable = (Drawable)map.handle(); @@ -127,7 +129,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, (Visual *)map.x11Visual(), map.x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; diff --git a/src/gui/editors/notation/SystemFontXft.h b/src/gui/editors/notation/SystemFontXft.h index b1487c4..c522086 100644 --- a/src/gui/editors/notation/SystemFontXft.h +++ b/src/gui/editors/notation/SystemFontXft.h @@ -43,7 +43,7 @@ public: SystemFontXft(Display *dpy, XftFont *font) : m_dpy(dpy), m_font(font) { } virtual ~SystemFontXft() { if (m_font) XftFontClose(m_dpy, m_font); } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: diff --git a/src/gui/editors/notation/TextInserter.cpp b/src/gui/editors/notation/TextInserter.cpp index aa8e1ff..f862b88 100644 --- a/src/gui/editors/notation/TextInserter.cpp +++ b/src/gui/editors/notation/TextInserter.cpp @@ -40,9 +40,9 @@ #include "NotePixmapFactory.h" #include "NotationElement.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,21 +52,21 @@ TextInserter::TextInserter(NotationView* view) : NotationTool("TextInserter", view), m_text("", Text::Dynamic) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("textinserter.rc"); @@ -96,7 +96,7 @@ void TextInserter::ready() void TextInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (staffNo < 0) @@ -137,7 +137,7 @@ void TextInserter::handleLeftButtonPress(timeT, TextEventDialog *dialog = new TextEventDialog (m_nParentView, m_nParentView->getNotePixmapFactory(), defaultText); - if (dialog->exec() == QDialog::Accepted) { + if (dialog->exec() == TQDialog::Accepted) { m_text = dialog->getText(); @@ -163,7 +163,7 @@ void TextInserter::handleLeftButtonPress(timeT, delete dialog; } -const QString TextInserter::ToolName = "textinserter"; +const TQString TextInserter::ToolName = "textinserter"; } #include "TextInserter.moc" diff --git a/src/gui/editors/notation/TextInserter.h b/src/gui/editors/notation/TextInserter.h index 3b4821b..f71ddc7 100644 --- a/src/gui/editors/notation/TextInserter.h +++ b/src/gui/editors/notation/TextInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/TrackHeader.cpp b/src/gui/editors/notation/TrackHeader.cpp index 32fab2f..f2793ab 100644 --- a/src/gui/editors/notation/TrackHeader.cpp +++ b/src/gui/editors/notation/TrackHeader.cpp @@ -50,15 +50,15 @@ #include <kapplication.h> #include <klocale.h> -#include <qsize.h> -#include <qwidget.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqtooltip.h> namespace Rosegarden @@ -75,22 +75,22 @@ const int TrackHeader::INCONSISTENT_TRANSPOSITIONS = 1 << 5; const int TrackHeader::BEFORE_FIRST_SEGMENT = 1 << 6; -TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) : - QLabel(parent), +TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos) : + TQLabel(parent), m_track(trackId), m_height(height), m_ypos(ypos), m_lastClef(Clef()), m_lastKey(Rosegarden::Key()), - m_lastLabel(QString("")), + m_lastLabel(TQString("")), m_lastTranspose(0), - m_lastUpperText(QString("")), + m_lastUpperText(TQString("")), m_neverUpdated(true), m_isCurrent(true), m_lastStatusPart(0), m_lastWidth(0), m_key(Rosegarden::Key()), - m_label(QString("")), + m_label(TQString("")), m_transpose(0), m_status(0), m_current(false) @@ -98,7 +98,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) m_notationView = static_cast<HeadersGroup *>(parent)->getNotationView(); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setCurrent(false); @@ -110,15 +110,15 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); - QString toolTipText = QString(i18n("Track %1 : \"%2\"") + TQString toolTipText = TQString(i18n("Track %1 : \"%2\"") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); - QString preset = track->getPresetLabel(); - if (preset != QString("")) - toolTipText += QString(i18n("\nNotate for: %1").arg(preset)); + TQString preset = track->getPresetLabel(); + if (preset != TQString("")) + toolTipText += TQString(i18n("\nNotate for: %1").arg(preset)); - QString notationSize = i18n("normal"); + TQString notationSize = i18n("normal"); switch (track->getStaffSize()) { case StaffTypes::Small: notationSize = i18n("small"); @@ -128,7 +128,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - QString bracketText = i18n("--"); + TQString bracketText = i18n("--"); switch (track->getStaffBracket()) { case Brackets::SquareOn: bracketText = "[-"; @@ -153,7 +153,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - toolTipText += QString(i18n("\nSize: %1, Bracket: %2 ")) + toolTipText += TQString(i18n("\nSize: %1, Bracket: %2 ")) .arg(notationSize) .arg(bracketText); @@ -178,16 +178,16 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) int transpose = (*i)->getTranspose(); if (transpose) { - QString transposeName; + TQString transposeName; transposeValueToName(transpose, transposeName); - toolTipText += QString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) .arg(barStart) .arg(barEnd) .arg(transposeName) .arg(transpose) .arg(strtoqstr((*i)->getLabel())); } else { - toolTipText += QString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) .arg(barStart) .arg(barEnd) .arg(transpose) @@ -195,7 +195,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) } } - QToolTip::add(this, toolTipText); + TQToolTip::add(this, toolTipText); m_firstSeg = *segments.begin(); m_firstSegStartTime = m_firstSeg->getStartTime(); @@ -217,17 +217,17 @@ TrackHeader::setCurrent(bool current) if (current) { setLineWidth(2); setMargin(0); - setPaletteForegroundColor(QColor(0, 0, 255)); + setPaletteForegroundColor(TQColor(0, 0, 255)); } else { setLineWidth(1); setMargin(1); - setPaletteForegroundColor(QColor(0, 0, 0)); + setPaletteForegroundColor(TQColor(0, 0, 0)); } } } void -TrackHeader::transposeValueToName(int transpose, QString &transposeName) +TrackHeader::transposeValueToName(int transpose, TQString &transposeName) { /// TODO : Should be rewrited using methods from Pitch class @@ -268,7 +268,7 @@ TrackHeader::lookAtStaff(double x, int maxWidth) // inconsistency occurs. Clef clef, clef0; Rosegarden::Key key, key0, key1 = Rosegarden::Key("C major"); - QString label = QString(""), label0, label1 = QString(""); + TQString label = TQString(""), label0, label1 = TQString(""); int transpose = 0, transpose0, transpose1 = 0; int staff; @@ -346,14 +346,14 @@ TrackHeader::lookAtStaff(double x, int maxWidth) m_current = current; m_status = status; - QString noteName; + TQString noteName; transposeValueToName(m_transpose, noteName); - m_upperText = QString(i18n("%1: %2") + m_upperText = TQString(i18n("%1: %2") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); if (m_transpose) m_transposeText = i18n(" in %1").arg(noteName); - else m_transposeText = QString(""); + else m_transposeText = TQString(""); NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); int clefAndKeyWidth = npf->getClefAndKeyWidth(m_key, m_clef); @@ -411,7 +411,7 @@ TrackHeader::updateHeader(int width) m_lastUpperText = m_upperText; bool drawClef = true; - QColor clefColour; + TQColor clefColour; if (m_status & (SEGMENT_HERE | BEFORE_FIRST_SEGMENT)) { if (m_status & (INCONSISTENT_CLEFS | INCONSISTENT_KEYS)) clefColour = Qt::red; @@ -422,7 +422,7 @@ TrackHeader::updateHeader(int width) } NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); - QPixmap pmap = NotePixmapFactory::toQPixmap( + TQPixmap pmap = NotePixmapFactory::toQPixmap( npf->makeTrackHeaderPixmap(width, m_height, this)); setPixmap(pmap); diff --git a/src/gui/editors/notation/TrackHeader.h b/src/gui/editors/notation/TrackHeader.h index 0104430..1cb4f1e 100644 --- a/src/gui/editors/notation/TrackHeader.h +++ b/src/gui/editors/notation/TrackHeader.h @@ -33,13 +33,13 @@ #include "base/NotationTypes.h" #include "base/Track.h" -#include <qsize.h> -#include <qwidget.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqlabel.h> #include <set> -class QLabel; +class TQLabel; namespace Rosegarden @@ -59,7 +59,7 @@ public: * *parent is the parent widget, height the height of staff and * ypos is the staff y position on canvas. */ - TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos); + TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos); /** * Draw a blue line around header when current is true @@ -119,18 +119,18 @@ public: /** * Return the text to write in the header top */ - QString getUpperText() { return m_upperText; } + TQString getUpperText() { return m_upperText; } /** * Return the transposition text * (to be written at the end of the upper text) */ - QString getTransposeText() { return m_transposeText; } + TQString getTransposeText() { return m_transposeText; } /** * Return the text to write in the header bottom */ - QString getLowerText() { return m_label; } + TQString getLowerText() { return m_label; } /** * Return true if two segments or more are superimposed and are @@ -165,7 +165,7 @@ private : * Convert the transpose value to the instrument tune and * return it in a printable string. */ - void transposeValueToName(int transpose, QString &transposeName); + void transposeValueToName(int transpose, TQString &transposeName); // Status bits @@ -184,9 +184,9 @@ private : Clef m_lastClef; Rosegarden::Key m_lastKey; - QString m_lastLabel; + TQString m_lastLabel; int m_lastTranspose; - QString m_lastUpperText; + TQString m_lastUpperText; bool m_neverUpdated; bool m_isCurrent; int m_lastStatusPart; @@ -194,13 +194,13 @@ private : Clef m_clef; Rosegarden::Key m_key; - QString m_label; + TQString m_label; int m_transpose; int m_status; bool m_current; - QString m_upperText; - QString m_transposeText; + TQString m_upperText; + TQString m_transposeText; int m_numberOfTextLines; // Used to sort the segments listed in the header toolTipText diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp index 44a202b..bfa61a8 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp @@ -24,7 +24,7 @@ #include "AudioInstrumentParameterPanel.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -45,16 +45,16 @@ #include "InstrumentParameterPanel.h" #include "sound/MappedCommon.h" #include "sound/MappedStudio.h" -#include <qcolor.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpalette.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qsignalmapper.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpalette.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqsignalmapper.h> namespace Rosegarden @@ -115,11 +115,11 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, << ", index = " << index << ", plugin = " << plugin << endl; - QColor pluginBackgroundColour = Qt::black; + TQColor pluginBackgroundColour = Qt::black; bool bypassed = false; - QPushButton *button = 0; - QString noneText; + TQPushButton *button = 0; + TQString noneText; // updates synth gui button &c: m_audioFader->slotSetInstrument(&m_doc->getStudio(), m_selectedInstrument); @@ -138,7 +138,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, if (plugin == -1) { button->setText(noneText); - QToolTip::add + TQToolTip::add (button, noneText); } else { @@ -148,7 +148,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, if (pluginClass) { button->setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (button, pluginClass->getLabel()); pluginBackgroundColour = pluginClass->getColour(); @@ -179,7 +179,7 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, AudioPluginInstance *inst = m_selectedInstrument->getPlugin(pluginIndex); - QColor backgroundColour = Qt::black; // default background colour + TQColor backgroundColour = Qt::black; // default background colour if (inst && inst->isAssigned()) { AudioPlugin *pluginClass @@ -198,14 +198,14 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, void AudioInstrumentParameterPanel::setButtonColour( - int pluginIndex, bool bypassState, const QColor &colour) + int pluginIndex, bool bypassState, const TQColor &colour) { RG_DEBUG << "AudioInstrumentParameterPanel::setButtonColour " << "pluginIndex = " << pluginIndex << ", bypassState = " << bypassState << ", rgb = " << colour.name() << endl; - QPushButton *button = 0; + TQPushButton *button = 0; if (pluginIndex == Instrument::SYNTH_PLUGIN_POSITION) { button = m_audioFader->m_synthButton; @@ -220,19 +220,19 @@ AudioInstrumentParameterPanel::setButtonColour( if (bypassState) { button-> setPaletteForegroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); button-> setPaletteBackgroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); } else if (colour == Qt::black) { button-> setPaletteForegroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); button-> setPaletteBackgroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); } else { button-> setPaletteForegroundColor(Qt::white); @@ -242,11 +242,11 @@ AudioInstrumentParameterPanel::setButtonColour( } } -AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, QWidget* parent) +AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent) : InstrumentParameterPanel(doc, parent), m_audioFader(new AudioFaderBox(this)) { - QGridLayout *gridLayout = new QGridLayout(this, 3, 2, 5, 5); + TQGridLayout *gridLayout = new TQGridLayout(this, 3, 2, 5, 5); // Instrument label : first row, all cols gridLayout->addMultiCellWidget(m_instrumentLabel, 0, 0, 0, 1, AlignCenter); @@ -256,32 +256,32 @@ AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* d gridLayout->setRowStretch(2, 1); - connect(m_audioFader, SIGNAL(audioChannelsChanged(int)), - this, SLOT(slotAudioChannels(int))); + connect(m_audioFader, TQT_SIGNAL(audioChannelsChanged(int)), + this, TQT_SLOT(slotAudioChannels(int))); - connect(m_audioFader->m_signalMapper, SIGNAL(mapped(int)), - this, SLOT(slotSelectPlugin(int))); + connect(m_audioFader->m_signalMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotSelectPlugin(int))); - connect(m_audioFader->m_fader, SIGNAL(faderChanged(float)), - this, SLOT(slotSelectAudioLevel(float))); + connect(m_audioFader->m_fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotSelectAudioLevel(float))); - connect(m_audioFader->m_recordFader, SIGNAL(faderChanged(float)), - this, SLOT(slotSelectAudioRecordLevel(float))); + connect(m_audioFader->m_recordFader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotSelectAudioRecordLevel(float))); - connect(m_audioFader->m_pan, SIGNAL(valueChanged(float)), - this, SLOT(slotSetPan(float))); + connect(m_audioFader->m_pan, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotSetPan(float))); - connect(m_audioFader->m_audioOutput, SIGNAL(changed()), - this, SLOT(slotAudioRoutingChanged())); + connect(m_audioFader->m_audioOutput, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotAudioRoutingChanged())); - connect(m_audioFader->m_audioInput, SIGNAL(changed()), - this, SLOT(slotAudioRoutingChanged())); + connect(m_audioFader->m_audioInput, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotAudioRoutingChanged())); - connect(m_audioFader->m_synthButton, SIGNAL(clicked()), - this, SLOT(slotSynthButtonClicked())); + connect(m_audioFader->m_synthButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSynthButtonClicked())); - connect(m_audioFader->m_synthGUIButton, SIGNAL(clicked()), - this, SLOT(slotSynthGUIButtonClicked())); + connect(m_audioFader->m_synthGUIButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSynthGUIButtonClicked())); } void @@ -348,8 +348,8 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) for (int i = start; i < int(m_audioFader->m_plugins.size()); i++) { int index; - QPushButton *button; - QString noneText; + TQPushButton *button; + TQString noneText; if (i == -1) { index = Instrument::SYNTH_PLUGIN_POSITION; @@ -373,14 +373,14 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) if (pluginClass) { button->setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (button, pluginClass->getLabel()); setButtonColour(index, inst->isBypassed(), pluginClass->getColour()); } } else { button->setText(noneText); - QToolTip::add + TQToolTip::add (button, noneText); setButtonColour(index, inst ? inst->isBypassed() : false, Qt::black); } diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h index 932e6bc..87da334 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h @@ -28,12 +28,12 @@ #include "base/MidiProgram.h" #include "InstrumentParameterPanel.h" -#include <qpixmap.h> -#include <qstring.h> +#include <tqpixmap.h> +#include <tqstring.h> -class QWidget; -class QColor; +class TQWidget; +class TQColor; namespace Rosegarden @@ -48,7 +48,7 @@ class AudioInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT public: - AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, QWidget* parent); + AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent); virtual void setupForInstrument(Instrument*); @@ -61,7 +61,7 @@ public: // Set the button colour // void setButtonColour(int pluginIndex, bool bypassState, - const QColor &color); + const TQColor &color); public slots: // From AudioFaderBox @@ -84,10 +84,10 @@ public slots: void slotSynthGUIButtonClicked(); signals: - void selectPlugin(QWidget *, InstrumentId, int index); + void selectPlugin(TQWidget *, InstrumentId, int index); void instrumentParametersChanged(InstrumentId); void showPluginGUI(InstrumentId, int index); - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); protected: //--------------- Data members --------------------------------- @@ -96,8 +96,8 @@ protected: private: - QPixmap m_monoPixmap; - QPixmap m_stereoPixmap; + TQPixmap m_monoPixmap; + TQPixmap m_stereoPixmap; }; diff --git a/src/gui/editors/parameters/InstrumentParameterBox.cpp b/src/gui/editors/parameters/InstrumentParameterBox.cpp index 8114e0d..1d5b99d 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.cpp +++ b/src/gui/editors/parameters/InstrumentParameterBox.cpp @@ -24,7 +24,7 @@ #include "InstrumentParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -36,25 +36,25 @@ #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Instrument"), i18n("Instrument Parameters"), parent), - m_widgetStack(new QWidgetStack(this)), - m_noInstrumentParameters(new QVBox(this)), + m_widgetStack(new TQWidgetStack(this)), + m_noInstrumentParameters(new TQVBox(this)), m_midiInstrumentParameters(new MIDIInstrumentParameterPanel(doc, this)), m_audioInstrumentParameters(new AudioInstrumentParameterPanel(doc, this)), m_selectedInstrument(-1), @@ -86,43 +86,43 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, m_audioInstrumentParameters->adjustSize(); m_noInstrumentParameters->adjustSize(); - connect(m_audioInstrumentParameters, SIGNAL(updateAllBoxes()), - this, SLOT(slotUpdateAllBoxes())); + connect(m_audioInstrumentParameters, TQT_SIGNAL(updateAllBoxes()), + this, TQT_SLOT(slotUpdateAllBoxes())); connect(m_audioInstrumentParameters, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(m_audioInstrumentParameters, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), this, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int))); + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int))); connect(m_audioInstrumentParameters, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SIGNAL(showPluginGUI(InstrumentId, int))); + TQT_SIGNAL(showPluginGUI(InstrumentId, int))); - connect(m_midiInstrumentParameters, SIGNAL(updateAllBoxes()), - this, SLOT(slotUpdateAllBoxes())); + connect(m_midiInstrumentParameters, TQT_SIGNAL(updateAllBoxes()), + this, TQT_SLOT(slotUpdateAllBoxes())); connect(m_midiInstrumentParameters, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), - this, SIGNAL(changeInstrumentLabel(InstrumentId, QString))); + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), + this, TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString))); connect(m_audioInstrumentParameters, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), - this, SIGNAL(changeInstrumentLabel(InstrumentId, QString))); + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), + this, TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString))); connect(m_midiInstrumentParameters, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); // Layout the groups left to right. - QBoxLayout* layout = new QVBoxLayout(this); + TQBoxLayout* layout = new TQVBoxLayout(this); layout->addWidget(m_widgetStack); } diff --git a/src/gui/editors/parameters/InstrumentParameterBox.h b/src/gui/editors/parameters/InstrumentParameterBox.h index f406567..cc36351 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.h +++ b/src/gui/editors/parameters/InstrumentParameterBox.h @@ -29,13 +29,13 @@ #include "base/MidiProgram.h" #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidgetStack; -class QWidget; -class QFrame; +class TQWidgetStack; +class TQWidget; +class TQFrame; namespace Rosegarden @@ -56,7 +56,7 @@ Q_OBJECT public: InstrumentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent = 0); + TQWidget *parent = 0); ~InstrumentParameterBox(); void useInstrument(Instrument *instrument); @@ -70,7 +70,7 @@ public: virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: @@ -91,9 +91,9 @@ public slots: signals: - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); - void selectPlugin(QWidget*, InstrumentId id, int index); + void selectPlugin(TQWidget*, InstrumentId id, int index); void showPluginGUI(InstrumentId id, int index); void instrumentParametersChanged(InstrumentId); @@ -102,8 +102,8 @@ signals: protected: //--------------- Data members --------------------------------- - QWidgetStack *m_widgetStack; - QFrame *m_noInstrumentParameters; + TQWidgetStack *m_widgetStack; + TQFrame *m_noInstrumentParameters; MIDIInstrumentParameterPanel *m_midiInstrumentParameters; AudioInstrumentParameterPanel *m_audioInstrumentParameters; diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.cpp b/src/gui/editors/parameters/InstrumentParameterPanel.cpp index 9437daf..a47a8a8 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/InstrumentParameterPanel.cpp @@ -28,23 +28,23 @@ #include "base/Instrument.h" #include "document/RosegardenGUIDoc.h" #include <ksqueezedtextlabel.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qwidget.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqwidget.h> namespace Rosegarden { InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, - QWidget* parent) - : QFrame(parent), + TQWidget* parent) + : TQFrame(parent), m_instrumentLabel(new KSqueezedTextLabel(this)), m_selectedInstrument(0), m_doc(doc) { - QFontMetrics metrics(m_instrumentLabel->fontMetrics()); + TQFontMetrics metrics(m_instrumentLabel->fontMetrics()); int width25 = metrics.width("1234567890123456789012345"); m_instrumentLabel->setFixedWidth(width25); diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.h b/src/gui/editors/parameters/InstrumentParameterPanel.h index 9a794d0..717ffd2 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.h +++ b/src/gui/editors/parameters/InstrumentParameterPanel.h @@ -26,12 +26,12 @@ #ifndef _RG_INSTRUMENTPARAMETERPANEL_H_ #define _RG_INSTRUMENTPARAMETERPANEL_H_ -#include <qframe.h> +#include <tqframe.h> #include <vector> #include <utility> -class QWidget; -class QLabel; +class TQWidget; +class TQLabel; namespace Rosegarden @@ -41,7 +41,7 @@ class RosegardenGUIDoc; class Instrument; class Rotary; -typedef std::pair<Rotary *, QLabel *> RotaryPair; +typedef std::pair<Rotary *, TQLabel *> RotaryPair; typedef std::vector<std::pair<int, RotaryPair> > RotaryMap; @@ -51,7 +51,7 @@ class InstrumentParameterPanel : public QFrame { Q_OBJECT public: - InstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent); + InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); virtual ~InstrumentParameterPanel() {}; @@ -66,7 +66,7 @@ signals: protected: //--------------- Data members --------------------------------- - QLabel *m_instrumentLabel; + TQLabel *m_instrumentLabel; Instrument *m_selectedInstrument; RosegardenGUIDoc *m_doc; }; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp index fcd4247..61a9256 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp @@ -24,7 +24,7 @@ #include "MIDIInstrumentParameterPanel.h" -#include <qlayout.h> +#include <tqlayout.h> #include "sound/Midi.h" #include <klocale.h> @@ -44,52 +44,52 @@ #include "sound/MappedInstrument.h" #include <kcombobox.h> #include <ksqueezedtextlabel.h> -#include <qcheckbox.h> -#include <qcolor.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qregexp.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcolor.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> namespace Rosegarden { -MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent): +MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent): InstrumentParameterPanel(doc, parent), m_rotaryFrame(0), - m_rotaryMapper(new QSignalMapper(this)) + m_rotaryMapper(new TQSignalMapper(this)) { - m_mainGrid = new QGridLayout(this, 10, 3, 2, 1); + m_mainGrid = new TQGridLayout(this, 10, 3, 2, 1); m_connectionLabel = new KSqueezedTextLabel(this); m_bankValue = new KComboBox(this); m_channelValue = new KComboBox(this); m_programValue = new KComboBox(this); m_variationValue = new KComboBox(this); - m_bankCheckBox = new QCheckBox(this); - m_programCheckBox = new QCheckBox(this); - m_variationCheckBox = new QCheckBox(this); - m_percussionCheckBox = new QCheckBox(this); + m_bankCheckBox = new TQCheckBox(this); + m_programCheckBox = new TQCheckBox(this); + m_variationCheckBox = new TQCheckBox(this); + m_percussionCheckBox = new TQCheckBox(this); m_bankValue->setSizeLimit(20); m_programValue->setSizeLimit(20); m_variationValue->setSizeLimit(20); - m_bankLabel = new QLabel(i18n("Bank"), this); - m_variationLabel = new QLabel(i18n("Variation"), this); - m_programLabel = new QLabel(i18n("Program"), this); - QLabel *channelLabel = new QLabel(i18n("Channel out"), this); - QLabel *percussionLabel = new QLabel(i18n("Percussion"), this); + m_bankLabel = new TQLabel(i18n("Bank"), this); + m_variationLabel = new TQLabel(i18n("Variation"), this); + m_programLabel = new TQLabel(i18n("Program"), this); + TQLabel *channelLabel = new TQLabel(i18n("Channel out"), this); + TQLabel *percussionLabel = new TQLabel(i18n("Percussion"), this); // Ensure a reasonable amount of space in the program dropdowns even // if no instrument initially selected - QFontMetrics metrics(m_programValue->font()); + TQFontMetrics metrics(m_programValue->font()); int width22 = metrics.width("1234567890123456789012"); int width25 = metrics.width("1234567890123456789012345"); @@ -131,7 +131,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Populate channel lists // for (int i = 0; i < 16; i++) { - m_channelValue->insertItem(QString("%1").arg(i + 1)); + m_channelValue->insertItem(TQString("%1").arg(i + 1)); } m_channelValue->setSizeLimit(16); @@ -152,32 +152,32 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Connect up the toggle boxes // - connect(m_percussionCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotTogglePercussion(bool))); + connect(m_percussionCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotTogglePercussion(bool))); - connect(m_programCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleProgramChange(bool))); + connect(m_programCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleProgramChange(bool))); - connect(m_bankCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleBank(bool))); + connect(m_bankCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleBank(bool))); - connect(m_variationCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleVariation(bool))); + connect(m_variationCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleVariation(bool))); // Connect activations // - connect(m_bankValue, SIGNAL(activated(int)), - this, SLOT(slotSelectBank(int))); + connect(m_bankValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectBank(int))); - connect(m_variationValue, SIGNAL(activated(int)), - this, SLOT(slotSelectVariation(int))); + connect(m_variationValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectVariation(int))); - connect(m_programValue, SIGNAL(activated(int)), - this, SLOT(slotSelectProgram(int))); + connect(m_programValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectProgram(int))); - connect(m_channelValue, SIGNAL(activated(int)), - this, SLOT(slotSelectChannel(int))); + connect(m_channelValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectChannel(int))); // don't select any of the options in any dropdown m_programValue->setCurrentItem( -1); @@ -185,8 +185,8 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc m_channelValue->setCurrentItem( -1); m_variationValue->setCurrentItem( -1); - connect(m_rotaryMapper, SIGNAL(mapped(int)), - this, SLOT(slotControllerChanged(int))); + connect(m_rotaryMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotControllerChanged(int))); } void @@ -210,18 +210,18 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument) // Set Studio Device name // - QString connection(strtoqstr(md->getConnection())); + TQString connection(strtoqstr(md->getConnection())); if (connection == "") { m_connectionLabel->setText(i18n("[ %1 ]").arg(i18n("No connection"))); } else { // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(QRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); - QString text = i18n("[ %1 ]").arg(connection); - /*QString origText(text); + TQString text = i18n("[ %1 ]").arg(connection); + /*TQString origText(text); - QFontMetrics metrics(m_connectionLabel->fontMetrics()); + TQFontMetrics metrics(m_connectionLabel->fontMetrics()); int maxwidth = metrics.width ("Program: [X] Acoustic Grand Piano 123");// kind of arbitrary! @@ -292,10 +292,10 @@ void MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) { if (!m_rotaryFrame) { - m_rotaryFrame = new QFrame(this); + m_rotaryFrame = new TQFrame(this); m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, Qt::AlignHCenter); - m_rotaryGrid = new QGridLayout(m_rotaryFrame, 10, 3, 8, 1); - m_rotaryGrid->addItem(new QSpacerItem(10, 4), 0, 1); + m_rotaryGrid = new TQGridLayout(m_rotaryFrame, 10, 3, 8, 1); + m_rotaryGrid->addItem(new TQSpacerItem(10, 4), 0, 1); } // To cut down on flicker, we avoid destroying and recreating @@ -321,12 +321,12 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Get the knob colour - only if the colour is non-default (>0) // - QColor knobColour = Qt::black; // special case for Rotary + TQColor knobColour = Qt::black; // special case for Rotary if (it->getColourIndex() > 0) { Colour c = comp.getGeneralColourMap().getColourByIndex (it->getColourIndex()); - knobColour = QColor(c.getRed(), c.getGreen(), c.getBlue()); + knobColour = TQColor(c.getRed(), c.getGreen(), c.getBlue()); } Rotary *rotary = 0; @@ -367,14 +367,14 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Update the controller name that is associated with // with the existing rotary widget. - QLabel *label = rmi->second.second; + TQLabel *label = rmi->second.second; label->setText(strtoqstr(it->getName())); ++rmi; } else { - QHBox *hbox = new QHBox(m_rotaryFrame); + TQHBox *hbox = new TQHBox(m_rotaryFrame); hbox->setSpacing(8); float smallStep = 1.0; @@ -400,7 +400,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) rotary->setKnobColour(knobColour); // Add a label - QLabel *label = new KSqueezedTextLabel(strtoqstr(it->getName()), hbox); + TQLabel *label = new KSqueezedTextLabel(strtoqstr(it->getName()), hbox); RG_DEBUG << "Adding new widget at " << (count / 2) << "," << (count % 2) << endl; @@ -417,8 +417,8 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Connect // - connect(rotary, SIGNAL(valueChanged(float)), - m_rotaryMapper, SLOT(map())); + connect(rotary, TQT_SIGNAL(valueChanged(float)), + m_rotaryMapper, TQT_SLOT(map())); rmi = m_rotaries.end(); } @@ -640,7 +640,7 @@ MIDIInstrumentParameterPanel::populateProgramList() for (unsigned int i = 0; i < programs.size(); ++i) { std::string programName = programs[i].getName(); if (programName != "") { - m_programValue->insertItem(QString("%1. %2") + m_programValue->insertItem(TQString("%1. %2") .arg(programs[i].getProgram() + 1) .arg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == programs[i]) { @@ -762,7 +762,7 @@ MIDIInstrumentParameterPanel::populateVariationList() i18n("(default)") : strtoqstr(programName)); */ - m_variationValue->insertItem(QString("%1. %2") + m_variationValue->insertItem(TQString("%1. %2") .arg(variations[i] + 1) .arg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == program) { diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h index 7f1a1c5..22c0ba1 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h @@ -29,15 +29,15 @@ #include "base/MidiProgram.h" #include "base/MidiDevice.h" #include "InstrumentParameterPanel.h" -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QSignalMapper; -class QLabel; -class QGridLayout; -class QFrame; -class QCheckBox; +class TQWidget; +class TQSignalMapper; +class TQLabel; +class TQGridLayout; +class TQFrame; +class TQCheckBox; class KComboBox; @@ -54,7 +54,7 @@ class MIDIInstrumentParameterPanel : public InstrumentParameterPanel Q_OBJECT public: - MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent); + MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); void setupControllers(MidiDevice *); // setup ControlParameters on box @@ -63,7 +63,7 @@ public: void showAdditionalControls(bool showThem); signals: - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); void instrumentParametersChanged(InstrumentId); public slots: @@ -102,7 +102,7 @@ protected: //--------------- Data members --------------------------------- - QLabel *m_connectionLabel; + TQLabel *m_connectionLabel; KComboBox *m_bankValue; KComboBox *m_variationValue; @@ -110,20 +110,20 @@ protected: KComboBox *m_programValue; //KComboBox *m_channelInValue; - QCheckBox *m_percussionCheckBox; - QCheckBox *m_bankCheckBox; - QCheckBox *m_variationCheckBox; - QCheckBox *m_programCheckBox; + TQCheckBox *m_percussionCheckBox; + TQCheckBox *m_bankCheckBox; + TQCheckBox *m_variationCheckBox; + TQCheckBox *m_programCheckBox; - QLabel *m_bankLabel; - QLabel *m_variationLabel; - QLabel *m_programLabel; + TQLabel *m_bankLabel; + TQLabel *m_variationLabel; + TQLabel *m_programLabel; - QGridLayout *m_mainGrid; - QFrame *m_rotaryFrame; - QGridLayout *m_rotaryGrid; + TQGridLayout *m_mainGrid; + TQFrame *m_rotaryFrame; + TQGridLayout *m_rotaryGrid; RotaryMap m_rotaries; - QSignalMapper *m_rotaryMapper; + TQSignalMapper *m_rotaryMapper; BankList m_banks; ProgramList m_programs; diff --git a/src/gui/editors/parameters/RosegardenParameterArea.cpp b/src/gui/editors/parameters/RosegardenParameterArea.cpp index 968c737..8790122 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.cpp +++ b/src/gui/editors/parameters/RosegardenParameterArea.cpp @@ -29,16 +29,16 @@ #include "RosegardenParameterBox.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qvgroupbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> #include <iostream> #include <set> @@ -46,20 +46,20 @@ namespace Rosegarden { -RosegardenParameterArea::RosegardenParameterArea(QWidget *parent, +RosegardenParameterArea::RosegardenParameterArea(TQWidget *parent, const char *name, WFlags f) - : QWidgetStack(parent, name, f), + : TQWidgetStack(parent, name, f), m_style(RosegardenParameterArea::CLASSIC_STYLE), - m_scrollView(new QScrollView(this, 0, Qt::WStaticContents)), - m_classic(new QVBox(m_scrollView->viewport())), + m_scrollView(new TQScrollView(this, 0, Qt::WStaticContents)), + m_classic(new TQVBox(m_scrollView->viewport())), m_tabBox(new KTabWidget(this)), m_active(0), m_spacing(0) { m_scrollView->addChild(m_classic); - m_scrollView->setHScrollBarMode(QScrollView::AlwaysOff); - m_scrollView->setVScrollBarMode(QScrollView::Auto); - m_scrollView->setResizePolicy(QScrollView::AutoOneFit); + m_scrollView->setHScrollBarMode(TQScrollView::AlwaysOff); + m_scrollView->setVScrollBarMode(TQScrollView::Auto); + m_scrollView->setResizePolicy(TQScrollView::AutoOneFit); // Install the classic-style VBox widget in the widget-stack. @@ -93,16 +93,16 @@ void RosegardenParameterArea::addRosegardenParameterBox( // and outline, in classic mode. Add this container to an array that // parallels the above array of parameter boxes. - QVGroupBox *box = new QVGroupBox(b->getLongLabel(), m_classic); + TQVGroupBox *box = new TQVGroupBox(b->getLongLabel(), m_classic); box->layout()->setMargin( 4 ); // about half the default value - QFont f; + TQFont f; f.setBold( true ); box->setFont( f ); m_groupBoxes.push_back(box); if (m_spacing) delete m_spacing; - m_spacing = new QFrame(m_classic); + m_spacing = new TQFrame(m_classic); m_classic->setStretchFactor(m_spacing, 100); // Add the parameter box to the current container of the displayed @@ -120,7 +120,7 @@ void RosegardenParameterArea::setArrangement(Arrangement style) { // Lookup the container of the specified style. - QWidget *container; + TQWidget *container; switch (style) { case CLASSIC_STYLE: container = m_classic; @@ -149,7 +149,7 @@ void RosegardenParameterArea::setArrangement(Arrangement style) unsorted.insert(m_parameterBoxes[i]); } - QString previous = ""; + TQString previous = ""; while (!unsorted.empty()) { std::set<RosegardenParameterBox *>::iterator i = unsorted.begin(); @@ -191,8 +191,8 @@ void RosegardenParameterArea::setArrangement(Arrangement style) m_style = style; } -void RosegardenParameterArea::moveWidget(QWidget *old_container, - QWidget *new_container, +void RosegardenParameterArea::moveWidget(TQWidget *old_container, + TQWidget *new_container, RosegardenParameterBox *box) { // Remove any state that is associated with the parameter boxes, @@ -215,10 +215,10 @@ void RosegardenParameterArea::moveWidget(QWidget *old_container, ++index; } if (index < m_parameterBoxes.size()) { - box->reparent(m_groupBoxes[index], 0, QPoint(0, 0), FALSE); + box->reparent(m_groupBoxes[index], 0, TQPoint(0, 0), FALSE); } } else if (new_container == m_tabBox) { - box->reparent(new_container, 0, QPoint(0, 0), FALSE); + box->reparent(new_container, 0, TQPoint(0, 0), FALSE); m_tabBox->insertTab(box, box->getShortLabel()); } } diff --git a/src/gui/editors/parameters/RosegardenParameterArea.h b/src/gui/editors/parameters/RosegardenParameterArea.h index 1236a43..7af178a 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.h +++ b/src/gui/editors/parameters/RosegardenParameterArea.h @@ -28,14 +28,14 @@ #ifndef _RG_ROSEGARDENPARAMETERAREA_H_ #define _RG_ROSEGARDENPARAMETERAREA_H_ -#include <qwidgetstack.h> +#include <tqwidgetstack.h> #include <vector> -class QWidget; -class QVGroupBox; -class QVBox; -class QScrollView; +class TQWidget; +class TQVGroupBox; +class TQVBox; +class TQScrollView; class KTabWidget; @@ -56,7 +56,7 @@ public: // Create the parameter display area. - RosegardenParameterArea(QWidget *parent=0, const char *name=0, WFlags f=0); + RosegardenParameterArea(TQWidget *parent=0, const char *name=0, WFlags f=0); // Add a rosegarden parameter box to the list that are to be displayed. @@ -88,18 +88,18 @@ private: // corresponding parameter box widget needs to be enclosed by a // titled outline. - std::vector<QVGroupBox *> m_groupBoxes; + std::vector<TQVGroupBox *> m_groupBoxes; // Move a RosegardenParameterBox widget from one container to another. - void moveWidget(QWidget *old_container, QWidget *new_container, + void moveWidget(TQWidget *old_container, TQWidget *new_container, RosegardenParameterBox *box); - QScrollView *m_scrollView; // Holds the m_classic container - QVBox *m_classic; // The container widget for m_style==CLASSIC_STYLE. + TQScrollView *m_scrollView; // Holds the m_classic container + TQVBox *m_classic; // The container widget for m_style==CLASSIC_STYLE. KTabWidget *m_tabBox; // The container widget for m_style==TAB_BOX_STYLE. - QWidget *m_active; // The current container widget. - QWidget *m_spacing; + TQWidget *m_active; // The current container widget. + TQWidget *m_spacing; }; diff --git a/src/gui/editors/parameters/RosegardenParameterBox.cpp b/src/gui/editors/parameters/RosegardenParameterBox.cpp index 7d9100c..dbefda0 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.cpp +++ b/src/gui/editors/parameters/RosegardenParameterBox.cpp @@ -27,23 +27,23 @@ #include "RosegardenParameterArea.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { -RosegardenParameterBox::RosegardenParameterBox(const QString &shortLabel, - const QString &longLabel, - QWidget *parent, +RosegardenParameterBox::RosegardenParameterBox(const TQString &shortLabel, + const TQString &longLabel, + TQWidget *parent, const char *name) : - QFrame(parent, name), + TQFrame(parent, name), m_shortLabel(shortLabel), m_longLabel(longLabel), m_mode(LANDSCAPE_MODE) @@ -53,14 +53,14 @@ RosegardenParameterBox::RosegardenParameterBox(const QString &shortLabel, void RosegardenParameterBox::init() { - QFont plainFont; + TQFont plainFont; plainFont.setPointSize(plainFont.pointSize() * 95 / 100); if (plainFont.pixelSize() > 14) plainFont.setPixelSize(14); plainFont.setBold(false); m_font = plainFont; - QFont boldFont; + TQFont boldFont; boldFont.setPointSize(int(boldFont.pointSize() * 9.5 / 10.0 + 0.5)); if (boldFont.pixelSize() > 14) boldFont.setPixelSize(14); @@ -69,17 +69,17 @@ void RosegardenParameterBox::init() setFont(boldFont); } -QString RosegardenParameterBox::getShortLabel() const +TQString RosegardenParameterBox::getShortLabel() const { return m_shortLabel; } -QString RosegardenParameterBox::getLongLabel() const +TQString RosegardenParameterBox::getLongLabel() const { return m_longLabel; } -QString RosegardenParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement) const +TQString RosegardenParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement) const { // No ordering known -- depends on subclasses return ""; diff --git a/src/gui/editors/parameters/RosegardenParameterBox.h b/src/gui/editors/parameters/RosegardenParameterBox.h index 6f17358..629245f 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.h +++ b/src/gui/editors/parameters/RosegardenParameterBox.h @@ -27,13 +27,13 @@ #define _RG_ROSEGARDENPARAMETERBOX_H_ #include "RosegardenParameterArea.h" -#include <qfont.h> -#include <qframe.h> -#include <qstring.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -42,7 +42,7 @@ namespace Rosegarden /** - * A flat QFrame, in which a group of parameters can be laid out. + * A flat TQFrame, in which a group of parameters can be laid out. * Virtual method functions are defined for for requesting a layout * style, and returning the single-word to use for labelling the * box. @@ -52,19 +52,19 @@ class RosegardenParameterBox : public QFrame { Q_OBJECT public: - RosegardenParameterBox(const QString &shortLabel, // e.g. i18n("Track") - const QString &longLabel, // e.g. i18n("Track Parameters") - QWidget *parent = 0, + RosegardenParameterBox(const TQString &shortLabel, // e.g. i18n("Track") + const TQString &longLabel, // e.g. i18n("Track Parameters") + TQWidget *parent = 0, const char *name = 0); // Ask for a one-word string that can be used to label the widget. - QString getShortLabel() const; + TQString getShortLabel() const; // Ask for the full label (e.g. short-label "Parameters") - QString getLongLabel() const; + TQString getLongLabel() const; // Get the short label of the prior parameter box (to establish an ordering) - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; virtual void showAdditionalControls(bool) = 0; @@ -80,9 +80,9 @@ protected: void setLayoutMode(LayoutMode mode); - QFont m_font; - QString m_shortLabel; // The string that containers can use for labelling and identification - QString m_longLabel; // The full title + TQFont m_font; + TQString m_shortLabel; // The string that containers can use for labelling and identification + TQString m_longLabel; // The full title LayoutMode m_mode; // The current layout mode. }; diff --git a/src/gui/editors/parameters/SegmentParameterBox.cpp b/src/gui/editors/parameters/SegmentParameterBox.cpp index c17cbe2..23fce12 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.cpp +++ b/src/gui/editors/parameters/SegmentParameterBox.cpp @@ -24,7 +24,7 @@ #include "SegmentParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -61,30 +61,30 @@ #include <kconfig.h> #include <klineeditdlg.h> #include <ktabwidget.h> -#include <qbutton.h> -#include <qcheckbox.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qscrollview.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqbutton.h> +#include <tqcheckbox.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqscrollview.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Segment"), i18n("Segment Parameters"), parent), @@ -98,8 +98,8 @@ SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, m_doc->getComposition().addObserver(this); - connect(getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); } SegmentParameterBox::~SegmentParameterBox() @@ -112,48 +112,48 @@ SegmentParameterBox::~SegmentParameterBox() void SegmentParameterBox::initBox() { - QFont font(m_font); + TQFont font(m_font); - QFontMetrics fontMetrics(font); + TQFontMetrics fontMetrics(font); // magic numbers: 13 is the height of the menu pixmaps, 10 is just 10 //int comboHeight = std::max(fontMetrics.height(), 13) + 10; int width = fontMetrics.width("12345678901234567890"); - // QFrame *frame = new QFrame(this); - QGridLayout *gridLayout = new QGridLayout(this, 8, 6, 4, 2); + // TQFrame *frame = new TQFrame(this); + TQGridLayout *gridLayout = new TQGridLayout(this, 8, 6, 4, 2); - QLabel *label = new QLabel(i18n("Label"), this); - QLabel *repeatLabel = new QLabel(i18n("Repeat"), this); - QLabel *quantizeLabel = new QLabel(i18n("Quantize"), this); - QLabel *transposeLabel = new QLabel(i18n("Transpose"), this); - QLabel *delayLabel = new QLabel(i18n("Delay"), this); - QLabel *colourLabel = new QLabel(i18n("Color"), this); -// m_autoFadeLabel = new QLabel(i18n("Audio auto-fade"), this); -// m_fadeInLabel = new QLabel(i18n("Fade in"), this); -// m_fadeOutLabel = new QLabel(i18n("Fade out"), this); -// m_rangeLabel = new QLabel(i18n("Range"), this); + TQLabel *label = new TQLabel(i18n("Label"), this); + TQLabel *repeatLabel = new TQLabel(i18n("Repeat"), this); + TQLabel *quantizeLabel = new TQLabel(i18n("Quantize"), this); + TQLabel *transposeLabel = new TQLabel(i18n("Transpose"), this); + TQLabel *delayLabel = new TQLabel(i18n("Delay"), this); + TQLabel *colourLabel = new TQLabel(i18n("Color"), this); +// m_autoFadeLabel = new TQLabel(i18n("Audio auto-fade"), this); +// m_fadeInLabel = new TQLabel(i18n("Fade in"), this); +// m_fadeOutLabel = new TQLabel(i18n("Fade out"), this); +// m_rangeLabel = new TQLabel(i18n("Range"), this); // Label .. - m_label = new QLabel(this); + m_label = new TQLabel(this); m_label->setFont(font); m_label->setFixedWidth(width); //m_label->setFixedHeight(comboHeight); - m_label->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); // .. and edit button - m_labelButton = new QPushButton(i18n("Edit"), this); + m_labelButton = new TQPushButton(i18n("Edit"), this); m_labelButton->setFont(font); // m_labelButton->setFixedWidth(50); - connect(m_labelButton, SIGNAL(released()), - SLOT(slotEditSegmentLabel())); + connect(m_labelButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditSegmentLabel())); m_repeatValue = new TristateCheckBox(this); m_repeatValue->setFont(font); //m_repeatValue->setFixedHeight(comboHeight); // handle state changes - connect(m_repeatValue, SIGNAL(pressed()), SLOT(slotRepeatPressed())); + connect(m_repeatValue, TQT_SIGNAL(pressed()), TQT_SLOT(slotRepeatPressed())); // non-reversing motif style read-only combo m_quantizeValue = new KComboBox(this); @@ -161,8 +161,8 @@ SegmentParameterBox::initBox() //m_quantizeValue->setFixedHeight(comboHeight); // handle quantize changes from drop down - connect(m_quantizeValue, SIGNAL(activated(int)), - SLOT(slotQuantizeSelected(int))); + connect(m_quantizeValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotQuantizeSelected(int))); // reversing motif style read-write combo m_transposeValue = new KComboBox(this); @@ -170,12 +170,12 @@ SegmentParameterBox::initBox() //m_transposeValue->setFixedHeight(comboHeight); // handle transpose combo changes - connect(m_transposeValue, SIGNAL(activated(int)), - SLOT(slotTransposeSelected(int))); + connect(m_transposeValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTransposeSelected(int))); // and text changes - connect(m_transposeValue, SIGNAL(textChanged(const QString&)), - SLOT(slotTransposeTextChanged(const QString&))); + connect(m_transposeValue, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotTransposeTextChanged(const TQString&))); // reversing motif style read-write combo m_delayValue = new KComboBox(this); @@ -183,16 +183,16 @@ SegmentParameterBox::initBox() //m_delayValue->setFixedHeight(comboHeight); // handle delay combo changes - connect(m_delayValue, SIGNAL(activated(int)), - SLOT(slotDelaySelected(int))); + connect(m_delayValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotDelaySelected(int))); // Detect when the document colours are updated - connect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); // handle text changes for delay - connect(m_delayValue, SIGNAL(textChanged(const QString&)), - SLOT(slotDelayTextChanged(const QString &))); + connect(m_delayValue, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotDelayTextChanged(const TQString &))); // set up combo box for colours m_colourValue = new KComboBox(false, this); @@ -202,55 +202,55 @@ SegmentParameterBox::initBox() m_colourValue->setSizeLimit(20); // handle colour combo changes - connect(m_colourValue, SIGNAL(activated(int)), - SLOT(slotColourSelected(int))); + connect(m_colourValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColourSelected(int))); // pre-set width of buttons so they don't grow later // width = fontMetrics.width(i18n("used internally for spacing", "High: ----")); // highest playable note // -// m_highButton = new QPushButton(i18n("High: ---"), this); -// QToolTip::add +// m_highButton = new TQPushButton(i18n("High: ---"), this); +// TQToolTip::add // (m_highButton, i18n("Choose the highest suggested playable note, using a staff")); // m_highButton->setFont(font); // m_highButton->setMinimumWidth(width); -// connect(m_highButton, SIGNAL(released()), -// SLOT(slotHighestPressed())); +// connect(m_highButton, TQT_SIGNAL(released()), +// TQT_SLOT(slotHighestPressed())); // lowest playable note // -// m_lowButton = new QPushButton(i18n("Low: ----"), this); -// QToolTip::add +// m_lowButton = new TQPushButton(i18n("Low: ----"), this); +// TQToolTip::add // (m_lowButton, i18n("Choose the lowest suggested playable note, using a staff")); // m_lowButton->setFont(font); // m_lowButton->setMinimumWidth(width); -// connect(m_lowButton, SIGNAL(released()), -// SLOT(slotLowestPressed())); +// connect(m_lowButton, TQT_SIGNAL(released()), +// TQT_SLOT(slotLowestPressed())); // Audio autofade enabled // -// m_autoFadeBox = new QCheckBox(this); -// connect(m_autoFadeBox, SIGNAL(stateChanged(int)), -// this, SLOT(slotAudioFadeChanged(int))); +// m_autoFadeBox = new TQCheckBox(this); +// connect(m_autoFadeBox, TQT_SIGNAL(stateChanged(int)), +// this, TQT_SLOT(slotAudioFadeChanged(int))); // Fade in and out times // -// m_fadeInSpin = new QSpinBox(this); +// m_fadeInSpin = new TQSpinBox(this); // m_fadeInSpin->setMinValue(0); // m_fadeInSpin->setMaxValue(5000); // m_fadeInSpin->setSuffix(i18n(" ms")); -// connect(m_fadeInSpin, SIGNAL(valueChanged(int)), -// this, SLOT(slotFadeInChanged(int))); +// connect(m_fadeInSpin, TQT_SIGNAL(valueChanged(int)), +// this, TQT_SLOT(slotFadeInChanged(int))); -// m_fadeOutSpin = new QSpinBox(this); +// m_fadeOutSpin = new TQSpinBox(this); // m_fadeOutSpin->setMinValue(0); // m_fadeOutSpin->setMaxValue(5000); // m_fadeOutSpin->setSuffix(i18n(" ms")); -// connect(m_fadeOutSpin, SIGNAL(valueChanged(int)), -// this, SLOT(slotFadeOutChanged(int))); +// connect(m_fadeOutSpin, TQT_SIGNAL(valueChanged(int)), +// this, TQT_SLOT(slotFadeOutChanged(int))); label->setFont(font); repeatLabel->setFont(font); @@ -315,14 +315,14 @@ SegmentParameterBox::initBox() // populate the quantize combo // - QPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeValue->insertItem(error ? noMap : pmap, label); } m_quantizeValue->insertItem(noMap, i18n("Off")); @@ -333,7 +333,7 @@ SegmentParameterBox::initBox() // populate the transpose combo // for (int i = -m_transposeRange; i < m_transposeRange + 1; i++) { - m_transposeValue->insertItem(noMap, QString("%1").arg(i)); + m_transposeValue->insertItem(noMap, TQString("%1").arg(i)); if (i == 0) m_transposeValue->setCurrentItem(m_transposeValue->count() - 1); } @@ -355,8 +355,8 @@ SegmentParameterBox::initBox() // resolution it might not be) & include a note pixmap if so // timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_delayValue->insertItem((error ? noMap : pmap), label); } @@ -384,14 +384,14 @@ void SegmentParameterBox::setDocument(RosegardenGUIDoc* doc) { if (m_doc != 0) - disconnect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + disconnect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); m_doc = doc; // Detect when the document colours are updated - connect (m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect (m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); slotDocColoursChanged(); // repopulate combo } @@ -428,8 +428,8 @@ SegmentParameterBox::slotDocColoursChanged() unsigned int i = 0; for (RCMap::const_iterator it = temp.begin(); it != temp.end(); ++it) { - QString qtrunc(strtoqstr(it->second.second)); - QPixmap colour(15, 15); + TQString qtrunc(strtoqstr(it->second.second)); + TQPixmap colour(15, 15); colour.fill(GUIPalette::convertColour(it->second.first)); if (qtrunc == "") { m_colourValue->insertItem(colour, i18n("Default"), i); @@ -666,11 +666,11 @@ SegmentParameterBox::populateBoxFromSegments() // 2nd arg of "true" means "add if necessary" case All: m_transposeValue-> - setCurrentItem(QString("%1").arg(transposeLevel), true); + setCurrentItem(TQString("%1").arg(transposeLevel), true); break; case Some: - m_transposeValue->setCurrentItem(QString(""), true); + m_transposeValue->setCurrentItem(TQString(""), true); break; case None: @@ -687,7 +687,7 @@ SegmentParameterBox::populateBoxFromSegments() case All: if (delayLevel >= 0) { timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(delayLevel, + TQString label = NotationStrings::makeNoteMenuLabel(delayLevel, true, error); m_delayValue->setCurrentItem(label, true); @@ -834,12 +834,12 @@ void SegmentParameterBox::slotRepeatPressed() bool state = false; switch (m_repeatValue->state()) { - case QButton::Off: + case TQButton::Off: state = true; break; - case QButton::NoChange: - case QButton::On: + case TQButton::NoChange: + case TQButton::On: default: state = false; break; @@ -874,7 +874,7 @@ SegmentParameterBox::slotQuantizeSelected(int qLevel) } void -SegmentParameterBox::slotTransposeTextChanged(const QString &text) +SegmentParameterBox::slotTransposeTextChanged(const TQString &text) { if (text.isEmpty() || m_segments.size() == 0) return ; @@ -934,7 +934,7 @@ SegmentParameterBox::slotDelayTimeChanged(timeT delayValue) } void -SegmentParameterBox::slotDelayTextChanged(const QString &text) +SegmentParameterBox::slotDelayTextChanged(const TQString &text) { if (text.isEmpty() || m_segments.size() == 0) return ; @@ -978,9 +978,9 @@ SegmentParameterBox::slotColourSelected(int value) addCommandToHistory(command); } else { ColourMap newMap = m_doc->getComposition().getSegmentColourMap(); - QColor newColour; + TQColor newColour; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), i18n("New"), &ok); if ((ok == true) && (!newName.isEmpty())) { KColorDialog box(this, "", true); @@ -1019,8 +1019,8 @@ SegmentParameterBox::updateHighLow() //!!! FIXME this code is broken, and needs to be fixed after the fashion of //the TPB, but I'm not bothering with that at this time, because they are //going to be hidden for 1.3 anyway -// m_highButton->setText(QString("&High: %1%2").arg(highest.getNoteName(key)).arg(highest.getOctave(base))); -// m_lowButton->setText(QString("&Low: %1%2").arg(lowest.getNoteName(key)).arg(lowest.getOctave(base))); +// m_highButton->setText(TQString("&High: %1%2").arg(highest.getNoteName(key)).arg(highest.getOctave(base))); +// m_lowButton->setText(TQString("&Low: %1%2").arg(lowest.getNoteName(key)).arg(lowest.getOctave(base))); } void @@ -1031,7 +1031,7 @@ SegmentParameterBox::slotHighestPressed() PitchPickerDialog dialog(0, m_highestPlayable, i18n("Highest playable note")); std::vector<Segment*>::iterator it; - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_highestPlayable = dialog.getPitch(); updateHighLow(); @@ -1051,7 +1051,7 @@ SegmentParameterBox::slotLowestPressed() PitchPickerDialog dialog(0, m_lowestPlayable, i18n("Lowest playable note")); std::vector<Segment*>::iterator it; - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_lowestPlayable = dialog.getPitch(); updateHighLow(); @@ -1078,7 +1078,7 @@ SegmentParameterBox::addCommandToHistory(KCommand *command) void SegmentParameterBox::slotEditSegmentLabel() { - QString editLabel; + TQString editLabel; if (m_segments.size() == 0) return ; @@ -1091,11 +1091,11 @@ SegmentParameterBox::slotEditSegmentLabel() // Remove the asterisk if we're using it // - QString label = m_label->text(); + TQString label = m_label->text(); if (label == "*") label = ""; - QString newLabel = KLineEditDlg::getText(editLabel, + TQString newLabel = KLineEditDlg::getText(editLabel, i18n("Enter new label"), m_label->text(), &ok, @@ -1127,7 +1127,7 @@ SegmentParameterBox::slotAudioFadeChanged(int value) return ; bool state = false; - if (value == QButton::On) + if (value == TQButton::On) state = true; std::vector<Segment*>::iterator it; @@ -1147,9 +1147,9 @@ SegmentParameterBox::slotFadeInChanged(int value) return ; if (value == 0 && m_fadeOutSpin->value() == 0) - slotAudioFadeChanged(QButton::Off); + slotAudioFadeChanged(TQButton::Off); else - slotAudioFadeChanged(QButton::On); + slotAudioFadeChanged(TQButton::On); // Convert from ms // @@ -1174,9 +1174,9 @@ SegmentParameterBox::slotFadeOutChanged(int value) return ; if (value == 0 && m_fadeInSpin->value() == 0) - slotAudioFadeChanged(QButton::Off); + slotAudioFadeChanged(TQButton::Off); else - slotAudioFadeChanged(QButton::On); + slotAudioFadeChanged(TQButton::On); // Convert from ms // diff --git a/src/gui/editors/parameters/SegmentParameterBox.h b/src/gui/editors/parameters/SegmentParameterBox.h index a8b0353..0a7a266 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.h +++ b/src/gui/editors/parameters/SegmentParameterBox.h @@ -31,16 +31,16 @@ #include "gui/widgets/ColourTable.h" #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QSpinBox; -class QPushButton; -class QLabel; -class QCheckBox; +class TQWidget; +class TQSpinBox; +class TQPushButton; +class TQLabel; +class TQCheckBox; class KCommand; class KComboBox; @@ -72,7 +72,7 @@ public: } Tristate; SegmentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent=0); + TQWidget *parent=0); ~SegmentParameterBox(); // Use Segments to update GUI parameters @@ -93,18 +93,18 @@ public: virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: void slotRepeatPressed(); void slotQuantizeSelected(int); void slotTransposeSelected(int); - void slotTransposeTextChanged(const QString &); + void slotTransposeTextChanged(const TQString &); void slotDelaySelected(int); void slotDelayTimeChanged(timeT delayValue); - void slotDelayTextChanged(const QString &); + void slotDelayTextChanged(const TQString &); void slotEditSegmentLabel(); @@ -129,11 +129,11 @@ protected: void populateBoxFromSegments(); void updateHighLow(); - QLabel *m_label; -// QLabel *m_rangeLabel; - QPushButton *m_labelButton; -// QPushButton *m_highButton; -// QPushButton *m_lowButton; + TQLabel *m_label; +// TQLabel *m_rangeLabel; + TQPushButton *m_labelButton; +// TQPushButton *m_highButton; +// TQPushButton *m_lowButton; TristateCheckBox *m_repeatValue; KComboBox *m_quantizeValue; KComboBox *m_transposeValue; @@ -142,12 +142,12 @@ protected: // Audio autofade // -// QLabel *m_autoFadeLabel; -// QCheckBox *m_autoFadeBox; -// QLabel *m_fadeInLabel; -// QSpinBox *m_fadeInSpin; -// QLabel *m_fadeOutLabel; -// QSpinBox *m_fadeOutSpin; +// TQLabel *m_autoFadeLabel; +// TQCheckBox *m_autoFadeBox; +// TQLabel *m_fadeInLabel; +// TQSpinBox *m_fadeInSpin; +// TQLabel *m_fadeOutLabel; +// TQSpinBox *m_fadeOutSpin; int m_addColourPos; diff --git a/src/gui/editors/parameters/TrackParameterBox.cpp b/src/gui/editors/parameters/TrackParameterBox.cpp index fc85346..3ddfa69 100644 --- a/src/gui/editors/parameters/TrackParameterBox.cpp +++ b/src/gui/editors/parameters/TrackParameterBox.cpp @@ -28,7 +28,7 @@ #include "TrackParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -66,29 +66,29 @@ #include <kmessagebox.h> #include <ksqueezedtextlabel.h> #include <ktabwidget.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qcheckbox.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqcheckbox.h> namespace Rosegarden { TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Track"), i18n("Track Parameters"), parent), @@ -97,9 +97,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, m_lowestPlayable(0), m_selectedTrackId( -1) { - QFont font(m_font); - QFont title_font(m_font); - QFontMetrics metrics(font); + TQFont font(m_font); + TQFont title_font(m_font); + TQFontMetrics metrics(font); int width11 = metrics.width("12345678901"); int width20 = metrics.width("12345678901234567890"); int width22 = metrics.width("1234567890123456789012"); @@ -109,7 +109,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // Set up default expansions for the collapsing elements KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); bool expanded = config->readBoolEntry("trackparametersplayback", true); config->writeEntry("trackparametersplayback", expanded); @@ -121,7 +121,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, config->writeEntry("trackstaffgroup", expanded); config->setGroup(groupTemp); - QGridLayout *mainLayout = new QGridLayout(this, 5, 1, 2, 1); + TQGridLayout *mainLayout = new TQGridLayout(this, 5, 1, 2, 1); int row = 0; @@ -136,9 +136,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // CollapsingFrame *cframe = new CollapsingFrame(i18n("Playback parameters"), this, "trackparametersplayback"); - m_playbackGroup = new QFrame(cframe); + m_playbackGroup = new TQFrame(cframe); cframe->setWidget(m_playbackGroup); - QGridLayout *groupLayout = new QGridLayout(m_playbackGroup, 3, 3, 3, 2); + TQGridLayout *groupLayout = new TQGridLayout(m_playbackGroup, 3, 3, 3, 2); // playback group title // @@ -147,7 +147,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // playback device // // row++; - QLabel *devLabel = new QLabel(i18n("Device"), m_playbackGroup); + TQLabel *devLabel = new TQLabel(i18n("Device"), m_playbackGroup); groupLayout->addWidget(devLabel, row, 0); m_playDevice = new KComboBox(m_playbackGroup); m_playDevice->setMinimumWidth(width25); @@ -156,7 +156,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // playback instrument // row++; - QLabel *insLabel = new QLabel(i18n("Instrument"), m_playbackGroup); + TQLabel *insLabel = new TQLabel(i18n("Instrument"), m_playbackGroup); groupLayout->addMultiCellWidget(insLabel, row, row, 0, 1); m_instrument = new KComboBox(m_playbackGroup); m_instrument->setSizeLimit( 16 ); @@ -171,16 +171,16 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Recording filters"), this, "trackparametersrecord"); - m_recordGroup = new QFrame(cframe); + m_recordGroup = new TQFrame(cframe); cframe->setWidget(m_recordGroup); - groupLayout = new QGridLayout(m_recordGroup, 3, 3, 3, 2); + groupLayout = new TQGridLayout(m_recordGroup, 3, 3, 3, 2); // recording group title // row = 0; // recording device - groupLayout->addWidget(new QLabel(i18n("Device"), m_recordGroup), row, 0); + groupLayout->addWidget(new TQLabel(i18n("Device"), m_recordGroup), row, 0); m_recDevice = new KComboBox(m_recordGroup); m_recDevice->setMinimumWidth(width25); groupLayout->addMultiCellWidget(m_recDevice, row, row, 1, 2); @@ -188,7 +188,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // recording channel // row++; - groupLayout->addMultiCellWidget(new QLabel(i18n("Channel"), m_recordGroup), row, row, 0, 1); + groupLayout->addMultiCellWidget(new TQLabel(i18n("Channel"), m_recordGroup), row, row, 0, 1); m_recChannel = new KComboBox(m_recordGroup); m_recChannel->setSizeLimit( 17 ); m_recChannel->setMinimumWidth(width11); @@ -202,9 +202,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Staff export options"), this, "staffoptions"); - m_staffGroup = new QFrame(cframe); + m_staffGroup = new TQFrame(cframe); cframe->setWidget(m_staffGroup); - groupLayout = new QGridLayout(m_staffGroup, 2, 2, 2, 2); + groupLayout = new TQGridLayout(m_staffGroup, 2, 2, 2, 2); groupLayout->setColStretch(1, 1); @@ -217,7 +217,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // per-staff (rather than per-score) basis is something the author of the // LilyPond documentation has no idea how to do, so we settle for this, // which is not as nice, but actually a lot easier to implement. - m_staffGrpLbl = new QLabel(i18n("Notation size:"), m_staffGroup); + m_staffGrpLbl = new TQLabel(i18n("Notation size:"), m_staffGroup); groupLayout->addWidget(m_staffGrpLbl, row, 0, AlignLeft); m_staffSizeCombo = new KComboBox(m_staffGroup); m_staffSizeCombo->setMinimumWidth(width11); @@ -230,7 +230,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // Staff bracketing (export only at the moment, but using this for GUI // rendering would be nice in the future!) //!!! row++; - m_grandStaffLbl = new QLabel(i18n("Bracket type:"), m_staffGroup); + m_grandStaffLbl = new TQLabel(i18n("Bracket type:"), m_staffGroup); groupLayout->addWidget(m_grandStaffLbl, row, 0, AlignLeft); m_staffBracketCombo = new KComboBox(m_staffGroup); m_staffBracketCombo->setMinimumWidth(width11); @@ -252,30 +252,30 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Create segments with"), this, "trackparametersdefaults"); - m_defaultsGroup = new QFrame(cframe); + m_defaultsGroup = new TQFrame(cframe); cframe->setWidget(m_defaultsGroup); - groupLayout = new QGridLayout(m_defaultsGroup, 6, 6, 3, 2); + groupLayout = new TQGridLayout(m_defaultsGroup, 6, 6, 3, 2); groupLayout->setColStretch(1, 1); row = 0; // preset picker - m_psetLbl = new QLabel(i18n("Preset"), m_defaultsGroup); + m_psetLbl = new TQLabel(i18n("Preset"), m_defaultsGroup); groupLayout->addWidget(m_psetLbl, row, 0, AlignLeft); - m_presetLbl = new QLabel(i18n("<none>"), m_defaultsGroup); - m_presetLbl->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_presetLbl = new TQLabel(i18n("<none>"), m_defaultsGroup); + m_presetLbl->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); m_presetLbl->setFixedWidth(width20); groupLayout->addMultiCellWidget(m_presetLbl, row, row, 1, 3); - m_presetButton = new QPushButton(i18n("Load"), m_defaultsGroup); + m_presetButton = new TQPushButton(i18n("Load"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_presetButton, row, row, 4, 5); // default clef // row++; - m_clefLbl = new QLabel(i18n("Clef"), m_defaultsGroup); + m_clefLbl = new TQLabel(i18n("Clef"), m_defaultsGroup); groupLayout->addWidget(m_clefLbl, row, 0, AlignLeft); m_defClef = new KComboBox(m_defaultsGroup); m_defClef->setMinimumWidth(width11); @@ -302,16 +302,16 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // default transpose // - m_transpLbl = new QLabel(i18n("Transpose"), m_defaultsGroup); + m_transpLbl = new TQLabel(i18n("Transpose"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_transpLbl, row, row, 3, 4, AlignRight); m_defTranspose = new KComboBox(m_defaultsGroup); - connect(m_defTranspose, SIGNAL(activated(int)), - SLOT(slotTransposeIndexChanged(int))); + connect(m_defTranspose, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTransposeIndexChanged(int))); int transposeRange = 48; for (int i = -transposeRange; i < transposeRange + 1; i++) { - m_defTranspose->insertItem(QString("%1").arg(i)); + m_defTranspose->insertItem(TQString("%1").arg(i)); if (i == 0) m_defTranspose->setCurrentItem(m_defTranspose->count() - 1); } @@ -321,20 +321,20 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // highest/lowest playable note // row++; - m_rangeLbl = new QLabel(i18n("Pitch"), m_defaultsGroup); + m_rangeLbl = new TQLabel(i18n("Pitch"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_rangeLbl, row, row, 0, 0); - groupLayout->addWidget(new QLabel(i18n("Lowest"), m_defaultsGroup), row, 1, AlignRight); + groupLayout->addWidget(new TQLabel(i18n("Lowest"), m_defaultsGroup), row, 1, AlignRight); - m_lowButton = new QPushButton(i18n("---"), m_defaultsGroup); - QToolTip::add + m_lowButton = new TQPushButton(i18n("---"), m_defaultsGroup); + TQToolTip::add (m_lowButton, i18n("Choose the lowest suggested playable note, using a staff")); groupLayout->addMultiCellWidget(m_lowButton, row, row, 2, 2); - groupLayout->addWidget(new QLabel(i18n("Highest"), m_defaultsGroup), row, 3, AlignRight); + groupLayout->addWidget(new TQLabel(i18n("Highest"), m_defaultsGroup), row, 3, AlignRight); - m_highButton = new QPushButton(i18n("---"), m_defaultsGroup); - QToolTip::add + m_highButton = new TQPushButton(i18n("---"), m_defaultsGroup); + TQToolTip::add (m_highButton, i18n("Choose the highest suggested playable note, using a staff")); groupLayout->addMultiCellWidget(m_highButton, row, row, 4, 5); @@ -343,7 +343,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // default color // row++; - m_colorLbl = new QLabel(i18n("Color"), m_defaultsGroup); + m_colorLbl = new TQLabel(i18n("Color"), m_defaultsGroup); groupLayout->addWidget(m_colorLbl, row, 0, AlignLeft); m_defColor = new KComboBox(false, m_defaultsGroup); m_defColor->setSizeLimit(20); @@ -361,43 +361,43 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, mainLayout->setRowStretch(mainLayout->numRows() - 1, 1); // Connections - connect( m_playDevice, SIGNAL(activated(int)), - this, SLOT(slotPlaybackDeviceChanged(int))); + connect( m_playDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPlaybackDeviceChanged(int))); - connect( m_instrument, SIGNAL(activated(int)), - this, SLOT(slotInstrumentChanged(int))); + connect( m_instrument, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotInstrumentChanged(int))); - connect( m_recDevice, SIGNAL(activated(int)), - this, SLOT(slotRecordingDeviceChanged(int))); + connect( m_recDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotRecordingDeviceChanged(int))); - connect( m_recChannel, SIGNAL(activated(int)), - this, SLOT(slotRecordingChannelChanged(int))); + connect( m_recChannel, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotRecordingChannelChanged(int))); - connect( m_defClef, SIGNAL(activated(int)), - this, SLOT(slotClefChanged(int))); + connect( m_defClef, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotClefChanged(int))); // Detect when the document colours are updated - connect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); // handle colour combo changes - connect(m_defColor, SIGNAL(activated(int)), - SLOT(slotColorChanged(int))); + connect(m_defColor, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColorChanged(int))); - connect(m_highButton, SIGNAL(released()), - SLOT(slotHighestPressed())); + connect(m_highButton, TQT_SIGNAL(released()), + TQT_SLOT(slotHighestPressed())); - connect(m_lowButton, SIGNAL(released()), - SLOT(slotLowestPressed())); + connect(m_lowButton, TQT_SIGNAL(released()), + TQT_SLOT(slotLowestPressed())); - connect(m_presetButton, SIGNAL(released()), - SLOT(slotPresetPressed())); + connect(m_presetButton, TQT_SIGNAL(released()), + TQT_SLOT(slotPresetPressed())); - connect(m_staffSizeCombo, SIGNAL(activated(int)), - this, SLOT(slotStaffSizeChanged(int))); + connect(m_staffSizeCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotStaffSizeChanged(int))); - connect(m_staffBracketCombo, SIGNAL(activated(int)), - this, SLOT(slotStaffBracketChanged(int))); + connect(m_staffBracketCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotStaffBracketChanged(int))); } TrackParameterBox::~TrackParameterBox() @@ -446,9 +446,9 @@ TrackParameterBox::populatePlaybackDeviceList() if (! (*it)) continue; // sanity check - //QString iname(strtoqstr((*it)->getPresentationName())); - QString iname(strtoqstr((*it)->getName())); - QString pname(strtoqstr((*it)->getProgramName())); + //TQString iname(strtoqstr((*it)->getPresentationName())); + TQString iname(strtoqstr((*it)->getName())); + TQString pname(strtoqstr((*it)->getProgramName())); Device *device = (*it)->getDevice(); DeviceId devId = device->getId(); @@ -459,16 +459,16 @@ TrackParameterBox::populatePlaybackDeviceList() (Instrument::SYNTH_PLUGIN_POSITION); if (plugin) { pname = strtoqstr(plugin->getProgram()); - QString identifier = strtoqstr(plugin->getIdentifier()); + TQString identifier = strtoqstr(plugin->getIdentifier()); if (identifier != "") { - 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; } @@ -478,7 +478,7 @@ TrackParameterBox::populatePlaybackDeviceList() if (devId != (DeviceId)(currentDevId)) { currentDevId = int(devId); - QString deviceName = strtoqstr(device->getName()); + TQString deviceName = strtoqstr(device->getName()); m_playDevice->insertItem(deviceName); m_playDeviceIds.push_back(currentDevId); } @@ -545,9 +545,9 @@ TrackParameterBox::populateRecordingDeviceList() if (dev) { if (dev->getDirection() == MidiDevice::Record && dev->isRecording()) { - QString connection = strtoqstr(dev->getConnection()); + TQString connection = strtoqstr(dev->getConnection()); // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(QRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); m_recDevice->insertItem(connection); m_recDeviceIds.push_back(dev->getId()); } @@ -556,7 +556,7 @@ TrackParameterBox::populateRecordingDeviceList() m_recChannel->insertItem(i18n("All")); for (int i = 1; i < 17; ++i) { - m_recChannel->insertItem(QString::number(i)); + m_recChannel->insertItem(TQString::number(i)); } m_recDevice->setEnabled(true); @@ -603,8 +603,8 @@ TrackParameterBox::updateHighLow() // m_highButton->setText(i18n("High: %1").arg(highest.getAsString(useSharps, includeOctave, base))); // m_lowButton->setText(i18n("Low: %1").arg(lowest.getAsString(useSharps, includeOctave, base))); - m_highButton->setText(QString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); - m_lowButton->setText(QString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); + m_highButton->setText(TQString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); + m_lowButton->setText(TQString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); m_presetLbl->setEnabled(false); } @@ -624,7 +624,7 @@ TrackParameterBox::slotUpdateControls(int /*dummy*/) return ; m_defClef->setCurrentItem(trk->getClef()); - m_defTranspose->setCurrentItem(QString("%1").arg(trk->getTranspose()), true); + m_defTranspose->setCurrentItem(TQString("%1").arg(trk->getTranspose()), true); m_defColor->setCurrentItem(trk->getColor()); m_highestPlayable = trk->getHighestPlayable(); m_lowestPlayable = trk->getLowestPlayable(); @@ -657,7 +657,7 @@ TrackParameterBox::slotSelectedTrackNameChanged() RG_DEBUG << "TrackParameterBox::sotSelectedTrackNameChanged()\n"; Composition &comp = m_doc->getComposition(); Track *trk = comp.getTrackById(m_selectedTrackId); - QString m_trackName = trk->getLabel(); + TQString m_trackName = trk->getLabel(); if (m_trackName.isEmpty()) m_trackName = i18n("<untitled>"); else @@ -782,7 +782,7 @@ TrackParameterBox::slotRecordingChannelChanged(int index) } void -TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, QString label) +TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, TQString label) { RG_DEBUG << "TrackParameterBox::slotInstrumentLabelChanged(" << id << ") = " << label << "\n"; populatePlaybackDeviceList(); @@ -822,7 +822,7 @@ TrackParameterBox::slotTransposeIndexChanged(int index) } void -TrackParameterBox::slotTransposeTextChanged(QString text) +TrackParameterBox::slotTransposeTextChanged(TQString text) { if (text.isEmpty()) return ; @@ -843,8 +843,8 @@ TrackParameterBox::slotDocColoursChanged() unsigned int i = 0; for (RCMap::const_iterator it = temp.begin(); it != temp.end(); ++it) { - QString qtrunc(strtoqstr(it->second.second)); - QPixmap colour(15, 15); + TQString qtrunc(strtoqstr(it->second.second)); + TQPixmap colour(15, 15); colour.fill(GUIPalette::convertColour(it->second.first)); if (qtrunc == "") { m_defColor->insertItem(colour, i18n("Default"), i); @@ -877,9 +877,9 @@ TrackParameterBox::slotColorChanged(int index) if (index == m_addColourPos) { ColourMap newMap = m_doc->getComposition().getSegmentColourMap(); - QColor newColour; + TQColor newColour; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), i18n("New"), &ok); if ((ok == true) && (!newName.isEmpty())) { KColorDialog box(this, "", true); @@ -909,7 +909,7 @@ TrackParameterBox::slotHighestPressed() PitchPickerDialog dialog(0, m_highestPlayable, i18n("Highest playable note")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_highestPlayable = dialog.getPitch(); updateHighLow(); } @@ -929,7 +929,7 @@ TrackParameterBox::slotLowestPressed() PitchPickerDialog dialog(0, m_lowestPlayable, i18n("Lowest playable note")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_lowestPlayable = dialog.getPitch(); updateHighLow(); } @@ -950,7 +950,7 @@ TrackParameterBox::slotPresetPressed() PresetHandlerDialog dialog(this); try { - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_presetLbl->setText(dialog.getName()); trk->setPresetLabel(dialog.getName()); if (dialog.getConvertAllSegments()) { @@ -962,7 +962,7 @@ TrackParameterBox::slotPresetPressed() m_doc->getCommandHistory()->addCommand(command); } m_defClef->setCurrentItem(dialog.getClef()); - m_defTranspose->setCurrentItem(QString("%1").arg + m_defTranspose->setCurrentItem(TQString("%1").arg (dialog.getTranspose()), true); m_highestPlayable = dialog.getHighRange(); diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h index c5fa0f9..696e3f7 100644 --- a/src/gui/editors/parameters/TrackParameterBox.h +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -35,17 +35,17 @@ #include <map> #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> -#include <qcheckbox.h> // #include <QCheckBox> in QT4, thinking ahead +#include <tqstring.h> +#include <tqcheckbox.h> // #include <TQCheckBox> in QT4, thinking ahead #include <vector> -class QWidget; -class QPushButton; -class QLabel; -class QFrame; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQFrame; class KComboBox; -class QCheckBox; +class TQCheckBox; namespace Rosegarden @@ -60,14 +60,14 @@ Q_OBJECT public: TrackParameterBox( RosegardenGUIDoc *doc, - QWidget *parent=0); + TQWidget *parent=0); ~TrackParameterBox(); void setDocument( RosegardenGUIDoc *doc ); void populateDeviceLists(); virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: void slotSelectedTrackChanged(); @@ -77,12 +77,12 @@ public slots: void slotRecordingDeviceChanged(int index); void slotRecordingChannelChanged(int index); void slotUpdateControls(int); - void slotInstrumentLabelChanged(InstrumentId id, QString label); + void slotInstrumentLabelChanged(InstrumentId id, TQString label); void slotClefChanged(int clef); void slotTransposeChanged(int transpose); void slotTransposeIndexChanged(int index); - void slotTransposeTextChanged(QString text); + void slotTransposeTextChanged(TQString text); void slotDocColoursChanged(); void slotColorChanged(int index); void slotHighestPressed(); @@ -108,9 +108,9 @@ private: KComboBox *m_recDevice; KComboBox *m_recChannel; - QPushButton *m_presetButton; - QPushButton *m_highButton; - QPushButton *m_lowButton; + TQPushButton *m_presetButton; + TQPushButton *m_highButton; + TQPushButton *m_lowButton; KComboBox *m_defClef; KComboBox *m_defColor; @@ -124,7 +124,7 @@ private: int m_lowestPlayable; ColourTable::ColourList m_colourList; - QLabel *m_trackLabel; + TQLabel *m_trackLabel; typedef std::vector<DeviceId> IdsVector; @@ -132,27 +132,27 @@ private: IdsVector m_recDeviceIds; std::map<DeviceId, IdsVector> m_instrumentIds; - std::map<DeviceId, QStringList> m_instrumentNames; + std::map<DeviceId, TQStringList> m_instrumentNames; int m_selectedTrackId; char m_lastInstrumentType; // Additional elements that may be hidden in vertical stacked mode - //QFrame *m_separator2; - QFrame *m_playbackGroup; - QFrame *m_recordGroup; - QFrame *m_defaultsGroup; - QFrame *m_staffGroup; - QLabel *m_segHeader; - QLabel *m_presetLbl; - QLabel *m_staffGrpLbl; - QLabel *m_grandStaffLbl; - QLabel *m_clefLbl; - QLabel *m_transpLbl; - QLabel *m_colorLbl; - QLabel *m_rangeLbl; - QLabel *m_psetLbl; + //TQFrame *m_separator2; + TQFrame *m_playbackGroup; + TQFrame *m_recordGroup; + TQFrame *m_defaultsGroup; + TQFrame *m_staffGroup; + TQLabel *m_segHeader; + TQLabel *m_presetLbl; + TQLabel *m_staffGrpLbl; + TQLabel *m_grandStaffLbl; + TQLabel *m_clefLbl; + TQLabel *m_transpLbl; + TQLabel *m_colorLbl; + TQLabel *m_rangeLbl; + TQLabel *m_psetLbl; }; 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 --------------------------------- diff --git a/src/gui/editors/tempo/TempoListItem.cpp b/src/gui/editors/tempo/TempoListItem.cpp index d088b5b..821c329 100644 --- a/src/gui/editors/tempo/TempoListItem.cpp +++ b/src/gui/editors/tempo/TempoListItem.cpp @@ -27,10 +27,10 @@ namespace Rosegarden { int -TempoListItem::compare(QListViewItem *i, int col, bool ascending) const +TempoListItem::compare(TQListViewItem *i, int col, bool ascending) const { TempoListItem *ti = dynamic_cast<TempoListItem *>(i); - if (!ti) return QListViewItem::compare(i, col, ascending); + if (!ti) return TQListViewItem::compare(i, col, ascending); if (col == 0) { // time if (m_time == ti->m_time) { diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h index 143edde..640b7b1 100644 --- a/src/gui/editors/tempo/TempoListItem.h +++ b/src/gui/editors/tempo/TempoListItem.h @@ -43,10 +43,10 @@ public: timeT time, int index, KListView *parent, - QString label1, - QString label2, - QString label3, - QString label4 = QString::null) : + TQString label1, + TQString label2, + TQString label3, + TQString label4 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4), m_composition(composition), m_type(type), @@ -58,7 +58,7 @@ public: Rosegarden::timeT getTime() const { return m_time; } int getIndex() const { return m_index; } - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: Rosegarden::Composition *m_composition; diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp index 6ff6c1d..c3bc23e 100644 --- a/src/gui/editors/tempo/TempoView.cpp +++ b/src/gui/editors/tempo/TempoView.cpp @@ -49,17 +49,17 @@ #include <kconfig.h> #include <klistview.h> #include <kxmlguiclient.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qsize.h> -#include <qstring.h> -#include <qlayout.h> -#include <qcanvas.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqcanvas.h> #include <kstatusbar.h> @@ -70,7 +70,7 @@ int TempoView::m_lastSetFilter = -1; -TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): +TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"), m_filter(Tempo | TimeSignature), m_ignoreUpdates(true) @@ -86,16 +86,16 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): // define some note filtering buttons in a group // m_filterGroup = - new QButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); + new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); - m_tempoCheckBox = new QCheckBox(i18n("Tempo"), m_filterGroup); - m_timeSigCheckBox = new QCheckBox(i18n("Time Signature"), m_filterGroup); + m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup); + m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup); m_grid->addWidget(m_filterGroup, 2, 0); // Connect up // - connect(m_filterGroup, SIGNAL(released(int)), - SLOT(slotModifyFilter(int))); + connect(m_filterGroup, TQT_SIGNAL(released(int)), + TQT_SLOT(slotModifyFilter(int))); m_list = new KListView(getCentralWidget()); m_list->setItemsRenameable(true); @@ -108,11 +108,11 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): // Connect double clicker // - connect(m_list, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotPopupEditor(QListViewItem*))); + connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotPopupEditor(TQListViewItem*))); m_list->setAllColumnsShowFocus(true); - m_list->setSelectionMode(QListView::Extended); + m_list->setSelectionMode(TQListView::Extended); m_list->addColumn(i18n("Time ")); m_list->addColumn(i18n("Type ")); @@ -140,7 +140,7 @@ TempoView::~TempoView() } void -TempoView::closeEvent(QCloseEvent *e) +TempoView::closeEvent(TQCloseEvent *e) { emit closing(); EditViewBase::closeEvent(e); @@ -174,11 +174,11 @@ TempoView::applyLayout(int /*staffNo*/) // of the view. This code borrowed from EventView. // if (m_listSelection.size() == 0) { - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count()) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_list->itemIndex(*it)); @@ -202,7 +202,7 @@ TempoView::applyLayout(int /*staffNo*/) std::pair<timeT, Rosegarden::TimeSignature> sig = comp->getTimeSignatureChange(i); - QString properties; + TQString properties; if (sig.second.isHidden()) { if (sig.second.isCommon()) properties = i18n("Common, hidden"); @@ -213,12 +213,12 @@ TempoView::applyLayout(int /*staffNo*/) properties = i18n("Common"); } - QString timeString = makeTimeString(sig.first, timeMode); + TQString timeString = makeTimeString(sig.first, timeMode); new TempoListItem(comp, TempoListItem::TimeSignature, sig.first, i, m_list, timeString, i18n("Time Signature "), - QString("%1/%2 ").arg(sig.second.getNumerator()). + TQString("%1/%2 ").arg(sig.second.getNumerator()). arg(sig.second.getDenominator()), properties); } @@ -230,7 +230,7 @@ TempoView::applyLayout(int /*staffNo*/) std::pair<timeT, tempoT> tempo = comp->getTempoChange(i); - QString desc; + TQString desc; //!!! imprecise -- better to work from tempoT directly @@ -257,7 +257,7 @@ TempoView::applyLayout(int /*staffNo*/) arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths); } - QString timeString = makeTimeString(tempo.first, timeMode); + TQString timeString = makeTimeString(tempo.first, timeMode); new TempoListItem(comp, TempoListItem::Tempo, tempo.first, i, m_list, timeString, @@ -267,12 +267,12 @@ TempoView::applyLayout(int /*staffNo*/) } if (m_list->childCount() == 0) { - new QListViewItem(m_list, + new TQListViewItem(m_list, i18n("<nothing at this filter level>")); - m_list->setSelectionMode(QListView::NoSelection); + m_list->setSelectionMode(TQListView::NoSelection); stateChanged("have_selection", KXMLGUIClient::StateReverse); } else { - m_list->setSelectionMode(QListView::Extended); + m_list->setSelectionMode(TQListView::Extended); // If no selection then select the first event if (m_listSelection.size() == 0) @@ -353,7 +353,7 @@ TempoView::makeTimeString(timeT time, int timeMode) getDocument()->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) @@ -369,12 +369,12 @@ TempoView::makeTimeString(timeT time, int timeMode) { RealTime rt = getDocument()->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); } } @@ -415,15 +415,15 @@ TempoView::slotEditPaste() void TempoView::slotEditDelete() { - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() == 0) return ; RG_DEBUG << "TempoView::slotEditDelete - deleting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; TempoListItem *item; int itemIndex = -1; @@ -476,7 +476,7 @@ void TempoView::slotEditInsertTempo() { timeT insertTime = 0; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -489,12 +489,12 @@ TempoView::slotEditInsertTempo() dialog.setTempoPosition(insertTime); connect(&dialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -506,7 +506,7 @@ void TempoView::slotEditInsertTimeSignature() { timeT insertTime = 0; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -520,7 +520,7 @@ TempoView::slotEditInsertTimeSignature() TimeSignatureDialog dialog(this, &composition, insertTime, sig, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { insertTime = dialog.getTime(); @@ -541,7 +541,7 @@ TempoView::slotEdit() { RG_DEBUG << "TempoView::slotEdit" << endl; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -575,40 +575,40 @@ TempoView::setupActions() { EditViewBase::setupActions("tempoview.rc", false); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this, - SLOT(slotEditInsertTempo()), actionCollection(), + TQT_SLOT(slotEditInsertTempo()), actionCollection(), "insert_tempo"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); + icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this, - SLOT(slotEditInsertTimeSignature()), actionCollection(), + TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(), "insert_timesig"); pixmap.load(pixmapDir + "/toolbar/event-delete.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Delete"), icon, Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Edit Item"), icon, Key_E, this, - SLOT(slotEdit()), actionCollection(), + TQT_SLOT(slotEdit()), actionCollection(), "edit"); new KAction(i18n("Select &All"), 0, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); m_config->setGroup(TempoViewConfigGroup); @@ -617,30 +617,30 @@ TempoView::setupActions() KRadioAction *action; pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(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) @@ -667,7 +667,7 @@ TempoView::getViewSize() } void -TempoView::setViewSize(QSize s) +TempoView::setViewSize(TQSize s) { m_list->setFixedSize(s); } @@ -692,7 +692,7 @@ TempoView::slotSaveOptions() void TempoView::slotModifyFilter(int button) { - QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); if (checkBox == 0) return ; @@ -770,7 +770,7 @@ TempoView::slotRawTime() } void -TempoView::slotPopupEditor(QListViewItem *qitem) +TempoView::slotPopupEditor(TQListViewItem *qitem) { TempoListItem *item = dynamic_cast<TempoListItem *>(qitem); if (!item) @@ -786,12 +786,12 @@ TempoView::slotPopupEditor(QListViewItem *qitem) dialog.setTempoPosition(time); connect(&dialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -807,7 +807,7 @@ TempoView::slotPopupEditor(QListViewItem *qitem) TimeSignatureDialog dialog(this, &composition, time, sig, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { time = dialog.getTime(); diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h index 9a78e1b..fcf3efb 100644 --- a/src/gui/editors/tempo/TempoView.h +++ b/src/gui/editors/tempo/TempoView.h @@ -30,17 +30,17 @@ #include "base/NotationTypes.h" #include "gui/dialogs/TempoDialog.h" #include "gui/general/EditViewBase.h" -#include <qsize.h> -#include <qstring.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QListViewItem; -class QCloseEvent; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQListViewItem; +class TQCloseEvent; +class TQCheckBox; +class TQButtonGroup; class KListView; @@ -71,7 +71,7 @@ class TempoView : public EditViewBase, public CompositionObserver }; public: - TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT); + TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT); virtual ~TempoView(); virtual bool applyLayout(int staffNo = -1); @@ -84,8 +84,8 @@ public: virtual void setupActions(); virtual void initStatusBar(); - virtual QSize getViewSize(); - virtual void setViewSize(QSize); + virtual TQSize getViewSize(); + virtual void setViewSize(TQSize); // Set the button states to the current filter positions // @@ -130,7 +130,7 @@ public slots: // on double click on the event list // - void slotPopupEditor(QListViewItem*); + void slotPopupEditor(TQListViewItem*); // Change filter parameters // @@ -144,11 +144,11 @@ protected: virtual void readOptions(); void makeInitialSelection(timeT); - QString makeTimeString(timeT time, int timeMode); + TQString makeTimeString(timeT time, int timeMode); virtual Segment *getCurrentSegment(); virtual void updateViewCaption(); - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); //--------------- Data members --------------------------------- KListView *m_list; @@ -156,9 +156,9 @@ protected: static int m_lastSetFilter; - QButtonGroup *m_filterGroup; - QCheckBox *m_tempoCheckBox; - QCheckBox *m_timeSigCheckBox; + TQButtonGroup *m_filterGroup; + TQCheckBox *m_tempoCheckBox; + TQCheckBox *m_timeSigCheckBox; std::vector<int> m_listSelection; |