From 11f31c37e5fa4889d9989f10272f44845449cb7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 6 Sep 2010 20:59:29 +0000 Subject: Initial TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/rulers/ChordNameRuler.cpp | 52 ++++---- src/gui/rulers/ChordNameRuler.h | 26 ++-- src/gui/rulers/ControlChangeCommand.cpp | 4 +- src/gui/rulers/ControlChangeCommand.h | 6 +- src/gui/rulers/ControlItem.cpp | 32 ++--- src/gui/rulers/ControlItem.h | 12 +- src/gui/rulers/ControlRuler.cpp | 102 +++++++-------- src/gui/rulers/ControlRuler.h | 62 ++++----- src/gui/rulers/ControlRulerEventEraseCommand.cpp | 4 +- src/gui/rulers/ControlRulerEventEraseCommand.h | 6 +- src/gui/rulers/ControlSelector.cpp | 12 +- src/gui/rulers/ControlSelector.h | 10 +- src/gui/rulers/ControllerEventsRuler.cpp | 66 +++++----- src/gui/rulers/ControllerEventsRuler.h | 24 ++-- src/gui/rulers/DefaultVelocityColour.cpp | 2 +- src/gui/rulers/LoopRuler.cpp | 50 +++---- src/gui/rulers/LoopRuler.h | 36 +++--- src/gui/rulers/MarkerRuler.cpp | 108 ++++++++-------- src/gui/rulers/MarkerRuler.h | 32 ++--- src/gui/rulers/PercussionPitchRuler.cpp | 52 ++++---- src/gui/rulers/PercussionPitchRuler.h | 36 +++--- src/gui/rulers/PitchRuler.cpp | 12 +- src/gui/rulers/PitchRuler.h | 10 +- src/gui/rulers/PropertyBox.cpp | 22 ++-- src/gui/rulers/PropertyBox.h | 20 +-- src/gui/rulers/PropertyControlRuler.cpp | 64 ++++----- src/gui/rulers/PropertyControlRuler.h | 28 ++-- src/gui/rulers/PropertyViewRuler.cpp | 36 +++--- src/gui/rulers/PropertyViewRuler.h | 26 ++-- src/gui/rulers/RawNoteRuler.cpp | 44 +++---- src/gui/rulers/RawNoteRuler.h | 18 +-- src/gui/rulers/StandardRuler.cpp | 88 ++++++------- src/gui/rulers/StandardRuler.h | 10 +- src/gui/rulers/TempoColour.cpp | 6 +- src/gui/rulers/TempoColour.h | 6 +- src/gui/rulers/TempoRuler.cpp | 158 +++++++++++------------ src/gui/rulers/TempoRuler.h | 52 ++++---- src/gui/rulers/TextRuler.cpp | 28 ++-- src/gui/rulers/TextRuler.h | 22 ++-- src/gui/rulers/VelocityColour.cpp | 12 +- src/gui/rulers/VelocityColour.h | 24 ++-- 41 files changed, 710 insertions(+), 710 deletions(-) (limited to 'src/gui/rulers') diff --git a/src/gui/rulers/ChordNameRuler.cpp b/src/gui/rulers/ChordNameRuler.cpp index 2fc98f2..001d5fd 100644 --- a/src/gui/rulers/ChordNameRuler.cpp +++ b/src/gui/rulers/ChordNameRuler.cpp @@ -45,14 +45,14 @@ #include "document/RosegardenGUIDoc.h" #include "document/MultiViewCommandHistory.h" #include "gui/general/GUIPalette.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -62,9 +62,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, RosegardenGUIDoc *doc, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -85,15 +85,15 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, m_boldFont.setPointSize(11); m_boldFont.setPixelSize(12); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground)); m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId(); - QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - QToolTip::add + TQToolTip::add (this, i18n("Chord name ruler.\nTurn it on and off from the Settings->Rulers menu.")); } @@ -103,9 +103,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, std::vector &segments, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -126,13 +126,13 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, m_boldFont.setPointSize(11); m_boldFont.setPixelSize(12); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground)); m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId(); - QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); for (std::vector::iterator i = segments.begin(); i != segments.end(); ++i) { @@ -198,7 +198,7 @@ ChordNameRuler::sizeHint() const NOTATION_DEBUG << "Returning chord-label ruler width as " << width << endl; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -207,7 +207,7 @@ QSize ChordNameRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -407,7 +407,7 @@ ChordNameRuler::recalculate(timeT from, timeT to) } void -ChordNameRuler::paintEvent(QPaintEvent* e) +ChordNameRuler::paintEvent(TQPaintEvent* e) { if (!m_composition || !m_ready) return ; @@ -416,13 +416,13 @@ ChordNameRuler::paintEvent(QPaintEvent* e) Profiler profiler1("ChordNameRuler::paintEvent (whole)"); - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::ChordNameRulerForeground)); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - m_xorigin - 50); @@ -436,7 +436,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e) Profiler profiler2("ChordNameRuler::paintEvent (paint)"); - QRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM"); + TQRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM"); int fontHeight = boundsForHeight.height(); int textY = (height() - 6) / 2 + fontHeight / 2; @@ -475,7 +475,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e) (*i)->set (TEXT_FORMAL_X, (long)x); - QRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text)); + TQRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text)); int width = textBounds.width(); x -= width / 2; diff --git a/src/gui/rulers/ChordNameRuler.h b/src/gui/rulers/ChordNameRuler.h index 70cdc12..988b1f4 100644 --- a/src/gui/rulers/ChordNameRuler.h +++ b/src/gui/rulers/ChordNameRuler.h @@ -28,15 +28,15 @@ #include "base/PropertyName.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include "base/Event.h" -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -69,7 +69,7 @@ public: RosegardenGUIDoc *doc, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); /** @@ -83,7 +83,7 @@ public: std::vector &segments, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~ChordNameRuler(); @@ -97,8 +97,8 @@ public: // may have one of these (to avoid using percussion tracks in chords): void setStudio(Studio *studio); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -106,7 +106,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: void recalculate(timeT from = 0, @@ -132,9 +132,9 @@ private: Segment *m_chordSegment; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; const PropertyName TEXT_FORMAL_X; const PropertyName TEXT_ACTUAL_X; diff --git a/src/gui/rulers/ControlChangeCommand.cpp b/src/gui/rulers/ControlChangeCommand.cpp index f6f5d0e..6d90d0d 100644 --- a/src/gui/rulers/ControlChangeCommand.cpp +++ b/src/gui/rulers/ControlChangeCommand.cpp @@ -29,7 +29,7 @@ namespace Rosegarden { -ControlChangeCommand::ControlChangeCommand(QCanvasItemList selectedItems, +ControlChangeCommand::ControlChangeCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end) : BasicCommand(i18n("Control Change"), segment, start, end, true), @@ -41,7 +41,7 @@ ControlChangeCommand::ControlChangeCommand(QCanvasItemList selectedItems, void ControlChangeCommand::modifySegment() { - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) item->updateValue(); } diff --git a/src/gui/rulers/ControlChangeCommand.h b/src/gui/rulers/ControlChangeCommand.h index cc334a4..b091f6c 100644 --- a/src/gui/rulers/ControlChangeCommand.h +++ b/src/gui/rulers/ControlChangeCommand.h @@ -26,7 +26,7 @@ #define _RG_CONTROLCHANGECOMMAND_H_ #include "document/BasicCommand.h" -#include +#include namespace Rosegarden { @@ -37,7 +37,7 @@ class ControlChangeCommand : public BasicCommand { public: - ControlChangeCommand(QCanvasItemList selectedItems, + ControlChangeCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end); virtual ~ControlChangeCommand() {;} @@ -47,7 +47,7 @@ protected: virtual void modifySegment(); - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; }; } diff --git a/src/gui/rulers/ControlItem.cpp b/src/gui/rulers/ControlItem.cpp index 623fbf3..8eb17ed 100644 --- a/src/gui/rulers/ControlItem.cpp +++ b/src/gui/rulers/ControlItem.cpp @@ -35,7 +35,7 @@ static int _canvasItemZ = 30; ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter, int xx, int width) - : QCanvasRectangle(ruler->canvas()), + : TQCanvasRectangle(ruler->canvas()), m_value(0), m_controlRuler(ruler), m_elementAdapter(elementAdapter) @@ -44,7 +44,7 @@ ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter, width = DefaultWidth/4; // avoid invisible zero-duration items } setWidth(width); - setPen(QPen(Qt::black, BorderThickness)); + setPen(TQPen(Qt::black, BorderThickness)); setBrush(Qt::blue); setX(xx); @@ -85,7 +85,7 @@ void ControlItem::updateFromValue() } } -typedef std::pair ItemPair; +typedef std::pair ItemPair; struct ItemCmp { bool operator()(const ItemPair &i1, const ItemPair &i2) @@ -94,14 +94,14 @@ struct ItemCmp } }; -void ControlItem::draw(QPainter &painter) +void ControlItem::draw(TQPainter &painter) { if (!isEnabled()) updateFromValue(); setBrush(m_controlRuler->valueToColour(m_controlRuler->getMaxItemValue(), m_value)); - QCanvasRectangle::draw(painter); + TQCanvasRectangle::draw(painter); /* @@ -111,16 +111,16 @@ void ControlItem::draw(QPainter &painter) // calculate collisions and assign Z values accordingly // - QCanvasItemList l = collisions(false); + TQCanvasItemList l = collisions(false); std::vector sortList; - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) continue; + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; - if (QCanvasRectangle *rect = dynamic_cast(*it)) + if (TQCanvasRectangle *rect = dynamic_cast(*it)) sortList.push_back(ItemPair(rect->height(), *it)); } @@ -144,19 +144,19 @@ void ControlItem::draw(QPainter &painter) } -void ControlItem::handleMouseButtonPress(QMouseEvent*) +void ControlItem::handleMouseButtonPress(TQMouseEvent*) { // RG_DEBUG << "ControlItem::handleMouseButtonPress()" << this << endl; setEnabled(true); } -void ControlItem::handleMouseButtonRelease(QMouseEvent*) +void ControlItem::handleMouseButtonRelease(TQMouseEvent*) { // RG_DEBUG << "ControlItem::handleMouseButtonRelease()" << this << endl; setEnabled(false); } -void ControlItem::handleMouseMove(QMouseEvent*, int /*deltaX*/, int deltaY) +void ControlItem::handleMouseMove(TQMouseEvent*, int /*deltaX*/, int deltaY) { // RG_DEBUG << "ControlItem::handleMouseMove()" << this << endl; @@ -177,17 +177,17 @@ void ControlItem::handleMouseMove(QMouseEvent*, int /*deltaX*/, int deltaY) setValue(m_controlRuler->heightToValue(getHeight())); } -void ControlItem::handleMouseWheel(QWheelEvent *) +void ControlItem::handleMouseWheel(TQWheelEvent *) { // RG_DEBUG << "ControlItem::handleMouseWheel - got wheel event" << endl; } void ControlItem::setSelected(bool s) { - QCanvasItem::setSelected(s); + TQCanvasItem::setSelected(s); - if (s) setPen(QPen(Qt::red, BorderThickness)); - else setPen(QPen(Qt::black, BorderThickness)); + if (s) setPen(TQPen(Qt::red, BorderThickness)); + else setPen(TQPen(Qt::black, BorderThickness)); canvas()->update(); } diff --git a/src/gui/rulers/ControlItem.h b/src/gui/rulers/ControlItem.h index 44f9e22..e90a06d 100644 --- a/src/gui/rulers/ControlItem.h +++ b/src/gui/rulers/ControlItem.h @@ -22,7 +22,7 @@ COPYING included with this distribution for more information. */ -#include +#include namespace Rosegarden { @@ -45,12 +45,12 @@ public: void setHeight(int h) { setSize(width(), h); } int getHeight() { return size().height(); } - virtual void draw(QPainter &painter); + virtual void draw(TQPainter &painter); - virtual void handleMouseButtonPress(QMouseEvent *e); - virtual void handleMouseButtonRelease(QMouseEvent *e); - virtual void handleMouseMove(QMouseEvent *e, int deltaX, int deltaY); - virtual void handleMouseWheel(QWheelEvent *e); + virtual void handleMouseButtonPress(TQMouseEvent *e); + virtual void handleMouseButtonRelease(TQMouseEvent *e); + virtual void handleMouseMove(TQMouseEvent *e, int deltaX, int deltaY); + virtual void handleMouseWheel(TQWheelEvent *e); virtual void setSelected(bool yes); diff --git a/src/gui/rulers/ControlRuler.cpp b/src/gui/rulers/ControlRuler.cpp index 12064f5..7fea1fc 100644 --- a/src/gui/rulers/ControlRuler.cpp +++ b/src/gui/rulers/ControlRuler.cpp @@ -40,15 +40,15 @@ #include "gui/general/RosegardenCanvasView.h" #include "gui/widgets/TextFloat.h" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -63,7 +63,7 @@ const int ControlRuler::ItemHeightRange = 64; ControlRuler::ControlRuler(Segment *segment, RulerScale* rulerScale, EditViewBase* parentView, - QCanvas* c, QWidget* parent, + TQCanvas* c, TQWidget* parent, const char* name, WFlags f) : RosegardenCanvasView(c, parent, name, f), m_parentEditView(parentView), @@ -79,17 +79,17 @@ ControlRuler::ControlRuler(Segment *segment, m_itemMoved(false), m_selecting(false), m_selector(new ControlSelector(this)), - m_selectionRect(new QCanvasRectangle(canvas())), + m_selectionRect(new TQCanvasRectangle(canvas())), m_menu(0) { - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); m_selectionRect->setPen(Qt::red); setFixedHeight(sizeHint().height()); - connect(this, SIGNAL(stateChange(const QString&, bool)), - m_parentEditView, SLOT(slotStateChanged(const QString&, bool))); + connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)), + m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool))); m_numberFloat = new TextFloat(this); m_numberFloat->hide(); @@ -120,9 +120,9 @@ void ControlRuler::slotUpdateElementsHPos() { computeStaffOffset(); - QCanvasItemList list = canvas()->allItems(); + TQCanvasItemList list = canvas()->allItems(); - QCanvasItemList::Iterator it = list.begin(); + TQCanvasItemList::Iterator it = list.begin(); for (; it != list.end(); ++it) { ControlItem* item = dynamic_cast(*it); if (!item) @@ -162,7 +162,7 @@ ControlRuler::segmentDeleted(const Segment *) m_segment = 0; } -void ControlRuler::contentsMousePressEvent(QMouseEvent* e) +void ControlRuler::contentsMousePressEvent(TQMouseEvent* e) { if (e->button() != Qt::LeftButton) { m_numberFloat->hide(); @@ -172,9 +172,9 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) RG_DEBUG << "ControlRuler::contentsMousePressEvent()\n"; - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); - QCanvasItemList l = canvas()->collisions(p); + TQCanvasItemList l = canvas()->collisions(p); if (l.count() == 0) { // de-select current item clearSelectedItems(); @@ -186,12 +186,12 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) // clear selection unless control was pressed, in which case // add the event to the current selection - if (!(e->state() && QMouseEvent::ControlButton)) { + if (!(e->state() && TQMouseEvent::ControlButton)) { clearSelectedItems(); } ControlItem *topItem = 0; - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { @@ -205,7 +205,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) item->handleMouseButtonPress(e); - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *selectedItem = dynamic_cast(*it)) { @@ -216,7 +216,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) } else { // select it - if (!(e->state() && QMouseEvent::ControlButton)) { + if (!(e->state() && TQMouseEvent::ControlButton)) { if (item->z() > topItem->z()) topItem = item; @@ -243,7 +243,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) m_lastEventPos = p; } -void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) +void ControlRuler::contentsMouseReleaseEvent(TQMouseEvent* e) { if (e->button() != Qt::LeftButton) { m_numberFloat->hide(); @@ -259,7 +259,7 @@ void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) return ; } - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { ElementAdapter * adapter = item->getElementAdapter(); @@ -289,9 +289,9 @@ void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) m_numberFloat->hide(); } -void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) +void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); int deltaX = p.x() - m_lastEventPos.x(), deltaY = p.y() - m_lastEventPos.y(); @@ -308,7 +308,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) // Borrowed from Rotary - compute total position within window // - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); int scrollX = dynamic_cast(m_parentEditView)->getRawCanvasView()-> horizontalScrollBar()->value(); @@ -327,7 +327,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) int value = 0; - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { item->handleMouseMove(e, deltaX, deltaY); // ElementAdapter* adapter = item->getElementAdapter(); @@ -335,7 +335,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) // set value to highest in selection if (item->getValue() >= value) { value = item->getValue(); - m_numberFloat->setText(QString("%1").arg(value)); + m_numberFloat->setText(TQString("%1").arg(value)); } } } @@ -346,10 +346,10 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) } void -ControlRuler::contentsWheelEvent(QWheelEvent *e) +ControlRuler::contentsWheelEvent(TQWheelEvent *e) { // not sure what to do yet - QCanvasView::contentsWheelEvent(e); + TQCanvasView::contentsWheelEvent(e); } void ControlRuler::updateSelection() @@ -358,9 +358,9 @@ void ControlRuler::updateSelection() bool haveSelectedItems = false; - QCanvasItemList l = getSelectionRectangle()->collisions(true); + TQCanvasItemList l = getSelectionRectangle()->collisions(true); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { item->setSelected(true); @@ -375,7 +375,7 @@ void ControlRuler::updateSelection() emit stateChange("have_controller_item_selected", haveSelectedItems); } -void ControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) +void ControlRuler::contentsContextMenuEvent(TQContextMenuEvent* e) { if (!m_menu && !m_menuName.isEmpty()) createMenu(); @@ -383,7 +383,7 @@ void ControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) if (m_menu) { RG_DEBUG << "ControlRuler::showMenu() - show menu with" << m_menu->count() << " items\n"; m_lastEventPos = inverseMapPoint(e->pos()); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } else RG_DEBUG << "ControlRuler::showMenu() : no menu to show\n"; @@ -396,7 +396,7 @@ void ControlRuler::createMenu() KMainWindow* parentMainWindow = dynamic_cast(topLevelWidget()); if (parentMainWindow && parentMainWindow->factory()) { - m_menu = static_cast(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); + m_menu = static_cast(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); if (!m_menu) { RG_DEBUG << "ControlRuler::createMenu() failed\n"; @@ -409,7 +409,7 @@ void ControlRuler::createMenu() void ControlRuler::clearSelectedItems() { - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { (*it)->setSelected(false); } m_selectedItems.clear(); @@ -420,9 +420,9 @@ ControlRuler::clearSelectedItems() void ControlRuler::clear() { - 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(*it)) { delete item; } @@ -451,7 +451,7 @@ long ControlRuler::heightToValue(int h) return val; } -QColor ControlRuler::valueToColour(int max, int val) +TQColor ControlRuler::valueToColour(int max, int val) { int maxDefault = DefaultVelocityColour::getInstance()->getMaxValue(); @@ -476,11 +476,11 @@ void ControlRuler::flipForwards() { std::pair minMax = getZMinMax(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; // match min @@ -497,11 +497,11 @@ void ControlRuler::flipBackwards() { std::pair minMax = getZMinMax(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; // match min @@ -516,12 +516,12 @@ void ControlRuler::flipBackwards() std::pair ControlRuler::getZMinMax() { - QCanvasItemList l = canvas()->allItems(); + TQCanvasItemList l = canvas()->allItems(); std::vector zList; - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) continue; + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; zList.push_back(int((*it)->z())); } @@ -530,7 +530,7 @@ std::pair ControlRuler::getZMinMax() return std::pair(zList[0], zList[zList.size() - 1]); } -QScrollBar* ControlRuler::getMainHorizontalScrollBar() +TQScrollBar* ControlRuler::getMainHorizontalScrollBar() { return m_mainHorizontalScrollBar ? m_mainHorizontalScrollBar : horizontalScrollBar(); } diff --git a/src/gui/rulers/ControlRuler.h b/src/gui/rulers/ControlRuler.h index ac6eba4..d9f4882 100644 --- a/src/gui/rulers/ControlRuler.h +++ b/src/gui/rulers/ControlRuler.h @@ -28,20 +28,20 @@ #include "base/Segment.h" #include "gui/general/RosegardenCanvasView.h" -#include -#include -#include +#include +#include +#include #include -class QWidget; -class QWheelEvent; -class QScrollBar; -class QPopupMenu; -class QMouseEvent; -class QContextMenuEvent; -class QCanvasRectangle; -class QCanvas; +class TQWidget; +class TQWheelEvent; +class TQScrollBar; +class TQPopupMenu; +class TQMouseEvent; +class TQContextMenuEvent; +class TQCanvasRectangle; +class TQCanvas; namespace Rosegarden @@ -70,11 +70,11 @@ public: ControlRuler(Segment*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, const char* name=0, WFlags f=0); + TQCanvas*, + TQWidget* parent=0, const char* name=0, WFlags f=0); virtual ~ControlRuler(); - virtual QString getName() = 0; + virtual TQString getName() = 0; int getMaxItemValue() { return m_maxItemValue; } void setMaxItemValue(int val) { m_maxItemValue = val; } @@ -85,7 +85,7 @@ public: int applyTool(double x, int val); - QCanvasRectangle* getSelectionRectangle() { return m_selectionRect; } + TQCanvasRectangle* getSelectionRectangle() { return m_selectionRect; } RulerScale* getRulerScale() { return m_rulerScale; } @@ -100,10 +100,10 @@ public: void flipForwards(); void flipBackwards(); - void setMainHorizontalScrollBar(QScrollBar* s ) { m_mainHorizontalScrollBar = s; } + void setMainHorizontalScrollBar(TQScrollBar* s ) { m_mainHorizontalScrollBar = s; } signals: - void stateChange(const QString&, bool); + void stateChange(const TQString&, bool); public slots: /// override RosegardenCanvasView - we don't want to change the main hscrollbar @@ -111,13 +111,13 @@ public slots: virtual void slotUpdateElementsHPos(); protected: - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); - virtual void contentsWheelEvent(QWheelEvent*); - virtual void contentsContextMenuEvent(QContextMenuEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); + virtual void contentsWheelEvent(TQWheelEvent*); + virtual void contentsContextMenuEvent(TQContextMenuEvent*); - virtual QScrollBar* getMainHorizontalScrollBar(); + virtual TQScrollBar* getMainHorizontalScrollBar(); virtual void computeStaffOffset() {}; @@ -134,24 +134,24 @@ protected: int valueToHeight(long val); long heightToValue(int height); - QColor valueToColour(int max, int val); + TQColor valueToColour(int max, int val); void clearSelectedItems(); void updateSelection(); - void setMenuName(QString menuName) { m_menuName = menuName; } + void setMenuName(TQString menuName) { m_menuName = menuName; } void createMenu(); //--------------- Data members --------------------------------- EditViewBase* m_parentEditView; - QScrollBar* m_mainHorizontalScrollBar; + TQScrollBar* m_mainHorizontalScrollBar; RulerScale* m_rulerScale; EventSelection* m_eventSelection; Segment* m_segment; ControlItem* m_currentItem; - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; ControlTool *m_tool; @@ -161,15 +161,15 @@ protected: double m_currentX; - QPoint m_lastEventPos; + TQPoint m_lastEventPos; bool m_itemMoved; bool m_selecting; ControlSelector* m_selector; - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; - QString m_menuName; - QPopupMenu* m_menu; + TQString m_menuName; + TQPopupMenu* m_menu; TextFloat *m_numberFloat; diff --git a/src/gui/rulers/ControlRulerEventEraseCommand.cpp b/src/gui/rulers/ControlRulerEventEraseCommand.cpp index 7a1e493..743ee16 100644 --- a/src/gui/rulers/ControlRulerEventEraseCommand.cpp +++ b/src/gui/rulers/ControlRulerEventEraseCommand.cpp @@ -31,7 +31,7 @@ namespace Rosegarden { -ControlRulerEventEraseCommand::ControlRulerEventEraseCommand(QCanvasItemList selectedItems, +ControlRulerEventEraseCommand::ControlRulerEventEraseCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end) : BasicCommand(i18n("Erase Controller Event(s)"), @@ -49,7 +49,7 @@ void ControlRulerEventEraseCommand::modifySegment() { Segment &segment(getSegment()); - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) segment.eraseSingle(item->getElementAdapter()->getEvent()); } diff --git a/src/gui/rulers/ControlRulerEventEraseCommand.h b/src/gui/rulers/ControlRulerEventEraseCommand.h index 15e213b..7142179 100644 --- a/src/gui/rulers/ControlRulerEventEraseCommand.h +++ b/src/gui/rulers/ControlRulerEventEraseCommand.h @@ -27,7 +27,7 @@ #include "base/Event.h" #include "document/BasicCommand.h" -#include +#include namespace Rosegarden { @@ -36,7 +36,7 @@ class ControlRulerEventEraseCommand : public BasicCommand { public: - ControlRulerEventEraseCommand(QCanvasItemList selectedItems, + ControlRulerEventEraseCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end); virtual ~ControlRulerEventEraseCommand() {;} @@ -46,7 +46,7 @@ protected: virtual void modifySegment(); - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; }; } diff --git a/src/gui/rulers/ControlSelector.cpp b/src/gui/rulers/ControlSelector.cpp index fb4abbb..15e2814 100644 --- a/src/gui/rulers/ControlSelector.cpp +++ b/src/gui/rulers/ControlSelector.cpp @@ -30,14 +30,14 @@ namespace Rosegarden { ControlSelector::ControlSelector(ControlRuler* parent) - : QObject(parent), + : TQObject(parent), m_ruler(parent) { } -void ControlSelector::handleMouseButtonPress(QMouseEvent *e) +void ControlSelector::handleMouseButtonPress(TQMouseEvent *e) { - QPoint p = m_ruler->inverseMapPoint(e->pos()); + TQPoint p = m_ruler->inverseMapPoint(e->pos()); getSelectionRectangle()->setX(p.x()); getSelectionRectangle()->setY(p.y()); @@ -47,15 +47,15 @@ void ControlSelector::handleMouseButtonPress(QMouseEvent *e) m_ruler->canvas()->update(); } -void ControlSelector::handleMouseButtonRelease(QMouseEvent*) +void ControlSelector::handleMouseButtonRelease(TQMouseEvent*) { getSelectionRectangle()->hide(); m_ruler->canvas()->update(); } -void ControlSelector::handleMouseMove(QMouseEvent *e, int, int) +void ControlSelector::handleMouseMove(TQMouseEvent *e, int, int) { - QPoint p = m_ruler->inverseMapPoint(e->pos()); + TQPoint p = m_ruler->inverseMapPoint(e->pos()); int w = int(p.x() - getSelectionRectangle()->x()); int h = int(p.y() - getSelectionRectangle()->y()); diff --git a/src/gui/rulers/ControlSelector.h b/src/gui/rulers/ControlSelector.h index 99ec773..9b01785 100644 --- a/src/gui/rulers/ControlSelector.h +++ b/src/gui/rulers/ControlSelector.h @@ -27,7 +27,7 @@ #include "ControlRuler.h" -class QCanvasRectangle; +class TQCanvasRectangle; namespace Rosegarden { @@ -44,11 +44,11 @@ public: ControlSelector(ControlRuler* parent); virtual ~ControlSelector() {}; - virtual void handleMouseButtonPress(QMouseEvent *e); - virtual void handleMouseButtonRelease(QMouseEvent *e); - virtual void handleMouseMove(QMouseEvent *e, int deltaX, int deltaY); + virtual void handleMouseButtonPress(TQMouseEvent *e); + virtual void handleMouseButtonRelease(TQMouseEvent *e); + virtual void handleMouseMove(TQMouseEvent *e, int deltaX, int deltaY); - QCanvasRectangle* getSelectionRectangle() { return m_ruler->getSelectionRectangle(); } + TQCanvasRectangle* getSelectionRectangle() { return m_ruler->getSelectionRectangle(); } protected: //--------------- Data members --------------------------------- 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 -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include 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(*it)) { ControllerEventAdapter * adapter = dynamic_cast(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(); diff --git a/src/gui/rulers/ControllerEventsRuler.h b/src/gui/rulers/ControllerEventsRuler.h index 2b42274..9f077fc 100644 --- a/src/gui/rulers/ControllerEventsRuler.h +++ b/src/gui/rulers/ControllerEventsRuler.h @@ -27,14 +27,14 @@ #define _RG_CONTROLLEREVENTSRULER_H_ #include "ControlRuler.h" -#include +#include #include "base/Event.h" -class QWidget; -class QMouseEvent; -class QCanvasLine; -class QCanvas; +class TQWidget; +class TQMouseEvent; +class TQCanvasLine; +class TQCanvas; namespace Rosegarden @@ -57,14 +57,14 @@ public: ControllerEventsRuler(Segment*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, + TQCanvas*, + TQWidget* parent=0, const ControlParameter *controller = 0, const char* name=0, WFlags f=0); virtual ~ControllerEventsRuler(); - virtual QString getName(); + virtual TQString getName(); int getDefaultItemWidth() { return m_defaultItemWidth; } // Allow something external to reset the selection of Events @@ -90,9 +90,9 @@ protected: // Let's override these again here // - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); virtual void layoutItem(ControlItem*); @@ -105,7 +105,7 @@ protected: int m_defaultItemWidth; ControlParameter *m_controller; - QCanvasLine *m_controlLine; + TQCanvasLine *m_controlLine; bool m_controlLineShowing; int m_controlLineX; diff --git a/src/gui/rulers/DefaultVelocityColour.cpp b/src/gui/rulers/DefaultVelocityColour.cpp index 21cf75e..9962cf0 100644 --- a/src/gui/rulers/DefaultVelocityColour.cpp +++ b/src/gui/rulers/DefaultVelocityColour.cpp @@ -26,7 +26,7 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" -#include +#include #include "VelocityColour.h" diff --git a/src/gui/rulers/LoopRuler.cpp b/src/gui/rulers/LoopRuler.cpp index bdf6c5e..0a0adb2 100644 --- a/src/gui/rulers/LoopRuler.cpp +++ b/src/gui/rulers/LoopRuler.cpp @@ -31,15 +31,15 @@ #include "gui/general/GUIPalette.h" #include "gui/general/HZoomable.h" #include "gui/general/RosegardenCanvasView.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include "document/RosegardenGUIDoc.h" @@ -51,9 +51,9 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, int height, double xorigin, bool invert, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_doc(doc), m_height(height), m_xorigin(xorigin), @@ -67,7 +67,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, m_grid(&m_defaultGrid), m_loopingMode(false), m_startLoop(0), m_endLoop(0), - m_quickMarkerPen(QPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4)) + m_quickMarkerPen(TQPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4)) { /* * I need to understand if this ruler is being built for the main @@ -85,7 +85,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, m_defaultGrid.setSnapTime(SnapGrid::NoSnap); m_loopGrid.setSnapTime(SnapGrid::SnapToBeat); - QToolTip::add + TQToolTip::add (this, i18n("Click and drag to move the playback pointer.\nShift-click and drag to set a range for looping or editing.\nShift-click to clear the loop or range.\nDouble-click to start playback.")); } @@ -125,30 +125,30 @@ void LoopRuler::scrollHoriz(int x) } } -QSize LoopRuler::sizeHint() const +TQSize LoopRuler::sizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } -QSize LoopRuler::minimumSizeHint() const +TQSize LoopRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } -void LoopRuler::paintEvent(QPaintEvent* e) +void LoopRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); if (getHScaleFactor() != 1.0) paint.scale(getHScaleFactor(), 1.0); @@ -178,9 +178,9 @@ void LoopRuler::paintEvent(QPaintEvent* e) } } -void LoopRuler::drawBarSections(QPainter* paint) +void LoopRuler::drawBarSections(TQPainter* paint) { - QRect clipRect = paint->clipRegion().boundingRect(); + TQRect clipRect = paint->clipRegion().boundingRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -229,7 +229,7 @@ void LoopRuler::drawBarSections(QPainter* paint) } void -LoopRuler::drawLoopMarker(QPainter* paint) +LoopRuler::drawLoopMarker(TQPainter* paint) { double x1 = (int)m_rulerScale->getXForTime(m_startLoop); double x2 = (int)m_rulerScale->getXForTime(m_endLoop); @@ -251,7 +251,7 @@ LoopRuler::drawLoopMarker(QPainter* paint) } void -LoopRuler::mousePressEvent(QMouseEvent *mE) +LoopRuler::mousePressEvent(TQMouseEvent *mE) { RG_DEBUG << "LoopRuler::mousePressEvent: x = " << mE->x() << endl; @@ -278,7 +278,7 @@ LoopRuler::mousePressEvent(QMouseEvent *mE) } void -LoopRuler::mouseReleaseEvent(QMouseEvent *mE) +LoopRuler::mouseReleaseEvent(TQMouseEvent *mE) { if (mE->button() == LeftButton) { if (m_loopingMode) { @@ -313,7 +313,7 @@ LoopRuler::mouseReleaseEvent(QMouseEvent *mE) } void -LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE) +LoopRuler::mouseDoubleClickEvent(TQMouseEvent *mE) { double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin; if (x < 0) @@ -326,7 +326,7 @@ LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE) } void -LoopRuler::mouseMoveEvent(QMouseEvent *mE) +LoopRuler::mouseMoveEvent(TQMouseEvent *mE) { double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin; if (x < 0) @@ -351,7 +351,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop, m_startLoop = startLoop; m_endLoop = endLoop; - QPainter paint(this); + TQPainter paint(this); paint.setBrush(colorGroup().foreground()); drawBarSections(&paint); drawLoopMarker(&paint); diff --git a/src/gui/rulers/LoopRuler.h b/src/gui/rulers/LoopRuler.h index 7c30cc8..dfe88ae 100644 --- a/src/gui/rulers/LoopRuler.h +++ b/src/gui/rulers/LoopRuler.h @@ -28,15 +28,15 @@ #include "base/SnapGrid.h" #include "gui/general/HZoomable.h" -#include -#include -#include +#include +#include +#include #include "base/Event.h" -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -51,7 +51,7 @@ class RosegardenGUIDoc; * ruler-like scale, and reacts to mouse clicks by sending relevant * signals to modify position pointer and playback/looping states. */ -class LoopRuler : public QWidget, public HZoomable +class LoopRuler : public TQWidget, public HZoomable { Q_OBJECT @@ -61,15 +61,15 @@ public: int height = 0, double xorigin = 0.0, bool invert = false, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~LoopRuler(); void setSnapGrid(SnapGrid *grid); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void scrollHoriz(int x); @@ -87,16 +87,16 @@ public slots: protected: // ActiveItem interface - virtual void mousePressEvent (QMouseEvent*); - virtual void mouseReleaseEvent (QMouseEvent*); - virtual void mouseDoubleClickEvent (QMouseEvent*); - virtual void mouseMoveEvent (QMouseEvent*); + virtual void mousePressEvent (TQMouseEvent*); + virtual void mouseReleaseEvent (TQMouseEvent*); + virtual void mouseDoubleClickEvent (TQMouseEvent*); + virtual void mouseMoveEvent (TQMouseEvent*); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); void setLoopingMode(bool value) { m_loopingMode = value; } - void drawBarSections(QPainter*); - void drawLoopMarker(QPainter*); // between loop positions + void drawBarSections(TQPainter*); + void drawLoopMarker(TQPainter*); // between loop positions signals: // The three main functions that this class performs @@ -136,7 +136,7 @@ protected: SnapGrid m_defaultGrid; SnapGrid m_loopGrid; SnapGrid *m_grid; - QPen m_quickMarkerPen; + TQPen m_quickMarkerPen; bool m_loopingMode; timeT m_startLoop; timeT m_endLoop; diff --git a/src/gui/rulers/MarkerRuler.cpp b/src/gui/rulers/MarkerRuler.cpp index 7dcb67a..5d328a8 100644 --- a/src/gui/rulers/MarkerRuler.cpp +++ b/src/gui/rulers/MarkerRuler.cpp @@ -36,22 +36,22 @@ #include "commands/edit/ModifyMarkerCommand.h" #include "document/MultiViewCommandHistory.h" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include namespace Rosegarden @@ -61,10 +61,10 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, RulerScale *rulerScale, int barHeight, double xorigin, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f) - : QWidget(parent, name, f), + : TQWidget(parent, name, f), m_barHeight(barHeight), m_xorigin(xorigin), m_currentXOffset(0), @@ -80,42 +80,42 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, // Otherwise we'll end up adding all actions to the same // (document-level) action collection regardless of which window // we're in. - QObject *probe = parent; + TQObject *probe = parent; while (probe && !dynamic_cast(probe)) probe = probe->parent(); if (probe) m_parentMainWindow = dynamic_cast(probe); - // m_barFont = new QFont("helvetica", 12); + // m_barFont = new TQFont("helvetica", 12); // m_barFont->setPixelSize(12); - m_barFont = new QFont(); + m_barFont = new TQFont(); m_barFont->setPointSize(10); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon; // Use the event insert, delete, edit icons because they are // actually generic enough to serve for anything. Let's hope they // don't become more event-specific in future... - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-insert.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); new KAction(i18n("Insert Marker"), icon, 0, this, - SLOT(slotInsertMarkerHere()), actionCollection(), + TQT_SLOT(slotInsertMarkerHere()), actionCollection(), "insert_marker_here"); new KAction(i18n("Insert Marker at Playback Position"), 0, this, - SLOT(slotInsertMarkerAtPointer()), actionCollection(), + TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), "insert_marker_at_pointer"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-delete.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); new KAction(i18n("Delete Marker"), icon, 0, this, - SLOT(slotDeleteMarker()), actionCollection(), + TQT_SLOT(slotDeleteMarker()), actionCollection(), "delete_marker"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-edit.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); new KAction(i18n("Edit Marker..."), icon, 0, this, - SLOT(slotEditMarker()), actionCollection(), + TQT_SLOT(slotEditMarker()), actionCollection(), "edit_marker"); - QToolTip::add + TQToolTip::add (this, i18n("Click on a marker to move the playback pointer.\nShift-click to set a range between markers.\nDouble-click to open the marker editor.")); } @@ -137,14 +137,14 @@ MarkerRuler::createMenu() KXMLGUIFactory* factory = m_parentMainWindow->factory(); factory->addClient(this); - QWidget* tmp = factory->container("marker_ruler_menu", this); + TQWidget* tmp = factory->container("marker_ruler_menu", this); // if (!tmp) { // RG_DEBUG << "MarkerRuler::createMenu() menu not found\n" // << domDocument().toString(4) << endl; // } - m_menu = dynamic_cast(tmp); + m_menu = dynamic_cast(tmp); if (!m_menu) { RG_DEBUG << "MarkerRuler::createMenu() failed\n"; @@ -159,7 +159,7 @@ MarkerRuler::scrollHoriz(int x) repaint(); } -QSize +TQSize MarkerRuler::sizeHint() const { int lastBar = @@ -168,15 +168,15 @@ MarkerRuler::sizeHint() const m_rulerScale->getBarPosition(lastBar) + m_rulerScale->getBarWidth(lastBar) + m_xorigin; - return QSize(std::max(int(width), m_width), m_barHeight); + return TQSize(std::max(int(width), m_width), m_barHeight); } -QSize +TQSize MarkerRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - return QSize(static_cast(firstBarWidth), m_barHeight); + return TQSize(static_cast(firstBarWidth), m_barHeight); } void @@ -220,7 +220,7 @@ MarkerRuler::slotEditMarker() // it, be my guest. MarkerModifyDialog dialog(this, &m_doc->getComposition(), marker); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyMarkerCommand *command = new ModifyMarkerCommand(&m_doc->getComposition(), marker->getID(), @@ -244,7 +244,7 @@ MarkerRuler::getClickPosition() Rosegarden::Marker* MarkerRuler::getMarkerAtClickPosition() { - QRect clipRect = visibleRect(); + TQRect clipRect = visibleRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -261,16 +261,16 @@ MarkerRuler::getMarkerAtClickPosition() timeT end = comp.getBarEnd(lastBar); // need these to calculate the visible extents of a marker tag - QPainter painter(this); + TQPainter painter(this); painter.setFont(*m_barFont); - QFontMetrics metrics = painter.fontMetrics(); + TQFontMetrics metrics = painter.fontMetrics(); for (Composition::markerconstiterator i = markers.begin(); i != markers.end(); ++i) { if ((*i)->getTime() >= start && (*i)->getTime() < end) { - QString name(strtoqstr((*i)->getName())); + TQString name(strtoqstr((*i)->getName())); int x = m_rulerScale->getXForTime((*i)->getTime()) + m_xorigin + m_currentXOffset; @@ -299,15 +299,15 @@ MarkerRuler::getMarkerAtClickPosition() } void -MarkerRuler::paintEvent(QPaintEvent*) +MarkerRuler::paintEvent(TQPaintEvent*) { - QPainter painter(this); + TQPainter painter(this); painter.setFont(*m_barFont); if (getHScaleFactor() != 1.0) painter.scale(getHScaleFactor(), 1.0); - QRect clipRect = visibleRect(); + TQRect clipRect = visibleRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -360,19 +360,19 @@ MarkerRuler::paintEvent(QPaintEvent*) painter.drawLine(static_cast(x), 0, static_cast(x), m_barHeight); // disable worldXForm for text - QPoint textDrawPoint = painter.xForm(QPoint(static_cast(x + 4), 12)); + TQPoint textDrawPoint = painter.xForm(TQPoint(static_cast(x + 4), 12)); bool enableXForm = painter.hasWorldXForm(); painter.setWorldXForm(false); if (i >= 0) - painter.drawText(textDrawPoint, QString("%1").arg(i + 1)); + painter.drawText(textDrawPoint, TQString("%1").arg(i + 1)); painter.setWorldXForm(enableXForm); } else { - const QPen normalPen = painter.pen(); + const TQPen normalPen = painter.pen(); ; - QPen endPen(black, 2); + TQPen endPen(black, 2); painter.setPen(endPen); painter.drawLine(static_cast(x), 0, static_cast(x), m_barHeight); painter.setPen(normalPen); @@ -387,11 +387,11 @@ MarkerRuler::paintEvent(QPaintEvent*) timeT start = comp.getBarStart(firstBar); timeT end = comp.getBarEnd(lastBar); - QFontMetrics metrics = painter.fontMetrics(); + TQFontMetrics metrics = painter.fontMetrics(); for (it = markers.begin(); it != markers.end(); ++it) { if ((*it)->getTime() >= start && (*it)->getTime() < end) { - QString name(strtoqstr((*it)->getName())); + TQString name(strtoqstr((*it)->getName())); double x = m_rulerScale->getXForTime((*it)->getTime()) + m_xorigin + m_currentXOffset; @@ -399,13 +399,13 @@ MarkerRuler::paintEvent(QPaintEvent*) painter.fillRect(static_cast(x), 1, static_cast(metrics.width(name) + 5), m_barHeight - 2, - QBrush(GUIPalette::getColour(GUIPalette::MarkerBackground))); + TQBrush(GUIPalette::getColour(GUIPalette::MarkerBackground))); painter.drawLine(int(x), 1, int(x), m_barHeight - 2); painter.drawLine(int(x) + 1, 1, int(x) + 1, m_barHeight - 2); - QPoint textDrawPoint = painter.xForm - (QPoint(static_cast(x + 3), m_barHeight - 4)); + TQPoint textDrawPoint = painter.xForm + (TQPoint(static_cast(x + 3), m_barHeight - 4)); // disable worldXForm for text bool enableXForm = painter.hasWorldXForm(); @@ -420,7 +420,7 @@ MarkerRuler::paintEvent(QPaintEvent*) } void -MarkerRuler::mousePressEvent(QMouseEvent *e) +MarkerRuler::mousePressEvent(TQMouseEvent *e) { RG_DEBUG << "MarkerRuler::mousePressEvent: x = " << e->x() << endl; @@ -438,7 +438,7 @@ MarkerRuler::mousePressEvent(QMouseEvent *e) if (m_menu) { actionCollection()->action("delete_marker")->setEnabled(clickedMarker != 0); actionCollection()->action("edit_marker")->setEnabled(clickedMarker != 0); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } return; } @@ -479,7 +479,7 @@ MarkerRuler::mousePressEvent(QMouseEvent *e) } void -MarkerRuler::mouseDoubleClickEvent(QMouseEvent *) +MarkerRuler::mouseDoubleClickEvent(TQMouseEvent *) { RG_DEBUG << "MarkerRuler::mouseDoubleClickEvent" << endl; diff --git a/src/gui/rulers/MarkerRuler.h b/src/gui/rulers/MarkerRuler.h index c77e6a9..29c90d0 100644 --- a/src/gui/rulers/MarkerRuler.h +++ b/src/gui/rulers/MarkerRuler.h @@ -27,16 +27,16 @@ #define _RG_MARKERRULER_H_ #include "gui/general/HZoomable.h" -#include -#include +#include +#include #include #include "base/Event.h" -class QPaintEvent; -class QMouseEvent; -class QFont; -class QPopupMenu; +class TQPaintEvent; +class TQMouseEvent; +class TQFont; +class TQPopupMenu; class KMainWindow; namespace Rosegarden @@ -47,7 +47,7 @@ class RulerScale; class RosegardenGUIDoc; -class MarkerRuler : public QWidget, public HZoomable, public KXMLGUIClient +class MarkerRuler : public TQWidget, public HZoomable, public KXMLGUIClient { Q_OBJECT @@ -56,14 +56,14 @@ public: RulerScale *rulerScale, int buttonHeight, double xorigin = 0.0, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); virtual ~MarkerRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void scrollHoriz(int x); @@ -79,7 +79,7 @@ signals: /// add a marker void addMarker(timeT); - void deleteMarker(int, timeT, QString name, QString description); + void deleteMarker(int, timeT, TQString name, TQString description); /// Set a loop range void setLoop(timeT, timeT); @@ -91,9 +91,9 @@ protected slots: void slotEditMarker(); protected: - virtual void paintEvent(QPaintEvent*); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void paintEvent(TQPaintEvent*); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); void createMenu(); timeT getClickPosition(); @@ -106,8 +106,8 @@ protected: int m_width; int m_clickX; - QFont *m_barFont; - QPopupMenu *m_menu; + TQFont *m_barFont; + TQPopupMenu *m_menu; RosegardenGUIDoc *m_doc; RulerScale *m_rulerScale; diff --git a/src/gui/rulers/PercussionPitchRuler.cpp b/src/gui/rulers/PercussionPitchRuler.cpp index a89ae89..48fc640 100644 --- a/src/gui/rulers/PercussionPitchRuler.cpp +++ b/src/gui/rulers/PercussionPitchRuler.cpp @@ -32,19 +32,19 @@ #include "gui/editors/matrix/MatrixView.h" #include "gui/general/MidiPitchLabel.h" #include "PitchRuler.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace Rosegarden { -PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, +PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent, const MidiKeyMapping *mapping, int lineSpacing) : PitchRuler(parent), @@ -53,30 +53,30 @@ PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, m_mouseDown(false), m_lastHoverHighlight( -1) { - m_font = new QFont(); + m_font = new TQFont(); m_font->setPixelSize(9); - m_fontMetrics = new QFontMetrics(*m_font); + m_fontMetrics = new TQFontMetrics(*m_font); m_width = m_fontMetrics->width(" A#2 Acoustic Bass Drum "); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); setMouseTracking(true); } -QSize PercussionPitchRuler::sizeHint() const +TQSize PercussionPitchRuler::sizeHint() const { - return QSize(m_width, + return TQSize(m_width, (m_lineSpacing + 1) * m_mapping->getPitchExtent()); } -QSize PercussionPitchRuler::minimumSizeHint() const +TQSize PercussionPitchRuler::minimumSizeHint() const { - return QSize(m_width, m_lineSpacing + 1); + return TQSize(m_width, m_lineSpacing + 1); } -void PercussionPitchRuler::paintEvent(QPaintEvent*) +void PercussionPitchRuler::paintEvent(TQPaintEvent*) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); @@ -109,17 +109,17 @@ void PercussionPitchRuler::paintEvent(QPaintEvent*) } } -void PercussionPitchRuler::enterEvent(QEvent *) +void PercussionPitchRuler::enterEvent(TQEvent *) {} -void PercussionPitchRuler::leaveEvent(QEvent*) +void PercussionPitchRuler::leaveEvent(TQEvent*) { // m_hoverHighlight->hide(); } void PercussionPitchRuler::drawHoverNote(int evPitch) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); if (m_lastHoverHighlight != evPitch) { @@ -132,8 +132,8 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) if (m_lastHoverHighlight >= 0) { int y = (extent - (m_lastHoverHighlight - minPitch) - 1) * (m_lineSpacing + 1); - paint.setBrush(QColor(238, 238, 224)); - paint.setPen(QColor(238, 238, 224)); + paint.setBrush(TQColor(238, 238, 224)); + paint.setPen(TQColor(238, 238, 224)); paint.drawRect(lw + 7, y + 1, m_width - lw, m_lineSpacing); std::string key = m_mapping->getMapForKeyName(m_lastHoverHighlight); paint.setPen(Qt::black); @@ -146,7 +146,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) m_lastHoverHighlight = evPitch; paint.setBrush(paint.pen().color()); paint.drawRect(lw + 7, y, m_width - lw, m_lineSpacing + 1); - paint.setPen(QColor(238, 238, 224)); + paint.setPen(TQColor(238, 238, 224)); std::string key = m_mapping->getMapForKeyName(evPitch); paint.drawText @@ -155,7 +155,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) } } -void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) +void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e) { // ugh @@ -176,7 +176,7 @@ void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) +void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -192,7 +192,7 @@ void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) } } -void PercussionPitchRuler::mouseReleaseEvent(QMouseEvent *e) +void PercussionPitchRuler::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; diff --git a/src/gui/rulers/PercussionPitchRuler.h b/src/gui/rulers/PercussionPitchRuler.h index cae61ec..44fcd86 100644 --- a/src/gui/rulers/PercussionPitchRuler.h +++ b/src/gui/rulers/PercussionPitchRuler.h @@ -27,15 +27,15 @@ #define _RG_PERCUSSIONPITCHRULER_H_ #include "PitchRuler.h" -#include +#include -class QWidget; -class QPaintEvent; -class QMouseEvent; -class QFontMetrics; -class QFont; -class QEvent; +class TQWidget; +class TQPaintEvent; +class TQMouseEvent; +class TQFontMetrics; +class TQFont; +class TQEvent; namespace Rosegarden @@ -48,12 +48,12 @@ class PercussionPitchRuler : public PitchRuler { Q_OBJECT public: - PercussionPitchRuler(QWidget *parent, + PercussionPitchRuler(TQWidget *parent, const MidiKeyMapping *mapping, int lineSpacing); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void drawHoverNote(int evPitch); @@ -63,12 +63,12 @@ signals: void hoveredOverKeyChanged(unsigned int y); protected: - virtual void paintEvent(QPaintEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void paintEvent(TQPaintEvent*); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); const MidiKeyMapping *m_mapping; @@ -80,8 +80,8 @@ protected: int m_lastHoverHighlight; - QFont *m_font; - QFontMetrics *m_fontMetrics; + TQFont *m_font; + TQFontMetrics *m_fontMetrics; }; diff --git a/src/gui/rulers/PitchRuler.cpp b/src/gui/rulers/PitchRuler.cpp index 55f4b00..baa06cd 100644 --- a/src/gui/rulers/PitchRuler.cpp +++ b/src/gui/rulers/PitchRuler.cpp @@ -25,16 +25,16 @@ #include "PitchRuler.h" -#include -#include +#include +#include namespace Rosegarden { PitchRuler:: -PitchRuler(QWidget *parent) : - QWidget(parent) +PitchRuler(TQWidget *parent) : + TQWidget(parent) { // nothing else } @@ -42,13 +42,13 @@ PitchRuler(QWidget *parent) : QSize PitchRuler::sizeHint() const { - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } QSize PitchRuler::minimumSizeHint() const { - return QWidget::minimumSizeHint(); + return TQWidget::minimumSizeHint(); } } diff --git a/src/gui/rulers/PitchRuler.h b/src/gui/rulers/PitchRuler.h index 3c47709..2562096 100644 --- a/src/gui/rulers/PitchRuler.h +++ b/src/gui/rulers/PitchRuler.h @@ -26,8 +26,8 @@ #ifndef _RG_PITCHRULER_H_ #define _RG_PITCHRULER_H_ -#include -#include +#include +#include @@ -41,10 +41,10 @@ class PitchRuler : public QWidget { Q_OBJECT public: - PitchRuler(QWidget *parent); + PitchRuler(TQWidget *parent); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; virtual void drawHoverNote(int evPitch) = 0; diff --git a/src/gui/rulers/PropertyBox.cpp b/src/gui/rulers/PropertyBox.cpp index 38d67ef..7037b64 100644 --- a/src/gui/rulers/PropertyBox.cpp +++ b/src/gui/rulers/PropertyBox.cpp @@ -26,21 +26,21 @@ #include "PropertyBox.h" #include "gui/general/GUIPalette.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace Rosegarden { -PropertyBox::PropertyBox(QString label, +PropertyBox::PropertyBox(TQString label, int width, int height, - QWidget *parent, + TQWidget *parent, const char *name): - QWidget(parent, name), + TQWidget(parent, name), m_label(label), m_width(width), m_height(height) @@ -49,19 +49,19 @@ PropertyBox::PropertyBox(QString label, QSize PropertyBox::sizeHint() const { - return QSize(m_width, m_height); + return TQSize(m_width, m_height); } QSize PropertyBox::minimumSizeHint() const { - return QSize(m_width, m_height); + return TQSize(m_width, m_height); } void -PropertyBox::paintEvent(QPaintEvent *e) +PropertyBox::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::MatrixElementBorder)); //paint.setBrush(GUIPalette::getColour(GUIPalette::MatrixElementBlock)); diff --git a/src/gui/rulers/PropertyBox.h b/src/gui/rulers/PropertyBox.h index 1b36f0b..73e17b7 100644 --- a/src/gui/rulers/PropertyBox.h +++ b/src/gui/rulers/PropertyBox.h @@ -26,12 +26,12 @@ #ifndef _RG_PROPERTYBOX_H_ #define _RG_PROPERTYBOX_H_ -#include -#include -#include +#include +#include +#include -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -49,21 +49,21 @@ class PropertyBox : public QWidget Q_OBJECT public: - PropertyBox(QString label, + PropertyBox(TQString label, int width, int height, - QWidget *parent=0, + TQWidget *parent=0, const char *name = 0); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); //--------------- Data members --------------------------------- - QString m_label; + TQString m_label; int m_width; int m_height; }; diff --git a/src/gui/rulers/PropertyControlRuler.cpp b/src/gui/rulers/PropertyControlRuler.cpp index 7dc1258..a597820 100644 --- a/src/gui/rulers/PropertyControlRuler.cpp +++ b/src/gui/rulers/PropertyControlRuler.cpp @@ -41,11 +41,11 @@ #include "gui/general/EditViewBase.h" #include "gui/widgets/TextFloat.h" #include "gui/general/LinedStaff.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -55,13 +55,13 @@ PropertyControlRuler::PropertyControlRuler(PropertyName propertyName, Staff* staff, RulerScale* rulerScale, EditViewBase* parentView, - QCanvas* c, QWidget* parent, + TQCanvas* c, TQWidget* parent, const char* name, WFlags f) : ControlRuler(&(staff->getSegment()), rulerScale, parentView, c, parent, name, f), m_propertyName(propertyName), m_staff(staff), - m_propertyLine(new QCanvasLine(canvas())), + m_propertyLine(new TQCanvasLine(canvas())), m_propertyLineShowing(false), m_propertyLineX(0), m_propertyLineY(0) @@ -97,36 +97,36 @@ PropertyControlRuler::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(); @@ -139,7 +139,7 @@ PropertyControlRuler::~PropertyControlRuler() } } -QString PropertyControlRuler::getName() +TQString PropertyControlRuler::getName() { return getPropertyName().c_str(); } @@ -187,9 +187,9 @@ void PropertyControlRuler::elementRemoved(const Staff *, ViewElement *el) 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(*it)) { ViewElementAdapter * adapter = dynamic_cast(item->getElementAdapter()); if (adapter->getViewElement() == el) { @@ -233,7 +233,7 @@ void PropertyControlRuler::startPropertyLine() } void -PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) +PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMousePressEvent\n"; @@ -256,7 +256,7 @@ PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) } if (e->button() == LeftButton) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_propertyLine->show(); m_propertyLineX = p.x(); @@ -267,7 +267,7 @@ PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) } void -PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) +PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMouseReleaseEvent\n"; @@ -289,7 +289,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) ControlRuler::contentsMouseReleaseEvent(e); // send super return ; } else { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); timeT startTime = m_rulerScale->getTimeForX(m_propertyLineX); timeT endTime = m_rulerScale->getTimeForX(p.x()); @@ -314,7 +314,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) } void -PropertyControlRuler::contentsMouseMoveEvent(QMouseEvent *e) +PropertyControlRuler::contentsMouseMoveEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMouseMoveEvent\n"; @@ -330,21 +330,21 @@ PropertyControlRuler::contentsMouseMoveEvent(QMouseEvent *e) return ; } - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_propertyLine->setPoints(m_propertyLineX, m_propertyLineY, p.x(), p.y()); canvas()->update(); } -void PropertyControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) +void PropertyControlRuler::contentsContextMenuEvent(TQContextMenuEvent* e) { RG_DEBUG << "PropertyControlRuler::contentsContextMenuEvent\n"; // check if we actually have some control items - QCanvasItemList list = canvas()->allItems(); + TQCanvasItemList list = canvas()->allItems(); bool haveItems = false; - QCanvasItemList::Iterator it = list.begin(); + TQCanvasItemList::Iterator it = list.begin(); for (; it != list.end(); ++it) { if (dynamic_cast(*it)) { haveItems = true; @@ -413,8 +413,8 @@ PropertyControlRuler::selectAllProperties() clearSelectedItems(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { m_selectedItems << item; (*it)->setSelected(true); @@ -425,7 +425,7 @@ PropertyControlRuler::selectAllProperties() /* m_eventSelection->addFromSelection(&selection); - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast(*it)) { ElementAdapter* adapter = item->getElementAdapter(); diff --git a/src/gui/rulers/PropertyControlRuler.h b/src/gui/rulers/PropertyControlRuler.h index f94f3e1..db1d698 100644 --- a/src/gui/rulers/PropertyControlRuler.h +++ b/src/gui/rulers/PropertyControlRuler.h @@ -29,15 +29,15 @@ #include "base/PropertyName.h" #include "base/Staff.h" #include "ControlRuler.h" -#include +#include #include "base/Event.h" -class QWidget; -class QMouseEvent; -class QContextMenuEvent; -class QCanvasLine; -class QCanvas; +class TQWidget; +class TQMouseEvent; +class TQContextMenuEvent; +class TQCanvasLine; +class TQCanvas; namespace Rosegarden @@ -61,12 +61,12 @@ public: Staff*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, const char* name=0, WFlags f=0); + TQCanvas*, + TQWidget* parent=0, const char* name=0, WFlags f=0); virtual ~PropertyControlRuler(); - virtual QString getName(); + virtual TQString getName(); const PropertyName& getPropertyName() { return m_propertyName; } @@ -87,10 +87,10 @@ public: protected: - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); - virtual void contentsContextMenuEvent(QContextMenuEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); + virtual void contentsContextMenuEvent(TQContextMenuEvent*); void drawPropertyLine(timeT startTime, timeT endTime, @@ -106,7 +106,7 @@ protected: PropertyName m_propertyName; Staff* m_staff; - QCanvasLine *m_propertyLine; + TQCanvasLine *m_propertyLine; bool m_propertyLineShowing; int m_propertyLineX; diff --git a/src/gui/rulers/PropertyViewRuler.cpp b/src/gui/rulers/PropertyViewRuler.cpp index cf5d89d..0365ae8 100644 --- a/src/gui/rulers/PropertyViewRuler.cpp +++ b/src/gui/rulers/PropertyViewRuler.cpp @@ -34,14 +34,14 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" #include "gui/general/HZoomable.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -52,9 +52,9 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, const PropertyName &property, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_propertyName(property), m_xorigin(xorigin), m_height(height), @@ -65,12 +65,12 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, m_fontMetrics(m_boldFont) { m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::SegmentCanvas)); - QString tip = i18n("%1 controller").arg(strtoqstr(property)); - QToolTip::add + TQString tip = i18n("%1 controller").arg(strtoqstr(property)); + TQToolTip::add (this, tip); } @@ -109,7 +109,7 @@ PropertyViewRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -118,21 +118,21 @@ QSize PropertyViewRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } void -PropertyViewRuler::paintEvent(QPaintEvent* e) +PropertyViewRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); if (getHScaleFactor() != 1.0) paint.scale(getHScaleFactor(), 1.0); paint.setPen(GUIPalette::getColour(GUIPalette::MatrixElementBorder)); - QRect clipRect = e->rect().normalize(); + TQRect clipRect = e->rect().normalize(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - m_xorigin); diff --git a/src/gui/rulers/PropertyViewRuler.h b/src/gui/rulers/PropertyViewRuler.h index b7d479c..19ac410 100644 --- a/src/gui/rulers/PropertyViewRuler.h +++ b/src/gui/rulers/PropertyViewRuler.h @@ -28,13 +28,13 @@ #include "base/PropertyName.h" #include "gui/general/HZoomable.h" -#include -#include -#include -#include +#include +#include +#include +#include -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -48,7 +48,7 @@ class RulerScale; * PropertyViewRuler is a widget that shows a range of Property * (velocity, typically) values for a set of Rosegarden Events. */ -class PropertyViewRuler : public QWidget, public HZoomable +class PropertyViewRuler : public TQWidget, public HZoomable { Q_OBJECT @@ -58,13 +58,13 @@ public: const PropertyName &property, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~PropertyViewRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -77,7 +77,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); //--------------- Data members --------------------------------- @@ -91,9 +91,9 @@ protected: Segment *m_segment; RulerScale *m_rulerScale; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; }; diff --git a/src/gui/rulers/RawNoteRuler.cpp b/src/gui/rulers/RawNoteRuler.cpp index cc7d6e4..adfca44 100644 --- a/src/gui/rulers/RawNoteRuler.cpp +++ b/src/gui/rulers/RawNoteRuler.cpp @@ -35,12 +35,12 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -50,9 +50,9 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale, Segment *segment, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -61,12 +61,12 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale, m_rulerScale(rulerScale) { setBackgroundColor(GUIPalette::getColour(GUIPalette::RawNoteRulerBackground)); - QToolTip::add(this,""); + TQToolTip::add(this,""); } RawNoteRuler::~RawNoteRuler() { - QToolTip::remove(this); + TQToolTip::remove(this); // nothing else } @@ -101,7 +101,7 @@ RawNoteRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -110,7 +110,7 @@ QSize RawNoteRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -329,7 +329,7 @@ RawNoteRuler::EventTreeNode::getChildrenAboveOrBelow(bool below, int p) } void -RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, +RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc, EventTreeNode *node, double height, double yorigin) { int depth = node->getDepth(); @@ -359,7 +359,7 @@ RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, long velocity = 100; (*node->node)->get (BaseProperties::VELOCITY, velocity); - QColor colour = vc.getColour(velocity); + TQColor colour = vc.getColour(velocity); timeT start = (*node->node)->getAbsoluteTime(); timeT end = (*node->node)->getDuration() + start; @@ -435,14 +435,14 @@ RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, } void -RawNoteRuler::paintEvent(QPaintEvent* e) +RawNoteRuler::paintEvent(TQPaintEvent* e) { if (!m_segment || !m_segment->getComposition()) return ; // Tooltips { - QToolTip::remove(this); + TQToolTip::remove(this); TrackId trackId = m_segment->getTrack(); Track *track = m_segment->getComposition()->getTrackById(trackId); @@ -450,7 +450,7 @@ RawNoteRuler::paintEvent(QPaintEvent* e) if (track) trackPosition = track->getPosition(); - QToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)") + TQToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)") .arg(trackPosition + 1) .arg(m_segment->getLabel()) .arg(m_segment->getRuntimeId())); @@ -458,11 +458,11 @@ RawNoteRuler::paintEvent(QPaintEvent* e) // START_TIMING; - QPainter paint(this); + TQPainter paint(this); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - 100 - m_xorigin); @@ -475,7 +475,7 @@ RawNoteRuler::paintEvent(QPaintEvent* e) // draw the extent of the segment using its color - QColor brushColor = GUIPalette::convertColour(m_segment->getComposition()-> + TQColor brushColor = GUIPalette::convertColour(m_segment->getComposition()-> getSegmentColourMap().getColourByIndex(m_segment->getColourIndex())); paint.setPen(brushColor); paint.setBrush(brushColor); @@ -516,8 +516,8 @@ RawNoteRuler::paintEvent(QPaintEvent* e) for (int depth = 0; depth < 3; ++depth) { int grey = depth * 60 + 60; - paint.setPen(QColor(grey, grey, grey)); - paint.setBrush(QColor(grey, grey, grey)); + paint.setPen(TQColor(grey, grey, grey)); + paint.setBrush(TQColor(grey, grey, grey)); base /= divisions[depth]; timeT t(barStart + base); diff --git a/src/gui/rulers/RawNoteRuler.h b/src/gui/rulers/RawNoteRuler.h index f194062..8ced771 100644 --- a/src/gui/rulers/RawNoteRuler.h +++ b/src/gui/rulers/RawNoteRuler.h @@ -27,15 +27,15 @@ #define _RG_RAWNOTERULER_H_ #include "base/Segment.h" -#include -#include +#include +#include #include #include #include "base/Event.h" -class QPaintEvent; -class QPainter; +class TQPaintEvent; +class TQPainter; namespace Rosegarden @@ -61,7 +61,7 @@ public: Segment *segment, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~RawNoteRuler(); @@ -70,8 +70,8 @@ public: m_segment = segment; } - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -79,7 +79,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); private: double m_xorigin; @@ -115,7 +115,7 @@ private: void dumpForest(std::vector *); void buildForest(Segment *, Segment::iterator, Segment::iterator); - void drawNode(QPainter &, DefaultVelocityColour &, EventTreeNode *, + void drawNode(TQPainter &, DefaultVelocityColour &, EventTreeNode *, double height, double yorigin); // needs to be class with dtor &c and containing above methods diff --git a/src/gui/rulers/StandardRuler.cpp b/src/gui/rulers/StandardRuler.cpp index 611c991..4869d84 100644 --- a/src/gui/rulers/StandardRuler.cpp +++ b/src/gui/rulers/StandardRuler.cpp @@ -35,10 +35,10 @@ #include "gui/general/GUIPalette.h" #include "gui/rulers/LoopRuler.h" #include "document/RosegardenGUIDoc.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace Rosegarden @@ -49,10 +49,10 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc, double xorigin, int barHeight, bool invert, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f): - QVBox(parent, name, f), + TQVBox(parent, name, f), m_invert(invert), m_loopRulerHeight(10), m_currentXOffset(0), @@ -75,9 +75,9 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc, (m_doc, m_rulerScale, barHeight - m_loopRulerHeight, xorigin, this); } - QObject::connect - (doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect + (doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); } @@ -95,50 +95,50 @@ void StandardRuler::connectRulerToDocPointer(RosegardenGUIDoc *doc) // pointer and loop drag signals are specific to the current view, // so they are re-emitted from the loop ruler by this widget // - QObject::connect - (m_loopRuler, SIGNAL(setPointerPosition(timeT)), - doc, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setPointerPosition(timeT)), + doc, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(setPointerPosition(timeT)), - doc, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(setPointerPosition(timeT)), + doc, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(editMarkers()), - RosegardenGUIApp::self(), SLOT(slotEditMarkers())); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(editMarkers()), + RosegardenGUIApp::self(), TQT_SLOT(slotEditMarkers())); - QObject::connect - (m_hButtonBar, SIGNAL(addMarker(timeT)), - RosegardenGUIApp::self(), SLOT(slotAddMarker(timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(addMarker(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotAddMarker(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(deleteMarker(int, timeT, QString, QString)), - RosegardenGUIApp::self(), SLOT(slotDeleteMarker(int, timeT, QString, QString))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(deleteMarker(int, timeT, TQString, TQString)), + RosegardenGUIApp::self(), TQT_SLOT(slotDeleteMarker(int, timeT, TQString, TQString))); - QObject::connect - (m_loopRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SIGNAL(dragPointerToPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SIGNAL(dragPointerToPosition(timeT))); - QObject::connect - (m_loopRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SIGNAL(dragLoopToPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SIGNAL(dragLoopToPosition(timeT))); - QObject::connect - (m_loopRuler, SIGNAL(setPlayPosition(timeT)), - RosegardenGUIApp::self(), SLOT(slotSetPlayPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setPlayPosition(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotSetPlayPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(setLoop(timeT, timeT)), - doc, SLOT(slotSetLoop(timeT, timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(setLoop(timeT, timeT)), + doc, TQT_SLOT(slotSetLoop(timeT, timeT))); - QObject::connect - (m_loopRuler, SIGNAL(setLoop(timeT, timeT)), - doc, SLOT(slotSetLoop(timeT, timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setLoop(timeT, timeT)), + doc, TQT_SLOT(slotSetLoop(timeT, timeT))); - QObject::connect - (doc, SIGNAL(loopChanged(timeT, timeT)), + TQObject::connect + (doc, TQT_SIGNAL(loopChanged(timeT, timeT)), m_loopRuler, - SLOT(slotSetLoopMarker(timeT, timeT))); + TQT_SLOT(slotSetLoopMarker(timeT, timeT))); m_loopRuler->setBackgroundColor(GUIPalette::getColour(GUIPalette::PointerRuler)); } @@ -161,11 +161,11 @@ void StandardRuler::setHScaleFactor(double dy) m_loopRuler->setHScaleFactor(dy); } -void StandardRuler::paintEvent(QPaintEvent *e) +void StandardRuler::paintEvent(TQPaintEvent *e) { m_hButtonBar->update(); m_loopRuler->update(); - QWidget::paintEvent(e); + TQWidget::paintEvent(e); } } diff --git a/src/gui/rulers/StandardRuler.h b/src/gui/rulers/StandardRuler.h index de9804d..67eb2f3 100644 --- a/src/gui/rulers/StandardRuler.h +++ b/src/gui/rulers/StandardRuler.h @@ -26,12 +26,12 @@ #ifndef _RG_STANDARDRULER_H_ #define _RG_STANDARDRULER_H_ -#include +#include #include "base/Event.h" -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: double xorigin, int buttonHeight, bool invert = false, // draw upside-down - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); @@ -86,7 +86,7 @@ signals: protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: //--------------- Data members --------------------------------- diff --git a/src/gui/rulers/TempoColour.cpp b/src/gui/rulers/TempoColour.cpp index 5ab396a..5d5a448 100644 --- a/src/gui/rulers/TempoColour.cpp +++ b/src/gui/rulers/TempoColour.cpp @@ -26,7 +26,7 @@ #include "TempoColour.h" #include "gui/general/GUIPalette.h" -#include +#include namespace Rosegarden @@ -36,7 +36,7 @@ QColor TempoColour::getColour(double tempo) { int h, s, v; - QColor c = GUIPalette::getColour(GUIPalette::TempoBase); + TQColor c = GUIPalette::getColour(GUIPalette::TempoBase); c.hsv(&h, &s, &v); v += 20; if (v > 255) @@ -49,7 +49,7 @@ TempoColour::getColour(double tempo) while (h >= 360) h -= 360; - return QColor(h, s, v, QColor::Hsv); + return TQColor(h, s, v, TQColor::Hsv); } } diff --git a/src/gui/rulers/TempoColour.h b/src/gui/rulers/TempoColour.h index be5e3fa..6e51b16 100644 --- a/src/gui/rulers/TempoColour.h +++ b/src/gui/rulers/TempoColour.h @@ -26,7 +26,7 @@ #ifndef _RG_TEMPOCOLOUR_H_ #define _RG_TEMPOCOLOUR_H_ -#include +#include @@ -45,8 +45,8 @@ public: // Get the colour for a tempo // - QColor getColour() { return getColour(m_tempo); } - static QColor getColour(double tempo); + TQColor getColour() { return getColour(m_tempo); } + static TQColor getColour(double tempo); private: diff --git a/src/gui/rulers/TempoRuler.cpp b/src/gui/rulers/TempoRuler.cpp index 270b224..554d4b2 100644 --- a/src/gui/rulers/TempoRuler.cpp +++ b/src/gui/rulers/TempoRuler.cpp @@ -44,21 +44,21 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -70,9 +70,9 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, double xorigin, int height, bool small, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -108,7 +108,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, m_font.setPixelSize(m_height / 3); m_boldFont.setPixelSize(m_height * 2 / 5); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); m_textFloat = new TextFloat(this); m_textFloat->hide(); @@ -116,46 +116,46 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, // setBackgroundColor(GUIPalette::getColour(GUIPalette::TextRulerBackground)); setBackgroundMode(Qt::NoBackground); - QObject::connect - (doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect + (doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon; - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); new KAction(i18n("Insert Tempo Change"), icon, 0, this, - SLOT(slotInsertTempoHere()), actionCollection(), + TQT_SLOT(slotInsertTempoHere()), actionCollection(), "insert_tempo_here"); new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, this, - SLOT(slotInsertTempoAtPointer()), actionCollection(), + TQT_SLOT(slotInsertTempoAtPointer()), actionCollection(), "insert_tempo_at_pointer"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-delete.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); new KAction(i18n("Delete Tempo Change"), icon, 0, this, - SLOT(slotDeleteTempoChange()), actionCollection(), + TQT_SLOT(slotDeleteTempoChange()), actionCollection(), "delete_tempo"); new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, this, - SLOT(slotRampToNext()), actionCollection(), + TQT_SLOT(slotRampToNext()), actionCollection(), "ramp_to_next"); new KAction(i18n("Un-Ramp Tempo"), 0, 0, this, - SLOT(slotUnramp()), actionCollection(), + TQT_SLOT(slotUnramp()), actionCollection(), "unramp"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-edit.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); new KAction(i18n("Edit Tempo..."), icon, 0, this, - SLOT(slotEditTempo()), actionCollection(), + TQT_SLOT(slotEditTempo()), actionCollection(), "edit_tempo"); new KAction(i18n("Edit Time Signature..."), 0, 0, this, - SLOT(slotEditTimeSignature()), actionCollection(), + TQT_SLOT(slotEditTimeSignature()), actionCollection(), "edit_time_signature"); new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, this, - SLOT(slotEditTempos()), actionCollection(), + TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); setMouseTracking(false); @@ -174,47 +174,47 @@ void TempoRuler::connectSignals() { connect(this, - SIGNAL(doubleClicked(timeT)), + TQT_SIGNAL(doubleClicked(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempos(timeT))); + TQT_SLOT(slotEditTempos(timeT))); connect(this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), RosegardenGUIApp::self(), - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); connect(this, - SIGNAL(moveTempo(timeT, + TQT_SIGNAL(moveTempo(timeT, timeT)), RosegardenGUIApp::self(), - SLOT(slotMoveTempo(timeT, + TQT_SLOT(slotMoveTempo(timeT, timeT))); connect(this, - SIGNAL(deleteTempo(timeT)), + TQT_SIGNAL(deleteTempo(timeT)), RosegardenGUIApp::self(), - SLOT(slotDeleteTempo(timeT))); + TQT_SLOT(slotDeleteTempo(timeT))); connect(this, - SIGNAL(editTempo(timeT)), + TQT_SIGNAL(editTempo(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempo(timeT))); + TQT_SLOT(slotEditTempo(timeT))); connect(this, - SIGNAL(editTimeSignature(timeT)), + TQT_SIGNAL(editTimeSignature(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTimeSignature(timeT))); + TQT_SLOT(slotEditTimeSignature(timeT))); connect(this, - SIGNAL(editTempos(timeT)), + TQT_SIGNAL(editTempos(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempos(timeT))); + TQT_SLOT(slotEditTempos(timeT))); } void @@ -239,11 +239,11 @@ TempoRuler::slotScrollHoriz(int x) } void -TempoRuler::mousePressEvent(QMouseEvent *e) +TempoRuler::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { timeT t = m_rulerScale->getTimeForX (e->x() - m_currentXOffset - m_xorigin); emit doubleClicked(t); @@ -301,14 +301,14 @@ TempoRuler::mousePressEvent(QMouseEvent *e) if (m_menu) { // enable 'delete' action only if cursor is actually over a tempo change actionCollection()->action("delete_tempo")->setEnabled(m_illuminatePoint); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } } } void -TempoRuler::mouseReleaseEvent(QMouseEvent *e) +TempoRuler::mouseReleaseEvent(TQMouseEvent *e) { if (m_dragVert) { @@ -369,7 +369,7 @@ TempoRuler::mouseReleaseEvent(QMouseEvent *e) } void -TempoRuler::mouseMoveEvent(QMouseEvent *e) +TempoRuler::mouseMoveEvent(TQMouseEvent *e) { bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0); @@ -510,17 +510,17 @@ TempoRuler::mouseMoveEvent(QMouseEvent *e) } void -TempoRuler::wheelEvent(QWheelEvent *e) +TempoRuler::wheelEvent(TQWheelEvent *e) {} void -TempoRuler::enterEvent(QEvent *) +TempoRuler::enterEvent(TQEvent *) { setMouseTracking(true); } void -TempoRuler::leaveEvent(QEvent *) +TempoRuler::leaveEvent(TQEvent *) { if (!m_dragVert && !m_dragHoriz) { setMouseTracking(false); @@ -543,7 +543,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, bool haveSet = false; - QString tempoText, timeText; + TQString tempoText, timeText; if (time >= 0) { @@ -554,7 +554,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, RealTime rt = m_composition->getElapsedRealTime(time); // blargh -- duplicated with TempoView::makeTimeString - timeText = QString("%1%2%3-%4%5-%6%7-%8%9") + timeText = TQString("%1%2%3-%4%5-%6%7-%8%9") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -565,7 +565,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, .arg(remainder / 10) .arg(remainder % 10); - timeText = QString("%1\n%2") + timeText = TQString("%1\n%2") .arg(timeText) // .arg(rt.toString().c_str()); .arg(rt.toText(true).c_str()); @@ -605,16 +605,16 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, } if (showTime && time >= 0) { - m_textFloat->setText(QString("%1\n%2").arg(timeText).arg(tempoText)); + m_textFloat->setText(TQString("%1\n%2").arg(timeText).arg(tempoText)); } else { m_textFloat->setText(tempoText); } - QPoint cp = mapFromGlobal(QPoint(QCursor::pos())); + TQPoint cp = mapFromGlobal(TQPoint(TQCursor::pos())); // std::cerr << "cp = " << cp.x() << "," << cp.y() << ", tempo = " << qpm << std::endl; - QPoint mp = cp + pos(); + TQPoint mp = cp + pos(); - QWidget *parent = parentWidget(); + TQWidget *parent = parentWidget(); while (parent->parentWidget() && !parent->isTopLevel() && !parent->isDialog()) { @@ -623,7 +623,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, } int yoff = cp.y() + m_textFloat->height() + 3; - mp = QPoint(mp.x() + 10, mp.y() > yoff ? mp.y() - yoff : 0); + mp = TQPoint(mp.x() + 10, mp.y() > yoff ? mp.y() - yoff : 0); m_textFloat->move(mp); m_textFloat->show(); @@ -637,7 +637,7 @@ TempoRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -646,7 +646,7 @@ QSize TempoRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -687,18 +687,18 @@ TempoRuler::getTempoForY(int y) } void -TempoRuler::paintEvent(QPaintEvent* e) +TempoRuler::paintEvent(TQPaintEvent* e) { - QRect clipRect = e->rect(); + TQRect clipRect = e->rect(); if (m_buffer.width() < width() || m_buffer.height() < height()) { - m_buffer = QPixmap(width(), height()); + m_buffer = TQPixmap(width(), height()); } m_buffer.fill(GUIPalette::getColour (GUIPalette::TextRulerBackground)); - QPainter paint(&m_buffer); + TQPainter paint(&m_buffer); paint.setPen(GUIPalette::getColour (GUIPalette::TextRulerForeground)); @@ -714,7 +714,7 @@ TempoRuler::paintEvent(QPaintEvent* e) timeT to = m_rulerScale->getTimeForX (clipRect.x() + clipRect.width() - m_currentXOffset + 100 - m_xorigin); - QRect boundsForHeight = m_fontMetrics.boundingRect("019"); + TQRect boundsForHeight = m_fontMetrics.boundingRect("019"); int fontHeight = boundsForHeight.height(); int textY = fontHeight + 2; @@ -800,7 +800,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paletteBackgroundColor()); } */ - QColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); + TQColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); paint.setPen(colour); paint.setBrush(colour); @@ -887,7 +887,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paint.drawLine(lastx + 1, lasty, width(), lasty); } else if (!m_refreshLinesOnly) { tempoT tempo = m_composition->getTempoAtTime(from); - QColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); + TQColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); paint.setPen(colour); paint.setBrush(colour); paint.drawRect(e->rect()); @@ -916,7 +916,7 @@ TempoRuler::paintEvent(QPaintEvent* e) TimeSignature sig = m_composition->getTimeSignatureAt(time); - QString str = QString("%1/%2") + TQString str = TQString("%1/%2") .arg(sig.getNumerator()) .arg(sig.getDenominator()); @@ -930,7 +930,7 @@ TempoRuler::paintEvent(QPaintEvent* e) long bpm = long(tempo); // long frac = long(tempo * 100 + 0.001) - 100 * bpm; - QString tempoString = QString("%1").arg(bpm); + TQString tempoString = TQString("%1").arg(bpm); if (tempo == prevTempo) { if (m_small) @@ -949,7 +949,7 @@ TempoRuler::paintEvent(QPaintEvent* e) prevTempo = tempo; prevBpm = bpm; - QRect bounds = m_fontMetrics.boundingRect(tempoString); + TQRect bounds = m_fontMetrics.boundingRect(tempoString); paint.setFont(m_font); if (time > 0) @@ -964,7 +964,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paint.end(); - QPainter dbpaint(this); + TQPainter dbpaint(this); // dbpaint.drawPixmap(0, 0, m_buffer); dbpaint.drawPixmap(clipRect.x(), clipRect.y(), m_buffer, @@ -1077,9 +1077,9 @@ TempoRuler::createMenu() KXMLGUIFactory* factory = m_parentMainWindow->factory(); factory->addClient(this); - QWidget* tmp = factory->container("tempo_ruler_menu", this); + TQWidget* tmp = factory->container("tempo_ruler_menu", this); - m_menu = dynamic_cast(tmp); + m_menu = dynamic_cast(tmp); if (!m_menu) { RG_DEBUG << "MarkerRuler::createMenu() failed\n"; diff --git a/src/gui/rulers/TempoRuler.h b/src/gui/rulers/TempoRuler.h index 1d54e9d..7bf073e 100644 --- a/src/gui/rulers/TempoRuler.h +++ b/src/gui/rulers/TempoRuler.h @@ -28,19 +28,19 @@ #include "gui/dialogs/TempoDialog.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "base/Event.h" -class QWheelEvent; -class QPopupMenu; -class QPaintEvent; -class QMouseEvent; -class QEvent; +class TQWheelEvent; +class TQPopupMenu; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; class KMainWindow; @@ -58,7 +58,7 @@ class Composition; * x-coordinates corresponding to tempo changes in a Composition. */ -class TempoRuler : public QWidget, public KXMLGUIClient +class TempoRuler : public TQWidget, public KXMLGUIClient { Q_OBJECT @@ -76,13 +76,13 @@ public: double xorigin = 0.0, int height = 0, bool small = false, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~TempoRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -119,13 +119,13 @@ protected slots: void slotEditTempos(); protected: - virtual void paintEvent(QPaintEvent *); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void wheelEvent(TQWheelEvent *); void createMenu(); @@ -165,13 +165,13 @@ private: Composition *m_composition; RulerScale *m_rulerScale; TextFloat *m_textFloat; - QPopupMenu *m_menu; + TQPopupMenu *m_menu; KMainWindow *m_parentMainWindow; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; - QPixmap m_buffer; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; + TQPixmap m_buffer; }; diff --git a/src/gui/rulers/TextRuler.cpp b/src/gui/rulers/TextRuler.cpp index 0acb3ea..4ef0569 100644 --- a/src/gui/rulers/TextRuler.cpp +++ b/src/gui/rulers/TextRuler.cpp @@ -32,12 +32,12 @@ #include "base/RulerScale.h" #include "base/Segment.h" #include "gui/general/GUIPalette.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace Rosegarden @@ -46,9 +46,9 @@ namespace Rosegarden TextRuler::TextRuler(RulerScale *rulerScale, Segment *segment, int height, - QWidget *parent, + TQWidget *parent, const char *name) - : QWidget(parent, name), + : TQWidget(parent, name), m_height(height), m_currentXOffset(0), m_width( -1), @@ -98,7 +98,7 @@ TextRuler::sizeHint() const m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()); - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -107,20 +107,20 @@ QSize TextRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } void -TextRuler::paintEvent(QPaintEvent* e) +TextRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::TextRulerForeground)); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - 100); @@ -142,7 +142,7 @@ TextRuler::paintEvent(QPaintEvent* e) continue; } - QRect bounds = m_fontMetrics.boundingRect(strtoqstr(text)); + TQRect bounds = m_fontMetrics.boundingRect(strtoqstr(text)); double x = m_rulerScale->getXForTime((*i)->getAbsoluteTime()) + m_currentXOffset - bounds.width() / 2; diff --git a/src/gui/rulers/TextRuler.h b/src/gui/rulers/TextRuler.h index 7d554cb..1e303d3 100644 --- a/src/gui/rulers/TextRuler.h +++ b/src/gui/rulers/TextRuler.h @@ -26,13 +26,13 @@ #ifndef _RG_TEXTRULER_H_ #define _RG_TEXTRULER_H_ -#include -#include -#include -#include +#include +#include +#include +#include -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -76,13 +76,13 @@ public: TextRuler(RulerScale *rulerScale, Segment *segment, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~TextRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -90,7 +90,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: int m_height; @@ -102,8 +102,8 @@ private: Segment *m_segment; RulerScale *m_rulerScale; - QFont m_font; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFontMetrics m_fontMetrics; }; diff --git a/src/gui/rulers/VelocityColour.cpp b/src/gui/rulers/VelocityColour.cpp index 02a2f90..e0e67b1 100644 --- a/src/gui/rulers/VelocityColour.cpp +++ b/src/gui/rulers/VelocityColour.cpp @@ -25,7 +25,7 @@ #include "VelocityColour.h" -#include +#include // #include @@ -33,9 +33,9 @@ namespace Rosegarden { -VelocityColour::VelocityColour(const QColor &loud, - const QColor &medium, - const QColor &quiet, +VelocityColour::VelocityColour(const TQColor &loud, + const TQColor &medium, + const TQColor &quiet, int maxValue, int loudKnee, int mediumKnee, @@ -47,7 +47,7 @@ VelocityColour::VelocityColour(const QColor &loud, m_mediumKnee(mediumKnee), m_quietKnee(quietKnee), m_maxValue(maxValue), - m_mixedColour(QColor(0, 0, 0)), // black as default + m_mixedColour(TQColor(0, 0, 0)), // black as default m_multiplyFactor(1000) { @@ -88,7 +88,7 @@ VelocityColour::VelocityColour(const QColor &loud, VelocityColour::~VelocityColour() {} -const QColor& +const TQColor& VelocityColour::getColour(int value) { if (value > m_maxValue) diff --git a/src/gui/rulers/VelocityColour.h b/src/gui/rulers/VelocityColour.h index 0e555e1..e43dd22 100644 --- a/src/gui/rulers/VelocityColour.h +++ b/src/gui/rulers/VelocityColour.h @@ -26,7 +26,7 @@ #ifndef _RG_VELOCITYCOLOUR_H_ #define _RG_VELOCITYCOLOUR_H_ -#include +#include @@ -45,39 +45,39 @@ class VelocityColour { public: - VelocityColour(const QColor &loud, - const QColor &medium, - const QColor &quiet, + VelocityColour(const TQColor &loud, + const TQColor &medium, + const TQColor &quiet, int maxValue, int loudKnee, int mediumKnee, int quietKnee); ~VelocityColour(); - const QColor& getColour(int value); + const TQColor& getColour(int value); int getLoudKnee() const { return m_loudKnee; } int getMediumKnee() const { return m_mediumKnee; } int getQuietKnee() const { return m_quietKnee; } - QColor getLoudColour() const { return m_loudColour; } - QColor getMediumColour() const { return m_mediumColour; } - QColor getQuietColour() const { return m_quietColour; } + TQColor getLoudColour() const { return m_loudColour; } + TQColor getMediumColour() const { return m_mediumColour; } + TQColor getQuietColour() const { return m_quietColour; } int getMaxValue() const { return m_maxValue; } private: - QColor m_loudColour; - QColor m_mediumColour; - QColor m_quietColour; + TQColor m_loudColour; + TQColor m_mediumColour; + TQColor m_quietColour; int m_loudKnee; int m_mediumKnee; int m_quietKnee; int m_maxValue; // the mixed colour that we can return - QColor m_mixedColour; + TQColor m_mixedColour; int m_loStartRed; -- cgit v1.2.1