diff options
Diffstat (limited to 'src/gui/rulers/ControllerEventsRuler.cpp')
-rw-r--r-- | src/gui/rulers/ControllerEventsRuler.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/gui/rulers/ControllerEventsRuler.cpp b/src/gui/rulers/ControllerEventsRuler.cpp index 3cb6788..6fe95e6 100644 --- a/src/gui/rulers/ControllerEventsRuler.cpp +++ b/src/gui/rulers/ControllerEventsRuler.cpp @@ -57,12 +57,12 @@ namespace Rosegarden ControllerEventsRuler::ControllerEventsRuler(Segment *segment, RulerScale* rulerScale, - EditViewBase* parentView, + EditViewBase* tqparentView, TQCanvas* c, - TQWidget* parent, + TQWidget* tqparent, const ControlParameter *controller, const char* name, WFlags f) - : ControlRuler(segment, rulerScale, parentView, c, parent, name, f), + : ControlRuler(segment, rulerScale, tqparentView, c, tqparent, name, f), m_defaultItemWidth(20), m_controlLine(new TQCanvasLine(canvas())), m_controlLineShowing(false), @@ -143,9 +143,9 @@ ControllerEventsRuler::drawBackground() // Draw some minimum and maximum controller value guide lines // TQCanvasLine *topLine = new TQCanvasLine(canvas()); - TQCanvasLine *topQLine = new TQCanvasLine(canvas()); + TQCanvasLine *topTQLine = new TQCanvasLine(canvas()); TQCanvasLine *midLine = new TQCanvasLine(canvas()); - TQCanvasLine *botQLine = new TQCanvasLine(canvas()); + TQCanvasLine *botTQLine = new TQCanvasLine(canvas()); TQCanvasLine *bottomLine = new TQCanvasLine(canvas()); //m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY); int cHeight = canvas()->height(); @@ -156,20 +156,20 @@ ControllerEventsRuler::drawBackground() topLine->setZ( -10); topLine->show(); - topQLine->setPen(TQColor(192, 192, 192)); - topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); - topQLine->setZ( -10); - topQLine->show(); + topTQLine->setPen(TQColor(192, 192, 192)); + topTQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); + topTQLine->setZ( -10); + topTQLine->show(); midLine->setPen(TQColor(127, 127, 127)); midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2); midLine->setZ( -10); midLine->show(); - botQLine->setPen(TQColor(192, 192, 192)); - botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); - botQLine->setZ( -10); - botQLine->show(); + botTQLine->setPen(TQColor(192, 192, 192)); + botTQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); + botTQLine->setZ( -10); + botTQLine->show(); bottomLine->setPen(TQColor(127, 127, 127)); bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1); @@ -191,9 +191,9 @@ TQString ControllerEventsRuler::getName() TQString hexValue; hexValue.sprintf("0x%x", m_controller->getControllerValue()); - name = TQString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName())) - .arg(int(m_controller->getControllerValue())) - .arg(hexValue); + name = TQString("%1 (%2 / %3)").tqarg(strtoqstr(m_controller->getName())) + .tqarg(int(m_controller->getControllerValue())) + .tqarg(hexValue); } else if (m_controller->getType() == PitchBend::EventType) { name = i18n("Pitch Bend"); } @@ -274,7 +274,7 @@ void ControllerEventsRuler::insertControllerEvent() number = m_controller->getControllerValue(); } else { bool ok = false; - TQIntValidator intValidator(0, 128, this); + TQIntValidator intValidator(0, 128, TQT_TQOBJECT(this)); TQString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0", &ok, this, &intValidator); if (ok) @@ -286,7 +286,7 @@ void ControllerEventsRuler::insertControllerEvent() insertTime, number, initialValue, *m_segment); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); } void ControllerEventsRuler::eraseControllerEvent() @@ -298,7 +298,7 @@ void ControllerEventsRuler::eraseControllerEvent() *m_segment, m_eventSelection->getStartTime(), m_eventSelection->getEndTime()); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); updateSelection(); } @@ -329,20 +329,20 @@ void ControllerEventsRuler::clearControllerEvents() } EraseCommand *command = new EraseCommand(*es); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); } void ControllerEventsRuler::startControlLine() { m_controlLineShowing = true; - this->setCursor(Qt::pointingHandCursor); + this->setCursor(TQt::pointingHandCursor); } void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) m_lastEventPos = inverseMapPoint(e->pos()); ControlRuler::contentsMousePressEvent(e); // send super @@ -351,15 +351,15 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) } // cancel control line mode - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { m_controlLineShowing = false; m_controlLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); return ; } - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { TQPoint p = inverseMapPoint(e->pos()); m_controlLine->show(); @@ -373,7 +373,7 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) insertControllerEvent(); ControlRuler::contentsMouseReleaseEvent(e); // send super @@ -395,11 +395,11 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e) << ", endValue = " << endValue << endl; - drawControlLine(startTime, endTime, startValue, endValue); + tqdrawControlLine(startTime, endTime, startValue, endValue); m_controlLineShowing = false; m_controlLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); canvas()->update(); } } @@ -409,7 +409,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e) if (!m_controlLineShowing) { // Don't send super if we're using the middle button // - if (e->button() == MidButton) { + if (e->button() == Qt::MidButton) { m_lastEventPos = inverseMapPoint(e->pos()); return ; } @@ -425,7 +425,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e) } -void ControllerEventsRuler::layoutItem(ControlItem* item) +void ControllerEventsRuler::tqlayoutItem(ControlItem* item) { timeT itemTime = item->getElementAdapter()->getTime(); @@ -440,12 +440,12 @@ void ControllerEventsRuler::layoutItem(ControlItem* item) item->setWidth(width); - //RG_DEBUG << "ControllerEventsRuler::layoutItem ControlItem x = " << x + //RG_DEBUG << "ControllerEventsRuler::tqlayoutItem ControlItem x = " << x //<< " - width = " << width << endl; } void -ControllerEventsRuler::drawControlLine(timeT startTime, +ControllerEventsRuler::tqdrawControlLine(timeT startTime, timeT endTime, int startValue, int endValue) @@ -493,7 +493,7 @@ ControllerEventsRuler::drawControlLine(timeT startTime, time += quantDur; } - m_parentEditView->addCommandToHistory(macro); + m_tqparentEditView->addCommandToHistory(macro); } } |