From 7552c6d73043b1040139033f6864db48ae5446cf Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 2 Jul 2024 21:37:22 +0900 Subject: Rename main window nt* related files to equivalent tq*. The file "ntqsession.h" was totally unnecessary and has been removed. Signed-off-by: Michele Calgaro --- doc/html/qfd-example.html | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'doc/html/qfd-example.html') diff --git a/doc/html/qfd-example.html b/doc/html/qfd-example.html index b4c115b68..449904f41 100644 --- a/doc/html/qfd-example.html +++ b/doc/html/qfd-example.html @@ -50,7 +50,7 @@ This example program displays all characters of a font. #define FontDisplayer_H #include <ntqframe.h> -#include <ntqmainwindow.h> +#include <tqmainwindow.h> class TQSlider; @@ -59,7 +59,7 @@ class FontRowTable : public TQFrame { public: FontRowTable( TQWidget* parent=0, const char* name=0 ); - TQSize sizeHint() const; + TQSize sizeHint() const; signals: void fontInformation(const TQString&); @@ -70,14 +70,14 @@ public slots: protected: - TQSize cellSize() const; + TQSize cellSize() const; void paintEvent( TQPaintEvent* ); private: TQFont tablefont; int row; }; -class FontDisplayer : public TQMainWindow { +class FontDisplayer : public TQMainWindow { TQ_OBJECT public: FontDisplayer( TQWidget* parent=0, const char* name=0 ); @@ -103,8 +103,8 @@ public: #include <ntqslider.h> #include <ntqspinbox.h> #include <ntqpainter.h> -#include <ntqtoolbar.h> -#include <ntqstatusbar.h> +#include <tqtoolbar.h> +#include <tqstatusbar.h> #include <ntqlabel.h> #include <ntqpushbutton.h> #include <ntqfontdialog.h> @@ -141,15 +141,15 @@ TQSize FontRowTable::cellSize() const 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); + TQSize cell((width()-15-ml)/16,(height()-15-mt)/16); - if ( !cell.width() || !cell.height() ) + if ( !cell.width() || !cell.height() ) return; - int mini = r.left() / cell.width(); - int maxi = (r.right()+cell.width()-1) / cell.width(); - int minj = r.top() / cell.height(); - int maxj = (r.bottom()+cell.height()-1) / cell.height(); + int mini = r.left() / cell.width(); + int maxi = (r.right()+cell.width()-1) / cell.width(); + int minj = r.top() / cell.height(); + int maxj = (r.bottom()+cell.height()-1) / cell.height(); int h = fm.height(); @@ -162,8 +162,8 @@ TQSize FontRowTable::cellSize() const for (int j = minj; j<=maxj; j++) { for (int i = mini; i<=maxi; i++) { if ( i < 16 && j < 16 ) { - int x = i*cell.width(); - int y = j*cell.height(); + int x = i*cell.width(); + int y = j*cell.height(); TQChar ch = TQChar(j*16+i,row); @@ -228,21 +228,21 @@ void FontRowTable::chooseFont() } FontDisplayer::FontDisplayer( TQWidget* parent, const char* name ) : - TQMainWindow(parent,name) + TQMainWindow(parent,name) { FontRowTable* table = new FontRowTable(this); - TQToolBar* controls = new TQToolBar(this); + TQToolBar* controls = new TQToolBar(this); (void) new TQLabel(tr("Row:"), controls); TQSpinBox *row = new TQSpinBox(0,255,1,controls); - controls->addSeparator(); + controls->addSeparator(); TQPushButton *fontbutton = new TQPushButton(tr("Font..."), controls); connect(row,TQ_SIGNAL(valueChanged(int)),table,TQ_SLOT(setRow(int))); connect(fontbutton, TQ_SIGNAL(clicked()), table, TQ_SLOT(chooseFont())); connect(table,TQ_SIGNAL(fontInformation(const TQString&)), - statusBar(),TQ_SLOT(message(const TQString&))); + statusBar(),TQ_SLOT(message(const TQString&))); table->setRow(0); - setCentralWidget(table); + setCentralWidget(table); } @@ -263,7 +263,7 @@ void FontRowTable::chooseFont() #include <ntqapplication.h> #include <ntqslider.h> #include <ntqpainter.h> -#include <ntqstatusbar.h> +#include <tqstatusbar.h> @@ -272,9 +272,9 @@ int main(int argc, char** argv) TQApplication app(argc,argv); FontDisplayer m; - TQSize sh = m.centralWidget()->sizeHint(); - m.resize(sh.width(), - sh.height()+3*m.statusBar()->height()); + TQSize sh = m.centralWidget()->sizeHint(); + m.resize(sh.width(), + sh.height()+3*m.statusBar()->height()); app.setMainWidget(&m); m.setCaption("TQt Example - TQFD"); m.show(); -- cgit v1.2.1