summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers/RawNoteRuler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/rulers/RawNoteRuler.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/rulers/RawNoteRuler.cpp')
-rw-r--r--src/gui/rulers/RawNoteRuler.cpp52
1 files changed, 26 insertions, 26 deletions
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);