diff options
Diffstat (limited to 'src/gui/rulers/MarkerRuler.cpp')
-rw-r--r-- | src/gui/rulers/MarkerRuler.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/rulers/MarkerRuler.cpp b/src/gui/rulers/MarkerRuler.cpp index 5d328a8..f572e64 100644 --- a/src/gui/rulers/MarkerRuler.cpp +++ b/src/gui/rulers/MarkerRuler.cpp @@ -61,10 +61,10 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, RulerScale *rulerScale, int barHeight, double xorigin, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f) - : TQWidget(parent, name, f), + : TQWidget(tqparent, name, f), m_barHeight(barHeight), m_xorigin(xorigin), m_currentXOffset(0), @@ -73,16 +73,16 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, m_menu(0), m_doc(doc), m_rulerScale(rulerScale), - m_parentMainWindow(dynamic_cast<KMainWindow*>(doc->parent())) + m_tqparentMainWindow(dynamic_cast<KMainWindow*>(doc->tqparent())) { - // If the parent window has a main window above it, we need to use - // that as the parent main window, not the document's parent. + // If the tqparent window has a main window above it, we need to use + // that as the tqparent main window, not the document's tqparent. // Otherwise we'll end up adding all actions to the same // (document-level) action collection regardless of which window // we're in. - TQObject *probe = parent; - while (probe && !dynamic_cast<KMainWindow *>(probe)) probe = probe->parent(); - if (probe) m_parentMainWindow = dynamic_cast<KMainWindow *>(probe); + TQObject *probe = TQT_TQOBJECT(tqparent); + while (probe && !dynamic_cast<KMainWindow *>(probe)) probe = probe->tqparent(); + if (probe) m_tqparentMainWindow = dynamic_cast<KMainWindow *>(probe); // m_barFont = new TQFont("helvetica", 12); // m_barFont->setPixelSize(12); @@ -97,21 +97,21 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, // don't become more event-specific in future... icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); - new KAction(i18n("Insert Marker"), icon, 0, this, + new KAction(i18n("Insert Marker"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertMarkerHere()), actionCollection(), "insert_marker_here"); - new KAction(i18n("Insert Marker at Playback Position"), 0, this, + new KAction(i18n("Insert Marker at Playback Position"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), "insert_marker_at_pointer"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); - new KAction(i18n("Delete Marker"), icon, 0, this, + new KAction(i18n("Delete Marker"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteMarker()), actionCollection(), "delete_marker"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); - new KAction(i18n("Edit Marker..."), icon, 0, this, + new KAction(i18n("Edit Marker..."), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditMarker()), actionCollection(), "edit_marker"); @@ -124,7 +124,7 @@ MarkerRuler::~MarkerRuler() delete m_barFont; // we have to do this so that the menu is re-created properly // when the main window is itself recreated (on a File->New for instance) - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); if (factory) factory->removeClient(this); } @@ -134,7 +134,7 @@ MarkerRuler::createMenu() { setXMLFile("markerruler.rc"); - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); factory->addClient(this); TQWidget* tmp = factory->container("marker_ruler_menu", this); @@ -156,11 +156,11 @@ void MarkerRuler::scrollHoriz(int x) { m_currentXOffset = static_cast<int>( -x / getHScaleFactor()); - repaint(); + tqrepaint(); } TQSize -MarkerRuler::sizeHint() const +MarkerRuler::tqsizeHint() const { int lastBar = m_rulerScale->getLastVisibleBar(); @@ -172,7 +172,7 @@ MarkerRuler::sizeHint() const } TQSize -MarkerRuler::minimumSizeHint() const +MarkerRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; @@ -201,8 +201,8 @@ MarkerRuler::slotDeleteMarker() if (marker) emit deleteMarker(marker->getID(), marker->getTime(), - marker->getName(), - marker->getDescription()); + marker->getName().c_str(), + marker->getDescription().c_str()); } void @@ -366,7 +366,7 @@ MarkerRuler::paintEvent(TQPaintEvent*) painter.setWorldXForm(false); if (i >= 0) - painter.drawText(textDrawPoint, TQString("%1").arg(i + 1)); + painter.drawText(textDrawPoint, TQString("%1").tqarg(i + 1)); painter.setWorldXForm(enableXForm); } else { @@ -432,7 +432,7 @@ MarkerRuler::mousePressEvent(TQMouseEvent *e) // if right-click, show popup menu // - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { if (!m_menu) createMenu(); if (m_menu) { @@ -443,7 +443,7 @@ MarkerRuler::mousePressEvent(TQMouseEvent *e) return; } - bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0); + bool shiftPressed = ((e->state() & TQt::ShiftButton) != 0); Composition &comp = m_doc->getComposition(); Composition::markercontainer markers = comp.getMarkers(); |