summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/notation/NotePixmapFactory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/editors/notation/NotePixmapFactory.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/notation/NotePixmapFactory.cpp')
-rw-r--r--src/gui/editors/notation/NotePixmapFactory.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp
index b41ecae..e02e14e 100644
--- a/src/gui/editors/notation/NotePixmapFactory.cpp
+++ b/src/gui/editors/notation/NotePixmapFactory.cpp
@@ -289,8 +289,8 @@ NotePixmapFactory::getSize() const
return m_font->getSize();
}
-QPixmap
-NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp)
+TQPixmap
+NotePixmapFactory::toTQPixmap(TQCanvasPixmap* cp)
{
TQPixmap p = *cp;
delete cp;
@@ -330,8 +330,8 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters &params)
//#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY
#ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY
- m_p->painter().setPen(Qt::red);
- m_p->painter().setBrush(Qt::red);
+ m_p->painter().setPen(TQt::red);
+ m_p->painter().setBrush(TQt::red);
m_p->drawLine(0, 0, 0, m_generatedHeight - 1);
m_p->drawLine(m_generatedWidth - 1, 0,
@@ -570,7 +570,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters &params,
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
// If we draw stems after beams, instead of beams after stems,
// beam anti-aliasing won't damage stems but we have to shorten the
@@ -893,7 +893,7 @@ NotePixmapFactory::drawMarks(bool isStemmed,
m_p->painter().setFont(m_textMarkFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_textMarkFont);
+ m_p->tqmaskPainter().setFont(m_textMarkFont);
int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2;
int y = (normalMarksAreAbove ?
@@ -923,7 +923,7 @@ NotePixmapFactory::drawMarks(bool isStemmed,
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
if (!Marks::isFingeringMark(*i)) {
int x = m_left + m_noteBodyWidth / 2;
@@ -978,7 +978,7 @@ NotePixmapFactory::drawMarks(bool isStemmed,
m_p->painter().setFont(m_fingeringFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_fingeringFont);
+ m_p->tqmaskPainter().setFont(m_fingeringFont);
int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2;
int y = m_above - dy - 3;
@@ -1025,7 +1025,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters &params)
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
}
x0 = m_left - m_noteBodyWidth / 5 - 1;
x1 = m_left + m_noteBodyWidth + m_noteBodyWidth / 5 /* + 1 */;
@@ -1257,11 +1257,11 @@ NotePixmapFactory::drawFlags(int flagCount,
y,
*flagChar.getPixmap());
- m_p->begin(m_generatedPixmap, m_generatedMask);
+ m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask));
} else {
- // No problem with mask here
+ // No problem with tqmask here
m_p->drawNoteCharacter(m_left + s1.x() - hotspot.x(),
y,
flagChar);
@@ -1328,7 +1328,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1,
if (m_selected)
m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement));
else
- m_p->painter().setBrush(Qt::black);
+ m_p->painter().setBrush(TQt::black);
}
if (thickness < 4) {
for (int i = 0; i < thickness; ++i) {
@@ -1400,7 +1400,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1,
<< ", g = " << g << ", dg1 = " << dg1 << ", dg2 = " << dg2
<< ", seg = " << segment << ", q = " << quartile << endl;
*/
- // I don't know enough about Qt to be sure of this, but I
+ // I don't know enough about TQt to be sure of this, but I
// suspect this may be some of the most inefficient code ever
// written:
@@ -1419,7 +1419,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1,
if (m_selected) {
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
} else {
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
}
}
@@ -1440,7 +1440,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1,
++cx;
}
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
}
void
@@ -1630,7 +1630,7 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters &params)
m_p->painter().setFont(m_tupletCountFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_tupletCountFont);
+ m_p->tqmaskPainter().setFont(m_tupletCountFont);
int textX = endX + countSpace;
int textY = endY + cr.height() / 2;
@@ -1758,7 +1758,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters &params)
} else {
NotePixmapCache::iterator ci(m_dottedRestCache->find(charName));
if (ci != m_dottedRestCache->end())
- return new QCanvasPixmap
+ return new TQCanvasPixmap
(*ci->second, TQPoint(ci->second->offsetX(),
ci->second->offsetY()));
else
@@ -1772,7 +1772,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters &params)
TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot);
if (encache) {
m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*>
- (charName, new QCanvasPixmap
+ (charName, new TQCanvasPixmap
(*canvasMap, hotspot)));
}
return canvasMap;
@@ -1880,7 +1880,7 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef)
else if (adjustedOctave < 8)
adjustedOctave++;
- TQString text = TQString("%1").arg(adjustedOctave);
+ TQString text = TQString("%1").tqarg(adjustedOctave);
TQRect rect = m_clefOttavaFontMetrics.boundingRect(text);
createPixmapAndMask(plain.getWidth(),
@@ -1894,13 +1894,13 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef)
m_p->painter().setFont(m_clefOttavaFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_clefOttavaFont);
+ m_p->tqmaskPainter().setFont(m_clefOttavaFont);
m_p->drawText(plain.getWidth() / 2 - rect.width() / 2,
oct < 0 ? plain.getHeight() + rect.height() - 1 :
rect.height(), text);
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
TQPoint hotspot(plain.getHotspot());
if (oct > 0) hotspot.setY(hotspot.y() + rect.height());
return makeCanvasPixmap(hotspot, true);
@@ -2195,7 +2195,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
int offset = (height - 10 * lw -1) / 2;
// Draw staff lines
- m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness()));
+ m_p->painter().setPen(TQPen(TQt::black, getStaffLineThickness()));
for (h = 0; h <= 8; h += 2) {
int y = (lw * 3) + ((8 - h) * lw) / 2;
m_p->drawLine(maxDelta/2, y + offset, m_generatedWidth - maxDelta/2, y + offset);
@@ -2204,7 +2204,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
if (header->isAClefToDraw()) {
const Clef &clef = header->getClef();
// TODO : use colours from GUIPalette
- colour = header->isClefInconsistent() ? Qt::red : Qt::black;
+ colour = header->isClefInconsistent() ? TQt::red : TQt::black;
int hue, sat, val;
colour.getHsv(&hue, &sat, &val);
@@ -2228,13 +2228,13 @@ NotePixmapFactory::makeTrackHeaderPixmap(
else if (adjustedOctave < 8)
adjustedOctave++;
- TQString text = TQString("%1").arg(adjustedOctave);
+ TQString text = TQString("%1").tqarg(adjustedOctave);
TQRect rect = m_clefOttavaFontMetrics.boundingRect(text);
m_p->painter().setPen(colour);
m_p->painter().setFont(m_clefOttavaFont);
- // m_p->maskPainter().setFont(m_clefOttavaFont);
+ // m_p->tqmaskPainter().setFont(m_clefOttavaFont);
int xpos = maxDelta + clefChar.getWidth() / 2 - rect.width() / 2;
int ypos = y - clefChar.getHotspot().y() + offset
+ (oct < 0 ? clefChar.getHeight() + rect.height() - 1 : - rect.height() / 3);
@@ -2242,7 +2242,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
}
// TODO : use colours from GUIPalette
- colour = header->isKeyInconsistent() ? Qt::red : Qt::black;
+ colour = header->isKeyInconsistent() ? TQt::red : TQt::black;
// Draw the key signature if any
@@ -2273,7 +2273,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
}
m_p->painter().setFont(m_trackHeaderFont);
- // m_p->maskPainter().setFont(m_trackHeaderFont);
+ // m_p->tqmaskPainter().setFont(m_trackHeaderFont);
TQString text;
TQString textLine;
@@ -2288,7 +2288,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
// Write upper text (track name and track label)
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
text = header->getUpperText();
int numberOfTextLines = header->getNumberOfTextLines();
@@ -2300,7 +2300,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
if (!text.isEmpty()) {
// String too long : cut it and replace last character by dots
int len = textLine.length();
- if (len > 1) textLine.replace(len - 1, 1, i18n("..."));
+ if (len > 1) textLine.tqreplace(len - 1, 1, i18n("..."));
}
} else {
textLine = getOneLine(text, width - charWidth / 2);
@@ -2313,9 +2313,9 @@ NotePixmapFactory::makeTrackHeaderPixmap(
// Write transposition text
// TODO : use colours from GUIPalette
- colour = header->isTransposeInconsistent() ? Qt::red : Qt::black;
+ colour = header->isTransposeInconsistent() ? TQt::red : TQt::black;
m_p->painter().setFont(m_trackHeaderBoldFont);
- // m_p->maskPainter().setFont(m_trackHeaderBoldFont);
+ // m_p->tqmaskPainter().setFont(m_trackHeaderBoldFont);
m_p->painter().setPen(colour);
m_p->drawText(width - transposeWidth - charWidth / 4,
@@ -2327,9 +2327,9 @@ NotePixmapFactory::makeTrackHeaderPixmap(
// Write lower text (segment label)
// TODO : use colours from GUIPalette
- colour = header->isLabelInconsistent() ? Qt::red : Qt::black;
+ colour = header->isLabelInconsistent() ? TQt::red : TQt::black;
m_p->painter().setFont(m_trackHeaderFont);
- // m_p->maskPainter().setFont(m_trackHeaderFont);
+ // m_p->tqmaskPainter().setFont(m_trackHeaderFont);
m_p->painter().setPen(colour);
text = header->getLowerText();
@@ -2344,7 +2344,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
if ((l == numberOfTextLines) && !text.isEmpty()) {
// String too long : cut it and replace last character by dots
int len = textLine.length();
- if (len > 1) textLine.replace(len - 1, 1, i18n("..."));
+ if (len > 1) textLine.tqreplace(len - 1, 1, i18n("..."));
}
m_p->drawText(charWidth / 4, lowerTextY, textLine);
@@ -2376,7 +2376,7 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing()
return m_trackHeaderFont.pixelSize() * 3 / 2;
}
-QString
+TQString
NotePixmapFactory::getOneLine(TQString &text, int width)
{
TQString str;
@@ -2603,7 +2603,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo,
right, height / 2 - 1, thickness, smooth);
}
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
if (painter) {
painter->restore();
@@ -2638,14 +2638,14 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing)
TQPixmap newPixmap(i);
TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot);
p->setMask(PixmapFunctions::generateMask(newPixmap,
- Qt::white.rgb()));
+ TQt::white.rgb()));
return p;
} else {
TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot);
p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap,
- Qt::white.rgb()));
+ TQt::white.rgb()));
delete m_generatedPixmap;
delete m_generatedMask;
return p;
@@ -2759,12 +2759,12 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above,
painter->rotate(theta);
} else {
m_p->painter().save();
- m_p->maskPainter().save();
+ m_p->tqmaskPainter().save();
m_p->painter().translate(x, y);
- m_p->maskPainter().translate(x, y);
+ m_p->tqmaskPainter().translate(x, y);
if (rotate) {
m_p->painter().rotate(theta);
- m_p->maskPainter().rotate(theta);
+ m_p->tqmaskPainter().rotate(theta);
}
}
@@ -2780,13 +2780,13 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above,
m.translate(hotspot.x(), hotspot.y());
m.rotate(theta);
m_p->painter().setWorldMatrix(m);
- m_p->maskPainter().setWorldMatrix(m);
+ m_p->tqmaskPainter().setWorldMatrix(m);
}
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else if (m_shaded) {
- m_p->painter().setPen(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
}
havePixmap = true;
}
@@ -2835,7 +2835,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above,
}
if (m_selected) {
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
}
TQWMatrix::setTransformationMode(mode);
@@ -2843,7 +2843,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above,
if (painter) {
painter->restore();
if (!m_inPrinterMethod)
- m_p->maskPainter().restore();
+ m_p->tqmaskPainter().restore();
}
}
@@ -2890,29 +2890,29 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp,
m_p->beginExternal(painter);
painter->translate(x - backpedal, y - height);
} else {
- NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and mask " << width << "x" << height << endl;
+ NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and tqmask " << width << "x" << height << endl;
createPixmapAndMask(width, height);
}
int thickness = getStemThickness();
- TQPen pen(Qt::black, thickness, Qt::DotLine);
+ TQPen pen(TQt::black, thickness, TQt::DotLine);
if (m_selected) {
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
pen.setColor(GUIPalette::getColour(GUIPalette::SelectedElement));
} else if (m_shaded) {
- m_p->painter().setPen(Qt::gray);
- pen.setColor(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
+ pen.setColor(TQt::gray);
}
m_p->painter().setFont(m_ottavaFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_ottavaFont);
+ m_p->tqmaskPainter().setFont(m_ottavaFont);
m_p->drawText(0, m_ottavaFontMetrics.ascent(), label);
m_p->painter().setPen(pen);
- // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen);
+ // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen);
int x0 = m_ottavaFontMetrics.width(label) + thickness;
int x1 = width - thickness;
@@ -2925,7 +2925,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp,
pen.setStyle(Qt::SolidLine);
m_p->painter().setPen(pen);
- // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen);
+ // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen);
NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: drawing " << x1 << "," << y0 << " to " << x1 << "," << y1 << ", thickness " << thickness << endl;
@@ -2933,7 +2933,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp,
m_p->painter().setPen(TQPen());
if (!m_inPrinterMethod)
- m_p->maskPainter().setPen(TQPen());
+ m_p->tqmaskPainter().setPen(TQPen());
if (painter) {
painter->restore();
@@ -3038,12 +3038,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig)
if (m_selected) {
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
} else if (m_shaded) {
- m_p->painter().setPen(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
}
m_p->painter().setFont(m_bigTimeSigFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_bigTimeSigFont);
+ m_p->tqmaskPainter().setFont(m_bigTimeSigFont);
m_p->drawText(0, r.height() + dy, c);
@@ -3056,7 +3056,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig)
}
}
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy));
} else {
@@ -3117,12 +3117,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig)
if (m_selected) {
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
} else if (m_shaded) {
- m_p->painter().setPen(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
}
m_p->painter().setFont(m_timeSigFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(m_timeSigFont);
+ m_p->tqmaskPainter().setFont(m_timeSigFont);
x = (width - numR.width()) / 2 - 1;
m_p->drawText(x, denomR.height(), numS);
@@ -3130,7 +3130,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig)
x = (width - denomR.width()) / 2 - 1;
m_p->drawText(x, denomR.height() * 2 + (getNoteBodyHeight() / 2) - 1, denomS);
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
return makeCanvasPixmap(TQPoint(0, denomR.height() +
(getNoteBodyHeight() / 4) - 1),
@@ -3163,7 +3163,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const
}
}
-QFont
+TQFont
NotePixmapFactory::getTextFont(const Text &text) const
{
std::string type(text.getTextType());
@@ -3253,7 +3253,7 @@ NotePixmapFactory::getTextFont(const Text &text) const
<< " for type " << type << endl;
NOTATION_DEBUG << "NotePixmapFactory::getTextFont: returning font '"
- << textFont.toString() << "' for type " << type.c_str()
+ << TQString(textFont.toString()).ascii() << "' for type " << type.c_str()
<< " text : " << text.getText().c_str() << endl;
m_textFontCache[type.c_str()] = textFont;
@@ -3293,8 +3293,8 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering,
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement));
} else {
- m_p->painter().setPen(Qt::black);
- m_p->painter().setBrush(Qt::black);
+ m_p->painter().setPen(TQt::black);
+ m_p->painter().setBrush(TQt::black);
}
Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS);
@@ -3349,15 +3349,15 @@ NotePixmapFactory::drawTextAux(const Text &text,
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else if (m_shaded)
- m_p->painter().setPen(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
m_p->painter().setFont(textFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(textFont);
+ m_p->tqmaskPainter().setFont(textFont);
m_p->drawText(offset, textMetrics.ascent() + offset, s);
- m_p->painter().setPen(Qt::black);
+ m_p->painter().setPen(TQt::black);
if (painter) {
painter->restore();
@@ -3386,7 +3386,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD
int sideGap = getLineSpacing() / 4 + 1;
TQRect r = textMetrics.boundingRect
- (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s);
+ (0, 0, annotationWidth, annotationHeight, TQt::WordBreak, s);
int pixmapWidth = r.width() + sideGap * 2;
int pixmapHeight = r.height() + topGap + bottomGap;
@@ -3396,11 +3396,11 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD
if (m_selected)
m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement));
else if (m_shaded)
- m_p->painter().setPen(Qt::gray);
+ m_p->painter().setPen(TQt::gray);
m_p->painter().setFont(textFont);
if (!m_inPrinterMethod)
- m_p->maskPainter().setFont(textFont);
+ m_p->tqmaskPainter().setFont(textFont);
if (isLilyPondDirective) {
m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::TextLilyPondDirectiveBackground));
@@ -3410,16 +3410,16 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD
m_p->drawRect(0, 0, pixmapWidth, pixmapHeight);
- m_p->painter().setBrush(Qt::black);
+ m_p->painter().setBrush(TQt::black);
m_p->painter().drawText(TQRect(sideGap, topGap,
annotationWidth + sideGap,
pixmapHeight - bottomGap),
- Qt::WordBreak, s);
+ TQt::WordBreak, s);
/* unnecessary following the rectangle draw
m_pm.drawText(TQRect(sideGap, topGap,
annotationWidth + sideGap, annotationHeight + topGap),
- Qt::WordBreak, s);
+ TQt::WordBreak, s);
*/
return makeCanvasPixmap(TQPoint(0, 0));
@@ -3427,33 +3427,33 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD
void
NotePixmapFactory::createPixmapAndMask(int width, int height,
- int maskWidth, int maskHeight)
+ int tqmaskWidth, int tqmaskHeight)
{
- if (maskWidth < 0)
- maskWidth = width;
- if (maskHeight < 0)
- maskHeight = height;
+ if (tqmaskWidth < 0)
+ tqmaskWidth = width;
+ if (tqmaskHeight < 0)
+ tqmaskHeight = height;
m_generatedWidth = width;
m_generatedHeight = height;
m_generatedPixmap = new TQPixmap(width, height);
- m_generatedMask = new TQBitmap(maskWidth, maskHeight);
+ m_generatedMask = new TQBitmap(tqmaskWidth, tqmaskHeight);
static unsigned long total = 0;
total += width * height;
// NOTATION_DEBUG << "createPixmapAndMask: " << width << "x" << height << " (" << (width*height) << " px, " << total << " total)" << endl;
- // clear up pixmap and mask
+ // clear up pixmap and tqmask
m_generatedPixmap->fill();
- m_generatedMask->fill(Qt::color0);
+ m_generatedMask->fill(TQt::color0);
// initiate painting
- m_p->begin(m_generatedPixmap, m_generatedMask);
+ m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask));
- m_p->painter().setPen(Qt::black);
- m_p->painter().setBrush(Qt::black);
- m_p->maskPainter().setPen(Qt::white);
- m_p->maskPainter().setBrush(Qt::white);
+ m_p->painter().setPen(TQt::black);
+ m_p->painter().setBrush(TQt::black);
+ m_p->tqmaskPainter().setPen(TQt::white);
+ m_p->tqmaskPainter().setBrush(TQt::white);
}
TQCanvasPixmap*
@@ -3538,7 +3538,7 @@ NotePixmapFactory::getCharacter(CharName name, NoteCharacter &ch,
return m_font->getCharacter(name, ch, charType, inverted);
}
-QPoint
+TQPoint
NotePixmapFactory::m_pointZero;