summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/notation/FontViewFrame.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/FontViewFrame.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/FontViewFrame.cpp')
-rw-r--r--src/gui/editors/notation/FontViewFrame.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp
index d2a668f..5bfdee1 100644
--- a/src/gui/editors/notation/FontViewFrame.cpp
+++ b/src/gui/editors/notation/FontViewFrame.cpp
@@ -46,8 +46,8 @@
namespace Rosegarden
{
-FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) :
- TQFrame(parent, name),
+FontViewFrame::FontViewFrame( int pixelSize, TQWidget* tqparent, const char* name ) :
+ TQFrame(tqparent, name),
m_fontSize(pixelSize),
m_tableFont(0)
{
@@ -75,7 +75,7 @@ FontViewFrame::loadFont()
{
#ifdef HAVE_XFT
if (m_tableFont) {
- XftFontClose(x11AppDisplay(), (XftFont *)m_tableFont);
+ XftFontClose(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont);
}
m_tableFont = 0;
@@ -97,7 +97,7 @@ FontViewFrame::loadFont()
FcPatternDestroy(pattern);
if (!match || result != FcResultMatch) {
- KMessageBox::error(this, i18n("Error: Unable to match font name %1").arg(m_fontName));
+ KMessageBox::error(this, i18n("Error: Unable to match font name %1").tqarg(m_fontName));
return ;
}
@@ -106,11 +106,11 @@ FontViewFrame::loadFont()
if (TQString((const char *)matchFamily).lower() != m_fontName.lower()) {
KMessageBox::sorry(this, i18n("Warning: No good match for font name %1 (best is %2)").
- arg(m_fontName).arg(TQString((const char *)matchFamily)));
+ tqarg(m_fontName).tqarg(TQString((const char *)matchFamily)));
m_fontName = (const char *)matchFamily;
}
- m_tableFont = XftFontOpenPattern(x11AppDisplay(), match);
+ m_tableFont = XftFontOpenPattern(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), match);
if (!m_tableFont) {
KMessageBox::error(this, i18n("Error: Unable to open best-match font %1").
@@ -125,7 +125,7 @@ void FontViewFrame::setGlyphs(bool glyphs)
update();
}
-TQSize FontViewFrame::sizeHint() const
+TQSize FontViewFrame::tqsizeHint() const
{
return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(),
16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth());
@@ -161,10 +161,10 @@ void FontViewFrame::paintEvent( TQPaintEvent* e )
TQColor rpositive(128, 128, 255);
Drawable drawable = (Drawable)handle();
- XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable,
- (Visual *)x11Visual(), x11Colormap());
+ XftDraw *draw = XftDrawCreate(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), drawable,
+ (Visual *)TQT_TQPAINTDEVICE(this)->x11Visual(), TQT_TQPAINTDEVICE(this)->x11Colormap());
- TQColor pen(Qt::black);
+ TQColor pen(TQt::black);
XftColor col;
col.color.red = pen.red () | pen.red() << 8;
col.color.green = pen.green () | pen.green() << 8;
@@ -186,19 +186,19 @@ void FontViewFrame::paintEvent( TQPaintEvent* e )
continue;
p.setFont(kapp->font());
TQFontMetrics afm(kapp->font());
- TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16);
+ TQString s = TQString("%1").tqarg(m_row * 256 + (j - 1) * 16);
p.drawText(x - afm.width(s), y, s);
p.setPen(TQColor(190, 190, 255));
p.drawLine(0, y, width(), y);
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
continue;
} else if (j == 0) {
p.setFont(kapp->font());
- TQString s = TQString("%1").arg(i - 1);
+ TQString s = TQString("%1").tqarg(i - 1);
p.drawText(x, y, s);
p.setPen(TQColor(190, 190, 255));
p.drawLine(x, 0, x, height());
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
continue;
}
@@ -209,7 +209,7 @@ void FontViewFrame::paintEvent( TQPaintEvent* e )
XftDrawGlyphs(draw, &col, (XftFont *)m_tableFont, x, y, &ui, 1);
} else {
FcChar32 ch = m_row * 256 + (j - 1) * 16 + i - 1;
- if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
+ if (XftCharExists(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
XftDrawString32(draw, &col, (XftFont *)m_tableFont, x, y, &ch, 1);
}
}
@@ -233,7 +233,7 @@ FontViewFrame::hasRow(int r) const
for (int c = 0; c < 256; ++c) {
FcChar32 ch = r * 256 + c;
- if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
+ if (XftCharExists(TQT_TQPAINTDEVICE_CONST(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
return true;
}
}