diff options
Diffstat (limited to 'src/gui/rulers/PercussionPitchRuler.cpp')
-rw-r--r-- | src/gui/rulers/PercussionPitchRuler.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
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 <qcolor.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> 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; |