diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
commit | 458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch) | |
tree | 624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/rulers/PercussionPitchRuler.cpp | |
parent | 747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff) | |
download | rosegarden-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/PercussionPitchRuler.cpp')
-rw-r--r-- | src/gui/rulers/PercussionPitchRuler.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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; } |