summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers/ChordNameRuler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/rulers/ChordNameRuler.cpp')
-rw-r--r--src/gui/rulers/ChordNameRuler.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/rulers/ChordNameRuler.cpp b/src/gui/rulers/ChordNameRuler.cpp
index 2fc98f2..001d5fd 100644
--- a/src/gui/rulers/ChordNameRuler.cpp
+++ b/src/gui/rulers/ChordNameRuler.cpp
@@ -45,14 +45,14 @@
#include "document/RosegardenGUIDoc.h"
#include "document/MultiViewCommandHistory.h"
#include "gui/general/GUIPalette.h"
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qobject.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqobject.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
namespace Rosegarden
@@ -62,9 +62,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
RosegardenGUIDoc *doc,
double xorigin,
int height,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
- QWidget(parent, name),
+ TQWidget(parent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -85,15 +85,15 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
m_boldFont.setPointSize(11);
m_boldFont.setPixelSize(12);
m_boldFont.setBold(true);
- m_fontMetrics = QFontMetrics(m_boldFont);
+ m_fontMetrics = TQFontMetrics(m_boldFont);
setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground));
m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId();
- QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()),
- this, SLOT(update()));
+ TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()),
+ this, TQT_SLOT(update()));
- QToolTip::add
+ TQToolTip::add
(this, i18n("Chord name ruler.\nTurn it on and off from the Settings->Rulers menu."));
}
@@ -103,9 +103,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
std::vector<Segment *> &segments,
double xorigin,
int height,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
- QWidget(parent, name),
+ TQWidget(parent, name),
m_xorigin(xorigin),
m_height(height),
m_currentXOffset(0),
@@ -126,13 +126,13 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale,
m_boldFont.setPointSize(11);
m_boldFont.setPixelSize(12);
m_boldFont.setBold(true);
- m_fontMetrics = QFontMetrics(m_boldFont);
+ m_fontMetrics = TQFontMetrics(m_boldFont);
setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground));
m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId();
- QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()),
- this, SLOT(update()));
+ TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()),
+ this, TQT_SLOT(update()));
for (std::vector<Segment *>::iterator i = segments.begin();
i != segments.end(); ++i) {
@@ -198,7 +198,7 @@ ChordNameRuler::sizeHint() const
NOTATION_DEBUG << "Returning chord-label ruler width as " << width << endl;
- QSize res(std::max(int(width), m_width), m_height);
+ TQSize res(std::max(int(width), m_width), m_height);
return res;
}
@@ -207,7 +207,7 @@ QSize
ChordNameRuler::minimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0);
- QSize res = QSize(int(firstBarWidth), m_height);
+ TQSize res = TQSize(int(firstBarWidth), m_height);
return res;
}
@@ -407,7 +407,7 @@ ChordNameRuler::recalculate(timeT from, timeT to)
}
void
-ChordNameRuler::paintEvent(QPaintEvent* e)
+ChordNameRuler::paintEvent(TQPaintEvent* e)
{
if (!m_composition || !m_ready)
return ;
@@ -416,13 +416,13 @@ ChordNameRuler::paintEvent(QPaintEvent* e)
Profiler profiler1("ChordNameRuler::paintEvent (whole)");
- QPainter paint(this);
+ TQPainter paint(this);
paint.setPen(GUIPalette::getColour(GUIPalette::ChordNameRulerForeground));
paint.setClipRegion(e->region());
paint.setClipRect(e->rect().normalize());
- QRect clipRect = paint.clipRegion().boundingRect();
+ TQRect clipRect = paint.clipRegion().boundingRect();
timeT from = m_rulerScale->getTimeForX
(clipRect.x() - m_currentXOffset - m_xorigin - 50);
@@ -436,7 +436,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e)
Profiler profiler2("ChordNameRuler::paintEvent (paint)");
- QRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM");
+ TQRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM");
int fontHeight = boundsForHeight.height();
int textY = (height() - 6) / 2 + fontHeight / 2;
@@ -475,7 +475,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e)
(*i)->set
<Int>(TEXT_FORMAL_X, (long)x);
- QRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text));
+ TQRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text));
int width = textBounds.width();
x -= width / 2;