diff options
Diffstat (limited to 'src/gui/editors')
189 files changed, 2069 insertions, 2016 deletions
diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp index cdf73cc..0d9b9c5 100644 --- a/src/gui/editors/eventlist/EventView.cpp +++ b/src/gui/editors/eventlist/EventView.cpp @@ -97,8 +97,8 @@ EventView::m_lastSetEventFilter = -1; EventView::EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent): - EditViewBase(doc, segments, 2, parent, "eventview"), + TQWidget *tqparent): + EditViewBase(doc, segments, 2, tqparent, "eventview"), m_eventFilter(Note | Text | SystemExclusive | Controller | ProgramChange | PitchBend | Indication | Other), m_menu(0) @@ -126,7 +126,7 @@ EventView::EventView(RosegardenGUIDoc *doc, // define some note filtering buttons in a group // m_filterGroup = - new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); + new TQButtonGroup(1, Qt::Horizontal, i18n("Event filters"), getCentralWidget()); m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup); m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup); @@ -157,44 +157,44 @@ EventView::EventView(RosegardenGUIDoc *doc, TriggerSegmentRec *rec = segments[0]->getComposition()->getTriggerSegmentRec(id); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 5, 3, 5, 5); - layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); TQString label = strtoqstr(segments[0]->getLabel()); if (label == "") label = i18n("<no label>"); m_triggerName = new TQLabel(label, frame); - layout->addWidget(m_triggerName, 0, 1); + tqlayout->addWidget(m_triggerName, 0, 1); TQPushButton *editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 0, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName())); + tqlayout->addWidget(editButton, 0, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotEditTriggerName())); - 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); + tqlayout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); + m_triggerPitch = new TQLabel(TQString("%1").tqarg(rec->getBasePitch()), frame); + tqlayout->addWidget(m_triggerPitch, 1, 1); editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 1, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch())); + tqlayout->addWidget(editButton, 1, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotEditTriggerPitch())); - 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); + tqlayout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); + m_triggerVelocity = new TQLabel(TQString("%1").tqarg(rec->getBaseVelocity()), frame); + tqlayout->addWidget(m_triggerVelocity, 2, 1); editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 2, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity())); + tqlayout->addWidget(editButton, 2, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(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 TQLabel(i18n("Default timing: "), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); KComboBox *adjust = new KComboBox(frame); - layout->addMultiCellWidget(adjust, 3, 3, 1, 2); + tqlayout->addMultiCellWidget(adjust, 3, 3, 1, 2); adjust->insertItem(i18n("As stored")); adjust->insertItem(i18n("Truncate if longer than note")); adjust->insertItem(i18n("End at same time as note")); @@ -203,7 +203,7 @@ EventView::EventView(RosegardenGUIDoc *doc, std::string timing = rec->getDefaultTimeAdjust(); if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { adjust->setCurrentItem(0); - } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) { + } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { adjust->setCurrentItem(3); } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { adjust->setCurrentItem(1); @@ -211,12 +211,12 @@ EventView::EventView(RosegardenGUIDoc *doc, adjust->setCurrentItem(2); } - connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int))); + connect(adjust, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotTriggerTimeAdjustChanged(int))); TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame); retune->setChecked(rec->getDefaultRetune()); - connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged())); - layout->addMultiCellWidget(retune, 4, 4, 1, 2); + connect(retune, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotTriggerRetuneChanged())); + tqlayout->addMultiCellWidget(retune, 4, 4, 1, 2); */ @@ -387,7 +387,7 @@ EventView::applyLayout(int /*staffNo*/) int p = (*it)->get <Int>(BaseProperties::PITCH); pitchStr = TQString("%1 %2 ") - .arg(p).arg(MidiPitchLabel(p).getQString()); + .tqarg(p).tqarg(MidiPitchLabel(p).getTQString()); } else if ((*it)->isa(Note::EventType)) { pitchStr = "<not set>"; } @@ -601,7 +601,7 @@ EventView::makeInitialSelection(timeT time) } } -QString +TQString EventView::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -613,31 +613,31 @@ EventView::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } -QString +TQString EventView::makeDurationString(timeT time, timeT duration, int timeMode) { @@ -649,15 +649,15 @@ EventView::makeDurationString(timeT time, getDocument()->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time @@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time, RealTime rt = getDocument()->getComposition().getRealTimeDifference (time, time + duration); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(duration); + return TQString("%1 ").tqarg(duration); } } @@ -719,7 +719,7 @@ EventView::slotEditTriggerPitch() if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBasePitchCommand (&getDocument()->getComposition(), id, dlg->getPitch())); - m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch())); + m_triggerPitch->setText(TQString("%1").tqarg(dlg->getPitch())); } } @@ -737,14 +737,14 @@ EventView::slotEditTriggerVelocity() if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand (&getDocument()->getComposition(), id, dlg->getVelocity())); - m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity())); + m_triggerVelocity->setText(TQString("%1").tqarg(dlg->getVelocity())); } } void EventView::slotTriggerTimeAdjustChanged(int option) { - std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; switch (option) { @@ -758,7 +758,7 @@ EventView::slotTriggerTimeAdjustChanged(int option) adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; break; case 3: - adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; break; default: @@ -1120,41 +1120,41 @@ EventView::setupActions() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); - new KAction(i18n("&Insert Event"), icon, Key_I, this, + new KAction(i18n("&Insert Event"), icon, Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsert()), actionCollection(), "insert"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Delete Event"), icon, Key_Delete, this, + new KAction(i18n("&Delete Event"), icon, Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Edit Event"), icon, Key_E, this, + new KAction(i18n("&Edit Event"), icon, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEditEvent()), actionCollection(), "edit_simple"); pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this, + new KAction(i18n("&Advanced Event Editor"), icon, Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotEditEventAdvanced()), actionCollection(), "edit_advanced"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); - new KAction(i18n("Select &All"), Key_A + CTRL, this, + new KAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); @@ -1166,7 +1166,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-musical.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -1176,7 +1176,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -1186,7 +1186,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -1230,7 +1230,7 @@ EventView::initStatusBar() //sb->addWidget(m_selectionCounter); } -QSize +TQSize EventView::getViewSize() { return m_eventList->size(); @@ -1271,7 +1271,7 @@ EventView::getCurrentSegment() void EventView::slotModifyFilter(int button) { - TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); if (checkBox == 0) return ; @@ -1575,8 +1575,8 @@ EventView::updateViewCaption() if (m_isTriggerSegment) { setCaption(i18n("%1 - Triggered Segment: %2") - .arg(getDocument()->getTitle()) - .arg(strtoqstr(m_segments[0]->getLabel()))); + .tqarg(getDocument()->getTitle()) + .tqarg(strtoqstr(m_segments[0]->getLabel()))); } else if (m_segments.size() == 1) { @@ -1590,14 +1590,14 @@ EventView::updateViewCaption() trackPosition = track->getPosition(); setCaption(i18n("%1 - Segment Track #%2 - Event List") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1)); } else { setCaption(i18n("%1 - %2 Segments - Event List") - .arg(getDocument()->getTitle()) - .arg(m_segments.size())); + .tqarg(getDocument()->getTitle()) + .tqarg(m_segments.size())); } } diff --git a/src/gui/editors/eventlist/EventView.h b/src/gui/editors/eventlist/EventView.h index fc4719a..b4f03c9 100644 --- a/src/gui/editors/eventlist/EventView.h +++ b/src/gui/editors/eventlist/EventView.h @@ -58,6 +58,7 @@ class Event; class EventView : public EditViewBase, public SegmentObserver { Q_OBJECT + TQ_OBJECT // Event filters // @@ -80,7 +81,7 @@ class EventView : public EditViewBase, public SegmentObserver public: EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent); + TQWidget *tqparent); virtual ~EventView(); diff --git a/src/gui/editors/eventlist/EventViewItem.h b/src/gui/editors/eventlist/EventViewItem.h index a94e29f..f5b47bb 100644 --- a/src/gui/editors/eventlist/EventViewItem.h +++ b/src/gui/editors/eventlist/EventViewItem.h @@ -41,44 +41,44 @@ class EventViewItem : public KListViewItem public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListView *parent) : - KListViewItem(parent), + KListView *tqparent) : + KListViewItem(tqparent), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *parent) : - KListViewItem(parent), + KListViewItem *tqparent) : + KListViewItem(tqparent), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - 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, + TQListView *tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - 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, + KListViewItem *tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), m_event(event) {;} diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp index 6b9f748..08a4d22 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp @@ -30,8 +30,8 @@ namespace Rosegarden { -TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *parent, TQString label, int deft) : - KDialogBase(parent, 0, true, label, Ok | Cancel) +TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *tqparent, TQString label, int deft) : + KDialogBase(tqparent, 0, true, label, Ok | Cancel) { TQHBox *hbox = makeHBoxMainWidget(); new TQLabel(label, hbox); diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.h b/src/gui/editors/eventlist/TrivialVelocityDialog.h index c164110..cadb1e1 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.h +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.h @@ -35,7 +35,7 @@ namespace Rosegarden { class TrivialVelocityDialog : public KDialogBase { public: - TrivialVelocityDialog(TQWidget *parent, TQString label, int deft); + TrivialVelocityDialog(TQWidget *tqparent, TQString label, int deft); int getVelocity(); diff --git a/src/gui/editors/guitar/Chord.cpp b/src/gui/editors/guitar/Chord.cpp index c697e96..33c137c 100644 --- a/src/gui/editors/guitar/Chord.cpp +++ b/src/gui/editors/guitar/Chord.cpp @@ -50,7 +50,7 @@ Chord::Chord(const TQString& root, const TQString& ext) m_isUserChord(false) { if (m_ext.isEmpty()) - m_ext = TQString::null; + m_ext = TQString(); } Chord::Chord(const Event& e) @@ -61,19 +61,19 @@ Chord::Chord(const Event& e) ok = e.get<String>(RootPropertyName, f); if (ok) - m_root = f; + m_root = f.c_str(); ok = e.get<String>(ExtPropertyName, f); if (ok) { if (f.length() == 0) - m_ext = TQString::null; + m_ext = TQString(); else - m_ext = f; + m_ext = f.c_str(); } ok = e.get<String>(FingeringPropertyName, f); if (ok) { - TQString qf(f); + TQString qf(f.c_str()); TQString errString; Fingering fingering = Fingering::parseFingering(qf, errString); @@ -84,8 +84,8 @@ Chord::Chord(const Event& e) Event* Chord::getAsEvent(timeT absoluteTime) const { Event *e = new Event(EventType, absoluteTime, 0, EventSubOrdering); - e->set<String>(RootPropertyName, m_root); - e->set<String>(ExtPropertyName, m_ext); + e->set<String>(RootPropertyName, m_root.ascii()); + e->set<String>(ExtPropertyName, m_ext.ascii()); e->set<String>(FingeringPropertyName, getFingering().toString()); return e; } diff --git a/src/gui/editors/guitar/Chord.h b/src/gui/editors/guitar/Chord.h index f519c9c..0b6bc59 100644 --- a/src/gui/editors/guitar/Chord.h +++ b/src/gui/editors/guitar/Chord.h @@ -53,7 +53,7 @@ public: static const PropertyName FingeringPropertyName; Chord(); - Chord(const TQString& root, const TQString& ext = TQString::null); + Chord(const TQString& root, const TQString& ext = TQString()); Chord(const Event&); Event* getAsEvent(timeT absoluteTime) const; @@ -68,9 +68,9 @@ public: void setRoot(TQString r) { m_root = r; } TQString getExt() const { return m_ext; } - void setExt(TQString r) { m_ext = r.isEmpty() ? TQString::null : r; } + void setExt(TQString r) { m_ext = r.isEmpty() ? TQString() : r; } - bool hasAltBass() const { return m_ext.contains(ALT_BASS_REGEXP); } + bool hasAltBass() const { return m_ext.tqcontains(ALT_BASS_REGEXP); } Fingering getFingering() const { return m_fingering; } void setFingering(Fingering f) { m_fingering = f; } diff --git a/src/gui/editors/guitar/ChordMap.cpp b/src/gui/editors/guitar/ChordMap.cpp index 207a336..64ea463 100644 --- a/src/gui/editors/guitar/ChordMap.cpp +++ b/src/gui/editors/guitar/ChordMap.cpp @@ -71,7 +71,7 @@ ChordMap::getChords(const TQString& root, const TQString& ext) const return res; } -QStringList +TQStringList ChordMap::getRootList() const { static TQStringList rootNotes; @@ -95,7 +95,7 @@ ChordMap::getRootList() const return rootNotes; } -QStringList +TQStringList ChordMap::getExtList(const TQString& root) const { TQStringList extList; @@ -192,7 +192,7 @@ bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQStr outStream << ">\n"; } - outStream << "<fingering>" << chord.getFingering().toString() << "</fingering>\n"; + outStream << "<fingering>" << chord.getFingering().toString().c_str() << "</fingering>\n"; } if (!m_map.empty()) @@ -201,7 +201,7 @@ bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQStr outStream << "</chords>\n"; outStream << "</rosegarden-chord-data>\n"; - return outStream.device()->status() == IO_Ok; + return outStream.tqdevice()->status() == IO_Ok; } int ChordMap::FILE_FORMAT_VERSION_MAJOR = 1; diff --git a/src/gui/editors/guitar/ChordXmlHandler.cpp b/src/gui/editors/guitar/ChordXmlHandler.cpp index 6802485..d2f71b4 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.cpp +++ b/src/gui/editors/guitar/ChordXmlHandler.cpp @@ -134,9 +134,9 @@ bool ChordXmlHandler::error(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::error( exception ); } @@ -144,9 +144,9 @@ bool ChordXmlHandler::fatalError(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::fatalError( exception ); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.h b/src/gui/editors/guitar/ChordXmlHandler.h index f9c2e8b..910e9e8 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.h +++ b/src/gui/editors/guitar/ChordXmlHandler.h @@ -36,7 +36,7 @@ namespace Rosegarden { -class ChordXmlHandler : public ProgressReporter, public QXmlDefaultHandler +class ChordXmlHandler : public ProgressReporter, public TQXmlDefaultHandler { public: ChordXmlHandler(Guitar::ChordMap&); diff --git a/src/gui/editors/guitar/Fingering.cpp b/src/gui/editors/guitar/Fingering.cpp index 59459e9..7e5ecc4 100644 --- a/src/gui/editors/guitar/Fingering.cpp +++ b/src/gui/editors/guitar/Fingering.cpp @@ -69,24 +69,24 @@ Fingering::getStartFret() const bool Fingering::hasBarre() const { - int lastStringStatus = m_strings[getNbStrings() - 1]; + int lastStringtqStatus = m_strings[getNbStrings() - 1]; - return ((m_strings[0] > OPEN && m_strings[0] == lastStringStatus) || - (m_strings[1] > OPEN && m_strings[1] == lastStringStatus) || - (m_strings[2] > OPEN && m_strings[2] == lastStringStatus)); + return ((m_strings[0] > OPEN && m_strings[0] == lastStringtqStatus) || + (m_strings[1] > OPEN && m_strings[1] == lastStringtqStatus) || + (m_strings[2] > OPEN && m_strings[2] == lastStringtqStatus)); } Fingering::Barre Fingering::getBarre() const { - int lastStringStatus = m_strings[getNbStrings() - 1]; + int lastStringtqStatus = m_strings[getNbStrings() - 1]; Barre res; - res.fret = lastStringStatus; + res.fret = lastStringtqStatus; for(unsigned int i = 0; i < 3; ++i) { - if (m_strings[i] > OPEN && m_strings[i] == lastStringStatus) + if (m_strings[i] > OPEN && m_strings[i] == lastStringtqStatus) res.start = i; break; } @@ -115,7 +115,7 @@ Fingering::parseFingering(const TQString& ch, TQString& errorString) // NOTATION_DEBUG << "Fingering::parseFingering : '" << t << "' = MUTED\n"; fingering[idx] = MUTED; } else { - errorString = i18n("couldn't parse fingering '%1' in '%2'").arg(t).arg(ch); + errorString = i18n("couldn't parse fingering '%1' in '%2'").tqarg(t).tqarg(ch); } } @@ -140,8 +140,8 @@ std::string Fingering::toString() const bool operator<(const Fingering& a, const Fingering& b) { for(unsigned int i = 0; i < Fingering::DEFAULT_NB_STRINGS; ++i) { - if (a.getStringStatus(i) != b.getStringStatus(i)) { - return a.getStringStatus(i) < b.getStringStatus(i); + if (a.getStringtqStatus(i) != b.getStringtqStatus(i)) { + return a.getStringtqStatus(i) < b.getStringtqStatus(i); } } return false; diff --git a/src/gui/editors/guitar/Fingering.h b/src/gui/editors/guitar/Fingering.h index 32693dd..b413d3b 100644 --- a/src/gui/editors/guitar/Fingering.h +++ b/src/gui/editors/guitar/Fingering.h @@ -60,8 +60,8 @@ public: * returns the fret number on which the string is pressed, or one of MUTED and OPEN * */ - int getStringStatus(int stringNb) const { return m_strings[stringNb]; } - void setStringStatus(int stringNb, int status) { m_strings[stringNb] = status; } + int getStringtqStatus(int stringNb) const { return m_strings[stringNb]; } + void setStringtqStatus(int stringNb, int status) { m_strings[stringNb] = status; } unsigned int getStartFret() const; unsigned int getNbStrings() const { return m_strings.size(); } diff --git a/src/gui/editors/guitar/FingeringBox.cpp b/src/gui/editors/guitar/FingeringBox.cpp index 6695a66..7677b85 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, TQWidget *parent, const char* name) - : TQFrame(parent, name), +FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *tqparent, const char* name) + : TQFrame(tqparent, 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, TQWidget *parent, const char* name) - : TQFrame(parent, name), +FingeringBox::FingeringBox(bool editable, TQWidget *tqparent, const char* name) + : TQFrame(tqparent, name), m_nbFretsDisplayed(DEFAULT_NB_DISPLAYED_FRETS), m_startFret(1), m_nbStrings(Guitar::Fingering::DEFAULT_NB_STRINGS), @@ -123,11 +123,11 @@ FingeringBox::drawContents(TQPainter* p) // DEBUG // p->save(); -// p->setPen(Qt::red); +// p->setPen(TQt::red); // unsigned int topBorderY = m_noteSymbols.getTopBorder(maximumHeight()); // p->drawLine(0, topBorderY, 20, topBorderY); // p->drawRect(m_r1); -// p->setPen(Qt::blue); +// p->setPen(TQt::blue); // p->drawRect(m_r2); // p->restore(); } @@ -183,7 +183,7 @@ FingeringBox::mousePressEvent(TQMouseEvent *event) if (!m_editable) return; - if((event->button() == LeftButton) && m_editable) { + if((event->button() == Qt::LeftButton) && m_editable) { // Find string position m_press_string_num = getStringNumber(event->pos()); @@ -219,16 +219,16 @@ FingeringBox::processMouseRelease(unsigned int release_string_num, if(m_press_fret_num == 0) { - int stringStatus = m_fingering.getStringStatus(m_press_string_num); + int stringtqStatus = m_fingering.getStringtqStatus(m_press_string_num); - if (stringStatus == Guitar::Fingering::OPEN) + if (stringtqStatus == Guitar::Fingering::OPEN) aVal = Guitar::Fingering::MUTED; - else if (stringStatus > Guitar::Fingering::OPEN) + else if (stringtqStatus > Guitar::Fingering::OPEN) aVal = Guitar::Fingering::OPEN; } - m_fingering.setStringStatus(m_press_string_num, aVal); + m_fingering.setStringtqStatus(m_press_string_num, aVal); update(); } diff --git a/src/gui/editors/guitar/FingeringBox.h b/src/gui/editors/guitar/FingeringBox.h index aa76e52..06b8500 100644 --- a/src/gui/editors/guitar/FingeringBox.h +++ b/src/gui/editors/guitar/FingeringBox.h @@ -37,14 +37,14 @@ namespace Rosegarden class Fingering; -class FingeringBox : public QFrame +class FingeringBox : public TQFrame { static const unsigned int IMG_WIDTH = 200; static const unsigned int IMG_HEIGHT = 200; public: - FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name = 0); - FingeringBox(bool editable, TQWidget *parent, const char* name = 0); + FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *tqparent, const char* name = 0); + FingeringBox(bool editable, TQWidget *tqparent, const char* name = 0); void setStartFret(unsigned int f) { m_startFret = f; update(); } unsigned int getStartFret() const { return m_startFret; } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.cpp b/src/gui/editors/guitar/FingeringListBoxItem.cpp index aeb8fcd..64b7f10 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, TQListBox* parent, TQPixmap pixmap, TQString fingeringString) - : TQListBoxPixmap(parent, pixmap, fingeringString), +FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* tqparent, TQPixmap pixmap, TQString fingeringString) + : TQListBoxPixmap(tqparent, pixmap, fingeringString), m_chord(chord) { } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.h b/src/gui/editors/guitar/FingeringListBoxItem.h index 8b0a81a..f900056 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.h +++ b/src/gui/editors/guitar/FingeringListBoxItem.h @@ -31,10 +31,10 @@ namespace Rosegarden { -class FingeringListBoxItem : public QListBoxPixmap +class FingeringListBoxItem : public TQListBoxPixmap { public: - FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString); + FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* tqparent, 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 8a4fb3e..57df4d6 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp @@ -39,8 +39,8 @@ namespace Rosegarden { -GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *parent) - : KDialogBase(parent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), +GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *tqparent) + : KDialogBase(tqparent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), m_chord(chord), m_chordMap(chordMap) { @@ -75,13 +75,13 @@ GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Gui TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); - m_rootNotesList->setCurrentItem(rootList.findIndex(m_chord.getRoot())); + m_rootNotesList->setCurrentItem(rootList.tqfindIndex(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())); + m_ext->setCurrentItem(extList.tqfindIndex(m_chord.getExt())); } } diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.h b/src/gui/editors/guitar/GuitarChordEditorDialog.h index f26fcd3..2b286ee 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.h +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.h @@ -42,9 +42,10 @@ class FingeringBox; class GuitarChordEditorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *parent=0); + GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *tqparent=0); protected slots: void slotStartFretChanged(int); diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp index 5430098..0f9ea8d 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp @@ -41,8 +41,8 @@ namespace Rosegarden { -GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *parent) - : KDialogBase(parent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) +GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *tqparent) + : KDialogBase(tqparent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) { TQWidget *page = new TQWidget(this); setMainWidget(page); @@ -214,12 +214,12 @@ GuitarChordSelectorDialog::slotNewFingering() m_chordMap.insert(newChord); // populate lists // - if (!m_rootNotesList->findItem(newChord.getRoot(), Qt::ExactMatch)) { + if (!m_rootNotesList->tqfindItem(newChord.getRoot(), TQt::ExactMatch)) { m_rootNotesList->insertItem(newChord.getRoot()); m_rootNotesList->sort(); } - if (!m_chordExtList->findItem(newChord.getExt(), Qt::ExactMatch)) { + if (!m_chordExtList->tqfindItem(newChord.getExt(), TQt::ExactMatch)) { m_chordExtList->insertItem(newChord.getExt()); m_chordExtList->sort(); } @@ -280,7 +280,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) // select the chord's root // m_rootNotesList->setCurrentItem(0); - TQListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); + TQListBoxItem* correspondingRoot = m_rootNotesList->tqfindItem(chord.getRoot(), TQt::ExactMatch); if (correspondingRoot) m_rootNotesList->setSelected(correspondingRoot, true); @@ -303,7 +303,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) chordExt = ""; m_chordExtList->setSelected(0, true); } else { - TQListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); + TQListBoxItem* correspondingExt = m_chordExtList->tqfindItem(chordExt, TQt::ExactMatch); if (correspondingExt) m_chordExtList->setSelected(correspondingExt, true); } @@ -321,7 +321,7 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray for(Guitar::ChordMap::chordarray::const_iterator i = chords.begin(); i != chords.end(); ++i) { const Guitar::Chord& chord = *i; - TQString fingeringString = chord.getFingering().toString(); + TQString fingeringString = chord.getFingering().toString().c_str(); NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings " << chord << endl; TQPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); FingeringListBoxItem *item = new FingeringListBoxItem(chord, m_fingeringsList, fingeringPixmap, fingeringString); @@ -334,7 +334,7 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray } -QPixmap +TQPixmap GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering) const { TQPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); @@ -416,7 +416,7 @@ GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) TQFile chordFile(chordFileName); bool ok = chordFile.open(IO_ReadOnly); if (!ok) - KMessageBox::error(0, i18n("couldn't open file '%1'").arg(handler.errorString())); + KMessageBox::error(0, i18n("couldn't open file '%1'").tqarg(handler.errorString())); TQXmlInputSource source(chordFile); TQXmlSimpleReader reader; @@ -425,7 +425,7 @@ GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) NOTATION_DEBUG << "GuitarChordSelectorDialog::parseChordFile() parsing " << chordFileName << endl; reader.parse(source); if (!ok) - KMessageBox::error(0, i18n("couldn't parse chord dictionnary : %1").arg(handler.errorString())); + KMessageBox::error(0, i18n("couldn't parse chord dictionnary : %1").tqarg(handler.errorString())); } diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.h b/src/gui/editors/guitar/GuitarChordSelectorDialog.h index 17b1eff..b6ddea1 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.h +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.h @@ -46,11 +46,12 @@ class FingeringBox; class GuitarChordSelectorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT enum { COMPLEXITY_BEGINNER, COMPLEXITY_COMMON, COMPLEXITY_ALL }; public: - GuitarChordSelectorDialog(TQWidget *parent=0); + GuitarChordSelectorDialog(TQWidget *tqparent=0); void init(); diff --git a/src/gui/editors/guitar/NoteSymbols.cpp b/src/gui/editors/guitar/NoteSymbols.cpp index b7ed8f4..1d09299 100644 --- a/src/gui/editors/guitar/NoteSymbols.cpp +++ b/src/gui/editors/guitar/NoteSymbols.cpp @@ -101,7 +101,7 @@ NoteSymbols::drawOpenSymbol ( TQPainter* p, //std::cout << "NoteSymbols::drawOpenSymbol - drawing Open symbol at string #" << position //<< std::endl; - p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), TQt::NoBrush) ); p->drawEllipse( x_pos.first - ( radius / 2 ), y_pos - ( radius / 2 ), radius, @@ -124,10 +124,10 @@ NoteSymbols::drawNoteSymbol ( TQPainter* p, if (transient) { radius = static_cast<unsigned int>( columnWidth /* * 0.9 */ ); - p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), TQt::NoBrush) ); } else { radius = static_cast<unsigned int>( columnWidth * 0.7 ); - p->setBrush( TQBrush(p->brush().color(), Qt::SolidPattern) ); + p->setBrush( TQBrush(p->brush().color(), TQt::SolidPattern) ); } int x = x_pos.first - ( radius / 2 ), @@ -143,7 +143,7 @@ NoteSymbols::drawNoteSymbol ( TQPainter* p, radius ); // p->save(); -// p->setPen(Qt::red); +// p->setPen(TQt::red); // p->drawRect( x, y, radius, radius ); // p->restore(); } diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp index f97ceaf..5782164 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.cpp +++ b/src/gui/editors/matrix/MatrixCanvasView.cpp @@ -45,9 +45,9 @@ namespace Rosegarden MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, SnapGrid *snapGrid, bool drumMode, - TQCanvas *viewing, TQWidget *parent, + TQCanvas *viewing, TQWidget *tqparent, const char *name, WFlags f) - : RosegardenCanvasView(viewing, parent, name, f), + : RosegardenCanvasView(viewing, tqparent, name, f), m_staff(staff), m_snapGrid(snapGrid), m_drumMode(drumMode), @@ -55,7 +55,7 @@ MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, m_previousEvPitch(0), m_mouseWasPressed(false), m_ignoreClick(false), - m_smoothModifier(Qt::ShiftButton), + m_smoothModifier(TQt::ShiftButton), m_lastSnap(SnapGrid::SnapToBeat), m_isSnapTemporary(false) { @@ -130,7 +130,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e) // 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; + if (!rect.tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); // std::cerr << "MatrixCanvasView::contentsMousePressEvent: collision with an existing matrix element" << std::endl; @@ -198,7 +198,7 @@ void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) QCanvasMatrixRectangle *mRect = 0; if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { - if (!mRect->rect().contains(p, true)) + if (!mRect->rect().tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); MATRIX_DEBUG << "have element" << endl; @@ -268,7 +268,7 @@ void MatrixCanvasView::slotExternalWheelEvent(TQWheelEvent* e) void MatrixCanvasView::updateGridSnap(TQMouseEvent *e) { - Qt::ButtonState bs = e->state(); + TQt::ButtonState bs = e->state(); // MATRIX_DEBUG << "MatrixCanvasView::updateGridSnap : bs = " // << bs << " - sm = " << getSmoothModifier() << ", is temporary " << m_isSnapTemporary << ", saved is " << m_lastSnap << endl; diff --git a/src/gui/editors/matrix/MatrixCanvasView.h b/src/gui/editors/matrix/MatrixCanvasView.h index 694856e..5391f9f 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.h +++ b/src/gui/editors/matrix/MatrixCanvasView.h @@ -48,25 +48,26 @@ class MatrixElement; class MatrixCanvasView : public RosegardenCanvasView { Q_OBJECT + TQ_OBJECT public: MatrixCanvasView(MatrixStaff&, SnapGrid *, bool drumMode, TQCanvas *viewing, - TQWidget *parent=0, const char *name=0, WFlags f=0); + TQWidget *tqparent=0, const char *name=0, WFlags f=0); ~MatrixCanvasView(); - void setSmoothModifier(Qt::ButtonState s) { m_smoothModifier = s; } - Qt::ButtonState getSmoothModifier() { return m_smoothModifier; } + void setSmoothModifier(TQt::ButtonState s) { m_smoothModifier = s; } + TQt::ButtonState getSmoothModifier() { return m_smoothModifier; } signals: /** * Emitted when the user clicks on a TQCanvasItem which is active * - * @see QCanvasItem#setActive + * @see TQCanvasItem#setActive */ void activeItemPressed(TQMouseEvent*, TQCanvasItem* item); @@ -150,7 +151,7 @@ protected: bool m_mouseWasPressed; bool m_ignoreClick; - Qt::ButtonState m_smoothModifier; + TQt::ButtonState m_smoothModifier; timeT m_lastSnap; bool m_isSnapTemporary; }; diff --git a/src/gui/editors/matrix/MatrixElement.cpp b/src/gui/editors/matrix/MatrixElement.cpp index c706c87..b60b63f 100644 --- a/src/gui/editors/matrix/MatrixElement.cpp +++ b/src/gui/editors/matrix/MatrixElement.cpp @@ -87,7 +87,7 @@ void MatrixElement::drawOverlapRectangles() if (m_overlapRectangles) removeOverlapRectangles(); TQRect elRect = m_canvasRect->rect(); - QCanvasItemList + TQCanvasItemList itemList = m_canvasRect->canvas()->collisions(elRect); TQCanvasItemList::Iterator it; MatrixElement* mel = 0; @@ -120,7 +120,7 @@ void MatrixElement::drawOverlapRectangles() void MatrixElement::redrawOverlaps(TQRect rect) { - QCanvasItemList + TQCanvasItemList itemList = m_canvasRect->canvas()->collisions(rect); TQCanvasItemList::Iterator it; MatrixElement* mel = 0; diff --git a/src/gui/editors/matrix/MatrixEraser.cpp b/src/gui/editors/matrix/MatrixEraser.cpp index 226c4a8..a5f261a 100644 --- a/src/gui/editors/matrix/MatrixEraser.cpp +++ b/src/gui/editors/matrix/MatrixEraser.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { -MatrixEraser::MatrixEraser(MatrixView* parent) - : MatrixTool("MatrixEraser", parent), +MatrixEraser::MatrixEraser(MatrixView* tqparent) + : MatrixTool("MatrixEraser", tqparent), m_currentStaff(0) { TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); @@ -96,7 +96,7 @@ void MatrixEraser::handleLeftButtonPress(timeT, void MatrixEraser::ready() { - m_mParentView->setCanvasCursor(Qt::pointingHandCursor); + m_mParentView->setCanvasCursor(TQt::pointingHandCursor); setBasicContextHelp(); } diff --git a/src/gui/editors/matrix/MatrixHLayout.cpp b/src/gui/editors/matrix/MatrixHLayout.cpp index 99b89c2..f4615fa 100644 --- a/src/gui/editors/matrix/MatrixHLayout.cpp +++ b/src/gui/editors/matrix/MatrixHLayout.cpp @@ -61,7 +61,7 @@ void MatrixHLayout::scanStaff(Staff &staffBase, { Profiler profiler("MatrixHLayout::scanStaff", true); - // The Matrix layout is not currently designed to be able to lay + // The Matrix tqlayout is not currently designed to be able to lay // out more than one staff, because we have no requirement to show // more than one at once in the Matrix view. To make it work for // multiple staffs should be straightforward; we just need to bear @@ -88,7 +88,7 @@ void MatrixHLayout::scanStaff(Staff &staffBase, } // Do this in two parts: bar lines separately from elements. - // (We don't need to do all that stuff notationhlayout has to do, + // (We don't need to do all that stuff notationhtqlayout has to do, // scanning the notes bar-by-bar; we can just place the bar lines // in the theoretically-correct places and do the same with the // notes quite independently.) diff --git a/src/gui/editors/matrix/MatrixHLayout.h b/src/gui/editors/matrix/MatrixHLayout.h index 76f1b31..291d618 100644 --- a/src/gui/editors/matrix/MatrixHLayout.h +++ b/src/gui/editors/matrix/MatrixHLayout.h @@ -62,7 +62,7 @@ public: timeT = 0); /** - * Returns the total length of all elements once layout is done. + * Returns the total length of all elements once tqlayout is done. * This is the x-coord of the end of the last element on the * longest staff */ @@ -84,9 +84,9 @@ public: virtual double getBarPosition(int barNo) const; /** - * Precomputes layout data for a single staff, updating any + * Precomputes tqlayout data for a single staff, updating any * internal data stores associated with that staff and updating - * any layout-related properties in the events on the staff's + * any tqlayout-related properties in the events on the staff's * segment. */ virtual void scanStaff(Staff&, @@ -94,10 +94,10 @@ public: timeT = 0); /** - * Computes any layout data that may depend on the results of + * Computes any tqlayout data that may depend on the results of * scanning more than one staff. This may mean doing most of - * the layout (likely for horizontal layout) or nothing at all - * (likely for vertical layout). + * the tqlayout (likely for horizontal tqlayout) or nothing at all + * (likely for vertical tqlayout). */ virtual void finishLayout(timeT = 0, timeT = 0); @@ -118,7 +118,7 @@ protected: // pair of has-time-sig and time-sig typedef std::pair<bool, TimeSignature> TimeSigData; - // pair of layout-x and time-signature if there is one + // pair of tqlayout-x and time-signature if there is one typedef std::pair<double, TimeSigData> BarData; typedef FastVector<BarData> BarDataList; BarDataList m_barData; @@ -133,7 +133,7 @@ protected: */ class ZoomableMatrixHLayoutRulerScale : public RulerScale, public HZoomable { public: - ZoomableMatrixHLayoutRulerScale(MatrixHLayout& layout) : RulerScale(layout.getComposition()), m_referenceHLayout(layout) {}; + ZoomableMatrixHLayoutRulerScale(MatrixHLayout& tqlayout) : RulerScale(tqlayout.getComposition()), m_referenceHLayout(tqlayout) {}; virtual double getBarPosition(int n) const { return m_referenceHLayout.getBarPosition(n) * getHScaleFactor(); } virtual double getXForTime(timeT time) const { return m_referenceHLayout.getXForTime(time) * getHScaleFactor(); } diff --git a/src/gui/editors/matrix/MatrixMover.cpp b/src/gui/editors/matrix/MatrixMover.cpp index adf558d..0b84537 100644 --- a/src/gui/editors/matrix/MatrixMover.cpp +++ b/src/gui/editors/matrix/MatrixMover.cpp @@ -54,8 +54,8 @@ namespace Rosegarden { -MatrixMover::MatrixMover(MatrixView* parent) : - MatrixTool("MatrixMover", parent), +MatrixMover::MatrixMover(MatrixView* tqparent) : + MatrixTool("MatrixMover", tqparent), m_currentElement(0), m_currentStaff(0), m_lastPlayedPitch(-1) @@ -101,7 +101,7 @@ void MatrixMover::handleLeftButtonPress(timeT time, MATRIX_DEBUG << "MatrixMover::handleLeftButtonPress() : time = " << time << ", el = " << el << endl; if (!el) return; - m_quickCopy = (e->state() & Qt::ControlButton); + m_quickCopy = (e->state() & TQt::ControlButton); if (!m_duplicateElements.empty()) { for (size_t i = 0; i < m_duplicateElements.size(); ++i) { @@ -123,16 +123,16 @@ void MatrixMover::handleLeftButtonPress(timeT time, if (selection) { EventSelection *newSelection; - if ((e->state() & Qt::ShiftButton) || - selection->contains(m_currentElement->event())) + if ((e->state() & TQt::ShiftButton) || + selection->tqcontains(m_currentElement->event())) newSelection = new EventSelection(*selection); else newSelection = new EventSelection(m_currentStaff->getSegment()); // if the selection already contains the event, remove it from the // selection if shift is pressed - if (selection->contains(m_currentElement->event())){ - if (e->state() & Qt::ShiftButton) + if (selection->tqcontains(m_currentElement->event())){ + if (e->state() & TQt::ShiftButton) newSelection->removeEvent(m_currentElement->event()); } else { newSelection->addEvent(m_currentElement->event()); @@ -207,7 +207,7 @@ int MatrixMover::handleMouseMove(timeT newTime, << newTime << endl; if (e) { - setBasicContextHelp(e->state() & Qt::ControlButton); + setBasicContextHelp(e->state() & TQt::ControlButton); } if (!m_currentElement || !m_currentStaff) @@ -420,17 +420,17 @@ void MatrixMover::handleMouseRelease(timeT newTime, void MatrixMover::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->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); + m_mParentView->setCanvasCursor(TQt::sizeAllCursor); setBasicContextHelp(); } void MatrixMover::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->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))); @@ -441,8 +441,8 @@ void MatrixMover::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint offset = newP1 - oldP1; diff --git a/src/gui/editors/matrix/MatrixMover.h b/src/gui/editors/matrix/MatrixMover.h index 258b465..9886bdd 100644 --- a/src/gui/editors/matrix/MatrixMover.h +++ b/src/gui/editors/matrix/MatrixMover.h @@ -47,6 +47,7 @@ class Event; class MatrixMover : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixPainter.cpp b/src/gui/editors/matrix/MatrixPainter.cpp index 11bbc0b..7616de6 100644 --- a/src/gui/editors/matrix/MatrixPainter.cpp +++ b/src/gui/editors/matrix/MatrixPainter.cpp @@ -53,8 +53,8 @@ namespace Rosegarden { -MatrixPainter::MatrixPainter(MatrixView* parent) - : MatrixTool("MatrixPainter", parent), +MatrixPainter::MatrixPainter(MatrixView* tqparent) + : MatrixTool("MatrixPainter", tqparent), m_currentElement(0), m_currentStaff(0) { @@ -83,8 +83,8 @@ MatrixPainter::MatrixPainter(MatrixView* parent) createMenu("matrixpainter.rc"); } -MatrixPainter::MatrixPainter(TQString name, MatrixView* parent) - : MatrixTool(name, parent), +MatrixPainter::MatrixPainter(TQString name, MatrixView* tqparent) + : MatrixTool(name, tqparent), m_currentElement(0), m_currentStaff(0) {} @@ -320,17 +320,17 @@ void MatrixPainter::handleMouseRelease(timeT endTime, void MatrixPainter::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); - m_mParentView->setCanvasCursor(Qt::crossCursor); + m_mParentView->setCanvasCursor(TQt::crossCursor); setBasicContextHelp(); } void MatrixPainter::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -339,8 +339,8 @@ void MatrixPainter::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint offset = newP1 - oldP1; diff --git a/src/gui/editors/matrix/MatrixPainter.h b/src/gui/editors/matrix/MatrixPainter.h index e04cda9..f7e8e6f 100644 --- a/src/gui/editors/matrix/MatrixPainter.h +++ b/src/gui/editors/matrix/MatrixPainter.h @@ -47,6 +47,7 @@ class Event; class MatrixPainter : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixParameterBox.cpp b/src/gui/editors/matrix/MatrixParameterBox.cpp index 75228c3..cd4a743 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.cpp +++ b/src/gui/editors/matrix/MatrixParameterBox.cpp @@ -42,8 +42,8 @@ namespace Rosegarden { MatrixParameterBox::MatrixParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent, const char* name): - TQFrame(parent, name), + TQWidget *tqparent, const char* name): + TQFrame(tqparent, name), m_quantizations(BasicQuantizer::getStandardQuantizations()), m_doc(doc) { diff --git a/src/gui/editors/matrix/MatrixParameterBox.h b/src/gui/editors/matrix/MatrixParameterBox.h index 036571b..d67269a 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.h +++ b/src/gui/editors/matrix/MatrixParameterBox.h @@ -44,12 +44,13 @@ class Instrument; class EventSelection; -class MatrixParameterBox : public QFrame +class MatrixParameterBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *parent=0, const char* name=0); + MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *tqparent=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 fce4306..fc3af58 100644 --- a/src/gui/editors/matrix/MatrixResizer.cpp +++ b/src/gui/editors/matrix/MatrixResizer.cpp @@ -51,8 +51,8 @@ namespace Rosegarden { -MatrixResizer::MatrixResizer(MatrixView* parent) - : MatrixTool("MatrixResizer", parent), +MatrixResizer::MatrixResizer(MatrixView* tqparent) + : MatrixTool("MatrixResizer", tqparent), m_currentElement(0), m_currentStaff(0) { @@ -110,8 +110,8 @@ void MatrixResizer::handleLeftButtonPress(timeT, if (selection) { EventSelection *newSelection; - if ((e->state() & Qt::ShiftButton) || - selection->contains(m_currentElement->event())) + if ((e->state() & TQt::ShiftButton) || + selection->tqcontains(m_currentElement->event())) newSelection = new EventSelection(*selection); else newSelection = new EventSelection(m_currentStaff->getSegment()); @@ -289,27 +289,27 @@ void MatrixResizer::handleMouseRelease(timeT newTime, void MatrixResizer::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); - m_mParentView->setCanvasCursor(Qt::sizeHorCursor); + m_mParentView->setCanvasCursor(TQt::sizeHorCursor); setBasicContextHelp(); } void MatrixResizer::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixResizer::slotMatrixScrolled(int newX, int newY) { - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint p(newX, newY); if (newP1.x() > oldP1.x()) { - p.setX(newX + m_parentView->getCanvasView()->visibleWidth()); + p.setX(newX + m_tqparentView->getCanvasView()->visibleWidth()); } p = m_mParentView->inverseMapPoint(p); diff --git a/src/gui/editors/matrix/MatrixResizer.h b/src/gui/editors/matrix/MatrixResizer.h index f851fba..cbbf8cc 100644 --- a/src/gui/editors/matrix/MatrixResizer.h +++ b/src/gui/editors/matrix/MatrixResizer.h @@ -47,6 +47,7 @@ class Event; class MatrixResizer : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp index ef553a5..3109aec 100644 --- a/src/gui/editors/matrix/MatrixSelector.cpp +++ b/src/gui/editors/matrix/MatrixSelector.cpp @@ -71,7 +71,7 @@ MatrixSelector::MatrixSelector(MatrixView* view) m_matrixView(view), m_selectionToMerge(0) { - connect(m_parentView, TQT_SIGNAL(usedSelection()), + connect(m_tqparentView, TQT_SIGNAL(usedSelection()), this, TQT_SLOT(slotHideSelection())); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, @@ -133,7 +133,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, // delete m_selectionToMerge; // you can safely delete 0, you know? const EventSelection *selectionToMerge = 0; - if (e->state() & Qt::ShiftButton) + if (e->state() & TQt::ShiftButton) selectionToMerge = m_mParentView->getCurrentSelection(); m_selectionToMerge = @@ -153,10 +153,10 @@ void MatrixSelector::handleLeftButtonPress(timeT time, resizeStart = x + width - 10; if (p.x() > resizeStart) { - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixResizer::ToolName); } else { - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixMover::ToolName); } @@ -169,7 +169,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, element); return ; - } else if (e->state() & Qt::ControlButton) { + } else if (e->state() & TQt::ControlButton) { handleMidButtonPress(time, height, staffNo, e, element); return; @@ -214,7 +214,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, } } - //m_parentView->setCursorPosition(p.x()); + //m_tqparentView->setCursorPosition(p.x()); } void MatrixSelector::handleMidButtonPress(timeT time, @@ -229,7 +229,7 @@ void MatrixSelector::handleMidButtonPress(timeT time, if (dynamic_cast<MatrixElement*>(element)) return ; - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixPainter::ToolName); m_dispatchTool->ready(); @@ -375,7 +375,7 @@ int MatrixSelector::handleMouseMove(timeT time, int height, int w = int(p.x() - m_selectionRect->x()); int h = int(p.y() - m_selectionRect->y()); - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -443,11 +443,11 @@ void MatrixSelector::ready() m_selectionRect->hide(); m_selectionRect->setPen(TQPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); - m_mParentView->setCanvasCursor(Qt::arrowCursor); + m_mParentView->setCanvasCursor(TQt::arrowCursor); //m_mParentView->setPositionTracking(false); } - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->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,7 +461,7 @@ void MatrixSelector::stow() m_mParentView->canvas()->update(); } - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -478,13 +478,13 @@ void MatrixSelector::slotHideSelection() void MatrixSelector::slotMatrixScrolled(int newX, int newY) { if (m_updateRect) { - int offsetX = newX - m_parentView->getCanvasView()->contentsX(); - int offsetY = newY - m_parentView->getCanvasView()->contentsY(); + int offsetX = newX - m_tqparentView->getCanvasView()->contentsX(); + int offsetY = newY - m_tqparentView->getCanvasView()->contentsY(); int w = int(m_selectionRect->width() + offsetX); int h = int(m_selectionRect->height() + offsetY); - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -576,7 +576,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) } if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { - if (! mRect->rect().contains(p, true)) continue; + if (! mRect->rect().tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); break; } diff --git a/src/gui/editors/matrix/MatrixSelector.h b/src/gui/editors/matrix/MatrixSelector.h index caa9e4f..1e8a741 100644 --- a/src/gui/editors/matrix/MatrixSelector.h +++ b/src/gui/editors/matrix/MatrixSelector.h @@ -50,6 +50,7 @@ class EditTool; class MatrixSelector : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; @@ -97,7 +98,7 @@ public: /** * Create the selection rect * - * We need this because MatrixView deletes all QCanvasItems + * We need this because MatrixView deletes all TQCanvasItems * along with it. This happens before the MatrixSelector is * deleted, so we can't delete the selection rect in * ~MatrixSelector because that leads to double deletion. diff --git a/src/gui/editors/matrix/MatrixStaff.cpp b/src/gui/editors/matrix/MatrixStaff.cpp index 55491d0..847c6f9 100644 --- a/src/gui/editors/matrix/MatrixStaff.cpp +++ b/src/gui/editors/matrix/MatrixStaff.cpp @@ -166,10 +166,10 @@ void MatrixStaff::positionElement(ViewElement* vel) // EventSelection *selection = m_view->getCurrentSelection(); - if (selection && selection->contains(el->event())) + if (selection && selection->tqcontains(el->event())) el->setColour(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (el->event()->has(BaseProperties::TRIGGER_SEGMENT_ID)) - el->setColour(Qt::gray); + el->setColour(TQt::gray); else el->setColour(DefaultVelocityColour::getInstance()->getColour(velocity)); diff --git a/src/gui/editors/matrix/MatrixTool.cpp b/src/gui/editors/matrix/MatrixTool.cpp index a478aa3..a0bb68f 100644 --- a/src/gui/editors/matrix/MatrixTool.cpp +++ b/src/gui/editors/matrix/MatrixTool.cpp @@ -34,39 +34,39 @@ namespace Rosegarden { -MatrixTool::MatrixTool(const TQString& menuName, MatrixView* parent) - : EditTool(menuName, parent), - m_mParentView(parent) +MatrixTool::MatrixTool(const TQString& menuName, MatrixView* tqparent) + : EditTool(menuName, tqparent), + m_mParentView(tqparent) {} void MatrixTool::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void MatrixTool::slotMoveSelected() { - m_parentView->actionCollection()->action("move")->activate(); + m_tqparentView->actionCollection()->action("move")->activate(); } void MatrixTool::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void MatrixTool::slotResizeSelected() { - m_parentView->actionCollection()->action("resize")->activate(); + m_tqparentView->actionCollection()->action("resize")->activate(); } void MatrixTool::slotDrawSelected() { - m_parentView->actionCollection()->action("draw")->activate(); + m_tqparentView->actionCollection()->action("draw")->activate(); } const SnapGrid & diff --git a/src/gui/editors/matrix/MatrixTool.h b/src/gui/editors/matrix/MatrixTool.h index 9972176..fb45920 100644 --- a/src/gui/editors/matrix/MatrixTool.h +++ b/src/gui/editors/matrix/MatrixTool.h @@ -44,6 +44,7 @@ class SnapGrid; class MatrixTool : public EditTool { Q_OBJECT + TQ_OBJECT public: // virtual void ready(); diff --git a/src/gui/editors/matrix/MatrixToolBox.cpp b/src/gui/editors/matrix/MatrixToolBox.cpp index dab9632..e38abf1 100644 --- a/src/gui/editors/matrix/MatrixToolBox.cpp +++ b/src/gui/editors/matrix/MatrixToolBox.cpp @@ -40,9 +40,9 @@ namespace Rosegarden { -MatrixToolBox::MatrixToolBox(MatrixView* parent) - : EditToolBox(parent), - m_mParentView(parent) +MatrixToolBox::MatrixToolBox(MatrixView* tqparent) + : EditToolBox(tqparent), + m_mParentView(tqparent) {} EditTool* MatrixToolBox::createTool(const TQString& toolName) @@ -73,7 +73,7 @@ EditTool* MatrixToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/matrix/MatrixToolBox.h b/src/gui/editors/matrix/MatrixToolBox.h index 4f28c57..b997405 100644 --- a/src/gui/editors/matrix/MatrixToolBox.h +++ b/src/gui/editors/matrix/MatrixToolBox.h @@ -42,8 +42,9 @@ class MatrixStaff; class MatrixToolBox : public EditToolBox { Q_OBJECT + TQ_OBJECT public: - MatrixToolBox(MatrixView* parent); + MatrixToolBox(MatrixView* tqparent); protected: diff --git a/src/gui/editors/matrix/MatrixVLayout.h b/src/gui/editors/matrix/MatrixVLayout.h index a33e0d1..538e598 100644 --- a/src/gui/editors/matrix/MatrixVLayout.h +++ b/src/gui/editors/matrix/MatrixVLayout.h @@ -58,9 +58,9 @@ public: timeT = 0); /** - * Precomputes layout data for a single staff, updating any + * Precomputes tqlayout data for a single staff, updating any * internal data stores associated with that staff and updating - * any layout-related properties in the events on the staff's + * any tqlayout-related properties in the events on the staff's * segment. */ virtual void scanStaff(Staff &staff, @@ -68,10 +68,10 @@ public: timeT = 0); /** - * Computes any layout data that may depend on the results of + * Computes any tqlayout data that may depend on the results of * scanning more than one staff. This may mean doing most of - * the layout (likely for horizontal layout) or nothing at all - * (likely for vertical layout). + * the tqlayout (likely for horizontal tqlayout) or nothing at all + * (likely for vertical tqlayout). */ virtual void finishLayout(timeT = 0, timeT = 0); diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index 66c1b0d..424b98e 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -137,13 +137,13 @@ static double xorigin = 0.0; MatrixView::MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool drumMode) - : EditView(doc, segments, 3, parent, "matrixview"), - m_hlayout(&doc->getComposition()), - m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_hlayout)), - m_vlayout(), - m_snapGrid(new SnapGrid(&m_hlayout)), + : EditView(doc, segments, 3, tqparent, "matrixview"), + m_htqlayout(&doc->getComposition()), + m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_htqlayout)), + m_vtqlayout(), + m_snapGrid(new SnapGrid(&m_htqlayout)), m_lastEndMarkerTime(0), m_hoveredOverAbsoluteTime(0), m_hoveredOverNoteName(0), @@ -176,13 +176,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, 20); // relation target/this (in percent) connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), - this, TQT_SLOT(slotParametersClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), - this, TQT_SLOT(slotParametersClosed())); - // Apparently, hasUndocked() is emitted when the dock widget's + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); + // Aptqparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); Composition &comp = doc->getComposition(); @@ -191,9 +191,9 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, initStatusBar(); connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), - this, TQT_SLOT(slotToolHelpChanged(const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT(slotToolHelpChanged(const TQString &))); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); m_config->setGroup(MatrixViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures-1.6-plus", true)) { @@ -205,7 +205,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; if (background.load(TQString("%1/misc/%2"). arg(pixmapDir, backgroundPixmap))) { - tCanvas->setBackgroundPixmap(background); + tCanvas->tqsetBackgroundPixmap(background); } } @@ -301,7 +301,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQT_SIGNAL(showPluginGUI(InstrumentId, int)), app, TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); - connect(parent, // RosegardenGUIView + connect(tqparent, // RosegardenGUIView TQT_SIGNAL(checkTrackAssignments()), this, TQT_SLOT(slotCheckTrackAssignments())); @@ -353,13 +353,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Connect vertical scrollbars between matrix and piano // connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), - this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), - this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); - connect(m_canvasView, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); + connect(m_canvasView, TQT_SIGNAL(zoomIn()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn())); + connect(m_canvasView, TQT_SIGNAL(zoomOut()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut())); connect(m_pianoView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), m_canvasView, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); @@ -368,13 +368,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // the canvas view rulers // connect(m_canvasView, TQT_SIGNAL(bottomWidgetHeightChanged(int)), - this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); connect(m_canvasView, TQT_SIGNAL(mouseEntered()), - this, TQT_SLOT(slotMouseEnteredCanvasView())); + TQT_TQOBJECT(this), TQT_SLOT(slotMouseEnteredCanvasView())); connect(m_canvasView, TQT_SIGNAL(mouseLeft()), - this, TQT_SLOT(slotMouseLeftCanvasView())); + TQT_TQOBJECT(this), TQT_SLOT(slotMouseLeftCanvasView())); /* TQObject::connect @@ -404,55 +404,55 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQObject::connect (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - this, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), - this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyPressed(unsigned int, bool))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), - this, TQT_SLOT (slotKeySelected(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeySelected(unsigned int, bool))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), - this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyReleased(unsigned int, bool))); TQObject::connect (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); TQObject::connect (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), - this, TQT_SLOT(slotSetPointerPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT))); - MATRIX_DEBUG << "MatrixView : applying layout\n"; + MATRIX_DEBUG << "MatrixView : applying tqlayout\n"; - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout")); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout")); else { MATRIX_DEBUG << "MatrixView : rendering elements\n"; for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->positionAllElements(); - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } } StandardRuler *topStandardRuler = new StandardRuler(getDocument(), - &m_hlayout, int(xorigin), 25, + &m_htqlayout, int(xorigin), 25, false, getCentralWidget()); topStandardRuler->setSnapGrid(m_snapGrid); setTopStandardRuler(topStandardRuler); StandardRuler *bottomStandardRuler = new StandardRuler(getDocument(), - &m_hlayout, 0, 25, + &m_htqlayout, 0, 25, true, getBottomWidget()); bottomStandardRuler->setSnapGrid(m_snapGrid); setBottomStandardRuler(bottomStandardRuler); @@ -470,12 +470,12 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQObject::connect (topStandardRuler->getLoopRuler(), TQT_SIGNAL(setPointerPosition(timeT)), - this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetInsertCursorPosition(timeT))); TQObject::connect (topStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), - this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetInsertCursorPosition(timeT))); topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); @@ -490,7 +490,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), m_canvasView, TQT_SLOT(stopAutoScroll())); connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), - this, TQT_SLOT(slotSetPointerPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT))); // Force height for the moment // @@ -571,7 +571,7 @@ MatrixView::~MatrixView() // ~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 + // sending the TQSCrollbar::valueChanged() signal. But we have a // slot connected to that signal // (MatrixView::slotVerticalScrollPianoKeyboard), which scrolls // the pianoView. However at this stage the pianoView has already @@ -639,219 +639,219 @@ void MatrixView::setupActions() TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, TQT_SLOT(slotSelectSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, TQT_SLOT(slotPaintSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, TQT_SLOT(slotEraseSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, TQT_SLOT(slotMoveSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); icon = TQIconSet(pixmap); toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, - this, TQT_SLOT(slotResizeSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); icon = TQIconSet(pixmap); - new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, + new KToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); icon = TQIconSet(pixmap); - new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, + new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); - new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, + new KAction(i18n("Repeat Last Quantize"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); - new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, + new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); - new KAction(i18n("&Legato"), Key_Minus, this, + new KAction(i18n("&Legato"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); new KAction(ChangeVelocityCommand::getGlobalName(10), 0, - Key_Up + SHIFT, this, + Key_Up + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, - Key_Down + SHIFT, this, + Key_Down + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); - new KAction(i18n("Set to Current Velocity"), 0, this, + new KAction(i18n("Set to Current Velocity"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); - new KAction(i18n("Set Event &Velocities..."), 0, this, + new KAction(i18n("Set Event &Velocities..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); - new KAction(i18n("Trigger Se&gment..."), 0, this, + new KAction(i18n("Trigger Se&gment..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); - new KAction(i18n("Remove Triggers..."), 0, this, + new KAction(i18n("Remove Triggers..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); - new KAction(i18n("Select &All"), Key_A + CTRL, this, + new KAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("&Delete"), Key_Delete, this, + new KAction(i18n("&Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); - new KAction(i18n("Cursor &Back"), 0, Key_Left, this, + new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); - new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, + new KAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); - new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, + new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); - new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, + new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); - new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, + new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); - new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, + new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); - new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, + new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); - new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, + new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), 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, + Key_A + CTRL, */ TQT_TQOBJECT(this), TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); - new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, + new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); - new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, + new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); - new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, + new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); - new KToggleAction(i18n("&Solo"), icon, 0, this, + new KToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, + (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); - new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, + new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); - new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, + new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); @@ -876,23 +876,23 @@ void MatrixView::setupActions() timeT d = m_snapValues[i]; if (d == SnapGrid::NoSnap) { - new KAction(i18n("&No Snap"), 0, this, + new KAction(i18n("&No Snap"), 0, TQT_TQOBJECT(this), 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, + new KAction(i18n("Snap to Bea&t"), Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { - new KAction(i18n("Snap to &Bar"), Key_5, this, + new KAction(i18n("Snap to &Bar"), Key_5, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { timeT err = 0; TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); - TQPixmap pixmap = NotePixmapFactory::toQPixmap + TQPixmap pixmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); KShortcut cut = 0; @@ -903,9 +903,9 @@ void MatrixView::setupActions() else if (d == crotchetDuration) cut = Key_4; else if (d == crotchetDuration * 2) cut = Key_2; - TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); + TQString actionName = TQString("snap_%1").tqarg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; - new KAction(i18n("Snap to %1").arg(label), pixmap, cut, this, + new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName); } @@ -914,16 +914,16 @@ void MatrixView::setupActions() // // Settings menu // - new KAction(i18n("Show Instrument Parameters"), 0, this, + new KAction(i18n("Show Instrument Parameters"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); - new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, + new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); - new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, + new KToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); @@ -1032,20 +1032,20 @@ bool MatrixView::applyLayout(int staffNo, { Profiler profiler("MatrixView::applyLayout", true); - m_hlayout.reset(); - m_vlayout.reset(); + m_htqlayout.reset(); + m_vtqlayout.reset(); for (unsigned int i = 0; i < m_staffs.size(); ++i) { if (staffNo >= 0 && (int)i != staffNo) continue; - m_hlayout.scanStaff(*m_staffs[i], startTime, endTime); - m_vlayout.scanStaff(*m_staffs[i], startTime, endTime); + m_htqlayout.scanStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout.scanStaff(*m_staffs[i], startTime, endTime); } - m_hlayout.finishLayout(); - m_vlayout.finishLayout(); + m_htqlayout.finishLayout(); + m_vtqlayout.finishLayout(); if (m_staffs[0]->getSegment().getEndMarkerTime() != m_lastEndMarkerTime || m_lastEndMarkerTime == 0 || @@ -1078,7 +1078,7 @@ void MatrixView::refreshSegment(Segment *segment, } m_staffs[0]->positionElements(startTime, endTime); - repaintRulers(); + tqrepaintRulers(); } TQSize MatrixView::getViewSize() @@ -1096,10 +1096,10 @@ void MatrixView::setViewSize(TQSize s) MATRIX_DEBUG << "MatrixView::setViewSize() contentsWidth = " << getCanvasView()->contentsWidth() << endl; } -void MatrixView::repaintRulers() +void MatrixView::tqrepaintRulers() { for (unsigned int i = 0; i != m_propertyViewRulers.size(); i++) - m_propertyViewRulers[i].first->repaint(); + m_propertyViewRulers[i].first->tqrepaint(); } void MatrixView::updateView() @@ -1156,7 +1156,7 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, i != s->getSegmentEvents().end(); ++i) { if (oldSelection && oldSelection->getSegment() == s->getSegment() - && oldSelection->contains(*i)) + && oldSelection->tqcontains(*i)) continue; foundNewEvent = true; @@ -1196,8 +1196,8 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, getStaff(segment)->positionElements(std::min(startA, startB), std::max(endA, endB)); } else { - // mark refresh status and then request a repaint - segment.getRefreshStatus + // mark refresh status and then request a tqrepaint + segment.getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(segment)->getId()]). push(std::min(startA, startB), std::max(endA, endB)); @@ -1213,14 +1213,14 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, getStaff(s->getSegment())->positionElements(startB, endB); } else { - // mark refresh status and then request a repaint + // mark refresh status and then request a tqrepaint - oldSelection->getSegment().getRefreshStatus + oldSelection->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(oldSelection->getSegment())->getId()]). push(startA, endA); - s->getSegment().getRefreshStatus + s->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(s->getSegment())->getId()]). push(startB, endB); @@ -1254,11 +1254,11 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, if (s) { stateChanged("have_selection", KXMLGUIClient::StateNoReverse); - if (s->contains(Note::EventType)) { + if (s->tqcontains(Note::EventType)) { stateChanged("have_notes_in_selection", KXMLGUIClient::StateNoReverse); } - if (s->contains(Note::EventRestType)) { + if (s->tqcontains(Note::EventRestType)) { stateChanged("have_rests_in_selection", KXMLGUIClient::StateNoReverse); } @@ -1315,10 +1315,10 @@ void MatrixView::slotSelectSelected() EditTool* selector = m_toolBox->getTool(MatrixSelector::ToolName); connect(selector, TQT_SIGNAL(gotSelection()), - this, TQT_SLOT(slotNewSelection())); + TQT_TQOBJECT(this), TQT_SLOT(slotNewSelection())); connect(selector, TQT_SIGNAL(editTriggerSegment(int)), - this, TQT_SIGNAL(editTriggerSegment(int))); + TQT_TQOBJECT(this), TQT_SIGNAL(editTriggerSegment(int))); setTool(selector); } @@ -1398,7 +1398,7 @@ void MatrixView::slotMousePressed(timeT time, int pitch, m_tool->handleMousePress(time, pitch, 0, e, el); - if (e->button() != RightButton) { + if (e->button() != Qt::RightButton) { getCanvasView()->startAutoScroll(); } @@ -1474,13 +1474,13 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, long ms = rt.msec(); 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(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(msg); } @@ -1488,8 +1488,8 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, m_haveHoveredOverNote = false; m_hoveredOverNoteName->setText(i18n("%1 (%2)") - .arg(label.getQString()) - .arg(evPitch)); + .tqarg(label.getTQString()) + .tqarg(evPitch)); m_pitchRuler->drawHoverNote(evPitch); } @@ -1504,7 +1504,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y) if (evPitch != m_previousEvPitch) { MidiPitchLabel label(evPitch); m_hoveredOverNoteName->setText(TQString("%1 (%2)"). - arg(label.getQString()).arg(evPitch)); + tqarg(label.getTQString()).tqarg(evPitch)); m_previousEvPitch = evPitch; } } @@ -1529,13 +1529,13 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) // to support Unicode 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(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -1552,7 +1552,7 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll) Composition &comp = getDocument()->getComposition(); int barNo = comp.getBarNumber(time); - if (barNo >= m_hlayout.getLastVisibleBarOnStaff(*m_staffs[0])) { + if (barNo >= m_htqlayout.getLastVisibleBarOnStaff(*m_staffs[0])) { Segment &seg = m_staffs[0]->getSegment(); @@ -1561,20 +1561,20 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll) seg.getStartTime() + ((time - seg.getStartTime()) % (seg.getEndMarkerTime() - seg.getStartTime())); - m_staffs[0]->setPointerPosition(m_hlayout, time); + m_staffs[0]->setPointerPosition(m_htqlayout, time); } else { m_staffs[0]->hidePointer(); scroll = false; } - } else if (barNo < m_hlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) { + } else if (barNo < m_htqlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) { m_staffs[0]->hidePointer(); scroll = false; } else { - m_staffs[0]->setPointerPosition(m_hlayout, time); + m_staffs[0]->setPointerPosition(m_htqlayout, time); } if (scroll && !getCanvasView()->isAutoScrolling()) - getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time)))); + getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time)))); updateView(); } @@ -1585,11 +1585,11 @@ MatrixView::slotSetInsertCursorPosition(timeT time, bool scroll) //!!! For now. Probably unlike slotSetPointerPosition this one // should snap to the nearest event or grid line. - m_staffs[0]->setInsertCursorPosition(m_hlayout, time); + m_staffs[0]->setInsertCursorPosition(m_htqlayout, time); if (scroll && !getCanvasView()->isAutoScrolling()) { getCanvasView()->slotScrollHoriz - (static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time)))); + (static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time)))); } updateView(); @@ -1810,7 +1810,7 @@ void MatrixView::slotVerticalScrollPianoKeyboard(int y) void MatrixView::slotInsertNoteFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); Segment &segment = *getCurrentSegment(); @@ -1830,7 +1830,7 @@ void MatrixView::slotInsertNoteFromAction() } catch (...) { KMessageBox::sorry - (this, i18n("Unknown note insert action %1").arg(name)); + (this, i18n("Unknown note insert action %1").tqarg(name)); return ; } @@ -2017,7 +2017,7 @@ MatrixView::slotSetSnapFromIndex(int s) void MatrixView::slotSetSnapFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(5) == "snap_") { @@ -2052,7 +2052,7 @@ MatrixView::slotSetSnap(timeT t) } for (unsigned int i = 0; i < m_staffs.size(); ++i) - m_staffs[i]->sizeStaff(m_hlayout); + m_staffs[i]->sizeStaff(m_htqlayout); m_segments[0]->setSnapGridSize(t); @@ -2120,7 +2120,7 @@ MatrixView::initActionsToolbar() TQLabel *sLabel = new TQLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); sLabel->setIndent(10); - TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); m_snapGridCombo = new KComboBox(actionsToolbar); @@ -2139,7 +2139,7 @@ MatrixView::initActionsToolbar() } else { timeT err = 0; TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); - TQPixmap pixmap = NotePixmapFactory::toQPixmap + TQPixmap pixmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); m_snapGridCombo->insertItem((err ? noMap : pixmap), label); } @@ -2150,7 +2150,7 @@ MatrixView::initActionsToolbar() } connect(m_snapGridCombo, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotSetSnapFromIndex(int))); + TQT_TQOBJECT(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 @@ -2161,7 +2161,7 @@ MatrixView::initActionsToolbar() m_velocityCombo = new KComboBox(actionsToolbar); for (int i = 0; i <= 127; ++i) { - m_velocityCombo->insertItem(TQString("%1").arg(i)); + m_velocityCombo->insertItem(TQString("%1").tqarg(i)); } m_velocityCombo->setCurrentItem(100); //!!! associate with segment @@ -2177,14 +2177,14 @@ MatrixView::initActionsToolbar() timeT time = m_quantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeCombo->insertItem(error ? noMap : pmap, label); } m_quantizeCombo->insertItem(noMap, i18n("Off")); connect(m_quantizeCombo, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotQuantizeSelection(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotQuantizeSelection(int))); } void @@ -2217,9 +2217,9 @@ MatrixView::initZoomToolbar() } m_hZoomSlider = new ZoomSlider<double> - (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, Qt::Horizontal, zoomToolbar, "kde toolbar widget"); m_hZoomSlider->setTracking(true); - m_hZoomSlider->setFocusPolicy(TQWidget::NoFocus); + m_hZoomSlider->setFocusPolicy(TQ_NoFocus); m_zoomLabel = new TQLabel(zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); @@ -2236,8 +2236,8 @@ MatrixView::slotChangeHorizontalZoom(int) { double zoomValue = m_hZoomSlider->getCurrentSize(); - // m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595 - m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0)); + // m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595 + m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0)); MATRIX_DEBUG << "MatrixView::slotChangeHorizontalZoom() : zoom factor = " << zoomValue << endl; @@ -2245,9 +2245,9 @@ MatrixView::slotChangeHorizontalZoom(int) m_referenceRuler->setHScaleFactor(zoomValue); if (m_tempoRuler) - m_tempoRuler->repaint(); + m_tempoRuler->tqrepaint(); if (m_chordNameRuler) - m_chordNameRuler->repaint(); + m_chordNameRuler->tqrepaint(); // Set zoom matrix // @@ -2266,7 +2266,7 @@ MatrixView::slotChangeHorizontalZoom(int) for (unsigned int i = 0; i < m_propertyViewRulers.size(); ++i) { m_propertyViewRulers[i].first->setHScaleFactor(zoomValue); - m_propertyViewRulers[i].first->repaint(); + m_propertyViewRulers[i].first->tqrepaint(); } if (m_topStandardRuler) @@ -2314,8 +2314,8 @@ MatrixView::slotZoomOut() void MatrixView::scrollToTime(timeT t) { - double layoutCoord = m_hlayout.getXForTime(t); - getCanvasView()->slotScrollHoriz(int(layoutCoord)); + double tqlayoutCoord = m_htqlayout.getXForTime(t); + getCanvasView()->slotScrollHoriz(int(tqlayoutCoord)); } int @@ -2366,7 +2366,7 @@ MatrixView::addPropertyViewRuler(const PropertyName &property) int height = 20; - PropertyViewRuler *newRuler = new PropertyViewRuler(&m_hlayout, + PropertyViewRuler *newRuler = new PropertyViewRuler(&m_htqlayout, m_segments[0], property, xorigin, @@ -2409,7 +2409,7 @@ MatrixView::removePropertyViewRuler(unsigned int number) RulerScale* MatrixView::getHLayout() { - return &m_hlayout; + return &m_htqlayout; } Staff* @@ -2429,14 +2429,14 @@ timeT MatrixView::getInsertionTime() { MatrixStaff *staff = m_staffs[0]; - return staff->getInsertCursorTime(m_hlayout); + return staff->getInsertCursorTime(m_htqlayout); } void MatrixView::slotStepBackward() { timeT time(getInsertionTime()); - slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime + slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime (time - 1, SnapGrid::SnapLeft)); } @@ -2445,7 +2445,7 @@ void MatrixView::slotStepForward() { timeT time(getInsertionTime()); - slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime + slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime (time + 1, SnapGrid::SnapRight)); } @@ -2553,7 +2553,7 @@ MatrixView::readjustCanvasSize() MatrixStaff &staff = *m_staffs[i]; - staff.sizeStaff(m_hlayout); + staff.sizeStaff(m_htqlayout); // if (staff.getTotalWidth() + staff.getX() > maxWidth) { // maxWidth = staff.getTotalWidth() + staff.getX() + 1; @@ -2574,7 +2574,7 @@ MatrixView::readjustCanvasSize() // now get the EditView to do the biz readjustViewSize(TQSize(newWidth, maxHeight), true); - repaintRulers(); + tqrepaintRulers(); } void MatrixView::slotVelocityUp() @@ -2721,23 +2721,23 @@ MatrixView::updateViewCaption() trackPosition = track->getPosition(); setCaption(i18n("%1 - Segment Track #%2 - %3") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1) + .tqarg(view)); } else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) { setCaption(i18n("%1 - All Segments - %2") - .arg(getDocument()->getTitle()) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(view)); } else { setCaption(i18n("%1 - 1 Segment - %2", "%1 - %n Segments - %2", m_segments.size()) - .arg(getDocument()->getTitle()) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(view)); } } @@ -2745,10 +2745,10 @@ int MatrixView::computePostLayoutWidth() { Segment *segment = m_segments[0]; Composition *composition = segment->getComposition(); - int endX = int(m_hlayout.getXForTime + int endX = int(m_htqlayout.getXForTime (composition->getBarEndForTime (segment->getEndMarkerTime()))); - int startX = int(m_hlayout.getXForTime + int startX = int(m_htqlayout.getXForTime (composition->getBarStartForTime (segment->getStartTime()))); @@ -2921,14 +2921,14 @@ MatrixView::slotToggleStepByStep() return ; } if (action->isChecked()) { // after toggling, that is - emit stepByStepTargetRequested(this); + emit stepByStepTargetRequested(TQT_TQOBJECT(this)); } else { emit stepByStepTargetRequested(0); } } void -MatrixView::slotUpdateInsertModeStatus() +MatrixView::slotUpdateInsertModetqStatus() { TQString message; if (isInChordMode()) { @@ -2948,7 +2948,7 @@ MatrixView::slotStepByStepTargetRequested(TQObject *obj) MATRIX_DEBUG << "WARNING: No toggle_step_by_step action" << endl; return ; } - action->setChecked(obj == this); + action->setChecked(TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this)); } void @@ -3026,35 +3026,35 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) TQObject::connect (pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); TQObject::connect (pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), - this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyPressed(unsigned int, bool))); TQObject::connect (pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), - this, TQT_SLOT (slotKeySelected(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeySelected(unsigned int, bool))); TQObject::connect (pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), - this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyReleased(unsigned int, bool))); // Replace the old pitchruler widget m_pitchRuler = pitchRuler; m_pianoView->addChild(m_pitchRuler); m_pitchRuler->show(); - m_pianoView->setFixedWidth(pitchRuler->sizeHint().width()); + m_pianoView->setFixedWidth(pitchRuler->tqsizeHint().width()); // Update matrix canvas readjustCanvasSize(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout")); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout")); else { MATRIX_DEBUG << "MatrixView : rendering elements\n"; m_staffs[0]->positionAllElements(); - m_staffs[0]->getSegment().getRefreshStatus + m_staffs[0]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[0]).setNeedsRefresh(false); update(); } diff --git a/src/gui/editors/matrix/MatrixView.h b/src/gui/editors/matrix/MatrixView.h index 0951c8c..d65b86a 100644 --- a/src/gui/editors/matrix/MatrixView.h +++ b/src/gui/editors/matrix/MatrixView.h @@ -82,13 +82,14 @@ class LevelInfo; class MatrixView : public EditView { Q_OBJECT + TQ_OBJECT friend class MatrixSelector; public: MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, bool drumMode); + TQWidget *tqparent, bool drumMode); virtual ~MatrixView(); @@ -189,7 +190,7 @@ public: * Adjust an X coord by world matrix */ double getXbyWorldMatrix(double value) - { return m_canvasView->worldMatrix().m11() * value; } + { return m_canvasView->tqworldMatrix().m11() * value; } double getXbyInverseWorldMatrix(double value) { return m_canvasView->inverseWorldMatrix().m11() * value; } @@ -200,7 +201,7 @@ public: * Repaint the control rulers * */ - void repaintRulers(); + void tqrepaintRulers(); /* * Readjust the canvas size @@ -291,7 +292,7 @@ public slots: void slotToggleStepByStep(); /// status stuff - void slotUpdateInsertModeStatus(); + void slotUpdateInsertModetqStatus(); /// transforms void slotTransformsQuantize(); @@ -519,7 +520,7 @@ protected: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ virtual void slotSaveOptions(); @@ -593,13 +594,13 @@ protected: std::vector<MatrixStaff*> m_staffs; - MatrixHLayout m_hlayout; - MatrixVLayout m_vlayout; + MatrixHLayout m_htqlayout; + MatrixVLayout m_vtqlayout; SnapGrid *m_snapGrid; timeT m_lastEndMarkerTime; - // Status bar elements + // tqStatus bar elements TQLabel* m_hoveredOverAbsoluteTime; TQLabel* m_hoveredOverNoteName; TQLabel *m_selectionCounter; @@ -668,12 +669,13 @@ protected: }; // Commented this out - was a MatrixView inner class, but we get a warning -// that Q_OBJECT can't be used in an inner class - gl +// that TQ_OBJECT can't be used in an inner class - gl // -// class NoteSender : public QObject +// class NoteSender : public TQObject // { // Q_OBJECT +// TQ_OBJECT // public: // NoteSender(int i, int p) : m_insid(i), m_pitch(p) { } diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index 47f8413..e61cdc6 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -46,8 +46,8 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) - : PitchRuler(parent), +PianoKeyboard::PianoKeyboard(TQWidget *tqparent, int keys) + : PitchRuler(tqparent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), @@ -65,13 +65,13 @@ PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) setMouseTracking(true); } -TQSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::tqsizeHint() const { return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -TQSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::tqminimumSizeHint() const { return m_keySize; } @@ -151,10 +151,10 @@ void PianoKeyboard::paintEvent(TQPaintEvent*) MidiPitchLabel label(pitch); paint.drawText(m_blackKeySize.width(), m_labelKeyPos[i], - label.getQString()); + label.getTQString()); } - paint.setBrush(colorGroup().foreground()); + paint.setBrush(tqcolorGroup().foreground()); for (unsigned int i = 0; i < m_blackKeyPos.size(); ++i) paint.drawRect(0, m_blackKeyPos[i], @@ -249,7 +249,7 @@ void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) // // RWB (20040220) // - MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget()); + MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget()); if (matrixView) { MatrixStaff *staff = matrixView->getStaff(0); @@ -272,11 +272,11 @@ void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { - Qt::ButtonState bs = e->state(); + TQt::ButtonState bs = e->state(); - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = true; - m_selecting = (bs & Qt::ShiftButton); + m_selecting = (bs & TQt::ShiftButton); m_lastKeyPressed = e->y(); if (m_selecting) @@ -288,7 +288,7 @@ void PianoKeyboard::mousePressEvent(TQMouseEvent *e) void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = false; m_selecting = false; emit keyReleased(e->y(), false); diff --git a/src/gui/editors/matrix/PianoKeyboard.h b/src/gui/editors/matrix/PianoKeyboard.h index 82c2be6..c8c09e8 100644 --- a/src/gui/editors/matrix/PianoKeyboard.h +++ b/src/gui/editors/matrix/PianoKeyboard.h @@ -45,11 +45,12 @@ namespace Rosegarden class PianoKeyboard : public PitchRuler { Q_OBJECT + TQ_OBJECT public: - PianoKeyboard(TQWidget *parent, int keys = 88); + PianoKeyboard(TQWidget *tqparent, int keys = 88); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; /* * We want to be able to call this from the matrix view diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 128d3f9..d8d7b06 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -52,7 +52,7 @@ TQPointArray QCanvasMatrixDiamond::areaPoints() const int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; - if ( pen() == NoPen ) + if ( pen() == Qt::NoPen ) pw = 0; pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); @@ -68,7 +68,7 @@ void QCanvasMatrixDiamond::drawShape(TQPainter & p) TQPointArray pa(4); int q = height() / 2 + 2; - TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); + TQPoint mapPos = p.tqworldMatrix().map(TQPoint(int(x()), int(y()))); pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.h b/src/gui/editors/matrix/QCanvasMatrixDiamond.h index 547d7f1..8b736e7 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.h +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QCANVASMATRIXDIAMOND_H_ -#define _RG_QCANVASMATRIXDIAMOND_H_ +#ifndef _RG_TQCANVASMATRIXDIAMOND_H_ +#define _RG_TQCANVASMATRIXDIAMOND_H_ #include "QCanvasMatrixRectangle.h" #include <tqpointarray.h> @@ -41,7 +41,7 @@ class MatrixElement; /** - * A TQCanvas diamond shape referencing a MatrixElement + * A TQCanvas diamond tqshape referencing a MatrixElement */ class QCanvasMatrixDiamond : public QCanvasMatrixRectangle { diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.h b/src/gui/editors/matrix/QCanvasMatrixRectangle.h index 6ef7ed8..12c209d 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.h +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QCANVASMATRIXRECTANGLE_H_ -#define _RG_QCANVASMATRIXRECTANGLE_H_ +#ifndef _RG_TQCANVASMATRIXRECTANGLE_H_ +#define _RG_TQCANVASMATRIXRECTANGLE_H_ #include <tqcanvas.h> @@ -38,7 +38,7 @@ class MatrixElement; /** * A TQCanvasRectangle referencing a MatrixElement */ -class QCanvasMatrixRectangle : public QCanvasRectangle +class QCanvasMatrixRectangle : public TQCanvasRectangle { public: QCanvasMatrixRectangle(MatrixElement&, TQCanvas*); diff --git a/src/gui/editors/notation/ClefInserter.cpp b/src/gui/editors/notation/ClefInserter.cpp index 5e324a9..8392aa5 100644 --- a/src/gui/editors/notation/ClefInserter.cpp +++ b/src/gui/editors/notation/ClefInserter.cpp @@ -48,7 +48,7 @@ ClefInserter::ClefInserter(NotationView* view) : NotationTool("ClefInserter", view), m_clef(Clef::Treble) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -58,8 +58,8 @@ ClefInserter::ClefInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -75,17 +75,17 @@ void ClefInserter::slotNotesSelected() void ClefInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void ClefInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void ClefInserter::ready() { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/ClefInserter.h b/src/gui/editors/notation/ClefInserter.h index 427f885..adab546 100644 --- a/src/gui/editors/notation/ClefInserter.h +++ b/src/gui/editors/notation/ClefInserter.h @@ -48,6 +48,7 @@ class NotationView; class ClefInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp index d2a668f..5bfdee1 100644 --- a/src/gui/editors/notation/FontViewFrame.cpp +++ b/src/gui/editors/notation/FontViewFrame.cpp @@ -46,8 +46,8 @@ namespace Rosegarden { -FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) : - TQFrame(parent, name), +FontViewFrame::FontViewFrame( int pixelSize, TQWidget* tqparent, const char* name ) : + TQFrame(tqparent, name), m_fontSize(pixelSize), m_tableFont(0) { @@ -75,7 +75,7 @@ FontViewFrame::loadFont() { #ifdef HAVE_XFT if (m_tableFont) { - XftFontClose(x11AppDisplay(), (XftFont *)m_tableFont); + XftFontClose(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont); } m_tableFont = 0; @@ -97,7 +97,7 @@ FontViewFrame::loadFont() FcPatternDestroy(pattern); if (!match || result != FcResultMatch) { - KMessageBox::error(this, i18n("Error: Unable to match font name %1").arg(m_fontName)); + KMessageBox::error(this, i18n("Error: Unable to match font name %1").tqarg(m_fontName)); return ; } @@ -106,11 +106,11 @@ FontViewFrame::loadFont() 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(TQString((const char *)matchFamily))); + tqarg(m_fontName).tqarg(TQString((const char *)matchFamily))); m_fontName = (const char *)matchFamily; } - m_tableFont = XftFontOpenPattern(x11AppDisplay(), match); + m_tableFont = XftFontOpenPattern(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), match); if (!m_tableFont) { KMessageBox::error(this, i18n("Error: Unable to open best-match font %1"). @@ -125,7 +125,7 @@ void FontViewFrame::setGlyphs(bool glyphs) update(); } -TQSize FontViewFrame::sizeHint() const +TQSize FontViewFrame::tqsizeHint() const { return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); @@ -161,10 +161,10 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) TQColor rpositive(128, 128, 255); Drawable drawable = (Drawable)handle(); - XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable, - (Visual *)x11Visual(), x11Colormap()); + XftDraw *draw = XftDrawCreate(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), drawable, + (Visual *)TQT_TQPAINTDEVICE(this)->x11Visual(), TQT_TQPAINTDEVICE(this)->x11Colormap()); - TQColor pen(Qt::black); + TQColor pen(TQt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -186,19 +186,19 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) continue; p.setFont(kapp->font()); TQFontMetrics afm(kapp->font()); - TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16); + TQString s = TQString("%1").tqarg(m_row * 256 + (j - 1) * 16); p.drawText(x - afm.width(s), y, s); p.setPen(TQColor(190, 190, 255)); p.drawLine(0, y, width(), y); - p.setPen(Qt::black); + p.setPen(TQt::black); continue; } else if (j == 0) { p.setFont(kapp->font()); - TQString s = TQString("%1").arg(i - 1); + TQString s = TQString("%1").tqarg(i - 1); p.drawText(x, y, s); p.setPen(TQColor(190, 190, 255)); p.drawLine(x, 0, x, height()); - p.setPen(Qt::black); + p.setPen(TQt::black); continue; } @@ -209,7 +209,7 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) XftDrawGlyphs(draw, &col, (XftFont *)m_tableFont, x, y, &ui, 1); } else { FcChar32 ch = m_row * 256 + (j - 1) * 16 + i - 1; - if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) { + if (XftCharExists(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) { XftDrawString32(draw, &col, (XftFont *)m_tableFont, x, y, &ch, 1); } } @@ -233,7 +233,7 @@ FontViewFrame::hasRow(int r) const for (int c = 0; c < 256; ++c) { FcChar32 ch = r * 256 + c; - if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) { + if (XftCharExists(TQT_TQPAINTDEVICE_CONST(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) { return true; } } diff --git a/src/gui/editors/notation/FontViewFrame.h b/src/gui/editors/notation/FontViewFrame.h index a344fc1..524e393 100644 --- a/src/gui/editors/notation/FontViewFrame.h +++ b/src/gui/editors/notation/FontViewFrame.h @@ -40,15 +40,16 @@ namespace Rosegarden -class FontViewFrame : public QFrame +class FontViewFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); + FontViewFrame(int pixelSize, TQWidget *tqparent = 0, const char *name = 0); virtual ~FontViewFrame(); - TQSize sizeHint() const; + TQSize tqsizeHint() const; bool hasRow(int row) const; public slots: diff --git a/src/gui/editors/notation/GuitarChordInserter.cpp b/src/gui/editors/notation/GuitarChordInserter.cpp index b4f6839..f47f2c9 100644 --- a/src/gui/editors/notation/GuitarChordInserter.cpp +++ b/src/gui/editors/notation/GuitarChordInserter.cpp @@ -53,7 +53,7 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) : NotationTool("GuitarChordInserter", view), m_guitarChordSelector(0) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, @@ -64,8 +64,8 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, @@ -85,12 +85,12 @@ void GuitarChordInserter::slotGuitarChordSelected() void GuitarChordInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void GuitarChordInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void GuitarChordInserter::handleLeftButtonPress(timeT, diff --git a/src/gui/editors/notation/GuitarChordInserter.h b/src/gui/editors/notation/GuitarChordInserter.h index d66174b..166f179 100644 --- a/src/gui/editors/notation/GuitarChordInserter.h +++ b/src/gui/editors/notation/GuitarChordInserter.h @@ -48,6 +48,7 @@ class GuitarChordSelectorDialog; class GuitarChordInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/HeadersGroup.cpp b/src/gui/editors/notation/HeadersGroup.cpp index f7dcc82..b08ed1c 100644 --- a/src/gui/editors/notation/HeadersGroup.cpp +++ b/src/gui/editors/notation/HeadersGroup.cpp @@ -43,8 +43,8 @@ namespace Rosegarden HeadersGroup:: -HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp) : - TQVBox(parent), +HeadersGroup(TQWidget *tqparent, NotationView * nv, Composition * comp) : + TQVBox(tqparent), m_notationView(nv), m_composition(comp), m_usedHeight(0), diff --git a/src/gui/editors/notation/HeadersGroup.h b/src/gui/editors/notation/HeadersGroup.h index b2a9edb..a995646 100644 --- a/src/gui/editors/notation/HeadersGroup.h +++ b/src/gui/editors/notation/HeadersGroup.h @@ -51,14 +51,15 @@ class Composition; class TrackHeader; -class HeadersGroup : public QVBox +class HeadersGroup : public TQVBox { Q_OBJECT + TQ_OBJECT public: /** * Create an empty headers group */ - HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp); + HeadersGroup(TQWidget *tqparent, NotationView * nv, Composition * comp); void removeAllHeaders(); diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp index fb7d2d9..40c2d59 100644 --- a/src/gui/editors/notation/NotationCanvasView.cpp +++ b/src/gui/editors/notation/NotationCanvasView.cpp @@ -49,9 +49,9 @@ namespace Rosegarden { NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, - TQCanvas *viewing, TQWidget *parent, + TQCanvas *viewing, TQWidget *tqparent, const char *name, WFlags f) : - RosegardenCanvasView(viewing, parent, name, f), + RosegardenCanvasView(viewing, tqparent, name, f), m_linedStaffManager(staffmgr), m_lastYPosNearStaff(0), m_currentStaff(0), @@ -70,13 +70,13 @@ NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, viewport()->setMouseTracking(true); - m_heightMarker = new QCanvasItemGroup(viewing); + m_heightMarker = new TQCanvasItemGroup(viewing); - m_vert1 = new QCanvasLineGroupable(viewing, m_heightMarker); + m_vert1 = new TQCanvasLineGroupable(viewing, m_heightMarker); m_vert1->setPoints(0, 0, 0, 8); m_vert1->setPen(TQPen(TQColor(64, 64, 64), 1)); - m_vert2 = new QCanvasLineGroupable(viewing, m_heightMarker); + m_vert2 = new TQCanvasLineGroupable(viewing, m_heightMarker); m_vert2->setPoints(17, 0, 17, 8); m_vert2->setPen(TQPen(TQColor(64, 64, 64), 1)); @@ -115,7 +115,7 @@ NotationCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) if (!m_currentStaff) { - emit hoveredOverNoteChanged(TQString::null); + emit hoveredOverNoteChanged(TQString()); if (prevStaff) { m_heightMarker->hide(); canvas()->update(); @@ -191,10 +191,10 @@ void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e) return ; } - QCanvasNotationSprite *sprite = - dynamic_cast<QCanvasNotationSprite*>(*it); + TQCanvasNotationSprite *sprite = + dynamic_cast<TQCanvasNotationSprite*>(*it); if (!sprite) { - if (dynamic_cast<QCanvasNonElementSprite *>(*it)) { + if (dynamic_cast<TQCanvasNonElementSprite *>(*it)) { emit nonNotationItemPressed(e, *it); return ; } else if (dynamic_cast<TQCanvasText *>(*it)) { @@ -378,8 +378,8 @@ NotationCanvasView::setHeightMarkerHeight(TQMouseEvent *e) for (i = 0; i < legerLineCount; ++i) { - QCanvasLineGroupable *line = - new QCanvasLineGroupable(canvas(), m_heightMarker); + TQCanvasLineGroupable *line = + new TQCanvasLineGroupable(canvas(), m_heightMarker); line->setPen(TQPen(TQColor(64, 64, 64), 1)); @@ -411,14 +411,14 @@ NotationCanvasView::getElementAtXCoord(TQMouseEvent *e) // any old element TQCanvasItemList itemList = canvas()->collisions(threshold); TQCanvasItemList::Iterator it; - QCanvasNotationSprite* sprite = 0; + TQCanvasNotationSprite* sprite = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { TQCanvasItem *item = *it; - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(item))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(item))) { return & (sprite->getNotationElement()); } } diff --git a/src/gui/editors/notation/NotationCanvasView.h b/src/gui/editors/notation/NotationCanvasView.h index 3c26ded..e327de8 100644 --- a/src/gui/editors/notation/NotationCanvasView.h +++ b/src/gui/editors/notation/NotationCanvasView.h @@ -37,8 +37,8 @@ class TQPoint; class TQPaintEvent; class TQPainter; class TQMouseEvent; -class QCanvasLineGroupable; -class QCanvasItemGroup; +class TQCanvasLineGroupable; +class TQCanvasItemGroup; class TQCanvasItem; class TQCanvas; @@ -66,10 +66,11 @@ class LinedStaffManager; class NotationCanvasView : public RosegardenCanvasView { Q_OBJECT + TQ_OBJECT public: NotationCanvasView(const LinedStaffManager &staffmgr, - TQCanvas *viewing, TQWidget *parent=0, + TQCanvas *viewing, TQWidget *tqparent=0, const char *name=0, WFlags f=0); ~NotationCanvasView(); @@ -92,7 +93,7 @@ signals: /** * Emitted when the user clicks on a TQCanvasItem which is active * - * @see QCanvasItem#setActive + * @see TQCanvasItem#setActive */ void activeItemPressed(TQMouseEvent*, TQCanvasItem* item); @@ -106,7 +107,7 @@ signals: /** * Emitted when the user clicks on a TQCanvasItem which is a - * plain QCanvasText + * plain TQCanvasText */ void textItemPressed(TQMouseEvent *, TQCanvasItem *); @@ -200,10 +201,10 @@ protected: NotationStaff *m_currentStaff; int m_currentHeight; - QCanvasItemGroup *m_heightMarker; - QCanvasLineGroupable *m_vert1; - QCanvasLineGroupable *m_vert2; - std::vector<QCanvasLineGroupable *> m_legerLines; + TQCanvasItemGroup *m_heightMarker; + TQCanvasLineGroupable *m_vert1; + TQCanvasLineGroupable *m_vert2; + std::vector<TQCanvasLineGroupable *> m_legerLines; bool m_legerLineOffset; bool m_heightTracking; diff --git a/src/gui/editors/notation/NotationChord.cpp b/src/gui/editors/notation/NotationChord.cpp index 7b0a263..297cee7 100644 --- a/src/gui/editors/notation/NotationChord.cpp +++ b/src/gui/editors/notation/NotationChord.cpp @@ -110,7 +110,7 @@ NotationChord::hasStemUp() const NotationRules rules; // believe anything found in any of the notes, if in a persistent - // property or a property apparently set by the beaming algorithm + // property or a property aptqparently set by the beaming algorithm Iterator i(getInitialNote()); diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index 2bb036f..6dfad3d 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -43,7 +43,7 @@ class Event; /** - * The Notation H and V layout is performed on a + * The Notation H and V tqlayout is performed on a * NotationElementList. Once this is done, each NotationElement is * affected a TQCanvasItem which is set at these coords. * @@ -82,7 +82,7 @@ public: * Sets the X coordinate and width of the space "underneath" * this element, i.e. the extents within which a mouse click * or some such might be considered to be interested in this - * element as opposed to any other. These are layout coords + * element as opposed to any other. These are tqlayout coords */ void setLayoutAirspace(double x, double width) { m_airX = x; m_airWidth = width; diff --git a/src/gui/editors/notation/NotationEraser.cpp b/src/gui/editors/notation/NotationEraser.cpp index 856a622..d9d5f3a 100644 --- a/src/gui/editors/notation/NotationEraser.cpp +++ b/src/gui/editors/notation/NotationEraser.cpp @@ -56,13 +56,13 @@ NotationEraser::NotationEraser(NotationView* view) "toggle_rest_collapse"); TQIconSet icon - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Insert Tool"), icon, 0, this, TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -73,7 +73,7 @@ NotationEraser::NotationEraser(NotationView* view) void NotationEraser::ready() { - m_nParentView->setCanvasCursor(Qt::pointingHandCursor); + m_nParentView->setCanvasCursor(TQt::pointingHandCursor); m_nParentView->setHeightTracking(false); } @@ -106,7 +106,7 @@ void NotationEraser::slotInsertSelected() void NotationEraser::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } const TQString NotationEraser::ToolName = "notationeraser"; diff --git a/src/gui/editors/notation/NotationEraser.h b/src/gui/editors/notation/NotationEraser.h index b13ed89..d87f21f 100644 --- a/src/gui/editors/notation/NotationEraser.h +++ b/src/gui/editors/notation/NotationEraser.h @@ -47,6 +47,7 @@ class NotationView; class NotationEraser : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/NotationGroup.cpp b/src/gui/editors/notation/NotationGroup.cpp index 78525d9..caa7256 100644 --- a/src/gui/editors/notation/NotationGroup.cpp +++ b/src/gui/editors/notation/NotationGroup.cpp @@ -185,7 +185,7 @@ NotationGroup::sample(const NELIterator &i, bool goingForwards) } bool -NotationGroup::contains(const NELIterator &i) const +NotationGroup::tqcontains(const NELIterator &i) const { NELIterator j(getInitialElement()), k( getFinalElement()); diff --git a/src/gui/editors/notation/NotationGroup.h b/src/gui/editors/notation/NotationGroup.h index c7b1134..ed1b7c2 100644 --- a/src/gui/editors/notation/NotationGroup.h +++ b/src/gui/editors/notation/NotationGroup.h @@ -73,13 +73,13 @@ public: /** * Writes the BEAMED, BEAM_ABOVE, and STEM_UP properties into the - * notes in the group, as appropriate. Does not require layout x + * notes in the group, as appropriate. Does not require tqlayout x * coordinates to have been set. */ void applyStemProperties(); /** - * Writes beam data into each note in the group. Notes' layout x + * Writes beam data into each note in the group. Notes' tqlayout x * coordinates must already have been set. Does not require * applyStemProperties to have already been called. */ @@ -87,12 +87,12 @@ public: /** * Writes tupling line data into each note in the group. Notes' - * layout x coordinates must already have been set. Does nothing + * tqlayout x coordinates must already have been set. Does nothing * if this is not a tupled group. */ void applyTuplingLine(NotationStaff &); - virtual bool contains(const NELIterator &) const; + virtual bool tqcontains(const NELIterator &) const; virtual bool sample(const NELIterator &i, bool goingForwards); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 4d891a6..20b7469 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -58,8 +58,8 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name) : - ProgressReporter(parent, name), + TQObject* tqparent, const char* name) : + ProgressReporter(tqparent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), m_pageMode(false), @@ -324,7 +324,7 @@ NotationHLayout::scanStaff(Staff &staff, timeT startTime, timeT endTime) setBarBasicData(staff, barNo, from, barCorrect, timeSignature, newTimeSig); BarDataList::iterator bdli(barList.find(barNo)); - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; ChunkList &chunks = bdli->second.chunks; chunks.clear(); @@ -655,10 +655,10 @@ NotationHLayout::scanChord(NotationElementList *notes, extraWidth += e; } - float layoutExtra = 0; + float tqlayoutExtra = 0; if (chord.hasNoteHeadShifted()) { if (chord.hasStemUp()) { - layoutExtra += npf->getNoteBodyWidth(); + tqlayoutExtra += npf->getNoteBodyWidth(); } else { extraWidth = std::max(extraWidth, float(npf->getNoteBodyWidth())); } @@ -686,13 +686,13 @@ NotationHLayout::scanChord(NotationElementList *notes, if (grace) { chunks.push_back(Chunk(d, chord.getSubOrdering(), - extraWidth + layoutExtra + extraWidth + tqlayoutExtra + getLayoutWidth(**myLongest, npf, key) - npf->getNoteBodyWidth(), // tighten up 0)); } else { chunks.push_back(Chunk(d, 0, extraWidth, - std::max(layoutExtra + + std::max(tqlayoutExtra + getLayoutWidth(**myLongest, npf, key), lyricWidth))); lyricWidth = 0; @@ -847,7 +847,7 @@ NotationHLayout::preSquishBar(int barNo) bdli->second.sizeData.reconciledWidth = bdli->second.sizeData.idealWidth; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } } } @@ -987,7 +987,7 @@ NotationHLayout::reconcileBarsLinear() double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { NOTATION_DEBUG << "(So needsLayout becomes true)" << endl; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1181,7 +1181,7 @@ NotationHLayout::reconcileBarsPage() BarData::SizeData &bd(bdli->second.sizeData); double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1230,15 +1230,15 @@ NotationHLayout::finishLayout(timeT startTime, timeT endTime) m_timePerProgressIncrement = timeCovered / (100 / m_barData.size()); - layout(i, startTime, endTime); + tqlayout(i, startTime, endTime); ++staffNo; } } void -NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) +NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime) { - Profiler profiler("NotationHLayout::layout"); + Profiler profiler("NotationHLayout::tqlayout"); Staff &staff = *(i->first); NotationElementList *notes = staff.getViewElementList(); @@ -1247,11 +1247,11 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) bool isFullLayout = (startTime == endTime); - // these two are for partial layouts: + // these two are for partial tqlayouts: // bool haveSimpleOffset = false; // double simpleOffset = 0; - NOTATION_DEBUG << "NotationHLayout::layout: full layout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout: full tqlayout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; double x = 0, barX = 0; TieMap tieMap; @@ -1287,7 +1287,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NotationElementList::iterator from = bdi->second.basicData.start; NotationElementList::iterator to; - NOTATION_DEBUG << "NotationHLayout::layout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; BarDataList::iterator nbdi(bdi); if (++nbdi == barList.end()) { @@ -1303,27 +1303,27 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NOTATION_DEBUG << "Start is to" << endl; } - if (!bdi->second.layoutData.needsLayout) { + if (!bdi->second.tqlayoutData.needsLayout) { - double offset = barX - bdi->second.layoutData.x; + double offset = barX - bdi->second.tqlayoutData.x; - NOTATION_DEBUG << "NotationHLayout::layout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; if (offset > -0.1 && offset < 0.1) { - NOTATION_DEBUG << "NotationHLayout::layout(): no offset, ignoring" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): no offset, ignoring" << endl; continue; } - bdi->second.layoutData.x += offset; + bdi->second.tqlayoutData.x += offset; if (bdi->second.basicData.newTimeSig) - bdi->second.layoutData.timeSigX += (int)offset; + bdi->second.tqlayoutData.timeSigX += (int)offset; for (NotationElementList::iterator it = from; it != to && it != notes->end(); ++it) { NotationElement* nel = static_cast<NotationElement*>(*it); - NOTATION_DEBUG << "NotationHLayout::layout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; nel->setLayoutX((*it)->getLayoutX() + offset); double airX, airWidth; nel->getLayoutAirspace(airX, airWidth); @@ -1333,7 +1333,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) continue; } - bdi->second.layoutData.x = barX; + bdi->second.tqlayoutData.x = barX; // x = barX + getPostBarMargin(); bool timeSigToPlace = false; @@ -1342,7 +1342,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) timeSigToPlace = !bdi->second.basicData.timeSignature.isHidden(); } if (timeSigToPlace) { - NOTATION_DEBUG << "NotationHLayout::layout(): there's a time sig in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): there's a time sig in this bar" << endl; } bool repeatClefAndKey = false; @@ -1350,7 +1350,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) repeatClefAndKey = true; } if (repeatClefAndKey) { - NOTATION_DEBUG << "NotationHLayout::layout(): need to repeat clef & key in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): need to repeat clef & key in this bar" << endl; } double barInset = notationStaff.getBarInset(barNo, repeatClefAndKey); @@ -1446,9 +1446,9 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } // NOTATION_DEBUG << "Placing timesig at " << (x - fixed) << endl; -// bdi->second.layoutData.timeSigX = (int)(x - fixed); +// bdi->second.tqlayoutData.timeSigX = (int)(x - fixed); NOTATION_DEBUG << "Placing timesig at " << sigx << " (would previously have been " << int(x-fixed) << "?)" << endl; - bdi->second.layoutData.timeSigX = (int)sigx; + bdi->second.tqlayoutData.timeSigX = (int)sigx; double shift = getFixedItemSpacing() + m_npf->getTimeSigWidth(timeSignature); offset += shift; @@ -1467,7 +1467,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } } - NOTATION_DEBUG << "NotationHLayout::layout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; double displacedX = 0.0; long dxRaw = 0; @@ -1571,7 +1571,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) // no other events in this bar, so we never managed to place it x = barX + offset; NOTATION_DEBUG << "Placing timesig reluctantly at " << x << endl; - bdi->second.layoutData.timeSigX = (int)(x); + bdi->second.tqlayoutData.timeSigX = (int)(x); timeSigToPlace = false; } @@ -1583,7 +1583,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } m_groupsExtant.clear(); - bdi->second.layoutData.needsLayout = false; + bdi->second.tqlayoutData.needsLayout = false; } } @@ -1653,7 +1653,7 @@ NotationHLayout::getSpacingDuration(Staff &staff, if (d > 0 && (*i)->event()->getDuration() == 0) return d; // grace note NotationElementList::iterator j(i), e(staff.getViewElementList()->end()); - while (j != e && (chord.contains(j) || (*j)->getViewDuration() == 0)) + while (j != e && (chord.tqcontains(j) || (*j)->getViewDuration() == 0)) ++j; if (j != e) { @@ -1692,7 +1692,7 @@ NotationHLayout::positionChord(Staff &staff, barEndsInChord = true; // #704958 (multiple tuplet spanners created when entering - // triplet chord) -- layout() updates the beamed group data + // triplet chord) -- tqlayout() updates the beamed group data // for non-notes, but we have to do it for notes so as to // ensure every note in the chord is accounted for sampleGroupElement(staff, clef, key, citr); @@ -2024,7 +2024,7 @@ bool NotationHLayout::getTimeSignaturePosition(Staff &staff, BarDataList::iterator bdli(bdl.find(i)); if (bdli != bdl.end()) { timeSig = bdli->second.basicData.timeSignature; - timeSigX = (double)(bdli->second.layoutData.timeSigX); + timeSigX = (double)(bdli->second.tqlayoutData.timeSigX); return bdli->second.basicData.newTimeSig; } else return 0; diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 878dc17..59a666b 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -56,7 +56,7 @@ class AccidentalTable; /** - * Horizontal notation layout + * Horizontal notation tqlayout * * computes the X coordinates of notation elements */ @@ -68,7 +68,7 @@ public: NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name = 0); + TQObject* tqparent, const char* name = 0); virtual ~NotationHLayout(); @@ -77,9 +77,9 @@ public: } /** - * Precomputes layout data for a single staff. The resulting data + * Precomputes tqlayout data for a single staff. The resulting data * is stored in the BarDataMap, keyed from the staff reference; - * the entire map is then used by reconcileBars() and layout(). + * the entire map is then used by reconcileBars() and tqlayout(). * The map should be cleared (by calling reset()) before a full * set of staffs is preparsed. */ @@ -167,7 +167,7 @@ public: static std::vector<int> getAvailableProportions(); /** - * Returns the total length of all elements once layout is done + * Returns the total length of all elements once tqlayout is done * This is the x-coord of the end of the last element on the longest * staff, plus the space allocated to that element */ @@ -211,7 +211,7 @@ public: * Returns the X coord corresponding to the given time value. * This RulerScale method works by interpolating between bar lines * (the inverse of the way getTimeForX works), and should be used - * for any rulers associated with the layout. + * for any rulers associated with the tqlayout. */ virtual double getXForTime(timeT time) const; @@ -286,12 +286,12 @@ protected: } sizeData; struct LayoutData - { // slots either assumed, or only known at layout time + { // slots either assumed, or only known at tqlayout time bool needsLayout; double x; // coordinate for display of barline int timeSigX; - } layoutData; + } tqlayoutData; BarData(NotationElementList::iterator i, bool correct, TimeSignature timeSig, bool newTimeSig) { @@ -304,9 +304,9 @@ protected: sizeData.fixedWidth = 0; sizeData.clefKeyWidth = 0; sizeData.actualDuration = 0; - layoutData.needsLayout = true; - layoutData.x = -1; - layoutData.timeSigX = -1; + tqlayoutData.needsLayout = true; + tqlayoutData.x = -1; + tqlayoutData.timeSigX = -1; } }; @@ -360,7 +360,7 @@ protected: /// Tries to harmonize the bar positions for all the staves (page mode) void reconcileBarsPage(); - void layout(BarDataMap::iterator, + void tqlayout(BarDataMap::iterator, timeT startTime, timeT endTime); diff --git a/src/gui/editors/notation/NotationSelectionPaster.cpp b/src/gui/editors/notation/NotationSelectionPaster.cpp index 96d894c..b1f8d4b 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.cpp +++ b/src/gui/editors/notation/NotationSelectionPaster.cpp @@ -46,7 +46,7 @@ NotationSelectionPaster::NotationSelectionPaster(EventSelection& es, : NotationTool("NotationPaster", view), m_selection(es) { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); } NotationSelectionPaster::~NotationSelectionPaster() @@ -75,14 +75,14 @@ void NotationSelectionPaster::handleLeftButtonPress(timeT, Segment& segment = staff->getSegment(); PasteEventsCommand *command = new PasteEventsCommand - (segment, m_parentView->getDocument()->getClipboard(), time, + (segment, m_tqparentView->getDocument()->getClipboard(), time, PasteEventsCommand::Restricted); if (!command->isPossible()) { - m_parentView->slotStatusHelpMsg(i18n("Couldn't paste at this point")); + m_tqparentView->slotStatusHelpMsg(i18n("Couldn't paste at this point")); } else { - m_parentView->addCommandToHistory(command); - m_parentView->slotStatusHelpMsg(i18n("Ready.")); + m_tqparentView->addCommandToHistory(command); + m_tqparentView->slotStatusHelpMsg(i18n("Ready.")); } } diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp index 2a28545..3b5eda2 100644 --- a/src/gui/editors/notation/NotationSelector.cpp +++ b/src/gui/editors/notation/NotationSelector.cpp @@ -71,14 +71,14 @@ NotationSelector::NotationSelector(NotationView* view) m_justSelectedBar(false), m_wholeStaffSelectionComplete(false) { - connect(m_parentView, TQT_SIGNAL(usedSelection()), + connect(m_tqparentView, TQT_SIGNAL(usedSelection()), this, TQT_SLOT(slotHideSelection())); connect(this, TQT_SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), - m_parentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); + m_tqparentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); TQIconSet icon - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KToggleAction(i18n("Switch to Insert Tool"), icon, 0, this, TQT_SLOT(slotInsertSelected()), actionCollection(), @@ -188,7 +188,7 @@ void NotationSelector::handleLeftButtonPress(timeT t, m_updateRect = true; m_startedFineDrag = false; - //m_parentView->setCursorPosition(p.x()); + //m_tqparentView->setCursorPosition(p.x()); } void NotationSelector::handleRightButtonPress(timeT t, @@ -327,7 +327,7 @@ int NotationSelector::handleMouseMove(timeT, int, } else { - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -375,7 +375,7 @@ void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e) // if the event was already part of the selection, we want to // remove it - if (m_selectionToMerge->contains(m_clickedElement->event())) { + if (m_selectionToMerge->tqcontains(m_clickedElement->event())) { m_selectionToMerge->removeEvent(m_clickedElement->event()); } else { m_selectionToMerge->addEvent(m_clickedElement->event()); @@ -431,7 +431,7 @@ void NotationSelector::drag(int x, int y, bool final) return ; EventSelection *selection = m_nParentView->getCurrentSelection(); - if (!selection || !selection->contains(m_clickedElement->event())) { + if (!selection || !selection->tqcontains(m_clickedElement->event())) { selection = new EventSelection(m_selectedStaff->getSegment()); selection->addEvent(m_clickedElement->event()); } @@ -460,7 +460,7 @@ void NotationSelector::drag(int x, int y, bool final) ::Rosegarden::Key key; timeT dragTime = clickedTime; - double layoutX = m_clickedElement->getLayoutX(); + double tqlayoutX = m_clickedElement->getLayoutX(); timeT duration = m_clickedElement->getViewDuration(); NotationElementList::iterator itr = @@ -470,7 +470,7 @@ void NotationSelector::drag(int x, int y, bool final) NotationElement *elt = dynamic_cast<NotationElement *>(*itr); dragTime = elt->getViewAbsoluteTime(); - layoutX = elt->getLayoutX(); + tqlayoutX = elt->getLayoutX(); if (elt->isRest() && duration > 0 && elt->getCanvasItem()) { @@ -490,7 +490,7 @@ void NotationSelector::drag(int x, int y, bool final) part = parts - 1; dragTime += part * restDuration / parts; - layoutX += part * restWidth / parts + + tqlayoutX += part * restWidth / parts + (restX - elt->getCanvasX()); } } @@ -532,7 +532,7 @@ void NotationSelector::drag(int x, int y, bool final) m_clickedElement->isNote()) { m_nParentView->showPreviewNote(targetStaff->getId(), - layoutX, pitch, height, + tqlayoutX, pitch, height, Note::getNearestNote(duration), m_clickedElement->isGrace()); m_lastDragPitch = pitch; @@ -614,7 +614,7 @@ void NotationSelector::dragFine(int x, int y, bool final) EventSelection *selection = m_nParentView->getCurrentSelection(); if (!selection) selection = new EventSelection(m_selectedStaff->getSegment()); - if (!selection->contains(m_clickedElement->event())) + if (!selection->tqcontains(m_clickedElement->event())) selection->addEvent(m_clickedElement->event()); m_nParentView->setCurrentSelection(selection); @@ -711,7 +711,7 @@ void NotationSelector::ready() m_selectionRect->hide(); m_selectionRect->setPen(GUIPalette::getColour(GUIPalette::SelectionRectangle)); - m_nParentView->setCanvasCursor(Qt::arrowCursor); + m_nParentView->setCanvasCursor(TQt::arrowCursor); m_nParentView->setHeightTracking(false); } @@ -738,57 +738,57 @@ void NotationSelector::slotInsertSelected() void NotationSelector::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void NotationSelector::slotCollapseRestsHard() { - m_parentView->actionCollection()->action("collapse_rests_aggressively")->activate(); + m_tqparentView->actionCollection()->action("collapse_rests_aggressively")->activate(); } void NotationSelector::slotRespellFlat() { - m_parentView->actionCollection()->action("respell_flat")->activate(); + m_tqparentView->actionCollection()->action("respell_flat")->activate(); } void NotationSelector::slotRespellSharp() { - m_parentView->actionCollection()->action("respell_sharp")->activate(); + m_tqparentView->actionCollection()->action("respell_sharp")->activate(); } void NotationSelector::slotRespellNatural() { - m_parentView->actionCollection()->action("respell_natural")->activate(); + m_tqparentView->actionCollection()->action("respell_natural")->activate(); } void NotationSelector::slotCollapseNotes() { - m_parentView->actionCollection()->action("collapse_notes")->activate(); + m_tqparentView->actionCollection()->action("collapse_notes")->activate(); } void NotationSelector::slotInterpret() { - m_parentView->actionCollection()->action("interpret")->activate(); + m_tqparentView->actionCollection()->action("interpret")->activate(); } void NotationSelector::slotStaffAbove() { - m_parentView->actionCollection()->action("move_events_up_staff")->activate(); + m_tqparentView->actionCollection()->action("move_events_up_staff")->activate(); } void NotationSelector::slotStaffBelow() { - m_parentView->actionCollection()->action("move_events_down_staff")->activate(); + m_tqparentView->actionCollection()->action("move_events_down_staff")->activate(); } void NotationSelector::slotMakeInvisible() { - m_parentView->actionCollection()->action("make_invisible")->activate(); + m_tqparentView->actionCollection()->action("make_invisible")->activate(); } void NotationSelector::slotMakeVisible() { - m_parentView->actionCollection()->action("make_visible")->activate(); + m_tqparentView->actionCollection()->action("make_visible")->activate(); } void NotationSelector::setViewCurrentSelection(bool preview) @@ -838,7 +838,7 @@ EventSelection* NotationSelector::getSelection() TQCanvasItemList::Iterator it; TQRect rect = m_selectionRect->rect().normalize(); - QCanvasNotationSprite *sprite = 0; + TQCanvasNotationSprite *sprite = 0; if (!m_selectedStaff) { @@ -850,7 +850,7 @@ EventSelection* NotationSelector::getSelection() for (it = itemList.begin(); it != itemList.end(); ++it) { - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(*it))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(*it))) { NotationElement &el = sprite->getNotationElement(); @@ -870,11 +870,11 @@ EventSelection* NotationSelector::getSelection() x += nbw; } - if (!rect.contains(x, int((*it)->y()), true)) { + if (!rect.tqcontains(x, int((*it)->y()), true)) { // #988217 (Notation: Special column of pixels // prevents sweep selection) -- for notes, test // again with centred x-coord - if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) { + if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { continue; } } @@ -906,7 +906,7 @@ EventSelection* NotationSelector::getSelection() for (it = itemList.begin(); it != itemList.end(); ++it) { - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(*it))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(*it))) { NotationElement &el = sprite->getNotationElement(); @@ -925,11 +925,11 @@ EventSelection* NotationSelector::getSelection() // check if the element's rect // is actually included in the selection rect. // - if (!rect.contains(x, int((*it)->y()), true)) { + if (!rect.tqcontains(x, int((*it)->y()), true)) { // #988217 (Notation: Special column of pixels // prevents sweep selection) -- for notes, test again // with centred x-coord - if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) { + if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { continue; } } diff --git a/src/gui/editors/notation/NotationSelector.h b/src/gui/editors/notation/NotationSelector.h index 6f9494a..f865cb7 100644 --- a/src/gui/editors/notation/NotationSelector.h +++ b/src/gui/editors/notation/NotationSelector.h @@ -54,6 +54,7 @@ class Event; class NotationSelector : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; @@ -96,7 +97,7 @@ public: /** * Create the selection rect * - * We need this because NotationView deletes all QCanvasItems + * We need this because NotationView deletes all TQCanvasItems * along with it. This happens before the NotationSelector is * deleted, so we can't delete the selection rect in * ~NotationSelector because that leads to double deletion. @@ -159,7 +160,7 @@ protected: NotationSelector(NotationView*); /** - * Set the current selection on the parent NotationView + * Set the current selection on the tqparent NotationView */ void setViewCurrentSelection(bool preview); diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index 717e418..1b875f3 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -141,7 +141,7 @@ NotationStaff::changeFont(std::string fontName, int size) } void -NotationStaff::insertTimeSignature(double layoutX, +NotationStaff::insertTimeSignature(double tqlayoutX, const TimeSignature &timeSig) { if (timeSig.isHidden()) @@ -149,11 +149,11 @@ NotationStaff::insertTimeSignature(double layoutX, m_notePixmapFactory->setSelected(false); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); - QCanvasTimeSigSprite *sprite = - new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); + TQCanvasTimeSigSprite *sprite = + new TQCanvasTimeSigSprite(tqlayoutX, pixmap, m_canvas); LinedStaffCoords sigCoords = - getCanvasCoordsForLayoutCoords(layoutX, getLayoutYForHeight(4)); + getCanvasCoordsForLayoutCoords(tqlayoutX, getLayoutYForHeight(4)); sprite->move(sigCoords.first, (double)sigCoords.second); sprite->show(); @@ -174,7 +174,7 @@ NotationStaff::deleteTimeSignatures() } void -NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) +NotationStaff::insertRepeatedClefAndKey(double tqlayoutX, int barNo) { bool needClef = false, needKey = false; timeT t; @@ -196,15 +196,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needClef) { - int layoutY = getLayoutYForHeight(clef.getAxisHeight()); + int tqlayoutY = getLayoutYForHeight(clef.getAxisHeight()); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -215,15 +215,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needKey) { - int layoutY = getLayoutYForHeight(12); + int tqlayoutY = getLayoutYForHeight(12); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -236,16 +236,16 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (m_notationView->isInPrintMode() && (needClef || needKey)) { - int layoutY = getLayoutYForHeight(14); - int h = getLayoutYForHeight(-8) - layoutY; + int tqlayoutY = getLayoutYForHeight(14); + int h = getLayoutYForHeight(-8) - tqlayoutY; LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); - rect->setPen(Qt::black); - rect->setBrush(Qt::white); + rect->setPen(TQt::black); + rect->setBrush(TQt::white); rect->setZ(1); rect->show(); @@ -282,8 +282,8 @@ NotationStaff::drawStaffName() m_staffName = new QCanvasStaffNameSprite(map, m_canvas); - int layoutY = getLayoutYForHeight(3); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, layoutY); + int tqlayoutY = getLayoutYForHeight(3); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, tqlayoutY); m_staffName->move(getX() + getMargin() + m_notePixmapFactory->getNoteBodyWidth(), coords.second - map->height() / 2); m_staffName->show(); @@ -300,9 +300,9 @@ NotationStaff::isStaffNameUpToDate() timeT NotationStaff::getTimeAtCanvasCoords(double cx, int cy) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); RulerScale * rs = m_notationView->getHLayout(); - return rs->getTimeForX(layoutCoords.first); + return rs->getTimeForX(tqlayoutCoords.first); } void @@ -310,17 +310,17 @@ NotationStaff::getClefAndKeyAtCanvasCoords(double cx, int cy, Clef &clef, ::Rosegarden::Key &key) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); int i; for (i = 0; i < m_clefChanges.size(); ++i) { - if (m_clefChanges[i].first > layoutCoords.first) + if (m_clefChanges[i].first > tqlayoutCoords.first) break; clef = m_clefChanges[i].second; } for (i = 0; i < m_keyChanges.size(); ++i) { - if (m_keyChanges[i].first > layoutCoords.first) + if (m_keyChanges[i].first > tqlayoutCoords.first) break; key = m_keyChanges[i].second; } @@ -379,7 +379,7 @@ NotationStaff::getClosestElementToLayoutX(double x, return notes->end(); } - NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at layout " << (*result)->getLayoutX() << " - we're at layout " << x << endl; + NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at tqlayout " << (*result)->getLayoutX() << " - we're at tqlayout " << x << endl; PRINT_ELAPSED("NotationStaff::getClosestElementToLayoutX"); @@ -449,7 +449,7 @@ NotationStaff::renderElements(NotationElementList::iterator from, // NOTATION_DEBUG << "NotationStaff " << this << "::renderElements()" << endl; Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -512,7 +512,7 @@ NotationStaff::renderPrintable(timeT from, timeT to) Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering notes on staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering notes on staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -580,7 +580,7 @@ NotationStaff::positionElements(timeT from, timeT to) if (to < startTime) to = startTime; if (to == from) return; - emit setOperationName(i18n("Positioning staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Positioning staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -1395,15 +1395,15 @@ void NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { - double layoutX = elt->getLayoutX(); - int layoutY = (int)elt->getLayoutY(); + double tqlayoutX = elt->getLayoutX(); + int tqlayoutY = (int)elt->getLayoutY(); elt->removeCanvasItem(); while (1) { LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); double canvasX = coords.first; int canvasY = coords.second; @@ -1412,11 +1412,11 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } else { - int row = getRowForLayoutX(layoutX); + int row = getRowForLayoutX(tqlayoutX); double rightMargin = getCanvasXForRightOfRow(row); double extent = canvasX + pixmap->width(); @@ -1432,13 +1432,13 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *leftCanvasPixmap = new TQCanvasPixmap (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *rightCanvasPixmap = new TQCanvasPixmap (split.second, TQPoint(0, pixmap->offsetY())); - item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); if (elt->getCanvasItem()) { @@ -1452,19 +1452,19 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, delete pixmap; pixmap = rightCanvasPixmap; - layoutX += rightMargin - canvasX + 0.01; // ensure flip to next row + tqlayoutX += rightMargin - canvasX + 0.01; // ensure flip to next row continue; } else { // policy == MoveBackToFit - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); elt->setLayoutX(elt->getLayoutX() - (extent - rightMargin)); - coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); canvasX = coords.first; } } else { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } } @@ -1742,7 +1742,7 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) if (collision) { // Make collision halo TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); - haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); + haloItem = new TQCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } @@ -1819,11 +1819,11 @@ NotationStaff::isSelected(NotationElementList::iterator it) { const EventSelection *selection = m_notationView->getCurrentSelection(); - return selection && selection->contains((*it)->event()); + return selection && selection->tqcontains((*it)->event()); } void -NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, +NotationStaff::showPreviewNote(double tqlayoutX, int heightOnStaff, const Note ¬e, bool grace) { NotePixmapFactory *npf = m_notePixmapFactory; @@ -1851,8 +1851,8 @@ NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, m_previewSprite = new QCanvasSimpleSprite (npf->makeNotePixmap(params), m_canvas); - int layoutY = getLayoutYForHeight(heightOnStaff); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + int tqlayoutY = getLayoutYForHeight(heightOnStaff); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); m_previewSprite->move(coords.first, (double)coords.second); m_previewSprite->setZ(4); diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index f58e77d..b941ac0 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -136,14 +136,14 @@ public: /** * Assign suitable coordinates to the elements on the staff, - * based entirely on the layout X and Y coordinates they were - * given by the horizontal and vertical layout processes. + * based entirely on the tqlayout X and Y coordinates they were + * given by the horizontal and vertical tqlayout processes. * * This is necessary because the sprites that are being positioned - * may have been created either after the layout process completed + * may have been created either after the tqlayout process completed * (by renderElements) or before (by the previous renderElements * call, if the sprites are unchanged but have moved) -- so - * neither the layout nor renderElements can authoritatively set + * neither the tqlayout nor renderElements can authoritatively set * their final positions. * * This method also updates the selected-ness of any elements it @@ -197,7 +197,7 @@ public: * elements). Pass movedOnly as true to indicate that elements * have not changed but only been repositioned, for example as a * consequence of a modification on another staff that caused a - * relayout. + * retqlayout. */ virtual void markChanged(timeT from = 0, timeT to = 0, @@ -223,7 +223,7 @@ public: /** * Insert time signature at x-coordinate \a x. */ - virtual void insertTimeSignature(double layoutX, + virtual void insertTimeSignature(double tqlayoutX, const TimeSignature &timeSig); /** @@ -234,7 +234,7 @@ public: /** * Insert repeated clef and key at start of new line, at x-coordinate \a x. */ - virtual void insertRepeatedClefAndKey(double layoutX, int barNo); + virtual void insertRepeatedClefAndKey(double tqlayoutX, int barNo); /** * Delete all repeated clefs and keys. @@ -270,7 +270,7 @@ public: Accidentals::NoAccidental) const; /** - * Find the NotationElement whose layout x-coord is closest to x, + * Find the NotationElement whose tqlayout x-coord is closest to x, * without regard to its y-coord. * * If notesAndRestsOnly is true, will return the closest note @@ -289,7 +289,7 @@ public: int proximityThreshold = 10); /** - * Find the NotationElement "under" the given layout x-coord, + * Find the NotationElement "under" the given tqlayout x-coord, * without regard to its y-coord. * * Also returns the clef and key in force at the given coordinates. @@ -301,7 +301,7 @@ public: * Draw a note on the staff to show an insert position prior to * an insert. */ - virtual void showPreviewNote(double layoutX, int heightOnStaff, + virtual void showPreviewNote(double tqlayoutX, int heightOnStaff, const Note ¬e, bool grace); /** @@ -396,7 +396,7 @@ protected: * Returns true if the item at the given iterator appears to have * moved horizontally without the spacing around it changing. * - * In practice, calculates the offset between the intended layout + * In practice, calculates the offset between the intended tqlayout * and current canvas coordinates of the item at the given * iterator, and returns true if this offset is equal to those of * all other following iterators at the same time as well as the @@ -412,7 +412,7 @@ protected: /** * Prepare a painter to draw an object of logical width w at - * layout-x coord x, starting at offset dx into the object, by + * tqlayout-x coord x, starting at offset dx into the object, by * setting the painter's clipping so as to crop the object at the * right edge of the row if it would otherwise overrun. The * return value is the amount of the object visible on this row @@ -423,7 +423,7 @@ protected: * This function calls painter.save(), and the caller must call * painter.restore() after use. */ - virtual double setPainterClipping(TQPainter *, double layoutX, int layoutY, + virtual double setPainterClipping(TQPainter *, double tqlayoutX, int tqlayoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy); @@ -473,8 +473,8 @@ protected: TQPainter *m_printPainter; - enum BarStatus { UnRendered = 0, Rendered, Positioned }; - typedef std::map<int, BarStatus> BarStatusMap; + enum BartqStatus { UnRendered = 0, Rendered, Positioned }; + typedef std::map<int, BartqStatus> BarStatusMap; BarStatusMap m_status; std::pair<int, int> m_lastRenderCheck; bool m_ready; diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6065323..0c73bbc 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -39,7 +39,7 @@ namespace Rosegarden { -QString +TQString NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { @@ -49,31 +49,31 @@ NotationStrings::addDots(TQString s, int dots, if (internationalize) { if (dots > 1) { if (hyphenate) - return i18n("%1-dotted-%2").arg(dots).arg(s); + return i18n("%1-dotted-%2").tqarg(dots).tqarg(s); else - return i18n("%1-dotted %2").arg(dots).arg(s); + return i18n("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return i18n("dotted-%1").arg(s); + return i18n("dotted-%1").tqarg(s); else - return i18n("dotted %1").arg(s); + return i18n("dotted %1").tqarg(s); } } else { if (dots > 1) { if (hyphenate) - return TQString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").tqarg(dots).tqarg(s); else - return TQString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return TQString("dotted-%1").arg(s); + return TQString("dotted-%1").tqarg(s); else - return TQString("dotted %1").arg(s); + return TQString("dotted %1").tqarg(s); } } } -QString +TQString NotationStrings::getNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -93,17 +93,17 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getAmericanName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -123,17 +123,17 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").tqarg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").tqarg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } } -QString +TQString NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -151,17 +151,17 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getReferenceName(Note note, bool isRest) { Note::Type type = note.getNoteType(); @@ -182,7 +182,7 @@ Note NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); - int pos = name.find('-'); + int pos = name.tqfind('-'); int dots = 0; if (pos > 0 && pos < 6 && pos < int(name.length()) - 1) { @@ -236,7 +236,7 @@ NotationStrings::getNoteForName(TQString name) throw MalformedNoteName("Can't parse note name \"" + origName + "\""); } -QString +TQString NotationStrings::makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, @@ -271,11 +271,11 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return TQString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").tqarg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return TQString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").tqarg(duration / wholeNote); } else { - return i18n("%1 ticks").arg(duration); + return i18n("%1 ticks").tqarg(duration); plural = false; } diff --git a/src/gui/editors/notation/NotationTool.cpp b/src/gui/editors/notation/NotationTool.cpp index b187fbb..6d32782 100644 --- a/src/gui/editors/notation/NotationTool.cpp +++ b/src/gui/editors/notation/NotationTool.cpp @@ -44,13 +44,13 @@ NotationTool::~NotationTool() NOTATION_DEBUG << "NotationTool::~NotationTool()" << endl; // delete m_menu; - // m_parentView->factory()->removeClient(this); + // m_tqparentView->factory()->removeClient(this); // m_instance = 0; } void NotationTool::ready() { - m_nParentView->setCanvasCursor(Qt::arrowCursor); + m_nParentView->setCanvasCursor(TQt::arrowCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/NotationToolBox.cpp b/src/gui/editors/notation/NotationToolBox.cpp index 7632413..d3511fb 100644 --- a/src/gui/editors/notation/NotationToolBox.cpp +++ b/src/gui/editors/notation/NotationToolBox.cpp @@ -42,9 +42,9 @@ namespace Rosegarden { -NotationToolBox::NotationToolBox(NotationView *parent) - : EditToolBox(parent), - m_nParentView(parent) +NotationToolBox::NotationToolBox(NotationView *tqparent) + : EditToolBox(tqparent), + m_nParentView(tqparent) { //m_tools.setAutoDelete(true); } @@ -89,7 +89,7 @@ EditTool* NotationToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/notation/NotationToolBox.h b/src/gui/editors/notation/NotationToolBox.h index d6765e6..5c15b2b 100644 --- a/src/gui/editors/notation/NotationToolBox.h +++ b/src/gui/editors/notation/NotationToolBox.h @@ -47,8 +47,9 @@ class EditTool; class NotationToolBox : public EditToolBox { Q_OBJECT + TQ_OBJECT public: - NotationToolBox(NotationView* parent); + NotationToolBox(NotationView* tqparent); protected: virtual EditTool* createTool(const TQString& toolName); diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index 5be5532..12979ea 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -55,8 +55,8 @@ using namespace BaseProperties; NotationVLayout::NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name) : - ProgressReporter(parent, name), + TQObject* tqparent, const char* name) : + ProgressReporter(tqparent, name), m_composition(c), m_npf(npf), m_notationQuantizer(c->getNotationQuantizer()), @@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) if (!(*chord[j])->event()->get <Int> (m_properties.HEIGHT_ON_STAFF, height)) { - 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; + 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)").tqarg((*chord[j])->getViewAbsoluteTime()) << std::endl; (*chord[j])->event()->dump(std::cerr); } h.push_back(height); @@ -249,7 +249,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) bool hasShifted = chord.hasNoteHeadShifted(); - double y0 = -1E50; // A very unlikely Y layout value + double y0 = -1E50; // A very unlikely Y tqlayout value for (unsigned int j = 0; j < chord.size(); ++j) { @@ -269,7 +269,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // These calculations and assignments are pretty much final // if the chord is not in a beamed group, but if it is then // they will be reworked by NotationGroup::applyBeam, which - // is called from NotationHLayout::layout, which is called + // is called from NotationHLayout::tqlayout, which is called // after this. Any inaccuracies here for beamed groups // should be stamped out there. @@ -342,7 +342,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // Not optimal, as we can end up scanning the chord // multiple times (we'll return to it after scanning the // contained note). [We can't just iterate over all - // elements within the chord (as we can in hlayout) + // elements within the chord (as we can in htqlayout) // because we need them in height order.] i = chord.getFirstElementNotInChord(); @@ -490,7 +490,7 @@ NotationVLayout::positionSlur(NotationStaff &staff, if (!event->get <Int>(m_properties.HEIGHT_ON_STAFF, h)) { KMessageBox::sorry - ((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())); + ((TQWidget *)tqparent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").tqarg((*scooter)->getViewAbsoluteTime())); event->dump(std::cerr); } diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index 2e718c7..afddb0b 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -52,7 +52,7 @@ class Composition; /** - * Vertical notation layout + * Vertical notation tqlayout * * computes the Y coordinate of notation elements */ @@ -63,7 +63,7 @@ class NotationVLayout : public ProgressReporter, public: NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name = 0); + TQObject* tqparent, const char* name = 0); virtual ~NotationVLayout(); @@ -91,9 +91,9 @@ public: timeT = 0); /** - * Do any layout dependent on more than one staff. As it - * happens, we have none, but we do have some layout that - * depends on the final results from the horizontal layout + * Do any tqlayout dependent on more than one staff. As it + * happens, we have none, but we do have some tqlayout that + * depends on the final results from the horizontal tqlayout * (for slurs), so we should do that here */ virtual void finishLayout(timeT = 0, diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index b3db080..4d16fb7 100644 --- a/src/gui/editors/notation/NotationView.cpp +++ b/src/gui/editors/notation/NotationView.cpp @@ -346,9 +346,9 @@ public: NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool showProgressive) : - EditView(doc, segments, 2, parent, "notationview"), + EditView(doc, segments, 2, tqparent, "notationview"), m_properties(getViewLocalPropertyPrefix()), m_selectionCounter(0), m_insertModeLabel(0), @@ -372,10 +372,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(20), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), - m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), + m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), + m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), m_rawNoteRuler(0), @@ -409,7 +409,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the layout toolbar + // by both the actions and the tqlayout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -435,15 +435,15 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NoteFontFactory::getDefaultSize(m_fontName)); int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_hlayout->setSpacing(defaultSpacing); + m_htqlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_hlayout->setProportion(defaultProportion); + m_htqlayout->setProportion(defaultProportion); delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); setupActions(); // setupAddControlRulerMenu(); - too early for notation, moved to end of ctor. @@ -452,7 +452,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); tCanvas->resize(width() * 2, height() * 2); setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -460,19 +460,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, updateViewCaption(); m_chordNameRuler = new ChordNameRuler - (m_hlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); + (m_htqlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); addRuler(m_chordNameRuler); if (showProgressive) m_chordNameRuler->show(); m_tempoRuler = new TempoRuler - (m_hlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); + (m_htqlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); addRuler(m_tempoRuler); m_tempoRuler->hide(); static_cast<TempoRuler *>(m_tempoRuler)->connectSignals(); m_rawNoteRuler = new RawNoteRuler - (m_hlayout, segments[0], m_leftGutter, 20, getCentralWidget()); + (m_htqlayout, segments[0], m_leftGutter, 20, getCentralWidget()); addRuler(m_rawNoteRuler); m_rawNoteRuler->show(); @@ -484,7 +484,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, readOptions(); - setBottomStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, + setBottomStandardRuler(new StandardRuler(getDocument(), m_htqlayout, m_leftGutter, 25, true, getBottomWidget())); for (unsigned int i = 0; i < segments.size(); ++i) @@ -506,7 +506,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, 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 + // The grid tqlayout is only here to maintain the button in a // right place m_headersTopFrame = new TQFrame(getCentralWidget()); TQGridLayout * headersTopGrid @@ -516,13 +516,13 @@ NotationView::NotationView(RosegardenGUIDoc *doc, TQPushButton * hideHeadersButton = new TQPushButton(m_headersTopFrame); headersTopGrid->addWidget(hideHeadersButton, 1, 1, - Qt::AlignRight | Qt::AlignBottom); + TQt::AlignRight | TQt::AlignBottom); hideHeadersButton->setIconSet(TQIconSet(pixmap)); hideHeadersButton->setFlat(true); TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), - m_hlayout, m_leftGutter, 25, + m_htqlayout, m_leftGutter, 25, false, getCentralWidget()), m_headersTopFrame); m_topStandardRuler->getLoopRuler()->setBackgroundColor @@ -544,7 +544,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // - // layout + // tqlayout // ProgressDialog* progressDlg = 0; @@ -571,21 +571,21 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_staffs[0]->setCurrent(true); m_config->setGroup(NotationViewConfigGroup); - int layoutMode = m_config->readNumEntry("layoutmode", 0); + int tqlayoutMode = m_config->readNumEntry("tqlayoutmode", 0); try { LinedStaff::PageMode mode = LinedStaff::LinearMode; - if (layoutMode == 1) + if (tqlayoutMode == 1) mode = LinedStaff::ContinuousPageMode; - else if (layoutMode == 2) + else if (tqlayoutMode == 2) mode = LinedStaff::MultiPageMode; setPageMode(mode); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } @@ -594,7 +594,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -676,10 +676,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); TQObject::connect - (getCanvasView(), TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); + (getCanvasView(), TQT_SIGNAL(zoomIn()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn())); TQObject::connect - (getCanvasView(), TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); + (getCanvasView(), TQT_SIGNAL(zoomOut()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut())); TQObject::connect (m_pannerDialog->scrollbox(), TQT_SIGNAL(valueChanged(const TQPoint &)), @@ -754,24 +754,24 @@ NotationView::NotationView(RosegardenGUIDoc *doc, slotSetInsertCursorPosition(0); slotSetPointerPosition(doc->getComposition().getPosition()); setCurrentSelection(0, false, true); - slotUpdateInsertModeStatus(); - m_chordNameRuler->repaint(); - m_tempoRuler->repaint(); - m_rawNoteRuler->repaint(); + slotUpdateInsertModetqStatus(); + m_chordNameRuler->tqrepaint(); + m_tempoRuler->tqrepaint(); + m_rawNoteRuler->tqrepaint(); m_inhibitRefresh = false; // slotCheckRendered(0, getCanvasView()->visibleWidth()); - // getCanvasView()->repaintContents(); + // getCanvasView()->tqrepaintContents(); updateView(); TQObject::connect (this, TQT_SIGNAL(renderComplete()), getCanvasView(), TQT_SLOT(slotRenderComplete())); - if (parent) + if (tqparent) { const TrackButtons * trackLabels = - ((RosegardenGUIView*)parent)->getTrackEditor()->getTrackButtons(); + ((RosegardenGUIView*)tqparent)->getTrackEditor()->getTrackButtons(); TQObject::connect (trackLabels, TQT_SIGNAL(nameChanged()), this, TQT_SLOT(slotUpdateStaffName())); @@ -796,7 +796,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, NotationView *referenceView) : EditView(doc, segments, 1, 0, "printview"), m_properties(getViewLocalPropertyPrefix()), @@ -817,10 +817,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(0), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), - m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), + m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), + m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), m_rawNoteRuler(0), @@ -850,7 +850,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the layout toolbar + // by both the actions and the tqlayout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -871,25 +871,25 @@ NotationView::NotationView(RosegardenGUIDoc *doc, if (referenceView) { - m_hlayout->setSpacing(referenceView->m_hlayout->getSpacing()); - m_hlayout->setProportion(referenceView->m_hlayout->getProportion()); + m_htqlayout->setSpacing(referenceView->m_htqlayout->getSpacing()); + m_htqlayout->setProportion(referenceView->m_htqlayout->getProportion()); } else { int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_hlayout->setSpacing(defaultSpacing); + m_htqlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_hlayout->setProportion(defaultProportion); + m_htqlayout->setProportion(defaultProportion); } delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); tCanvas->resize(width() * 2, height() * 2); //!!! setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -907,7 +907,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, ProgressDialog* progressDlg = 0; - if (parent) + if (tqparent) { ProgressDialog::processEvents(); @@ -915,7 +915,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NOTATION_DEBUG << "NotationView : setting up progress dialog" << endl; progressDlg = new ProgressDialog(i18n("Preparing to print..."), - 100, parent); + 100, tqparent); progressDlg->setAutoClose(false); progressDlg->setAutoReset(true); progressDlg->setMinimumDuration(1000); @@ -930,7 +930,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setPageMode(LinedStaff::MultiPageMode); // also positions and renders the staffs! for (unsigned int i = 0; i < m_staffs.size(); ++i) { - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } @@ -939,7 +939,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -1223,7 +1223,7 @@ void NotationView::positionStaffs() } } - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); int topGutter = 0; @@ -1341,7 +1341,7 @@ void NotationView::positionPages() haveBackground = true; } // we're happy to ignore errors from this one: - deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); + deskBackground.load(TQString("%1/misc/bg-desktop.xpm").tqarg(pixmapDir)); } int pageWidth = getPageWidth(); @@ -1365,15 +1365,15 @@ void NotationView::positionPages() if (m_pageMode != LinedStaff::MultiPageMode) { if (haveBackground) { - canvas()->setBackgroundPixmap(background); - getCanvasView()->setBackgroundMode(Qt::FixedPixmap); + canvas()->tqsetBackgroundPixmap(background); + getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setErasePixmap(background); } } else { if (haveBackground) { - canvas()->setBackgroundPixmap(deskBackground); - getCanvasView()->setBackgroundMode(Qt::FixedPixmap); + canvas()->tqsetBackgroundPixmap(deskBackground); + getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setErasePixmap(background); } @@ -1389,7 +1389,7 @@ void NotationView::positionPages() int w = pageWidth - leftMargin / 2; int h = pageHeight; - TQString str = TQString("%1").arg(page + 1); + TQString str = TQString("%1").tqarg(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); @@ -1399,8 +1399,8 @@ void NotationView::positionPages() TQCanvasRectangle *rect = new TQCanvasRectangle(x, y, w, h, canvas()); if (haveBackground) - rect->setBrush(TQBrush(Qt::white, background)); - rect->setPen(Qt::black); + rect->setBrush(TQBrush(TQt::white, background)); + rect->setPen(TQt::black); rect->setZ( -1000); rect->show(); m_pages.push_back(rect); @@ -1458,7 +1458,7 @@ void NotationView::readOptions() setOneToolbar("show_clefs_toolbar", "Clefs Toolbar"); setOneToolbar("show_group_toolbar", "Group Toolbar"); setOneToolbar("show_marks_toolbar", "Marks Toolbar"); - setOneToolbar("show_layout_toolbar", "Layout Toolbar"); + setOneToolbar("show_tqlayout_toolbar", "Layout Toolbar"); setOneToolbar("show_transport_toolbar", "Transport Toolbar"); setOneToolbar("show_accidentals_toolbar", "Accidentals Toolbar"); setOneToolbar("show_meta_toolbar", "Meta Toolbar"); @@ -1482,26 +1482,26 @@ void NotationView::readOptions() opt = m_config->readBoolEntry("Show Annotations", true); m_annotationsVisible = opt; getToggleAction("show_annotations")->setChecked(opt); - slotUpdateAnnotationsStatus(); + slotUpdateAnnotationstqStatus(); // slotToggleAnnotations(); opt = m_config->readBoolEntry("Show LilyPond Directives", true); m_lilyPondDirectivesVisible = opt; getToggleAction("show_lilypond_directives")->setChecked(opt); - slotUpdateLilyPondDirectivesStatus(); + slotUpdateLilyPondDirectivestqStatus(); } void NotationView::setupActions() { - KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview(this, TQT_SLOT(slotFilePrintPreview()), + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrintPreview()), actionCollection()); - new KAction(i18n("Print &with LilyPond..."), 0, 0, this, + new KAction(i18n("Print &with LilyPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); - new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, + new KAction(i18n("Preview with Lil&yPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); @@ -1513,7 +1513,7 @@ void NotationView::setupActions() // View menu stuff KActionMenu *fontActionMenu = - new KActionMenu(i18n("Note &Font"), this, "note_font_actionmenu"); + new KActionMenu(i18n("Note &Font"), TQT_TQOBJECT(this), "note_font_actionmenu"); std::set <std::string> fs(NoteFontFactory::getFontNames()); @@ -1522,12 +1522,12 @@ void NotationView::setupActions() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - TQString fontQName(strtoqstr(*i)); + TQString fontTQName(strtoqstr(*i)); KToggleAction *fontAction = new KToggleAction - (fontQName, 0, this, TQT_SLOT(slotChangeFontFromAction()), - actionCollection(), "note_font_" + fontQName); + (fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()), + actionCollection(), "note_font_" + fontTQName); fontAction->setChecked(*i == m_fontName); fontActionMenu->insert(fontAction); @@ -1536,20 +1536,20 @@ void NotationView::setupActions() actionCollection()->insert(fontActionMenu); m_fontSizeActionMenu = - new KActionMenu(i18n("Si&ze"), this, "note_font_size_actionmenu"); + new KActionMenu(i18n("Si&ze"), TQT_TQOBJECT(this), "note_font_size_actionmenu"); setupFontSizeMenu(); actionCollection()->insert(m_fontSizeActionMenu); m_showHeadersMenuEntry - = new KAction(i18n("Show Track Headers"), 0, this, + = new KAction(i18n("Show Track Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowHeadersGroup()), actionCollection(), "show_track_headers"); KActionMenu *spacingActionMenu = - new KActionMenu(i18n("S&pacing"), this, "stretch_actionmenu"); + new KActionMenu(i18n("S&pacing"), TQT_TQOBJECT(this), "stretch_actionmenu"); - int defaultSpacing = m_hlayout->getSpacing(); + int defaultSpacing = m_htqlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); for (std::vector<int>::iterator i = spacings.begin(); @@ -1557,9 +1557,9 @@ void NotationView::setupActions() KToggleAction *spacingAction = new KToggleAction - (TQString("%1%").arg(*i), 0, this, + (TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeSpacingFromAction()), - actionCollection(), TQString("spacing_%1").arg(*i)); + actionCollection(), TQString("spacing_%1").tqarg(*i)); spacingAction->setExclusiveGroup("spacing"); spacingAction->setChecked(*i == defaultSpacing); @@ -1569,23 +1569,23 @@ void NotationView::setupActions() actionCollection()->insert(spacingActionMenu); KActionMenu *proportionActionMenu = - new KActionMenu(i18n("Du&ration Factor"), this, "proportion_actionmenu"); + new KActionMenu(i18n("Du&ration Factor"), TQT_TQOBJECT(this), "proportion_actionmenu"); - int defaultProportion = m_hlayout->getProportion(); + int defaultProportion = m_htqlayout->getProportion(); std::vector<int> proportions = NotationHLayout::getAvailableProportions(); for (std::vector<int>::iterator i = proportions.begin(); i != proportions.end(); ++i) { - TQString name = TQString("%1%").arg(*i); + TQString name = TQString("%1%").tqarg(*i); if (*i == 0) name = i18n("None"); KToggleAction *proportionAction = new KToggleAction - (name, 0, this, + (name, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeProportionFromAction()), - actionCollection(), TQString("proportion_%1").arg(*i)); + actionCollection(), TQString("proportion_%1").tqarg(*i)); proportionAction->setExclusiveGroup("proportion"); proportionAction->setChecked(*i == defaultProportion); @@ -1595,7 +1595,7 @@ void NotationView::setupActions() actionCollection()->insert(proportionActionMenu); KActionMenu *styleActionMenu = - new KActionMenu(i18n("Note &Style"), this, "note_style_actionmenu"); + new KActionMenu(i18n("Note &Style"), TQT_TQOBJECT(this), "note_style_actionmenu"); std::vector<NoteStyleName> styles (NoteStyleFactory::getAvailableStyleNames()); @@ -1603,12 +1603,12 @@ void NotationView::setupActions() for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - TQString styleQName(strtoqstr(*i)); + TQString styleTQName(strtoqstr(*i)); KAction *styleAction = new KAction - (styleQName, 0, this, TQT_SLOT(slotSetStyleFromAction()), - actionCollection(), "style_" + styleQName); + (styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()), + actionCollection(), "style_" + styleTQName); styleActionMenu->insert(styleAction); } @@ -1616,21 +1616,21 @@ void NotationView::setupActions() actionCollection()->insert(styleActionMenu); KActionMenu *ornamentActionMenu = - new KActionMenu(i18n("Use Ornament"), this, "ornament_actionmenu"); + new KActionMenu(i18n("Use Ornament"), TQT_TQOBJECT(this), "ornament_actionmenu"); new KAction - (i18n("Insert Rest"), Key_P, this, TQT_SLOT(slotInsertRest()), + (i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()), actionCollection(), TQString("insert_rest")); new KAction - (i18n("Switch from Note to Rest"), Key_T, this, + (i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchFromNoteToRest()), actionCollection(), TQString("switch_from_note_to_rest")); new KAction - (i18n("Switch from Rest to Note"), Key_Y, this, + (i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchFromRestToNote()), actionCollection(), TQString("switch_from_rest_to_note")); @@ -1644,13 +1644,13 @@ void NotationView::setupActions() NoteActionData noteActionData = **actionDataIter; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (noteActionData.pixmapName))); noteAction = new KRadioAction(noteActionData.title, icon, noteActionData.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotNoteAction()), actionCollection(), noteActionData.actionName); @@ -1669,14 +1669,14 @@ void NotationView::setupActions() NoteChangeActionData data = **actionDataIter; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (data.pixmapName))); KAction *action = new KAction(data.title, icon, data.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotNoteChangeAction()), actionCollection(), data.actionName); @@ -1699,9 +1699,9 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (actionsAccidental[i][3]))); - noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, this, + noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this), actionsAccidental[i][1], actionCollection(), actionsAccidental[i][2]); noteAction->setExclusiveGroup("accidentals"); @@ -1713,48 +1713,48 @@ void NotationView::setupActions() // // Treble - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); - noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTrebleClef()), actionCollection(), "treble_clef"); noteAction->setExclusiveGroup("notes"); // Alto - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); - noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotAltoClef()), actionCollection(), "alto_clef"); noteAction->setExclusiveGroup("notes"); // Tenor - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); - noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTenorClef()), actionCollection(), "tenor_clef"); noteAction->setExclusiveGroup("notes"); // Bass - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); - noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotBassClef()), actionCollection(), "bass_clef"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); - noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, TQT_TQOBJECT(this), TQT_SLOT(slotText()), actionCollection(), "text"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); - noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, TQT_TQOBJECT(this), TQT_SLOT(slotGuitarChord()), actionCollection(), "guitarchord"); noteAction->setExclusiveGroup("notes"); - /* icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); - noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, this, + /* icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); + noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, TQT_TQOBJECT(this), TQT_SLOT(slotLilyPondDirective()), actionCollection(), "lilypond_directive"); noteAction->setExclusiveGroup("notes"); */ @@ -1764,420 +1764,420 @@ void NotationView::setupActions() // Edition tools (eraser, selector...) // noteAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, TQT_SLOT(slotEraseSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); noteAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, TQT_SLOT(slotSelectSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); - new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); + new KToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); // Edit menu - new KAction(i18n("Select from Sta&rt"), 0, this, + new KAction(i18n("Select from Sta&rt"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectFromStart()), actionCollection(), "select_from_start"); - new KAction(i18n("Select to &End"), 0, this, + new KAction(i18n("Select to &End"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectToEnd()), actionCollection(), "select_to_end"); - new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, this, + new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectWholeStaff()), actionCollection(), "select_whole_staff"); - new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, this, + new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, TQT_TQOBJECT(this), TQT_SLOT(slotEditCutAndClose()), actionCollection(), "cut_and_close"); - new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, this, + new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotEditGeneralPaste()), actionCollection(), "general_paste"); - new KAction(i18n("De&lete"), Key_Delete, this, + new KAction(i18n("De&lete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); - new KAction(i18n("Move to Staff Above"), 0, this, + new KAction(i18n("Move to Staff Above"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveEventsUpStaff()), actionCollection(), "move_events_up_staff"); - new KAction(i18n("Move to Staff Below"), 0, this, + new KAction(i18n("Move to Staff Below"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveEventsDownStaff()), actionCollection(), "move_events_down_staff"); // // Settings menu // - int layoutMode = m_config->readNumEntry("layoutmode", 0); + int tqlayoutMode = m_config->readNumEntry("tqlayoutmode", 0); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-tqlayout.xpm"); icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction - (i18n("&Linear Layout"), icon, 0, this, TQT_SLOT(slotLinearMode()), + (i18n("&Linear Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotLinearMode()), actionCollection(), "linear_mode"); - linearModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 0) + linearModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 0) linearModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/continuous-page-mode.xpm"); icon = TQIconSet(pixmap); KRadioAction *continuousPageModeAction = new KRadioAction - (i18n("&Continuous Page Layout"), icon, 0, this, TQT_SLOT(slotContinuousPageMode()), + (i18n("&Continuous Page Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotContinuousPageMode()), actionCollection(), "continuous_page_mode"); - continuousPageModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 1) + continuousPageModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 1) continuousPageModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/multi-page-mode.xpm"); icon = TQIconSet(pixmap); KRadioAction *multiPageModeAction = new KRadioAction - (i18n("&Multiple Page Layout"), icon, 0, this, TQT_SLOT(slotMultiPageMode()), + (i18n("&Multiple Page Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMultiPageMode()), actionCollection(), "multi_page_mode"); - multiPageModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 2) + multiPageModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 2) multiPageModeAction->setChecked(true); - new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, + new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); - new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, this, + new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleRawNoteRuler()), actionCollection(), "show_raw_note_ruler"); - new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, + new KToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); - new KToggleAction(i18n("Show &Annotations"), 0, this, + new KToggleAction(i18n("Show &Annotations"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAnnotations()), actionCollection(), "show_annotations"); - new KToggleAction(i18n("Show Lily&Pond Directives"), 0, this, + new KToggleAction(i18n("Show Lily&Pond Directives"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleLilyPondDirectives()), actionCollection(), "show_lilypond_directives"); - new KAction(i18n("Open L&yric Editor"), 0, this, TQT_SLOT(slotEditLyrics()), + new KAction(i18n("Open L&yric Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditLyrics()), actionCollection(), "lyric_editor"); // // Group menu // - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-beam"))); - new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, this, + new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupBeam()), actionCollection(), "beam"); - new KAction(AutoBeamCommand::getGlobalName(), 0, this, + new KAction(AutoBeamCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-unbeam"))); - new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, this, + new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupBreak()), actionCollection(), "break_group"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-simple-tuplet"))); - new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, this, + new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-tuplet"))); - new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, this, + new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); - new KAction(UnTupletCommand::getGlobalName(), 0, this, + new KAction(UnTupletCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("triplet"))); (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "triplet_mode"))-> setChecked(false); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "chord_mode"))-> setChecked(false); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("group-grace"))); (new KToggleAction(i18n("Grace Insert Mode"), icon, 0, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "grace_mode"))-> setChecked(false); /*!!! - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-grace"))); - new KAction(GraceCommand::getGlobalName(), icon, 0, this, + new KAction(GraceCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGrace()), actionCollection(), "grace"); - new KAction(UnGraceCommand::getGlobalName(), 0, this, + new KAction(UnGraceCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); */ - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-slur"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Slur), icon, Key_ParenRight, this, + (Indication::Slur), icon, Key_ParenRight, TQT_TQOBJECT(this), TQT_SLOT(slotGroupSlur()), actionCollection(), "slur"); new KAction(AddIndicationCommand::getGlobalName - (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, this, + (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-glissando"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Glissando), icon, 0, this, + (Indication::Glissando), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGlissando()), actionCollection(), "glissando"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-crescendo"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Crescendo), icon, Key_Less, this, + (Indication::Crescendo), icon, Key_Less, TQT_TQOBJECT(this), TQT_SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-decrescendo"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Decrescendo), icon, Key_Greater, this, + (Indication::Decrescendo), icon, Key_Greater, TQT_TQOBJECT(this), TQT_SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); new KAction(AddIndicationCommand::getGlobalName - (Indication::QuindicesimaUp), 0, 0, this, + (Indication::QuindicesimaUp), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-ottava"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::OttavaUp), icon, 0, this, + (Indication::OttavaUp), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); new KAction(AddIndicationCommand::getGlobalName - (Indication::OttavaDown), 0, 0, this, + (Indication::OttavaDown), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); new KAction(AddIndicationCommand::getGlobalName - (Indication::QuindicesimaDown), 0, 0, this, + (Indication::QuindicesimaDown), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-chord"))); - new KAction(MakeChordCommand::getGlobalName(), icon, 0, this, + new KAction(MakeChordCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); // setup Transforms menu - new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, this, + new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsNormalizeRests()), actionCollection(), "normalize_rests"); - new KAction(CollapseRestsCommand::getGlobalName(), 0, this, + new KAction(CollapseRestsCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseRests()), actionCollection(), "collapse_rests_aggressively"); - new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, + new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transforms-tie"))); - new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, this, + new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTieNotes()), actionCollection(), "tie_notes"); - new KAction(UntieNotesCommand::getGlobalName(), 0, this, + new KAction(UntieNotesCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsUntieNotes()), actionCollection(), "untie_notes"); - new KAction(MakeNotesViableCommand::getGlobalName(), 0, this, + new KAction(MakeNotesViableCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsMakeNotesViable()), actionCollection(), "make_notes_viable"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transforms-decounterpoint"))); - new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, this, + new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsDeCounterpoint()), actionCollection(), "de_counterpoint"); new KAction(ChangeStemsCommand::getGlobalName(true), - 0, Key_PageUp + CTRL, this, + 0, Key_PageUp + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsStemsUp()), actionCollection(), "stems_up"); new KAction(ChangeStemsCommand::getGlobalName(false), - 0, Key_PageDown + CTRL, this, + 0, Key_PageDown + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsStemsDown()), actionCollection(), "stems_down"); - new KAction(RestoreStemsCommand::getGlobalName(), 0, this, + new KAction(RestoreStemsCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreStems()), actionCollection(), "restore_stems"); new KAction(ChangeSlurPositionCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsSlursAbove()), actionCollection(), "slurs_above"); new KAction(ChangeSlurPositionCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsSlursBelow()), actionCollection(), "slurs_below"); - new KAction(RestoreSlursCommand::getGlobalName(), 0, this, + new KAction(RestoreSlursCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreSlurs()), actionCollection(), "restore_slurs"); new KAction(ChangeTiePositionCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTiesAbove()), actionCollection(), "ties_above"); new KAction(ChangeTiePositionCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTiesBelow()), actionCollection(), "ties_below"); - new KAction(RestoreTiesCommand::getGlobalName(), 0, this, + new KAction(RestoreTiesCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreTies()), actionCollection(), "restore_ties"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-doubleflat"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleFlat), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDoubleFlat()), actionCollection(), "respell_doubleflat"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-flat"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Flat), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-natural"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Natural), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-sharp"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Sharp), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-doublesharp"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleSharp), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDoubleSharp()), actionCollection(), "respell_doublesharp"); new KAction(RespellCommand::getGlobalName (RespellCommand::Up, Accidentals::NoAccidental), - Key_Up + CTRL + SHIFT, this, + Key_Up + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotRespellUp()), actionCollection(), "respell_up"); new KAction(RespellCommand::getGlobalName (RespellCommand::Down, Accidentals::NoAccidental), - Key_Down + CTRL + SHIFT, this, + Key_Down + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDown()), actionCollection(), "respell_down"); new KAction(RespellCommand::getGlobalName (RespellCommand::Restore, Accidentals::NoAccidental), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellRestore()), actionCollection(), "respell_restore"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowCautionary()), actionCollection(), "show_cautionary"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotCancelCautionary()), actionCollection(), "cancel_cautionary"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("quantize"))); - new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, + new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(FixNotationQuantizeCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), "fix_quantization"); new KAction(RemoveNotationQuantizeCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), "remove_quantization"); new KAction(InterpretCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsInterpret()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsInterpret()), actionCollection(), "interpret"); - new KAction(i18n("&Dump selected events to stderr"), 0, this, + new KAction(i18n("&Dump selected events to stderr"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump"); for (MarkActionDataMap::Iterator i = m_markActionDataMap->begin(); @@ -2185,75 +2185,75 @@ void NotationView::setupActions() const MarkActionData &markActionData = **i; - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeMarkMenuPixmap(markActionData.mark))); new KAction(markActionData.title, icon, markActionData.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotAddMark()), actionCollection(), markActionData.actionName); } - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("text-mark"))); - new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, this, + new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddTextMark()), actionCollection(), "add_text_mark"); - new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_0"); - new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_1"); - new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_2"); - new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_3"); - new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_4"); - new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_5"); - new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_plus"); - new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, this, + new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMark()), actionCollection(), "add_fingering_mark"); - new KAction(RemoveMarksCommand::getGlobalName(), 0, this, + new KAction(RemoveMarksCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksRemoveMarks()), actionCollection(), "remove_marks"); - new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, this, + new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), "remove_fingering_marks"); - new KAction(i18n("Ma&ke Ornament..."), 0, this, + new KAction(i18n("Ma&ke Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeOrnament()), actionCollection(), "make_ornament"); - new KAction(i18n("Trigger &Ornament..."), 0, this, + new KAction(i18n("Trigger &Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUseOrnament()), actionCollection(), "use_ornament"); - new KAction(i18n("Remove Ornament..."), 0, this, + new KAction(i18n("Remove Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveOrnament()), actionCollection(), "remove_ornament"); @@ -2261,32 +2261,32 @@ void NotationView::setupActions() i18n("&None"), "&1", "&2", "&3", "&4", "&5" }; for (int i = 0; i <= 5; ++i) { - new KAction(slashTitles[i], 0, this, + new KAction(slashTitles[i], 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddSlashes()), actionCollection(), - TQString("slashes_%1").arg(i)); + TQString("slashes_%1").tqarg(i)); } - new KAction(ClefInsertionCommand::getGlobalName(), 0, this, + new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddClef()), actionCollection(), "add_clef"); - new KAction(KeyInsertionCommand::getGlobalName(), 0, this, + new KAction(KeyInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddKeySignature()), actionCollection(), "add_key_signature"); - new KAction(SustainInsertionCommand::getGlobalName(true), 0, this, + new KAction(SustainInsertionCommand::getGlobalName(true), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddSustainDown()), actionCollection(), "add_sustain_down"); - new KAction(SustainInsertionCommand::getGlobalName(false), 0, this, + new KAction(SustainInsertionCommand::getGlobalName(false), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddSustainUp()), actionCollection(), "add_sustain_up"); - new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, this, + new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTranspose()), actionCollection(), "transpose_segment"); - new KAction(i18n("Convert Notation For..."), 0, this, + new KAction(i18n("Convert Notation For..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSwitchPreset()), actionCollection(), "switch_preset"); @@ -2304,7 +2304,7 @@ void NotationView::setupActions() "palette-marks" }, { i18n("Show &Group Toolbar"), "1slotToggleGroupToolBar()", "show_group_toolbar", "palette-group" }, - { i18n("Show &Layout Toolbar"), "1slotToggleLayoutToolBar()", "show_layout_toolbar", + { i18n("Show &Layout Toolbar"), "1slotToggleLayoutToolBar()", "show_tqlayout_toolbar", "palette-font" }, { i18n("Show Trans&port Toolbar"), "1slotToggleTransportToolBar()", "show_transport_toolbar", "palette-transport" }, @@ -2315,200 +2315,200 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); new KToggleAction(actionsToolbars[i][0], icon, 0, - this, actionsToolbars[i][1], + TQT_TQOBJECT(this), actionsToolbars[i][1], actionCollection(), actionsToolbars[i][2]); } - new KAction(i18n("Cursor &Back"), 0, Key_Left, this, + new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); - new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, + new KAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); - new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, + new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); - new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, + new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); - new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, + new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); - new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, + new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); - new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, + new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); - new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, + new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); /*!!! not here yet - new KAction(i18n("Move Selection Left"), Key_Minus, this, + new KAction(i18n("Move Selection Left"), Key_Minus, TQT_TQOBJECT(this), 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, + Key_A + CTRL, */ TQT_TQOBJECT(this), TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); - new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, + new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, this, + new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentStaffUp()), actionCollection(), "cursor_up_staff"); - new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, this, + new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentStaffDown()), actionCollection(), "cursor_down_staff"); - new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, this, + new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentSegmentPrior()), actionCollection(), "cursor_prior_segment"); - new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, this, + new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentSegmentNext()), actionCollection(), "cursor_next_segment"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); - new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, + new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); - new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, + new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); - new KToggleAction(i18n("&Solo"), icon, 0, this, + new KToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, + (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); - new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, + new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); - new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, + new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); // TQString pixmapDir = // KGlobal::dirs()->findResource("appdata", "pixmaps/"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); - new KAction(i18n("Push &Left"), 0, this, + new KAction(i18n("Push &Left"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionLeft()), actionCollection(), "fine_position_left"); - new KAction(i18n("Push &Right"), 0, this, + new KAction(i18n("Push &Right"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionRight()), actionCollection(), "fine_position_right"); - new KAction(i18n("Push &Up"), 0, this, + new KAction(i18n("Push &Up"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionUp()), actionCollection(), "fine_position_up"); - new KAction(i18n("Push &Down"), 0, this, + new KAction(i18n("Push &Down"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionDown()), actionCollection(), "fine_position_down"); - new KAction(i18n("&Restore Positions"), 0, this, + new KAction(i18n("&Restore Positions"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionRestore()), actionCollection(), "fine_position_restore"); - new KAction(i18n("Make &Invisible"), 0, this, + new KAction(i18n("Make &Invisible"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); - new KAction(i18n("Make &Visible"), 0, this, + new KAction(i18n("Make &Visible"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); - new KAction(i18n("Toggle Dot"), Key_Period, this, + new KAction(i18n("Toggle Dot"), Key_Period, TQT_TQOBJECT(this), TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - new KAction(i18n("Add Dot"), Key_Period + CTRL, this, + new KAction(i18n("Add Dot"), Key_Period + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotAddDot()), actionCollection(), "add_dot"); - new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, this, + new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotAddDotNotationOnly()), actionCollection(), "add_notation_dot"); @@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { KAction *action = actionCollection()->action - (TQString("note_font_size_%1").arg(sizes[i])); + (TQString("note_font_size_%1").tqarg(sizes[i])); m_fontSizeActionMenu->remove (action); @@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { - TQString actionName = TQString("note_font_size_%1").arg(sizes[i]); + TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]); KToggleAction *sizeAction = dynamic_cast<KToggleAction *> (actionCollection()->action(actionName)); @@ -2568,7 +2568,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) if (!sizeAction) { sizeAction = new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontSizeFromAction()), actionCollection(), actionName); } @@ -2607,21 +2607,21 @@ bool NotationView::isCurrentStaff(int i) void NotationView::initLayoutToolbar() { - KToolBar *layoutToolbar = toolBar("Layout Toolbar"); + KToolBar *tqlayoutToolbar = toolBar("Layout Toolbar"); - if (!layoutToolbar) { + if (!tqlayoutToolbar) { std::cerr - << "NotationView::initLayoutToolbar() : layout toolbar not found" + << "NotationView::initLayoutToolbar() : tqlayout toolbar not found" << std::endl; return ; } - new TQLabel(i18n(" Font: "), layoutToolbar, "font label"); + new TQLabel(i18n(" Font: "), tqlayoutToolbar, "font label"); // // font combo // - m_fontCombo = new KComboBox(layoutToolbar); + m_fontCombo = new KComboBox(tqlayoutToolbar); m_fontCombo->setEditable(false); std::set @@ -2633,10 +2633,10 @@ void NotationView::initLayoutToolbar() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - TQString fontQName(strtoqstr(*i)); + TQString fontTQName(strtoqstr(*i)); - m_fontCombo->insertItem(fontQName); - if (fontQName.lower() == strtoqstr(m_fontName).lower()) { + m_fontCombo->insertItem(fontTQName); + if (fontTQName.lower() == strtoqstr(m_fontName).lower()) { m_fontCombo->setCurrentItem(m_fontCombo->count() - 1); foundFont = true; } @@ -2652,7 +2652,7 @@ void NotationView::initLayoutToolbar() connect(m_fontCombo, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotChangeFont(const TQString &))); - new TQLabel(i18n(" Size: "), layoutToolbar, "size label"); + new TQLabel(i18n(" Size: "), tqlayoutToolbar, "size label"); TQString value; @@ -2660,7 +2660,7 @@ void NotationView::initLayoutToolbar() // font size combo // std::vector<int> sizes = NoteFontFactory::getScreenSizes(m_fontName); - m_fontSizeCombo = new KComboBox(layoutToolbar, "font size combo"); + m_fontSizeCombo = new KComboBox(tqlayoutToolbar, "font size combo"); for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { @@ -2674,15 +2674,15 @@ void NotationView::initLayoutToolbar() connect(m_fontSizeCombo, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotChangeFontSizeFromStringValue(const TQString&))); - new TQLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); + new TQLabel(i18n(" Spacing: "), tqlayoutToolbar, "spacing label"); // // spacing combo // - int defaultSpacing = m_hlayout->getSpacing(); + int defaultSpacing = m_htqlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); - m_spacingCombo = new KComboBox(layoutToolbar, "spacing combo"); + m_spacingCombo = new KComboBox(tqlayoutToolbar, "spacing combo"); for (std::vector<int>::iterator i = spacings.begin(); i != spacings.end(); ++i) { value.setNum(*i); @@ -2786,17 +2786,17 @@ NotationView::setPageMode(LinedStaff::PageMode pageMode) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_hlayout->setPageMode(pageMode != LinedStaff::LinearMode); - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageMode(pageMode != LinedStaff::LinearMode); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); - NOTATION_DEBUG << "NotationView::setPageMode: set layout's page width to " + NOTATION_DEBUG << "NotationView::setPageMode: set tqlayout's page width to " << (pageWidth - leftMargin * 2) << endl; positionStaffs(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply layout"); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, "Couldn't apply tqlayout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -2894,7 +2894,7 @@ void NotationView::scrollToTime(timeT t) { - double notationViewLayoutCoord = m_hlayout->getXForTime(t); + double notationViewLayoutCoord = m_htqlayout->getXForTime(t); // Doesn't appear to matter which staff we use //!!! actually it probably does matter, if they don't have the same extents @@ -2912,7 +2912,7 @@ NotationView::scrollToTime(timeT t) RulerScale* NotationView::getHLayout() { - return m_hlayout; + return m_htqlayout; } void @@ -2948,8 +2948,8 @@ NotationView::paintEvent(TQPaintEvent *e) getPageMargins(leftMargin, topMargin); if (m_pageMode == LinedStaff::ContinuousPageMode) { - // relayout if the window width changes significantly in continuous page mode - int diff = int(getPageWidth() - leftMargin * 2 - m_hlayout->getPageWidth()); + // retqlayout if the window width changes significantly in continuous page mode + int diff = int(getPageWidth() - leftMargin * 2 - m_htqlayout->getPageWidth()); if (diff < -10 || diff > 10) { setPageMode(m_pageMode); refreshSegment(0, 0, 0); @@ -2990,15 +2990,15 @@ NotationView::paintEvent(TQPaintEvent *e) } } - slotSetOperationNameAndStatus(i18n(" Ready.")); + slotSetOperationNameAndtqStatus(i18n(" Ready.")); } bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) { - slotSetOperationNameAndStatus(i18n("Laying out score...")); + slotSetOperationNameAndtqStatus(i18n("Laying out score...")); ProgressDialog::processEvents(); - m_hlayout->setStaffCount(m_staffs.size()); + m_htqlayout->setStaffCount(m_staffs.size()); Profiler profiler("NotationView::applyLayout"); unsigned int i; @@ -3008,20 +3008,20 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) if (staffNo >= 0 && (int)i != staffNo) continue; - slotSetOperationNameAndStatus(i18n("Laying out staff %1...").arg(i + 1)); + slotSetOperationNameAndtqStatus(i18n("Laying out staff %1...").tqarg(i + 1)); ProgressDialog::processEvents(); - m_hlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_vlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_hlayout->scanStaff(*m_staffs[i], startTime, endTime); - m_vlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_htqlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime); } - slotSetOperationNameAndStatus(i18n("Reconciling staffs...")); + slotSetOperationNameAndtqStatus(i18n("Reconciling staffs...")); ProgressDialog::processEvents(); - m_hlayout->finishLayout(startTime, endTime); - m_vlayout->finishLayout(startTime, endTime); + m_htqlayout->finishLayout(startTime, endTime); + m_vtqlayout->finishLayout(startTime, endTime); // find the last finishing staff for future use @@ -3083,7 +3083,7 @@ void NotationView::setCurrentSelectedNote(const char *pixmapName, setTool(inserter); m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap + (NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap(pixmapName, true))); emit changeCurrentNote(rest, n); @@ -3147,7 +3147,7 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, i != s->getSegmentEvents().end(); ++i) { if (oldSelection && oldSelection->getSegment() == s->getSegment() - && oldSelection->contains(*i)) + && oldSelection->tqcontains(*i)) continue; foundNewEvent = true; @@ -3194,8 +3194,8 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, getLinedStaff(segment)->positionElements(std::min(startA, startB), std::max(endA, endB)); } else { - // mark refresh status and then request a repaint - segment.getRefreshStatus + // mark refresh status and then request a tqrepaint + segment.getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(segment)->getId()]). push(std::min(startA, startB), std::max(endA, endB)); @@ -3211,14 +3211,14 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, getLinedStaff(s->getSegment())->positionElements(startB, endB); } else { - // mark refresh status and then request a repaint + // mark refresh status and then request a tqrepaint - oldSelection->getSegment().getRefreshStatus + oldSelection->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(oldSelection->getSegment())->getId()]). push(startA, endA); - s->getSegment().getRefreshStatus + s->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(s->getSegment())->getId()]). push(startB, endB); @@ -3329,12 +3329,12 @@ void NotationView::playNote(Segment &s, int pitch, int velocity) StudioControl::sendMappedEvent(mE); } -void NotationView::showPreviewNote(int staffNo, double layoutX, +void NotationView::showPreviewNote(int staffNo, double tqlayoutX, int pitch, int height, const Note ¬e, bool grace, int velocity) { - m_staffs[staffNo]->showPreviewNote(layoutX, height, note, grace); + m_staffs[staffNo]->showPreviewNote(tqlayoutX, height, note, grace); playNote(m_staffs[staffNo]->getSegment(), pitch, velocity); } @@ -3349,10 +3349,10 @@ void NotationView::setNotePixmapFactory(NotePixmapFactory* f) { delete m_notePixmapFactory; m_notePixmapFactory = f; - if (m_hlayout) - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - if (m_vlayout) - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_htqlayout) + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_vtqlayout) + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); } Segment * @@ -3446,10 +3446,10 @@ NotationView::getInsertionTime(Clef &clef, // the segment but the staff has a more efficient lookup LinedStaff *staff = m_staffs[m_currentStaff]; - double layoutX = staff->getLayoutXOfInsertCursor(); - if (layoutX < 0) layoutX = 0; + double tqlayoutX = staff->getLayoutXOfInsertCursor(); + if (tqlayoutX < 0) tqlayoutX = 0; Event *clefEvt = 0, *keyEvt = 0; - (void)staff->getElementUnderLayoutX(layoutX, clefEvt, keyEvt); + (void)staff->getElementUnderLayoutX(tqlayoutX, clefEvt, keyEvt); if (clefEvt) clef = Clef(*clefEvt); else clef = Clef(); @@ -3469,7 +3469,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_hlayout->getTimeForX(coords.first); + timeT t = m_htqlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[m_currentStaff]->getSegment().getStartTime()+1); @@ -3488,7 +3488,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_hlayout->getTimeForX(coords.first); + timeT t = m_htqlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[i]->getSegment().getStartTime()+1); @@ -3541,7 +3541,7 @@ void NotationView::print(bool previewOnly) if (previewOnly) printer.setPreviewOnly(true); - else if (!printer.setup((TQWidget *)parent())) + else if (!printer.setup((TQWidget *)tqparent())) return ; TQPaintDeviceMetrics pdm(&printer); @@ -3589,8 +3589,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); m_staffs[i]->setPrintPainter(&printpainter); m_staffs[i]->checkRendered(t0, t1); @@ -3599,7 +3599,7 @@ void NotationView::print(bool previewOnly) // Supplying doublebuffer==true to this method appears to // slow down printing considerably but without it we get // all sorts of horrible artifacts (possibly related to - // mishandling of pixmap masks?) in qt-3.0. Let's permit + // mishandling of pixmap tqmasks?) in qt-3.0. Let's permit // it as a "hidden" option. m_config->setGroup(NotationViewConfigGroup); @@ -3612,13 +3612,7 @@ void NotationView::print(bool previewOnly) if (m_config->readBoolEntry("forcedoublebufferprinting", false)) { getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); } else { -#if QT_VERSION >= 0x030100 getCanvasView()->canvas()->drawArea(pageRect, &printpainter, false); -#else - - getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); -#endif - } } @@ -3635,8 +3629,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); m_staffs[i]->renderPrintable(t0, t1); } @@ -3687,14 +3681,14 @@ NotationView::updateThumbnails(bool complete) int thumbScale = 20; TQPixmap thumbnail(canvas()->width() / thumbScale, canvas()->height() / thumbScale); - thumbnail.fill(Qt::white); + thumbnail.fill(TQt::white); TQPainter thumbPainter(&thumbnail); if (complete) { thumbPainter.scale(1.0 / double(thumbScale), 1.0 / double(thumbScale)); - thumbPainter.setPen(Qt::black); - thumbPainter.setBrush(Qt::white); + thumbPainter.setPen(TQt::black); + thumbPainter.setBrush(TQt::white); /* TQCanvas *canvas = getCanvasView()->canvas(); @@ -3742,7 +3736,7 @@ NotationView::updateThumbnails(bool complete) } else { - thumbPainter.setPen(Qt::black); + thumbPainter.setPen(TQt::black); for (int page = 0; page < maxPageCount; ++page) { @@ -3751,7 +3745,7 @@ NotationView::updateThumbnails(bool complete) int w = pageWidth - leftMargin / 2; int h = pageHeight; - TQString str = TQString("%1").arg(page + 1); + TQString str = TQString("%1").tqarg(page + 1); thumbPainter.drawRect(x / thumbScale, y / thumbScale, w / thumbScale, h / thumbScale); @@ -3815,7 +3809,7 @@ void NotationView::refreshSegment(Segment *segment, } setMenuStates(); - slotSetOperationNameAndStatus(i18n(" Ready.")); + slotSetOperationNameAndtqStatus(i18n(" Ready.")); NOTATION_DEBUG << "*** " << endl; } @@ -3835,12 +3829,12 @@ void NotationView::setMenuStates() NOTATION_DEBUG << "NotationView::setMenuStates: Have selection; it's " << m_currentEventSelection << " covering range from " << m_currentEventSelection->getStartTime() << " to " << m_currentEventSelection->getEndTime() << " (" << m_currentEventSelection->getSegmentEvents().size() << " events)" << endl; stateChanged("have_selection", KXMLGUIClient::StateNoReverse); - if (m_currentEventSelection->contains + if (m_currentEventSelection->tqcontains (Note::EventType)) { stateChanged("have_notes_in_selection", KXMLGUIClient::StateNoReverse); } - if (m_currentEventSelection->contains + if (m_currentEventSelection->tqcontains (Note::EventRestType)) { stateChanged("have_rests_in_selection", KXMLGUIClient::StateNoReverse); @@ -3882,7 +3876,7 @@ void NotationView::readjustCanvasSize() double maxWidth = 0.0; int maxHeight = 0; - slotSetOperationNameAndStatus(i18n("Sizing and allocating canvas...")); + slotSetOperationNameAndtqStatus(i18n("Sizing and allocating canvas...")); ProgressDialog::processEvents(); int progressTotal = m_staffs.size() + 2; @@ -3892,7 +3886,7 @@ void NotationView::readjustCanvasSize() LinedStaff &staff = *m_staffs[i]; - staff.sizeStaff(*m_hlayout); + staff.sizeStaff(*m_htqlayout); UPDATE_PROGRESS(1); if (staff.getTotalWidth() + staff.getX() > maxWidth) { @@ -3950,7 +3944,7 @@ void NotationView::readjustCanvasSize() } } - // Give a correct vertical alignment to track headers + // Give a correct vertical tqalignment to track headers if ((m_pageMode == LinedStaff::LinearMode) && m_showHeadersGroup) { m_headersGroupView->setContentsPos(0, getCanvasView()->contentsY()); } @@ -3958,10 +3952,10 @@ void NotationView::readjustCanvasSize() void NotationView::slotNoteAction() { - const TQObject* sigSender = sender(); + const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); NoteActionDataMap::Iterator noteAct = - m_noteActionDataMap->find(sigSender->name()); + m_noteActionDataMap->tqfind(sigSender->name()); if (noteAct != m_noteActionDataMap->end()) { m_lastNoteAction = sigSender->name(); @@ -3989,11 +3983,11 @@ void NotationView::slotLastNoteAction() void NotationView::slotAddMark() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); if (!m_currentEventSelection) return ; - MarkActionDataMap::Iterator i = m_markActionDataMap->find(s->name()); + MarkActionDataMap::Iterator i = m_markActionDataMap->tqfind(s->name()); if (i != m_markActionDataMap->end()) { addCommandToHistory(new AddMarkCommand @@ -4003,10 +3997,10 @@ void NotationView::slotAddMark() void NotationView::slotNoteChangeAction() { - const TQObject* sigSender = sender(); + const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); NoteChangeActionDataMap::Iterator noteAct = - m_noteChangeActionDataMap->find(sigSender->name()); + m_noteChangeActionDataMap->tqfind(sigSender->name()); if (noteAct != m_noteChangeActionDataMap->end()) { slotSetNoteDurations((**noteAct).noteType, (**noteAct).notationOnly); @@ -4038,7 +4032,7 @@ void NotationView::initActionDataMaps() (NotationStrings::getReferenceName(Note(type, dots), rest == 1)); TQString shortName(refName); - shortName.replace(TQRegExp("-"), "_"); + shortName.tqreplace(TQRegExp("-"), "_"); TQString titleName (NotationStrings::getNoteName(Note(type, dots))); @@ -4047,7 +4041,7 @@ void NotationView::initActionDataMaps() titleName.right(titleName.length() - 1); if (rest) { - titleName.replace(TQRegExp(i18n("note")), i18n("rest")); + titleName.tqreplace(TQRegExp(i18n("note")), i18n("rest")); } int keycode = keys[type - Note::Shortest]; @@ -4073,8 +4067,8 @@ void NotationView::initActionDataMaps() (NotationStrings::getReferenceName(Note(type, 0), false)); TQString shortName(TQString("change_%1%2") - .arg(notationOnly ? "notation_" : "").arg(refName)); - shortName.replace(TQRegExp("-"), "_"); + .tqarg(notationOnly ? "notation_" : "").tqarg(refName)); + shortName.tqreplace(TQRegExp("-"), "_"); TQString titleName (NotationStrings::getNoteName(Note(type, 0))); @@ -4101,7 +4095,7 @@ void NotationView::initActionDataMaps() Mark mark = marks[i]; TQString markName(strtoqstr(mark)); - TQString actionName = TQString("add_%1").arg(markName); + TQString actionName = TQString("add_%1").tqarg(markName); m_markActionDataMap->insert (actionName, new MarkActionData @@ -4116,10 +4110,10 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_hlayout, TQT_SIGNAL(setProgress(int)), + connect(m_htqlayout, TQT_SIGNAL(setProgress(int)), bar, TQT_SLOT(setValue(int))); - connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), + connect(m_htqlayout, TQT_SIGNAL(incrementProgress(int)), bar, TQT_SLOT(advance(int))); connect(this, TQT_SIGNAL(setProgress(int)), @@ -4148,11 +4142,11 @@ void NotationView::setupProgress(ProgressDialog* dialog) setupProgress(dialog->progressBar()); connect(dialog, TQT_SIGNAL(cancelClicked()), - m_hlayout, TQT_SLOT(slotCancel())); + m_htqlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), - this, TQT_SLOT(slotSetOperationNameAndStatus(TQString))); + this, TQT_SLOT(slotSetOperationNameAndtqStatus(TQString))); connect(dialog, TQT_SIGNAL(cancelClicked()), m_staffs[i], TQT_SLOT(slotCancel())); @@ -4165,10 +4159,10 @@ void NotationView::setupProgress(ProgressDialog* dialog) } -void NotationView::slotSetOperationNameAndStatus(TQString name) +void NotationView::slotSetOperationNameAndtqStatus(TQString name) { emit setOperationName(name); - statusBar()->changeItem(TQString(" %1").arg(name), + statusBar()->changeItem(TQString(" %1").tqarg(name), KTmpStatusMsg::getDefaultId()); } @@ -4176,7 +4170,7 @@ void NotationView::disconnectProgress() { NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; - m_hlayout->disconnect(); + m_htqlayout->disconnect(); disconnect(TQT_SIGNAL(setProgress(int))); disconnect(TQT_SIGNAL(incrementProgress(int))); disconnect(TQT_SIGNAL(setOperationName(TQString))); @@ -4209,18 +4203,18 @@ void NotationView::updateViewCaption() trackPosition = track->getPosition(); // std::cout << std::endl << std::endl << std::endl << "DEBUG TITLE BAR: " << getDocument()->getTitle() << std::endl << std::endl << std::endl; setCaption(i18n("%1 - Segment Track #%2 - Notation") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1)); } else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) { setCaption(i18n("%1 - All Segments - Notation") - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } else { setCaption(i18n("%1 - Segment - Notation", "%1 - %n Segments - Notation", m_segments.size()) - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } } @@ -4236,7 +4230,7 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0; void -NotationView::slotUpdateInsertModeStatus() +NotationView::slotUpdateInsertModetqStatus() { TQString tripletMessage = i18n("Triplet"); TQString chordMessage = i18n("Chord"); @@ -4244,22 +4238,22 @@ NotationView::slotUpdateInsertModeStatus() TQString message; if (isInTripletMode()) { - message = i18n("%1 %2").arg(message).arg(tripletMessage); + message = i18n("%1 %2").tqarg(message).tqarg(tripletMessage); } if (isInChordMode()) { - message = i18n("%1 %2").arg(message).arg(chordMessage); + message = i18n("%1 %2").tqarg(message).tqarg(chordMessage); } if (isInGraceMode()) { - message = i18n("%1 %2").arg(message).arg(graceMessage); + message = i18n("%1 %2").tqarg(message).tqarg(graceMessage); } m_insertModeLabel->setText(message); } void -NotationView::slotUpdateAnnotationsStatus() +NotationView::slotUpdateAnnotationstqStatus() { if (!areAnnotationsVisible()) { for (int i = 0; i < getStaffCount(); ++i) { @@ -4279,7 +4273,7 @@ NotationView::slotUpdateAnnotationsStatus() } void -NotationView::slotUpdateLilyPondDirectivesStatus() +NotationView::slotUpdateLilyPondDirectivestqStatus() { if (!areLilyPondDirectivesVisible()) { for (int i = 0; i < getStaffCount(); ++i) { @@ -4312,7 +4306,7 @@ NotationView::slotChangeSpacingFromStringValue(const TQString& spacingT) void NotationView::slotChangeSpacingFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(8) == "spacing_") { @@ -4323,22 +4317,22 @@ NotationView::slotChangeSpacingFromAction() } else { KMessageBox::sorry - (this, i18n("Unknown spacing action %1").arg(name)); + (this, i18n("Unknown spacing action %1").tqarg(name)); } } void NotationView::slotChangeSpacing(int spacing) { - if (m_hlayout->getSpacing() == spacing) + if (m_htqlayout->getSpacing() == spacing) return ; - m_hlayout->setSpacing(spacing); + m_htqlayout->setSpacing(spacing); // m_spacingSlider->setSize(spacing); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(TQString("spacing_%1").arg(spacing))); + (actionCollection()->action(TQString("spacing_%1").tqarg(spacing))); if (action) action->setChecked(true); else { @@ -4363,7 +4357,7 @@ NotationView::slotChangeSpacing(int spacing) void NotationView::slotChangeProportionFromIndex(int n) { - std::vector<int> proportions = m_hlayout->getAvailableProportions(); + std::vector<int> proportions = m_htqlayout->getAvailableProportions(); if (n >= (int)proportions.size()) n = proportions.size() - 1; slotChangeProportion(proportions[n]); @@ -4372,7 +4366,7 @@ NotationView::slotChangeProportionFromIndex(int n) void NotationView::slotChangeProportionFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(11) == "proportion_") { @@ -4381,22 +4375,22 @@ NotationView::slotChangeProportionFromAction() } else { KMessageBox::sorry - (this, i18n("Unknown proportion action %1").arg(name)); + (this, i18n("Unknown proportion action %1").tqarg(name)); } } void NotationView::slotChangeProportion(int proportion) { - if (m_hlayout->getProportion() == proportion) + if (m_htqlayout->getProportion() == proportion) return ; - m_hlayout->setProportion(proportion); + m_htqlayout->setProportion(proportion); // m_proportionSlider->setSize(proportion); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(TQString("proportion_%1").arg(proportion))); + (actionCollection()->action(TQString("proportion_%1").tqarg(proportion))); if (action) action->setChecked(true); else { @@ -4421,21 +4415,21 @@ NotationView::slotChangeProportion(int proportion) void NotationView::slotChangeFontFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(10) == "note_font_") { name = name.right(name.length() - 10); slotChangeFont(name); } else { KMessageBox::sorry - (this, i18n("Unknown font action %1").arg(name)); + (this, i18n("Unknown font action %1").tqarg(name)); } } void NotationView::slotChangeFontSizeFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(15) == "note_font_size_") { @@ -4446,11 +4440,11 @@ NotationView::slotChangeFontSizeFromAction() slotChangeFont(m_fontName, size); else { KMessageBox::sorry - (this, i18n("Unknown font size %1").arg(name)); + (this, i18n("Unknown font size %1").tqarg(name)); } } else { KMessageBox::sorry - (this, i18n("Unknown font size action %1").arg(name)); + (this, i18n("Unknown font size action %1").tqarg(name)); } } @@ -4587,7 +4581,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); } for (unsigned int i = 0; i < m_staffs.size(); ++i) { @@ -4598,9 +4592,9 @@ NotationView::slotChangeFont(std::string newName, int newSize) positionStaffs(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply layout"); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, "Couldn't apply tqlayout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -4619,7 +4613,7 @@ NotationView::slotFilePrint() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (TQWidget *)parent(), this); + (TQWidget *)tqparent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print : operation cancelled\n"; @@ -4636,7 +4630,7 @@ NotationView::slotFilePrintPreview() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (TQWidget *)parent(), this); + (TQWidget *)tqparent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print preview : operation cancelled\n"; @@ -4651,7 +4645,7 @@ std::map<KProcess *, KTempFile *> NotationView::m_lilyTempFileMap; void NotationView::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4675,7 +4669,7 @@ void NotationView::slotPrintLilyPond() void NotationView::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -5363,7 +5357,7 @@ void NotationView::slotAddIndication(std::string type, TQString desc) setSingleSelectedEvent(m_currentEventSelection->getSegment(), command->getLastInsertedEvent()); } else { - KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").arg(desc)); // TODO PLURAL - how many 'indications' ? + KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").tqarg(desc)); // TODO PLURAL - how many 'indications' ? delete command; } } @@ -5565,7 +5559,7 @@ void NotationView::slotTransformsRemoveQuantization() void NotationView::slotSetStyleFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (!m_currentEventSelection) @@ -5574,7 +5568,7 @@ void NotationView::slotSetStyleFromAction() if (name.left(6) == "style_") { name = name.right(name.length() - 6); - KTmpStatusMsg msg(i18n("Changing to %1 style...").arg(name), + KTmpStatusMsg msg(i18n("Changing to %1 style...").tqarg(name), this); addCommandToHistory(new ChangeStyleCommand @@ -5582,13 +5576,13 @@ void NotationView::slotSetStyleFromAction() *m_currentEventSelection)); } else { KMessageBox::sorry - (this, i18n("Unknown style action %1").arg(name)); + (this, i18n("Unknown style action %1").tqarg(name)); } } void NotationView::slotInsertNoteFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); Segment &segment = m_staffs[m_currentStaff]->getSegment(); @@ -5614,7 +5608,7 @@ void NotationView::slotInsertNoteFromAction() } catch (...) { KMessageBox::sorry - (this, i18n("Unknown note insert action %1").arg(name)); + (this, i18n("Unknown note insert action %1").tqarg(name)); return ; } @@ -5664,7 +5658,7 @@ void NotationView::slotSwitchFromRestToNote() Note note(restInserter->getCurrentNote()); TQString actionName = NotationStrings::getReferenceName(note, false); - actionName = actionName.replace("-", "_"); + actionName = actionName.tqreplace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> (actionCollection()->action(actionName)); @@ -5699,7 +5693,7 @@ void NotationView::slotSwitchFromNoteToRest() Note note(noteInserter->getCurrentNote()); TQString actionName = NotationStrings::getReferenceName(note, true); - actionName = actionName.replace("-", "_"); + actionName = actionName.tqreplace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> (actionCollection()->action(actionName)); @@ -5915,7 +5909,7 @@ void NotationView::slotAddDotNotationOnly() void NotationView::slotAddSlashes() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); if (!m_currentEventSelection) return ; @@ -5956,7 +5950,7 @@ void NotationView::slotMarksAddFingeringMark() void NotationView::slotMarksAddFingeringMarkFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(14) == "add_fingering_") { @@ -6033,9 +6027,9 @@ NotationView::slotMakeOrnament() TQString name; int barNo = segment.getComposition()->getBarNumber(absTime); if (track) { - name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); + name = TQString(i18n("Ornament track %1 bar %2").tqarg(track->getPosition() + 1).tqarg(barNo + 1)); } else { - name = TQString(i18n("Ornament bar %1").arg(barNo + 1)); + name = TQString(i18n("Ornament bar %1").tqarg(barNo + 1)); } MakeOrnamentDialog dialog(this, name, basePitch); @@ -6061,7 +6055,7 @@ NotationView::slotMakeOrnament() style->getName(), getDocument()->getComposition().getNextTriggerSegmentId(), true, - BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH, + BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH, Marks::NoMark)); //!!! addCommandToHistory(command); @@ -6266,7 +6260,7 @@ void NotationView::slotEditSwitchPreset() // wrong, or just mildly wrong, but I'm betting somebody will tell me // about it if this was inappropriate Track *track = comp.getTrackById(selectedTrack); - track->setPresetLabel(dialog.getName()); + track->setPresetLabel(dialog.getName().ascii()); track->setClef(dialog.getClef()); track->setTranspose(dialog.getTranspose()); track->setLowestPlayable(dialog.getLowRange()); @@ -6444,22 +6438,22 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll) for (unsigned int i = 0; i < m_staffs.size(); ++i) { - double layoutX = m_hlayout->getXForTimeByEvent(time); + double tqlayoutX = m_htqlayout->getXForTimeByEvent(time); Segment &seg = m_staffs[i]->getSegment(); bool good = true; - if (barNo >= m_hlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { + if (barNo >= m_htqlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { if (seg.isRepeating() && time < seg.getRepeatEndTime()) { timeT mappedTime = seg.getStartTime() + ((time - seg.getStartTime()) % (seg.getEndMarkerTime() - seg.getStartTime())); - layoutX = m_hlayout->getXForTimeByEvent(mappedTime); + tqlayoutX = m_htqlayout->getXForTimeByEvent(mappedTime); } else { good = false; } - } else if (barNo < m_hlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { + } else if (barNo < m_htqlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { good = false; } @@ -6469,7 +6463,7 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll) } else { - m_staffs[i]->setPointerPosition(layoutX); + m_staffs[i]->setPointerPosition(tqlayoutX); int cy; m_staffs[i]->getPointerPosition(cx, cy); @@ -6542,7 +6536,7 @@ NotationView::slotSetCurrentStaff(int staffNo) m_chordNameRuler->setCurrentSegment(segment); m_rawNoteRuler->setCurrentSegment(segment); - m_rawNoteRuler->repaint(); + m_rawNoteRuler->tqrepaint(); setControlRulersCurrentSegment(); updateView(); @@ -6756,7 +6750,7 @@ NotationView::doDeferredCursorMove() t == segment.getEndTime() || t == segment.getBarStartForTime(t)) { - staff->setInsertCursorPosition(*m_hlayout, t); + staff->setInsertCursorPosition(*m_htqlayout, t); if (type == CursorMoveAndMakeVisible) { double cx; @@ -6898,7 +6892,7 @@ void NotationView::slotDoubleFlat() void NotationView::slotTrebleClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Treble); @@ -6908,7 +6902,7 @@ void NotationView::slotTrebleClef() void NotationView::slotAltoClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Alto); @@ -6918,7 +6912,7 @@ void NotationView::slotAltoClef() void NotationView::slotTenorClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Tenor); @@ -6928,7 +6922,7 @@ void NotationView::slotTenorClef() void NotationView::slotBassClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Bass); @@ -6938,7 +6932,7 @@ void NotationView::slotBassClef() void NotationView::slotText() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); setTool(m_toolBox->getTool(TextInserter::ToolName)); setMenuStates(); } @@ -6946,7 +6940,7 @@ void NotationView::slotText() void NotationView::slotGuitarChord() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); setTool(m_toolBox->getTool(GuitarChordInserter::ToolName)); setMenuStates(); } @@ -6982,21 +6976,21 @@ void NotationView::slotMultiPageMode() void NotationView::slotToggleChordsRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_chordNameRuler, "show_chords_ruler"); } void NotationView::slotToggleRawNoteRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_rawNoteRuler, "show_raw_note_ruler"); } void NotationView::slotToggleTempoRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_tempoRuler, "show_tempo_ruler"); } @@ -7004,7 +6998,7 @@ void NotationView::slotToggleTempoRuler() void NotationView::slotToggleAnnotations() { m_annotationsVisible = !m_annotationsVisible; - slotUpdateAnnotationsStatus(); + slotUpdateAnnotationstqStatus(); //!!! use refresh mechanism refreshSegment(0, 0, 0); } @@ -7012,7 +7006,7 @@ void NotationView::slotToggleAnnotations() void NotationView::slotToggleLilyPondDirectives() { m_lilyPondDirectivesVisible = !m_lilyPondDirectivesVisible; - slotUpdateLilyPondDirectivesStatus(); + slotUpdateLilyPondDirectivestqStatus(); //!!! use refresh mechanism refreshSegment(0, 0, 0); } @@ -7101,7 +7095,7 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) getTrackById(staff->getSegment().getTrack())->getLabel(); bool ok = false; - TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), TQT_TQOBJECT(this)); // empty is OK TQString newText = KLineEditDlg::getText(TQString("Change staff name"), TQString("Enter new staff name"), @@ -7119,10 +7113,10 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) emit staffLabelChanged(staff->getSegment().getTrack(), newText); } - } else if (dynamic_cast<QCanvasTimeSigSprite *>(it)) { + } else if (dynamic_cast<TQCanvasTimeSigSprite *>(it)) { - double layoutX = (dynamic_cast<QCanvasTimeSigSprite *>(it))->getLayoutX(); - emit editTimeSignature(m_hlayout->getTimeForX(layoutX)); + double tqlayoutX = (dynamic_cast<TQCanvasTimeSigSprite *>(it))->getLayoutX(); + emit editTimeSignature(m_htqlayout->getTimeForX(tqlayoutX)); } } @@ -7200,17 +7194,17 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) // TQString message; // TQString format("%ld (%ld.%03lds)"); - // format = i18n("Time: %1").arg(format); + // format = i18n("Time: %1").tqarg(format); // message.sprintf(format, t, rt.sec, ms); 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(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -7367,7 +7361,7 @@ NotationView::slotToggleStepByStep() return ; } if (action->isChecked()) { // after toggling, that is - emit stepByStepTargetRequested(this); + emit stepByStepTargetRequested(TQT_TQOBJECT(this)); } else { emit stepByStepTargetRequested(0); } @@ -7382,7 +7376,7 @@ NotationView::slotStepByStepTargetRequested(TQObject *obj) NOTATION_DEBUG << "WARNING: No toggle_step_by_step action" << endl; return ; } - action->setChecked(obj == this); + action->setChecked(TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this)); } void @@ -7402,8 +7396,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (cx1, staff->getTotalHeight() + staff->getY()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); if (dynamic_cast<NotationStaff *>(staff)->checkRendered(t0, t1)) { something = true; //!!! diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 356960c..1288b04 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -109,22 +109,23 @@ class NotationView : public EditView, friend class LilyPondExporter; Q_OBJECT + TQ_OBJECT public: explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool showProgressive); // update during initial render? /** - * Constructor for printing only. If parent is provided, a + * Constructor for printing only. If tqparent is provided, a * progress dialog will be shown -- otherwise not. If another * NotationView is provided, the fonts and other settings used * for printing will be taken from that view. */ explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, NotationView *referenceView); ~NotationView(); @@ -261,7 +262,7 @@ public: * the pitch for performance, so the two need not correspond (e.g. * under ottava there may be octave differences). */ - void showPreviewNote(int staffNo, double layoutX, + void showPreviewNote(int staffNo, double tqlayoutX, int pitch, int height, const Note ¬e, bool grace, @@ -273,13 +274,13 @@ public: /// Sound the given note void playNote(Segment &segment, int pitch, int velocity = -1); - /// Switches between page- and linear- layout modes + /// Switches between page- and linear- tqlayout modes void setPageMode(LinedStaff::PageMode mode); - /// Returns the page width according to the layout mode (page/linear) + /// Returns the page width according to the tqlayout mode (page/linear) int getPageWidth(); - /// Returns the page height according to the layout mode (page/linear) + /// Returns the page height according to the tqlayout mode (page/linear) int getPageHeight(); /// Returns the margins within the page (zero if not in MultiPageMode) @@ -309,7 +310,7 @@ public: /** * Render segments on printing painter. This uses the current - * font size and layout, rather than the optimal ones for the + * font size and tqlayout, rather than the optimal ones for the * printer configuration (notation editing is not quite WYSIWYG, * and we may be in a non-page mode). * @@ -445,7 +446,7 @@ public slots: void slotToggleGroupToolBar(); /** - * toggles the layout toolbar + * toggles the tqlayout toolbar */ void slotToggleLayoutToolBar(); @@ -493,9 +494,9 @@ public slots: void slotToggleStepByStep(); /// status stuff - void slotUpdateInsertModeStatus(); - void slotUpdateAnnotationsStatus(); - void slotUpdateLilyPondDirectivesStatus(); + void slotUpdateInsertModetqStatus(); + void slotUpdateAnnotationstqStatus(); + void slotUpdateLilyPondDirectivestqStatus(); /// edit menu void slotPreviewSelection(); @@ -638,7 +639,7 @@ public slots: void slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *i); /** - * Called when a mouse press occurred on a QCanvasText + * Called when a mouse press occurred on a TQCanvasText */ void slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *i); @@ -772,22 +773,22 @@ public slots: /// Changes to the next font size down void slotZoomOut(); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacing(int newSpacing); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacingFromStringValue(const TQString&); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportion(int newProportion); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportionFromIndex(int newProportionIndex); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportionFromAction(); /// Note-on received asynchronously -- consider step-by-step editing @@ -811,7 +812,7 @@ public slots: /// Do some background rendering work. void slotRenderSomething(); - void slotSetOperationNameAndStatus(TQString); + void slotSetOperationNameAndtqStatus(TQString); // Update notation view based on track/staff name change void slotUpdateStaffName(); @@ -875,7 +876,7 @@ protected: protected slots: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ virtual void slotSaveOptions(); @@ -911,13 +912,13 @@ protected: virtual void initStatusBar(); /** - * Place the staffs at the correct x & y coordinates (before layout) + * Place the staffs at the correct x & y coordinates (before tqlayout) */ void positionStaffs(); /** * Place the page pixmaps (if any) at the correct x & y - * coordinates (after layout) + * coordinates (after tqlayout) */ void positionPages(); @@ -928,7 +929,7 @@ protected: void updateThumbnails(bool complete); /** - * setup the layout/font toolbar + * setup the tqlayout/font toolbar */ void initLayoutToolbar(); @@ -939,15 +940,15 @@ protected: */ void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); - /// Calls all the relevant preparse and layout methods + /// Calls all the relevant preparse and tqlayout methods virtual bool applyLayout(int staffNo = -1, timeT startTime = 0, timeT endTime = 0); /** - * Readjust the size of the canvas after a layout + * Readjust the size of the canvas after a tqlayout * - * Checks the total width computed by the horizontal layout + * Checks the total width computed by the horizontal tqlayout * * @see NotationHLayout#getTotalWidth() */ @@ -1073,8 +1074,8 @@ protected: NotePixmapFactory *m_notePixmapFactory; - NotationHLayout* m_hlayout; - NotationVLayout* m_vlayout; + NotationHLayout* m_htqlayout; + NotationVLayout* m_vtqlayout; ChordNameRuler *m_chordNameRuler; TQWidget *m_tempoRuler; diff --git a/src/gui/editors/notation/NoteCharacter.cpp b/src/gui/editors/notation/NoteCharacter.cpp index 2fcff18..e3beed2 100644 --- a/src/gui/editors/notation/NoteCharacter.cpp +++ b/src/gui/editors/notation/NoteCharacter.cpp @@ -84,7 +84,7 @@ NoteCharacter::getHeight() const return m_pixmap->height(); } -QPoint +TQPoint NoteCharacter::getHotspot() const { return m_hotspot; diff --git a/src/gui/editors/notation/NoteCharacter.h b/src/gui/editors/notation/NoteCharacter.h index 3b27e87..b5f3b84 100644 --- a/src/gui/editors/notation/NoteCharacter.h +++ b/src/gui/editors/notation/NoteCharacter.h @@ -37,7 +37,7 @@ class TQCanvasPixmap; namespace Rosegarden { -class NoteCharacterDrawRep : public QPointArray +class NoteCharacterDrawRep : public TQPointArray { public: NoteCharacterDrawRep(int size = 0) : TQPointArray(size) { } diff --git a/src/gui/editors/notation/NoteCharacterNames.cpp b/src/gui/editors/notation/NoteCharacterNames.cpp index bcd450c..fb4f96e 100644 --- a/src/gui/editors/notation/NoteCharacterNames.cpp +++ b/src/gui/editors/notation/NoteCharacterNames.cpp @@ -45,8 +45,8 @@ const CharName SEMIBREVIS_WHITE = "MUSICAL SYMBOL SEMIBREVIS WHITE"; const CharName SEMIBREVIS_BLACK = "MUSICAL SYMBOL SEMIBREVIS BLACK"; const CharName TRIANGLE_NOTEHEAD_UP_WHITE = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE"; const CharName TRIANGLE_NOTEHEAD_UP_BLACK = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK"; -const CharName SQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL SQUARE NOTEHEAD WHITE"; -const CharName SQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL SQUARE NOTEHEAD BLACK"; +const CharName STQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL STQUARE NOTEHEAD WHITE"; +const CharName STQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL STQUARE NOTEHEAD BLACK"; // These two names are not valid Unicode names. They describe flags // that should be used to compose multi-flag notes, rather than used @@ -70,7 +70,7 @@ const CharName WHOLE_REST = "MUSICAL SYMBOL WHOLE REST"; // Unicode-4 glyph 1D13 const CharName WHOLE_REST_ON_STAFF = "MUSICAL SYMBOL WHOLE REST ON STAFF"; const CharName HALF_REST = "MUSICAL SYMBOL HALF REST"; // Unicode-4 glyph 1D13C const CharName HALF_REST_ON_STAFF = "MUSICAL SYMBOL HALF REST ON STAFF"; -const CharName QUARTER_REST = "MUSICAL SYMBOL QUARTER REST"; +const CharName TQUARTER_REST = "MUSICAL SYMBOL TQUARTER REST"; const CharName EIGHTH_REST = "MUSICAL SYMBOL EIGHTH REST"; const CharName SIXTEENTH_REST = "MUSICAL SYMBOL SIXTEENTH REST"; const CharName THIRTY_SECOND_REST = "MUSICAL SYMBOL THIRTY-SECOND REST"; diff --git a/src/gui/editors/notation/NoteCharacterNames.h b/src/gui/editors/notation/NoteCharacterNames.h index 9022ecd..be062df 100644 --- a/src/gui/editors/notation/NoteCharacterNames.h +++ b/src/gui/editors/notation/NoteCharacterNames.h @@ -49,8 +49,8 @@ extern const CharName SEMIBREVIS_WHITE; extern const CharName SEMIBREVIS_BLACK; extern const CharName TRIANGLE_NOTEHEAD_UP_WHITE; extern const CharName TRIANGLE_NOTEHEAD_UP_BLACK; -extern const CharName SQUARE_NOTEHEAD_WHITE; -extern const CharName SQUARE_NOTEHEAD_BLACK; +extern const CharName STQUARE_NOTEHEAD_WHITE; +extern const CharName STQUARE_NOTEHEAD_BLACK; extern const CharName FLAG_PARTIAL; extern const CharName FLAG_PARTIAL_FINAL; @@ -66,7 +66,7 @@ extern const CharName WHOLE_REST; extern const CharName WHOLE_REST_ON_STAFF; extern const CharName HALF_REST; extern const CharName HALF_REST_ON_STAFF; -extern const CharName QUARTER_REST; +extern const CharName TQUARTER_REST; extern const CharName EIGHTH_REST; extern const CharName SIXTEENTH_REST; extern const CharName THIRTY_SECOND_REST; diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp index 3a0ea18..e494169 100644 --- a/src/gui/editors/notation/NoteFont.cpp +++ b/src/gui/editors/notation/NoteFont.cpp @@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) : if (size > 0) { if (sizes.find(size) == sizes.end()) { - throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); + throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").tqarg(strtoqstr(fontName)).tqarg(size))); } else { m_size = size; } @@ -86,8 +86,8 @@ NoteFont::NoteFont(std::string fontName, int size) : // Locate our font's pixmap map in the font map, create if necessary std::string fontKey = qstrtostr(TQString("__%1__%2__") - .arg(strtoqstr(m_fontMap.getName())) - .arg(m_size)); + .tqarg(strtoqstr(m_fontMap.getName())) + .tqarg(m_size)); FontPixmapMap::iterator i = m_fontPixmapMap->find(fontKey); if (i == m_fontPixmapMap->end()) { @@ -231,7 +231,8 @@ NoteFont::lookupDrawRep(TQPixmap *pixmap) const if (!pixel) { if (startx < xi) { - a->resize(a->size() + 2, TQGArray::SpeedOptim); + //a->resize(a->size() + 2, TQGArray::SpeedOptim); + a->resize(a->size() + 2); a->setPoint(a->size() - 2, startx, yi); a->setPoint(a->size() - 1, xi - 1, yi); } @@ -286,7 +287,7 @@ NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const if (!found->isNull()) { if (found->tqmask() == 0) { - std::cerr << "NoteFont::getPixmap: Warning: No automatic mask " + std::cerr << "NoteFont::getPixmap: Warning: No automatic tqmask " << "for character \"" << charName << "\"" << (inverted ? " (inverted)" : "") << " in font \"" << m_fontMap.getName() << "-" << m_size @@ -400,7 +401,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap, return false; } - found = new QPixmap + found = new TQPixmap (PixmapFunctions::colourPixmap(basePixmap, hue, minValue)); add(charName, inverted, found); pixmap = *found; @@ -443,13 +444,13 @@ NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap, CharName NoteFont::getNameWithColour(CharName base, int hue) const { - return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base))); + return qstrtostr(TQString("%1__%2").tqarg(hue).tqarg(strtoqstr(base))); } CharName NoteFont::getNameShaded(CharName base) const { - return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base))); + return qstrtostr(TQString("shaded__%1").tqarg(strtoqstr(base))); } bool @@ -497,7 +498,7 @@ NoteFont::getHotspot(CharName charName, int &x, int &y, bool inverted) const return ok; } -QPoint +TQPoint NoteFont::getHotspot(CharName charName, bool inverted) const { int x, y; diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp index 9640087..3a77411 100644 --- a/src/gui/editors/notation/NoteFontMap.cpp +++ b/src/gui/editors/notation/NoteFontMap.cpp @@ -57,18 +57,18 @@ NoteFontMap::NoteFontMap(std::string name) : TQString mapFileName; TQString mapFileMixedName = TQString("%1/mappings/%2.xml") - .arg(m_fontDirectory) - .arg(strtoqstr(name)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(name)); TQFileInfo mapFileMixedInfo(mapFileMixedName); if (!mapFileMixedInfo.isReadable()) { TQString lowerName = strtoqstr(name).lower(); - lowerName.replace(TQRegExp(" "), "_"); + lowerName.tqreplace(TQRegExp(" "), "_"); TQString mapFileLowerName = TQString("%1/mappings/%2.xml") - .arg(m_fontDirectory) - .arg(lowerName); + .tqarg(m_fontDirectory) + .tqarg(lowerName); TQFileInfo mapFileLowerInfo(mapFileLowerName); @@ -76,11 +76,11 @@ NoteFontMap::NoteFontMap(std::string name) : if (mapFileLowerName != mapFileMixedName) { throw MappingFileReadFailed (qstrtostr(i18n("Can't open font mapping file %1 or %2"). - arg(mapFileMixedName).arg(mapFileLowerName))); + tqarg(mapFileMixedName).tqarg(mapFileLowerName))); } else { throw MappingFileReadFailed (qstrtostr(i18n("Can't open font mapping file %1"). - arg(mapFileMixedName))); + tqarg(mapFileMixedName))); } } else { mapFileName = mapFileLowerName; @@ -287,14 +287,14 @@ NoteFontMap::startElement(const TQString &, const TQString &, fontId = s.toInt(); //!!! need to be able to calculate max size -- checkFont needs - //to take a size argument; unfortunately Qt doesn't seem to be + //to take a size argument; unfortunately TQt doesn't seem to be //able to report to us when a scalable font was loaded in the //wrong size, so large sizes might be significantly inaccurate //as it just stops scaling up any further at somewhere around //120px. We could test whether the metric for the black //notehead is noticeably smaller than the notehead should be, //and reject if so? [update -- no, that doesn't work either, - //Qt just returns the correct metric even if drawing the + //TQt just returns the correct metric even if drawing the //incorrect size] for (int sz = 1; sz <= 30; sz += (sz == 1 ? 1 : 2)) { @@ -595,7 +595,7 @@ NoteFontMap::startElement(const TQString &, const TQString &, m_systemFontNames[n] = name; delete font; } else { - std::cerr << TQString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; + std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name) << std::endl; m_ok = false; } @@ -615,7 +615,7 @@ NoteFontMap::startElement(const TQString &, const TQString &, } if (!have) { std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). - arg(names) << std::endl; + tqarg(names) << std::endl; m_ok = false; } @@ -657,10 +657,10 @@ bool NoteFontMap::error(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::error(exception); } @@ -668,10 +668,10 @@ bool NoteFontMap::fatalError(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::fatalError(exception); } @@ -705,20 +705,20 @@ bool NoteFontMap::checkFile(int size, std::string &src) const { TQString pixmapFileMixedName = TQString("%1/%2/%3/%4.xpm") - .arg(m_fontDirectory) - .arg(strtoqstr(m_srcDirectory)) - .arg(size) - .arg(strtoqstr(src)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(m_srcDirectory)) + .tqarg(size) + .tqarg(strtoqstr(src)); TQFileInfo pixmapFileMixedInfo(pixmapFileMixedName); if (!pixmapFileMixedInfo.isReadable()) { TQString pixmapFileLowerName = TQString("%1/%2/%3/%4.xpm") - .arg(m_fontDirectory) - .arg(strtoqstr(m_srcDirectory).lower()) - .arg(size) - .arg(strtoqstr(src)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(m_srcDirectory).lower()) + .tqarg(size) + .tqarg(strtoqstr(src)); TQFileInfo pixmapFileLowerInfo(pixmapFileLowerName); @@ -991,7 +991,7 @@ NoteFontMap::HotspotData::getHotspot(int size, int width, int height, return true; } -QStringList +TQStringList NoteFontMap::getSystemFontNames() const { TQStringList names; diff --git a/src/gui/editors/notation/NoteFontMap.h b/src/gui/editors/notation/NoteFontMap.h index 52d87fa..9dac3f1 100644 --- a/src/gui/editors/notation/NoteFontMap.h +++ b/src/gui/editors/notation/NoteFontMap.h @@ -47,7 +47,7 @@ namespace Rosegarden -class NoteFontMap : public QXmlDefaultHandler +class NoteFontMap : public TQXmlDefaultHandler { public: typedef Exception MappingFileReadFailed; diff --git a/src/gui/editors/notation/NoteFontViewer.cpp b/src/gui/editors/notation/NoteFontViewer.cpp index d3dc2a3..918c7ac 100644 --- a/src/gui/editors/notation/NoteFontViewer.cpp +++ b/src/gui/editors/notation/NoteFontViewer.cpp @@ -50,7 +50,7 @@ NoteFontViewer::slotViewChanged(int i) for (int r = 0; r < 256; ++r) { if (m_frame->hasRow(r)) { - m_rows->insertItem(TQString("%1").arg(r)); + m_rows->insertItem(TQString("%1").tqarg(r)); if (firstRow < 0) firstRow = r; } @@ -81,10 +81,10 @@ NoteFontViewer::slotFontChanged(const TQString &s) slotViewChanged(m_view->currentItem()); } -NoteFontViewer::NoteFontViewer(TQWidget *parent, TQString noteFontName, +NoteFontViewer::NoteFontViewer(TQWidget *tqparent, TQString noteFontName, TQStringList fontNames, int pixelSize) : - KDialogBase(parent, 0, true, - i18n("Note Font Viewer: %1").arg(noteFontName), Close) + KDialogBase(tqparent, 0, true, + i18n("Note Font Viewer: %1").tqarg(noteFontName), Close) { TQVBox *box = makeVBoxMainWidget(); KToolBar* controls = new KToolBar(box); diff --git a/src/gui/editors/notation/NoteFontViewer.h b/src/gui/editors/notation/NoteFontViewer.h index b31df03..17b41a7 100644 --- a/src/gui/editors/notation/NoteFontViewer.h +++ b/src/gui/editors/notation/NoteFontViewer.h @@ -44,9 +44,10 @@ class FontViewFrame; class NoteFontViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - NoteFontViewer(TQWidget *parent, TQString noteFontName, + NoteFontViewer(TQWidget *tqparent, TQString noteFontName, TQStringList systemFontNames, int pixelSize); protected slots: diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp index c2533e5..7827761 100644 --- a/src/gui/editors/notation/NoteInserter.cpp +++ b/src/gui/editors/notation/NoteInserter.cpp @@ -86,8 +86,8 @@ NoteInserter::NoteInserter(NotationView* view) for (unsigned int i = 0; i < 6; ++i) { - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap(m_actionsAccidental[i][3]))); KRadioAction* noteAction = new KRadioAction(i18n(m_actionsAccidental[i][0]), icon, 0, this, @@ -97,14 +97,14 @@ NoteInserter::NoteInserter(NotationView* view) noteAction->setExclusiveGroup("accidentals"); } - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-crotchet"))); new KToggleAction(i18n("Dotted note"), icon, 0, this, TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -114,8 +114,8 @@ NoteInserter::NoteInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("rest-crotchet"))); new KAction(i18n("Switch to Inserting Rests"), icon, 0, this, TQT_SLOT(slotRestsSelected()), actionCollection(), @@ -123,7 +123,7 @@ NoteInserter::NoteInserter(NotationView* view) createMenu("noteinserter.rc"); - connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + connect(m_tqparentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } @@ -137,7 +137,7 @@ NoteInserter::NoteInserter(const TQString& menuName, NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + connect(m_tqparentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } @@ -147,7 +147,7 @@ NoteInserter::~NoteInserter() void NoteInserter::ready() { m_clickHappened = false; - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(true); } @@ -623,37 +623,37 @@ void NoteInserter::slotSetAccidental(Accidental accidental, void NoteInserter::slotNoAccidental() { - m_parentView->actionCollection()->action("no_accidental")->activate(); + m_tqparentView->actionCollection()->action("no_accidental")->activate(); } void NoteInserter::slotFollowAccidental() { - m_parentView->actionCollection()->action("follow_accidental")->activate(); + m_tqparentView->actionCollection()->action("follow_accidental")->activate(); } void NoteInserter::slotSharp() { - m_parentView->actionCollection()->action("sharp_accidental")->activate(); + m_tqparentView->actionCollection()->action("sharp_accidental")->activate(); } void NoteInserter::slotFlat() { - m_parentView->actionCollection()->action("flat_accidental")->activate(); + m_tqparentView->actionCollection()->action("flat_accidental")->activate(); } void NoteInserter::slotNatural() { - m_parentView->actionCollection()->action("natural_accidental")->activate(); + m_tqparentView->actionCollection()->action("natural_accidental")->activate(); } void NoteInserter::slotDoubleSharp() { - m_parentView->actionCollection()->action("double_sharp_accidental")->activate(); + m_tqparentView->actionCollection()->action("double_sharp_accidental")->activate(); } void NoteInserter::slotDoubleFlat() { - m_parentView->actionCollection()->action("double_flat_accidental")->activate(); + m_tqparentView->actionCollection()->action("double_flat_accidental")->activate(); } void NoteInserter::slotToggleDot() @@ -661,8 +661,8 @@ void NoteInserter::slotToggleDot() m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { @@ -677,20 +677,20 @@ void NoteInserter::slotToggleAutoBeam() void NoteInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void NoteInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void NoteInserter::slotRestsSelected() { Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { diff --git a/src/gui/editors/notation/NoteInserter.h b/src/gui/editors/notation/NoteInserter.h index a2467a1..81f035d 100644 --- a/src/gui/editors/notation/NoteInserter.h +++ b/src/gui/editors/notation/NoteInserter.h @@ -52,6 +52,7 @@ class Event; class NoteInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp index b41ecae..e02e14e 100644 --- a/src/gui/editors/notation/NotePixmapFactory.cpp +++ b/src/gui/editors/notation/NotePixmapFactory.cpp @@ -289,8 +289,8 @@ NotePixmapFactory::getSize() const return m_font->getSize(); } -QPixmap -NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp) +TQPixmap +NotePixmapFactory::toTQPixmap(TQCanvasPixmap* cp) { TQPixmap p = *cp; delete cp; @@ -330,8 +330,8 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) //#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY #ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY - m_p->painter().setPen(Qt::red); - m_p->painter().setBrush(Qt::red); + m_p->painter().setPen(TQt::red); + m_p->painter().setBrush(TQt::red); m_p->drawLine(0, 0, 0, m_generatedHeight - 1); m_p->drawLine(m_generatedWidth - 1, 0, @@ -570,7 +570,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); // If we draw stems after beams, instead of beams after stems, // beam anti-aliasing won't damage stems but we have to shorten the @@ -893,7 +893,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, m_p->painter().setFont(m_textMarkFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_textMarkFont); + m_p->tqmaskPainter().setFont(m_textMarkFont); int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2; int y = (normalMarksAreAbove ? @@ -923,7 +923,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (!Marks::isFingeringMark(*i)) { int x = m_left + m_noteBodyWidth / 2; @@ -978,7 +978,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, m_p->painter().setFont(m_fingeringFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_fingeringFont); + m_p->tqmaskPainter().setFont(m_fingeringFont); int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2; int y = m_above - dy - 3; @@ -1025,7 +1025,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters ¶ms) if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } x0 = m_left - m_noteBodyWidth / 5 - 1; x1 = m_left + m_noteBodyWidth + m_noteBodyWidth / 5 /* + 1 */; @@ -1257,11 +1257,11 @@ NotePixmapFactory::drawFlags(int flagCount, y, *flagChar.getPixmap()); - m_p->begin(m_generatedPixmap, m_generatedMask); + m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask)); } else { - // No problem with mask here + // No problem with tqmask here m_p->drawNoteCharacter(m_left + s1.x() - hotspot.x(), y, flagChar); @@ -1328,7 +1328,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, if (m_selected) m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setBrush(Qt::black); + m_p->painter().setBrush(TQt::black); } if (thickness < 4) { for (int i = 0; i < thickness; ++i) { @@ -1400,7 +1400,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, << ", g = " << g << ", dg1 = " << dg1 << ", dg2 = " << dg2 << ", seg = " << segment << ", q = " << quartile << endl; */ - // I don't know enough about Qt to be sure of this, but I + // I don't know enough about TQt to be sure of this, but I // suspect this may be some of the most inefficient code ever // written: @@ -1419,7 +1419,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else { - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } } @@ -1440,7 +1440,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, ++cx; } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } void @@ -1630,7 +1630,7 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters ¶ms) m_p->painter().setFont(m_tupletCountFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_tupletCountFont); + m_p->tqmaskPainter().setFont(m_tupletCountFont); int textX = endX + countSpace; int textY = endY + cr.height() / 2; @@ -1758,7 +1758,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) } else { NotePixmapCache::iterator ci(m_dottedRestCache->find(charName)); if (ci != m_dottedRestCache->end()) - return new QCanvasPixmap + return new TQCanvasPixmap (*ci->second, TQPoint(ci->second->offsetX(), ci->second->offsetY())); else @@ -1772,7 +1772,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); if (encache) { m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*> - (charName, new QCanvasPixmap + (charName, new TQCanvasPixmap (*canvasMap, hotspot))); } return canvasMap; @@ -1880,7 +1880,7 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) else if (adjustedOctave < 8) adjustedOctave++; - TQString text = TQString("%1").arg(adjustedOctave); + TQString text = TQString("%1").tqarg(adjustedOctave); TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); createPixmapAndMask(plain.getWidth(), @@ -1894,13 +1894,13 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) m_p->painter().setFont(m_clefOttavaFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_clefOttavaFont); + m_p->tqmaskPainter().setFont(m_clefOttavaFont); m_p->drawText(plain.getWidth() / 2 - rect.width() / 2, oct < 0 ? plain.getHeight() + rect.height() - 1 : rect.height(), text); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); TQPoint hotspot(plain.getHotspot()); if (oct > 0) hotspot.setY(hotspot.y() + rect.height()); return makeCanvasPixmap(hotspot, true); @@ -2195,7 +2195,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( int offset = (height - 10 * lw -1) / 2; // Draw staff lines - m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness())); + m_p->painter().setPen(TQPen(TQt::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); @@ -2204,7 +2204,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if (header->isAClefToDraw()) { const Clef &clef = header->getClef(); // TODO : use colours from GUIPalette - colour = header->isClefInconsistent() ? Qt::red : Qt::black; + colour = header->isClefInconsistent() ? TQt::red : TQt::black; int hue, sat, val; colour.getHsv(&hue, &sat, &val); @@ -2228,13 +2228,13 @@ NotePixmapFactory::makeTrackHeaderPixmap( else if (adjustedOctave < 8) adjustedOctave++; - TQString text = TQString("%1").arg(adjustedOctave); + TQString text = TQString("%1").tqarg(adjustedOctave); TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); m_p->painter().setPen(colour); m_p->painter().setFont(m_clefOttavaFont); - // m_p->maskPainter().setFont(m_clefOttavaFont); + // m_p->tqmaskPainter().setFont(m_clefOttavaFont); int xpos = maxDelta + clefChar.getWidth() / 2 - rect.width() / 2; int ypos = y - clefChar.getHotspot().y() + offset + (oct < 0 ? clefChar.getHeight() + rect.height() - 1 : - rect.height() / 3); @@ -2242,7 +2242,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( } // TODO : use colours from GUIPalette - colour = header->isKeyInconsistent() ? Qt::red : Qt::black; + colour = header->isKeyInconsistent() ? TQt::red : TQt::black; // Draw the key signature if any @@ -2273,7 +2273,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( } m_p->painter().setFont(m_trackHeaderFont); - // m_p->maskPainter().setFont(m_trackHeaderFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderFont); TQString text; TQString textLine; @@ -2288,7 +2288,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write upper text (track name and track label) - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); text = header->getUpperText(); int numberOfTextLines = header->getNumberOfTextLines(); @@ -2300,7 +2300,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if (!text.isEmpty()) { // String too long : cut it and replace last character by dots int len = textLine.length(); - if (len > 1) textLine.replace(len - 1, 1, i18n("...")); + if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); } } else { textLine = getOneLine(text, width - charWidth / 2); @@ -2313,9 +2313,9 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write transposition text // TODO : use colours from GUIPalette - colour = header->isTransposeInconsistent() ? Qt::red : Qt::black; + colour = header->isTransposeInconsistent() ? TQt::red : TQt::black; m_p->painter().setFont(m_trackHeaderBoldFont); - // m_p->maskPainter().setFont(m_trackHeaderBoldFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderBoldFont); m_p->painter().setPen(colour); m_p->drawText(width - transposeWidth - charWidth / 4, @@ -2327,9 +2327,9 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write lower text (segment label) // TODO : use colours from GUIPalette - colour = header->isLabelInconsistent() ? Qt::red : Qt::black; + colour = header->isLabelInconsistent() ? TQt::red : TQt::black; m_p->painter().setFont(m_trackHeaderFont); - // m_p->maskPainter().setFont(m_trackHeaderFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderFont); m_p->painter().setPen(colour); text = header->getLowerText(); @@ -2344,7 +2344,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if ((l == numberOfTextLines) && !text.isEmpty()) { // String too long : cut it and replace last character by dots int len = textLine.length(); - if (len > 1) textLine.replace(len - 1, 1, i18n("...")); + if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); } m_p->drawText(charWidth / 4, lowerTextY, textLine); @@ -2376,7 +2376,7 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing() return m_trackHeaderFont.pixelSize() * 3 / 2; } -QString +TQString NotePixmapFactory::getOneLine(TQString &text, int width) { TQString str; @@ -2603,7 +2603,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, right, height / 2 - 1, thickness, smooth); } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (painter) { painter->restore(); @@ -2638,14 +2638,14 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) TQPixmap newPixmap(i); TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(newPixmap, - Qt::white.rgb())); + TQt::white.rgb())); return p; } else { TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap, - Qt::white.rgb())); + TQt::white.rgb())); delete m_generatedPixmap; delete m_generatedMask; return p; @@ -2759,12 +2759,12 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, painter->rotate(theta); } else { m_p->painter().save(); - m_p->maskPainter().save(); + m_p->tqmaskPainter().save(); m_p->painter().translate(x, y); - m_p->maskPainter().translate(x, y); + m_p->tqmaskPainter().translate(x, y); if (rotate) { m_p->painter().rotate(theta); - m_p->maskPainter().rotate(theta); + m_p->tqmaskPainter().rotate(theta); } } @@ -2780,13 +2780,13 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, m.translate(hotspot.x(), hotspot.y()); m.rotate(theta); m_p->painter().setWorldMatrix(m); - m_p->maskPainter().setWorldMatrix(m); + m_p->tqmaskPainter().setWorldMatrix(m); } if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } havePixmap = true; } @@ -2835,7 +2835,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } if (m_selected) { - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } TQWMatrix::setTransformationMode(mode); @@ -2843,7 +2843,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, if (painter) { painter->restore(); if (!m_inPrinterMethod) - m_p->maskPainter().restore(); + m_p->tqmaskPainter().restore(); } } @@ -2890,29 +2890,29 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->beginExternal(painter); painter->translate(x - backpedal, y - height); } else { - NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and mask " << width << "x" << height << endl; + NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and tqmask " << width << "x" << height << endl; createPixmapAndMask(width, height); } int thickness = getStemThickness(); - TQPen pen(Qt::black, thickness, Qt::DotLine); + TQPen pen(TQt::black, thickness, TQt::DotLine); if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); pen.setColor(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); - pen.setColor(Qt::gray); + m_p->painter().setPen(TQt::gray); + pen.setColor(TQt::gray); } m_p->painter().setFont(m_ottavaFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_ottavaFont); + m_p->tqmaskPainter().setFont(m_ottavaFont); m_p->drawText(0, m_ottavaFontMetrics.ascent(), label); m_p->painter().setPen(pen); - // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen); + // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen); int x0 = m_ottavaFontMetrics.width(label) + thickness; int x1 = width - thickness; @@ -2925,7 +2925,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, pen.setStyle(Qt::SolidLine); m_p->painter().setPen(pen); - // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen); + // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen); NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: drawing " << x1 << "," << y0 << " to " << x1 << "," << y1 << ", thickness " << thickness << endl; @@ -2933,7 +2933,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->painter().setPen(TQPen()); if (!m_inPrinterMethod) - m_p->maskPainter().setPen(TQPen()); + m_p->tqmaskPainter().setPen(TQPen()); if (painter) { painter->restore(); @@ -3038,12 +3038,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } m_p->painter().setFont(m_bigTimeSigFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_bigTimeSigFont); + m_p->tqmaskPainter().setFont(m_bigTimeSigFont); m_p->drawText(0, r.height() + dy, c); @@ -3056,7 +3056,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) } } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy)); } else { @@ -3117,12 +3117,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } m_p->painter().setFont(m_timeSigFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_timeSigFont); + m_p->tqmaskPainter().setFont(m_timeSigFont); x = (width - numR.width()) / 2 - 1; m_p->drawText(x, denomR.height(), numS); @@ -3130,7 +3130,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) x = (width - denomR.width()) / 2 - 1; m_p->drawText(x, denomR.height() * 2 + (getNoteBodyHeight() / 2) - 1, denomS); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); return makeCanvasPixmap(TQPoint(0, denomR.height() + (getNoteBodyHeight() / 4) - 1), @@ -3163,7 +3163,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const } } -QFont +TQFont NotePixmapFactory::getTextFont(const Text &text) const { std::string type(text.getTextType()); @@ -3253,7 +3253,7 @@ NotePixmapFactory::getTextFont(const Text &text) const << " for type " << type << endl; NOTATION_DEBUG << "NotePixmapFactory::getTextFont: returning font '" - << textFont.toString() << "' for type " << type.c_str() + << TQString(textFont.toString()).ascii() << "' for type " << type.c_str() << " text : " << text.getText().c_str() << endl; m_textFontCache[type.c_str()] = textFont; @@ -3293,8 +3293,8 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement)); } else { - m_p->painter().setPen(Qt::black); - m_p->painter().setBrush(Qt::black); + m_p->painter().setPen(TQt::black); + m_p->painter().setBrush(TQt::black); } Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS); @@ -3349,15 +3349,15 @@ NotePixmapFactory::drawTextAux(const Text &text, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); m_p->painter().setFont(textFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(textFont); + m_p->tqmaskPainter().setFont(textFont); m_p->drawText(offset, textMetrics.ascent() + offset, s); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (painter) { painter->restore(); @@ -3386,7 +3386,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD int sideGap = getLineSpacing() / 4 + 1; TQRect r = textMetrics.boundingRect - (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s); + (0, 0, annotationWidth, annotationHeight, TQt::WordBreak, s); int pixmapWidth = r.width() + sideGap * 2; int pixmapHeight = r.height() + topGap + bottomGap; @@ -3396,11 +3396,11 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); m_p->painter().setFont(textFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(textFont); + m_p->tqmaskPainter().setFont(textFont); if (isLilyPondDirective) { m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::TextLilyPondDirectiveBackground)); @@ -3410,16 +3410,16 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD m_p->drawRect(0, 0, pixmapWidth, pixmapHeight); - m_p->painter().setBrush(Qt::black); + m_p->painter().setBrush(TQt::black); m_p->painter().drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, pixmapHeight - bottomGap), - Qt::WordBreak, s); + TQt::WordBreak, s); /* unnecessary following the rectangle draw m_pm.drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, annotationHeight + topGap), - Qt::WordBreak, s); + TQt::WordBreak, s); */ return makeCanvasPixmap(TQPoint(0, 0)); @@ -3427,33 +3427,33 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD void NotePixmapFactory::createPixmapAndMask(int width, int height, - int maskWidth, int maskHeight) + int tqmaskWidth, int tqmaskHeight) { - if (maskWidth < 0) - maskWidth = width; - if (maskHeight < 0) - maskHeight = height; + if (tqmaskWidth < 0) + tqmaskWidth = width; + if (tqmaskHeight < 0) + tqmaskHeight = height; m_generatedWidth = width; m_generatedHeight = height; m_generatedPixmap = new TQPixmap(width, height); - m_generatedMask = new TQBitmap(maskWidth, maskHeight); + m_generatedMask = new TQBitmap(tqmaskWidth, tqmaskHeight); static unsigned long total = 0; total += width * height; // NOTATION_DEBUG << "createPixmapAndMask: " << width << "x" << height << " (" << (width*height) << " px, " << total << " total)" << endl; - // clear up pixmap and mask + // clear up pixmap and tqmask m_generatedPixmap->fill(); - m_generatedMask->fill(Qt::color0); + m_generatedMask->fill(TQt::color0); // initiate painting - m_p->begin(m_generatedPixmap, m_generatedMask); + m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask)); - m_p->painter().setPen(Qt::black); - m_p->painter().setBrush(Qt::black); - m_p->maskPainter().setPen(Qt::white); - m_p->maskPainter().setBrush(Qt::white); + m_p->painter().setPen(TQt::black); + m_p->painter().setBrush(TQt::black); + m_p->tqmaskPainter().setPen(TQt::white); + m_p->tqmaskPainter().setBrush(TQt::white); } TQCanvasPixmap* @@ -3538,7 +3538,7 @@ NotePixmapFactory::getCharacter(CharName name, NoteCharacter &ch, return m_font->getCharacter(name, ch, charType, inverted); } -QPoint +TQPoint NotePixmapFactory::m_pointZero; diff --git a/src/gui/editors/notation/NotePixmapFactory.h b/src/gui/editors/notation/NotePixmapFactory.h index 20d2ae6..cfc93dc 100644 --- a/src/gui/editors/notation/NotePixmapFactory.h +++ b/src/gui/editors/notation/NotePixmapFactory.h @@ -58,7 +58,7 @@ class Clef; class TrackHeader; /** - * Generates QCanvasPixmaps for various notation items. + * Generates TQCanvasPixmaps for various notation items. */ class NotePixmapFactory @@ -140,7 +140,7 @@ public: TQCanvasPixmap* makeTrackHeaderPixmap(int width, int height, TrackHeader *header); - // Bounding box and other geometry methods: + // Bounding box and other tqgeometry methods: int getNoteBodyWidth (Note::Type = Note::Crotchet) const; @@ -199,7 +199,7 @@ public: /** - * We need this function because as of Qt 3.1, QCanvasPixmap + * We need this function because as of TQt 3.1, TQCanvasPixmap * is no longer copyable by value, while TQPixmap still is. * * So all the makeXXPixmap are now returning TQCanvasPixmap* @@ -207,7 +207,7 @@ public: * convert them to TQPixmap, since we use them that * way quite often (to generate toolbar button icons for instance). */ - static TQPixmap toQPixmap(TQCanvasPixmap*); + static TQPixmap toTQPixmap(TQCanvasPixmap*); static void dumpStats(std::ostream &); @@ -276,8 +276,8 @@ protected: TQCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); void createPixmapAndMask(int width, int height, - int maskWidth = -1, - int maskHeight = -1); + int tqmaskWidth = -1, + int tqmaskHeight = -1); TQCanvasPixmap* makeCanvasPixmap(TQPoint hotspot, bool generateMask = false); enum ColourType { diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ff8edae..51918ec 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -33,7 +33,7 @@ namespace Rosegarden { class NotePixmapPainter { // Just a trivial class that instructs two painters to do the - // same thing (one for the pixmap, one for the mask). We only + // same thing (one for the pixmap, one for the tqmask). We only // duplicate those methods we actually use in NotePixmapFactory public: @@ -55,23 +55,23 @@ public: } } - bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *tqmask = 0, bool unclipped = false) { m_externalPainter = 0; - if (mask) { + if (tqmask) { m_useMask = true; - m_maskPainter.begin(mask, unclipped); + m_tqmaskPainter.tqbegin(tqmask, unclipped); } else { m_useMask = false; } m_painter = &m_myPainter; - return m_painter->begin(device, unclipped); + return m_painter->tqbegin(device, unclipped); } bool end() { - if (m_useMask) m_maskPainter.end(); + if (m_useMask) m_tqmaskPainter.end(); return m_painter->end(); } @@ -79,66 +79,66 @@ public: return *m_painter; } - TQPainter &maskPainter() { - return m_maskPainter; + TQPainter &tqmaskPainter() { + return m_tqmaskPainter; } void drawPoint(int x, int y) { m_painter->drawPoint(x, y); - if (m_useMask) m_maskPainter.drawPoint(x, y); + if (m_useMask) m_tqmaskPainter.drawPoint(x, y); } void drawLine(int x1, int y1, int x2, int y2) { m_painter->drawLine(x1, y1, x2, y2); - if (m_useMask) m_maskPainter.drawLine(x1, y1, x2, y2); + if (m_useMask) m_tqmaskPainter.drawLine(x1, y1, x2, y2); } void drawRect(int x, int y, int w, int h) { m_painter->drawRect(x, y, w, h); - if (m_useMask) m_maskPainter.drawRect(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawRect(x, y, w, h); } void drawArc(int x, int y, int w, int h, int a, int alen) { m_painter->drawArc(x, y, w, h, a, alen); - if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); + if (m_useMask) m_tqmaskPainter.drawArc(x, y, w, h, a, alen); } 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); + m_painter->tqdrawPolygon(a, winding, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolygon(a, winding, index, n); } 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); + m_painter->tqdrawPolyline(a, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolyline(a, index, n); } 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); + m_painter->tqdrawPixmap(x, y, pm, sx, sy, sw, sh); + if (m_useMask) m_tqmaskPainter.tqdrawPixmap(x, y, *(pm.tqmask()), sx, sy, sw, sh); } void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); - if (m_useMask) m_maskPainter.drawText(x, y, string); + if (m_useMask) m_tqmaskPainter.drawText(x, y, string); } void drawNoteCharacter(int x, int y, const NoteCharacter &character) { character.draw(m_painter, x, y); - if (m_useMask) character.drawMask(&m_maskPainter, x, y); + if (m_useMask) character.drawMask(&m_tqmaskPainter, x, y); } void drawEllipse(int x, int y, int w, int h) { m_painter->drawEllipse(x, y, w, h); - if (m_useMask) m_maskPainter.drawEllipse(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawEllipse(x, y, w, h); } private: bool m_useMask; TQPainter m_myPainter; - TQPainter m_maskPainter; + TQPainter m_tqmaskPainter; TQPainter *m_externalPainter; TQPainter *m_painter; }; diff --git a/src/gui/editors/notation/NoteStyle.cpp b/src/gui/editors/notation/NoteStyle.cpp index 0b3332d..00ce956 100644 --- a/src/gui/editors/notation/NoteStyle.cpp +++ b/src/gui/editors/notation/NoteStyle.cpp @@ -70,12 +70,12 @@ NoteStyle::getShape(Note::Type type) if (m_baseStyle) return m_baseStyle->getShape(type); std::cerr - << "WARNING: NoteStyle::getShape: No shape defined for note type " + << "WARNING: NoteStyle::getShape: No tqshape defined for note type " << type << ", defaulting to AngledOval" << std::endl; return AngledOval; } - return i->second.shape; + return i->second.tqshape; } bool @@ -183,57 +183,57 @@ NoteStyle::getNoteHeadCharName(Note::Type type) CharName name = NoteCharacterNames::UNKNOWN; bool inverted = false; - if (desc.shape == AngledOval) { + if (desc.tqshape == AngledOval) { name = desc.filled ? NoteCharacterNames::NOTEHEAD_BLACK : NoteCharacterNames::VOID_NOTEHEAD; - } else if (desc.shape == LevelOval) { + } else if (desc.tqshape == LevelOval) { if (desc.filled) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: No filled level oval head" << std::endl; } name = NoteCharacterNames::WHOLE_NOTE; - } else if (desc.shape == Breve) { + } else if (desc.tqshape == Breve) { if (desc.filled) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: No filled breve head" << std::endl; } name = NoteCharacterNames::BREVE; - } else if (desc.shape == Cross) { + } else if (desc.tqshape == Cross) { name = desc.filled ? NoteCharacterNames::X_NOTEHEAD : NoteCharacterNames::CIRCLE_X_NOTEHEAD; - } else if (desc.shape == TriangleUp) { + } else if (desc.tqshape == TriangleUp) { name = desc.filled ? NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_BLACK : NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_WHITE; - } else if (desc.shape == TriangleDown) { + } else if (desc.tqshape == TriangleDown) { name = desc.filled ? NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_BLACK : NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_WHITE; inverted = true; - } else if (desc.shape == Diamond) { + } else if (desc.tqshape == Diamond) { name = desc.filled ? NoteCharacterNames::SEMIBREVIS_BLACK : NoteCharacterNames::SEMIBREVIS_WHITE; - } else if (desc.shape == Rectangle) { + } else if (desc.tqshape == Rectangle) { - name = desc.filled ? NoteCharacterNames::SQUARE_NOTEHEAD_BLACK - : NoteCharacterNames::SQUARE_NOTEHEAD_WHITE; + name = desc.filled ? NoteCharacterNames::STQUARE_NOTEHEAD_BLACK + : NoteCharacterNames::STQUARE_NOTEHEAD_WHITE; - } else if (desc.shape == Number) { + } else if (desc.tqshape == Number) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: Number not yet implemented" << std::endl; name = NoteCharacterNames::UNKNOWN; //!!! - } else if (desc.shape == CustomCharName) { + } else if (desc.tqshape == CustomCharName) { name = desc.charName; @@ -327,7 +327,7 @@ NoteStyle::getRestCharName(Note::Type type, bool restOutsideStave) case Note::Quaver: return NoteCharacterNames::EIGHTH_REST; case Note::Crotchet: - return NoteCharacterNames::QUARTER_REST; + return NoteCharacterNames::TQUARTER_REST; case Note::Minim: return restOutsideStave ? NoteCharacterNames::HALF_REST @@ -433,10 +433,10 @@ NoteStyle::checkDescription(Note::Type note) } void -NoteStyle::setShape(Note::Type note, NoteHeadShape shape) +NoteStyle::setShape(Note::Type note, NoteHeadShape tqshape) { checkDescription(note); - m_notes[note].shape = shape; + m_notes[note].tqshape = tqshape; } void diff --git a/src/gui/editors/notation/NoteStyle.h b/src/gui/editors/notation/NoteStyle.h index 3959e01..4431c16 100644 --- a/src/gui/editors/notation/NoteStyle.h +++ b/src/gui/editors/notation/NoteStyle.h @@ -99,8 +99,8 @@ public: protected: struct NoteDescription { - NoteHeadShape shape; // if CustomCharName, use charName - CharName charName; // only used if shape == CustomCharName + NoteHeadShape tqshape; // if CustomCharName, use charName + CharName charName; // only used if tqshape == CustomCharName bool filled; bool stem; int flags; @@ -109,14 +109,14 @@ protected: VFixPoint vfix; NoteDescription() : - shape(AngledOval), charName(NoteCharacterNames::UNKNOWN), + tqshape(AngledOval), charName(NoteCharacterNames::UNKNOWN), filled(true), stem(true), flags(0), slashes(0), hfix(Normal), vfix(Middle) { } - NoteDescription(NoteHeadShape _shape, CharName _charName, + NoteDescription(NoteHeadShape _tqshape, CharName _charName, bool _filled, bool _stem, int _flags, int _slashes, HFixPoint _hfix, VFixPoint _vfix) : - shape(_shape), charName(_charName), + tqshape(_tqshape), charName(_charName), filled(_filled), stem(_stem), flags(_flags), slashes(_slashes), hfix(_hfix), vfix(_vfix) { } }; diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp index f585117..d394e8b 100644 --- a/src/gui/editors/notation/NoteStyleFactory.cpp +++ b/src/gui/editors/notation/NoteStyleFactory.cpp @@ -63,7 +63,7 @@ NoteStyleFactory::getAvailableStyleNames() for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4) == ".xml") { - TQFileInfo fileInfo(TQString("%1/%2").arg(styleDir).arg(*i)); + TQFileInfo fileInfo(TQString("%1/%2").tqarg(styleDir).tqarg(*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 41da5ed..b7e04ef 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -48,13 +48,13 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : KGlobal::dirs()->findResource("appdata", "styles/"); TQString styleFileName = - TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString("%1/%2.xml").tqarg(styleDirectory).tqarg(strtoqstr(name)); TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed - (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); + (qstrtostr(i18n("Can't open style file %1").tqarg(styleFileName))); } TQFile styleFile(styleFileName); @@ -98,7 +98,7 @@ NoteStyleFileReader::startElement(const TQString &, const TQString &, if (!setFromAttributes(type, attributes)) return false; } catch (NotationStrings::MalformedNoteName n) { - m_errorString = i18n("Unrecognised note name %1").arg(s); + m_errorString = i18n("Unrecognised note name %1").tqarg(s); return false; } @@ -125,7 +125,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type, TQString s; bool haveShape = false; - s = attributes.value("shape"); + s = attributes.value("tqshape"); if (s) { m_style->setShape(type, qstrtostr(s.lower())); haveShape = true; @@ -134,7 +134,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type, s = attributes.value("charname"); if (s) { if (haveShape) { - m_errorString = i18n("global and note elements may have shape " + m_errorString = i18n("global and note elements may have tqshape " "or charname attribute, but not both"); return false; } diff --git a/src/gui/editors/notation/NoteStyleFileReader.h b/src/gui/editors/notation/NoteStyleFileReader.h index 8584ce8..d44c832 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.h +++ b/src/gui/editors/notation/NoteStyleFileReader.h @@ -31,7 +31,7 @@ namespace Rosegarden { -class NoteStyleFileReader : public QXmlDefaultHandler +class NoteStyleFileReader : public TQXmlDefaultHandler { public: NoteStyleFileReader(NoteStyleName name); diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp index e9b6bdb..faef304 100644 --- a/src/gui/editors/notation/RestInserter.cpp +++ b/src/gui/editors/notation/RestInserter.cpp @@ -56,14 +56,14 @@ RestInserter::RestInserter(NotationView* view) { TQIconSet icon; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-rest-crotchet"))); new KToggleAction(i18n("Dotted rest"), icon, 0, this, TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -73,8 +73,8 @@ RestInserter::RestInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -127,8 +127,8 @@ void RestInserter::slotToggleDot() m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { @@ -140,8 +140,8 @@ void RestInserter::slotNotesSelected() { Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(TQRegExp(" "), "_"); - m_parentView->actionCollection()->action(actionName)->activate(); + actionName.tqreplace(TQRegExp(" "), "_"); + m_tqparentView->actionCollection()->action(actionName)->activate(); } const TQString RestInserter::ToolName = "restinserter"; diff --git a/src/gui/editors/notation/RestInserter.h b/src/gui/editors/notation/RestInserter.h index 94834d2..3cac3d3 100644 --- a/src/gui/editors/notation/RestInserter.h +++ b/src/gui/editors/notation/RestInserter.h @@ -48,6 +48,7 @@ class Event; class RestInserter : public NoteInserter { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/SystemFont.cpp b/src/gui/editors/notation/SystemFont.cpp index 62b4280..77d3341 100644 --- a/src/gui/editors/notation/SystemFont.cpp +++ b/src/gui/editors/notation/SystemFont.cpp @@ -130,11 +130,11 @@ qfont: TQFontInfo info(qfont); - NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: have family " << info.family() << " (exactMatch " << info.exactMatch() << ")" << endl; + NOTATION_DEBUG << "SystemFont::loadSystemFont[TQt]: have family " << TQString(info.family()).ascii() << " (exactMatch " << info.exactMatch() << ")" << endl; // return info.exactMatch(); - // The Qt documentation says: + // The TQt documentation says: // // bool TQFontInfo::exactMatch() const // Returns TRUE if the matched window system font is exactly the @@ -143,23 +143,23 @@ qfont: // My arse. I specify "feta", I get "Verdana", and exactMatch // returns true. Uh huh. // - // UPDATE: in newer versions of Qt, I specify "fughetta", I get + // UPDATE: in newer versions of TQt, I specify "fughetta", I get // "Fughetta [macromedia]", and exactMatch returns false. Just as // useless, but in a different way. - TQString family = info.family().lower(); + TQString family = TQString(info.family()).lower(); if (family == name.lower()) return new SystemFontQt(qfont); else { - int bracket = family.find(" ["); + int bracket = family.tqfind(" ["); if (bracket > 1) family = family.left(bracket); if (family == name.lower()) return new SystemFontQt(qfont); } - NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: Wrong family returned, failing" << endl; + NOTATION_DEBUG << "SystemFont::loadSystemFont[TQt]: Wrong family returned, failing" << endl; return 0; } diff --git a/src/gui/editors/notation/SystemFontQt.cpp b/src/gui/editors/notation/SystemFontQt.cpp index ad969e8..5d90632 100644 --- a/src/gui/editors/notation/SystemFontQt.cpp +++ b/src/gui/editors/notation/SystemFontQt.cpp @@ -34,19 +34,19 @@ namespace Rosegarden { -QPixmap +TQPixmap SystemFontQt::renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) { success = false; if (strategy == OnlyGlyphs) { - NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by Qt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; + NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by TQt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; 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; + NOTATION_DEBUG << "SystemFontQt::renderChar: Can't render using TQt with only glyph value (" << glyph << ") for character " << charName.getName() << ", need a code point" << endl; return TQPixmap(); } @@ -60,16 +60,16 @@ SystemFontQt::renderChar(CharName charName, int glyph, int code, TQPainter painter; painter.begin(&map); painter.setFont(m_font); - painter.setPen(Qt::black); + painter.setPen(TQt::black); NOTATION_DEBUG << "NoteFont: Drawing character code " << code << " for " << charName.getName() << " using TQFont" << endl; - painter.drawText(0, metrics.ascent(), qc); + painter.drawText(0, metrics.ascent(), TQString(qc)); painter.end(); - map.setMask(PixmapFunctions::generateMask(map, Qt::white.rgb())); + map.setMask(PixmapFunctions::generateMask(map, TQt::white.rgb())); success = true; return map; diff --git a/src/gui/editors/notation/SystemFontQt.h b/src/gui/editors/notation/SystemFontQt.h index a3698f9..d7dff7f 100644 --- a/src/gui/editors/notation/SystemFontQt.h +++ b/src/gui/editors/notation/SystemFontQt.h @@ -22,8 +22,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SYSTEMFONQT_H_ -#define _RG_SYSTEMFONQT_H_ +#ifndef _RG_SYSTEMFONTQT_H_ +#define _RG_SYSTEMFONTQT_H_ #include "SystemFont.h" diff --git a/src/gui/editors/notation/SystemFontXft.cpp b/src/gui/editors/notation/SystemFontXft.cpp index 6388167..75f9406 100644 --- a/src/gui/editors/notation/SystemFontXft.cpp +++ b/src/gui/editors/notation/SystemFontXft.cpp @@ -65,7 +65,7 @@ staticCubicTo(FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *) */ -QPixmap +TQPixmap SystemFontXft::renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) { @@ -120,7 +120,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, Drawable drawable = (Drawable)map.handle(); if (!drawable) { - std::cerr << "ERROR: SystemFontXft::renderChar: No drawable in QPixmap!" << std::endl; + std::cerr << "ERROR: SystemFontXft::renderChar: No drawable in TQPixmap!" << std::endl; return map; } @@ -129,7 +129,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, (Visual *)map.x11Visual(), map.x11Colormap()); - TQColor pen(Qt::black); + TQColor pen(TQt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -153,7 +153,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, XftDrawDestroy(draw); - map.setMask(PixmapFunctions::generateMask(map, Qt::white.rgb())); + map.setMask(PixmapFunctions::generateMask(map, TQt::white.rgb())); success = true; diff --git a/src/gui/editors/notation/TextInserter.cpp b/src/gui/editors/notation/TextInserter.cpp index f862b88..6b5f595 100644 --- a/src/gui/editors/notation/TextInserter.cpp +++ b/src/gui/editors/notation/TextInserter.cpp @@ -52,7 +52,7 @@ TextInserter::TextInserter(NotationView* view) : NotationTool("TextInserter", view), m_text("", Text::Dynamic) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -62,8 +62,8 @@ TextInserter::TextInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -79,17 +79,17 @@ void TextInserter::slotNotesSelected() void TextInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void TextInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void TextInserter::ready() { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/TextInserter.h b/src/gui/editors/notation/TextInserter.h index f71ddc7..b00c4ae 100644 --- a/src/gui/editors/notation/TextInserter.h +++ b/src/gui/editors/notation/TextInserter.h @@ -48,6 +48,7 @@ class NotationView; class TextInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/TrackHeader.cpp b/src/gui/editors/notation/TrackHeader.cpp index f2793ab..de5bf5f 100644 --- a/src/gui/editors/notation/TrackHeader.cpp +++ b/src/gui/editors/notation/TrackHeader.cpp @@ -65,7 +65,7 @@ namespace Rosegarden { -// Status bits +// tqStatus bits const int TrackHeader::SEGMENT_HERE = 1 << 0; const int TrackHeader::SUPERIMPOSED_SEGMENTS = 1 << 1; const int TrackHeader::INCONSISTENT_CLEFS = 1 << 2; @@ -75,8 +75,8 @@ const int TrackHeader::INCONSISTENT_TRANSPOSITIONS = 1 << 5; const int TrackHeader::BEFORE_FIRST_SEGMENT = 1 << 6; -TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos) : - TQLabel(parent), +TrackHeader::TrackHeader(TQWidget *tqparent, TrackId trackId, int height, int ypos) : + TQLabel(tqparent), m_track(trackId), m_height(height), m_ypos(ypos), @@ -96,7 +96,7 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos m_current(false) { - m_notationView = static_cast<HeadersGroup *>(parent)->getNotationView(); + m_notationView = static_cast<HeadersGroup *>(tqparent)->getNotationView(); setFrameStyle(TQFrame::Box | TQFrame::Plain); setCurrent(false); @@ -106,17 +106,17 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos // Tooltip text creation Composition *comp = - static_cast<HeadersGroup *>(parent)->getComposition(); + static_cast<HeadersGroup *>(tqparent)->getComposition(); Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); TQString toolTipText = TQString(i18n("Track %1 : \"%2\"") - .arg(trackPos + 1) - .arg(strtoqstr(track->getLabel()))); + .tqarg(trackPos + 1) + .tqarg(strtoqstr(track->getLabel()))); - TQString preset = track->getPresetLabel(); + TQString preset = track->getPresetLabel().c_str(); if (preset != TQString("")) - toolTipText += TQString(i18n("\nNotate for: %1").arg(preset)); + toolTipText += TQString(i18n("\nNotate for: %1").tqarg(preset)); TQString notationSize = i18n("normal"); switch (track->getStaffSize()) { @@ -154,8 +154,8 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos } toolTipText += TQString(i18n("\nSize: %1, Bracket: %2 ")) - .arg(notationSize) - .arg(bracketText); + .tqarg(notationSize) + .tqarg(bracketText); // Sort segments by position on the track SortedSegments segments; @@ -181,17 +181,17 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos TQString transposeName; transposeValueToName(transpose, transposeName); toolTipText += TQString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) - .arg(barStart) - .arg(barEnd) - .arg(transposeName) - .arg(transpose) - .arg(strtoqstr((*i)->getLabel())); + .tqarg(barStart) + .tqarg(barEnd) + .tqarg(transposeName) + .tqarg(transpose) + .tqarg(strtoqstr((*i)->getLabel())); } else { toolTipText += TQString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) - .arg(barStart) - .arg(barEnd) - .arg(transpose) - .arg(strtoqstr((*i)->getLabel())); + .tqarg(barStart) + .tqarg(barEnd) + .tqarg(transpose) + .tqarg(strtoqstr((*i)->getLabel())); } } @@ -274,7 +274,7 @@ TrackHeader::lookAtStaff(double x, int maxWidth) int staff; Composition *comp = - static_cast<HeadersGroup *>(parent())->getComposition(); + static_cast<HeadersGroup *>(TQT_TQWIDGET(tqparent()))->getComposition(); Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); @@ -350,9 +350,9 @@ TrackHeader::lookAtStaff(double x, int maxWidth) transposeValueToName(m_transpose, noteName); m_upperText = TQString(i18n("%1: %2") - .arg(trackPos + 1) - .arg(strtoqstr(track->getLabel()))); - if (m_transpose) m_transposeText = i18n(" in %1").arg(noteName); + .tqarg(trackPos + 1) + .tqarg(strtoqstr(track->getLabel()))); + if (m_transpose) m_transposeText = i18n(" in %1").tqarg(noteName); else m_transposeText = TQString(""); NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); @@ -414,15 +414,15 @@ TrackHeader::updateHeader(int width) TQColor clefColour; if (m_status & (SEGMENT_HERE | BEFORE_FIRST_SEGMENT)) { if (m_status & (INCONSISTENT_CLEFS | INCONSISTENT_KEYS)) - clefColour = Qt::red; + clefColour = TQt::red; else - clefColour = Qt::black; + clefColour = TQt::black; } else { drawClef = false; } NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); - TQPixmap pmap = NotePixmapFactory::toQPixmap( + TQPixmap pmap = NotePixmapFactory::toTQPixmap( 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 1cb4f1e..0b8a0a6 100644 --- a/src/gui/editors/notation/TrackHeader.h +++ b/src/gui/editors/notation/TrackHeader.h @@ -50,16 +50,17 @@ class NotationView; class ColourMap; class Segment; -class TrackHeader : public QLabel +class TrackHeader : public TQLabel { Q_OBJECT + TQ_OBJECT public: /** * Create a new track header for track of id trackId. - * *parent is the parent widget, height the height of staff and + * *tqparent is the tqparent widget, height the height of staff and * ypos is the staff y position on canvas. */ - TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos); + TrackHeader(TQWidget *tqparent, TrackId trackId, int height, int ypos); /** * Draw a blue line around header when current is true @@ -168,7 +169,7 @@ private : void transposeValueToName(int transpose, TQString &transposeName); - // Status bits + // tqStatus bits static const int SEGMENT_HERE; static const int SUPERIMPOSED_SEGMENTS; static const int INCONSISTENT_CLEFS; diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp index bfa61a8..d7bf79a 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp @@ -115,7 +115,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, << ", index = " << index << ", plugin = " << plugin << endl; - TQColor pluginBackgroundColour = Qt::black; + TQColor pluginBackgroundColour = TQt::black; bool bypassed = false; TQPushButton *button = 0; @@ -179,7 +179,7 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, AudioPluginInstance *inst = m_selectedInstrument->getPlugin(pluginIndex); - TQColor backgroundColour = Qt::black; // default background colour + TQColor backgroundColour = TQt::black; // default background colour if (inst && inst->isAssigned()) { AudioPlugin *pluginClass @@ -203,7 +203,7 @@ AudioInstrumentParameterPanel::setButtonColour( RG_DEBUG << "AudioInstrumentParameterPanel::setButtonColour " << "pluginIndex = " << pluginIndex << ", bypassState = " << bypassState - << ", rgb = " << colour.name() << endl; + << ", rgb = " << TQString(colour.name()).ascii() << endl; TQPushButton *button = 0; @@ -225,7 +225,7 @@ AudioInstrumentParameterPanel::setButtonColour( button-> setPaletteBackgroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); - } else if (colour == Qt::black) { + } else if (colour == TQt::black) { button-> setPaletteForegroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); @@ -235,15 +235,15 @@ AudioInstrumentParameterPanel::setButtonColour( color(TQPalette::Active, TQColorGroup::Button)); } else { button-> - setPaletteForegroundColor(Qt::white); + setPaletteForegroundColor(TQt::white); button-> setPaletteBackgroundColor(colour); } } -AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent) - : InstrumentParameterPanel(doc, parent), +AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent) + : InstrumentParameterPanel(doc, tqparent), m_audioFader(new AudioFaderBox(this)) { TQGridLayout *gridLayout = new TQGridLayout(this, 3, 2, 5, 5); @@ -382,7 +382,7 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) button->setText(noneText); TQToolTip::add (button, noneText); - setButtonColour(index, inst ? inst->isBypassed() : false, Qt::black); + setButtonColour(index, inst ? inst->isBypassed() : false, TQt::black); } } diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h index 87da334..a9ff117 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h @@ -47,8 +47,9 @@ class AudioFaderBox; class AudioInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent); + AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent); virtual void setupForInstrument(Instrument*); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.cpp b/src/gui/editors/parameters/InstrumentParameterBox.cpp index 1d5b99d..610f9ed 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.cpp +++ b/src/gui/editors/parameters/InstrumentParameterBox.cpp @@ -49,10 +49,10 @@ namespace Rosegarden { InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Instrument"), i18n("Instrument Parameters"), - parent), + tqparent), m_widgetStack(new TQWidgetStack(this)), m_noInstrumentParameters(new TQVBox(this)), m_midiInstrumentParameters(new MIDIInstrumentParameterPanel(doc, this)), @@ -66,16 +66,16 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, m_midiInstrumentParameters->setFont(m_font); m_audioInstrumentParameters->setFont(m_font); - bool contains = false; + bool tqcontains = false; std::vector<InstrumentParameterBox*>::iterator it = instrumentParamBoxes.begin(); for (; it != instrumentParamBoxes.end(); it++) if ((*it) == this) - contains = true; + tqcontains = true; - if (!contains) + if (!tqcontains) instrumentParamBoxes.push_back(this); m_widgetStack->addWidget(m_midiInstrumentParameters); @@ -122,8 +122,8 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, // Layout the groups left to right. - TQBoxLayout* layout = new TQVBoxLayout(this); - layout->addWidget(m_widgetStack); + TQBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->addWidget(m_widgetStack); } @@ -149,7 +149,7 @@ InstrumentParameterBox::getSelectedInstrument() return m_doc->getStudio().getInstrumentById(m_selectedInstrument); } -QString +TQString InstrumentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { return i18n("Track"); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.h b/src/gui/editors/parameters/InstrumentParameterBox.h index cc36351..cb50d7a 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.h +++ b/src/gui/editors/parameters/InstrumentParameterBox.h @@ -53,10 +53,11 @@ class AudioInstrumentParameterPanel; class InstrumentParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent = 0); + TQWidget *tqparent = 0); ~InstrumentParameterBox(); void useInstrument(Instrument *instrument); diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.cpp b/src/gui/editors/parameters/InstrumentParameterPanel.cpp index a47a8a8..d0f45d4 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/InstrumentParameterPanel.cpp @@ -38,8 +38,8 @@ namespace Rosegarden { InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, - TQWidget* parent) - : TQFrame(parent), + TQWidget* tqparent) + : TQFrame(tqparent), m_instrumentLabel(new KSqueezedTextLabel(this)), m_selectedInstrument(0), m_doc(doc) @@ -48,7 +48,7 @@ InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, int width25 = metrics.width("1234567890123456789012345"); m_instrumentLabel->setFixedWidth(width25); - m_instrumentLabel->setAlignment(Qt::AlignCenter); + m_instrumentLabel->tqsetAlignment(TQt::AlignCenter); } void diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.h b/src/gui/editors/parameters/InstrumentParameterPanel.h index 717ffd2..42ceee5 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.h +++ b/src/gui/editors/parameters/InstrumentParameterPanel.h @@ -47,11 +47,12 @@ typedef std::vector<std::pair<int, RotaryPair> > RotaryMap; //////////////////////////////////////////////////////////////////////// -class InstrumentParameterPanel : public QFrame +class InstrumentParameterPanel : public TQFrame { Q_OBJECT + TQ_OBJECT public: - InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); virtual ~InstrumentParameterPanel() {}; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp index 61a9256..37ea57c 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp @@ -60,10 +60,10 @@ namespace Rosegarden { -MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent): - InstrumentParameterPanel(doc, parent), +MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent): + InstrumentParameterPanel(doc, tqparent), m_rotaryFrame(0), - m_rotaryMapper(new TQSignalMapper(this)) + m_rotaryMapper(new TQSignalMapper(TQT_TQOBJECT(this))) { m_mainGrid = new TQGridLayout(this, 10, 3, 2, 1); @@ -98,7 +98,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc m_variationValue->setMinimumWidth(width22); m_connectionLabel->setFixedWidth(width25); - m_connectionLabel->setAlignment(Qt::AlignCenter); + m_connectionLabel->tqsetAlignment(TQt::AlignCenter); // Configure the empty final row to accomodate any extra vertical space. @@ -131,7 +131,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Populate channel lists // for (int i = 0; i < 16; i++) { - m_channelValue->insertItem(TQString("%1").arg(i + 1)); + m_channelValue->insertItem(TQString("%1").tqarg(i + 1)); } m_channelValue->setSizeLimit(16); @@ -212,13 +212,13 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument) // TQString connection(strtoqstr(md->getConnection())); if (connection == "") { - m_connectionLabel->setText(i18n("[ %1 ]").arg(i18n("No connection"))); + m_connectionLabel->setText(i18n("[ %1 ]").tqarg(i18n("No connection"))); } else { // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); - TQString text = i18n("[ %1 ]").arg(connection); + TQString text = i18n("[ %1 ]").tqarg(connection); /*TQString origText(text); TQFontMetrics metrics(m_connectionLabel->fontMetrics()); @@ -293,7 +293,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) { if (!m_rotaryFrame) { m_rotaryFrame = new TQFrame(this); - m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, Qt::AlignHCenter); + m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, TQt::AlignHCenter); m_rotaryGrid = new TQGridLayout(m_rotaryFrame, 10, 3, 8, 1); m_rotaryGrid->addItem(new TQSpacerItem(10, 4), 0, 1); } @@ -321,7 +321,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Get the knob colour - only if the colour is non-default (>0) // - TQColor knobColour = Qt::black; // special case for Rotary + TQColor knobColour = TQt::black; // special case for Rotary if (it->getColourIndex() > 0) { Colour c = comp.getGeneralColourMap().getColourByIndex @@ -361,7 +361,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) redraw = 0; } if (redraw == 2) { - rotary->repaint(); + rotary->tqrepaint(); } // Update the controller name that is associated with @@ -425,7 +425,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Add signal mapping // - m_rotaryMapper->setMapping(rotary, + m_rotaryMapper->setMapping(TQT_TQOBJECT(rotary), int(it->getControllerValue())); count++; @@ -641,8 +641,8 @@ MIDIInstrumentParameterPanel::populateProgramList() std::string programName = programs[i].getName(); if (programName != "") { m_programValue->insertItem(TQString("%1. %2") - .arg(programs[i].getProgram() + 1) - .arg(strtoqstr(programName))); + .tqarg(programs[i].getProgram() + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == programs[i]) { currentProgram = m_programs.size(); } @@ -763,8 +763,8 @@ MIDIInstrumentParameterPanel::populateVariationList() strtoqstr(programName)); */ m_variationValue->insertItem(TQString("%1. %2") - .arg(variations[i] + 1) - .arg(strtoqstr(programName))); + .tqarg(variations[i] + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == program) { currentVariation = m_variations.size(); } @@ -787,7 +787,7 @@ MIDIInstrumentParameterPanel::populateVariationList() } } else { - //!!! seem to have problems here -- the grid layout doesn't + //!!! seem to have problems here -- the grid tqlayout doesn't //like us adding stuff in the middle so if we go from 1 //visible row (say program) to 2 (program + variation) the //second one overlaps the control knobs @@ -1164,7 +1164,7 @@ MIDIInstrumentParameterPanel::showAdditionalControls(bool showThem) m_instrumentLabel->setShown(showThem); int index = 0; for (RotaryMap::iterator it = m_rotaries.begin(); it != m_rotaries.end(); ++it) { - it->second.first->parentWidget()->setShown(showThem || (index < 8)); + it->second.first->tqparentWidget()->setShown(showThem || (index < 8)); //it->second.first->setShown(showThem || (index < 8)); //it->second.second->setShown(showThem || (index < 8)); index++; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h index 22c0ba1..635c009 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h @@ -52,9 +52,10 @@ class Instrument; class MIDIInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); void setupControllers(MidiDevice *); // setup ControlParameters on box diff --git a/src/gui/editors/parameters/RosegardenParameterArea.cpp b/src/gui/editors/parameters/RosegardenParameterArea.cpp index 8790122..1fc924e 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.cpp +++ b/src/gui/editors/parameters/RosegardenParameterArea.cpp @@ -46,11 +46,11 @@ namespace Rosegarden { -RosegardenParameterArea::RosegardenParameterArea(TQWidget *parent, +RosegardenParameterArea::RosegardenParameterArea(TQWidget *tqparent, const char *name, WFlags f) - : TQWidgetStack(parent, name, f), + : TQWidgetStack(tqparent, name, f), m_style(RosegardenParameterArea::CLASSIC_STYLE), - m_scrollView(new TQScrollView(this, 0, Qt::WStaticContents)), + m_scrollView(new TQScrollView(this, 0, TQt::WStaticContents)), m_classic(new TQVBox(m_scrollView->viewport())), m_tabBox(new KTabWidget(this)), m_active(0), @@ -86,15 +86,15 @@ void RosegardenParameterArea::addRosegardenParameterBox( m_parameterBoxes.push_back(b); m_scrollView->setMinimumWidth(std::max(m_scrollView->minimumWidth(), - b->sizeHint().width()) + 8); + b->tqsizeHint().width()) + 8); - // Create a titled group box for the parameter box, parented by the - // classic layout widget, so that it can be used to provide a title + // Create a titled group box for the parameter box, tqparented by the + // classic tqlayout widget, so that it can be used to provide a title // and outline, in classic mode. Add this container to an array that // parallels the above array of parameter boxes. TQVGroupBox *box = new TQVGroupBox(b->getLongLabel(), m_classic); - box->layout()->setMargin( 4 ); // about half the default value + box->tqlayout()->setMargin( 4 ); // about half the default value TQFont f; f.setBold( true ); box->setFont( f ); @@ -204,7 +204,7 @@ void RosegardenParameterArea::moveWidget(TQWidget *old_container, m_tabBox->removePage(box); } - // Reparent the parameter box, and perform any container-specific + // Retqparent the parameter box, and perform any container-specific // configuration. if (new_container == m_classic) { diff --git a/src/gui/editors/parameters/RosegardenParameterArea.h b/src/gui/editors/parameters/RosegardenParameterArea.h index 7af178a..1000017 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.h +++ b/src/gui/editors/parameters/RosegardenParameterArea.h @@ -49,14 +49,15 @@ class RosegardenParameterBox; * A widget that arranges a set of Rosegarden parameter-box widgets * within a frame, in a dynamically configurable manner. */ -class RosegardenParameterArea : public QWidgetStack +class RosegardenParameterArea : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: // Create the parameter display area. - RosegardenParameterArea(TQWidget *parent=0, const char *name=0, WFlags f=0); + RosegardenParameterArea(TQWidget *tqparent=0, const char *name=0, WFlags f=0); // Add a rosegarden parameter box to the list that are to be displayed. @@ -71,13 +72,13 @@ public: TAB_BOX_STYLE // A horizontal list of tabs, displaying one box at a time. }; - // Redisplay the widgets with a different layout style. + // Redisplay the widgets with a different tqlayout style. void setArrangement(Arrangement style); protected: private: - Arrangement m_style; // The current layout style. + Arrangement m_style; // The current tqlayout style. // The list of parameter box widgets that are being displayed by this // widget. diff --git a/src/gui/editors/parameters/RosegardenParameterBox.cpp b/src/gui/editors/parameters/RosegardenParameterBox.cpp index dbefda0..b52d65c 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.cpp +++ b/src/gui/editors/parameters/RosegardenParameterBox.cpp @@ -41,9 +41,9 @@ namespace Rosegarden RosegardenParameterBox::RosegardenParameterBox(const TQString &shortLabel, const TQString &longLabel, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQFrame(parent, name), + TQFrame(tqparent, name), m_shortLabel(shortLabel), m_longLabel(longLabel), m_mode(LANDSCAPE_MODE) diff --git a/src/gui/editors/parameters/RosegardenParameterBox.h b/src/gui/editors/parameters/RosegardenParameterBox.h index 629245f..c75f875 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.h +++ b/src/gui/editors/parameters/RosegardenParameterBox.h @@ -43,18 +43,19 @@ namespace Rosegarden /** * A flat TQFrame, in which a group of parameters can be laid out. - * Virtual method functions are defined for for requesting a layout + * Virtual method functions are defined for for requesting a tqlayout * style, and returning the single-word to use for labelling the * box. */ -class RosegardenParameterBox : public QFrame +class RosegardenParameterBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: RosegardenParameterBox(const TQString &shortLabel, // e.g. i18n("Track") const TQString &longLabel, // e.g. i18n("Track Parameters") - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); // Ask for a one-word string that can be used to label the widget. @@ -71,11 +72,11 @@ public: protected: void init(); - // List the layout styles that may be requested via a call to setStyle(). + // List the tqlayout styles that may be requested via a call to setStyle(). enum LayoutMode { - LANDSCAPE_MODE, // Optimize the layout for a tall and narrow parent. - PORTRAIT_MODE // Optimize the layout for a short and wide parent. + LANDSCAPE_MODE, // Optimize the tqlayout for a tall and narrow tqparent. + PORTRAIT_MODE // Optimize the tqlayout for a short and wide tqparent. }; void setLayoutMode(LayoutMode mode); @@ -83,7 +84,7 @@ protected: 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. + LayoutMode m_mode; // The current tqlayout mode. }; diff --git a/src/gui/editors/parameters/SegmentParameterBox.cpp b/src/gui/editors/parameters/SegmentParameterBox.cpp index 23fce12..8e35960 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.cpp +++ b/src/gui/editors/parameters/SegmentParameterBox.cpp @@ -84,10 +84,10 @@ namespace Rosegarden { SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Segment"), i18n("Segment Parameters"), - parent), + tqparent), m_highestPlayable(127), m_lowestPlayable(0), m_standardQuantizations(BasicQuantizer::getStandardQuantizations()), @@ -315,14 +315,14 @@ SegmentParameterBox::initBox() // populate the quantize combo // - TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(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, TQString("%1").arg(i)); + m_transposeValue->insertItem(noMap, TQString("%1").tqarg(i)); if (i == 0) m_transposeValue->setCurrentItem(m_transposeValue->count() - 1); } @@ -356,14 +356,14 @@ SegmentParameterBox::initBox() // timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_delayValue->insertItem((error ? noMap : pmap), label); } for (int i = 0; i < 10; i++) { int rtd = (i < 5 ? ((i + 1) * 10) : ((i - 3) * 50)); m_realTimeDelays.push_back(rtd); - m_delayValue->insertItem(i18n("%1 ms").arg(rtd)); + m_delayValue->insertItem(i18n("%1 ms").tqarg(rtd)); } // set delay blank initially @@ -662,11 +662,11 @@ SegmentParameterBox::populateBoxFromSegments() m_quantizeValue->setEnabled(quantized != NotApplicable); switch (transposed) { - // setCurrentItem works with QStrings + // setCurrentItem works with TQStrings // 2nd arg of "true" means "add if necessary" case All: m_transposeValue-> - setCurrentItem(TQString("%1").arg(transposeLevel), true); + setCurrentItem(TQString("%1").tqarg(transposeLevel), true); break; case Some: @@ -694,7 +694,7 @@ SegmentParameterBox::populateBoxFromSegments() } else if (delayLevel < 0) { - m_delayValue->setCurrentItem(i18n("%1 ms").arg( -delayLevel), + m_delayValue->setCurrentItem(i18n("%1 ms").tqarg( -delayLevel), 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(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))); +// m_highButton->setText(TQString("&High: %1%2").tqarg(highest.getNoteName(key)).tqarg(highest.getOctave(base))); +// m_lowButton->setText(TQString("&Low: %1%2").tqarg(lowest.getNoteName(key)).tqarg(lowest.getOctave(base))); } void @@ -1200,7 +1200,7 @@ SegmentParameterBox::showAdditionalControls(bool showThem) m_rangeLabel->setShown(showThem); */ } -QString +TQString SegmentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/SegmentParameterBox.h b/src/gui/editors/parameters/SegmentParameterBox.h index 0a7a266..b67a8f1 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.h +++ b/src/gui/editors/parameters/SegmentParameterBox.h @@ -60,6 +60,7 @@ class SegmentParameterBox : public RosegardenParameterBox, public CompositionObserver { Q_OBJECT + TQ_OBJECT public: @@ -72,7 +73,7 @@ public: } Tristate; SegmentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~SegmentParameterBox(); // Use Segments to update GUI parameters diff --git a/src/gui/editors/parameters/TrackParameterBox.cpp b/src/gui/editors/parameters/TrackParameterBox.cpp index 3ddfa69..a2a29c4 100644 --- a/src/gui/editors/parameters/TrackParameterBox.cpp +++ b/src/gui/editors/parameters/TrackParameterBox.cpp @@ -88,10 +88,10 @@ namespace Rosegarden { TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Track"), i18n("Track Parameters"), - parent), + tqparent), m_doc(doc), m_highestPlayable(127), m_lowestPlayable(0), @@ -128,7 +128,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // track label // m_trackLabel = new KSqueezedTextLabel(i18n("<untitled>"), this); - m_trackLabel->setAlignment(Qt::AlignCenter); + m_trackLabel->tqsetAlignment(TQt::AlignCenter); //mainLayout->addMultiCellWidget(m_trackLabel, 0, 0, 0, 5, AlignCenter); mainLayout->addWidget(m_trackLabel, 0, 0); @@ -311,7 +311,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, int transposeRange = 48; for (int i = -transposeRange; i < transposeRange + 1; i++) { - m_defTranspose->insertItem(TQString("%1").arg(i)); + m_defTranspose->insertItem(TQString("%1").tqarg(i)); if (i == 0) m_defTranspose->setCurrentItem(m_defTranspose->count() - 1); } @@ -453,7 +453,7 @@ TrackParameterBox::populatePlaybackDeviceList() DeviceId devId = device->getId(); if ((*it)->getType() == Instrument::SoftSynth) { - iname.replace("Synth plugin ", ""); + iname.tqreplace("Synth plugin ", ""); pname = ""; AudioPluginInstance *plugin = (*it)->getPlugin (Instrument::SYNTH_PLUGIN_POSITION); @@ -468,7 +468,7 @@ TrackParameterBox::populatePlaybackDeviceList() pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = TQString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").tqarg(label).tqarg(pname); } else { pname = label; } @@ -527,12 +527,12 @@ TrackParameterBox::populateRecordingDeviceList() m_recChannel->setEnabled(false); // hide these for audio instruments - m_defaultsGroup->parentWidget()->setShown(false); + m_defaultsGroup->tqparentWidget()->setShown(false); } else { // InstrumentType::Midi and InstrumentType::SoftSynth // show these if not audio instrument - m_defaultsGroup->parentWidget()->setShown(true); + m_defaultsGroup->tqparentWidget()->setShown(true); m_recDeviceIds.push_back(Device::ALL_DEVICES); m_recDevice->insertItem(i18n("All")); @@ -547,7 +547,7 @@ TrackParameterBox::populateRecordingDeviceList() && dev->isRecording()) { TQString connection = strtoqstr(dev->getConnection()); // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); m_recDevice->insertItem(connection); m_recDeviceIds.push_back(dev->getId()); } @@ -601,10 +601,10 @@ TrackParameterBox::updateHighLow() bool useSharps = true; bool includeOctave = true; -// 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(TQString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); - m_lowButton->setText(TQString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); +// m_highButton->setText(i18n("High: %1").tqarg(highest.getAsString(useSharps, includeOctave, base))); +// m_lowButton->setText(i18n("Low: %1").tqarg(lowest.getAsString(useSharps, includeOctave, base))); + m_highButton->setText(TQString("%1").tqarg(highest.getAsString(useSharps, includeOctave, base).c_str())); + m_lowButton->setText(TQString("%1").tqarg(lowest.getAsString(useSharps, includeOctave, base).c_str())); m_presetLbl->setEnabled(false); } @@ -624,13 +624,13 @@ TrackParameterBox::slotUpdateControls(int /*dummy*/) return ; m_defClef->setCurrentItem(trk->getClef()); - m_defTranspose->setCurrentItem(TQString("%1").arg(trk->getTranspose()), true); + m_defTranspose->setCurrentItem(TQString("%1").tqarg(trk->getTranspose()), true); m_defColor->setCurrentItem(trk->getColor()); m_highestPlayable = trk->getHighestPlayable(); m_lowestPlayable = trk->getLowestPlayable(); updateHighLow(); // set this down here because updateHighLow just disabled the label - m_presetLbl->setText(trk->getPresetLabel()); + m_presetLbl->setText(trk->getPresetLabel().c_str()); m_presetLbl->setEnabled(true); m_staffSizeCombo->setCurrentItem(trk->getStaffSize()); @@ -657,13 +657,13 @@ TrackParameterBox::slotSelectedTrackNameChanged() RG_DEBUG << "TrackParameterBox::sotSelectedTrackNameChanged()\n"; Composition &comp = m_doc->getComposition(); Track *trk = comp.getTrackById(m_selectedTrackId); - TQString m_trackName = trk->getLabel(); + TQString m_trackName = trk->getLabel().c_str(); if (m_trackName.isEmpty()) m_trackName = i18n("<untitled>"); else m_trackName.truncate(20); int trackNum = trk->getPosition() + 1; - m_trackLabel->setText(i18n("[ Track %1 - %2 ]").arg(trackNum).arg(m_trackName)); + m_trackLabel->setText(i18n("[ Track %1 - %2 ]").tqarg(trackNum).tqarg(m_trackName)); } void @@ -792,7 +792,7 @@ TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, TQString label) void TrackParameterBox::showAdditionalControls(bool showThem) { - // m_defaultsGroup->parentWidget()->setShown(showThem); + // m_defaultsGroup->tqparentWidget()->setShown(showThem); } void @@ -952,7 +952,7 @@ TrackParameterBox::slotPresetPressed() try { if (dialog.exec() == TQDialog::Accepted) { m_presetLbl->setText(dialog.getName()); - trk->setPresetLabel(dialog.getName()); + trk->setPresetLabel(dialog.getName().ascii()); if (dialog.getConvertAllSegments()) { SegmentSyncCommand* command = new SegmentSyncCommand( comp.getSegments(), comp.getSelectedTrack(), @@ -1008,7 +1008,7 @@ TrackParameterBox::slotStaffBracketChanged(int index) trk->setStaffBracket(index); } -QString +TQString TrackParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h index 696e3f7..3d55201 100644 --- a/src/gui/editors/parameters/TrackParameterBox.h +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -57,10 +57,11 @@ class RosegardenGUIDoc; class TrackParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~TrackParameterBox(); void setDocument( RosegardenGUIDoc *doc ); diff --git a/src/gui/editors/segment/ControlEditorDialog.cpp b/src/gui/editors/segment/ControlEditorDialog.cpp index 5fb1fa1..48d0f0a 100644 --- a/src/gui/editors/segment/ControlEditorDialog.cpp +++ b/src/gui/editors/segment/ControlEditorDialog.cpp @@ -72,10 +72,10 @@ namespace Rosegarden const TQString notShowing(i18n("<not showing>")); -ControlEditorDialog::ControlEditorDialog(TQWidget *parent, +ControlEditorDialog::ControlEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId device): - KMainWindow(parent, "controleditordialog"), + KMainWindow(tqparent, "controleditordialog"), m_studio(&doc->getStudio()), m_doc(doc), m_device(device), @@ -96,7 +96,7 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, // spacing hack! new TQLabel("", mainFrame); - new TQLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). + new TQLabel(i18n(" Control Events for %1 (device %2)").tqarg(deviceName). arg(device), mainFrame); new TQLabel("", mainFrame); @@ -111,20 +111,20 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, m_listView->addColumn(i18n("Color ")); m_listView->addColumn(i18n("Position on instrument panel")); - m_listView->setColumnAlignment(0, Qt::AlignLeft); + m_listView->setColumnAlignment(0, TQt::AlignLeft); // Align remaining columns centrally for (int i = 1; i < 9; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); m_listView->restoreLayout(kapp->config(), ControlEditorConfigGroup); TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -143,13 +143,13 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, (m_closeButton, i18n("Close the Control Parameter editor")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -220,7 +220,7 @@ ControlEditorDialog::slotUpdate() if (colour == "") colour = i18n("<default>"); - TQString position = TQString("%1").arg(it->getIPBPosition()); + TQString position = TQString("%1").tqarg(it->getIPBPosition()); if (position.toInt() == -1) position = notShowing; @@ -235,9 +235,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), TQString("-"), strtoqstr(it->getDescription()), - TQString("%1").arg(it->getMin()), - TQString("%1").arg(it->getMax()), - TQString("%1").arg(it->getDefault()), + TQString("%1").tqarg(it->getMin()), + TQString("%1").tqarg(it->getMax()), + TQString("%1").tqarg(it->getDefault()), colour, position); } else { @@ -247,9 +247,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), value, strtoqstr(it->getDescription()), - TQString("%1").arg(it->getMin()), - TQString("%1").arg(it->getMax()), - TQString("%1").arg(it->getDefault()), + TQString("%1").tqarg(it->getMin()), + TQString("%1").tqarg(it->getMax()), + TQString("%1").tqarg(it->getDefault()), colour, position); } @@ -337,7 +337,7 @@ ControlEditorDialog::slotClose() void ControlEditorDialog::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); diff --git a/src/gui/editors/segment/ControlEditorDialog.h b/src/gui/editors/segment/ControlEditorDialog.h index 369a9b1..e9722e5 100644 --- a/src/gui/editors/segment/ControlEditorDialog.h +++ b/src/gui/editors/segment/ControlEditorDialog.h @@ -50,9 +50,10 @@ class MultiViewCommandHistory; class ControlEditorDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - ControlEditorDialog(TQWidget *parent, + ControlEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId device); diff --git a/src/gui/editors/segment/ControlParameterEditDialog.cpp b/src/gui/editors/segment/ControlParameterEditDialog.cpp index 1f4e9fd..47f01db 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.cpp +++ b/src/gui/editors/segment/ControlParameterEditDialog.cpp @@ -55,10 +55,10 @@ namespace Rosegarden const TQString notShowing(i18n("<not showing>")); ControlParameterEditDialog::ControlParameterEditDialog( - TQWidget *parent, + TQWidget *tqparent, ControlParameter *control, RosegardenGUIDoc *doc): - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n("Edit Control Parameter"), Ok | Cancel), m_doc(doc), m_control(control) @@ -67,52 +67,52 @@ ControlParameterEditDialog::ControlParameterEditDialog( TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Control Event Properties"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Control Event Properties"), vbox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); m_nameEdit = new TQLineEdit(frame); - layout->addWidget(m_nameEdit, 0, 1); + tqlayout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); m_typeCombo = new KComboBox(frame); - layout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); + tqlayout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); - layout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); + tqlayout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); m_description = new TQLineEdit(frame); - layout->addMultiCellWidget(m_description, 2, 2, 1, 2); + tqlayout->addMultiCellWidget(m_description, 2, 2, 1, 2); // hex value alongside decimal value m_hexValue = new TQLabel(frame); - layout->addWidget(m_hexValue, 3, 1); + tqlayout->addWidget(m_hexValue, 3, 1); - layout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); m_controllerBox = new TQSpinBox(frame); - layout->addWidget(m_controllerBox, 3, 2); + tqlayout->addWidget(m_controllerBox, 3, 2); - layout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); + tqlayout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); m_minBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); + tqlayout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); - layout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); + tqlayout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); m_maxBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); + tqlayout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); - layout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); + tqlayout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); m_defaultBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); + tqlayout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); - layout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); + tqlayout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); m_colourCombo = new KComboBox(frame); - layout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); + tqlayout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); - layout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); + tqlayout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); m_ipbPosition = new KComboBox(frame); - layout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); + tqlayout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotNameChanged(const TQString&))); @@ -182,7 +182,7 @@ ControlParameterEditDialog::ControlParameterEditDialog( // m_ipbPosition->insertItem(notShowing); for (unsigned int i = 0; i < 32; i++) - m_ipbPosition->insertItem(TQString("%1").arg(i)); + m_ipbPosition->insertItem(TQString("%1").tqarg(i)); if (m_control->getType() == Controller::EventType) m_typeCombo->setCurrentItem(0); diff --git a/src/gui/editors/segment/ControlParameterEditDialog.h b/src/gui/editors/segment/ControlParameterEditDialog.h index 1c6bc01..289dc68 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.h +++ b/src/gui/editors/segment/ControlParameterEditDialog.h @@ -47,8 +47,9 @@ class RosegardenGUIDoc; class ControlParameterEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ControlParameterEditDialog(TQWidget *parent, + ControlParameterEditDialog(TQWidget *tqparent, ControlParameter *control, RosegardenGUIDoc *doc); diff --git a/src/gui/editors/segment/ControlParameterItem.h b/src/gui/editors/segment/ControlParameterItem.h index 7be91b3..e64b1d3 100644 --- a/src/gui/editors/segment/ControlParameterItem.h +++ b/src/gui/editors/segment/ControlParameterItem.h @@ -38,7 +38,7 @@ class ControlParameterItem : public KListViewItem { public: ControlParameterItem(int id, - TQListView *parent, + TQListView *tqparent, TQString str1, TQString str2, TQString str3, @@ -48,7 +48,7 @@ public: TQString str7, TQString str8, TQString str9): - KListViewItem(parent, str1, str2, str3, str4, str5, str6, str7, str8), + KListViewItem(tqparent, str1, str2, str3, str4, str5, str6, str7, str8), m_id(id) { setText(8, str9); } int getId() const { return m_id; } diff --git a/src/gui/editors/segment/MarkerEditor.cpp b/src/gui/editors/segment/MarkerEditor.cpp index d9df8a2..dffe446 100644 --- a/src/gui/editors/segment/MarkerEditor.cpp +++ b/src/gui/editors/segment/MarkerEditor.cpp @@ -71,9 +71,9 @@ namespace Rosegarden { -MarkerEditor::MarkerEditor(TQWidget *parent, +MarkerEditor::MarkerEditor(TQWidget *tqparent, RosegardenGUIDoc *doc): - KMainWindow(parent, "markereditordialog"), + KMainWindow(tqparent, "markereditordialog"), m_doc(doc), m_modified(false) { @@ -89,9 +89,9 @@ MarkerEditor::MarkerEditor(TQWidget *parent, // Align centrally for (int i = 0; i < 3; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); - TQGroupBox *posGroup = new TQGroupBox(2, Horizontal, + TQGroupBox *posGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Pointer position"), mainFrame); new TQLabel(i18n("Absolute time:"), posGroup); @@ -105,10 +105,10 @@ MarkerEditor::MarkerEditor(TQWidget *parent, TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -132,14 +132,14 @@ MarkerEditor::MarkerEditor(TQWidget *parent, (m_closeButton, i18n("Close the Marker Editor")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addWidget(m_deleteAllButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addWidget(m_deleteAllButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -182,7 +182,7 @@ void MarkerEditor::updatePosition() { timeT pos = m_doc->getComposition().getPosition(); - m_absoluteTime->setText(TQString("%1").arg(pos)); + m_absoluteTime->setText(TQString("%1").tqarg(pos)); RealTime rT = m_doc->getComposition().getElapsedRealTime(pos); long hours = rT.sec / (60 * 60); @@ -192,9 +192,9 @@ MarkerEditor::updatePosition() TQString realTime, secsStr; if (hours) - realTime += TQString("%1h ").arg(hours); + realTime += TQString("%1h ").tqarg(hours); if (mins) - realTime += TQString("%1m ").arg(mins); + realTime += TQString("%1m ").tqarg(mins); secsStr.sprintf("%ld.%03lds", secs, msecs); realTime += secsStr; @@ -203,7 +203,7 @@ MarkerEditor::updatePosition() m_realTime->setText(realTime); TQString barTime = - TQString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); + TQString("%1").tqarg(m_doc->getComposition().getBarNumber(pos) + 1); // again only update if needed if (m_barTime->text() != barTime) @@ -367,7 +367,7 @@ MarkerEditor::slotClose() void MarkerEditor::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); @@ -396,7 +396,7 @@ MarkerEditor::setupActions() TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); TQIconSet icon(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -406,7 +406,7 @@ MarkerEditor::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -416,7 +416,7 @@ MarkerEditor::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -530,7 +530,7 @@ MarkerEditor::slotItemClicked(TQListViewItem *item) } } -QString +TQString MarkerEditor::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -542,27 +542,27 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = m_doc->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } diff --git a/src/gui/editors/segment/MarkerEditor.h b/src/gui/editors/segment/MarkerEditor.h index 8d6de0e..c5a1973 100644 --- a/src/gui/editors/segment/MarkerEditor.h +++ b/src/gui/editors/segment/MarkerEditor.h @@ -51,9 +51,10 @@ class MultiViewCommandHistory; class MarkerEditor : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - MarkerEditor(TQWidget *parent, + MarkerEditor(TQWidget *tqparent, RosegardenGUIDoc *doc); ~MarkerEditor(); diff --git a/src/gui/editors/segment/MarkerEditorViewItem.h b/src/gui/editors/segment/MarkerEditorViewItem.h index 9852202..03320aa 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.h +++ b/src/gui/editors/segment/MarkerEditorViewItem.h @@ -35,16 +35,16 @@ namespace Rosegarden { class MarkerEditorViewItem : public KListViewItem { public: - MarkerEditorViewItem(TQListView * parent, int id, + MarkerEditorViewItem(TQListView * tqparent, 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, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()): + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_rawTime(0), m_fake(false), m_id(id) { ; } diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp index da56edc..c0154ec 100644 --- a/src/gui/editors/segment/PlayList.cpp +++ b/src/gui/editors/segment/PlayList.cpp @@ -47,8 +47,8 @@ namespace Rosegarden { -PlayList::PlayList(TQWidget *parent, const char *name) - : TQVBox(parent, name), +PlayList::PlayList(TQWidget *tqparent, const char *name) + : TQVBox(tqparent, name), m_listView(new PlayListView(this)), m_buttonBar(new TQFrame(this)), m_barLayout(new TQHBoxLayout(m_buttonBar)), diff --git a/src/gui/editors/segment/PlayList.h b/src/gui/editors/segment/PlayList.h index 8c04553..606eecd 100644 --- a/src/gui/editors/segment/PlayList.h +++ b/src/gui/editors/segment/PlayList.h @@ -43,12 +43,13 @@ namespace Rosegarden class PlayListView; -class PlayList : public QVBox +class PlayList : public TQVBox { Q_OBJECT + TQ_OBJECT public: - PlayList(TQWidget *parent = 0, const char *name = 0); + PlayList(TQWidget *tqparent = 0, const char *name = 0); ~PlayList(); PlayListView* getListView() { return m_listView; } diff --git a/src/gui/editors/segment/PlayListDialog.cpp b/src/gui/editors/segment/PlayListDialog.cpp index b519b6e..74c386b 100644 --- a/src/gui/editors/segment/PlayListDialog.cpp +++ b/src/gui/editors/segment/PlayListDialog.cpp @@ -36,8 +36,8 @@ namespace Rosegarden { PlayListDialog::PlayListDialog(TQString caption, - TQWidget* parent, const char* name) - : KDialogBase(parent, name, false, caption, + TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, false, caption, KDialogBase::Close, // standard buttons KDialogBase::Close, // default button true), diff --git a/src/gui/editors/segment/PlayListDialog.h b/src/gui/editors/segment/PlayListDialog.h index 5130ee3..69956dd 100644 --- a/src/gui/editors/segment/PlayListDialog.h +++ b/src/gui/editors/segment/PlayListDialog.h @@ -43,9 +43,10 @@ class PlayList; class PlayListDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PlayListDialog(TQString caption, TQWidget* parent = 0, const char* name = 0); + PlayListDialog(TQString caption, TQWidget* tqparent = 0, const char* name = 0); PlayList* getPlayList() { return m_playList; } diff --git a/src/gui/editors/segment/PlayListView.cpp b/src/gui/editors/segment/PlayListView.cpp index ff4d1c8..e83e5e6 100644 --- a/src/gui/editors/segment/PlayListView.cpp +++ b/src/gui/editors/segment/PlayListView.cpp @@ -29,8 +29,8 @@ namespace Rosegarden { -PlayListView::PlayListView(TQWidget *parent, const char *name) - : KListView(parent, name) +PlayListView::PlayListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("Title")); addColumn(i18n("File name")); diff --git a/src/gui/editors/segment/PlayListView.h b/src/gui/editors/segment/PlayListView.h index 43390d0..b21551e 100644 --- a/src/gui/editors/segment/PlayListView.h +++ b/src/gui/editors/segment/PlayListView.h @@ -32,7 +32,7 @@ namespace Rosegarden { class PlayListView : public KListView { public: - PlayListView(TQWidget *parent=0, const char *name=0); + PlayListView(TQWidget *tqparent=0, const char *name=0); TQListViewItem* previousSibling(TQListViewItem*); diff --git a/src/gui/editors/segment/PlayListViewItem.cpp b/src/gui/editors/segment/PlayListViewItem.cpp index ab0c25c..12d60b8 100644 --- a/src/gui/editors/segment/PlayListViewItem.cpp +++ b/src/gui/editors/segment/PlayListViewItem.cpp @@ -26,14 +26,14 @@ namespace Rosegarden { -PlayListViewItem::PlayListViewItem(KListView* parent, KURL kurl) - : KListViewItem(parent, kurl.fileName(), kurl.prettyURL()), +PlayListViewItem::PlayListViewItem(KListView* tqparent, KURL kurl) + : KListViewItem(tqparent, kurl.fileName(), kurl.prettyURL()), m_kurl(kurl) { } -PlayListViewItem::PlayListViewItem(KListView* parent, TQListViewItem* after, KURL kurl) - : KListViewItem(parent, after, kurl.fileName(), kurl.prettyURL()), +PlayListViewItem::PlayListViewItem(KListView* tqparent, TQListViewItem* after, KURL kurl) + : KListViewItem(tqparent, 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 a622682..aa39bb8 100644 --- a/src/gui/editors/segment/PlayListViewItem.h +++ b/src/gui/editors/segment/PlayListViewItem.h @@ -33,8 +33,8 @@ namespace Rosegarden { class PlayListViewItem : public KListViewItem { public: - PlayListViewItem(KListView* parent, KURL); - PlayListViewItem(KListView* parent, TQListViewItem*, KURL); + PlayListViewItem(KListView* tqparent, KURL); + PlayListViewItem(KListView* tqparent, 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 39e19d2..fba7327 100644 --- a/src/gui/editors/segment/TrackButtons.cpp +++ b/src/gui/editors/segment/TrackButtons.cpp @@ -72,16 +72,16 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f) - : TQFrame(parent, name, f), + : TQFrame(tqparent, name, f), m_doc(doc), - 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_tqlayout(new TQVBoxLayout(this)), + m_recordSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_muteSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_clickedSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_instListSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), m_tracks(doc->getComposition().getNbTracks()), m_offset(4), m_cellSize(trackCellHeight), @@ -100,13 +100,13 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, // Set the spacing between vertical elements // - m_layout->setSpacing(m_borderGap); + m_tqlayout->setSpacing(m_borderGap); // Now draw the buttons and labels and meters // makeButtons(); - m_layout->addStretch(20); + m_tqlayout->addStretch(20); connect(m_recordSigMapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotToggleRecordTrack(int))); @@ -152,7 +152,7 @@ TrackButtons::makeButtons() TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { - m_layout->addWidget(trackHBox); + m_tqlayout->addWidget(trackHBox); m_trackHBoxes.push_back(trackHBox); } } @@ -194,7 +194,7 @@ TrackButtons::populateButtons() // reset track tokens m_trackLabels[i]->setId(track->getId()); - setButtonMapping(m_trackLabels[i], track->getId()); + setButtonMapping(TQT_TQOBJECT(m_trackLabels[i]), track->getId()); m_trackLabels[i]->setPosition(i); } @@ -297,7 +297,7 @@ TrackButtons::slotUpdateTracks() if (trackHBox) { trackHBox->show(); - m_layout->insertWidget(i, trackHBox); + m_tqlayout->insertWidget(i, trackHBox); m_trackHBoxes.push_back(trackHBox); } } else @@ -359,7 +359,7 @@ TrackButtons::slotUpdateTracks() // RG_DEBUG << "TrackButtons::slotUpdateTracks - set button mapping at pos " // << i << " to track id " << track->getId() << endl; - setButtonMapping(m_trackLabels[i], track->getId()); + setButtonMapping(TQT_TQOBJECT(m_trackLabels[i]), track->getId()); } } m_tracks = newNbTracks; @@ -647,17 +647,17 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* i KGlobal::dirs()->findResource("appdata", "pixmaps/"); connectedPixmap.load - (TQString("%1/misc/connected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected.xpm").tqarg(pixmapDir)); connectedUsedPixmap.load - (TQString("%1/misc/connected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-used.xpm").tqarg(pixmapDir)); connectedSelectedPixmap.load - (TQString("%1/misc/connected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-selected.xpm").tqarg(pixmapDir)); unconnectedPixmap.load - (TQString("%1/misc/unconnected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected.xpm").tqarg(pixmapDir)); unconnectedUsedPixmap.load - (TQString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-used.xpm").tqarg(pixmapDir)); unconnectedSelectedPixmap.load - (TQString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-selected.xpm").tqarg(pixmapDir)); havePixmaps = true; } @@ -706,7 +706,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* i pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = TQString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").tqarg(label).tqarg(pname); } else { pname = label; } @@ -1021,7 +1021,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Create a horizontal box for each track // trackHBox = new TQFrame(this); - TQHBoxLayout *hblayout = new TQHBoxLayout(trackHBox); + TQHBoxLayout *hbtqlayout = new TQHBoxLayout(trackHBox); trackHBox->setMinimumSize(labelWidth, m_cellSize * multiple - m_borderGap); trackHBox->setFixedHeight(m_cellSize * multiple - m_borderGap); @@ -1033,7 +1033,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) trackHBox->setFrameShadow(Raised); // Insert a little gap - hblayout->addSpacing(vuSpacing); + hbtqlayout->addSpacing(vuSpacing); // Create a VU meter vuMeter = new TrackVUMeter(trackHBox, @@ -1044,10 +1044,10 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) m_trackMeters.push_back(vuMeter); - hblayout->addWidget(vuMeter); + hbtqlayout->addWidget(vuMeter); // Create another little gap - hblayout->addSpacing(vuSpacing); + hbtqlayout->addSpacing(vuSpacing); // // 'mute' and 'record' leds @@ -1056,12 +1056,12 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) mute = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::MuteTrackLED), trackHBox); TQToolTip::add(mute, i18n("Mute track")); - hblayout->addWidget(mute); + hbtqlayout->addWidget(mute); record = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::RecordMIDITrackLED), trackHBox); TQToolTip::add(record, i18n("Record on this track")); - hblayout->addWidget(record); + hbtqlayout->addWidget(record); record->setLook(KLed::Sunken); mute->setLook(KLed::Sunken); @@ -1072,8 +1072,8 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) 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()); + m_recordSigMapper->setMapping(TQT_TQOBJECT(record), track->getPosition()); + m_muteSigMapper->setMapping(TQT_TQOBJECT(mute), track->getPosition()); // Store the KLedButton // @@ -1084,8 +1084,8 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Track label // trackLabel = new TrackLabel(trackId, track->getPosition(), trackHBox); - hblayout->addWidget(trackLabel); - hblayout->addSpacing(vuSpacing); + hbtqlayout->addWidget(trackLabel); + hbtqlayout->addSpacing(vuSpacing); if (track->getLabel() == std::string("")) { Rosegarden::Instrument *ins = @@ -1111,7 +1111,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) m_trackLabels.push_back(trackLabel); // Connect it - setButtonMapping(trackLabel, trackId); + setButtonMapping(TQT_TQOBJECT(trackLabel), trackId); connect(trackLabel, TQT_SIGNAL(changeToInstrumentList()), m_instListSigMapper, TQT_SLOT(map())); diff --git a/src/gui/editors/segment/TrackButtons.h b/src/gui/editors/segment/TrackButtons.h index 7f2b5dd..050c564 100644 --- a/src/gui/editors/segment/TrackButtons.h +++ b/src/gui/editors/segment/TrackButtons.h @@ -51,9 +51,10 @@ class KLedButton; class Instrument; -class TrackButtons : public QFrame +class TrackButtons : public TQFrame { Q_OBJECT + TQ_OBJECT public: TrackButtons(RosegardenGUIDoc* doc, @@ -61,7 +62,7 @@ public: unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); @@ -185,7 +186,7 @@ protected: RosegardenGUIDoc *m_doc; - TQVBoxLayout *m_layout; + TQVBoxLayout *m_tqlayout; std::vector<KLedButton *> m_muteLeds; std::vector<KLedButton *> m_recordLeds; diff --git a/src/gui/editors/segment/TrackEditor.cpp b/src/gui/editors/segment/TrackEditor.cpp index 9eeb21b..7381790 100644 --- a/src/gui/editors/segment/TrackEditor.cpp +++ b/src/gui/editors/segment/TrackEditor.cpp @@ -87,10 +87,10 @@ TrackEditor::TrackEditor(RosegardenGUIDoc* doc, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel, - TQWidget* parent, const char* name, + TQWidget* tqparent, const char* name, WFlags) : DCOPObject("TrackEditorIface"), - TQWidget(parent, name), + TQWidget(tqparent, name), m_doc(doc), m_rulerScale(rulerScale), m_topStandardRuler(0), @@ -166,7 +166,7 @@ TrackEditor::init(TQWidget* rosegardenguiview) connect(rosegardenguiview, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); - connect(rosegardenguiview->parent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + connect(rosegardenguiview->tqparent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); m_segmentCanvas = new CompositionView(m_doc, m_compositionModel, this); @@ -331,7 +331,7 @@ void TrackEditor::slotReadjustCanvasSize() void TrackEditor::slotTrackButtonsWidthChanged() { - // We need to make sure the trackButtons geometry is fully updated + // We need to make sure the trackButtons tqgeometry is fully updated // ProgressDialog::processEvents(); @@ -360,13 +360,13 @@ int TrackEditor::getTrackCellHeight() const bool TrackEditor::isCompositionModified() { - return m_doc->getComposition().getRefreshStatus + return m_doc->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).needsRefresh(); } void TrackEditor::setCompositionModified(bool c) { - m_doc->getComposition().getRefreshStatus + m_doc->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).setNeedsRefresh(c); } @@ -444,7 +444,7 @@ void TrackEditor::addSegment(int track, int time, unsigned int duration) void TrackEditor::slotSegmentOrderChanged(int section, int fromIdx, int toIdx) { RG_DEBUG << TQString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") - .arg(section).arg(fromIdx).arg(toIdx) << endl; + .tqarg(section).tqarg(fromIdx).tqarg(toIdx) << endl; //!!! how do we get here? need to involve a command emit needUpdate(); @@ -490,7 +490,7 @@ TrackEditor::slotSetPointerPosition(timeT position) if (distance >= 1.0) { if (m_doc && m_doc->getSequenceManager() && - (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) { + (m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { if (m_playTracking) { getSegmentCanvas()->slotScrollHoriz(int(double(position) / ruler->getUnitsPerPixel())); @@ -547,7 +547,7 @@ bool TrackEditor::handleAutoScroll(int currentPosition, timeT newTimePosition, d if (moveDetected) { if (m_doc && m_doc->getSequenceManager() && - (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) { + (m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { if (m_playTracking) { getSegmentCanvas()->slotScrollHoriz(int(double(newTimePosition) / ruler->getUnitsPerPixel())); diff --git a/src/gui/editors/segment/TrackEditor.h b/src/gui/editors/segment/TrackEditor.h index b2c2bd2..86e3b77 100644 --- a/src/gui/editors/segment/TrackEditor.h +++ b/src/gui/editors/segment/TrackEditor.h @@ -68,6 +68,7 @@ class StandardRuler; class TrackEditor : public TQWidget, virtual public TrackEditorIface { Q_OBJECT + TQ_OBJECT public: /** * Create a new TrackEditor representing the document \a doc @@ -77,7 +78,7 @@ public: RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel = 0, - TQWidget* parent = 0, const char* name = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); ~TrackEditor(); diff --git a/src/gui/editors/segment/TrackHeader.cpp b/src/gui/editors/segment/TrackHeader.cpp index 367d02b..84b850b 100644 --- a/src/gui/editors/segment/TrackHeader.cpp +++ b/src/gui/editors/segment/TrackHeader.cpp @@ -41,8 +41,8 @@ void TrackHeader::paintEvent(TQPaintEvent *e) { TQPainter p( this ); - p.setPen( colorGroup().buttonText() ); - int pos = (orientation() == Horizontal) + p.setPen( tqcolorGroup().buttonText() ); + int pos = (orientation() == Qt::Horizontal) ? e->rect().left() : e->rect().top(); int id = mapToIndex( sectionAt( pos + offset() ) ); @@ -54,8 +54,8 @@ TrackHeader::paintEvent(TQPaintEvent *e) for ( int i = id; i < count(); i++ ) { TQRect r = sRect( i ); paintSection( &p, i, r ); - if ( orientation() == Horizontal && r. right() >= e->rect().right() || - orientation() == Vertical && r. bottom() >= e->rect().bottom() ) + if ( orientation() == Qt::Horizontal && r. right() >= e->rect().right() || + orientation() == Qt::Vertical && r. bottom() >= e->rect().bottom() ) return ; } diff --git a/src/gui/editors/segment/TrackHeader.h b/src/gui/editors/segment/TrackHeader.h index 91bef26..56891f4 100644 --- a/src/gui/editors/segment/TrackHeader.h +++ b/src/gui/editors/segment/TrackHeader.h @@ -38,14 +38,14 @@ namespace Rosegarden -class TrackHeader : public QHeader +class TrackHeader : public TQHeader { public: TrackHeader(int number, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0 ): - TQHeader(number, parent, name) {;} + TQHeader(number, tqparent, name) {;} ~TrackHeader(); protected: diff --git a/src/gui/editors/segment/TrackLabel.cpp b/src/gui/editors/segment/TrackLabel.cpp index 9df485f..53795a7 100644 --- a/src/gui/editors/segment/TrackLabel.cpp +++ b/src/gui/editors/segment/TrackLabel.cpp @@ -45,9 +45,9 @@ namespace Rosegarden TrackLabel::TrackLabel(TrackId id, int position, - TQWidget *parent, + TQWidget *tqparent, const char *name): - TQWidgetStack(parent, name), + TQWidgetStack(tqparent, name), m_instrumentLabel(new TQLabel(this)), m_trackLabel(new TQLabel(this)), m_id(id), @@ -124,18 +124,18 @@ TrackLabel::setSelected(bool on) if (on) { m_selected = true; - m_instrumentLabel->setPaletteBackgroundColor(colorGroup().highlight()); - m_instrumentLabel->setPaletteForegroundColor(colorGroup().highlightedText()); - m_trackLabel->setPaletteBackgroundColor(colorGroup().highlight()); - m_trackLabel->setPaletteForegroundColor(colorGroup().highlightedText()); + m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); + m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); + m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); + m_trackLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); } else { m_selected = false; - m_instrumentLabel->setPaletteBackgroundColor(colorGroup().background()); - m_trackLabel->setPaletteBackgroundColor(colorGroup().background()); - m_instrumentLabel->setPaletteForegroundColor(colorGroup().text()); - m_trackLabel->setPaletteForegroundColor(colorGroup().text()); + m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().background()); + m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().background()); + m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().text()); + m_trackLabel->setPaletteForegroundColor(tqcolorGroup().text()); } if (visibleWidget()) visibleWidget()->update(); @@ -144,12 +144,12 @@ TrackLabel::setSelected(bool on) void TrackLabel::mousePressEvent(TQMouseEvent *e) { - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { emit clicked(); emit changeToInstrumentList(); - } else if (e->button() == LeftButton) { + } else if (e->button() == Qt::LeftButton) { // start a timer on this hold m_pressTimer->start(200, true); // 200ms, single shot @@ -163,7 +163,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e) if (m_pressTimer->isActive()) m_pressTimer->stop(); - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { emit clicked(); } } @@ -171,7 +171,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e) void TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) { - if (e->button() != LeftButton) + if (e->button() != Qt::LeftButton) return ; // Highlight this label alone and cheat using @@ -186,7 +186,7 @@ TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) bool ok = false; - TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), TQT_TQOBJECT(this)); // empty is OK TQString newText = KLineEditDlg::getText(i18n("Change track name"), i18n("Enter new track name"), diff --git a/src/gui/editors/segment/TrackLabel.h b/src/gui/editors/segment/TrackLabel.h index b7aac70..a7b5207 100644 --- a/src/gui/editors/segment/TrackLabel.h +++ b/src/gui/editors/segment/TrackLabel.h @@ -47,9 +47,10 @@ namespace Rosegarden * selectable label/label list. In conjunction with TrackButtons * provides a framework for Track selection on the TrackCanvas. */ -class TrackLabel : public QWidgetStack +class TrackLabel : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: enum InstrumentTrackLabels @@ -61,7 +62,7 @@ public: TrackLabel(TrackId id, int position, - TQWidget *parent, + TQWidget *tqparent, const char *name=0); ~TrackLabel(); diff --git a/src/gui/editors/segment/TrackVUMeter.cpp b/src/gui/editors/segment/TrackVUMeter.cpp index f8acbe8..5001a28 100644 --- a/src/gui/editors/segment/TrackVUMeter.cpp +++ b/src/gui/editors/segment/TrackVUMeter.cpp @@ -34,16 +34,16 @@ namespace Rosegarden { -TrackVUMeter::TrackVUMeter(TQWidget *parent, +TrackVUMeter::TrackVUMeter(TQWidget *tqparent, VUMeterType type, int width, int height, int position, const char *name): - VUMeter(parent, type, false, false, width, height, VUMeter::Horizontal, name), + VUMeter(tqparent, type, false, false, width, height, VUMeter::Horizontal, name), m_position(position), m_textHeight(12) { - setAlignment(AlignCenter); + tqsetAlignment(AlignCenter); TQFont font; font.setPointSize(font.pointSize() * 95 / 100); @@ -67,7 +67,7 @@ TrackVUMeter::meterStop() { setMinimumHeight(m_textHeight); setMaximumHeight(m_textHeight); - setText(TQString("%1").arg(m_position + 1)); + setText(TQString("%1").tqarg(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 dad0455..9630301 100644 --- a/src/gui/editors/segment/TrackVUMeter.h +++ b/src/gui/editors/segment/TrackVUMeter.h @@ -40,7 +40,7 @@ namespace Rosegarden class TrackVUMeter: public VUMeter { public: - TrackVUMeter(TQWidget *parent = 0, + TrackVUMeter(TQWidget *tqparent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/editors/segment/TriggerManagerItem.h b/src/gui/editors/segment/TriggerManagerItem.h index 7af5619..1d6a819 100644 --- a/src/gui/editors/segment/TriggerManagerItem.h +++ b/src/gui/editors/segment/TriggerManagerItem.h @@ -32,18 +32,18 @@ namespace Rosegarden { -class TriggerManagerItem : public QListViewItem +class TriggerManagerItem : public TQListViewItem { public: - 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, + TriggerManagerItem(TQListView * tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()): + TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8) { ; } virtual int compare(TQListViewItem * i, int col, bool ascending) const; diff --git a/src/gui/editors/segment/TriggerSegmentManager.cpp b/src/gui/editors/segment/TriggerSegmentManager.cpp index 76e71bf..e658cc3 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.cpp +++ b/src/gui/editors/segment/TriggerSegmentManager.cpp @@ -73,9 +73,9 @@ namespace Rosegarden { -TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, +TriggerSegmentManager::TriggerSegmentManager(TQWidget *tqparent, RosegardenGUIDoc *doc): - KMainWindow(parent, "triggereditordialog"), + KMainWindow(tqparent, "triggereditordialog"), m_doc(doc), m_modified(false) { @@ -95,14 +95,14 @@ TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, // Align centrally for (int i = 0; i < 2; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -126,14 +126,14 @@ TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, (m_closeButton, i18n("Close the Triggered Segment Manager")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addWidget(m_deleteAllButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addWidget(m_deleteAllButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -246,16 +246,16 @@ TriggerSegmentManager::slotUpdate() TQString used = i18n("%1 on 1 track", "%1 on %n tracks", - tracks.size()).arg(uses); + tracks.size()).tqarg(uses); TQString pitch = TQString("%1 (%2)") - .arg(MidiPitchLabel((*it)->getBasePitch()).getQString()) - .arg((*it)->getBasePitch()); + .tqarg(MidiPitchLabel((*it)->getBasePitch()).getTQString()) + .tqarg((*it)->getBasePitch()); - TQString velocity = TQString("%1").arg((*it)->getBaseVelocity()); + TQString velocity = TQString("%1").tqarg((*it)->getBaseVelocity()); item = new TriggerManagerItem - (m_listView, TQString("%1").arg(i + 1), TQString("%1").arg((*it)->getId()), + (m_listView, TQString("%1").tqarg(i + 1), TQString("%1").tqarg((*it)->getId()), label, timeString, pitch, velocity, used); item->setRawDuration(duration); @@ -375,12 +375,12 @@ TriggerSegmentManager::slotClose() void TriggerSegmentManager::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), TQT_TQOBJECT(this), TQT_SLOT(slotClose())); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); @@ -397,7 +397,7 @@ TriggerSegmentManager::setupActions() actionCollection(), KStdAction::stdName(KStdAction::Redo)); - new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, this, + new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotPasteAsNew()), actionCollection(), "paste_to_trigger_segment"); @@ -409,7 +409,7 @@ TriggerSegmentManager::setupActions() TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); TQIconSet icon(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -419,7 +419,7 @@ TriggerSegmentManager::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -429,7 +429,7 @@ TriggerSegmentManager::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -509,7 +509,7 @@ TriggerSegmentManager::slotItemClicked(TQListViewItem *item) RG_DEBUG << "TriggerSegmentManager::slotItemClicked" << endl; } -QString +TQString TriggerSegmentManager::makeDurationString(timeT time, timeT duration, int timeMode) { @@ -523,15 +523,15 @@ TriggerSegmentManager::makeDurationString(timeT time, m_doc->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time @@ -539,12 +539,12 @@ TriggerSegmentManager::makeDurationString(timeT time, RealTime rt = m_doc->getComposition().getRealTimeDifference (time, time + duration); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(duration); + return TQString("%1 ").tqarg(duration); } } diff --git a/src/gui/editors/segment/TriggerSegmentManager.h b/src/gui/editors/segment/TriggerSegmentManager.h index 4746a0e..dbe5ea0 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.h +++ b/src/gui/editors/segment/TriggerSegmentManager.h @@ -50,9 +50,10 @@ class MultiViewCommandHistory; class TriggerSegmentManager : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - TriggerSegmentManager(TQWidget *parent, + TriggerSegmentManager(TQWidget *tqparent, RosegardenGUIDoc *doc); ~TriggerSegmentManager(); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp index b0d3f3b..786e1a4 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp @@ -60,7 +60,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, m_image = TQImage(pixWidth, m_rect.height(), 8, 4); m_image.setAlphaBuffer(true); - m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2); + m_penWidth = (std::max(1U, (uint)m_rect.getPen().width()) * 2); m_halfRectHeight = m_model.grid().getYSnap()/2 - m_penWidth / 2 - 2; } @@ -276,7 +276,7 @@ void AudioPreviewPainter::paintPreviewImage() m_segment->getStartTime()) - m_model.grid().getRulerScale()->getXForTime(m_segment->getStartTime())); - m_p.setPen(Qt::blue); + m_p.setPen(TQt::blue); m_p.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1); m_pb.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1); } @@ -291,15 +291,15 @@ void AudioPreviewPainter::finalizeCurrentSlice() // RG_DEBUG << "AudioPreviewPainter::finalizeCurrentSlice : copying pixmap to image at " << m_sliceNb * tileWidth() << endl; // transparent background - m_image.setColor(0, qRgba(255, 255, 255, 0)); + m_image.setColor(0, tqRgba(255, 255, 255, 0)); // foreground from computeSegmentPreviewColor TQColor c = m_model.computeSegmentPreviewColor(m_segment); - QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255); + TQRgb rgba = tqRgba(c.red(), c.green(), c.blue(), 255); m_image.setColor(1, rgba); // red for clipping - m_image.setColor(2, qRgba(255, 0, 0, 255)); + m_image.setColor(2, tqRgba(255, 0, 0, 255)); m_previewPixmaps.push_back(m_image.copy()); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h index 0337346..2944b38 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h @@ -44,7 +44,7 @@ namespace Rosegarden class AudioFileManager; -class AudioPreviewThread : public QThread +class AudioPreviewThread : public TQThread { public: AudioPreviewThread(AudioFileManager *manager); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp index 182eb9b..1ae0acd 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp @@ -44,8 +44,8 @@ static int apuExtantCount = 0; AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread, const Composition& c, const Segment* s, const TQRect& r, - CompositionModelImpl* parent) - : TQObject(parent), + CompositionModelImpl* tqparent) + : TQObject(tqparent), m_thread(thread), m_composition(c), m_segment(s), diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h index 347ba16..047f9b2 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h @@ -43,16 +43,17 @@ class Composition; class AudioPreviewThread; -class AudioPreviewUpdater : public QObject +class AudioPreviewUpdater : public TQObject { Q_OBJECT + TQ_OBJECT public: AudioPreviewUpdater(AudioPreviewThread &thread, const Composition &composition, const Segment *segment, const TQRect &displayExtent, - CompositionModelImpl *parent); + CompositionModelImpl *tqparent); ~AudioPreviewUpdater(); void update(); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp index 9579ba2..fe4b926 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp @@ -60,12 +60,12 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg timeT t = 0; if (item) { - TQRect itemRect = item->rect(); + TQRect tqitemRect = item->rect(); - t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L); + t = std::max(grid.snapX(tqitemRect.x() + tqitemRect.width()), 0L); // RG_DEBUG << "CompositionItemHelper::getEndTime() : rect width = " -// << itemRect.width() +// << tqitemRect.width() // << " - item is repeating : " << item->isRepeating() // << " - endTime = " << t // << endl; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp index 12984a0..76cbe70 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp @@ -48,7 +48,7 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect TQRect CompositionItemImpl::rect() const { - TQRect res = m_rect; + TQRect res = static_cast<const TQRect&>(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/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h index 63412c0..1e4bd2f 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h @@ -56,6 +56,7 @@ typedef std::vector<TQImage> PixmapArray; class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver { Q_OBJECT + TQ_OBJECT public: struct CompositionItemCompare { diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp index 9627b16..388a4c1 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp @@ -231,7 +231,7 @@ void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects, TQPoint basePoint = segRect.topLeft(); - AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect); + AudioPreviewDrawDataItem previewItem(previewImage, basePoint, static_cast<const TQRect&>(segRect)); if (getChangeType() == ChangeResizeFromStart) { CompositionRect originalRect = computeSegmentRect(*segment); @@ -476,7 +476,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) TQRect updateRect; if (apData) { - RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl; + RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData tqcontains " << apData->getValues().size() << " values already" << endl; unsigned int channels = 0; const std::vector<float> &values = apu->getComputedValues(channels); if (channels > 0) { @@ -501,7 +501,7 @@ TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, c m_audioSegmentPreviewMap[segment] = previewPainter.getPreviewImage(); - return previewPainter.getSegmentRect(); + return static_cast<const TQRect&>(previewPainter.getSegmentRect()); } void CompositionModelImpl::slotInstrumentParametersChanged(InstrumentId id) @@ -796,7 +796,7 @@ CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint& Segment* s = *i; CompositionRect sr = computeSegmentRect(*s); - if (sr.contains(point)) { + if (sr.tqcontains(point)) { // RG_DEBUG << "CompositionModelImpl::getItemsAt() adding " << sr << " for segment " << s << endl; CompositionItem item(new CompositionItemImpl(*s, sr)); unsigned int z = computeZForSegment(s); @@ -1124,7 +1124,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool if (s.getType() == Segment::Audio) { static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) static TQRegExp re2("\\.[^.]+$"); // filename suffix - label.replace(re1, "").replace(re2, ""); + label.tqreplace(re1, "").tqreplace(re2, ""); } cr.setLabel(label); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h index 2d3fd64..f2998c3 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h @@ -62,6 +62,7 @@ class AudioPreviewThread; class CompositionModelImpl : public CompositionModel { Q_OBJECT + TQ_OBJECT public: CompositionModelImpl(Composition& compo, diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp index 9f867a5..ec4bef0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp @@ -37,6 +37,6 @@ namespace Rosegarden { - const TQColor CompositionRect::DefaultPenColor = Qt::black; + const TQColor CompositionRect::DefaultPenColor = TQt::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 45c5f50..53dcc2e 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h @@ -41,7 +41,7 @@ class TQPoint; namespace Rosegarden { -class CompositionRect : public QRect +class CompositionRect : public TQRect { public: typedef TQValueVector<int> repeatmarks; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp index 1ff0263..6faf230 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp @@ -88,12 +88,12 @@ protected: CompositionView::CompositionView(RosegardenGUIDoc* doc, CompositionModel* model, - TQWidget * parent, const char * name, WFlags f) + TQWidget * tqparent, const char * name, WFlags f) #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) - : RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents), + : RosegardenScrollView(tqparent, name, f | WNoAutoErase | WStaticContents), #else : - RosegardenScrollView(parent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents), + RosegardenScrollView(tqparent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents), #endif m_model(model), m_currentItem(0), @@ -191,7 +191,7 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, } if (doc) { - doc->getAudioPreviewThread().setEmptyQueueListener(this); + doc->getAudioPreviewThread().setEmptyQueueListener(TQT_TQOBJECT(this)); } m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim); @@ -227,7 +227,7 @@ void CompositionView::slotUpdateSize() RulerScale *ruler = grid().getRulerScale(); - int minWidth = sizeHint().width(); + int minWidth = tqsizeHint().width(); int computedWidth = int(nearbyint(ruler->getTotalWidth())); int width = std::max(computedWidth, minWidth); @@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const TQString& toolName) if (m_tool) m_tool->ready(); else { - KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); + KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").tqarg(toolName)); } } @@ -495,7 +495,7 @@ void CompositionView::resizeEvent(TQResizeEvent* e) void CompositionView::viewportPaintEvent(TQPaintEvent* e) { - TQMemArray<TQRect> rects = e->region().rects(); + TQMemArray<TQRect> rects = TQRegion(e->region()).tqrects(); for (unsigned int i = 0; i < rects.size(); ++i) { viewportPaintRect(rects[i]); @@ -550,7 +550,7 @@ void CompositionView::viewportPaintRect(TQRect r) // DEBUG // TQPainter pdebug(viewport()); - // static TQPen framePen(Qt::red, 1); + // static TQPen framePen(TQt::red, 1); // pdebug.setPen(framePen); // pdebug.drawRect(updateRect); @@ -669,7 +669,7 @@ void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect) drawArea(&p, rect); // DEBUG - show what's updated - // TQPen framePen(Qt::red, 1); + // TQPen framePen(TQt::red, 1); // p.setPen(framePen); // p.drawRect(rect); @@ -682,7 +682,7 @@ void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect) // << rect << endl; TQPainter p; - p.begin(&m_artifactsDrawBuffer, viewport()); + p.tqbegin(&m_artifactsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); // TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); drawAreaArtifacts(&p, rect); @@ -929,7 +929,7 @@ void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect) // // Split line // - if (m_splitLinePos.x() > 0 && clipRect.contains(m_splitLinePos)) { + if (m_splitLinePos.x() > 0 && clipRect.tqcontains(m_splitLinePos)) { p->save(); p->setPen(m_guideColor); p->drawLine(m_splitLinePos.x(), m_splitLinePos.y(), @@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const // draw 'start' rectangle with original brush // - TQRect startRect = r; + TQRect startRect = static_cast<const TQRect&>(r); startRect.setWidth(repeatMarks[0] - r.x()); p->setBrush(r.getBrush()); drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill); @@ -984,7 +984,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const // now draw the 'repeat' marks // p->setPen(CompositionColourCache::getInstance()->RepeatSegmentBorder); - int penWidth = std::max(r.getPen().width(), 1u); + int penWidth = std::max((uint)r.getPen().width(), 1u); for (unsigned int i = 0; i < repeatMarks.size(); ++i) { int pos = repeatMarks[i]; @@ -1020,9 +1020,9 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, TQRect textRect(r); textRect.setX(textRect.x() + 3); TQString label = " " + r.getLabel() + " "; - TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + TQRect textBoundingRect = p->boundingRect(textRect, TQt::AlignLeft | TQt::AlignVCenter, label); p->drawRect(textBoundingRect & r); - p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + p->drawText(textRect, TQt::AlignLeft | TQt::AlignVCenter, label); p->restore(); } #else @@ -1036,7 +1036,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, font.setItalic(false); p->setFont(font); - TQRect labelRect = QRect + TQRect labelRect = TQRect (r.x(), r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1, r.width(), @@ -1074,7 +1074,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, labelRect.setY(wy); p->drawText(labelRect, - Qt::AlignLeft | Qt::AlignTop, + TQt::AlignLeft | TQt::AlignTop, r.getLabel()); } @@ -1084,7 +1084,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, p->setPen(GUIPalette::getColour (GUIPalette::SegmentLabel)); p->drawText(labelRect, - Qt::AlignLeft | Qt::AlignVCenter, r.getLabel()); + TQt::AlignLeft | TQt::AlignVCenter, r.getLabel()); p->restore(); } #endif @@ -1122,13 +1122,13 @@ void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clip // RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl; } } else { - p->setBrush(Qt::NoBrush); + p->setBrush(TQt::NoBrush); } // Paint using the small coordinates... TQRect intersection = rect.intersect(clipRect); - if (clipRect.contains(rect)) { + if (clipRect.tqcontains(rect)) { p->drawRect(rect); } else { // draw only what's necessary @@ -1199,7 +1199,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r break; for (; i != rects.end(); ++i) { - CompositionRect ri = testRect.intersect(*i); + CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i)); if (!ri.isEmpty()) { CompositionModel::rectcontainer::iterator t = std::find(intersections.begin(), intersections.end(), ri); @@ -1246,7 +1246,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r break; for (; i != intersections.end(); ++i) { - CompositionRect ri = testRect.intersect(*i); + CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i)); if (!ri.isEmpty() && ri != *i) { CompositionModel::rectcontainer::iterator t = std::find(intersections2.begin(), intersections2.end(), ri); @@ -1356,15 +1356,15 @@ void CompositionView::slotToolHelpChanged(const TQString &text) void CompositionView::contentsMousePressEvent(TQMouseEvent* e) { - Qt::ButtonState bs = e->state(); - slotSetSelectCopy((bs & Qt::ControlButton) != 0); - slotSetSelectAdd((bs & Qt::ShiftButton) != 0); - slotSetFineGrain((bs & Qt::ShiftButton) != 0); - slotSetPencilOverExisting((bs & Qt::AltButton + Qt::ControlButton) != 0); + TQt::ButtonState bs = e->state(); + slotSetSelectCopy((bs & TQt::ControlButton) != 0); + slotSetSelectAdd((bs & TQt::ShiftButton) != 0); + slotSetFineGrain((bs & TQt::ShiftButton) != 0); + slotSetPencilOverExisting((bs & TQt::AltButton + TQt::ControlButton) != 0); switch (e->button()) { - case LeftButton: - case MidButton: + case Qt::LeftButton: + case Qt::MidButton: startAutoScroll(); if (m_tool) @@ -1373,7 +1373,7 @@ void CompositionView::contentsMousePressEvent(TQMouseEvent* e) RG_DEBUG << "CompositionView::contentsMousePressEvent() :" << this << " no tool\n"; break; - case RightButton: + case Qt::RightButton: if (m_tool) m_tool->handleRightButtonPress(e); else @@ -1394,8 +1394,8 @@ void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e) if (!m_tool) return ; - if (e->button() == LeftButton || - e->button() == MidButton ) + if (e->button() == Qt::LeftButton || + e->button() == Qt::MidButton ) m_tool->handleMouseButtonRelease(e); } @@ -1434,9 +1434,9 @@ void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e) if (!m_tool) return ; - Qt::ButtonState bs = e->state(); - slotSetFineGrain((bs & Qt::ShiftButton) != 0); - slotSetPencilOverExisting((bs & Qt::AltButton) != 0); + TQt::ButtonState bs = e->state(); + slotSetFineGrain((bs & TQt::ShiftButton) != 0); + slotSetPencilOverExisting((bs & TQt::AltButton) != 0); int follow = m_tool->handleMouseMove(e); setScrollDirectionConstraint(follow); @@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout() { hideTextFloat(); slotArtifactsDrawBufferNeedsRefresh(); - // rgapp->slotSetStatusMessage(TQString::null); + // rgapp->slotSetStatusMessage(TQString()); } } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h index c31cf96..12c5fb4 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h @@ -64,9 +64,10 @@ class CompositionRect; class CompositionView : public RosegardenScrollView { Q_OBJECT + TQ_OBJECT public: CompositionView(RosegardenGUIDoc*, CompositionModel*, - TQWidget * parent=0, const char* name=0, WFlags f=0); + TQWidget * tqparent=0, const char* name=0, WFlags f=0); void setPointerPos(int pos); int getPointerPos() { return m_pointerPos; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp index f519c8a..3c4a7ae 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp @@ -50,7 +50,7 @@ SegmentEraser::SegmentEraser(CompositionView *c, RosegardenGUIDoc *d) void SegmentEraser::ready() { - m_canvas->viewport()->setCursor(Qt::pointingHandCursor); + m_canvas->viewport()->setCursor(TQt::pointingHandCursor); setBasicContextHelp(); } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h index 78165b9..e3bb6b5 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h @@ -43,6 +43,7 @@ class CompositionView; class SegmentEraser : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h index d1bb9a7..00d942e 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h @@ -44,7 +44,7 @@ class RulerScale; class SegmentItemPreview { public: - SegmentItemPreview(Segment& parent, + SegmentItemPreview(Segment& tqparent, RulerScale* scale); virtual ~SegmentItemPreview(); @@ -59,7 +59,7 @@ public: PreviewState getPreviewState() const { return m_previewState; } /** - * Sets whether the preview shape shown in the segment needs + * Sets whether the preview tqshape shown in the segment needs * to be refreshed */ void setPreviewCurrent(bool c) diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h index 946edee..f2fd935 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h @@ -43,6 +43,7 @@ class CompositionView; class SegmentJoiner : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp index bc621fe..e2970ab 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp @@ -62,7 +62,7 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d) void SegmentMover::ready() { - m_canvas->viewport()->setCursor(Qt::sizeAllCursor); + m_canvas->viewport()->setCursor(TQt::sizeAllCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(); @@ -328,8 +328,8 @@ int SegmentMover::handleMouseMove(TQMouseEvent *e) comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); TQString posString = TQString("%1.%2s (%3, %4, %5)") - .arg(time.sec).arg(ms) - .arg(bar + 1).arg(beat).arg(fraction); + .tqarg(time.sec).tqarg(ms) + .tqarg(bar + 1).tqarg(beat).tqarg(fraction); m_canvas->setTextFloat(guideX + 10, guideY - 30, posString); m_canvas->updateContents(); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h index 580fff0..882647e 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h @@ -44,6 +44,7 @@ class CompositionView; class SegmentMover : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp index 60a74f4..8f4399c 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp @@ -64,7 +64,7 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d) void SegmentPencil::ready() { - m_canvas->viewport()->setCursor(Qt::ibeamCursor); + m_canvas->viewport()->setCursor(TQt::ibeamCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelpFor(TQPoint(0, 0)); @@ -86,7 +86,7 @@ void SegmentPencil::slotCanvasScrolled(int newX, int newY) void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) return; // is user holding Ctrl+Alt? (ugly, but we are running short on available @@ -153,7 +153,7 @@ void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) return ; setContextHelpFor(e->pos()); @@ -196,9 +196,9 @@ void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) segment->setLowestPlayable(track->getLowestPlayable()); segment->setHighestPlayable(track->getHighestPlayable()); - std::string label = qstrtostr(track->getPresetLabel()); + std::string label = (track->getPresetLabel()); if (label != "") { - segment->setLabel(qstrtostr(track->getPresetLabel())); + segment->setLabel((track->getPresetLabel())); } CompositionItem item = CompositionItemHelper::makeCompositionItem(segment); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h index f283f15..894babf 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h @@ -47,6 +47,7 @@ class CompositionView; class SegmentPencil : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentSelector; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp index 99241f1..4c4c884 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp @@ -69,7 +69,7 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d, void SegmentResizer::ready() { - m_canvas->viewport()->setCursor(Qt::sizeHorCursor); + m_canvas->viewport()->setCursor(TQt::sizeHorCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(false); @@ -116,7 +116,7 @@ void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl; - bool rescale = (e->state() & Qt::ControlButton); + bool rescale = (e->state() & TQt::ControlButton); if (m_currentItem) { @@ -243,7 +243,7 @@ int SegmentResizer::handleMouseMove(TQMouseEvent *e) { // RG_DEBUG << "SegmentResizer::handleMouseMove" << endl; - bool rescale = (e->state() & Qt::ControlButton); + bool rescale = (e->state() & TQt::ControlButton); if (!m_currentItem) { setBasicContextHelp(rescale); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h index 7a0600d..809dc34 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h @@ -48,6 +48,7 @@ class CompositionView; class SegmentResizer : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentSelector; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp index d601c16..964bc3b 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp @@ -75,7 +75,7 @@ SegmentSelector::~SegmentSelector() void SegmentSelector::ready() { - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelp(i18n("Click and drag to select segments")); @@ -174,8 +174,8 @@ SegmentSelector::handleMouseButtonPress(TQMouseEvent *e) // Add on middle button or ctrl+left - bounding box on rest // - if (e->button() == MidButton || - (e->button() == LeftButton && (e->state() & Qt::ControlButton))) { + if (e->button() == Qt::MidButton || + (e->button() == Qt::LeftButton && (e->state() & TQ_ControlButton))) { m_dispatchTool = getToolBox()->getTool(SegmentPencil::ToolName); @@ -217,7 +217,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) if (m_dispatchTool) { m_dispatchTool->handleMouseButtonRelease(e); m_dispatchTool = 0; - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); return ; } @@ -232,7 +232,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) return ; } - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); Composition &comp = m_doc->getComposition(); @@ -313,7 +313,7 @@ int SegmentSelector::handleMouseMove(TQMouseEvent *e) { if (!m_buttonPressed) { - setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton)); + setContextHelpFor(e->pos(), (e->state() & TQt::ControlButton)); return RosegardenCanvasView::NoFollow; } @@ -352,7 +352,7 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e) return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } - m_canvas->viewport()->setCursor(Qt::sizeAllCursor); + m_canvas->viewport()->setCursor(TQt::sizeAllCursor); if (m_segmentCopyMode && !m_segmentQuickCopyDone) { KMacroCommand *mcommand = new KMacroCommand @@ -466,8 +466,8 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e) comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); TQString posString = TQString("%1.%2s (%3, %4, %5)") - .arg(time.sec).arg(ms) - .arg(bar + 1).arg(beat).arg(fraction); + .tqarg(time.sec).tqarg(ms) + .tqarg(bar + 1).tqarg(beat).tqarg(fraction); m_canvas->setTextFloat(guideX + 10, guideY - 30, posString); m_canvas->updateContents(); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h index 3c602fa..db572d0 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h @@ -44,6 +44,7 @@ class CompositionView; class SegmentSelector : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentTool; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp index 1149cd9..d5fe45a 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp @@ -59,7 +59,7 @@ SegmentSplitter::~SegmentSplitter() void SegmentSplitter::ready() { - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); setBasicContextHelp(); } @@ -71,7 +71,7 @@ SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e) CompositionItem item = m_canvas->getFirstItemAt(e->pos()); if (item) { - m_canvas->viewport()->setCursor(Qt::blankCursor); + m_canvas->viewport()->setCursor(TQt::blankCursor); m_prevX = item->rect().x(); m_prevX = item->rect().y(); drawSplitLine(e); @@ -106,7 +106,7 @@ SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e) } // Reinstate the cursor - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); m_canvas->slotHideSplitLine(); } @@ -118,12 +118,12 @@ SegmentSplitter::handleMouseMove(TQMouseEvent *e) CompositionItem item = m_canvas->getFirstItemAt(e->pos()); if (item) { -// m_canvas->viewport()->setCursor(Qt::blankCursor); +// m_canvas->viewport()->setCursor(TQt::blankCursor); drawSplitLine(e); delete item; return RosegardenCanvasView::FollowHorizontal; } else { - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); m_canvas->slotHideSplitLine(); return RosegardenCanvasView::NoFollow; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h index 3f21ece..a2fc1f6 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h @@ -45,6 +45,7 @@ class CompositionView; class SegmentSplitter : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp index 438cc51..b74cc9f 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp @@ -42,7 +42,7 @@ namespace Rosegarden { SegmentTool::SegmentTool(CompositionView* canvas, RosegardenGUIDoc *doc) - : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->parent())->factory(), canvas), + : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->tqparent())->factory(), TQT_TQOBJECT(canvas)), m_canvas(canvas), m_doc(doc), m_changeMade(false) @@ -54,7 +54,7 @@ SegmentTool::~SegmentTool() void SegmentTool::ready() { - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); } void @@ -86,12 +86,12 @@ SegmentTool::createMenu() RG_DEBUG << "SegmentTool::createMenu()\n"; RosegardenGUIApp *app = - dynamic_cast<RosegardenGUIApp*>(m_doc->parent()); + dynamic_cast<RosegardenGUIApp*>(m_doc->tqparent()); if (app) { m_menu = static_cast<TQPopupMenu*> //(app->factory()->container("segment_tool_menu", app)); - (m_parentFactory->container("segment_tool_menu", app)); + (m_tqparentFactory->container("segment_tool_menu", app)); if (!m_menu) { RG_DEBUG << "SegmentTool::createMenu() failed\n"; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h index 5b054a8..1b33ba3 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h @@ -64,7 +64,7 @@ public: virtual ~SegmentTool(); /** - * Is called by the parent View (EditView or SegmentCanvas) when + * Is called by the tqparent View (EditView or SegmentCanvas) when * the tool is set as current. * Add any setup here */ diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp index 5ce8a58..c0b4aeb 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp @@ -42,9 +42,9 @@ namespace Rosegarden { -SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc) - : BaseToolBox(parent), - m_canvas(parent), +SegmentToolBox::SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc* doc) + : BaseToolBox(tqparent), + m_canvas(tqparent), m_doc(doc) {} @@ -84,7 +84,7 @@ SegmentTool* SegmentToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h index 2609708..c975e53 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h @@ -43,8 +43,9 @@ class CompositionView; class SegmentToolBox : public BaseToolBox { Q_OBJECT + TQ_OBJECT public: - SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*); + SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc*); virtual SegmentTool* getTool(const TQString& toolName); diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h index 640b7b1..be9e7a1 100644 --- a/src/gui/editors/tempo/TempoListItem.h +++ b/src/gui/editors/tempo/TempoListItem.h @@ -42,12 +42,12 @@ public: Type type, timeT time, int index, - KListView *parent, + KListView *tqparent, TQString label1, TQString label2, TQString label3, - TQString label4 = TQString::null) : - KListViewItem(parent, label1, label2, label3, label4), + TQString label4 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4), m_composition(composition), m_type(type), m_time(time), diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp index c3bc23e..1184ac3 100644 --- a/src/gui/editors/tempo/TempoView.cpp +++ b/src/gui/editors/tempo/TempoView.cpp @@ -70,8 +70,8 @@ int TempoView::m_lastSetFilter = -1; -TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): - EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"), +TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT openTime): + EditViewBase(doc, std::vector<Segment *>(), 2, tqparent, "tempoview"), m_filter(Tempo | TimeSignature), m_ignoreUpdates(true) { @@ -86,7 +86,7 @@ TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): // define some note filtering buttons in a group // m_filterGroup = - new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); + new TQButtonGroup(1, Qt::Horizontal, i18n("Filter"), getCentralWidget()); m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup); m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup); @@ -218,7 +218,7 @@ TempoView::applyLayout(int /*staffNo*/) new TempoListItem(comp, TempoListItem::TimeSignature, sig.first, i, m_list, timeString, i18n("Time Signature "), - TQString("%1/%2 ").arg(sig.second.getNumerator()). + TQString("%1/%2 ").tqarg(sig.second.getNumerator()). arg(sig.second.getDenominator()), properties); } @@ -243,7 +243,7 @@ TempoView::applyLayout(int /*staffNo*/) if (sig.getBeatDuration() == Note(Note::Crotchet).getDuration()) { desc = i18n("%1.%2%3"). - arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths); + tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths); } else { float bpm = (qpm * Note(Note::Crotchet).getDuration()) / @@ -253,8 +253,8 @@ TempoView::applyLayout(int /*staffNo*/) int bpmHundredths = int((bpm - bpmUnits - bpmTenths / 10.0) * 100 + 0.001); desc = i18n("%1.%2%3 qpm (%4.%5%6 bpm) "). - arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths). - arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths); + tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths). + tqarg(bpmUnits).tqarg(bpmTenths).tqarg(bpmHundredths); } TQString timeString = makeTimeString(tempo.first, timeMode); @@ -342,7 +342,7 @@ TempoView::getCurrentSegment() return *m_segments.begin(); } -QString +TQString TempoView::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -354,27 +354,27 @@ TempoView::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } @@ -578,36 +578,36 @@ TempoView::setupActions() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); - new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this, + new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsertTempo()), actionCollection(), "insert_tempo"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); icon = TQIconSet(pixmap); - new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this, + new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(), "insert_timesig"); pixmap.load(pixmapDir + "/toolbar/event-delete.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Delete"), icon, Key_Delete, this, + new KAction(i18n("&Delete"), icon, Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Edit Item"), icon, Key_E, this, + new KAction(i18n("&Edit Item"), icon, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEdit()), actionCollection(), "edit"); - new KAction(i18n("Select &All"), 0, this, + new KAction(i18n("Select &All"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); @@ -619,7 +619,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-musical.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -629,7 +629,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -639,7 +639,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -660,7 +660,7 @@ TempoView::initStatusBar() AlignLeft | AlignVCenter); } -QSize +TQSize TempoView::getViewSize() { return m_list->size(); @@ -692,7 +692,7 @@ TempoView::slotSaveOptions() void TempoView::slotModifyFilter(int button) { - TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); if (checkBox == 0) return ; @@ -832,7 +832,7 @@ void TempoView::updateViewCaption() { setCaption(i18n("%1 - Tempo and Time Signature Editor") - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } } diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h index fcf3efb..b715d24 100644 --- a/src/gui/editors/tempo/TempoView.h +++ b/src/gui/editors/tempo/TempoView.h @@ -62,6 +62,7 @@ class Composition; class TempoView : public EditViewBase, public CompositionObserver { Q_OBJECT + TQ_OBJECT enum Filter { @@ -71,7 +72,7 @@ class TempoView : public EditViewBase, public CompositionObserver }; public: - TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT); + TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT); virtual ~TempoView(); virtual bool applyLayout(int staffNo = -1); |