From 458efa7b0c935cbaafa2791021a5f8f7241aa876 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 May 2011 22:38:52 +0000 Subject: Initial TQt4 port of Rosegarden This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/editors/notation/NoteInserter.cpp | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/gui/editors/notation/NoteInserter.cpp') 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 { -- cgit v1.2.1