summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers/PercussionPitchRuler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/rulers/PercussionPitchRuler.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/rulers/PercussionPitchRuler.cpp')
-rw-r--r--src/gui/rulers/PercussionPitchRuler.cpp52
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;