summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/rulers')
-rw-r--r--src/gui/rulers/ChordNameRuler.cpp50
-rw-r--r--src/gui/rulers/ChordNameRuler.h11
-rw-r--r--src/gui/rulers/ControlItem.cpp8
-rw-r--r--src/gui/rulers/ControlItem.h4
-rw-r--r--src/gui/rulers/ControlRuler.cpp44
-rw-r--r--src/gui/rulers/ControlRuler.h9
-rw-r--r--src/gui/rulers/ControlSelector.cpp6
-rw-r--r--src/gui/rulers/ControlSelector.h4
-rw-r--r--src/gui/rulers/ControllerEventsRuler.cpp66
-rw-r--r--src/gui/rulers/ControllerEventsRuler.h8
-rw-r--r--src/gui/rulers/LoopRuler.cpp30
-rw-r--r--src/gui/rulers/LoopRuler.h7
-rw-r--r--src/gui/rulers/MarkerRuler.cpp44
-rw-r--r--src/gui/rulers/MarkerRuler.h9
-rw-r--r--src/gui/rulers/PercussionPitchRuler.cpp24
-rw-r--r--src/gui/rulers/PercussionPitchRuler.h7
-rw-r--r--src/gui/rulers/PitchRuler.cpp16
-rw-r--r--src/gui/rulers/PitchRuler.h9
-rw-r--r--src/gui/rulers/PropertyBox.cpp12
-rw-r--r--src/gui/rulers/PropertyBox.h9
-rw-r--r--src/gui/rulers/PropertyControlRuler.cpp48
-rw-r--r--src/gui/rulers/PropertyControlRuler.h4
-rw-r--r--src/gui/rulers/PropertyViewRuler.cpp18
-rw-r--r--src/gui/rulers/PropertyViewRuler.h7
-rw-r--r--src/gui/rulers/RawNoteRuler.cpp52
-rw-r--r--src/gui/rulers/RawNoteRuler.h15
-rw-r--r--src/gui/rulers/StandardRuler.cpp4
-rw-r--r--src/gui/rulers/StandardRuler.h5
-rw-r--r--src/gui/rulers/TempoColour.cpp2
-rw-r--r--src/gui/rulers/TempoRuler.cpp122
-rw-r--r--src/gui/rulers/TempoRuler.h11
-rw-r--r--src/gui/rulers/TextRuler.cpp16
-rw-r--r--src/gui/rulers/TextRuler.h9
-rw-r--r--src/gui/rulers/VelocityColour.h2
34 files changed, 352 insertions, 340 deletions
diff --git a/src/gui/rulers/ChordNameRuler.cpp b/src/gui/rulers/ChordNameRuler.cpp
index 001d5fd..121d911 100644
--- a/src/gui/rulers/ChordNameRuler.cpp
+++ b/src/gui/rulers/ChordNameRuler.cpp
@@ -62,9 +62,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
RosegardenGUIDoc *doc,
double xorigin,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -103,9 +103,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
std::vector<Segment *> &segments,
double xorigin,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -182,15 +182,15 @@ ChordNameRuler::slotScrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
-QSize
-ChordNameRuler::sizeHint() const
+TQSize
+ChordNameRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -203,8 +203,8 @@ ChordNameRuler::sizeHint() const
return res;
}
-QSize
-ChordNameRuler::minimumSizeHint() const
+TQSize
+ChordNameRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0);
TQSize res = TQSize(int(firstBarWidth), m_height);
@@ -231,8 +231,8 @@ ChordNameRuler::recalculate(timeT from, timeT to)
} else if (m_regetSegmentsOnChange) {
- RefreshStatus &rs =
- m_composition->getRefreshStatus(m_compositionRefreshStatusId);
+ RefreshtqStatus &rs =
+ m_composition->getRefreshtqStatus(m_compositionRefreshStatusId);
if (rs.needsRefresh()) {
rs.setNeedsRefresh(false);
@@ -304,15 +304,15 @@ ChordNameRuler::recalculate(timeT from, timeT to)
if (m_segments.empty())
return ;
- SegmentRefreshStatus overallStatus;
- overallStatus.setNeedsRefresh(false);
+ SegmentRefreshtqStatus overalltqStatus;
+ overalltqStatus.setNeedsRefresh(false);
for (SegmentRefreshMap::iterator i = m_segments.begin();
i != m_segments.end(); ++i) {
- SegmentRefreshStatus &status =
- i->first->getRefreshStatus(i->second);
+ SegmentRefreshtqStatus &status =
+ i->first->getRefreshtqStatus(i->second);
if (status.needsRefresh()) {
- overallStatus.push(status.from(), status.to());
+ overalltqStatus.push(status.from(), status.to());
}
}
@@ -326,17 +326,17 @@ ChordNameRuler::recalculate(timeT from, timeT to)
if (from == to) {
NOTATION_DEBUG << "ChordNameRuler::recalculate: from==to, recalculating all" << endl;
level = RecalcWhole;
- } else if (overallStatus.from() == overallStatus.to()) {
- NOTATION_DEBUG << "ChordNameRuler::recalculate: overallStatus.from==overallStatus.to, ignoring" << endl;
+ } else if (overalltqStatus.from() == overalltqStatus.to()) {
+ NOTATION_DEBUG << "ChordNameRuler::recalculate: overalltqStatus.from==overalltqStatus.to, ignoring" << endl;
level = RecalcNone;
- } else if (overallStatus.from() >= from && overallStatus.to() <= to) {
- NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl;
+ } else if (overalltqStatus.from() >= from && overalltqStatus.to() <= to) {
+ NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl;
level = RecalcVisible;
- } else if (overallStatus.from() >= to || overallStatus.to() <= from) {
- NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl;
+ } else if (overalltqStatus.from() >= to || overalltqStatus.to() <= from) {
+ NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl;
level = RecalcNone;
} else {
- NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl;
+ NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl;
level = RecalcWhole;
}
}
@@ -346,7 +346,7 @@ ChordNameRuler::recalculate(timeT from, timeT to)
for (SegmentRefreshMap::iterator i = m_segments.begin();
i != m_segments.end(); ++i) {
- i->first->getRefreshStatus(i->second).setNeedsRefresh(false);
+ i->first->getRefreshtqStatus(i->second).setNeedsRefresh(false);
}
if (!m_currentSegment) { //!!! arbitrary, must do better
diff --git a/src/gui/rulers/ChordNameRuler.h b/src/gui/rulers/ChordNameRuler.h
index 988b1f4..1b77ae0 100644
--- a/src/gui/rulers/ChordNameRuler.h
+++ b/src/gui/rulers/ChordNameRuler.h
@@ -54,9 +54,10 @@ class Composition;
* describing the chords in a composition.
*/
-class ChordNameRuler : public QWidget
+class ChordNameRuler : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -69,7 +70,7 @@ public:
RosegardenGUIDoc *doc,
double xorigin = 0.0,
int height = 0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
/**
@@ -83,7 +84,7 @@ public:
std::vector<Segment *> &segments,
double xorigin = 0.0,
int height = 0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~ChordNameRuler();
@@ -97,8 +98,8 @@ public:
// may have one of these (to avoid using percussion tracks in chords):
void setStudio(Studio *studio);
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; }
diff --git a/src/gui/rulers/ControlItem.cpp b/src/gui/rulers/ControlItem.cpp
index 8eb17ed..332542e 100644
--- a/src/gui/rulers/ControlItem.cpp
+++ b/src/gui/rulers/ControlItem.cpp
@@ -44,8 +44,8 @@ ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter,
width = DefaultWidth/4; // avoid invisible zero-duration items
}
setWidth(width);
- setPen(TQPen(Qt::black, BorderThickness));
- setBrush(Qt::blue);
+ setPen(TQPen(TQt::black, BorderThickness));
+ setBrush(TQt::blue);
setX(xx);
setY(canvas()->height());
@@ -186,8 +186,8 @@ void ControlItem::setSelected(bool s)
{
TQCanvasItem::setSelected(s);
- if (s) setPen(TQPen(Qt::red, BorderThickness));
- else setPen(TQPen(Qt::black, BorderThickness));
+ if (s) setPen(TQPen(TQt::red, BorderThickness));
+ else setPen(TQPen(TQt::black, BorderThickness));
canvas()->update();
}
diff --git a/src/gui/rulers/ControlItem.h b/src/gui/rulers/ControlItem.h
index e90a06d..2aea4b8 100644
--- a/src/gui/rulers/ControlItem.h
+++ b/src/gui/rulers/ControlItem.h
@@ -29,7 +29,7 @@ namespace Rosegarden {
class ControlRuler;
class ElementAdapter;
-class ControlItem : public QCanvasRectangle
+class ControlItem : public TQCanvasRectangle
{
public:
ControlItem(ControlRuler* controlRuler,
@@ -54,7 +54,7 @@ public:
virtual void setSelected(bool yes);
- /// recompute height according to represented value prior to a canvas repaint
+ /// recompute height according to represented value prior to a canvas tqrepaint
virtual void updateFromValue();
/// update value according to height after a user edit
diff --git a/src/gui/rulers/ControlRuler.cpp b/src/gui/rulers/ControlRuler.cpp
index 7fea1fc..c728093 100644
--- a/src/gui/rulers/ControlRuler.cpp
+++ b/src/gui/rulers/ControlRuler.cpp
@@ -62,11 +62,11 @@ const int ControlRuler::ItemHeightRange = 64;
ControlRuler::ControlRuler(Segment *segment,
RulerScale* rulerScale,
- EditViewBase* parentView,
- TQCanvas* c, TQWidget* parent,
+ EditViewBase* tqparentView,
+ TQCanvas* c, TQWidget* tqparent,
const char* name, WFlags f) :
- RosegardenCanvasView(c, parent, name, f),
- m_parentEditView(parentView),
+ RosegardenCanvasView(c, tqparent, name, f),
+ m_tqparentEditView(tqparentView),
m_mainHorizontalScrollBar(0),
m_rulerScale(rulerScale),
m_eventSelection(new EventSelection(*segment)),
@@ -84,12 +84,12 @@ ControlRuler::ControlRuler(Segment *segment,
{
setHScrollBarMode(TQScrollView::AlwaysOff);
- m_selectionRect->setPen(Qt::red);
+ m_selectionRect->setPen(TQt::red);
- setFixedHeight(sizeHint().height());
+ setFixedHeight(tqsizeHint().height());
connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)),
- m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool)));
+ m_tqparentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool)));
m_numberFloat = new TextFloat(this);
m_numberFloat->hide();
@@ -113,7 +113,7 @@ void ControlRuler::slotUpdate()
canvas()->setAllChanged(); // TODO: be a bit more subtle, call setChanged(<time area>)
canvas()->update();
- repaint();
+ tqrepaint();
}
void ControlRuler::slotUpdateElementsHPos()
@@ -127,13 +127,13 @@ void ControlRuler::slotUpdateElementsHPos()
ControlItem* item = dynamic_cast<ControlItem*>(*it);
if (!item)
continue;
- layoutItem(item);
+ tqlayoutItem(item);
}
canvas()->update();
}
-void ControlRuler::layoutItem(ControlItem* item)
+void ControlRuler::tqlayoutItem(ControlItem* item)
{
timeT itemTime = item->getElementAdapter()->getTime();
@@ -146,7 +146,7 @@ void ControlRuler::layoutItem(ControlItem* item)
item->setWidth(width);
- // RG_DEBUG << "ControlRuler::layoutItem ControlItem x = " << x << " - width = " << width << endl;
+ // RG_DEBUG << "ControlRuler::tqlayoutItem ControlItem x = " << x << " - width = " << width << endl;
}
void ControlRuler::setControlTool(ControlTool* tool)
@@ -186,7 +186,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e)
// clear selection unless control was pressed, in which case
// add the event to the current selection
- if (!(e->state() && TQMouseEvent::ControlButton)) {
+ if (!(e->state() && TQ_ControlButton)) {
clearSelectedItems();
}
@@ -216,7 +216,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e)
} else { // select it
- if (!(e->state() && TQMouseEvent::ControlButton)) {
+ if (!(e->state() && TQ_ControlButton)) {
if (item->z() > topItem->z())
topItem = item;
@@ -231,7 +231,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e)
}
}
- if (topItem && !m_selectedItems.contains(topItem)) { // select the top item
+ if (topItem && !m_selectedItems.tqcontains(topItem)) { // select the top item
m_selectedItems << topItem;
topItem->setSelected(true);
topItem->handleMouseButtonPress(e);
@@ -281,7 +281,7 @@ void ControlRuler::contentsMouseReleaseEvent(TQMouseEvent* e)
m_eventSelection->getEndTime());
RG_DEBUG << "ControlRuler::contentsMouseReleaseEvent : adding command\n";
- m_parentEditView->addCommandToHistory(command);
+ m_tqparentEditView->addCommandToHistory(command);
m_itemMoved = false;
}
@@ -308,9 +308,9 @@ void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e)
// Borrowed from Rotary - compute total position within window
//
- TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0));
+ TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0));
- int scrollX = dynamic_cast<EditView*>(m_parentEditView)->getRawCanvasView()->
+ int scrollX = dynamic_cast<EditView*>(m_tqparentEditView)->getRawCanvasView()->
horizontalScrollBar()->value();
/*
@@ -335,7 +335,7 @@ void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e)
// set value to highest in selection
if (item->getValue() >= value) {
value = item->getValue();
- m_numberFloat->setText(TQString("%1").arg(value));
+ m_numberFloat->setText(TQString("%1").tqarg(value));
}
}
}
@@ -393,16 +393,16 @@ void ControlRuler::createMenu()
{
RG_DEBUG << "ControlRuler::createMenu()\n";
- KMainWindow* parentMainWindow = dynamic_cast<KMainWindow*>(topLevelWidget());
+ KMainWindow* tqparentMainWindow = dynamic_cast<KMainWindow*>(tqtopLevelWidget());
- if (parentMainWindow && parentMainWindow->factory()) {
- m_menu = static_cast<TQPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow));
+ if (tqparentMainWindow && tqparentMainWindow->factory()) {
+ m_menu = static_cast<TQPopupMenu*>(tqparentMainWindow->factory()->container(m_menuName, tqparentMainWindow));
if (!m_menu) {
RG_DEBUG << "ControlRuler::createMenu() failed\n";
}
} else {
- RG_DEBUG << "ControlRuler::createMenu() failed: no parent factory\n";
+ RG_DEBUG << "ControlRuler::createMenu() failed: no tqparent factory\n";
}
}
diff --git a/src/gui/rulers/ControlRuler.h b/src/gui/rulers/ControlRuler.h
index d9f4882..8bdf200 100644
--- a/src/gui/rulers/ControlRuler.h
+++ b/src/gui/rulers/ControlRuler.h
@@ -63,15 +63,16 @@ class EditViewBase;
class ControlRuler : public RosegardenCanvasView, public SegmentObserver
{
Q_OBJECT
+ TQ_OBJECT
friend class ControlItem;
public:
ControlRuler(Segment*,
RulerScale*,
- EditViewBase* parentView,
+ EditViewBase* tqparentView,
TQCanvas*,
- TQWidget* parent=0, const char* name=0, WFlags f=0);
+ TQWidget* tqparent=0, const char* name=0, WFlags f=0);
virtual ~ControlRuler();
virtual TQString getName() = 0;
@@ -121,7 +122,7 @@ protected:
virtual void computeStaffOffset() {};
- virtual void layoutItem(ControlItem*);
+ virtual void tqlayoutItem(ControlItem*);
@@ -144,7 +145,7 @@ protected:
//--------------- Data members ---------------------------------
- EditViewBase* m_parentEditView;
+ EditViewBase* m_tqparentEditView;
TQScrollBar* m_mainHorizontalScrollBar;
RulerScale* m_rulerScale;
EventSelection* m_eventSelection;
diff --git a/src/gui/rulers/ControlSelector.cpp b/src/gui/rulers/ControlSelector.cpp
index 15e2814..7f36234 100644
--- a/src/gui/rulers/ControlSelector.cpp
+++ b/src/gui/rulers/ControlSelector.cpp
@@ -29,9 +29,9 @@
namespace Rosegarden {
-ControlSelector::ControlSelector(ControlRuler* parent)
- : TQObject(parent),
- m_ruler(parent)
+ControlSelector::ControlSelector(ControlRuler* tqparent)
+ : TQObject(tqparent),
+ m_ruler(tqparent)
{
}
diff --git a/src/gui/rulers/ControlSelector.h b/src/gui/rulers/ControlSelector.h
index 9b01785..8ad1917 100644
--- a/src/gui/rulers/ControlSelector.h
+++ b/src/gui/rulers/ControlSelector.h
@@ -38,10 +38,10 @@ namespace Rosegarden {
* Allow the user to select several ControlItems so he can change them
* all at the same time
*/
-class ControlSelector : public QObject
+class ControlSelector : public TQObject
{
public:
- ControlSelector(ControlRuler* parent);
+ ControlSelector(ControlRuler* tqparent);
virtual ~ControlSelector() {};
virtual void handleMouseButtonPress(TQMouseEvent *e);
diff --git a/src/gui/rulers/ControllerEventsRuler.cpp b/src/gui/rulers/ControllerEventsRuler.cpp
index 3cb6788..6fe95e6 100644
--- a/src/gui/rulers/ControllerEventsRuler.cpp
+++ b/src/gui/rulers/ControllerEventsRuler.cpp
@@ -57,12 +57,12 @@ namespace Rosegarden
ControllerEventsRuler::ControllerEventsRuler(Segment *segment,
RulerScale* rulerScale,
- EditViewBase* parentView,
+ EditViewBase* tqparentView,
TQCanvas* c,
- TQWidget* parent,
+ TQWidget* tqparent,
const ControlParameter *controller,
const char* name, WFlags f)
- : ControlRuler(segment, rulerScale, parentView, c, parent, name, f),
+ : ControlRuler(segment, rulerScale, tqparentView, c, tqparent, name, f),
m_defaultItemWidth(20),
m_controlLine(new TQCanvasLine(canvas())),
m_controlLineShowing(false),
@@ -143,9 +143,9 @@ ControllerEventsRuler::drawBackground()
// Draw some minimum and maximum controller value guide lines
//
TQCanvasLine *topLine = new TQCanvasLine(canvas());
- TQCanvasLine *topQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *topTQLine = new TQCanvasLine(canvas());
TQCanvasLine *midLine = new TQCanvasLine(canvas());
- TQCanvasLine *botQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *botTQLine = new TQCanvasLine(canvas());
TQCanvasLine *bottomLine = new TQCanvasLine(canvas());
//m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY);
int cHeight = canvas()->height();
@@ -156,20 +156,20 @@ ControllerEventsRuler::drawBackground()
topLine->setZ( -10);
topLine->show();
- topQLine->setPen(TQColor(192, 192, 192));
- topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4);
- topQLine->setZ( -10);
- topQLine->show();
+ topTQLine->setPen(TQColor(192, 192, 192));
+ topTQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4);
+ topTQLine->setZ( -10);
+ topTQLine->show();
midLine->setPen(TQColor(127, 127, 127));
midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2);
midLine->setZ( -10);
midLine->show();
- botQLine->setPen(TQColor(192, 192, 192));
- botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4);
- botQLine->setZ( -10);
- botQLine->show();
+ botTQLine->setPen(TQColor(192, 192, 192));
+ botTQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4);
+ botTQLine->setZ( -10);
+ botTQLine->show();
bottomLine->setPen(TQColor(127, 127, 127));
bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1);
@@ -191,9 +191,9 @@ TQString ControllerEventsRuler::getName()
TQString hexValue;
hexValue.sprintf("0x%x", m_controller->getControllerValue());
- name = TQString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName()))
- .arg(int(m_controller->getControllerValue()))
- .arg(hexValue);
+ name = TQString("%1 (%2 / %3)").tqarg(strtoqstr(m_controller->getName()))
+ .tqarg(int(m_controller->getControllerValue()))
+ .tqarg(hexValue);
} else if (m_controller->getType() == PitchBend::EventType) {
name = i18n("Pitch Bend");
}
@@ -274,7 +274,7 @@ void ControllerEventsRuler::insertControllerEvent()
number = m_controller->getControllerValue();
} else {
bool ok = false;
- TQIntValidator intValidator(0, 128, this);
+ TQIntValidator intValidator(0, 128, TQT_TQOBJECT(this));
TQString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0",
&ok, this, &intValidator);
if (ok)
@@ -286,7 +286,7 @@ void ControllerEventsRuler::insertControllerEvent()
insertTime, number,
initialValue, *m_segment);
- m_parentEditView->addCommandToHistory(command);
+ m_tqparentEditView->addCommandToHistory(command);
}
void ControllerEventsRuler::eraseControllerEvent()
@@ -298,7 +298,7 @@ void ControllerEventsRuler::eraseControllerEvent()
*m_segment,
m_eventSelection->getStartTime(),
m_eventSelection->getEndTime());
- m_parentEditView->addCommandToHistory(command);
+ m_tqparentEditView->addCommandToHistory(command);
updateSelection();
}
@@ -329,20 +329,20 @@ void ControllerEventsRuler::clearControllerEvents()
}
EraseCommand *command = new EraseCommand(*es);
- m_parentEditView->addCommandToHistory(command);
+ m_tqparentEditView->addCommandToHistory(command);
}
void ControllerEventsRuler::startControlLine()
{
m_controlLineShowing = true;
- this->setCursor(Qt::pointingHandCursor);
+ this->setCursor(TQt::pointingHandCursor);
}
void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e)
{
if (!m_controlLineShowing) {
- if (e->button() == MidButton)
+ if (e->button() == Qt::MidButton)
m_lastEventPos = inverseMapPoint(e->pos());
ControlRuler::contentsMousePressEvent(e); // send super
@@ -351,15 +351,15 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e)
}
// cancel control line mode
- if (e->button() == RightButton) {
+ if (e->button() == Qt::RightButton) {
m_controlLineShowing = false;
m_controlLine->hide();
- this->setCursor(Qt::arrowCursor);
+ this->setCursor(TQt::arrowCursor);
return ;
}
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
TQPoint p = inverseMapPoint(e->pos());
m_controlLine->show();
@@ -373,7 +373,7 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e)
void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if (!m_controlLineShowing) {
- if (e->button() == MidButton)
+ if (e->button() == Qt::MidButton)
insertControllerEvent();
ControlRuler::contentsMouseReleaseEvent(e); // send super
@@ -395,11 +395,11 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
<< ", endValue = " << endValue
<< endl;
- drawControlLine(startTime, endTime, startValue, endValue);
+ tqdrawControlLine(startTime, endTime, startValue, endValue);
m_controlLineShowing = false;
m_controlLine->hide();
- this->setCursor(Qt::arrowCursor);
+ this->setCursor(TQt::arrowCursor);
canvas()->update();
}
}
@@ -409,7 +409,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e)
if (!m_controlLineShowing) {
// Don't send super if we're using the middle button
//
- if (e->button() == MidButton) {
+ if (e->button() == Qt::MidButton) {
m_lastEventPos = inverseMapPoint(e->pos());
return ;
}
@@ -425,7 +425,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e)
}
-void ControllerEventsRuler::layoutItem(ControlItem* item)
+void ControllerEventsRuler::tqlayoutItem(ControlItem* item)
{
timeT itemTime = item->getElementAdapter()->getTime();
@@ -440,12 +440,12 @@ void ControllerEventsRuler::layoutItem(ControlItem* item)
item->setWidth(width);
- //RG_DEBUG << "ControllerEventsRuler::layoutItem ControlItem x = " << x
+ //RG_DEBUG << "ControllerEventsRuler::tqlayoutItem ControlItem x = " << x
//<< " - width = " << width << endl;
}
void
-ControllerEventsRuler::drawControlLine(timeT startTime,
+ControllerEventsRuler::tqdrawControlLine(timeT startTime,
timeT endTime,
int startValue,
int endValue)
@@ -493,7 +493,7 @@ ControllerEventsRuler::drawControlLine(timeT startTime,
time += quantDur;
}
- m_parentEditView->addCommandToHistory(macro);
+ m_tqparentEditView->addCommandToHistory(macro);
}
}
diff --git a/src/gui/rulers/ControllerEventsRuler.h b/src/gui/rulers/ControllerEventsRuler.h
index 9f077fc..877cf4e 100644
--- a/src/gui/rulers/ControllerEventsRuler.h
+++ b/src/gui/rulers/ControllerEventsRuler.h
@@ -56,9 +56,9 @@ class ControllerEventsRuler : public ControlRuler
public:
ControllerEventsRuler(Segment*,
RulerScale*,
- EditViewBase* parentView,
+ EditViewBase* tqparentView,
TQCanvas*,
- TQWidget* parent=0,
+ TQWidget* tqparent=0,
const ControlParameter *controller = 0,
const char* name=0, WFlags f=0);
@@ -94,9 +94,9 @@ protected:
virtual void contentsMouseReleaseEvent(TQMouseEvent*);
virtual void contentsMouseMoveEvent(TQMouseEvent*);
- virtual void layoutItem(ControlItem*);
+ virtual void tqlayoutItem(ControlItem*);
- void drawControlLine(timeT startTime,
+ void tqdrawControlLine(timeT startTime,
timeT endTime,
int startValue,
int endValue);
diff --git a/src/gui/rulers/LoopRuler.cpp b/src/gui/rulers/LoopRuler.cpp
index 0a0adb2..fec733b 100644
--- a/src/gui/rulers/LoopRuler.cpp
+++ b/src/gui/rulers/LoopRuler.cpp
@@ -51,9 +51,9 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc,
int height,
double xorigin,
bool invert,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_doc(doc),
m_height(height),
m_xorigin(xorigin),
@@ -71,7 +71,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc,
{
/*
* I need to understand if this ruler is being built for the main
- * window (Track Editor) or for any of the segment editors. Apparently
+ * window (Track Editor) or for any of the segment editors. Aptqparently
* the name parameter is supplied (non-NULL) only for the main window.
* I can't find of any other (more decent) way to do this. Sorry.
*/
@@ -103,7 +103,7 @@ void LoopRuler::scrollHoriz(int x)
{
if (getHScaleFactor() != 1.0) {
m_currentXOffset = static_cast<int>( -x / getHScaleFactor());
- repaint();
+ tqrepaint();
return;
}
@@ -118,14 +118,14 @@ void LoopRuler::scrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
-TQSize LoopRuler::sizeHint() const
+TQSize LoopRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -137,7 +137,7 @@ TQSize LoopRuler::sizeHint() const
return res;
}
-TQSize LoopRuler::minimumSizeHint() const
+TQSize LoopRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
@@ -156,7 +156,7 @@ void LoopRuler::paintEvent(TQPaintEvent* e)
paint.setClipRegion(e->region());
paint.setClipRect(e->rect().normalize());
- paint.setBrush(colorGroup().foreground());
+ paint.setBrush(tqcolorGroup().foreground());
drawBarSections(&paint);
drawLoopMarker(&paint);
@@ -255,10 +255,10 @@ LoopRuler::mousePressEvent(TQMouseEvent *mE)
{
RG_DEBUG << "LoopRuler::mousePressEvent: x = " << mE->x() << endl;
- Qt::ButtonState bs = mE->state();
- setLoopingMode((bs & Qt::ShiftButton) != 0);
+ TQt::ButtonState bs = mE->state();
+ setLoopingMode((bs & TQt::ShiftButton) != 0);
- if (mE->button() == LeftButton) {
+ if (mE->button() == Qt::LeftButton) {
double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin;
if (m_loopingMode) {
@@ -280,7 +280,7 @@ LoopRuler::mousePressEvent(TQMouseEvent *mE)
void
LoopRuler::mouseReleaseEvent(TQMouseEvent *mE)
{
- if (mE->button() == LeftButton) {
+ if (mE->button() == Qt::LeftButton) {
if (m_loopingMode) {
// Cancel the loop if there was no drag
//
@@ -321,7 +321,7 @@ LoopRuler::mouseDoubleClickEvent(TQMouseEvent *mE)
RG_DEBUG << "LoopRuler::mouseDoubleClickEvent: x = " << x << ", looping = " << m_loopingMode << endl;
- if (mE->button() == LeftButton && !m_loopingMode)
+ if (mE->button() == Qt::LeftButton && !m_loopingMode)
emit setPlayPosition(m_grid->snapX(x));
}
@@ -352,7 +352,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop,
m_endLoop = endLoop;
TQPainter paint(this);
- paint.setBrush(colorGroup().foreground());
+ paint.setBrush(tqcolorGroup().foreground());
drawBarSections(&paint);
drawLoopMarker(&paint);
diff --git a/src/gui/rulers/LoopRuler.h b/src/gui/rulers/LoopRuler.h
index dfe88ae..ac397fe 100644
--- a/src/gui/rulers/LoopRuler.h
+++ b/src/gui/rulers/LoopRuler.h
@@ -54,6 +54,7 @@ class RosegardenGUIDoc;
class LoopRuler : public TQWidget, public HZoomable
{
Q_OBJECT
+ TQ_OBJECT
public:
LoopRuler(RosegardenGUIDoc *doc,
@@ -61,15 +62,15 @@ public:
int height = 0,
double xorigin = 0.0,
bool invert = false,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~LoopRuler();
void setSnapGrid(SnapGrid *grid);
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void scrollHoriz(int x);
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();
diff --git a/src/gui/rulers/MarkerRuler.h b/src/gui/rulers/MarkerRuler.h
index 29c90d0..6d99d68 100644
--- a/src/gui/rulers/MarkerRuler.h
+++ b/src/gui/rulers/MarkerRuler.h
@@ -50,20 +50,21 @@ class RosegardenGUIDoc;
class MarkerRuler : public TQWidget, public HZoomable, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
MarkerRuler(RosegardenGUIDoc *doc,
RulerScale *rulerScale,
int buttonHeight,
double xorigin = 0.0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char* name = 0,
WFlags f=0);
virtual ~MarkerRuler();
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void scrollHoriz(int x);
@@ -111,7 +112,7 @@ protected:
RosegardenGUIDoc *m_doc;
RulerScale *m_rulerScale;
- KMainWindow* m_parentMainWindow;
+ KMainWindow* m_tqparentMainWindow;
};
diff --git a/src/gui/rulers/PercussionPitchRuler.cpp b/src/gui/rulers/PercussionPitchRuler.cpp
index 48fc640..e72cf4e 100644
--- a/src/gui/rulers/PercussionPitchRuler.cpp
+++ b/src/gui/rulers/PercussionPitchRuler.cpp
@@ -44,10 +44,10 @@
namespace Rosegarden
{
-PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent,
+PercussionPitchRuler::PercussionPitchRuler(TQWidget *tqparent,
const MidiKeyMapping *mapping,
int lineSpacing) :
- PitchRuler(parent),
+ PitchRuler(tqparent),
m_mapping(mapping),
m_lineSpacing(lineSpacing),
m_mouseDown(false),
@@ -63,13 +63,13 @@ PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent,
setMouseTracking(true);
}
-TQSize PercussionPitchRuler::sizeHint() const
+TQSize PercussionPitchRuler::tqsizeHint() const
{
return TQSize(m_width,
(m_lineSpacing + 1) * m_mapping->getPitchExtent());
}
-TQSize PercussionPitchRuler::minimumSizeHint() const
+TQSize PercussionPitchRuler::tqminimumSizeHint() const
{
return TQSize(m_width, m_lineSpacing + 1);
}
@@ -95,12 +95,12 @@ void PercussionPitchRuler::paintEvent(TQPaintEvent*)
MidiPitchLabel label(minPitch + i);
std::string key = m_mapping->getMapForKeyName(minPitch + i);
- RG_DEBUG << i << ": " << label.getQString() << ": " << key << endl;
+ RG_DEBUG << i << ": " << label.getTQString() << ": " << key << endl;
paint.drawText
(2, (extent - i - 1) * (m_lineSpacing + 1) +
m_fontMetrics->ascent() + 1,
- label.getQString());
+ label.getTQString());
paint.drawText
(9 + lw, (extent - i - 1) * (m_lineSpacing + 1) +
@@ -136,7 +136,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch)
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);
+ paint.setPen(TQt::black);
paint.drawText
(9 + lw, y + m_fontMetrics->ascent() + 1,
strtoqstr(key));
@@ -159,7 +159,7 @@ void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e)
{
// ugh
- MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget());
+ MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget());
if (matrixView) {
MatrixStaff *staff = matrixView->getStaff(0);
if (staff) {
@@ -178,12 +178,12 @@ void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e)
void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e)
{
- Qt::ButtonState bs = e->state();
+ TQt::ButtonState bs = e->state();
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
m_mouseDown = true;
- m_selecting = (bs & Qt::ShiftButton);
+ m_selecting = (bs & TQt::ShiftButton);
if (m_selecting)
emit keySelected(e->y(), false);
@@ -194,7 +194,7 @@ void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e)
void PercussionPitchRuler::mouseReleaseEvent(TQMouseEvent *e)
{
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
m_mouseDown = false;
m_selecting = false;
}
diff --git a/src/gui/rulers/PercussionPitchRuler.h b/src/gui/rulers/PercussionPitchRuler.h
index 44fcd86..53d1adc 100644
--- a/src/gui/rulers/PercussionPitchRuler.h
+++ b/src/gui/rulers/PercussionPitchRuler.h
@@ -47,13 +47,14 @@ class MidiKeyMapping;
class PercussionPitchRuler : public PitchRuler
{
Q_OBJECT
+ TQ_OBJECT
public:
- PercussionPitchRuler(TQWidget *parent,
+ PercussionPitchRuler(TQWidget *tqparent,
const MidiKeyMapping *mapping,
int lineSpacing);
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void drawHoverNote(int evPitch);
diff --git a/src/gui/rulers/PitchRuler.cpp b/src/gui/rulers/PitchRuler.cpp
index baa06cd..b771c18 100644
--- a/src/gui/rulers/PitchRuler.cpp
+++ b/src/gui/rulers/PitchRuler.cpp
@@ -33,22 +33,22 @@ namespace Rosegarden
{
PitchRuler::
-PitchRuler(TQWidget *parent) :
- TQWidget(parent)
+PitchRuler(TQWidget *tqparent) :
+ TQWidget(tqparent)
{
// nothing else
}
-QSize
-PitchRuler::sizeHint() const
+TQSize
+PitchRuler::tqsizeHint() const
{
- return TQWidget::sizeHint();
+ return TQWidget::tqsizeHint();
}
-QSize
-PitchRuler::minimumSizeHint() const
+TQSize
+PitchRuler::tqminimumSizeHint() const
{
- return TQWidget::minimumSizeHint();
+ return TQWidget::tqminimumSizeHint();
}
}
diff --git a/src/gui/rulers/PitchRuler.h b/src/gui/rulers/PitchRuler.h
index 2562096..fd07bdf 100644
--- a/src/gui/rulers/PitchRuler.h
+++ b/src/gui/rulers/PitchRuler.h
@@ -37,14 +37,15 @@ namespace Rosegarden
-class PitchRuler : public QWidget
+class PitchRuler : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PitchRuler(TQWidget *parent);
+ PitchRuler(TQWidget *tqparent);
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
virtual void drawHoverNote(int evPitch) = 0;
diff --git a/src/gui/rulers/PropertyBox.cpp b/src/gui/rulers/PropertyBox.cpp
index 7037b64..1a21dcf 100644
--- a/src/gui/rulers/PropertyBox.cpp
+++ b/src/gui/rulers/PropertyBox.cpp
@@ -38,22 +38,22 @@ namespace Rosegarden
PropertyBox::PropertyBox(TQString label,
int width,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name):
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_label(label),
m_width(width),
m_height(height)
{}
-QSize
-PropertyBox::sizeHint() const
+TQSize
+PropertyBox::tqsizeHint() const
{
return TQSize(m_width, m_height);
}
-QSize
-PropertyBox::minimumSizeHint() const
+TQSize
+PropertyBox::tqminimumSizeHint() const
{
return TQSize(m_width, m_height);
}
diff --git a/src/gui/rulers/PropertyBox.h b/src/gui/rulers/PropertyBox.h
index 73e17b7..2b26428 100644
--- a/src/gui/rulers/PropertyBox.h
+++ b/src/gui/rulers/PropertyBox.h
@@ -44,19 +44,20 @@ namespace Rosegarden
* and provide extra information or options.
*
*/
-class PropertyBox : public QWidget
+class PropertyBox : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyBox(TQString label,
int width,
int height,
- TQWidget *parent=0,
+ TQWidget *tqparent=0,
const char *name = 0);
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
protected:
virtual void paintEvent(TQPaintEvent *);
diff --git a/src/gui/rulers/PropertyControlRuler.cpp b/src/gui/rulers/PropertyControlRuler.cpp
index a597820..4a01cb0 100644
--- a/src/gui/rulers/PropertyControlRuler.cpp
+++ b/src/gui/rulers/PropertyControlRuler.cpp
@@ -54,11 +54,11 @@ namespace Rosegarden
PropertyControlRuler::PropertyControlRuler(PropertyName propertyName,
Staff* staff,
RulerScale* rulerScale,
- EditViewBase* parentView,
- TQCanvas* c, TQWidget* parent,
+ EditViewBase* tqparentView,
+ TQCanvas* c, TQWidget* tqparent,
const char* name, WFlags f) :
ControlRuler(&(staff->getSegment()), rulerScale,
- parentView, c, parent, name, f),
+ tqparentView, c, tqparent, name, f),
m_propertyName(propertyName),
m_staff(staff),
m_propertyLine(new TQCanvasLine(canvas())),
@@ -98,9 +98,9 @@ PropertyControlRuler::drawBackground()
// Draw some minimum and maximum controller value guide lines
//
TQCanvasLine *topLine = new TQCanvasLine(canvas());
- TQCanvasLine *topQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *topTQLine = new TQCanvasLine(canvas());
TQCanvasLine *midLine = new TQCanvasLine(canvas());
- TQCanvasLine *botQLine = new TQCanvasLine(canvas());
+ TQCanvasLine *botTQLine = new TQCanvasLine(canvas());
TQCanvasLine *bottomLine = new TQCanvasLine(canvas());
//m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY);
int cHeight = canvas()->height();
@@ -111,20 +111,20 @@ PropertyControlRuler::drawBackground()
topLine->setZ( -10);
topLine->show();
- topQLine->setPen(TQColor(192, 192, 192));
- topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4);
- topQLine->setZ( -10);
- topQLine->show();
+ topTQLine->setPen(TQColor(192, 192, 192));
+ topTQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4);
+ topTQLine->setZ( -10);
+ topTQLine->show();
midLine->setPen(TQColor(127, 127, 127));
midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2);
midLine->setZ( -10);
midLine->show();
- botQLine->setPen(TQColor(192, 192, 192));
- botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4);
- botQLine->setZ( -10);
- botQLine->show();
+ botTQLine->setPen(TQColor(192, 192, 192));
+ botTQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4);
+ botTQLine->setZ( -10);
+ botTQLine->show();
bottomLine->setPen(TQColor(127, 127, 127));
bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1);
@@ -229,7 +229,7 @@ void PropertyControlRuler::startPropertyLine()
{
RG_DEBUG << "PropertyControlRuler::startPropertyLine\n";
m_propertyLineShowing = true;
- this->setCursor(Qt::pointingHandCursor);
+ this->setCursor(TQt::pointingHandCursor);
}
void
@@ -238,7 +238,7 @@ PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e)
RG_DEBUG << "PropertyControlRuler::contentsMousePressEvent\n";
if (!m_propertyLineShowing) {
- if (e->button() == MidButton)
+ if (e->button() == Qt::MidButton)
m_lastEventPos = inverseMapPoint(e->pos());
ControlRuler::contentsMousePressEvent(e); // send super
@@ -247,15 +247,15 @@ PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e)
}
// cancel control line mode
- if (e->button() == RightButton) {
+ if (e->button() == Qt::RightButton) {
m_propertyLineShowing = false;
m_propertyLine->hide();
- this->setCursor(Qt::arrowCursor);
+ this->setCursor(TQt::arrowCursor);
return ;
}
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
TQPoint p = inverseMapPoint(e->pos());
m_propertyLine->show();
@@ -274,7 +274,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
/*
if (m_propertyLineShowing)
{
- this->setCursor(Qt::arrowCursor);
+ this->setCursor(TQt::arrowCursor);
m_propertyLineShowing = false;
canvas()->update();
}
@@ -308,7 +308,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
m_propertyLineShowing = false;
m_propertyLine->hide();
- this->setCursor(Qt::arrowCursor);
+ this->setCursor(TQt::arrowCursor);
canvas()->update();
}
}
@@ -321,7 +321,7 @@ PropertyControlRuler::contentsMouseMoveEvent(TQMouseEvent *e)
if (!m_propertyLineShowing) {
// Don't send super if we're using the middle button
//
- if (e->button() == MidButton) {
+ if (e->button() == Qt::MidButton) {
m_lastEventPos = inverseMapPoint(e->pos());
return ;
}
@@ -380,7 +380,7 @@ PropertyControlRuler::drawPropertyLine(timeT startTime,
EventSelection selection(*m_segment, startTime, endTime, true);
PropertyPattern pattern = DecrescendoPattern;
- bool haveNotes = selection.contains(Note::EventType);
+ bool haveNotes = selection.tqcontains(Note::EventType);
if (haveNotes) {
@@ -391,7 +391,7 @@ PropertyControlRuler::drawPropertyLine(timeT startTime,
startValue,
endValue);
- m_parentEditView->addCommandToHistory(command);
+ m_tqparentEditView->addCommandToHistory(command);
} else {
@@ -408,7 +408,7 @@ PropertyControlRuler::selectAllProperties()
/*
for(Segment::iterator i = m_segment.begin();
i != m_segment.end(); ++i)
- if (!m_eventSelection->contains(*i)) m_eventSelection->addEvent(*i);
+ if (!m_eventSelection->tqcontains(*i)) m_eventSelection->addEvent(*i);
*/
clearSelectedItems();
diff --git a/src/gui/rulers/PropertyControlRuler.h b/src/gui/rulers/PropertyControlRuler.h
index db1d698..0db8446 100644
--- a/src/gui/rulers/PropertyControlRuler.h
+++ b/src/gui/rulers/PropertyControlRuler.h
@@ -60,9 +60,9 @@ public:
PropertyControlRuler(PropertyName propertyName,
Staff*,
RulerScale*,
- EditViewBase* parentView,
+ EditViewBase* tqparentView,
TQCanvas*,
- TQWidget* parent=0, const char* name=0, WFlags f=0);
+ TQWidget* tqparent=0, const char* name=0, WFlags f=0);
virtual ~PropertyControlRuler();
diff --git a/src/gui/rulers/PropertyViewRuler.cpp b/src/gui/rulers/PropertyViewRuler.cpp
index 0365ae8..e871f16 100644
--- a/src/gui/rulers/PropertyViewRuler.cpp
+++ b/src/gui/rulers/PropertyViewRuler.cpp
@@ -52,9 +52,9 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale,
const PropertyName &property,
double xorigin,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_propertyName(property),
m_xorigin(xorigin),
m_height(height),
@@ -69,7 +69,7 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale,
setBackgroundColor(GUIPalette::getColour(GUIPalette::SegmentCanvas));
- TQString tip = i18n("%1 controller").arg(strtoqstr(property));
+ TQString tip = i18n("%1 controller").tqarg(strtoqstr(property));
TQToolTip::add
(this, tip);
}
@@ -94,15 +94,15 @@ PropertyViewRuler::slotScrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
-QSize
-PropertyViewRuler::sizeHint() const
+TQSize
+PropertyViewRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -114,8 +114,8 @@ PropertyViewRuler::sizeHint() const
return res;
}
-QSize
-PropertyViewRuler::minimumSizeHint() const
+TQSize
+PropertyViewRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height);
diff --git a/src/gui/rulers/PropertyViewRuler.h b/src/gui/rulers/PropertyViewRuler.h
index 19ac410..5640bf6 100644
--- a/src/gui/rulers/PropertyViewRuler.h
+++ b/src/gui/rulers/PropertyViewRuler.h
@@ -51,6 +51,7 @@ class RulerScale;
class PropertyViewRuler : public TQWidget, public HZoomable
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyViewRuler(RulerScale *rulerScale,
@@ -58,13 +59,13 @@ public:
const PropertyName &property,
double xorigin = 0.0,
int height = 0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~PropertyViewRuler();
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; }
diff --git a/src/gui/rulers/RawNoteRuler.cpp b/src/gui/rulers/RawNoteRuler.cpp
index adfca44..ee159c1 100644
--- a/src/gui/rulers/RawNoteRuler.cpp
+++ b/src/gui/rulers/RawNoteRuler.cpp
@@ -50,9 +50,9 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale,
Segment *segment,
double xorigin,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -86,15 +86,15 @@ RawNoteRuler::slotScrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
-QSize
-RawNoteRuler::sizeHint() const
+TQSize
+RawNoteRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -106,8 +106,8 @@ RawNoteRuler::sizeHint() const
return res;
}
-QSize
-RawNoteRuler::minimumSizeHint() const
+TQSize
+RawNoteRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height);
@@ -182,7 +182,7 @@ RawNoteRuler::addChildren(Segment *s,
else
rightmost = j;
- node->children.push_back(subnode);
+ node->tqchildren.push_back(subnode);
j = s->findTime(jex.second);
}
@@ -263,8 +263,8 @@ RawNoteRuler::dumpSubtree(EventTreeNode *node, int depth)
else {
std::cerr << "no-pitch]" << std::endl;
}
- for (EventTreeNode::NodeList::iterator i = node->children.begin();
- i != node->children.end(); ++i) {
+ for (EventTreeNode::NodeList::iterator i = node->tqchildren.begin();
+ i != node->tqchildren.end(); ++i) {
dumpSubtree(*i, depth + 1);
}
#endif
@@ -292,14 +292,14 @@ RawNoteRuler::dumpForest(EventTreeNode::NodeList *forest)
int
RawNoteRuler::EventTreeNode::getDepth()
{
- int subchildrenDepth = 0;
- for (NodeList::iterator i = children.begin();
- i != children.end(); ++i) {
+ int subtqchildrenDepth = 0;
+ for (NodeList::iterator i = tqchildren.begin();
+ i != tqchildren.end(); ++i) {
int subchildDepth = (*i)->getDepth();
- if (subchildDepth > subchildrenDepth)
- subchildrenDepth = subchildDepth;
+ if (subchildDepth > subtqchildrenDepth)
+ subtqchildrenDepth = subchildDepth;
}
- return subchildrenDepth + 1;
+ return subtqchildrenDepth + 1;
}
int
@@ -312,8 +312,8 @@ RawNoteRuler::EventTreeNode::getChildrenAboveOrBelow(bool below, int p)
int max = 0;
- for (NodeList::iterator i = children.begin();
- i != children.end(); ++i) {
+ for (NodeList::iterator i = tqchildren.begin();
+ i != tqchildren.end(); ++i) {
int forThisChild = (*i)->getChildrenAboveOrBelow(below, pitch);
long thisChildPitch = pitch;
(*(*i)->node)->get
@@ -339,7 +339,7 @@ RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc,
int below = node->getChildrenAboveOrBelow(true);
- NOTATION_DEBUG << "RawNoteRuler::drawNode: children above: "
+ NOTATION_DEBUG << "RawNoteRuler::drawNode: tqchildren above: "
<< above << ", below: " << below << endl;
#endif
@@ -414,8 +414,8 @@ RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc,
paint.drawLine(ui0, iy + 1, ui0, iy + ih - 1);
paint.drawLine(ui1 - 1, iy + 1, ui1 - 1, iy + ih - 1);
- for (EventTreeNode::NodeList::iterator i = node->children.begin();
- i != node->children.end(); ++i) {
+ for (EventTreeNode::NodeList::iterator i = node->tqchildren.begin();
+ i != node->tqchildren.end(); ++i) {
long nodePitch = myPitch;
(*(*i)->node)->get
@@ -451,9 +451,9 @@ RawNoteRuler::paintEvent(TQPaintEvent* e)
trackPosition = track->getPosition();
TQToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)")
- .arg(trackPosition + 1)
- .arg(m_segment->getLabel())
- .arg(m_segment->getRuntimeId()));
+ .tqarg(trackPosition + 1)
+ .tqarg(m_segment->getLabel().c_str())
+ .tqarg(m_segment->getRuntimeId()));
}
// START_TIMING;
@@ -559,7 +559,7 @@ RawNoteRuler::paintEvent(TQPaintEvent* e)
// at a time when no other notes are playing (at least of
// those that started no earlier than the paint start time).
// Each node in that tree represents a note that starts
- // playing during its parent node's note, or at the same time
+ // playing during its tqparent node's note, or at the same time
// as it.
drawNode(paint, *DefaultVelocityColour::getInstance(), *fi, m_height - 3, 2);
diff --git a/src/gui/rulers/RawNoteRuler.h b/src/gui/rulers/RawNoteRuler.h
index 8ced771..fc62946 100644
--- a/src/gui/rulers/RawNoteRuler.h
+++ b/src/gui/rulers/RawNoteRuler.h
@@ -52,16 +52,17 @@ class DefaultVelocityColour;
* It has no editing function (yet?)
*/
-class RawNoteRuler : public QWidget
+class RawNoteRuler : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
RawNoteRuler(RulerScale *rulerScale,
Segment *segment,
double xorigin = 0.0,
int height = 0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~RawNoteRuler();
@@ -70,8 +71,8 @@ public:
m_segment = segment;
}
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; }
@@ -96,8 +97,8 @@ private:
EventTreeNode(Segment::iterator n) : node(n) { }
~EventTreeNode() {
- for (NodeList::iterator i = children.begin();
- i != children.end(); ++i) {
+ for (NodeList::iterator i = tqchildren.begin();
+ i != tqchildren.end(); ++i) {
delete *i;
}
}
@@ -106,7 +107,7 @@ private:
int getChildrenAboveOrBelow(bool below = false, int pitch = -1);
Segment::iterator node;
- NodeList children;
+ NodeList tqchildren;
};
std::pair<timeT, timeT> getExtents(Segment::iterator);
diff --git a/src/gui/rulers/StandardRuler.cpp b/src/gui/rulers/StandardRuler.cpp
index 4869d84..2f7dc72 100644
--- a/src/gui/rulers/StandardRuler.cpp
+++ b/src/gui/rulers/StandardRuler.cpp
@@ -49,10 +49,10 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc,
double xorigin,
int barHeight,
bool invert,
- TQWidget* parent,
+ TQWidget* tqparent,
const char* name,
WFlags f):
- TQVBox(parent, name, f),
+ TQVBox(tqparent, name, f),
m_invert(invert),
m_loopRulerHeight(10),
m_currentXOffset(0),
diff --git a/src/gui/rulers/StandardRuler.h b/src/gui/rulers/StandardRuler.h
index 67eb2f3..f41fc24 100644
--- a/src/gui/rulers/StandardRuler.h
+++ b/src/gui/rulers/StandardRuler.h
@@ -44,9 +44,10 @@ class MarkerRuler;
class SnapGrid;
-class StandardRuler : public QVBox
+class StandardRuler : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
StandardRuler(RosegardenGUIDoc *doc,
@@ -54,7 +55,7 @@ public:
double xorigin,
int buttonHeight,
bool invert = false, // draw upside-down
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char* name = 0,
WFlags f=0);
diff --git a/src/gui/rulers/TempoColour.cpp b/src/gui/rulers/TempoColour.cpp
index 5d5a448..0be644f 100644
--- a/src/gui/rulers/TempoColour.cpp
+++ b/src/gui/rulers/TempoColour.cpp
@@ -32,7 +32,7 @@
namespace Rosegarden
{
-QColor
+TQColor
TempoColour::getColour(double tempo)
{
int h, s, v;
diff --git a/src/gui/rulers/TempoRuler.cpp b/src/gui/rulers/TempoRuler.cpp
index 554d4b2..f5f600a 100644
--- a/src/gui/rulers/TempoRuler.cpp
+++ b/src/gui/rulers/TempoRuler.cpp
@@ -66,13 +66,13 @@ namespace Rosegarden
TempoRuler::TempoRuler(RulerScale *rulerScale,
RosegardenGUIDoc *doc,
- KMainWindow *parentMainWindow,
+ KMainWindow *tqparentMainWindow,
double xorigin,
int height,
bool small,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name) :
- TQWidget(parent, name),
+ TQWidget(tqparent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -96,7 +96,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale,
m_composition(&doc->getComposition()),
m_rulerScale(rulerScale),
m_menu(0),
- m_parentMainWindow(parentMainWindow),
+ m_tqparentMainWindow(tqparentMainWindow),
m_fontMetrics(m_boldFont)
{
// m_font.setPointSize(m_small ? 9 : 11);
@@ -114,7 +114,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale,
m_textFloat->hide();
// setBackgroundColor(GUIPalette::getColour(GUIPalette::TextRulerBackground));
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
TQObject::connect
(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()),
@@ -124,37 +124,37 @@ TempoRuler::TempoRuler(RulerScale *rulerScale,
TQIconSet icon;
icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
- new KAction(i18n("Insert Tempo Change"), icon, 0, this,
+ new KAction(i18n("Insert Tempo Change"), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInsertTempoHere()), actionCollection(),
"insert_tempo_here");
- new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, this,
+ new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotInsertTempoAtPointer()), actionCollection(),
"insert_tempo_at_pointer");
icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png"));
- new KAction(i18n("Delete Tempo Change"), icon, 0, this,
+ new KAction(i18n("Delete Tempo Change"), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotDeleteTempoChange()), actionCollection(),
"delete_tempo");
- new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, this,
+ new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotRampToNext()), actionCollection(),
"ramp_to_next");
- new KAction(i18n("Un-Ramp Tempo"), 0, 0, this,
+ new KAction(i18n("Un-Ramp Tempo"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotUnramp()), actionCollection(),
"unramp");
icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png"));
- new KAction(i18n("Edit Tempo..."), icon, 0, this,
+ new KAction(i18n("Edit Tempo..."), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotEditTempo()), actionCollection(),
"edit_tempo");
- new KAction(i18n("Edit Time Signature..."), 0, 0, this,
+ new KAction(i18n("Edit Time Signature..."), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotEditTimeSignature()), actionCollection(),
"edit_time_signature");
- new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, this,
+ new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotEditTempos()), actionCollection(),
"edit_tempos");
@@ -165,7 +165,7 @@ TempoRuler::~TempoRuler()
{
// 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);
}
@@ -231,17 +231,17 @@ TempoRuler::slotScrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
void
TempoRuler::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
if (e->type() == TQEvent::MouseButtonDblClick) {
timeT t = m_rulerScale->getTimeForX
@@ -269,13 +269,13 @@ TempoRuler::mousePressEvent(TQMouseEvent *e)
m_dragStartTarget = tr.first ? tr.second : -1;
m_dragOriginalTempo = m_dragStartTempo;
m_dragOriginalTarget = m_dragStartTarget;
- m_dragFine = ((e->state() & Qt::ShiftButton) != 0);
+ m_dragFine = ((e->state() & TQt::ShiftButton) != 0);
int px = m_rulerScale->getXForTime(tc.first) + m_currentXOffset + m_xorigin;
if (x >= px && x < px + 5) {
m_dragHoriz = true;
m_dragVert = false;
- setCursor(Qt::SplitHCursor);
+ setCursor(TQt::SplitHCursor);
} else {
timeT nt = m_composition->getEndMarker();
if (tcn < m_composition->getTempoChangeCount() - 1) {
@@ -284,16 +284,16 @@ TempoRuler::mousePressEvent(TQMouseEvent *e)
int nx = m_rulerScale->getXForTime(nt) + m_currentXOffset + m_xorigin;
if (x > px + 5 && x > nx - 5) {
m_dragTarget = true;
- setCursor(Qt::SizeVerCursor);
+ setCursor(TQt::SizeVerCursor);
} else {
m_dragTarget = false;
- setCursor(Qt::SplitVCursor);
+ setCursor(TQt::SplitVCursor);
}
m_dragVert = true;
m_dragHoriz = false;
}
- } else if (e->button() == RightButton) {
+ } else if (e->button() == Qt::RightButton) {
m_clickX = e->x();
if (!m_menu)
@@ -371,7 +371,7 @@ TempoRuler::mouseReleaseEvent(TQMouseEvent *e)
void
TempoRuler::mouseMoveEvent(TQMouseEvent *e)
{
- bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0);
+ bool shiftPressed = ((e->state() & TQt::ShiftButton) != 0);
if (m_dragVert) {
@@ -555,20 +555,20 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
// blargh -- duplicated with TempoView::makeTimeString
timeText = TQString("%1%2%3-%4%5-%6%7-%8%9")
- .arg(bar / 100)
- .arg((bar % 100) / 10)
- .arg(bar % 10)
- .arg(beat / 10)
- .arg(beat % 10)
- .arg(fraction / 10)
- .arg(fraction % 10)
- .arg(remainder / 10)
- .arg(remainder % 10);
+ .tqarg(bar / 100)
+ .tqarg((bar % 100) / 10)
+ .tqarg(bar % 10)
+ .tqarg(beat / 10)
+ .tqarg(beat % 10)
+ .tqarg(fraction / 10)
+ .tqarg(fraction % 10)
+ .tqarg(remainder / 10)
+ .tqarg(remainder % 10);
timeText = TQString("%1\n%2")
- .arg(timeText)
- // .arg(rt.toString().c_str());
- .arg(rt.toText(true).c_str());
+ .tqarg(timeText)
+ // .tqarg(rt.toString().c_str());
+ .tqarg(rt.toText(true).c_str());
}
TimeSignature sig =
@@ -586,14 +586,14 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
int b00 = int(bpm * 100 + 0.0001) % 10;
tempoText = i18n("%1.%2%3 (%4.%5%6 bpm)")
- .arg(qi).arg(q0).arg(q00)
- .arg(bi).arg(b0).arg(b00);
+ .tqarg(qi).tqarg(q0).tqarg(q00)
+ .tqarg(bi).tqarg(b0).tqarg(b00);
haveSet = true;
}
}
if (!haveSet) {
- tempoText = i18n("%1.%2%3 bpm").arg(qi).arg(q0).arg(q00);
+ tempoText = i18n("%1.%2%3 bpm").tqarg(qi).tqarg(q0).tqarg(q00);
}
if (target > 0 && target != tempo) {
@@ -601,11 +601,11 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
int tqi = int(tq + 0.0001);
int tq0 = int(tq * 10 + 0.0001) % 10;
int tq00 = int(tq * 100 + 0.0001) % 10;
- tempoText = i18n("%1 - %2.%3%4").arg(tempoText).arg(tqi).arg(tq0).arg(tq00);
+ tempoText = i18n("%1 - %2.%3%4").tqarg(tempoText).tqarg(tqi).tqarg(tq0).tqarg(tq00);
}
if (showTime && time >= 0) {
- m_textFloat->setText(TQString("%1\n%2").arg(timeText).arg(tempoText));
+ m_textFloat->setText(TQString("%1\n%2").tqarg(timeText).tqarg(tempoText));
} else {
m_textFloat->setText(tempoText);
}
@@ -614,12 +614,12 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
// std::cerr << "cp = " << cp.x() << "," << cp.y() << ", tempo = " << qpm << std::endl;
TQPoint mp = cp + pos();
- TQWidget *parent = parentWidget();
- while (parent->parentWidget() &&
- !parent->isTopLevel() &&
- !parent->isDialog()) {
- mp += parent->pos();
- parent = parent->parentWidget();
+ TQWidget *tqparent = tqparentWidget();
+ while (tqparent->tqparentWidget() &&
+ !tqparent->isTopLevel() &&
+ !tqparent->isDialog()) {
+ mp += tqparent->pos();
+ tqparent = tqparent->tqparentWidget();
}
int yoff = cp.y() + m_textFloat->height() + 3;
@@ -629,8 +629,8 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
m_textFloat->show();
}
-QSize
-TempoRuler::sizeHint() const
+TQSize
+TempoRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -642,8 +642,8 @@ TempoRuler::sizeHint() const
return res;
}
-QSize
-TempoRuler::minimumSizeHint() const
+TQSize
+TempoRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height);
@@ -829,7 +829,7 @@ TempoRuler::paintEvent(TQPaintEvent* e)
bool illuminateLine = (illuminate &&
!m_illuminatePoint && !m_illuminateTarget);
- paint.setPen(illuminateLine ? Qt::white : Qt::black);
+ paint.setPen(illuminateLine ? TQt::white : TQt::black);
if (ramping.first) {
ry = getYForTempo(ramping.second);
@@ -846,7 +846,7 @@ TempoRuler::paintEvent(TQPaintEvent* e)
if (!illuminateLine && illuminate && m_illuminateTarget) {
if (x > lastx) {
- paint.setPen(Qt::white);
+ paint.setPen(TQt::white);
paint.drawLine(x - 6, ry - ((ry - lasty) * 6) / (x - lastx),
x - 2, ry);
}
@@ -858,10 +858,10 @@ TempoRuler::paintEvent(TQPaintEvent* e)
bool illuminatePoint = (illuminate && m_illuminatePoint);
- paint.setPen(illuminatePoint ? Qt::white : Qt::black);
+ paint.setPen(illuminatePoint ? TQt::white : TQt::black);
paint.drawRect(x - 1, y - 1, 3, 3);
- paint.setPen(illuminatePoint ? Qt::black : Qt::white);
+ paint.setPen(illuminatePoint ? TQt::black : TQt::white);
paint.drawPoint(x, y);
}
@@ -883,7 +883,7 @@ TempoRuler::paintEvent(TQPaintEvent* e)
if (haveSome) {
bool illuminateLine = (illuminate && !m_illuminatePoint);
- paint.setPen(illuminateLine ? Qt::white : Qt::black);
+ paint.setPen(illuminateLine ? TQt::white : TQt::black);
paint.drawLine(lastx + 1, lasty, width(), lasty);
} else if (!m_refreshLinesOnly) {
tempoT tempo = m_composition->getTempoAtTime(from);
@@ -893,8 +893,8 @@ TempoRuler::paintEvent(TQPaintEvent* e)
paint.drawRect(e->rect());
}
- paint.setPen(Qt::black);
- paint.setBrush(Qt::black);
+ paint.setPen(TQt::black);
+ paint.setBrush(TQt::black);
paint.drawLine(0, 0, width(), 0);
for (TimePoints::iterator i = timePoints.begin();
@@ -917,8 +917,8 @@ TempoRuler::paintEvent(TQPaintEvent* e)
m_composition->getTimeSignatureAt(time);
TQString str = TQString("%1/%2")
- .arg(sig.getNumerator())
- .arg(sig.getDenominator());
+ .tqarg(sig.getNumerator())
+ .tqarg(sig.getDenominator());
paint.setFont(m_boldFont);
paint.drawText(static_cast<int>(x) + 2, m_height - 2, str);
@@ -930,7 +930,7 @@ TempoRuler::paintEvent(TQPaintEvent* e)
long bpm = long(tempo);
// long frac = long(tempo * 100 + 0.001) - 100 * bpm;
- TQString tempoString = TQString("%1").arg(bpm);
+ TQString tempoString = TQString("%1").tqarg(bpm);
if (tempo == prevTempo) {
if (m_small)
@@ -1074,7 +1074,7 @@ TempoRuler::createMenu()
{
setXMLFile("temporuler.rc");
- KXMLGUIFactory* factory = m_parentMainWindow->factory();
+ KXMLGUIFactory* factory = m_tqparentMainWindow->factory();
factory->addClient(this);
TQWidget* tmp = factory->container("tempo_ruler_menu", this);
diff --git a/src/gui/rulers/TempoRuler.h b/src/gui/rulers/TempoRuler.h
index 7bf073e..ce51213 100644
--- a/src/gui/rulers/TempoRuler.h
+++ b/src/gui/rulers/TempoRuler.h
@@ -61,6 +61,7 @@ class Composition;
class TempoRuler : public TQWidget, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -72,17 +73,17 @@ public:
*/
TempoRuler(RulerScale *rulerScale,
RosegardenGUIDoc *doc,
- KMainWindow *parentMainWindow,
+ KMainWindow *tqparentMainWindow,
double xorigin = 0.0,
int height = 0,
bool small = false,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~TempoRuler();
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; }
@@ -166,7 +167,7 @@ private:
RulerScale *m_rulerScale;
TextFloat *m_textFloat;
TQPopupMenu *m_menu;
- KMainWindow *m_parentMainWindow;
+ KMainWindow *m_tqparentMainWindow;
TQFont m_font;
TQFont m_boldFont;
diff --git a/src/gui/rulers/TextRuler.cpp b/src/gui/rulers/TextRuler.cpp
index 4ef0569..d5db081 100644
--- a/src/gui/rulers/TextRuler.cpp
+++ b/src/gui/rulers/TextRuler.cpp
@@ -46,9 +46,9 @@ namespace Rosegarden
TextRuler::TextRuler(RulerScale *rulerScale,
Segment *segment,
int height,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQWidget(parent, name),
+ : TQWidget(tqparent, name),
m_height(height),
m_currentXOffset(0),
m_width( -1),
@@ -84,15 +84,15 @@ TextRuler::slotScrollHoriz(int x)
if (dx > 0) { // moving right, so the existing stuff moves left
bitBlt(this, 0, 0, this, dx, 0, w - dx, h);
- repaint(w - dx, 0, dx, h);
+ tqrepaint(w - dx, 0, dx, h);
} else { // moving left, so the existing stuff moves right
bitBlt(this, -dx, 0, this, 0, 0, w + dx, h);
- repaint(0, 0, -dx, h);
+ tqrepaint(0, 0, -dx, h);
}
}
-QSize
-TextRuler::sizeHint() const
+TQSize
+TextRuler::tqsizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@@ -103,8 +103,8 @@ TextRuler::sizeHint() const
return res;
}
-QSize
-TextRuler::minimumSizeHint() const
+TQSize
+TextRuler::tqminimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0);
TQSize res = TQSize(int(firstBarWidth), m_height);
diff --git a/src/gui/rulers/TextRuler.h b/src/gui/rulers/TextRuler.h
index 1e303d3..90b9aea 100644
--- a/src/gui/rulers/TextRuler.h
+++ b/src/gui/rulers/TextRuler.h
@@ -55,9 +55,10 @@ class RulerScale;
* associated with a staff.
*/
-class TextRuler : public QWidget
+class TextRuler : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -76,13 +77,13 @@ public:
TextRuler(RulerScale *rulerScale,
Segment *segment,
int height = 0,
- TQWidget* parent = 0,
+ TQWidget* tqparent = 0,
const char *name = 0);
~TextRuler();
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; }
diff --git a/src/gui/rulers/VelocityColour.h b/src/gui/rulers/VelocityColour.h
index e43dd22..291fb7f 100644
--- a/src/gui/rulers/VelocityColour.h
+++ b/src/gui/rulers/VelocityColour.h
@@ -37,7 +37,7 @@ namespace Rosegarden
/**
- * Returns a QColour according to a formula. We provide three colours
+ * Returns a TQColour according to a formula. We provide three colours
* to mix, a maximum value and three knees at which points the
* intermediate colours max out. Play around to your satisfaction.
*/