From 11f31c37e5fa4889d9989f10272f44845449cb7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 6 Sep 2010 20:59:29 +0000 Subject: Initial TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/rulers/PercussionPitchRuler.cpp | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/gui/rulers/PercussionPitchRuler.cpp') diff --git a/src/gui/rulers/PercussionPitchRuler.cpp b/src/gui/rulers/PercussionPitchRuler.cpp index a89ae89..48fc640 100644 --- a/src/gui/rulers/PercussionPitchRuler.cpp +++ b/src/gui/rulers/PercussionPitchRuler.cpp @@ -32,19 +32,19 @@ #include "gui/editors/matrix/MatrixView.h" #include "gui/general/MidiPitchLabel.h" #include "PitchRuler.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace Rosegarden { -PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, +PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent, const MidiKeyMapping *mapping, int lineSpacing) : PitchRuler(parent), @@ -53,30 +53,30 @@ PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, m_mouseDown(false), m_lastHoverHighlight( -1) { - m_font = new QFont(); + m_font = new TQFont(); m_font->setPixelSize(9); - m_fontMetrics = new QFontMetrics(*m_font); + m_fontMetrics = new TQFontMetrics(*m_font); m_width = m_fontMetrics->width(" A#2 Acoustic Bass Drum "); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); setMouseTracking(true); } -QSize PercussionPitchRuler::sizeHint() const +TQSize PercussionPitchRuler::sizeHint() const { - return QSize(m_width, + return TQSize(m_width, (m_lineSpacing + 1) * m_mapping->getPitchExtent()); } -QSize PercussionPitchRuler::minimumSizeHint() const +TQSize PercussionPitchRuler::minimumSizeHint() const { - return QSize(m_width, m_lineSpacing + 1); + return TQSize(m_width, m_lineSpacing + 1); } -void PercussionPitchRuler::paintEvent(QPaintEvent*) +void PercussionPitchRuler::paintEvent(TQPaintEvent*) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); @@ -109,17 +109,17 @@ void PercussionPitchRuler::paintEvent(QPaintEvent*) } } -void PercussionPitchRuler::enterEvent(QEvent *) +void PercussionPitchRuler::enterEvent(TQEvent *) {} -void PercussionPitchRuler::leaveEvent(QEvent*) +void PercussionPitchRuler::leaveEvent(TQEvent*) { // m_hoverHighlight->hide(); } void PercussionPitchRuler::drawHoverNote(int evPitch) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); if (m_lastHoverHighlight != evPitch) { @@ -132,8 +132,8 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) if (m_lastHoverHighlight >= 0) { int y = (extent - (m_lastHoverHighlight - minPitch) - 1) * (m_lineSpacing + 1); - paint.setBrush(QColor(238, 238, 224)); - paint.setPen(QColor(238, 238, 224)); + paint.setBrush(TQColor(238, 238, 224)); + 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); @@ -146,7 +146,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) m_lastHoverHighlight = evPitch; paint.setBrush(paint.pen().color()); paint.drawRect(lw + 7, y, m_width - lw, m_lineSpacing + 1); - paint.setPen(QColor(238, 238, 224)); + paint.setPen(TQColor(238, 238, 224)); std::string key = m_mapping->getMapForKeyName(evPitch); paint.drawText @@ -155,7 +155,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) } } -void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) +void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e) { // ugh @@ -176,7 +176,7 @@ void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) +void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -192,7 +192,7 @@ void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) } } -void PercussionPitchRuler::mouseReleaseEvent(QMouseEvent *e) +void PercussionPitchRuler::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; -- cgit v1.2.1