diff options
Diffstat (limited to 'src/gui/rulers/PropertyControlRuler.cpp')
-rw-r--r-- | src/gui/rulers/PropertyControlRuler.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
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 <qcanvas.h> -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqwidget.h> 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<ControlItem*>(*it)) { ViewElementAdapter * adapter = dynamic_cast<ViewElementAdapter*>(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<ControlItem*>(*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<ControlItem*>(*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<ControlItem*>(*it)) { ElementAdapter* adapter = item->getElementAdapter(); |