diff options
Diffstat (limited to 'src/gui/editors/matrix/PianoKeyboard.cpp')
-rw-r--r-- | src/gui/editors/matrix/PianoKeyboard.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index e4641d0..47f8413 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -31,13 +31,13 @@ #include "gui/rulers/PitchRuler.h" #include "MatrixStaff.h" #include "MatrixView.h" -#include <qcolor.h> -#include <qcursor.h> -#include <qevent.h> -#include <qfont.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden @@ -46,32 +46,32 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(QWidget *parent, int keys) +PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) : PitchRuler(parent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), m_mouseDown(false), - m_hoverHighlight(new QWidget(this)), + m_hoverHighlight(new TQWidget(this)), m_lastHoverHighlight(0), m_lastKeyPressed(0) { m_hoverHighlight->hide(); m_hoverHighlight->setPaletteBackgroundColor(GUIPalette::getColour(GUIPalette::MatrixKeyboardFocus)); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); computeKeyPos(); setMouseTracking(true); } -QSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::sizeHint() const { - return QSize(m_keySize.width(), + return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -QSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::minimumSizeHint() const { return m_keySize; } @@ -125,15 +125,15 @@ void PianoKeyboard::computeKeyPos() } } -void PianoKeyboard::paintEvent(QPaintEvent*) +void PianoKeyboard::paintEvent(TQPaintEvent*) { - static QFont *pFont = 0; + static TQFont *pFont = 0; if (!pFont) { - pFont = new QFont(); + pFont = new TQFont(); pFont->setPixelSize(9); } - QPainter paint(this); + TQPainter paint(this); paint.setFont(*pFont); @@ -161,12 +161,12 @@ void PianoKeyboard::paintEvent(QPaintEvent*) m_blackKeySize.width(), m_blackKeySize.height()); } -void PianoKeyboard::enterEvent(QEvent *) +void PianoKeyboard::enterEvent(TQEvent *) { //drawHoverNote(e->y()); } -void PianoKeyboard::leaveEvent(QEvent*) +void PianoKeyboard::leaveEvent(TQEvent*) { m_hoverHighlight->hide(); @@ -241,7 +241,7 @@ void PianoKeyboard::drawHoverNote(int evPitch) } -void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) +void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) { // The routine to work out where this should appear doesn't coincide with the note // that we send to the sequencer - hence this is a bit pointless and crap at the moment. @@ -270,7 +270,7 @@ void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PianoKeyboard::mousePressEvent(QMouseEvent *e) +void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -286,7 +286,7 @@ void PianoKeyboard::mousePressEvent(QMouseEvent *e) } } -void PianoKeyboard::mouseReleaseEvent(QMouseEvent *e) +void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; |