From a30f5359f03c3017fa19a6770fab32d25d22cb87 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 15 Jul 2024 19:08:22 +0900 Subject: Rename graphics class nt* related files to equivalent tq* (part 1) Signed-off-by: Michele Calgaro --- doc/html/qfd-example.html | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'doc/html/qfd-example.html') diff --git a/doc/html/qfd-example.html b/doc/html/qfd-example.html index 449904f41..9760dc945 100644 --- a/doc/html/qfd-example.html +++ b/doc/html/qfd-example.html @@ -71,9 +71,9 @@ public slots: protected: TQSize cellSize() const; - void paintEvent( TQPaintEvent* ); + void paintEvent( TQPaintEvent* ); private: - TQFont tablefont; + TQFont tablefont; int row; }; @@ -102,12 +102,12 @@ public: #include <ntqapplication.h> #include <ntqslider.h> #include <ntqspinbox.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <tqtoolbar.h> #include <tqstatusbar.h> #include <ntqlabel.h> #include <ntqpushbutton.h> -#include <ntqfontdialog.h> +#include <tqfontdialog.h> #include <stdlib.h> @@ -128,18 +128,18 @@ public: TQSize FontRowTable::cellSize() const { - TQFontMetrics fm = fontMetrics(); - return TQSize( fm.maxWidth(), fm.lineSpacing()+1 ); + TQFontMetrics fm = fontMetrics(); + return TQSize( fm.maxWidth(), fm.lineSpacing()+1 ); } -void FontRowTable::paintEvent( TQPaintEvent* e ) +void FontRowTable::paintEvent( TQPaintEvent* e ) { TQFrame::paintEvent(e); - TQPainter p(this); - p.setClipRegion(e->region()); - TQRect r = e->rect(); - TQFontMetrics fm = fontMetrics(); - int ml = frameWidth()+margin() + 1 + TQMAX(0,-fm.minLeftBearing()); + TQPainter p(this); + p.setClipRegion(e->region()); + TQRect r = e->rect(); + TQFontMetrics fm = fontMetrics(); + int ml = frameWidth()+margin() + 1 + TQMAX(0,-fm.minLeftBearing()); int mt = frameWidth()+margin(); TQSize cell((width()-15-ml)/16,(height()-15-mt)/16); @@ -151,13 +151,13 @@ TQSize FontRowTable::cellSize() const int minj = r.top() / cell.height(); int maxj = (r.bottom()+cell.height()-1) / cell.height(); - int h = fm.height(); + int h = fm.height(); - TQColor body(255,255,192); - TQColor negative(255,192,192); - TQColor positive(192,192,255); - TQColor rnegative(255,128,128); - TQColor rpositive(128,128,255); + TQColor body(255,255,192); + TQColor negative(255,192,192); + TQColor positive(192,192,255); + TQColor rnegative(255,128,128); + TQColor rpositive(128,128,255); for (int j = minj; j<=maxj; j++) { for (int i = mini; i<=maxi; i++) { @@ -167,29 +167,29 @@ TQSize FontRowTable::cellSize() const TQChar ch = TQChar(j*16+i,row); - if ( fm.inFont(ch) ) { - int w = fm.width(ch); - int l = fm.leftBearing(ch); - int r = fm.rightBearing(ch); + if ( fm.inFont(ch) ) { + int w = fm.width(ch); + int l = fm.leftBearing(ch); + int r = fm.rightBearing(ch); x += ml; y += mt+h; - p.fillRect(x,y,w,-h,body); + p.fillRect(x,y,w,-h,body); if ( w ) { if ( l ) { - p.fillRect(x+(l>0?0:l), y-h/2, abs(l),-h/2, + p.fillRect(x+(l>0?0:l), y-h/2, abs(l),-h/2, l < 0 ? negative : positive); } if ( r ) { - p.fillRect(x+w-(r>0?r:0),y+2, abs(r),-h/2, + p.fillRect(x+w-(r>0?r:0),y+2, abs(r),-h/2, r < 0 ? rnegative : rpositive); } } TQString s; s += ch; - p.setPen(TQPen(TQt::black)); - p.drawText(x,y,s); + p.setPen(TQPen(TQt::black)); + p.drawText(x,y,s); } } } @@ -200,16 +200,16 @@ void FontRowTable::setRow(int r) { row = r; - TQFontMetrics fm = fontMetrics(); - TQFontInfo fi = fontInfo(); + TQFontMetrics fm = fontMetrics(); + TQFontInfo fi = fontInfo(); TQString str = TQString("%1 %2pt%3%4 mLB=%5 mRB=%6 mW=%7") - .arg(fi.family()) - .arg(fi.pointSize()) - .arg(fi.bold() ? " bold" : "") - .arg(fi.italic() ? " italic" : "") - .arg(fm.minLeftBearing()) - .arg(fm.minRightBearing()) - .arg(fm.maxWidth()); + .arg(fi.family()) + .arg(fi.pointSize()) + .arg(fi.bold() ? " bold" : "") + .arg(fi.italic() ? " italic" : "") + .arg(fm.minLeftBearing()) + .arg(fm.minRightBearing()) + .arg(fm.maxWidth()); emit fontInformation(str); update(); @@ -218,8 +218,8 @@ void FontRowTable::setRow(int r) void FontRowTable::chooseFont() { bool ok; - TQFont oldfont = tablefont; - tablefont = TQFontDialog::getFont(&ok, oldfont, this); + TQFont oldfont = tablefont; + tablefont = TQFontDialog::getFont(&ok, oldfont, this); if (ok) setFont(tablefont); @@ -262,7 +262,7 @@ void FontRowTable::chooseFont() #include <ntqapplication.h> #include <ntqslider.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <tqstatusbar.h> -- cgit v1.2.1