summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/notation/NoteFont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editors/notation/NoteFont.cpp')
-rw-r--r--src/gui/editors/notation/NoteFont.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp
index 95746c3..3a0ea18 100644
--- a/src/gui/editors/notation/NoteFont.cpp
+++ b/src/gui/editors/notation/NoteFont.cpp
@@ -32,14 +32,14 @@
#include "NoteCharacter.h"
#include "NoteFontMap.h"
#include "SystemFont.h"
-#include <qbitmap.h>
-#include <qgarray.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqbitmap.h>
+#include <tqgarray.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace Rosegarden
@@ -48,7 +48,7 @@ namespace Rosegarden
NoteFont::FontPixmapMap *NoteFont::m_fontPixmapMap = 0;
NoteFont::DrawRepMap *NoteFont::m_drawRepMap = 0;
-QPixmap *NoteFont::m_blankPixmap = 0;
+TQPixmap *NoteFont::m_blankPixmap = 0;
NoteFont::NoteFont(std::string fontName, int size) :
@@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) :
if (size > 0) {
if (sizes.find(size) == sizes.end()) {
- throw BadNoteFont(qstrtostr(QString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size)));
+ throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size)));
} else {
m_size = size;
}
@@ -79,13 +79,13 @@ NoteFont::NoteFont(std::string fontName, int size) :
}
if (m_blankPixmap == 0) {
- m_blankPixmap = new QPixmap(10, 10);
- m_blankPixmap->setMask(QBitmap(10, 10, TRUE));
+ m_blankPixmap = new TQPixmap(10, 10);
+ m_blankPixmap->setMask(TQBitmap(10, 10, TRUE));
}
// Locate our font's pixmap map in the font map, create if necessary
- std::string fontKey = qstrtostr(QString("__%1__%2__")
+ std::string fontKey = qstrtostr(TQString("__%1__%2__")
.arg(strtoqstr(m_fontMap.getName()))
.arg(m_size));
@@ -146,7 +146,7 @@ NoteFont::getLegerLineThickness(unsigned int &thickness) const
}
bool
-NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const
+NoteFont::lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const
{
PixmapMap::iterator i = m_map->find(charName);
if (i != m_map->end()) {
@@ -167,7 +167,7 @@ NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const
void
NoteFont::add
-(CharName charName, bool inverted, QPixmap *pixmap) const
+(CharName charName, bool inverted, TQPixmap *pixmap) const
{
PixmapMap::iterator i = m_map->find(charName);
if (i != m_map->end()) {
@@ -188,7 +188,7 @@ NoteFont::add
}
NoteCharacterDrawRep *
-NoteFont::lookupDrawRep(QPixmap *pixmap) const
+NoteFont::lookupDrawRep(TQPixmap *pixmap) const
{
if (!m_drawRepMap)
m_drawRepMap = new DrawRepMap();
@@ -199,7 +199,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const
} else {
- QImage image = pixmap->convertToImage();
+ TQImage image = pixmap->convertToImage();
if (image.isNull())
return 0;
@@ -220,7 +220,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const
bool pixel = false;
if (xi < image.width()) {
- if (image.bitOrder() == QImage::LittleEndian) {
+ if (image.bitOrder() == TQImage::LittleEndian) {
if (*(line + (xi >> 3)) & 1 << (xi & 7))
pixel = true;
} else {
@@ -231,7 +231,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const
if (!pixel) {
if (startx < xi) {
- a->resize(a->size() + 2, QGArray::SpeedOptim);
+ a->resize(a->size() + 2, TQGArray::SpeedOptim);
a->setPoint(a->size() - 2, startx, yi);
a->setPoint(a->size() - 1, xi - 1, yi);
}
@@ -246,9 +246,9 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const
}
bool
-NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
+NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const
{
- QPixmap *found = 0;
+ TQPixmap *found = 0;
bool ok = lookup(charName, inverted, found);
if (ok) {
if (found) {
@@ -263,7 +263,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
if (inverted && !m_fontMap.hasInversion(m_size, charName)) {
if (!getPixmap(charName, pixmap, !inverted))
return false;
- found = new QPixmap(PixmapFunctions::flipVertical(pixmap));
+ found = new TQPixmap(PixmapFunctions::flipVertical(pixmap));
add(charName, inverted, found);
pixmap = *found;
return true;
@@ -281,11 +281,11 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
NOTATION_DEBUG
<< "NoteFont::getPixmap: Loading \"" << src << "\"" << endl;
- found = new QPixmap(strtoqstr(src));
+ found = new TQPixmap(strtoqstr(src));
if (!found->isNull()) {
- if (found->mask() == 0) {
+ if (found->tqmask() == 0) {
std::cerr << "NoteFont::getPixmap: Warning: No automatic mask "
<< "for character \"" << charName << "\""
<< (inverted ? " (inverted)" : "") << " in font \""
@@ -332,7 +332,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
if (!inverted && m_fontMap.hasInversion(m_size, charName)) {
if (!getPixmap(charName, pixmap, !inverted))
return false;
- found = new QPixmap(PixmapFunctions::flipVertical(pixmap));
+ found = new TQPixmap(PixmapFunctions::flipVertical(pixmap));
add(charName, inverted, found);
pixmap = *found;
return true;
@@ -351,7 +351,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
m_fontMap.getStrategy(m_size, charName);
bool success;
- found = new QPixmap(systemFont->renderChar(charName,
+ found = new TQPixmap(systemFont->renderChar(charName,
glyph,
code + charBase,
strategy,
@@ -374,12 +374,12 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const
}
bool
-NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap,
+NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap,
int hue, int minValue, bool inverted) const
{
CharName charName(getNameWithColour(baseCharName, hue));
- QPixmap *found = 0;
+ TQPixmap *found = 0;
bool ok = lookup(charName, inverted, found);
if (ok) {
if (found) {
@@ -391,7 +391,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap,
}
}
- QPixmap basePixmap;
+ TQPixmap basePixmap;
ok = getPixmap(baseCharName, basePixmap, inverted);
if (!ok) {
@@ -408,12 +408,12 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap,
}
bool
-NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap,
+NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap,
bool inverted) const
{
CharName charName(getNameShaded(baseCharName));
- QPixmap *found = 0;
+ TQPixmap *found = 0;
bool ok = lookup(charName, inverted, found);
if (ok) {
if (found) {
@@ -425,7 +425,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap,
}
}
- QPixmap basePixmap;
+ TQPixmap basePixmap;
ok = getPixmap(baseCharName, basePixmap, inverted);
if (!ok) {
@@ -434,7 +434,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap,
return false;
}
- found = new QPixmap(PixmapFunctions::shadePixmap(basePixmap));
+ found = new TQPixmap(PixmapFunctions::shadePixmap(basePixmap));
add(charName, inverted, found);
pixmap = *found;
return ok;
@@ -443,19 +443,19 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap,
CharName
NoteFont::getNameWithColour(CharName base, int hue) const
{
- return qstrtostr(QString("%1__%2").arg(hue).arg(strtoqstr(base)));
+ return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base)));
}
CharName
NoteFont::getNameShaded(CharName base) const
{
- return qstrtostr(QString("shaded__%1").arg(strtoqstr(base)));
+ return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base)));
}
bool
NoteFont::getDimensions(CharName charName, int &x, int &y, bool inverted) const
{
- QPixmap pixmap;
+ TQPixmap pixmap;
bool ok = getPixmap(charName, pixmap, inverted);
x = pixmap.width();
y = pixmap.height();
@@ -502,7 +502,7 @@ NoteFont::getHotspot(CharName charName, bool inverted) const
{
int x, y;
(void)getHotspot(charName, x, y, inverted);
- return QPoint(x, y);
+ return TQPoint(x, y);
}
bool
@@ -511,7 +511,7 @@ NoteFont::getCharacter(CharName charName,
CharacterType type,
bool inverted)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!getPixmap(charName, pixmap, inverted))
return false;
@@ -524,7 +524,7 @@ NoteFont::getCharacter(CharName charName,
// Get the pointer direct from cache (depends on earlier call
// to getPixmap to put it in the cache if available)
- QPixmap *pmapptr = 0;
+ TQPixmap *pmapptr = 0;
bool found = lookup(charName, inverted, pmapptr);
NoteCharacterDrawRep *rep = 0;
@@ -556,7 +556,7 @@ NoteFont::getCharacterColoured(CharName charName,
CharacterType type,
bool inverted)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!getColouredPixmap(charName, pixmap, hue, minValue, inverted)) {
return false;
}
@@ -572,7 +572,7 @@ NoteFont::getCharacterColoured(CharName charName,
// Get the pointer direct from cache (depends on earlier call
// to getPixmap to put it in the cache if available)
- QPixmap *pmapptr = 0;
+ TQPixmap *pmapptr = 0;
CharName cCharName(getNameWithColour(charName, hue));
bool found = lookup(cCharName, inverted, pmapptr);
@@ -605,7 +605,7 @@ NoteFont::getCharacterShaded(CharName charName,
CharacterType type,
bool inverted)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!getShadedPixmap(charName, pixmap, inverted)) {
return false;
}
@@ -621,7 +621,7 @@ NoteFont::getCharacterShaded(CharName charName,
// Get the pointer direct from cache (depends on earlier call
// to getPixmap to put it in the cache if available)
- QPixmap *pmapptr = 0;
+ TQPixmap *pmapptr = 0;
CharName cCharName(getNameShaded(charName));
bool found = lookup(cCharName, inverted, pmapptr);