summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers/ControllerEventsRuler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/rulers/ControllerEventsRuler.cpp')
-rw-r--r--src/gui/rulers/ControllerEventsRuler.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/gui/rulers/ControllerEventsRuler.cpp b/src/gui/rulers/ControllerEventsRuler.cpp
index 265a701..3cb6788 100644
--- a/src/gui/rulers/ControllerEventsRuler.cpp
+++ b/src/gui/rulers/ControllerEventsRuler.cpp
@@ -44,12 +44,12 @@
#include "gui/general/EditViewBase.h"
#include "gui/widgets/TextFloat.h"
#include <klineeditdlg.h>
-#include <qcanvas.h>
-#include <qcolor.h>
-#include <qpoint.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qwidget.h>
+#include <tqcanvas.h>
+#include <tqcolor.h>
+#include <tqpoint.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
+#include <tqwidget.h>
namespace Rosegarden
@@ -58,13 +58,13 @@ namespace Rosegarden
ControllerEventsRuler::ControllerEventsRuler(Segment *segment,
RulerScale* rulerScale,
EditViewBase* parentView,
- QCanvas* c,
- QWidget* parent,
+ TQCanvas* c,
+ TQWidget* parent,
const ControlParameter *controller,
const char* name, WFlags f)
: ControlRuler(segment, rulerScale, parentView, c, parent, name, f),
m_defaultItemWidth(20),
- m_controlLine(new QCanvasLine(canvas())),
+ m_controlLine(new TQCanvasLine(canvas())),
m_controlLineShowing(false),
m_controlLineX(0),
m_controlLineY(0)
@@ -142,36 +142,36 @@ ControllerEventsRuler::drawBackground()
{
// Draw some minimum and maximum controller value guide lines
//
- QCanvasLine *topLine = new QCanvasLine(canvas());
- QCanvasLine *topQLine = new QCanvasLine(canvas());
- QCanvasLine *midLine = new QCanvasLine(canvas());
- QCanvasLine *botQLine = new QCanvasLine(canvas());
- QCanvasLine *bottomLine = new QCanvasLine(canvas());
+ TQCanvasLine *topLine = new TQCanvasLine(canvas());
+ TQCanvasLine *topQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *midLine = new TQCanvasLine(canvas());
+ TQCanvasLine *botQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *bottomLine = new TQCanvasLine(canvas());
//m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY);
int cHeight = canvas()->height();
int cWidth = canvas()->width();
- topLine->setPen(QColor(127, 127, 127));
+ topLine->setPen(TQColor(127, 127, 127));
topLine->setPoints(0, 0, cWidth, 0);
topLine->setZ( -10);
topLine->show();
- topQLine->setPen(QColor(192, 192, 192));
+ topQLine->setPen(TQColor(192, 192, 192));
topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4);
topQLine->setZ( -10);
topQLine->show();
- midLine->setPen(QColor(127, 127, 127));
+ midLine->setPen(TQColor(127, 127, 127));
midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2);
midLine->setZ( -10);
midLine->show();
- botQLine->setPen(QColor(192, 192, 192));
+ botQLine->setPen(TQColor(192, 192, 192));
botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4);
botQLine->setZ( -10);
botQLine->show();
- bottomLine->setPen(QColor(127, 127, 127));
+ bottomLine->setPen(TQColor(127, 127, 127));
bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1);
bottomLine->setZ( -10);
bottomLine->show();
@@ -182,16 +182,16 @@ ControllerEventsRuler::drawBackground()
ControllerEventsRuler::~ControllerEventsRuler()
{}
-QString ControllerEventsRuler::getName()
+TQString ControllerEventsRuler::getName()
{
if (m_controller) {
- QString name = i18n("Unsupported Event Type");
+ TQString name = i18n("Unsupported Event Type");
if (m_controller->getType() == Controller::EventType) {
- QString hexValue;
+ TQString hexValue;
hexValue.sprintf("0x%x", m_controller->getControllerValue());
- name = QString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName()))
+ name = TQString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName()))
.arg(int(m_controller->getControllerValue()))
.arg(hexValue);
} else if (m_controller->getType() == PitchBend::EventType) {
@@ -240,9 +240,9 @@ void ControllerEventsRuler::eventRemoved(const Segment*, Event *e)
clearSelectedItems();
- QCanvasItemList allItems = canvas()->allItems();
+ TQCanvasItemList allItems = canvas()->allItems();
- for (QCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) {
+ for (TQCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) {
if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) {
ControllerEventAdapter * adapter = dynamic_cast<ControllerEventAdapter*>(item->getElementAdapter());
if (adapter->getEvent() == e) {
@@ -274,8 +274,8 @@ void ControllerEventsRuler::insertControllerEvent()
number = m_controller->getControllerValue();
} else {
bool ok = false;
- QIntValidator intValidator(0, 128, this);
- QString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0",
+ TQIntValidator intValidator(0, 128, this);
+ TQString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0",
&ok, this, &intValidator);
if (ok)
number = res.toULong();
@@ -339,7 +339,7 @@ void ControllerEventsRuler::startControlLine()
this->setCursor(Qt::pointingHandCursor);
}
-void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e)
+void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e)
{
if (!m_controlLineShowing) {
if (e->button() == MidButton)
@@ -360,7 +360,7 @@ void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e)
}
if (e->button() == LeftButton) {
- QPoint p = inverseMapPoint(e->pos());
+ TQPoint p = inverseMapPoint(e->pos());
m_controlLine->show();
m_controlLineX = p.x();
@@ -370,7 +370,7 @@ void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e)
}
}
-void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e)
+void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if (!m_controlLineShowing) {
if (e->button() == MidButton)
@@ -380,7 +380,7 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e)
return ;
} else {
- QPoint p = inverseMapPoint(e->pos());
+ TQPoint p = inverseMapPoint(e->pos());
timeT startTime = m_rulerScale->getTimeForX(m_controlLineX);
timeT endTime = m_rulerScale->getTimeForX(p.x());
@@ -404,7 +404,7 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e)
}
}
-void ControllerEventsRuler::contentsMouseMoveEvent(QMouseEvent *e)
+void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e)
{
if (!m_controlLineShowing) {
// Don't send super if we're using the middle button
@@ -418,7 +418,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(QMouseEvent *e)
return ;
}
- QPoint p = inverseMapPoint(e->pos());
+ TQPoint p = inverseMapPoint(e->pos());
m_controlLine->setPoints(m_controlLineX, m_controlLineY, p.x(), p.y());
canvas()->update();