From 520c05ef06ce203ad32470730f68402bc7719157 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 27 Feb 2012 02:13:42 -0600 Subject: Automated update from qt3 --- ChangeLog.immodule | 2 +- doc/dnd.doc | 2 +- doc/html/addressbook-example.html | 2 +- doc/html/canvas-chart-example.html | 2 +- doc/html/canvas-example.html | 10 +- doc/html/chart-chartform-cpp.html | 2 +- doc/html/clientserver-example.html | 4 +- doc/html/desktop-example.html | 12 +- doc/html/fileiconview-example.html | 2 +- doc/html/helpviewer-example.html | 2 +- doc/html/httpd-example.html | 2 +- doc/html/i18n-example.html | 12 +- doc/html/i18n.html | 4 +- doc/html/layout-example.html | 2 +- doc/html/linguist-manual-4.html | 12 +- doc/html/mail-example.html | 2 +- doc/html/mdi-example.html | 2 +- doc/html/menu-example.html | 2 +- doc/html/motif-customwidget-example.html | 2 +- doc/html/movies-example.html | 4 +- doc/html/ntqapplication.html | 10 +- doc/html/ntqcolor.html | 4 +- doc/html/ntqfile.html | 2 +- doc/html/ntqglcolormap.html | 2 +- doc/html/ntqimage.html | 2 +- doc/html/ntqprogressdialog.html | 2 +- doc/html/ntqsplashscreen.html | 4 +- doc/html/process-example.html | 2 +- doc/html/progress-example.html | 2 +- doc/html/qaction-application-example.html | 2 +- doc/html/qapplication-h.html | 6 +- doc/html/qcolor-h.html | 26 +-- doc/html/qgfx_qws-h.html | 8 +- doc/html/qmag-example.html | 6 +- doc/html/qmessagebox-h.html | 2 +- doc/html/qwerty-example.html | 10 +- doc/html/qwindowdefs-h.html | 2 +- doc/html/richtext-example.html | 2 +- doc/html/rot-example.html | 2 +- doc/html/scribble-example.html | 2 +- doc/html/scrollview-example.html | 6 +- doc/html/showimg-example.html | 4 +- doc/html/simple-application-example.html | 2 +- doc/html/simple-application.html | 2 +- doc/html/sound-example.html | 2 +- doc/html/t10-main-cpp.html | 2 +- doc/html/t11-main-cpp.html | 2 +- doc/html/t12-main-cpp.html | 2 +- doc/html/t13-gamebrd-cpp.html | 2 +- doc/html/t14-gamebrd-cpp.html | 4 +- doc/html/t7-main-cpp.html | 2 +- doc/html/t8-main-cpp.html | 2 +- doc/html/t9-main-cpp.html | 2 +- doc/html/tabdialog-example.html | 2 +- doc/html/themes-example.html | 24 +-- doc/html/threads.html | 4 +- doc/html/tictac-example.html | 2 +- doc/html/tutorial1-04.html | 6 +- doc/html/tutorial1-05.html | 2 +- doc/html/tutorial1-06.html | 4 +- doc/html/tutorial1-14.html | 2 +- doc/html/tutorial2-05.html | 2 +- doc/html/xform-example.html | 2 +- doc/i18n.doc | 4 +- doc/man/man3/qapplication.3qt | 10 +- doc/man/man3/qcolor.3qt | 30 +-- doc/man/man3/qfile.3qt | 2 +- doc/man/man3/qglcolormap.3qt | 2 +- doc/man/man3/qimage.3qt | 16 +- doc/man/man3/qprogressdialog.3qt | 2 +- doc/man/man3/qsplashscreen.3qt | 4 +- doc/porting2.doc | 6 +- doc/threads.doc | 4 +- doc/tutorial.doc | 6 +- examples/action/application.cpp | 2 +- examples/addressbook/mainwindow.cpp | 2 +- examples/application/application.cpp | 2 +- examples/canvas/blendshadow.cpp | 12 +- examples/canvas/canvas.cpp | 8 +- examples/canvas/main.cpp | 2 +- examples/canvas/makeimg.cpp | 30 +-- examples/chart/chartform.cpp | 2 +- examples/demo/frame.cpp | 8 +- examples/demo/i18n/i18n.cpp | 14 +- examples/demo/main.cpp | 2 +- examples/demo/textdrawing/textedit.cpp | 2 +- examples/desktop/desktop.cpp | 12 +- examples/dragdrop/main.cpp | 2 +- examples/fileiconview/qfileiconview.cpp | 2 +- examples/helpviewer/helpwindow.cpp | 2 +- examples/i18n/main.cpp | 10 +- examples/i18n/mywidget.cpp | 2 +- examples/layout/layout.cpp | 2 +- examples/life/lifedlg.cpp | 6 +- examples/mdi/application.cpp | 2 +- examples/menu/menu.cpp | 2 +- examples/movies/main.cpp | 4 +- examples/network/clientserver/client/client.cpp | 2 +- examples/network/clientserver/server/server.cpp | 2 +- examples/network/httpd/httpd.cpp | 2 +- .../network/infoprotocol/infoclient/client.cpp | 2 +- .../network/infoprotocol/infoserver/server.cpp | 2 +- .../network/infoprotocol/infourlclient/client.cpp | 2 +- examples/network/mail/smtp.cpp | 2 +- examples/opengl/box/globjwin.cpp | 2 +- examples/opengl/glpixmap/globjwin.cpp | 2 +- examples/opengl/overlay/globjwin.cpp | 4 +- examples/opengl/overlay/main.cpp | 2 +- examples/opengl/overlay_x11/main.cpp | 2 +- examples/opengl/sharedbox/globjwin.cpp | 2 +- examples/opengl/texture/globjwin.cpp | 2 +- examples/process/process.cpp | 2 +- examples/progress/progress.cpp | 2 +- examples/qmag/qmag.cpp | 6 +- examples/qwerty/main.cpp | 4 +- examples/qwerty/qwerty.cpp | 6 +- examples/richtext/richtext.cpp | 2 +- examples/rot13/rot13.cpp | 2 +- examples/scribble/scribble.cpp | 2 +- examples/scrollview/scrollview.cpp | 6 +- examples/showimg/main.cpp | 2 +- examples/showimg/showimg.cpp | 2 +- examples/sound/sound.cpp | 2 +- examples/tabdialog/tabdialog.cpp | 2 +- examples/tablet/canvas.cpp | 2 +- examples/tetrix/qtetrix.cpp | 2 +- examples/textedit/textedit.cpp | 8 +- examples/themes/themes.cpp | 24 +-- examples/tictac/tictac.cpp | 2 +- examples/widgets/main.cpp | 2 +- examples/widgets/widgets.cpp | 12 +- examples/xform/xform.cpp | 2 +- extensions/nsplugin/src/qnp.cpp | 18 +- .../src/inputmethods/xim/qximinputcontext_x11.cpp | 4 +- src/dialogs/ntqmessagebox.h | 2 +- src/dialogs/qcolordialog.cpp | 34 +-- src/dialogs/qdialog.cpp | 30 +-- src/dialogs/qerrormessage.cpp | 4 +- src/dialogs/qfiledialog.cpp | 30 +-- src/dialogs/qmessagebox.cpp | 6 +- src/dialogs/qprogressdialog.cpp | 4 +- src/iconview/qiconview.cpp | 2 +- src/kernel/ntqapplication.h | 6 +- src/kernel/ntqcolor.h | 26 +-- src/kernel/ntqwindowdefs.h | 2 +- src/kernel/qapplication.cpp | 72 +++---- src/kernel/qapplication_x11.cpp | 64 +++--- src/kernel/qasyncimageio.cpp | 2 +- src/kernel/qclipboard_x11.cpp | 6 +- src/kernel/qcolor.cpp | 48 ++--- src/kernel/qcolor_x11.cpp | 18 +- src/kernel/qcursor_x11.cpp | 2 +- src/kernel/qdnd_x11.cpp | 26 +-- src/kernel/qdragobject.cpp | 4 +- src/kernel/qevent.cpp | 2 +- src/kernel/qeventloop.cpp | 2 +- src/kernel/qeventloop_x11.cpp | 4 +- src/kernel/qfont.cpp | 2 +- src/kernel/qfontdatabase.cpp | 2 +- src/kernel/qimage.cpp | 228 ++++++++++----------- src/kernel/qjpegio.cpp | 42 ++-- src/kernel/qlocalfs.cpp | 4 +- src/kernel/qobject.cpp | 2 +- src/kernel/qpaintdevice_x11.cpp | 2 +- src/kernel/qpainter.cpp | 4 +- src/kernel/qpainter_x11.cpp | 2 +- src/kernel/qpixmap_x11.cpp | 56 ++--- src/kernel/qpngio.cpp | 36 ++-- src/kernel/qpsprinter.cpp | 22 +- src/kernel/qrichtext_p.cpp | 8 +- src/kernel/qsound_x11.cpp | 10 +- src/kernel/qtextengine.cpp | 4 +- src/kernel/qtranslator.cpp | 14 +- src/kernel/qwidget.cpp | 56 ++--- src/kernel/qwidget_x11.cpp | 18 +- src/moc/moc.y | 8 +- src/moc/moc_yacc.cpp | 8 +- src/network/qdns.cpp | 4 +- src/opengl/qgl_x11.cpp | 14 +- src/opengl/qglcolormap.cpp | 14 +- src/sql/qsqldatabase.cpp | 4 +- src/sql/qsqlmanager_p.cpp | 28 +-- src/styles/qstylefactory.cpp | 2 +- src/styles/qwindowsstyle.cpp | 4 +- src/table/qtable.cpp | 4 +- src/tools/qcomponentfactory.cpp | 2 +- src/tools/qfile.cpp | 2 +- src/widgets/qbuttongroup.cpp | 2 +- src/widgets/qcheckbox.cpp | 2 +- src/widgets/qcombobox.cpp | 2 +- src/widgets/qdatetimeedit.cpp | 8 +- src/widgets/qdockwindow.cpp | 20 +- src/widgets/qeffects.cpp | 22 +- src/widgets/qlistbox.cpp | 2 +- src/widgets/qlistview.cpp | 6 +- src/widgets/qmenubar.cpp | 6 +- src/widgets/qpopupmenu.cpp | 24 +-- src/widgets/qpushbutton.cpp | 4 +- src/widgets/qradiobutton.cpp | 2 +- src/widgets/qspinbox.cpp | 2 +- src/widgets/qsplashscreen.cpp | 4 +- src/widgets/qtabbar.cpp | 2 +- src/widgets/qtabwidget.cpp | 2 +- src/widgets/qtextbrowser.cpp | 6 +- src/widgets/qtextedit.cpp | 2 +- src/widgets/qtoolbutton.cpp | 2 +- src/widgets/qtooltip.cpp | 18 +- src/widgets/qwhatsthis.cpp | 8 +- src/widgets/qwidgetresizehandler.cpp | 4 +- src/workspace/qworkspace.cpp | 24 +-- tools/assistant/config.cpp | 12 +- tools/assistant/helpdialogimpl.cpp | 6 +- tools/assistant/index.cpp | 4 +- tools/assistant/mainwindow.ui.h | 16 +- tools/designer/designer/customwidgeteditorimpl.cpp | 2 +- tools/designer/designer/formfile.cpp | 2 +- tools/designer/designer/formwindow.cpp | 12 +- tools/designer/designer/hierarchyview.cpp | 2 +- tools/designer/designer/listeditor.ui.h | 2 +- tools/designer/designer/mainwindow.cpp | 20 +- tools/designer/designer/mainwindowactions.cpp | 10 +- tools/designer/designer/menubareditor.cpp | 2 +- tools/designer/designer/multilineeditorimpl.cpp | 4 +- tools/designer/designer/outputwindow.cpp | 2 +- tools/designer/designer/pixmapchooser.cpp | 12 +- tools/designer/designer/popupmenueditor.cpp | 2 +- tools/designer/designer/project.cpp | 2 +- tools/designer/designer/propertyeditor.cpp | 14 +- tools/designer/designer/resource.cpp | 4 +- tools/designer/designer/syntaxhighlighter_html.cpp | 10 +- tools/designer/editor/conf.cpp | 6 +- .../designer/examples/addressbook/addressbook.ui.h | 2 +- tools/designer/examples/multiclip/multiclip.ui.h | 2 +- tools/designer/examples/richedit/richedit.ui.h | 2 +- .../plugins/cppeditor/syntaxhighliter_cpp.cpp | 2 +- tools/designer/plugins/glade/glade2ui.cpp | 2 +- tools/designer/plugins/wizards/main.cpp | 4 +- tools/designer/shared/globaldefs.h | 2 +- tools/designer/uilib/qwidgetfactory.cpp | 8 +- tools/linguist/book/linguist-programmer.leaf | 6 +- tools/linguist/linguist/msgedit.cpp | 4 +- tools/linguist/linguist/phrase.cpp | 2 +- tools/linguist/linguist/trwindow.cpp | 26 +-- tools/linguist/shared/metatranslator.cpp | 4 +- tools/linguist/tutorial/tt2/mainwindow.cpp | 2 +- tools/linguist/tutorial/tt3/mainwindow.cpp | 2 +- tools/makeqpf/main.cpp | 2 +- tools/qconfig/main.cpp | 2 +- tools/qtconfig/colorbutton.cpp | 2 +- tools/qtconfig/mainwindow.cpp | 4 +- tools/qvfb/qanimationwriter.cpp | 4 +- tools/qvfb/qvfb.cpp | 2 +- tools/qvfb/qvfbview.cpp | 16 +- tutorial/t10/main.cpp | 2 +- tutorial/t11/main.cpp | 2 +- tutorial/t12/main.cpp | 2 +- tutorial/t13/gamebrd.cpp | 2 +- tutorial/t14/gamebrd.cpp | 4 +- tutorial/t4/main.cpp | 2 +- tutorial/t5/main.cpp | 2 +- tutorial/t6/main.cpp | 2 +- tutorial/t7/main.cpp | 2 +- tutorial/t8/main.cpp | 2 +- tutorial/t9/main.cpp | 2 +- 264 files changed, 1039 insertions(+), 1039 deletions(-) diff --git a/ChangeLog.immodule b/ChangeLog.immodule index 46a5e9d7b..38422046b 100644 --- a/ChangeLog.immodule +++ b/ChangeLog.immodule @@ -1782,7 +1782,7 @@ excessive invalid QInputContext::unsetFocus(). QWidget::deactivateWidgetCleanup() handles unfocusInputContext() appropriately via - qApp->setActiveWindow( 0 ). + tqApp->setActiveWindow( 0 ). 2004-06-08 YamaKen diff --git a/doc/dnd.doc b/doc/dnd.doc index 45acf8ad2..31fedba4c 100644 --- a/doc/dnd.doc +++ b/doc/dnd.doc @@ -336,7 +336,7 @@ feedback as the drag progresses, to start timers, to scroll the window, or whatever is appropriate (don't forget to stop the scrolling and timers in a dragLeaveEvent() though). -The QApplication object (available as the \c qApp global) also +The QApplication object (available as the \c tqApp global) also provides some drag and drop related functions: \l{QApplication::setStartDragTime()}, \l{QApplication::setStartDragDistance()}, and their corresponding diff --git a/doc/html/addressbook-example.html b/doc/html/addressbook-example.html index 54a26fcd9..a1bcc8ef9 100644 --- a/doc/html/addressbook-example.html +++ b/doc/html/addressbook-example.html @@ -141,7 +141,7 @@ void ABMainWindow::setupMenuBar() file->insertItem( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P ); file->insertSeparator(); file->insertItem( "Close", this, SLOT( closeWindow() ), CTRL + Key_W ); - file->insertItem( "Quit", qApp, SLOT( quit() ), CTRL + Key_Q ); + file->insertItem( "Quit", tqApp, SLOT( quit() ), CTRL + Key_Q ); } void ABMainWindow::setupFileTools() diff --git a/doc/html/canvas-chart-example.html b/doc/html/canvas-chart-example.html index 6142313ac..fb33afb32 100644 --- a/doc/html/canvas-chart-example.html +++ b/doc/html/canvas-chart-example.html @@ -614,7 +614,7 @@ void ChartForm::fileQuit() { if ( okToClear() ) { saveOptions(); - qApp->exit( 0 ); + tqApp->exit( 0 ); } } diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index 40f6d9c8d..c9a0b0c0d 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -214,7 +214,7 @@ bool ImageItem::hit( const TQPoint if ( !image.valid( ix , iy ) ) return FALSE; TQRgb pixel = image.pixel( ix, iy ); - return qAlpha( pixel ) != 0; + return tqAlpha( pixel ) != 0; } class NodeItem: public TQCanvasEllipse @@ -454,7 +454,7 @@ static TQImage *logoimg; file->insertSeparator(); file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P); file->insertSeparator(); - file->insertItem("E&xit", qApp, SLOT(quit()), CTRL+Key_Q); + file->insertItem("E&xit", tqApp, SLOT(quit()), CTRL+Key_Q); menu->insertItem("&File", file); TQPopupMenu* edit = new TQPopupMenu( menu ); @@ -544,9 +544,9 @@ void Main::newView() { // Open a new view... have it delete when closed. Main *m = new Main(canvas, 0, 0, WDestructiveClose); - qApp->setMainWidget(m); + tqApp->setMainWidget(m); m->show(); - qApp->setMainWidget(0); + tqApp->setMainWidget(0); } void Main::clear() @@ -922,7 +922,7 @@ int main(int argc, char** argv) else m.showMaximized(); - TQObject::connect( qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()) ); + TQObject::connect( tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()) ); return app.exec(); } diff --git a/doc/html/chart-chartform-cpp.html b/doc/html/chart-chartform-cpp.html index 22b65df74..e106621f9 100644 --- a/doc/html/chart-chartform-cpp.html +++ b/doc/html/chart-chartform-cpp.html @@ -402,7 +402,7 @@ void ChartForm::fileQuit() { if ( okToClear() ) { saveOptions(); - qApp->exit( 0 ); + tqApp->exit( 0 ); } } diff --git a/doc/html/clientserver-example.html b/doc/html/clientserver-example.html index 5753ac9a2..93a9f3009 100644 --- a/doc/html/clientserver-example.html +++ b/doc/html/clientserver-example.html @@ -170,7 +170,7 @@ public: connect( server, SIGNAL(newConnect(ClientSocket*)), SLOT(newConnect(ClientSocket*)) ); - connect( quit, SIGNAL(clicked()), qApp, + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } @@ -249,7 +249,7 @@ public: connect( send, SIGNAL(clicked()), SLOT(sendToServer()) ); connect( close, SIGNAL(clicked()), SLOT(closeConnection()) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); // create the socket and connect various of its signals socket = new TQSocket( this ); diff --git a/doc/html/desktop-example.html b/doc/html/desktop-example.html index 1d778ace4..8f2458094 100644 --- a/doc/html/desktop-example.html +++ b/doc/html/desktop-example.html @@ -163,7 +163,7 @@ void rotate() const int h = 64; TQImage image( w, h, 8, 128 ); // create image for ( i=0; i<128; i++ ) // build color table - image.setColor( i, qRgb(i,0,0) ); + image.setColor( i, tqRgb(i,0,0) ); for ( int y=0; y<h; y++ ) { // set image pixels uchar *p = image.scanLine(y); for ( int x=0; x<w; x++ ) @@ -303,7 +303,7 @@ void desktopWidget( const char *s = "Trolltech" ) { DesktopWidget *t = new DesktopWidget(s); t->update(); - qApp->exec(); + tqApp->exec(); delete t; } @@ -311,7 +311,7 @@ void desktopText( const char *s = "Trolltech" ) { const int border = 20; - TQColor c1 = qApp->palette().inactive().background(); + TQColor c1 = tqApp->palette().inactive().background(); TQColor c2 = c1.light(104); TQColor c3 = c1.dark(106); @@ -322,8 +322,8 @@ void desktopText( const char *s = "Trolltech" ) TQRect r = p.fontMetrics().boundingRect( s ); p.end(); - int appWidth = qApp->desktop()->width(); - int appHeight = qApp->desktop()->height(); + int appWidth = tqApp->desktop()->width(); + int appHeight = tqApp->desktop()->height(); if ( r.width() > appWidth - border*2 ) r.setWidth( appWidth - border*2 ); if ( r.height() > appHeight - border*2 ) @@ -335,7 +335,7 @@ void desktopText( const char *s = "Trolltech" ) drawShadeText( &p, -r.x() + border, -r.y() + border, s, c2, c3 ); p.end(); - qApp->desktop()->setBackgroundPixmap( pm ); + tqApp->desktop()->setBackgroundPixmap( pm ); } // diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html index b835b6f3d..b2b2b0da5 100644 --- a/doc/html/fileiconview-example.html +++ b/doc/html/fileiconview-example.html @@ -772,7 +772,7 @@ void TQtFileIconView::newDirectory() item->setSelected( TRUE, TRUE ); setCurrentItem( item ); repaintItem( item ); - qApp->processEvents(); + tqApp->processEvents(); item->rename(); } setAutoArrange( TRUE ); diff --git a/doc/html/helpviewer-example.html b/doc/html/helpviewer-example.html index a72528c9c..190056972 100644 --- a/doc/html/helpviewer-example.html +++ b/doc/html/helpviewer-example.html @@ -174,7 +174,7 @@ private: file->insertItem( tr("&Print"), this, SLOT( print() ), CTRL+Key_P ); file->insertSeparator(); file->insertItem( tr("&Close"), this, SLOT( close() ), CTRL+Key_Q ); - file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), CTRL+Key_X ); + file->insertItem( tr("E&xit"), tqApp, SLOT( closeAllWindows() ), CTRL+Key_X ); // The same three icons are used twice each. TQIconSet icon_back( TQPixmap("back.xpm") ); diff --git a/doc/html/httpd-example.html b/doc/html/httpd-example.html index 733d2e299..08673f7b1 100644 --- a/doc/html/httpd-example.html +++ b/doc/html/httpd-example.html @@ -145,7 +145,7 @@ public: connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) ); connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) ); connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) ); - connect( quit, SIGNAL(pressed()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(pressed()), tqApp, SLOT(quit()) ); } ~HttpInfo() diff --git a/doc/html/i18n-example.html b/doc/html/i18n-example.html index a517c9493..88a09baa5 100644 --- a/doc/html/i18n-example.html +++ b/doc/html/i18n-example.html @@ -112,7 +112,7 @@ private: setCentralWidget(central); TQPopupMenu* file = new TQPopupMenu(this); - file->insertItem( tr("E&xit"), qApp, SLOT(quit()), + file->insertItem( tr("E&xit"), tqApp, SLOT(quit()), TQAccel::stringToKey(tr("Ctrl+Q")) ); menuBar()->insertItem( tr("&File"), file ); @@ -229,7 +229,7 @@ MyWidget* showLang(TQString lang) static TQTranslator *translator = 0; - qApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); + tqApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); lang = "mywidget_" + lang + ".qm"; TQFileInfo fi( lang ); @@ -241,12 +241,12 @@ MyWidget* showLang(TQString lang) return 0; } if ( translator ) { - qApp->removeTranslator( translator ); + tqApp->removeTranslator( translator ); delete translator; } translator = new TQTranslator( 0 ); translator->load( lang, "." ); - qApp->installTranslator( translator ); + tqApp->installTranslator( translator ); MyWidget *m = new MyWidget; m->setCaption("TQt Example - i18n - " + m->caption() ); return m; @@ -284,7 +284,7 @@ int main( int argc, char** argv ) r = dlg.exec(); } if ( r ) { - TQRect screen = qApp->desktop()->availableGeometry(); + TQRect screen = tqApp->desktop()->availableGeometry(); bool tight = screen.width() < 1024; int x=screen.left()+5; int y=screen.top()+25; @@ -293,7 +293,7 @@ int main( int argc, char** argv ) MyWidget* w = showLang((const char*)qm[i]); if( w == 0 ) exit( 0 ); - TQObject::connect(w, SIGNAL(closed()), qApp, SLOT(quit())); + TQObject::connect(w, SIGNAL(closed()), tqApp, SLOT(quit())); w->setGeometry(x,y,197,356); w->show(); if ( tight ) { diff --git a/doc/html/i18n.html b/doc/html/i18n.html index a49407e1c..14b5a0be6 100644 --- a/doc/html/i18n.html +++ b/doc/html/i18n.html @@ -204,7 +204,7 @@ directly: void same_global_function( LoginWidget *logwid ) { TQLabel *label = new TQLabel( - qApp->translate("LoginWidget", "Password:"), + tqApp->translate("LoginWidget", "Password:"), logwid ); } @@ -240,7 +240,7 @@ The macros expand to just the text (without the context). TQString global_greeting( int greet_type ) { - return qApp->translate( "FriendlyConversation", + return tqApp->translate( "FriendlyConversation", greeting_strings[greet_type] ); } diff --git a/doc/html/layout-example.html b/doc/html/layout-example.html index a70717757..c79f41acd 100644 --- a/doc/html/layout-example.html +++ b/doc/html/layout-example.html @@ -76,7 +76,7 @@ public: menubar->setSeparator( TQMenuBar::InWindowsStyle ); TQPopupMenu* popup; popup = new TQPopupMenu( this ); - popup->insertItem( "&Quit", qApp, SLOT(quit()) ); + popup->insertItem( "&Quit", tqApp, SLOT(quit()) ); menubar->insertItem( "&File", popup ); // ...and tell the layout about it. diff --git a/doc/html/linguist-manual-4.html b/doc/html/linguist-manual-4.html index 97645ddf5..8a5e52c57 100644 --- a/doc/html/linguist-manual-4.html +++ b/doc/html/linguist-manual-4.html @@ -102,7 +102,7 @@ body { background: #ffffff; color: black; } rbh = new TQRadioButton( tr("Enabled", "Hue frame"), this );

Ctrl key accelerators are also translatable:

-
        file->insertItem( tr("E&xit"), qApp, SLOT(quit()),
+
        file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
                           tr("Ctrl+Q", "Quit") );
 

It is strongly recommended that the two argument form of tr() is used for Ctrl key accelerators. The second argument is the only clue the translator has as to the function performed by the accelerator.

@@ -136,7 +136,7 @@ body { background: #ffffff; color: black; } void same_global_function( LoginWidget *logwid ) { TQLabel *label = new TQLabel( - qApp->translate("LoginWidget", "Password:"), + tqApp->translate("LoginWidget", "Password:"), logwid ); }
@@ -167,7 +167,7 @@ body { background: #ffffff; color: black; } TQString global_greeting( int greet_type ) { - return qApp->translate( "FriendlyConversation", + return tqApp->translate( "FriendlyConversation", greeting_strings[greet_type] ); } @@ -317,7 +317,7 @@ TRANSLATIONS = tt2_fr.ts \

When lupdate is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the ArrowPad class. The TQ_OBJECT macro defines tr(x) in ArrowPad like this

-    qApp->translate( "ArrowPad", x )
+    tqApp->translate( "ArrowPad", x )
 

Knowing which class each source text appears in enables TQt Linguist to group texts that are logically related together, e.g. all the text in a dialog will have the context of the dialog's class name and will be shown together. This provides useful information for the translator since the context in which text appears may influence how it should be translated. For some translations keyboard accelerators may need to be changed and having all the source texts in a particular context (class) grouped together makes it easier for the translator to perform any accelerator changes without introducing conflicts.

In arrowpad.cpp we implement the ArrowPad class.

@@ -336,7 +336,7 @@ TRANSLATIONS = tt2_fr.ts \
        ArrowPad *ap = new ArrowPad( this, "arrow pad" );
 

We also call MainWindow::tr() twice, once for the menu item and once for the accelerator.

-
        file->insertItem( tr("E&xit"), qApp, SLOT(quit()),
+
        file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
                           tr("Ctrl+Q", "Quit") );
 

Note the use of tr() to support different keys in other languages. "Ctrl+Q" is a good choice for Quit in English, but a Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a German translator "Strg+E" (for Beenden). When using tr() for Ctrl key accelerators, the two argument form should be used with the second argument describing the function that the accelerator performs.

@@ -452,7 +452,7 @@ TRANSLATIONS = tt3_pt.ts
        setCaption( tr("Troll Print 1.0") );
 

We must translate the window's caption.

-
        file->insertItem( tr("E&xit"), qApp, SLOT(quit()),
+
        file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
                           tr("Ctrl+Q", "Quit") );
         TQPopupMenu *help = new TQPopupMenu( this );
         help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 );
diff --git a/doc/html/mail-example.html b/doc/html/mail-example.html
index e5200c75e..e3c895e22 100644
--- a/doc/html/mail-example.html
+++ b/doc/html/mail-example.html
@@ -220,7 +220,7 @@ void Smtp::readyRead()
         return;
     } else {
         // something broke.
-        TQMessageBox::warning( qApp->activeWindow(),
+        TQMessageBox::warning( tqApp->activeWindow(),
                               tr( "TQt Mail Example" ),
                               tr( "Unexpected reply from SMTP server:\n\n" ) +
                               response );
diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html
index 48022b476..94cf3aafe 100644
--- a/doc/html/mdi-example.html
+++ b/doc/html/mdi-example.html
@@ -233,7 +233,7 @@ const char * filePrintText = "Click this button to print the file you "
 #endif
     file->insertSeparator();
     file->insertItem( "&Close", this, SLOT(closeWindow()), CTRL+Key_W );
-    file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+    file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
 
     windowsMenu = new TQPopupMenu( this );
     windowsMenu->setCheckable( TRUE );
diff --git a/doc/html/menu-example.html b/doc/html/menu-example.html
index 6b17e6b47..891614463 100644
--- a/doc/html/menu-example.html
+++ b/doc/html/menu-example.html
@@ -242,7 +242,7 @@ private:
     file->insertSeparator();
     file->insertItem( "&Print", print, CTRL+Key_P );
     file->insertSeparator();
-    file->insertItem( "E&xit",  qApp, SLOT(quit()), CTRL+Key_Q );
+    file->insertItem( "E&xit",  tqApp, SLOT(quit()), CTRL+Key_Q );
 
     TQPopupMenu *edit = new TQPopupMenu( this );
     TQ_CHECK_PTR( edit );
diff --git a/doc/html/motif-customwidget-example.html b/doc/html/motif-customwidget-example.html
index ea42cd026..01e80d33d 100644
--- a/doc/html/motif-customwidget-example.html
+++ b/doc/html/motif-customwidget-example.html
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
     : TQMainWindow( 0, "mainwindow" )
 {
     TQPopupMenu *filemenu = new TQPopupMenu( this );
-    filemenu->insertItem( tr("&Quit"), qApp, SLOT(quit()) );
+    filemenu->insertItem( tr("&Quit"), tqApp, SLOT(quit()) );
 
     menuBar()->insertItem( tr("&File"), filemenu );
     statusBar()->message( tr("This is a TQMainWindow with an XmText widget.") );
diff --git a/doc/html/movies-example.html b/doc/html/movies-example.html
index da55fea68..dd3967d87 100644
--- a/doc/html/movies-example.html
+++ b/doc/html/movies-example.html
@@ -292,7 +292,7 @@ void MovieStarter::startMovie(const 
 void MovieStarter::done( int r )
 {
     if (r != Accepted)
-        qApp->quit(); // end on Cancel
+        tqApp->quit(); // end on Cancel
     setResult( r );
 
     // And don't hide.
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
                 (void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0,
                                       TQt::WDestructiveClose);
         }
-        TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
+        TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
     } else {
         // "GUI" mode - open a chooser for movies
         //
diff --git a/doc/html/ntqapplication.html b/doc/html/ntqapplication.html
index ef34d5a9b..07f5573f4 100644
--- a/doc/html/ntqapplication.html
+++ b/doc/html/ntqapplication.html
@@ -696,10 +696,10 @@ entry in the file menu as shown in the following code example:
 

     // the "Quit" menu entry should try to close all windows
     TQPopupMenu* file = new TQPopupMenu( this );
-    file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q );
+    file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), CTRL+Key_Q );
 
     // when the last window is closed, the application should quit
-    connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) );
+    connect( tqApp, SIGNAL( lastWindowClosed() ), tqApp, SLOT( quit() ) );
   

The windows are closed in random order, until one window does not @@ -1027,8 +1027,8 @@ reimplementing this virtual function is just one of them. All five approaches are listed below:

  1. Reimplementing this function. This is very powerful, providing -complete control; but only one subclass can be qApp. -

  2. Installing an event filter on qApp. Such an event filter is able +complete control; but only one subclass can be tqApp. +

  3. Installing an event filter on tqApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even @@ -1126,7 +1126,7 @@ you also often connect e.g. TQButton::clicked Example:
         TQPushButton *quitButton = new TQPushButton( "Quit" );
    -    connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
    +    connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) );
       

    See also exit(), aboutToQuit(), lastWindowClosed(), and TQAction. diff --git a/doc/html/ntqcolor.html b/doc/html/ntqcolor.html index 24ed8f71a..465af1901 100644 --- a/doc/html/ntqcolor.html +++ b/doc/html/ntqcolor.html @@ -92,7 +92,7 @@ body { background: #ffffff; color: black; }

  4. TQRgb qRgb ( int r, int g, int b )
  5. TQRgb qRgba ( int r, int g, int b, int a )
  6. int qGray ( int r, int g, int b )
  7. -
  8. int qGray ( qRgb rgb )
  9. +
  10. int qGray ( tqRgb rgb )

  11. Detailed Description

    @@ -569,7 +569,7 @@ Reads a color object, c, from the stream, s.

    The gray value is calculated using the formula (r*11 + g*16 + b*5)/32. -

    int qGray ( qRgb rgb ) +

    int qGray ( tqRgb rgb )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    diff --git a/doc/html/ntqfile.html b/doc/html/ntqfile.html index 58efb3bc6..61ebcb6a6 100644 --- a/doc/html/ntqfile.html +++ b/doc/html/ntqfile.html @@ -229,7 +229,7 @@ should translate it first, for example: TQMessageBox::critical( this, tr("Open failed"), - tr("Could not open file for reading: %1").arg( qApp->translate("TQFile",f.errorString()) ) + tr("Could not open file for reading: %1").arg( tqApp->translate("TQFile",f.errorString()) ) ); return; } diff --git a/doc/html/ntqglcolormap.html b/doc/html/ntqglcolormap.html index 3468ee647..9de907b3f 100644 --- a/doc/html/ntqglcolormap.html +++ b/doc/html/ntqglcolormap.html @@ -92,7 +92,7 @@ in child widgets. // This will fill the colormap with colors ranging from // black to white. for ( int i = 0; i < colormap.size(); i++ ) - colormap.setEntry( i, qRgb( i, i, i ) ); + colormap.setEntry( i, tqRgb( i, i, i ) ); widget.setColormap( colormap ); widget.show(); diff --git a/doc/html/ntqimage.html b/doc/html/ntqimage.html index 0fa297597..2e04c4c0f 100644 --- a/doc/html/ntqimage.html +++ b/doc/html/ntqimage.html @@ -182,7 +182,7 @@ because they have a single byte per pixel:

         TQImage image;
         // set entry 19 in the color table to yellow
    -    image.setColor( 19, qRgb(255,255,0) );
    +    image.setColor( 19, tqRgb(255,255,0) );
         // set 8 bit pixel at (x,y) to value yellow (in color table)
         *(image.scanLine(y) + x) = 19;
         
    diff --git a/doc/html/ntqprogressdialog.html b/doc/html/ntqprogressdialog.html index 68d8f3cbf..9844b2b14 100644 --- a/doc/html/ntqprogressdialog.html +++ b/doc/html/ntqprogressdialog.html @@ -126,7 +126,7 @@ TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles, this, "progress", TRUE ); for ( int i = 0; i < numFiles; i++ ) { progress.setProgress( i ); - qApp->processEvents(); + tqApp->processEvents(); if ( progress.wasCanceled() ) break; diff --git a/doc/html/ntqsplashscreen.html b/doc/html/ntqsplashscreen.html index da8cfa38e..b2646ebb4 100644 --- a/doc/html/ntqsplashscreen.html +++ b/doc/html/ntqsplashscreen.html @@ -114,10 +114,10 @@ call TQApplication::processEventsshow(); ... // Loading some items splash->message( "Loaded modules" ); - qApp->processEvents(); + tqApp->processEvents(); ... // Establishing connections splash->message( "Established connections" ); - qApp->processEvents(); + tqApp->processEvents();

See also Miscellaneous Classes. diff --git a/doc/html/process-example.html b/doc/html/process-example.html index d3b8ef8c0..0ee3cba54 100644 --- a/doc/html/process-example.html +++ b/doc/html/process-example.html @@ -83,7 +83,7 @@ private: output = new TQTextView( this ); quitButton = new TQPushButton( tr("Quit"), this ); connect( quitButton, SIGNAL(clicked()), - qApp, SLOT(quit()) ); + tqApp, SLOT(quit()) ); resize( 500, 500 ); // TQProcess related code diff --git a/doc/html/progress-example.html b/doc/html/progress-example.html index a5ae52bca..465316bd9 100644 --- a/doc/html/progress-example.html +++ b/doc/html/progress-example.html @@ -192,7 +192,7 @@ public: file->insertItem( drawItemText(i), i ); connect( menubar, SIGNAL(activated(int)), this, SLOT(doMenuItem(int)) ); file->insertSeparator(); - file->insertItem( "Quit", qApp, SLOT(quit()) ); + file->insertItem( "Quit", tqApp, SLOT(quit()) ); options = new TQPopupMenu(); TQ_CHECK_PTR( options ); diff --git a/doc/html/qaction-application-example.html b/doc/html/qaction-application-example.html index 89c4f8892..5431f196b 100644 --- a/doc/html/qaction-application-example.html +++ b/doc/html/qaction-application-example.html @@ -189,7 +189,7 @@ private: fileQuitAction = new TQAction( "Quit", "&Quit", CTRL+Key_Q, this, "quit" ); - connect( fileQuitAction, SIGNAL( activated() ) , qApp, + connect( fileQuitAction, SIGNAL( activated() ) , tqApp, SLOT( closeAllWindows() ) ); // populate a tool bar with some actions diff --git a/doc/html/qapplication-h.html b/doc/html/qapplication-h.html index 858534ed1..cd72c34da 100644 --- a/doc/html/qapplication-h.html +++ b/doc/html/qapplication-h.html @@ -100,7 +100,7 @@ class TQMutex; class TQApplication; -extern Q_EXPORT TQApplication *qApp; // global application object +extern Q_EXPORT TQApplication *tqApp; // global application object class Q_EXPORT TQApplication : public TQObject @@ -532,10 +532,10 @@ inline TQSize TQApplication::globalStrut() } inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) -{ if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; } +{ if ( event ) event->spont = FALSE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; } inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) -{ if ( event ) event->spont = TRUE; return qApp ? qApp->notify( receiver, event ) : FALSE; } +{ if ( event ) event->spont = TRUE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; } #ifdef QT_NO_TRANSLATION // Simple versions diff --git a/doc/html/qcolor-h.html b/doc/html/qcolor-h.html index ccfea5d58..4dd1737ed 100644 --- a/doc/html/qcolor-h.html +++ b/doc/html/qcolor-h.html @@ -82,31 +82,31 @@ body { background: #ffffff; color: black; } #include "ntqstringlist.h" #endif // QT_H -const TQRgb RGB_MASK = 0x00ffffff; // masks RGB values +const TQRgb TQT_RGB_MASK = 0x00ffffff; // masks RGB values -Q_EXPORT inline int qRed( TQRgb rgb ) // get red part of RGB +Q_EXPORT inline int tqRed( TQRgb rgb ) // get red part of RGB { return (int)((rgb >> 16) & 0xff); } -Q_EXPORT inline int qGreen( TQRgb rgb ) // get green part of RGB +Q_EXPORT inline int tqGreen( TQRgb rgb ) // get green part of RGB { return (int)((rgb >> 8) & 0xff); } -Q_EXPORT inline int qBlue( TQRgb rgb ) // get blue part of RGB +Q_EXPORT inline int tqBlue( TQRgb rgb ) // get blue part of RGB { return (int)(rgb & 0xff); } -Q_EXPORT inline int qAlpha( TQRgb rgb ) // get alpha part of RGBA +Q_EXPORT inline int tqAlpha( TQRgb rgb ) // get alpha part of RGBA { return (int)((rgb >> 24) & 0xff); } -Q_EXPORT inline TQRgb qRgb( int r, int g, int b )// set RGB value +Q_EXPORT inline TQRgb tqRgb( int r, int g, int b )// set RGB value { return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_EXPORT inline TQRgb qRgba( int r, int g, int b, int a )// set RGBA value +Q_EXPORT inline TQRgb tqRgba( int r, int g, int b, int a )// set RGBA value { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 +Q_EXPORT inline int tqGray( int r, int g, int b )// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } -Q_EXPORT inline int qGray( TQRgb rgb ) // convert RGB to gray 0..255 -{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); } +Q_EXPORT inline int tqGray( TQRgb rgb ) // convert RGB to gray 0..255 +{ return tqGray( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) ); } class Q_EXPORT TQColor @@ -226,13 +226,13 @@ inline TQRgb TQColor::rgb() const { return d.argb; } inline int TQColor::red() const -{ return qRed(d.argb); } +{ return tqRed(d.argb); } inline int TQColor::green() const -{ return qGreen(d.argb); } +{ return tqGreen(d.argb); } inline int TQColor::blue() const -{ return qBlue(d.argb); } +{ return tqBlue(d.argb); } inline bool TQColor::isValid() const { diff --git a/doc/html/qgfx_qws-h.html b/doc/html/qgfx_qws-h.html index 857050969..ecaee5af2 100644 --- a/doc/html/qgfx_qws-h.html +++ b/doc/html/qgfx_qws-h.html @@ -113,9 +113,9 @@ inline ushort qt_convRgbTo16( const int r, const int g, const int b ) inline ushort qt_convRgbTo16( TQRgb c ) { - const int tr = qRed(c) << qt_red_shift; - const int tg = qGreen(c) << qt_green_shift; - const int tb = qBlue(c) >> qt_neg_blue_shift; + const int tr = tqRed(c) << qt_red_shift; + const int tg = tqGreen(c) << qt_green_shift; + const int tb = tqBlue(c) >> qt_neg_blue_shift; return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask); } @@ -129,7 +129,7 @@ inline TQRgb qt_conv16ToRgb( ushort c ) const int tg = g >> qt_green_shift; const int tb = b << qt_neg_blue_shift; - return qRgb(tr,tg,tb); + return tqRgb(tr,tg,tb); } inline void qt_conv16ToRgb( ushort c, int& r, int& g, int& b ) diff --git a/doc/html/qmag-example.html b/doc/html/qmag-example.html index 819d8a3ff..24cd8aa02 100644 --- a/doc/html/qmag-example.html +++ b/doc/html/qmag-example.html @@ -173,7 +173,7 @@ static const int timer[] = { quitButton = new TQPushButton( this ); TQ_CHECK_PTR(quitButton); - connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) ); quitButton->setText( "Quit" ); quitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2, 10+quitButton->fontMetrics().width("Quit"), 20 ); @@ -379,8 +379,8 @@ void MagWidget::grabAround(TQPoint pos) { TQRgb px = image.pixel(x,y); pixelinfo.sprintf(" %3d,%3d,%3d #%02x%02x%02x", - qRed(px), qGreen(px), qBlue(px), - qRed(px), qGreen(px), qBlue(px)); + qRed(px), tqGreen(px), tqBlue(px), + qRed(px), tqGreen(px), tqBlue(px)); } TQString label; label.sprintf( "x=%d, y=%d %s", diff --git a/doc/html/qmessagebox-h.html b/doc/html/qmessagebox-h.html index 5c6bb8333..c52826bd8 100644 --- a/doc/html/qmessagebox-h.html +++ b/doc/html/qmessagebox-h.html @@ -247,7 +247,7 @@ private: // Disabled copy constructor and operator= #define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\ (sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\ -(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ +(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !tqApp){ int c=0; new \ TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ diff --git a/doc/html/qwerty-example.html b/doc/html/qwerty-example.html index c1b4413da..6f356d8ce 100644 --- a/doc/html/qwerty-example.html +++ b/doc/html/qwerty-example.html @@ -153,7 +153,7 @@ enum { Uni = 0, MBug = 1, Lat1 = 2, Local = 3, Guess = 4, Codec = 5 }; #endif file->insertSeparator(); file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W ); - file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), ALT+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), ALT+Key_Q ); connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) ); connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) ); @@ -231,8 +231,8 @@ void Editor::rebuildCodecList() void Editor::newDoc() { Editor *ed = new Editor; - if ( qApp->desktop()->size().width() < 450 - || qApp->desktop()->size().height() < 450 ) { + if ( tqApp->desktop()->size().width() < 450 + || tqApp->desktop()->size().height() < 450 ) { ed->showMaximized(); } else { ed->resize( 400, 400 ); @@ -476,8 +476,8 @@ int main( int argc, char **argv ) TQApplication a( argc, argv ); - bool isSmall = qApp->desktop()->size().width() < 450 - || qApp->desktop()->size().height() < 450; + bool isSmall = tqApp->desktop()->size().width() < 450 + || tqApp->desktop()->size().height() < 450; int i; for ( i= argc <= 1 ? 0 : 1; i<argc; i++ ) { diff --git a/doc/html/qwindowdefs-h.html b/doc/html/qwindowdefs-h.html index ff2fc747d..75e2dea00 100644 --- a/doc/html/qwindowdefs-h.html +++ b/doc/html/qwindowdefs-h.html @@ -190,7 +190,7 @@ Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1 Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome ); -Q_EXPORT const char *qAppClass(); // get application class +Q_EXPORT const char *tqAppClass(); // get application class #endif // Q_WS_X11 diff --git a/doc/html/richtext-example.html b/doc/html/richtext-example.html index eea3cfc2b..19cc4d3eb 100644 --- a/doc/html/richtext-example.html +++ b/doc/html/richtext-example.html @@ -182,7 +182,7 @@ static const char* sayings[] = { bPrev->setEnabled( FALSE ); - connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); + connect( bClose, SIGNAL( clicked() ), tqApp, SLOT( quit() ) ); connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); diff --git a/doc/html/rot-example.html b/doc/html/rot-example.html index 64aacf9c3..955d8f0a0 100644 --- a/doc/html/rot-example.html +++ b/doc/html/rot-example.html @@ -105,7 +105,7 @@ private: TQPushButton * quit = new TQPushButton( "&Quit", this ); quit->setFocusPolicy( NoFocus ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQGridLayout * l = new TQGridLayout( this, 2, 2, 5 ); l->addWidget( left, 0, 0 ); diff --git a/doc/html/scribble-example.html b/doc/html/scribble-example.html index b354b6d93..5ee6f459f 100644 --- a/doc/html/scribble-example.html +++ b/doc/html/scribble-example.html @@ -165,7 +165,7 @@ const bool no_writing = FALSE; mousePressed( FALSE ), buffer( width(), height() ) { - if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1])) + if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1])) buffer.fill( colorGroup().base() ); setBackgroundMode( TQWidget::PaletteBase ); #ifndef QT_NO_CURSOR diff --git a/doc/html/scrollview-example.html b/doc/html/scrollview-example.html index 0c33a7ff1..209d2ace4 100644 --- a/doc/html/scrollview-example.html +++ b/doc/html/scrollview-example.html @@ -83,7 +83,7 @@ public: for (int y=0; y<2000-h; y+=h+10) { if (y == 0) { TQButton* q=new TQPushButton("Quit", this); - connect(q, SIGNAL(clicked()), qApp, SLOT(quit())); + connect(q, SIGNAL(clicked()), tqApp, SLOT(quit())); } else { TQString str; if ( b > 0 ) { @@ -247,7 +247,7 @@ public: TQPopupMenu* file = new TQPopupMenu( menubar ); TQ_CHECK_PTR( file ); menubar->insertItem( "&File", file ); - file->insertItem( "Quit", qApp, SLOT(quit()) ); + file->insertItem( "Quit", tqApp, SLOT(quit()) ); vp_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( vp_options ); @@ -473,7 +473,7 @@ int main( int argc, char **argv ) ve3.setCaption("TQt Example - Scrollviews"); ve3.show(); - TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); + TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); return a.exec(); } diff --git a/doc/html/showimg-example.html b/doc/html/showimg-example.html index 701b69304..fd1cda853 100644 --- a/doc/html/showimg-example.html +++ b/doc/html/showimg-example.html @@ -195,7 +195,7 @@ private slots: si = file->insertItem( "Save image", saveimage ); sp = file->insertItem( "Save pixmap", savepixmap ); file->insertSeparator(); - file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q ); edit = new TQPopupMenu( menubar ); menubar->insertItem( "&Edit", edit ); @@ -865,7 +865,7 @@ int main( int argc, char **argv ) } } - TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); + TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); return a.exec(); } diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html index 25ee03d54..3676b6c75 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -206,7 +206,7 @@ private: file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W ); - file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); menuBar()->insertSeparator(); diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index 95af018e3..429e7736b 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -292,7 +292,7 @@ example for a shorter and easier approach.) file->insertSeparator(); file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W ); - file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q );

... the Print command with "What's This?" help, another separator and two more commands (Close and Quit) without "What's This?" and pixmaps. diff --git a/doc/html/sound-example.html b/doc/html/sound-example.html index 2cb987060..21cebf2ef 100644 --- a/doc/html/sound-example.html +++ b/doc/html/sound-example.html @@ -128,7 +128,7 @@ private: file->insertItem("Play 3 and 4 together", this, SLOT(doPlay34())); file->insertItem("Play all together", this, SLOT(doPlay1234())); file->insertSeparator(); - file->insertItem("E&xit", qApp, SLOT(quit())); + file->insertItem("E&xit", tqApp, SLOT(quit())); menuBar()->insertItem("&File", file); } diff --git a/doc/html/t10-main-cpp.html b/doc/html/t10-main-cpp.html index 857f5e2b0..bd7de6d67 100644 --- a/doc/html/t10-main-cpp.html +++ b/doc/html/t10-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/t11-main-cpp.html b/doc/html/t11-main-cpp.html index 54f44f725..58d2d5508 100644 --- a/doc/html/t11-main-cpp.html +++ b/doc/html/t11-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/t12-main-cpp.html b/doc/html/t12-main-cpp.html index ab8667db6..cdfc499dc 100644 --- a/doc/html/t12-main-cpp.html +++ b/doc/html/t12-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/t13-gamebrd-cpp.html b/doc/html/t13-gamebrd-cpp.html index cde268bbe..abf0072a3 100644 --- a/doc/html/t13-gamebrd-cpp.html +++ b/doc/html/t13-gamebrd-cpp.html @@ -56,7 +56,7 @@ body { background: #ffffff; color: black; } TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/t14-gamebrd-cpp.html b/doc/html/t14-gamebrd-cpp.html index 4f677049f..8b3256dc6 100644 --- a/doc/html/t14-gamebrd-cpp.html +++ b/doc/html/t14-gamebrd-cpp.html @@ -58,7 +58,7 @@ body { background: #ffffff; color: black; } TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); @@ -112,7 +112,7 @@ body { background: #ffffff; color: black; } accel->connectItem( accel->insertItem( Key_Return ), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( CTRL+Key_Q ), - qApp, SLOT(quit()) ); + tqApp, SLOT(quit()) ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); grid->addWidget( quit, 0, 0 ); diff --git a/doc/html/t7-main-cpp.html b/doc/html/t7-main-cpp.html index 83ce9c1eb..0e1c46951 100644 --- a/doc/html/t7-main-cpp.html +++ b/doc/html/t7-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQGrid *grid = new TQGrid( 4, this ); diff --git a/doc/html/t8-main-cpp.html b/doc/html/t8-main-cpp.html index 7a22b88ca..2d89e6bdf 100644 --- a/doc/html/t8-main-cpp.html +++ b/doc/html/t8-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/t9-main-cpp.html b/doc/html/t9-main-cpp.html index 8cc241ff0..12004c195 100644 --- a/doc/html/t9-main-cpp.html +++ b/doc/html/t9-main-cpp.html @@ -61,7 +61,7 @@ public: TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/doc/html/tabdialog-example.html b/doc/html/tabdialog-example.html index a520a6d60..151dc0cc4 100644 --- a/doc/html/tabdialog-example.html +++ b/doc/html/tabdialog-example.html @@ -106,7 +106,7 @@ protected: setupTab2(); setupTab3(); - connect( this, SIGNAL( applyButtonPressed() ), qApp, SLOT( quit() ) ); + connect( this, SIGNAL( applyButtonPressed() ), tqApp, SLOT( quit() ) ); } void TabDialog::setupTab1() diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html index 820ea49ac..93ee95927 100644 --- a/doc/html/themes-example.html +++ b/doc/html/themes-example.html @@ -2253,7 +2253,7 @@ private: } ag->addTo(style); style->insertSeparator(); - style->insertItem("&Quit", qApp, SLOT( quit() ), CTRL | Key_Q ); + style->insertItem("&Quit", tqApp, SLOT( quit() ), CTRL | Key_Q ); TQPopupMenu * help = new TQPopupMenu( this ); menuBar()->insertSeparator(); @@ -2262,7 +2262,7 @@ private: help->insertItem( "About &TQt", this, SLOT(aboutTQt())); #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new NorwegianWoodStyle ); + tqApp->setStyle( new NorwegianWoodStyle ); #endif } @@ -2270,20 +2270,20 @@ void Themes::makeStyle(const TQStrin { if(style == "Norwegian Wood") { #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new NorwegianWoodStyle ); + tqApp->setStyle( new NorwegianWoodStyle ); #endif } else if( style == "Metal" ) { #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new MetalStyle ); + tqApp->setStyle( new MetalStyle ); #endif } else { - qApp->setStyle(style); + tqApp->setStyle(style); if(style == "Platinum") { TQPalette p( TQColor( 239, 239, 239 ) ); - qApp->setPalette( p, TRUE ); - qApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( appFont, TRUE ); } else if(style == "Windows") { - qApp->setFont( appFont, TRUE ); + tqApp->setFont( appFont, TRUE ); } else if(style == "CDE") { TQPalette p( TQColor( 75, 123, 130 ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); @@ -2304,12 +2304,12 @@ void Themes::makeStyle(const TQStrin p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - qApp->setPalette( p, TRUE ); - qApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); } else if(style == "Motif" || style == "MotifPlus") { TQPalette p( TQColor( 192, 192, 192 ) ); - qApp->setPalette( p, TRUE ); - qApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( appFont, TRUE ); } } } diff --git a/doc/html/threads.html b/doc/html/threads.html index 1a2fd8f20..16027c1cf 100644 --- a/doc/html/threads.html +++ b/doc/html/threads.html @@ -239,7 +239,7 @@ operations. Operations such as creating a TQPainter

     ...
-    qApp->lock();
+    tqApp->lock();
 
     TQPainter p;
     p.begin( mywidget );
@@ -247,7 +247,7 @@ are examples of simple GUI operations:
     p.drawLine( 0,0,100,100 );
     p.end();
 
-    qApp->unlock();
+    tqApp->unlock();
     ...
 
diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html index 85579a1ed..d8bc0949b 100644 --- a/doc/html/tictac-example.html +++ b/doc/html/tictac-example.html @@ -479,7 +479,7 @@ void TicTacGameBoard::computerMove() newGame = new TQPushButton( "Play!", this ); connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) ); quit = new TQPushButton( "Quit", this ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQHBoxLayout * b = new TQHBoxLayout; l->addLayout( b ); b->addWidget( newGame ); diff --git a/doc/html/tutorial1-04.html b/doc/html/tutorial1-04.html index c28d5ca57..6d0f424ac 100644 --- a/doc/html/tutorial1-04.html +++ b/doc/html/tutorial1-04.html @@ -63,7 +63,7 @@ public: quit->setGeometry( 62, 40, 75, 30 ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } @@ -132,7 +132,7 @@ when you choose to, the child will automatically tell TQt about its imminent death.)

The setGeometry() call does the same as move() and resize() did in the previous chapters. -

        connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
+

        connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
     }
 

Because the MyWidget class doesn't know about the application object, it @@ -141,7 +141,7 @@ has to connect to TQt's pointer to it, qApp. about its environment in order to be as general and reusable as possible.

Knowing the name of the application object would break this principle, -so TQt offers an alias, qApp, for the cases in which a component such as +so TQt offers an alias, tqApp, for the cases in which a component such as MyWidget needs to talk to the application object.

    int main( int argc, char **argv )
     {
diff --git a/doc/html/tutorial1-05.html b/doc/html/tutorial1-05.html
index 772569d0b..b7db3f3be 100644
--- a/doc/html/tutorial1-05.html
+++ b/doc/html/tutorial1-05.html
@@ -62,7 +62,7 @@ public:
     TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
     quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
 
-    connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
+    connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
 
     TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd" );
 
diff --git a/doc/html/tutorial1-06.html b/doc/html/tutorial1-06.html
index 3c9f4c9ce..fb8da088d 100644
--- a/doc/html/tutorial1-06.html
+++ b/doc/html/tutorial1-06.html
@@ -80,7 +80,7 @@ public:
     TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
     quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
 
-    connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
+    connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
 
     TQGrid *grid = new TQGrid( 4, this );
 
@@ -139,7 +139,7 @@ is renamed.
         TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
         quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
 
-        connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
+        connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
 

The push button that used to be in what is now LCDRange has been separated so that we can have one "Quit" button and many LCDRange diff --git a/doc/html/tutorial1-14.html b/doc/html/tutorial1-14.html index f3d7a909d..c5a94dbc5 100644 --- a/doc/html/tutorial1-14.html +++ b/doc/html/tutorial1-14.html @@ -226,7 +226,7 @@ key Ctrl+Q is pressed. Because Enter is sometimes Return and there are even keyboards with both keys, we make both Enter and Return invoke fire().

        accel->connectItem( accel->insertItem( CTRL+Key_Q ),
-                            qApp, SLOT(quit()) );
+                            tqApp, SLOT(quit()) );
 

And then we set up Ctrl+Q to do the same thing as Alt+Q. Some people are more used to Ctrl+Q (and anyway it shows how do do it). diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html index 8583795f3..35a797c40 100644 --- a/doc/html/tutorial2-05.html +++ b/doc/html/tutorial2-05.html @@ -499,7 +499,7 @@ item id. { if ( okToClear() ) { saveOptions(); - qApp->exit( 0 ); + tqApp->exit( 0 ); } }

diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html index 864f94f5a..d6f88907d 100644 --- a/doc/html/xform-example.html +++ b/doc/html/xform-example.html @@ -327,7 +327,7 @@ void XFormControl::changeMode(int m) else rb_pic->setChecked(TRUE); } - qApp->flushX(); + tqApp->flushX(); } ShowXForm::ShowXForm( const TQFont &initialFont, diff --git a/doc/i18n.doc b/doc/i18n.doc index 02bb19544..d10a4f309 100644 --- a/doc/i18n.doc +++ b/doc/i18n.doc @@ -208,7 +208,7 @@ directly: void same_global_function( LoginWidget *logwid ) { QLabel *label = new QLabel( - qApp->translate("LoginWidget", "Password:"), + tqApp->translate("LoginWidget", "Password:"), logwid ); } \endcode @@ -245,7 +245,7 @@ Example of QT_TRANSLATE_NOOP(): QString global_greeting( int greet_type ) { - return qApp->translate( "FriendlyConversation", + return tqApp->translate( "FriendlyConversation", greeting_strings[greet_type] ); } \endcode diff --git a/doc/man/man3/qapplication.3qt b/doc/man/man3/qapplication.3qt index 10d6bb921..7b67978e9 100644 --- a/doc/man/man3/qapplication.3qt +++ b/doc/man/man3/qapplication.3qt @@ -792,12 +792,12 @@ This function is particularly useful for applications with many top-level window .br QPopupMenu* file = new QPopupMenu( this ); .br - file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), CTRL+Key_Q ); .br .br // when the last window is closed, the application should quit .br - connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) ); + connect( tqApp, SIGNAL( lastWindowClosed() ), tqApp, SLOT( quit() ) ); .br .fi .PP @@ -1047,10 +1047,10 @@ For certain types of events (e.g. mouse and key events), the event will be propa .PP There are five different ways that events can be processed; reimplementing this virtual function is just one of them. All five approaches are listed below:
    .TP -Reimplementing this function. This is very powerful, providing complete control; but only one subclass can be qApp. +Reimplementing this function. This is very powerful, providing complete control; but only one subclass can be tqApp. .IP .TP -Installing an event filter on qApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even see mouse events for disabled widgets, and if global mouse tracking is enabled, as well as mouse move events for all widgets. +Installing an event filter on tqApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even see mouse events for disabled widgets, and if global mouse tracking is enabled, as well as mouse move events for all widgets. .IP .TP Reimplementing QObject::event() (as QWidget does). If you do this you get Tab key presses, and you get to see the events before any widget-specific event filters. @@ -1131,7 +1131,7 @@ Example: .br QPushButton *quitButton = new QPushButton( "Quit" ); .br - connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) ); .br .fi .PP diff --git a/doc/man/man3/qcolor.3qt b/doc/man/man3/qcolor.3qt index 76793dd46..17024287b 100644 --- a/doc/man/man3/qcolor.3qt +++ b/doc/man/man3/qcolor.3qt @@ -167,7 +167,7 @@ QColor \- Colors based on RGB or HSV values .BI "int \fBqGray\fR ( int r, int g, int b )" .br .ti -1c -.BI "int \fBqGray\fR ( qRgb rgb )" +.BI "int \fBqGray\fR ( tqRgb rgb )" .br .in -1c .SH DESCRIPTION @@ -482,7 +482,7 @@ The return type \fIQRgb\fR is equivalent to \fCunsigned\fR \fCint\fR. .PP For an invalid color, the alpha value of the returned color is unspecified. .PP -See also setRgb(), hsv(), qRed(), qBlue(), qGreen(), and isValid(). +See also setRgb(), hsv(), tqRed(), tqBlue(), tqGreen(), and isValid(). .SH "void QColor::rgb ( int * r, int * g, int * b ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. Use getRgb() instead .SH "void QColor::setHsv ( int h, int s, int v )" @@ -531,40 +531,40 @@ See also Format of the QDataStream operators. Reads a color object, \fIc\fR, from the stream, \fIs\fR. .PP See also Format of the QDataStream operators. -.SH "int qAlpha ( QRgb rgba )" +.SH "int tqAlpha ( QRgb rgba )" Returns the alpha component of the RGBA quadruplet \fIrgba\fR. -.SH "int qBlue ( QRgb rgb )" +.SH "int tqBlue ( QRgb rgb )" Returns the blue component of the RGB triplet \fIrgb\fR. .PP -See also qRgb() and QColor::blue(). -.SH "int qGray ( int r, int g, int b )" +See also tqRgb() and QColor::blue(). +.SH "int tqGray ( int r, int g, int b )" Returns a gray value 0..255 from the (\fIr\fR, \fIg\fR, \fIb\fR) triplet. .PP The gray value is calculated using the formula (r*11 + g*16 + b*5)/32. -.SH "int qGray ( qRgb rgb )" +.SH "int tqGray ( tqRgb rgb )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a gray value 0..255 from the given \fIrgb\fR colour. -.SH "int qGreen ( QRgb rgb )" +.SH "int tqGreen ( QRgb rgb )" Returns the green component of the RGB triplet \fIrgb\fR. .PP -See also qRgb() and QColor::green(). -.SH "int qRed ( QRgb rgb )" +See also tqRgb() and QColor::green(). +.SH "int tqRed ( QRgb rgb )" Returns the red component of the RGB triplet \fIrgb\fR. .PP -See also qRgb() and QColor::red(). -.SH "QRgb qRgb ( int r, int g, int b )" +See also tqRgb() and QColor::red(). +.SH "QRgb tqRgb ( int r, int g, int b )" Returns the RGB triplet \fI(r,g,b)\fR. .PP The return type QRgb is equivalent to \fCunsigned\fR \fCint\fR. .PP -See also qRgba(), qRed(), qGreen(), and qBlue(). -.SH "QRgb qRgba ( int r, int g, int b, int a )" +See also tqRgba(), tqRed(), tqGreen(), and tqBlue(). +.SH "QRgb tqRgba ( int r, int g, int b, int a )" Returns the RGBA quadruplet \fI(r,g,b,a)\fR. .PP The return type QRgba is equivalent to \fCunsigned\fR \fCint\fR. .PP -See also qRgb(), qRed(), qGreen(), and qBlue(). +See also tqRgb(), tqRed(), tqGreen(), and tqBlue(). .SH "SEE ALSO" .BR http://doc.trolltech.com/ntqcolor.html diff --git a/doc/man/man3/qfile.3qt b/doc/man/man3/qfile.3qt index 841ef89f8..b06be825b 100644 --- a/doc/man/man3/qfile.3qt +++ b/doc/man/man3/qfile.3qt @@ -258,7 +258,7 @@ The returned strings are not translated with the QObject::tr() or QApplication:: .br tr("Open failed"), .br - tr("Could not open file for reading: %1").arg( qApp->translate("QFile",f.errorString()) ) + tr("Could not open file for reading: %1").arg( tqApp->translate("QFile",f.errorString()) ) .br ); .br diff --git a/doc/man/man3/qglcolormap.3qt b/doc/man/man3/qglcolormap.3qt index 726f2c8e9..a7e0484fb 100644 --- a/doc/man/man3/qglcolormap.3qt +++ b/doc/man/man3/qglcolormap.3qt @@ -94,7 +94,7 @@ Example of use: .br for ( int i = 0; i < colormap.size(); i++ ) .br - colormap.setEntry( i, qRgb( i, i, i ) ); + colormap.setEntry( i, tqRgb( i, i, i ) ); .br .br widget.setColormap( colormap ); diff --git a/doc/man/man3/qimage.3qt b/doc/man/man3/qimage.3qt index fe1300d53..ad47abd2c 100644 --- a/doc/man/man3/qimage.3qt +++ b/doc/man/man3/qimage.3qt @@ -311,7 +311,7 @@ An image has the parameters width, height and depth (bits per pixel, bpp), a col .PP 32-bpp images encode an RGB value in 24 bits and ignore the color table. The most significant byte is used for the alpha buffer. .PP -An entry in the color table is an RGB triplet encoded as a \fCuint\fR. Use the qRed(), qGreen() and qBlue() functions (ntqcolor.h) to access the components, and qRgb to make an RGB triplet (see the QColor class documentation). +An entry in the color table is an RGB triplet encoded as a \fCuint\fR. Use the tqRed(), tqGreen() and tqBlue() functions (ntqcolor.h) to access the components, and tqRgb to make an RGB triplet (see the QColor class documentation). .PP 1-bpp (monochrome) images have a color table with a most two colors. There are two different formats: big endian (MSB first) or little endian (LSB first) bit order. To access a single bit you will must do some bit shifts: .PP @@ -341,7 +341,7 @@ If this looks complicated, it might be a good idea to convert the 1-bpp image to .br // set entry 19 in the color table to yellow .br - image.setColor( 19, qRgb(255,255,0) ); + image.setColor( 19, tqRgb(255,255,0) ); .br // set 8 bit pixel at (x,y) to value yellow (in color table) .br @@ -359,7 +359,7 @@ If this looks complicated, it might be a good idea to convert the 1-bpp image to .br uint *p = (uint *)image.scanLine(y) + x; .br - *p = qRgb(255,255,0); + *p = tqRgb(255,255,0); .br .fi .PP @@ -503,7 +503,7 @@ See also numBytes() and scanLine(). .SH "QRgb QImage::color ( int i ) const" Returns the color in the color table at index \fIi\fR. The first color is at index 0. .PP -A color value is an RGB triplet. Use the qRed(), qGreen() and qBlue() functions (defined in ntqcolor.h) to get the color value components. +A color value is an RGB triplet. Use the tqRed(), tqGreen() and tqBlue() functions (defined in ntqcolor.h) to get the color value components. .PP See also setColor(), numColors(), and QColor. .PP @@ -798,7 +798,7 @@ Returns the color of the pixel at the coordinates (\fIx\fR, \fIy\fR). .PP If (\fIx\fR, \fIy\fR) is not on the image, the results are undefined. .PP -See also setPixel(), qRed(), qGreen(), qBlue(), and valid(). +See also setPixel(), tqRed(), tqGreen(), tqBlue(), and valid(). .PP Examples: .)l canvas/canvas.cpp and qmag/qmag.cpp. @@ -875,7 +875,7 @@ Returns a pointer to the pixel data at the scanline with index \fIi\fR. The firs .PP The scanline data is aligned on a 32-bit boundary. .PP -\fBWarning:\fR If you are accessing 32-bpp image data, cast the returned pointer to \fCQRgb*\fR (QRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the \fCuchar*\fR pointer directly, because the pixel format depends on the byte order on the underlying platform. Hint: use qRed(), qGreen() and qBlue(), etc. (ntqcolor.h) to access the pixels. +\fBWarning:\fR If you are accessing 32-bpp image data, cast the returned pointer to \fCQRgb*\fR (QRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the \fCuchar*\fR pointer directly, because the pixel format depends on the byte order on the underlying platform. Hint: use tqRed(), tqGreen() and tqBlue(), etc. (ntqcolor.h) to access the pixels. .PP \fBWarning:\fR If you are accessing 16-bpp image data, you must handle endianness yourself. (Qt/Embedded only) .PP @@ -897,7 +897,7 @@ See also hasAlphaBuffer() and createAlphaMask(). .SH "void QImage::setColor ( int i, QRgb c )" Sets a color in the color table at index \fIi\fR to \fIc\fR. .PP -A color value is an RGB triplet. Use the qRgb() function (defined in ntqcolor.h) to make RGB triplets. +A color value is an RGB triplet. Use the tqRgb() function (defined in ntqcolor.h) to make RGB triplets. .PP See also color(), setNumColors(), and numColors(). .PP @@ -922,7 +922,7 @@ If (\fIx\fR, \fIy\fR) is not valid, the result is undefined. .PP If the image is a paletted image (depth() <= 8) and \fIindex_or_rgb\fR >= numColors(), the result is undefined. .PP -See also pixelIndex(), pixel(), qRgb(), qRgba(), and valid(). +See also pixelIndex(), pixel(), tqRgb(), tqRgba(), and valid(). .SH "void QImage::setText ( const char * key, const char * lang, const QString & s )" Records string \fIs\fR for the keyword \fIkey\fR. The \fIkey\fR should be a portable keyword recognizable by other software - some suggested values can be found in the PNG specification. \fIs\fR can be any text. \fIlang\fR should specify the language code (see RFC 1766) or 0. .SH "QSize QImage::size () const" diff --git a/doc/man/man3/qprogressdialog.3qt b/doc/man/man3/qprogressdialog.3qt index 89cc713ab..2e1dd7cfd 100644 --- a/doc/man/man3/qprogressdialog.3qt +++ b/doc/man/man3/qprogressdialog.3qt @@ -161,7 +161,7 @@ for ( int i = 0; i < numFiles; i++ ) { .br progress.setProgress( i ); .br - qApp->processEvents(); + tqApp->processEvents(); .br .br if ( progress.wasCanceled() ) diff --git a/doc/man/man3/qsplashscreen.3qt b/doc/man/man3/qsplashscreen.3qt index c8670868b..ef0e76029 100644 --- a/doc/man/man3/qsplashscreen.3qt +++ b/doc/man/man3/qsplashscreen.3qt @@ -114,13 +114,13 @@ The user can hide the splash screen by clicking on it with the mouse. Since the .br splash->message( "Loaded modules" ); .br - qApp->processEvents(); + tqApp->processEvents(); .br ... // Establishing connections .br splash->message( "Established connections" ); .br - qApp->processEvents(); + tqApp->processEvents(); .br .fi .PP diff --git a/doc/porting2.doc b/doc/porting2.doc index 26ff61b59..5b70b5fda 100644 --- a/doc/porting2.doc +++ b/doc/porting2.doc @@ -576,10 +576,10 @@ be in the more efficient order (for typical contemporary hardware). If your code made assumptions about the order, you will get blue where you expect red and vice versa (you'll not notice the problem if you use shades of gray, green, or magenta). You should port your code to use the -creator function qRgb(int r,int g,int b) and the -access functions qRed(QRgb), qBlue(QRgb), and qGreen(QRgb). +creator function tqRgb(int r,int g,int b) and the +access functions tqRed(QRgb), tqBlue(QRgb), and tqGreen(QRgb). If you are using the alpha channel, it hasn't moved, but you should use -the functions qRgba(int,int,int,int) and qAlpha(QRgb). Note also that +the functions tqRgba(int,int,int,int) and tqAlpha(QRgb). Note also that QColor::pixel() does not return a QRgb (it never did on all platforms, but your code may have assumed so on your platform) - this may also produce strange color results - use QColor::rgb() if you want a QRgb. diff --git a/doc/threads.doc b/doc/threads.doc index 21f986952..f05fe8d07 100644 --- a/doc/threads.doc +++ b/doc/threads.doc @@ -255,7 +255,7 @@ are examples of simple GUI operations: \code ... - qApp->lock(); + tqApp->lock(); QPainter p; p.begin( mywidget ); @@ -263,7 +263,7 @@ are examples of simple GUI operations: p.drawLine( 0,0,100,100 ); p.end(); - qApp->unlock(); + tqApp->unlock(); ... \endcode diff --git a/doc/tutorial.doc b/doc/tutorial.doc index c015928c9..5ed29990f 100644 --- a/doc/tutorial.doc +++ b/doc/tutorial.doc @@ -445,18 +445,18 @@ imminent death.) The setGeometry() call does the same as move() and resize() did in the previous chapters. -\printline qApp +\printline tqApp \printline } Because the MyWidget class doesn't know about the application object, it -has to connect to Qt's pointer to it, \c qApp. +has to connect to Qt's pointer to it, \c tqApp. A widget is a software component and should know as little as possible about its environment in order to be as general and reusable as possible. Knowing the name of the application object would break this principle, -so Qt offers an alias, qApp, for the cases in which a component such as +so Qt offers an alias, tqApp, for the cases in which a component such as MyWidget needs to talk to the application object. \printuntil } diff --git a/examples/action/application.cpp b/examples/action/application.cpp index 2151c8f6b..2571379d3 100644 --- a/examples/action/application.cpp +++ b/examples/action/application.cpp @@ -94,7 +94,7 @@ ApplicationWindow::ApplicationWindow() fileQuitAction = new TQAction( "Quit", "&Quit", CTRL+Key_Q, this, "quit" ); - connect( fileQuitAction, SIGNAL( activated() ) , qApp, + connect( fileQuitAction, SIGNAL( activated() ) , tqApp, SLOT( closeAllWindows() ) ); // populate a tool bar with some actions diff --git a/examples/addressbook/mainwindow.cpp b/examples/addressbook/mainwindow.cpp index 1e179b2a8..11b93a8e0 100644 --- a/examples/addressbook/mainwindow.cpp +++ b/examples/addressbook/mainwindow.cpp @@ -47,7 +47,7 @@ void ABMainWindow::setupMenuBar() file->insertItem( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P ); file->insertSeparator(); file->insertItem( "Close", this, SLOT( closeWindow() ), CTRL + Key_W ); - file->insertItem( "Quit", qApp, SLOT( quit() ), CTRL + Key_Q ); + file->insertItem( "Quit", tqApp, SLOT( quit() ), CTRL + Key_Q ); } void ABMainWindow::setupFileTools() diff --git a/examples/application/application.cpp b/examples/application/application.cpp index 9c87aafb4..ee7b945f7 100644 --- a/examples/application/application.cpp +++ b/examples/application/application.cpp @@ -112,7 +112,7 @@ ApplicationWindow::ApplicationWindow() file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W ); - file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); menuBar()->insertSeparator(); diff --git a/examples/canvas/blendshadow.cpp b/examples/canvas/blendshadow.cpp index e4a498b2c..d2f761db0 100644 --- a/examples/canvas/blendshadow.cpp +++ b/examples/canvas/blendshadow.cpp @@ -9,18 +9,18 @@ static inline int blendComponent( int v, int av, int s, int as ) static inline TQRgb blendShade( TQRgb v, TQRgb s ) { //shadow image is already reduced and blurred - int as = qAlpha(s); - int av = qAlpha(v); + int as = tqAlpha(s); + int av = tqAlpha(v); if ( as == 0 || av == 255 ) return v; int a = as + av -(as*av)/255; - int r = blendComponent( qRed(v),av, qRed(s), as)/a; - int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; - int b = blendComponent( qBlue(v),av, qBlue(s), as)/a; + int r = blendComponent( tqRed(v),av, tqRed(s), as)/a; + int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a; + int b = blendComponent( tqBlue(v),av, tqBlue(s), as)/a; - return qRgba(r,g,b,a); + return tqRgba(r,g,b,a); } diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp index 47bc9b6af..86405b51f 100644 --- a/examples/canvas/canvas.cpp +++ b/examples/canvas/canvas.cpp @@ -79,7 +79,7 @@ bool ImageItem::hit( const TQPoint &p ) const if ( !image.valid( ix , iy ) ) return FALSE; TQRgb pixel = image.pixel( ix, iy ); - return qAlpha( pixel ) != 0; + return tqAlpha( pixel ) != 0; } class NodeItem: public TQCanvasEllipse @@ -319,7 +319,7 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) : file->insertSeparator(); file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P); file->insertSeparator(); - file->insertItem("E&xit", qApp, SLOT(quit()), CTRL+Key_Q); + file->insertItem("E&xit", tqApp, SLOT(quit()), CTRL+Key_Q); menu->insertItem("&File", file); TQPopupMenu* edit = new TQPopupMenu( menu ); @@ -409,9 +409,9 @@ void Main::newView() { // Open a new view... have it delete when closed. Main *m = new Main(canvas, 0, 0, WDestructiveClose); - qApp->setMainWidget(m); + tqApp->setMainWidget(m); m->show(); - qApp->setMainWidget(0); + tqApp->setMainWidget(0); } void Main::clear() diff --git a/examples/canvas/main.cpp b/examples/canvas/main.cpp index 4a4c4eff6..92c720d7b 100644 --- a/examples/canvas/main.cpp +++ b/examples/canvas/main.cpp @@ -36,7 +36,7 @@ int main(int argc, char** argv) else m.showMaximized(); - TQObject::connect( qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()) ); + TQObject::connect( tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()) ); return app.exec(); } diff --git a/examples/canvas/makeimg.cpp b/examples/canvas/makeimg.cpp index bc1da57dd..acb90dbde 100644 --- a/examples/canvas/makeimg.cpp +++ b/examples/canvas/makeimg.cpp @@ -13,19 +13,19 @@ static inline int blendComponent( int v, int av, int s, int as ) static inline TQRgb blendShade( TQRgb v, TQRgb s ) { //pick a number: shadow is 1/3 of object - int as = qAlpha(s)/3; - int av = qAlpha(v); + int as = tqAlpha(s)/3; + int av = tqAlpha(v); if ( as == 0 || av == 255 ) return v; int a = as + av -(as*av)/255; - int r = blendComponent( qRed(v),av, qRed(s), as)/a; - int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; - int b = blendComponent( qBlue(v),av, qBlue(s), as)/a; + int r = blendComponent( tqRed(v),av, tqRed(s), as)/a; + int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a; + int b = blendComponent( tqBlue(v),av, tqBlue(s), as)/a; - return qRgba(r,g,b,a); + return tqRgba(r,g,b,a); } int main( int*, char**) @@ -44,9 +44,9 @@ int main( int*, char**) uint *line = (uint*)img->scanLine( y ); for ( int x = 0; x < w; x++ ) { uint pixel = line[x]; - int r = qRed(pixel); - int g = qGreen(pixel); - int b = qBlue(pixel); + int r = tqRed(pixel); + int g = tqGreen(pixel); + int b = tqBlue(pixel); int min = TQMIN( r, TQMIN( g, b ) ); int max = TQMAX( r, TQMAX( g, b ) ); r -= min; @@ -59,7 +59,7 @@ int main( int*, char**) } int a = 255-min; a -= (max-min)/3; //hack more transparency for colors. - line[x] = qRgba( r, g, b, a ); + line[x] = tqRgba( r, g, b, a ); } } #endif @@ -77,13 +77,13 @@ int main( int*, char**) for ( int x = 0; x < w; x++ ) { TQRgb shader = img->pixel( x, y ); - int as = qAlpha(shader)/3; + int as = tqAlpha(shader)/3; - int r = (qRed(shader)*(255-as))/255; - int g = (qGreen(shader)*(255-as))/255; - int b = (qBlue(shader)*(255-as))/255; + int r = (tqRed(shader)*(255-as))/255; + int g = (tqGreen(shader)*(255-as))/255; + int b = (tqBlue(shader)*(255-as))/255; - img2->setPixel( x, y, qRgba(r,g,b,as) ); + img2->setPixel( x, y, tqRgba(r,g,b,as) ); } } diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp index b804a1f59..c9106dc3b 100644 --- a/examples/chart/chartform.cpp +++ b/examples/chart/chartform.cpp @@ -368,7 +368,7 @@ void ChartForm::fileQuit() { if ( okToClear() ) { saveOptions(); - qApp->exit( 0 ); + tqApp->exit( 0 ); } } diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp index 2c7152b5d..0cd5006a3 100644 --- a/examples/demo/frame.cpp +++ b/examples/demo/frame.cpp @@ -132,10 +132,10 @@ void Frame::setStyle( const TQString& style ) void Frame::updateTranslators() { if ( !qt_translator ) { - qt_translator = new TQTranslator( qApp ); - translator = new TQTranslator( qApp ); - qApp->installTranslator( qt_translator ); - qApp->installTranslator( translator ); + qt_translator = new TQTranslator( tqApp ); + translator = new TQTranslator( tqApp ); + tqApp->installTranslator( qt_translator ); + tqApp->installTranslator( translator ); } TQString base = TQDir("../../translations").absPath(); diff --git a/examples/demo/i18n/i18n.cpp b/examples/demo/i18n/i18n.cpp index 1fba89252..925fdf139 100644 --- a/examples/demo/i18n/i18n.cpp +++ b/examples/demo/i18n/i18n.cpp @@ -114,14 +114,14 @@ void I18nDemo::newSlot(int id) } if (lastwrapper) { - qApp->removeTranslator(&lastwrapper->translator); + tqApp->removeTranslator(&lastwrapper->translator); lastwrapper = 0; } Wrapper *wrapper = new Wrapper(workspace, windowIdNumber); wrapper->translator.load(qmfile, "."); - qApp->installTranslator(&wrapper->translator); + tqApp->installTranslator(&wrapper->translator); connect(wrapper, SIGNAL(destroyed()), SLOT(wrapperDead())); wrapper->setCaption(tr("--language--")); @@ -139,7 +139,7 @@ void I18nDemo::newSlot(int id) "

    See http://www.trolltech.com/qt/ for more " "information.

    ").arg(TQT_VERSION_STR)); - qApp->removeTranslator(&wrapper->translator); + tqApp->removeTranslator(&wrapper->translator); te->show(); wrapper->show(); @@ -173,7 +173,7 @@ void I18nDemo::windowSlot(int id) void I18nDemo::windowActivated(TQWidget *w) { if (lastwrapper) { - qApp->removeTranslator(&lastwrapper->translator); + tqApp->removeTranslator(&lastwrapper->translator); windowMenu->setItemChecked(lastwrapper->id, FALSE); } @@ -221,7 +221,7 @@ void I18nDemo::wrapperDead() Wrapper *w = (Wrapper *) sender(); if (w == lastwrapper) { - qApp->removeTranslator(&w->translator); + tqApp->removeTranslator(&w->translator); lastwrapper = 0; } @@ -240,7 +240,7 @@ void I18nDemo::showEvent(TQShowEvent *) if (! lastwrapper) return; - qApp->installTranslator(&lastwrapper->translator); + tqApp->installTranslator(&lastwrapper->translator); } @@ -249,5 +249,5 @@ void I18nDemo::hideEvent(TQHideEvent *) if (! lastwrapper) return; - qApp->removeTranslator(&lastwrapper->translator); + tqApp->removeTranslator(&lastwrapper->translator); } diff --git a/examples/demo/main.cpp b/examples/demo/main.cpp index 295847ac5..d2d86ec3e 100644 --- a/examples/demo/main.cpp +++ b/examples/demo/main.cpp @@ -59,7 +59,7 @@ static void qdemo_set_caption( CategoryInterface *c, int i ) { - TQWidget *w = qApp->mainWidget(); + TQWidget *w = tqApp->mainWidget(); if ( !w ) return; TQString title = Frame::tr( "TQt Demo Collection" ); diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index c17aa5084..d76f16a0e 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -316,7 +316,7 @@ void TextEdit::fileClose() void TextEdit::fileExit() { - qApp->quit(); + tqApp->quit(); } void TextEdit::editUndo() diff --git a/examples/desktop/desktop.cpp b/examples/desktop/desktop.cpp index 4831efe59..330c6ad35 100644 --- a/examples/desktop/desktop.cpp +++ b/examples/desktop/desktop.cpp @@ -121,7 +121,7 @@ void rotate() const int h = 64; TQImage image( w, h, 8, 128 ); // create image for ( i=0; i<128; i++ ) // build color table - image.setColor( i, qRgb(i,0,0) ); + image.setColor( i, tqRgb(i,0,0) ); for ( int y=0; yupdate(); - qApp->exec(); + tqApp->exec(); delete t; } @@ -269,7 +269,7 @@ void desktopText( const char *s = "Trolltech" ) { const int border = 20; - TQColor c1 = qApp->palette().inactive().background(); + TQColor c1 = tqApp->palette().inactive().background(); TQColor c2 = c1.light(104); TQColor c3 = c1.dark(106); @@ -280,8 +280,8 @@ void desktopText( const char *s = "Trolltech" ) TQRect r = p.fontMetrics().boundingRect( s ); p.end(); - int appWidth = qApp->desktop()->width(); - int appHeight = qApp->desktop()->height(); + int appWidth = tqApp->desktop()->width(); + int appHeight = tqApp->desktop()->height(); if ( r.width() > appWidth - border*2 ) r.setWidth( appWidth - border*2 ); if ( r.height() > appHeight - border*2 ) @@ -293,7 +293,7 @@ void desktopText( const char *s = "Trolltech" ) drawShadeText( &p, -r.x() + border, -r.y() + border, s, c2, c3 ); p.end(); - qApp->desktop()->setBackgroundPixmap( pm ); + tqApp->desktop()->setBackgroundPixmap( pm ); } // diff --git a/examples/dragdrop/main.cpp b/examples/dragdrop/main.cpp index fc5a3e825..2af77d594 100644 --- a/examples/dragdrop/main.cpp +++ b/examples/dragdrop/main.cpp @@ -68,6 +68,6 @@ int main( int argc, char ** argv ) mw3.setCaption( "TQt Example - Drag and Drop" ); mw3.show(); - TQObject::connect(qApp,SIGNAL(lastWindowClosed()),qApp,SLOT(quit())); + TQObject::connect(tqApp,SIGNAL(lastWindowClosed()),tqApp,SLOT(quit())); return a.exec(); } diff --git a/examples/fileiconview/qfileiconview.cpp b/examples/fileiconview/qfileiconview.cpp index 89cddb440..98442281f 100644 --- a/examples/fileiconview/qfileiconview.cpp +++ b/examples/fileiconview/qfileiconview.cpp @@ -554,7 +554,7 @@ void TQtFileIconView::newDirectory() item->setSelected( TRUE, TRUE ); setCurrentItem( item ); repaintItem( item ); - qApp->processEvents(); + tqApp->processEvents(); item->rename(); } setAutoArrange( TRUE ); diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp index 053a54ff0..724e1ed4a 100644 --- a/examples/helpviewer/helpwindow.cpp +++ b/examples/helpviewer/helpwindow.cpp @@ -66,7 +66,7 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, file->insertItem( tr("&Print"), this, SLOT( print() ), CTRL+Key_P ); file->insertSeparator(); file->insertItem( tr("&Close"), this, SLOT( close() ), CTRL+Key_Q ); - file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), CTRL+Key_X ); + file->insertItem( tr("E&xit"), tqApp, SLOT( closeAllWindows() ), CTRL+Key_X ); // The same three icons are used twice each. TQIconSet icon_back( TQPixmap("back.xpm") ); diff --git a/examples/i18n/main.cpp b/examples/i18n/main.cpp index fdff78d09..e43634c46 100644 --- a/examples/i18n/main.cpp +++ b/examples/i18n/main.cpp @@ -71,7 +71,7 @@ MyWidget* showLang(TQString lang) static TQTranslator *translator = 0; - qApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); + tqApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); lang = "mywidget_" + lang + ".qm"; TQFileInfo fi( lang ); @@ -83,12 +83,12 @@ MyWidget* showLang(TQString lang) return 0; } if ( translator ) { - qApp->removeTranslator( translator ); + tqApp->removeTranslator( translator ); delete translator; } translator = new TQTranslator( 0 ); translator->load( lang, "." ); - qApp->installTranslator( translator ); + tqApp->installTranslator( translator ); MyWidget *m = new MyWidget; m->setCaption("TQt Example - i18n - " + m->caption() ); return m; @@ -126,7 +126,7 @@ int main( int argc, char** argv ) r = dlg.exec(); } if ( r ) { - TQRect screen = qApp->desktop()->availableGeometry(); + TQRect screen = tqApp->desktop()->availableGeometry(); bool tight = screen.width() < 1024; int x=screen.left()+5; int y=screen.top()+25; @@ -135,7 +135,7 @@ int main( int argc, char** argv ) MyWidget* w = showLang((const char*)qm[i]); if( w == 0 ) exit( 0 ); - TQObject::connect(w, SIGNAL(closed()), qApp, SLOT(quit())); + TQObject::connect(w, SIGNAL(closed()), tqApp, SLOT(quit())); w->setGeometry(x,y,197,356); w->show(); if ( tight ) { diff --git a/examples/i18n/mywidget.cpp b/examples/i18n/mywidget.cpp index 4135054f0..77cce33fd 100644 --- a/examples/i18n/mywidget.cpp +++ b/examples/i18n/mywidget.cpp @@ -32,7 +32,7 @@ MyWidget::MyWidget( TQWidget* parent, const char* name ) setCentralWidget(central); TQPopupMenu* file = new TQPopupMenu(this); - file->insertItem( tr("E&xit"), qApp, SLOT(quit()), + file->insertItem( tr("E&xit"), tqApp, SLOT(quit()), TQAccel::stringToKey(tr("Ctrl+Q")) ); menuBar()->insertItem( tr("&File"), file ); diff --git a/examples/layout/layout.cpp b/examples/layout/layout.cpp index 87bfde22d..e40f96bec 100644 --- a/examples/layout/layout.cpp +++ b/examples/layout/layout.cpp @@ -36,7 +36,7 @@ ExampleWidget::ExampleWidget( TQWidget *parent, const char *name ) menubar->setSeparator( TQMenuBar::InWindowsStyle ); TQPopupMenu* popup; popup = new TQPopupMenu( this ); - popup->insertItem( "&Quit", qApp, SLOT(quit()) ); + popup->insertItem( "&Quit", tqApp, SLOT(quit()) ); menubar->insertItem( "&File", popup ); // ...and tell the layout about it. diff --git a/examples/life/lifedlg.cpp b/examples/life/lifedlg.cpp index c1c3cce08..c1be353b7 100644 --- a/examples/life/lifedlg.cpp +++ b/examples/life/lifedlg.cpp @@ -55,7 +55,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name ) life->move( SIDEBORDER, TOPBORDER ); - connect( qb, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( qb, SIGNAL(clicked()), tqApp, SLOT(quit()) ); qb->setGeometry( SIDEBORDER, SIDEBORDER, qb->sizeHint().width(), 25 ); timer = new LifeTimer( this ); @@ -130,8 +130,8 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name ) s = life->sizeIncrement(); setSizeIncrement( s.width(), s.height() ); - resize( TQMIN(512, qApp->desktop()->width()), - TQMIN(480, qApp->desktop()->height()) ); + resize( TQMIN(512, tqApp->desktop()->width()), + TQMIN(480, tqApp->desktop()->height()) ); } diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp index 028bab26f..1b8604f58 100644 --- a/examples/mdi/application.cpp +++ b/examples/mdi/application.cpp @@ -107,7 +107,7 @@ ApplicationWindow::ApplicationWindow() #endif file->insertSeparator(); file->insertItem( "&Close", this, SLOT(closeWindow()), CTRL+Key_W ); - file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); windowsMenu = new TQPopupMenu( this ); windowsMenu->setCheckable( TRUE ); diff --git a/examples/menu/menu.cpp b/examples/menu/menu.cpp index 124601720..14e1b583b 100644 --- a/examples/menu/menu.cpp +++ b/examples/menu/menu.cpp @@ -137,7 +137,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name ) file->insertSeparator(); file->insertItem( "&Print", print, CTRL+Key_P ); file->insertSeparator(); - file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q ); TQPopupMenu *edit = new TQPopupMenu( this ); TQ_CHECK_PTR( edit ); diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp index 93fbeb438..da2b0b9ed 100644 --- a/examples/movies/main.cpp +++ b/examples/movies/main.cpp @@ -251,7 +251,7 @@ void MovieStarter::startMovie(const TQString& filename) void MovieStarter::done( int r ) { if (r != Accepted) - qApp->quit(); // end on Cancel + tqApp->quit(); // end on Cancel setResult( r ); // And don't hide. @@ -276,7 +276,7 @@ int main(int argc, char **argv) (void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0, TQt::WDestructiveClose); } - TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); + TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); } else { // "GUI" mode - open a chooser for movies // diff --git a/examples/network/clientserver/client/client.cpp b/examples/network/clientserver/client/client.cpp index 26daf93b0..7d9ba68e6 100644 --- a/examples/network/clientserver/client/client.cpp +++ b/examples/network/clientserver/client/client.cpp @@ -34,7 +34,7 @@ public: connect( send, SIGNAL(clicked()), SLOT(sendToServer()) ); connect( close, SIGNAL(clicked()), SLOT(closeConnection()) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); // create the socket and connect various of its signals socket = new TQSocket( this ); diff --git a/examples/network/clientserver/server/server.cpp b/examples/network/clientserver/server/server.cpp index c7644b107..fa6f83acb 100644 --- a/examples/network/clientserver/server/server.cpp +++ b/examples/network/clientserver/server/server.cpp @@ -122,7 +122,7 @@ public: connect( server, SIGNAL(newConnect(ClientSocket*)), SLOT(newConnect(ClientSocket*)) ); - connect( quit, SIGNAL(clicked()), qApp, + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } diff --git a/examples/network/httpd/httpd.cpp b/examples/network/httpd/httpd.cpp index 3c8b94b38..827d5cdb4 100644 --- a/examples/network/httpd/httpd.cpp +++ b/examples/network/httpd/httpd.cpp @@ -103,7 +103,7 @@ public: connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) ); connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) ); connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) ); - connect( quit, SIGNAL(pressed()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(pressed()), tqApp, SLOT(quit()) ); } ~HttpInfo() diff --git a/examples/network/infoprotocol/infoclient/client.cpp b/examples/network/infoprotocol/infoclient/client.cpp index 58105a518..7bff123b4 100644 --- a/examples/network/infoprotocol/infoclient/client.cpp +++ b/examples/network/infoprotocol/infoclient/client.cpp @@ -28,7 +28,7 @@ ClientInfo::ClientInfo( TQWidget *parent, const char *name ) : connect( infoList, SIGNAL(selected(const TQString&)), SLOT(selectItem(const TQString&)) ); connect( btnConnect, SIGNAL(clicked()), SLOT(connectToServer()) ); connect( btnBack, SIGNAL(clicked()), SLOT(stepBack()) ); - connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } diff --git a/examples/network/infoprotocol/infoserver/server.cpp b/examples/network/infoprotocol/infoserver/server.cpp index 0402f6348..116ac0cbb 100644 --- a/examples/network/infoprotocol/infoserver/server.cpp +++ b/examples/network/infoprotocol/infoserver/server.cpp @@ -23,7 +23,7 @@ ServerInfo::ServerInfo( Q_UINT16 port, TQWidget *parent, const char *name ) : { SimpleServer *server = new SimpleServer( port, this, "simple server" ); connect( server, SIGNAL(newConnect()), SLOT(newConnect()) ); - connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } void ServerInfo::newConnect() diff --git a/examples/network/infoprotocol/infourlclient/client.cpp b/examples/network/infoprotocol/infourlclient/client.cpp index 6ae2c72fd..992880dd3 100644 --- a/examples/network/infoprotocol/infourlclient/client.cpp +++ b/examples/network/infoprotocol/infourlclient/client.cpp @@ -22,7 +22,7 @@ ClientInfo::ClientInfo( TQWidget *parent, const char *name ) : ClientInfoBase( parent, name ) { connect( btnOpen, SIGNAL(clicked()), SLOT(downloadFile()) ); - connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); connect( &op, SIGNAL( data( const TQByteArray &, TQNetworkOperation * ) ), this, SLOT( newData( const TQByteArray & ) ) ); } diff --git a/examples/network/mail/smtp.cpp b/examples/network/mail/smtp.cpp index 68c2aa4f6..43a2cf249 100644 --- a/examples/network/mail/smtp.cpp +++ b/examples/network/mail/smtp.cpp @@ -116,7 +116,7 @@ void Smtp::readyRead() return; } else { // something broke. - TQMessageBox::warning( qApp->activeWindow(), + TQMessageBox::warning( tqApp->activeWindow(), tr( "TQt Mail Example" ), tr( "Unexpected reply from SMTP server:\n\n" ) + response ); diff --git a/examples/opengl/box/globjwin.cpp b/examples/opengl/box/globjwin.cpp index ed40f9ec0..9176fe4bd 100644 --- a/examples/opengl/box/globjwin.cpp +++ b/examples/opengl/box/globjwin.cpp @@ -25,7 +25,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) // Create a menu TQPopupMenu *file = new TQPopupMenu( this ); - file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q ); // Create a menu bar TQMenuBar *m = new TQMenuBar( this ); diff --git a/examples/opengl/glpixmap/globjwin.cpp b/examples/opengl/glpixmap/globjwin.cpp index 1309207b0..59b6c244c 100644 --- a/examples/opengl/glpixmap/globjwin.cpp +++ b/examples/opengl/glpixmap/globjwin.cpp @@ -46,7 +46,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) insertMenuItemId = file->insertItem( "Insert Pixmap Here", this, SLOT(makePixmapForMenu()) ); file->insertSeparator(); - file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q ); // Create a menu bar TQMenuBar *m = new TQMenuBar( this ); diff --git a/examples/opengl/overlay/globjwin.cpp b/examples/opengl/overlay/globjwin.cpp index 0c79cd6a9..2b3761b12 100644 --- a/examples/opengl/overlay/globjwin.cpp +++ b/examples/opengl/overlay/globjwin.cpp @@ -22,7 +22,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) { // Create a menu TQPopupMenu *file = new TQPopupMenu( this ); - file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q ); // Create a menu bar TQMenuBar *m = new TQMenuBar( this ); @@ -39,7 +39,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) // Check if we obtained an overlay if ( !c->format().hasOverlay() ) { - TQMessageBox::warning( 0, qApp->argv()[0], + TQMessageBox::warning( 0, tqApp->argv()[0], "Failed to get an OpenGL overlay", "OK" ); } diff --git a/examples/opengl/overlay/main.cpp b/examples/opengl/overlay/main.cpp index ca1ec488c..22e367b4d 100644 --- a/examples/opengl/overlay/main.cpp +++ b/examples/opengl/overlay/main.cpp @@ -37,7 +37,7 @@ int main( int argc, char **argv ) // Check for existence of overlays if ( !TQGLFormat::hasOpenGLOverlays() ) { - TQMessageBox::critical( 0, qApp->argv()[0], + TQMessageBox::critical( 0, tqApp->argv()[0], "This system does not support OpenGL overlays", "Exit" ); return 1; diff --git a/examples/opengl/overlay_x11/main.cpp b/examples/opengl/overlay_x11/main.cpp index c96e3d9b0..45d3a0ea4 100644 --- a/examples/opengl/overlay_x11/main.cpp +++ b/examples/opengl/overlay_x11/main.cpp @@ -77,7 +77,7 @@ TQColor findOverlayTransparentColor() for ( uint i = 0; i < nItems/4; i++ ) { if ( (VisualID)overlayProp[i].visual == XVisualIDFromVisual(appVisual) && overlayProp[i].type == 1 ) - return TQColor( qRgb( 1, 2, 3 ), overlayProp[i].value ); + return TQColor( tqRgb( 1, 2, 3 ), overlayProp[i].value ); } qWarning( "Default visual is not in overlay plane" ); diff --git a/examples/opengl/sharedbox/globjwin.cpp b/examples/opengl/sharedbox/globjwin.cpp index a50573bb8..d95482ff2 100644 --- a/examples/opengl/sharedbox/globjwin.cpp +++ b/examples/opengl/sharedbox/globjwin.cpp @@ -26,7 +26,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) TQPopupMenu *file = new TQPopupMenu( this ); file->insertItem( "Delete Left TQGLWidget", this, SLOT(deleteFirstWidget()) ); - file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q ); // Create a menu bar TQMenuBar *m = new TQMenuBar( this ); diff --git a/examples/opengl/texture/globjwin.cpp b/examples/opengl/texture/globjwin.cpp index a6a2e6c04..b02d0d171 100644 --- a/examples/opengl/texture/globjwin.cpp +++ b/examples/opengl/texture/globjwin.cpp @@ -36,7 +36,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) file->insertItem( "Toggle Animation", c, SLOT(toggleAnimation()), CTRL+Key_A ); file->insertSeparator(); - file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q ); // Create a menu bar TQMenuBar *m = new TQMenuBar( this ); diff --git a/examples/process/process.cpp b/examples/process/process.cpp index 0ff879ace..aceb71ccb 100644 --- a/examples/process/process.cpp +++ b/examples/process/process.cpp @@ -41,7 +41,7 @@ UicManager::UicManager() output = new TQTextView( this ); quitButton = new TQPushButton( tr("Quit"), this ); connect( quitButton, SIGNAL(clicked()), - qApp, SLOT(quit()) ); + tqApp, SLOT(quit()) ); resize( 500, 500 ); // TQProcess related code diff --git a/examples/progress/progress.cpp b/examples/progress/progress.cpp index 548871708..3ed6beee9 100644 --- a/examples/progress/progress.cpp +++ b/examples/progress/progress.cpp @@ -151,7 +151,7 @@ public: file->insertItem( drawItemText(i), i ); connect( menubar, SIGNAL(activated(int)), this, SLOT(doMenuItem(int)) ); file->insertSeparator(); - file->insertItem( "Quit", qApp, SLOT(quit()) ); + file->insertItem( "Quit", tqApp, SLOT(quit()) ); options = new TQPopupMenu(); TQ_CHECK_PTR( options ); diff --git a/examples/qmag/qmag.cpp b/examples/qmag/qmag.cpp index 34504300c..9753748e7 100644 --- a/examples/qmag/qmag.cpp +++ b/examples/qmag/qmag.cpp @@ -128,7 +128,7 @@ MagWidget::MagWidget( TQWidget *parent, const char *name ) quitButton = new TQPushButton( this ); TQ_CHECK_PTR(quitButton); - connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) ); quitButton->setText( "Quit" ); quitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2, 10+quitButton->fontMetrics().width("Quit"), 20 ); @@ -334,8 +334,8 @@ void MagWidget::mouseMoveEvent( TQMouseEvent *e ) { TQRgb px = image.pixel(x,y); pixelinfo.sprintf(" %3d,%3d,%3d #%02x%02x%02x", - qRed(px), qGreen(px), qBlue(px), - qRed(px), qGreen(px), qBlue(px)); + tqRed(px), tqGreen(px), tqBlue(px), + tqRed(px), tqGreen(px), tqBlue(px)); } TQString label; label.sprintf( "x=%d, y=%d %s", diff --git a/examples/qwerty/main.cpp b/examples/qwerty/main.cpp index 01ab2a47d..c5b29d70a 100644 --- a/examples/qwerty/main.cpp +++ b/examples/qwerty/main.cpp @@ -16,8 +16,8 @@ int main( int argc, char **argv ) TQApplication a( argc, argv ); - bool isSmall = qApp->desktop()->size().width() < 450 - || qApp->desktop()->size().height() < 450; + bool isSmall = tqApp->desktop()->size().width() < 450 + || tqApp->desktop()->size().height() < 450; int i; for ( i= argc <= 1 ? 0 : 1; iinsertSeparator(); file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W ); - file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), ALT+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), ALT+Key_Q ); connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) ); connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) ); @@ -130,8 +130,8 @@ void Editor::rebuildCodecList() void Editor::newDoc() { Editor *ed = new Editor; - if ( qApp->desktop()->size().width() < 450 - || qApp->desktop()->size().height() < 450 ) { + if ( tqApp->desktop()->size().width() < 450 + || tqApp->desktop()->size().height() < 450 ) { ed->showMaximized(); } else { ed->resize( 400, 400 ); diff --git a/examples/richtext/richtext.cpp b/examples/richtext/richtext.cpp index ec549a3ad..066af1f36 100644 --- a/examples/richtext/richtext.cpp +++ b/examples/richtext/richtext.cpp @@ -100,7 +100,7 @@ MyRichText::MyRichText( TQWidget *parent, const char *name ) bPrev->setEnabled( FALSE ); - connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); + connect( bClose, SIGNAL( clicked() ), tqApp, SLOT( quit() ) ); connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); diff --git a/examples/rot13/rot13.cpp b/examples/rot13/rot13.cpp index 14b1e79a4..e3d17d87f 100644 --- a/examples/rot13/rot13.cpp +++ b/examples/rot13/rot13.cpp @@ -23,7 +23,7 @@ Rot13::Rot13() TQPushButton * quit = new TQPushButton( "&Quit", this ); quit->setFocusPolicy( NoFocus ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQGridLayout * l = new TQGridLayout( this, 2, 2, 5 ); l->addWidget( left, 0, 0 ); diff --git a/examples/scribble/scribble.cpp b/examples/scribble/scribble.cpp index 520cef7fd..03a3cf3e0 100644 --- a/examples/scribble/scribble.cpp +++ b/examples/scribble/scribble.cpp @@ -33,7 +33,7 @@ Canvas::Canvas( TQWidget *parent, const char *name ) mousePressed( FALSE ), buffer( width(), height() ) { - if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1])) + if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1])) buffer.fill( colorGroup().base() ); setBackgroundMode( TQWidget::PaletteBase ); #ifndef QT_NO_CURSOR diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp index e7db2d2fc..f44853ddc 100644 --- a/examples/scrollview/scrollview.cpp +++ b/examples/scrollview/scrollview.cpp @@ -43,7 +43,7 @@ public: for (int y=0; y<2000-h; y+=h+10) { if (y == 0) { TQButton* q=new TQPushButton("Quit", this); - connect(q, SIGNAL(clicked()), qApp, SLOT(quit())); + connect(q, SIGNAL(clicked()), tqApp, SLOT(quit())); } else { TQString str; if ( b > 0 ) { @@ -207,7 +207,7 @@ public: TQPopupMenu* file = new TQPopupMenu( menubar ); TQ_CHECK_PTR( file ); menubar->insertItem( "&File", file ); - file->insertItem( "Quit", qApp, SLOT(quit()) ); + file->insertItem( "Quit", tqApp, SLOT(quit()) ); vp_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( vp_options ); @@ -433,7 +433,7 @@ int main( int argc, char **argv ) ve3.setCaption("TQt Example - Scrollviews"); ve3.show(); - TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); + TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); return a.exec(); } diff --git a/examples/showimg/main.cpp b/examples/showimg/main.cpp index 2b985a419..1d68c04b3 100644 --- a/examples/showimg/main.cpp +++ b/examples/showimg/main.cpp @@ -50,7 +50,7 @@ int main( int argc, char **argv ) } } - TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); + TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); return a.exec(); } diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp index 526d0debb..579dbb514 100644 --- a/examples/showimg/showimg.cpp +++ b/examples/showimg/showimg.cpp @@ -57,7 +57,7 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags ) si = file->insertItem( "Save image", saveimage ); sp = file->insertItem( "Save pixmap", savepixmap ); file->insertSeparator(); - file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q ); edit = new TQPopupMenu( menubar ); menubar->insertItem( "&Edit", edit ); diff --git a/examples/sound/sound.cpp b/examples/sound/sound.cpp index 8f8ac6c51..f2808e902 100644 --- a/examples/sound/sound.cpp +++ b/examples/sound/sound.cpp @@ -50,7 +50,7 @@ SoundPlayer::SoundPlayer() : file->insertItem("Play 3 and 4 together", this, SLOT(doPlay34())); file->insertItem("Play all together", this, SLOT(doPlay1234())); file->insertSeparator(); - file->insertItem("E&xit", qApp, SLOT(quit())); + file->insertItem("E&xit", tqApp, SLOT(quit())); menuBar()->insertItem("&File", file); } diff --git a/examples/tabdialog/tabdialog.cpp b/examples/tabdialog/tabdialog.cpp index 6211ac939..dd2b107f4 100644 --- a/examples/tabdialog/tabdialog.cpp +++ b/examples/tabdialog/tabdialog.cpp @@ -25,7 +25,7 @@ TabDialog::TabDialog( TQWidget *parent, const char *name, const TQString &_filen setupTab2(); setupTab3(); - connect( this, SIGNAL( applyButtonPressed() ), qApp, SLOT( quit() ) ); + connect( this, SIGNAL( applyButtonPressed() ), tqApp, SLOT( quit() ) ); } void TabDialog::setupTab1() diff --git a/examples/tablet/canvas.cpp b/examples/tablet/canvas.cpp index d71a95429..33ea83fad 100644 --- a/examples/tablet/canvas.cpp +++ b/examples/tablet/canvas.cpp @@ -23,7 +23,7 @@ Canvas::Canvas( TQWidget *parent, const char *name, WFlags fl ) buffer( width(), height() ) { - if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1])) + if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1])) buffer.fill( colorGroup().base() ); setBackgroundMode( TQWidget::PaletteBase ); #ifndef QT_NO_CURSOR diff --git a/examples/tetrix/qtetrix.cpp b/examples/tetrix/qtetrix.cpp index 8e7946ad1..dd709c5b0 100644 --- a/examples/tetrix/qtetrix.cpp +++ b/examples/tetrix/qtetrix.cpp @@ -172,5 +172,5 @@ void TQTetrix::gameOver() void TQTetrix::quit() { - qApp->quit(); + tqApp->quit(); } diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp index e3441c858..66a3a4972 100644 --- a/examples/textedit/textedit.cpp +++ b/examples/textedit/textedit.cpp @@ -40,11 +40,11 @@ TextEdit::TextEdit( TQWidget *parent, const char *name ) this, SLOT( editorChanged( TQWidget * ) ) ); setCentralWidget( tabWidget ); - if ( qApp->argc() == 1 ) { + if ( tqApp->argc() == 1 ) { load( "example.html" ); } else { - for ( int i = 1; i < qApp->argc(); ++i ) - load( qApp->argv()[ i ] ); + for ( int i = 1; i < tqApp->argc(); ++i ) + load( tqApp->argv()[ i ] ); } } @@ -315,7 +315,7 @@ void TextEdit::fileClose() void TextEdit::fileExit() { - qApp->quit(); + tqApp->quit(); } void TextEdit::editUndo() diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp index 3cd7e0405..1f5417625 100644 --- a/examples/themes/themes.cpp +++ b/examples/themes/themes.cpp @@ -86,7 +86,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) } ag->addTo(style); style->insertSeparator(); - style->insertItem("&Quit", qApp, SLOT( quit() ), CTRL | Key_Q ); + style->insertItem("&Quit", tqApp, SLOT( quit() ), CTRL | Key_Q ); TQPopupMenu * help = new TQPopupMenu( this ); menuBar()->insertSeparator(); @@ -95,7 +95,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) help->insertItem( "About &TQt", this, SLOT(aboutTQt())); #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new NorwegianWoodStyle ); + tqApp->setStyle( new NorwegianWoodStyle ); #endif } @@ -103,20 +103,20 @@ void Themes::makeStyle(const TQString &style) { if(style == "Norwegian Wood") { #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new NorwegianWoodStyle ); + tqApp->setStyle( new NorwegianWoodStyle ); #endif } else if( style == "Metal" ) { #ifndef QT_NO_STYLE_WINDOWS - qApp->setStyle( new MetalStyle ); + tqApp->setStyle( new MetalStyle ); #endif } else { - qApp->setStyle(style); + tqApp->setStyle(style); if(style == "Platinum") { TQPalette p( TQColor( 239, 239, 239 ) ); - qApp->setPalette( p, TRUE ); - qApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( appFont, TRUE ); } else if(style == "Windows") { - qApp->setFont( appFont, TRUE ); + tqApp->setFont( appFont, TRUE ); } else if(style == "CDE") { TQPalette p( TQColor( 75, 123, 130 ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); @@ -137,12 +137,12 @@ void Themes::makeStyle(const TQString &style) p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - qApp->setPalette( p, TRUE ); - qApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); } else if(style == "Motif" || style == "MotifPlus") { TQPalette p( TQColor( 192, 192, 192 ) ); - qApp->setPalette( p, TRUE ); - qApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, TRUE ); + tqApp->setFont( appFont, TRUE ); } } } diff --git a/examples/tictac/tictac.cpp b/examples/tictac/tictac.cpp index 3d0375869..03e4fa276 100644 --- a/examples/tictac/tictac.cpp +++ b/examples/tictac/tictac.cpp @@ -324,7 +324,7 @@ TicTacToe::TicTacToe( int boardSize, TQWidget *parent, const char *name ) newGame = new TQPushButton( "Play!", this ); connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) ); quit = new TQPushButton( "Quit", this ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQHBoxLayout * b = new TQHBoxLayout; l->addLayout( b ); b->addWidget( newGame ); diff --git a/examples/widgets/main.cpp b/examples/widgets/main.cpp index a72de7e3f..6d7c217d6 100644 --- a/examples/widgets/main.cpp +++ b/examples/widgets/main.cpp @@ -26,7 +26,7 @@ public: TQStringList styles = TQStyleFactory::keys(); s = (++s)%styles.count(); - qApp->setStyle( styles[ s] ); + tqApp->setStyle( styles[ s] ); WidgetView::button1Clicked(); } }; diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp index 2f6ec11e3..8a1f5d69c 100644 --- a/examples/widgets/widgets.cpp +++ b/examples/widgets/widgets.cpp @@ -156,7 +156,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) "about widgets on the screen."); // Install an application-global event filter to catch control+leftbutton - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); //make a central widget to contain the other widgets central = new TQWidget( this ); @@ -181,7 +181,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) id = popup->insertItem( openIcon, "&Open...", this, SLOT( open() ) ); popup->insertSeparator(); - popup->insertItem( "Quit", qApp, SLOT(quit()), CTRL+Key_Q ); + popup->insertItem( "Quit", tqApp, SLOT(quit()), CTRL+Key_Q ); textStylePopup = popup = new TQPopupMenu( this ); menuBar()->insertItem( "&Edit", popup ); @@ -733,15 +733,15 @@ void WidgetView::mySelectionChanged( TQListViewItem* /*item*/ ) void WidgetView::showProperties() { - if ( !qApp->focusWidget() ) + if ( !tqApp->focusWidget() ) return; TQCString output; output.sprintf( "Properties for class '%s'", - qApp->focusWidget()->className() ); + tqApp->focusWidget()->className() ); int i = 0; - while( i < (int) qApp->focusWidget()->metaObject()->numProperties( TRUE ) ) { + while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( TRUE ) ) { const TQMetaProperty* p - = qApp->focusWidget()->metaObject()->property( i, TRUE ); + = tqApp->focusWidget()->metaObject()->property( i, TRUE ); TQCString tmp; tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(), p->writable() ? "write" : "only", p->type() ); diff --git a/examples/xform/xform.cpp b/examples/xform/xform.cpp index 8335660c1..d9632d6e0 100644 --- a/examples/xform/xform.cpp +++ b/examples/xform/xform.cpp @@ -287,7 +287,7 @@ void XFormControl::changeMode(int m) else rb_pic->setChecked(TRUE); } - qApp->flushX(); + tqApp->flushX(); } ShowXForm::ShowXForm( const TQFont &initialFont, diff --git a/extensions/nsplugin/src/qnp.cpp b/extensions/nsplugin/src/qnp.cpp index e26bb9582..108223fa3 100644 --- a/extensions/nsplugin/src/qnp.cpp +++ b/extensions/nsplugin/src/qnp.cpp @@ -218,9 +218,9 @@ static HHOOK hhook = 0; LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam ) { - if ( qApp ) { - qApp->sendPostedEvents(); - qApp->eventLoop()->activateSocketNotifiers(); + if ( tqApp ) { + tqApp->sendPostedEvents(); + tqApp->eventLoop()->activateSocketNotifiers(); qWinProcessConfigRequests(); } @@ -326,7 +326,7 @@ NPP_Shutdown(void) if ( original_x_errhandler ) XSetErrorHandler( original_x_errhandler ); #endif - if ( qApp) { + if ( tqApp) { #ifdef Q_WS_WIN32 if ( hhook ) UnhookWindowsHookEx( hhook ); @@ -469,7 +469,7 @@ NPP_SetWindow(NPP instance, NPWindow* window) This->height = window->height; - if (!qApp) { + if (!tqApp) { #ifdef Q_WS_X11 // We are the first TQt-based plugin to arrive event_loop = new TQNPXt( "qnp", XtDisplayToApplicationContext(This->display) ); @@ -1734,7 +1734,7 @@ Boolean qnpxt_event_dispatcher( XEvent *event ) do_deliver = FALSE; last_xevent = event; - bool delivered = do_deliver && ( qApp->x11ProcessEvent( event ) != -1 ); + bool delivered = do_deliver && ( tqApp->x11ProcessEvent( event ) != -1 ); last_xevent = 0; if ( qnpxt ) { switch ( event->type ) { @@ -1887,15 +1887,15 @@ void TQNPXt::appStartingUp() XtFree( (char *) displays ); if ( ! display_found ) { - int argc = qApp->argc(); + int argc = tqApp->argc(); XtDisplayInitialize( d->appContext, TQPaintDevice::x11AppDisplay(), - qApp->name(), + tqApp->name(), d->applicationClass, d->options, d->numOptions, &argc, - qApp->argv() ); + tqApp->argv() ); } d->hookMeUp(); diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp index 43328071b..a184874bc 100644 --- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp +++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp @@ -628,8 +628,8 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event ) if ( focus_widget ) keywidget = (TQETWidget*)focus_widget; if ( !keywidget ) { - if ( qApp->inPopupMode() ) // no focus widget, see if we have a popup - keywidget = (TQETWidget*) qApp->activePopupWidget(); + if ( tqApp->inPopupMode() ) // no focus widget, see if we have a popup + keywidget = (TQETWidget*) tqApp->activePopupWidget(); else if ( widget ) keywidget = (TQETWidget*)widget->topLevelWidget(); } diff --git a/src/dialogs/ntqmessagebox.h b/src/dialogs/ntqmessagebox.h index 0296612ac..11b79fc3f 100644 --- a/src/dialogs/ntqmessagebox.h +++ b/src/dialogs/ntqmessagebox.h @@ -211,7 +211,7 @@ private: // Disabled copy constructor and operator= #define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\ (sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\ -(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ +(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !tqApp){ int c=0; new \ TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ diff --git a/src/dialogs/qcolordialog.cpp b/src/dialogs/qcolordialog.cpp index 68838c45f..d365e96f7 100644 --- a/src/dialogs/qcolordialog.cpp +++ b/src/dialogs/qcolordialog.cpp @@ -448,10 +448,10 @@ static void initRGB() for ( int g = 0; g < 4; g++ ) for ( int r = 0; r < 4; r++ ) for ( int b = 0; b < 3; b++ ) - stdrgb[i++] = qRgb( r*255/3, g*255/3, b*255/2 ); + stdrgb[i++] = tqRgb( r*255/3, g*255/3, b*255/2 ); for ( i = 0; i < 2*8; i++ ) - cusrgb[i] = qRgb(0xff,0xff,0xff); + cusrgb[i] = tqRgb(0xff,0xff,0xff); } /*! @@ -1077,7 +1077,7 @@ void TQColorShowLabel::mouseReleaseEvent( TQMouseEvent * ) TQColorShower::TQColorShower( TQWidget *parent, const char *name ) :TQWidget( parent, name) { - curCol = qRgb( -1, -1, -1 ); + curCol = tqRgb( -1, -1, -1 ); TQColIntValidator *val256 = new TQColIntValidator( 0, 255, this ); TQColIntValidator *val360 = new TQColIntValidator( 0, 360, this ); @@ -1161,9 +1161,9 @@ void TQColorShower::rgbEd() { rgbOriginal = TRUE; if ( alphaEd->isVisible() ) - curCol = qRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() ); + curCol = tqRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() ); else - curCol = qRgb( rEd->val(), gEd->val(), bEd->val() ); + curCol = tqRgb( rEd->val(), gEd->val(), bEd->val() ); rgb2hsv(currentColor(), hue, sat, val ); @@ -1184,9 +1184,9 @@ void TQColorShower::hsvEd() curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb(); - rEd->setNum( qRed(currentColor()) ); - gEd->setNum( qGreen(currentColor()) ); - bEd->setNum( qBlue(currentColor()) ); + rEd->setNum( tqRed(currentColor()) ); + gEd->setNum( tqGreen(currentColor()) ); + bEd->setNum( tqBlue(currentColor()) ); showCurrentColor(); emit newCol( currentColor() ); @@ -1203,9 +1203,9 @@ void TQColorShower::setRgb( TQRgb rgb ) sEd->setNum( sat ); vEd->setNum( val ); - rEd->setNum( qRed(currentColor()) ); - gEd->setNum( qGreen(currentColor()) ); - bEd->setNum( qBlue(currentColor()) ); + rEd->setNum( tqRed(currentColor()) ); + gEd->setNum( tqGreen(currentColor()) ); + bEd->setNum( tqBlue(currentColor()) ); showCurrentColor(); } @@ -1220,9 +1220,9 @@ void TQColorShower::setHsv( int h, int s, int v ) sEd->setNum( sat ); vEd->setNum( val ); - rEd->setNum( qRed(currentColor()) ); - gEd->setNum( qGreen(currentColor()) ); - bEd->setNum( qBlue(currentColor()) ); + rEd->setNum( tqRed(currentColor()) ); + gEd->setNum( tqGreen(currentColor()) ); + bEd->setNum( tqBlue(currentColor()) ); showCurrentColor(); } @@ -1303,7 +1303,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) : compact = FALSE; // small displays (e.g. PDAs cannot fit the full color dialog, // so just use the color picker. - if ( qApp->desktop()->width() < 480 || qApp->desktop()->height() < 350 ) + if ( tqApp->desktop()->width() < 480 || tqApp->desktop()->height() < 350 ) compact = TRUE; nextCust = 0; @@ -1545,14 +1545,14 @@ TQRgb TQColorDialog::getRgba( TQRgb initial, bool *ok, #endif dlg->setColor( initial ); dlg->selectColor( initial ); - dlg->setSelectedAlpha( qAlpha(initial) ); + dlg->setSelectedAlpha( tqAlpha(initial) ); int resultCode = dlg->exec(); TQColor::leaveAllocContext(); TQRgb result = initial; if ( resultCode == TQDialog::Accepted ) { TQRgb c = dlg->color().rgb(); int alpha = dlg->selectedAlpha(); - result = qRgba( qRed(c), qGreen(c), qBlue(c), alpha ); + result = tqRgba( tqRed(c), tqGreen(c), tqBlue(c), alpha ); } if ( ok ) *ok = resultCode == TQDialog::Accepted; diff --git a/src/dialogs/qdialog.cpp b/src/dialogs/qdialog.cpp index 1ef49e0c0..a25ad609f 100644 --- a/src/dialogs/qdialog.cpp +++ b/src/dialogs/qdialog.cpp @@ -359,15 +359,15 @@ void TQDialog::hideSpecial() TQPushButton *pb; while ( (pb = (TQPushButton*)it.current()) ) { if ( !showOK && - pb->text() == qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) { + pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) { pb->hide(); showOK = TRUE; } else if ( !showX && - pb->text() == qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) { + pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) { pb->hide(); showX = TRUE; } else if ( !showQ && - pb->text() == qApp->tr("Help") ) { + pb->text() == tqApp->tr("Help") ) { pb->hide(); showQ = TRUE; } @@ -432,7 +432,7 @@ int TQDialog::exec() show(); in_loop = TRUE; - qApp->enter_loop(); + tqApp->enter_loop(); if ( !wasShowModal ) clearWFlags( WShowModal ); @@ -465,14 +465,14 @@ void TQDialog::done( int r ) setResult( r ); // emulate TQWidget::close() - bool isMain = qApp->mainWidget() == this; + bool isMain = tqApp->mainWidget() == this; bool checkLastWindowClosed = isTopLevel() && !isPopup(); if ( checkLastWindowClosed - && qApp->receivers(SIGNAL(lastWindowClosed())) ) { + && tqApp->receivers(SIGNAL(lastWindowClosed())) ) { /* if there is no non-withdrawn top level window left (except the desktop, popups, or dialogs with parents), we emit the lastWindowClosed signal */ - TQWidgetList *list = qApp->topLevelWidgets(); + TQWidgetList *list = tqApp->topLevelWidgets(); TQWidget *widget = list->first(); while ( widget ) { if ( !widget->isHidden() @@ -484,10 +484,10 @@ void TQDialog::done( int r ) } delete list; if ( widget == 0 ) - emit qApp->lastWindowClosed(); + emit tqApp->lastWindowClosed(); } if ( isMain ) - qApp->quit(); + tqApp->quit(); else if ( testWFlags(WDestructiveClose) ) { clearWFlags(WDestructiveClose); deleteLater(); @@ -644,8 +644,8 @@ bool TQDialog::event( TQEvent *e ) { TQString bName = (e->type() == TQEvent::OkRequest) - ? qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) - : qApp->tr( "Help" ); + ? tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) + : tqApp->tr( "Help" ); TQObjectList *list = queryList( "TQPushButton" ); TQObjectListIt it( *list ); @@ -712,10 +712,10 @@ void TQDialog::show() #if defined(Q_WS_X11) if (!parentWidget() && testWFlags(WShowModal) - && qApp->mainWidget() && qApp->mainWidget()->isVisible() - && !qApp->mainWidget()->isMinimized()) { + && tqApp->mainWidget() && tqApp->mainWidget()->isVisible() + && !tqApp->mainWidget()->isMinimized()) { // make sure the transient for hint is set properly for modal dialogs - x11SetWindowTransient( qApp->mainWidget()); + x11SetWindowTransient( tqApp->mainWidget()); } #endif // Q_WS_X11 @@ -900,7 +900,7 @@ void TQDialog::hide() TQWidget::hide(); if ( in_loop ) { in_loop = FALSE; - qApp->exit_loop(); + tqApp->exit_loop(); } } diff --git a/src/dialogs/qerrormessage.cpp b/src/dialogs/qerrormessage.cpp index a33872bb8..70e670689 100644 --- a/src/dialogs/qerrormessage.cpp +++ b/src/dialogs/qerrormessage.cpp @@ -226,8 +226,8 @@ TQErrorMessage * TQErrorMessage::qtHandler() qtMessageHandler = new TQErrorMessage( 0, "automatic message handler" ); qAddPostRoutine( deleteStaticcTQErrorMessage ); // clean up #ifndef QT_NO_WIDGET_TOPEXTRA - if ( qApp->mainWidget() ) - qtMessageHandler->setCaption( qApp->mainWidget()->caption() ); + if ( tqApp->mainWidget() ) + qtMessageHandler->setCaption( tqApp->mainWidget()->caption() ); #endif qInstallMsgHandler( jump ); } diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index fddc5716a..019d3d56c 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -616,7 +616,7 @@ static void makeVariables() { detailViewMode = FALSE; #if defined(Q_WS_WIN) if ( !fileIconProvider ) - fileIconProvider = new TQWindowsIconProvider( qApp ); + fileIconProvider = new TQWindowsIconProvider( tqApp ); #endif } } @@ -3498,12 +3498,12 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, false ).first(); #elif defined(Q_WS_WIN) - if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) + if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) return winGetOpenFileName( initialSelection, filter, workingDirectory, parent, name, caption, selectedFilter ); #elif defined(Q_WS_MAC) - if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) - || qApp->style().inherits("TQMacStyle"))) + if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE) + || tqApp->style().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetOpenFileNames(filter, startWith.isEmpty() ? 0 : workingDirectory, parent, name, caption, selectedFilter, FALSE).first()); @@ -3623,12 +3623,12 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith, return TQKDEIntegration::getSaveFileName( initialSelection, filter, workingDirectory, parent, name, caption, selectedFilter ); #elif defined(Q_WS_WIN) - if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) + if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) return winGetSaveFileName( initialSelection, filter, workingDirectory, parent, name, caption, selectedFilter ); #elif defined(Q_WS_MAC) - if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) - || qApp->style().inherits("TQMacStyle"))) + if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE) + || tqApp->style().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetSaveFileName(initialSelection, filter, startWith.isEmpty() ? 0 : workingDirectory, parent, name, caption, selectedFilter)); @@ -4530,7 +4530,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, initialDir = dir; } else initialDir = TQString::null; - if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly ) + if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly ) return winGetExistingDirectory( initialDir, parent, name, caption ); #endif #if defined(Q_WS_MAC) @@ -4540,8 +4540,8 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, if (TQFileInfo(u.path()).isDir()) initialDir = (TQString *)&dir; } - if( qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) - || qApp->style().inherits("TQMacStyle"))) + if( qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE) + || tqApp->style().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name, caption, 0, FALSE, TRUE).first()); #endif @@ -5690,11 +5690,11 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter, if ( qt_use_native_dialogs && TQKDEIntegration::enabled()) return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, true ); #elif defined(Q_WS_WIN) - if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) + if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter ); #elif defined(Q_WS_MAC) - if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) - || qApp->style().inherits("TQMacStyle"))) { + if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE) + || tqApp->style().inherits("TQMacStyle"))) { TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, parent, name, caption, selectedFilter); TQStringList::iterator it = sl.begin(); @@ -6375,7 +6375,7 @@ void TQFileDialog::doMimeTypeLookup() // evil hack to avoid much too much repaints! TQGuardedPtr that( this ); // this may be deleted by an event handler - qApp->processEvents(); + tqApp->processEvents(); if ( that.isNull() ) return; files->setUpdatesEnabled( FALSE ); @@ -6383,7 +6383,7 @@ void TQFileDialog::doMimeTypeLookup() if ( item != d->pendingItems.first() ) return; item->setPixmap( 0, *p ); - qApp->processEvents(); + tqApp->processEvents(); if ( that.isNull() ) return; files->setUpdatesEnabled( TRUE ); diff --git a/src/dialogs/qmessagebox.cpp b/src/dialogs/qmessagebox.cpp index ce6c505b0..96aabc066 100644 --- a/src/dialogs/qmessagebox.cpp +++ b/src/dialogs/qmessagebox.cpp @@ -1324,7 +1324,7 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption, if ( pm && !pm->isNull() ) mb->setIconPixmap( *pm ); else { - pm = qApp && qApp->mainWidget() ? qApp->mainWidget()->icon() : 0; + pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : 0; if ( pm && !pm->isNull() ) mb->setIconPixmap( *pm ); } @@ -1607,8 +1607,8 @@ void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption ) #ifndef QT_NO_IMAGEIO TQPixmap pm; TQImage logo( (const char **)qtlogo_xpm); - if ( qGray(mb->palette().active().text().rgb()) > - qGray(mb->palette().active().base().rgb()) ) + if ( tqGray(mb->palette().active().text().rgb()) > + tqGray(mb->palette().active().base().rgb()) ) { // light on dark, adjust some colors (where's 10?) logo.setColor( 0, 0xffffffff ); diff --git a/src/dialogs/qprogressdialog.cpp b/src/dialogs/qprogressdialog.cpp index d29b4c581..fe5168a03 100644 --- a/src/dialogs/qprogressdialog.cpp +++ b/src/dialogs/qprogressdialog.cpp @@ -143,7 +143,7 @@ TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles, this, "progress", TRUE ); for ( int i = 0; i < numFiles; i++ ) { progress.setProgress( i ); - qApp->processEvents(); + tqApp->processEvents(); if ( progress.wasCanceled() ) break; @@ -580,7 +580,7 @@ void TQProgressDialog::setProgress( int progress ) if ( d->shown_once ) { if (testWFlags(WShowModal)) - qApp->processEvents(); + tqApp->processEvents(); } else { if ( progress == 0 ) { #ifndef QT_NO_CURSOR diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp index 47b1a1cf6..a14684b0c 100644 --- a/src/iconview/qiconview.cpp +++ b/src/iconview/qiconview.cpp @@ -5434,7 +5434,7 @@ void TQIconView::focusOutEvent( TQFocusEvent* ) if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { d->inMenuMode = TQFocusEvent::reason() == TQFocusEvent::Popup || - (qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); + (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar")); if ( !d->inMenuMode ) repaintSelectedItems(); } diff --git a/src/kernel/ntqapplication.h b/src/kernel/ntqapplication.h index fbeed98eb..02c1993da 100644 --- a/src/kernel/ntqapplication.h +++ b/src/kernel/ntqapplication.h @@ -67,7 +67,7 @@ class TQMutex; class TQApplication; -extern Q_EXPORT TQApplication *qApp; // global application object +extern Q_EXPORT TQApplication *tqApp; // global application object class Q_EXPORT TQApplication : public TQObject @@ -520,10 +520,10 @@ inline TQSize TQApplication::globalStrut() } inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) -{ if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; } +{ if ( event ) event->spont = FALSE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; } inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) -{ if ( event ) event->spont = TRUE; return qApp ? qApp->notify( receiver, event ) : FALSE; } +{ if ( event ) event->spont = TRUE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; } #ifdef QT_NO_TRANSLATION // Simple versions diff --git a/src/kernel/ntqcolor.h b/src/kernel/ntqcolor.h index fd9e7630b..a35e81098 100644 --- a/src/kernel/ntqcolor.h +++ b/src/kernel/ntqcolor.h @@ -46,31 +46,31 @@ #include "ntqstringlist.h" #endif // QT_H -const TQRgb RGB_MASK = 0x00ffffff; // masks RGB values +const TQRgb TQT_RGB_MASK = 0x00ffffff; // masks RGB values -Q_EXPORT inline int qRed( TQRgb rgb ) // get red part of RGB +Q_EXPORT inline int tqRed( TQRgb rgb ) // get red part of RGB { return (int)((rgb >> 16) & 0xff); } -Q_EXPORT inline int qGreen( TQRgb rgb ) // get green part of RGB +Q_EXPORT inline int tqGreen( TQRgb rgb ) // get green part of RGB { return (int)((rgb >> 8) & 0xff); } -Q_EXPORT inline int qBlue( TQRgb rgb ) // get blue part of RGB +Q_EXPORT inline int tqBlue( TQRgb rgb ) // get blue part of RGB { return (int)(rgb & 0xff); } -Q_EXPORT inline int qAlpha( TQRgb rgb ) // get alpha part of RGBA +Q_EXPORT inline int tqAlpha( TQRgb rgb ) // get alpha part of RGBA { return (int)((rgb >> 24) & 0xff); } -Q_EXPORT inline TQRgb qRgb( int r, int g, int b )// set RGB value +Q_EXPORT inline TQRgb tqRgb( int r, int g, int b )// set RGB value { return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_EXPORT inline TQRgb qRgba( int r, int g, int b, int a )// set RGBA value +Q_EXPORT inline TQRgb tqRgba( int r, int g, int b, int a )// set RGBA value { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 +Q_EXPORT inline int tqGray( int r, int g, int b )// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } -Q_EXPORT inline int qGray( TQRgb rgb ) // convert RGB to gray 0..255 -{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); } +Q_EXPORT inline int tqGray( TQRgb rgb ) // convert RGB to gray 0..255 +{ return tqGray( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) ); } class Q_EXPORT TQColor @@ -190,13 +190,13 @@ inline TQRgb TQColor::rgb() const { return d.argb; } inline int TQColor::red() const -{ return qRed(d.argb); } +{ return tqRed(d.argb); } inline int TQColor::green() const -{ return qGreen(d.argb); } +{ return tqGreen(d.argb); } inline int TQColor::blue() const -{ return qBlue(d.argb); } +{ return tqBlue(d.argb); } inline bool TQColor::isValid() const { diff --git a/src/kernel/ntqwindowdefs.h b/src/kernel/ntqwindowdefs.h index 3ad58fec2..b2e511871 100644 --- a/src/kernel/ntqwindowdefs.h +++ b/src/kernel/ntqwindowdefs.h @@ -154,7 +154,7 @@ Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1 Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome ); -Q_EXPORT const char *qAppClass(); // get application class +Q_EXPORT const char *tqAppClass(); // get application class #endif // Q_WS_X11 diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index c15f19ab4..149048905 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -95,7 +95,7 @@ or more windows at any time. The TQApplication object is accessible through the global pointer \c - qApp. Its main areas of responsibility are: + tqApp. Its main areas of responsibility are: \list \i It initializes the application with the user's desktop settings @@ -323,7 +323,7 @@ void qt_init( Display* dpy, TQt::HANDLE, TQt::HANDLE ); #endif Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ); -TQApplication *qApp = 0; // global application object +TQApplication *tqApp = 0; // global application object TQStyle *TQApplication::app_style = 0; // default application style bool qt_explicit_app_style = FALSE; // style explicitly set by programmer @@ -654,7 +654,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv ) Initializes the window system and constructs an application object with \a argc command line arguments in \a argv. - The global \c qApp pointer refers to this application object. Only + The global \c tqApp pointer refers to this application object. Only one application object should be created. This application object must be constructed before any \link @@ -663,7 +663,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv ) Note that \a argc and \a argv might be changed. TQt removes command line arguments that it recognizes. The modified \a argc and \a argv - can also be accessed later with \c qApp->argc() and \c qApp->argv(). + can also be accessed later with \c tqApp->argc() and \c tqApp->argv(). The documentation for argv() contains a detailed description of how to process command line arguments. @@ -791,13 +791,13 @@ TQApplication::TQApplication( int &argc, char **argv, Type type ) Q_EXPORT void qt_ucm_initialize( TQApplication *theApp ) { - if ( qApp ) + if ( tqApp ) return; int argc = theApp->argc(); char **argv = theApp->argv(); - theApp->construct( argc, argv, qApp->type() ); + theApp->construct( argc, argv, tqApp->type() ); - Q_ASSERT( qApp == theApp ); + Q_ASSERT( tqApp == theApp ); } void TQApplication::construct( int &argc, char **argv, Type type ) @@ -932,10 +932,10 @@ void TQApplication::init_precmdline() is_session_restored = FALSE; #endif #if defined(QT_CHECK_STATE) - if ( qApp ) + if ( tqApp ) qWarning( "TQApplication: There should be max one application object" ); #endif - qApp = (TQApplication*)this; + tqApp = (TQApplication*)this; } /*! @@ -964,7 +964,7 @@ void TQApplication::initialize( int argc, char **argv ) // connect to the session manager if ( !session_key ) session_key = new TQString; - session_manager = new TQSessionManager( qApp, session_id, *session_key ); + session_manager = new TQSessionManager( tqApp, session_id, *session_key ); #endif } @@ -1017,7 +1017,7 @@ TQWidget *TQApplication::activeModalWidget() /*! Cleans up any window system resources that were allocated by this - application. Sets the global variable \c qApp to 0. + application. Sets the global variable \c tqApp to 0. */ TQApplication::~TQApplication() @@ -1098,10 +1098,10 @@ TQApplication::~TQApplication() postevent_mutex = 0; #endif // QT_THREAD_SUPPORT - if( qApp == this ) { + if( tqApp == this ) { if ( postedEvents ) removePostedEvents( this ); - qApp = 0; + tqApp = 0; } is_app_running = FALSE; @@ -1186,7 +1186,7 @@ TQApplication::~TQApplication() under X11, the list box contains the three strings "showargs", "hello" and "world". - TQt provides a global pointer, \c qApp, that points to the + TQt provides a global pointer, \c tqApp, that points to the TQApplication object, and through which you can access argc() and argv() in functions other than main(). @@ -1278,7 +1278,7 @@ TQStyle& TQApplication::style() } } - app_style->polish( qApp ); + app_style->polish( tqApp ); #endif return *app_style; } @@ -1326,7 +1326,7 @@ void TQApplication::setStyle( TQStyle *style ) } } } - old->unPolish( qApp ); + old->unPolish( tqApp ); } // take care of possible palette requirements of certain gui @@ -1338,7 +1338,7 @@ void TQApplication::setStyle( TQStyle *style ) setPalette( tmpPal, TRUE ); // initialize the application with the new style - app_style->polish( qApp ); + app_style->polish( tqApp ); // re-polish existing widgets if necessary if (old) { @@ -1499,7 +1499,7 @@ int TQApplication::colorSpec() void TQApplication::setColorSpec( int spec ) { #if defined(QT_CHECK_STATE) - if ( qApp ) { + if ( tqApp ) { qWarning( "TQApplication::setColorSpec: This function must be " "called before the TQApplication object is created" ); } @@ -1546,7 +1546,7 @@ void TQApplication::setGlobalStrut( const TQSize& strut ) } #if defined( Q_WS_WIN ) || defined( Q_WS_MAC ) -extern const char *qAppFileName(); +extern const char *tqAppFileName(); #endif #ifndef QT_NO_DIR @@ -1647,7 +1647,7 @@ TQString TQApplication::applicationFilePath() return filePath.filePath(); #elif defined( Q_WS_MAC ) - return TQDir::cleanDirPath( TQFile::decodeName( qAppFileName() ) ); + return TQDir::cleanDirPath( TQFile::decodeName( tqAppFileName() ) ); #else TQString argv0 = TQFile::decodeName( argv()[0] ); TQString absPath; @@ -1732,11 +1732,11 @@ TQStringList TQApplication::libraryPaths() } TQString app_location; - if (qApp) - app_location = qApp->applicationFilePath(); + if (tqApp) + app_location = tqApp->applicationFilePath(); #ifdef Q_WS_WIN else { - app_location = TQString(qAppFileName()); + app_location = TQString(tqAppFileName()); app_location.replace('\\', '/'); } #endif @@ -1821,7 +1821,7 @@ void TQApplication::removeLibraryPath( const TQString &path ) TQPalette TQApplication::palette(const TQWidget* w) { #if defined(QT_CHECK_STATE) - if ( !qApp ) + if ( !tqApp ) qWarning( "TQApplication::palette: This function can only be " "called after the TQApplication object has been created" ); #endif @@ -1872,7 +1872,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets, TQPalette *oldpal = 0; #ifndef QT_NO_STYLE if ( !startingUp() ) // on startup this has been done already - qApp->style().polish( pal ); // NB: non-const reference + tqApp->style().polish( pal ); // NB: non-const reference #endif bool all = FALSE; if ( !className ) { @@ -2137,7 +2137,7 @@ TQFontMetrics TQApplication::fontMetrics() Example: \code TQPushButton *quitButton = new TQPushButton( "Quit" ); - connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) ); \endcode \sa exit() aboutToQuit() lastWindowClosed() TQAction @@ -2159,10 +2159,10 @@ void TQApplication::quit() \code // the "Quit" menu entry should try to close all windows TQPopupMenu* file = new TQPopupMenu( this ); - file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), CTRL+Key_Q ); // when the last window is closed, the application should quit - connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) ); + connect( tqApp, SIGNAL( lastWindowClosed() ), tqApp, SLOT( quit() ) ); \endcode The windows are closed in random order, until one window does not @@ -2286,9 +2286,9 @@ void TQApplication::aboutTQt() approaches are listed below: \list 1 \i Reimplementing this function. This is very powerful, providing - complete control; but only one subclass can be qApp. + complete control; but only one subclass can be tqApp. - \i Installing an event filter on qApp. Such an event filter is able + \i Installing an event filter on tqApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even @@ -2730,7 +2730,7 @@ void TQApplication::processOneEvent() TQEventLoop *TQApplication::eventLoop() { if ( !eventloop && !is_app_closing ) - (void) new TQEventLoop( qApp, "default event loop" ); + (void) new TQEventLoop( tqApp, "default event loop" ); return eventloop; } @@ -2779,7 +2779,7 @@ int TQApplication::exec() */ void TQApplication::exit( int retcode ) { - qApp->eventLoop()->exit( retcode ); + tqApp->eventLoop()->exit( retcode ); } /*! @@ -2963,7 +2963,7 @@ void TQApplication::removeTranslator( TQTranslator * mf ) if ( !translators || !mf ) return; - if ( translators->remove( mf ) && ! qApp->closingDown() ) { + if ( translators->remove( mf ) && ! tqApp->closingDown() ) { setReverseLayout( qt_detectRTLLanguage() ); TQWidgetList *list = topLevelWidgets(); @@ -3666,12 +3666,12 @@ Q_EXPORT void qt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) { TQEvent leaveEvent( TQEvent::Leave ); for ( w = leaveList.first(); w; w = leaveList.next() ) { - if ( !qApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) + if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) TQApplication::sendEvent( w, &leaveEvent ); } TQEvent enterEvent( TQEvent::Enter ); for ( w = enterList.first(); w; w = enterList.next() ) { - if ( !qApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) + if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) TQApplication::sendEvent( w, &enterEvent ); } } @@ -3691,7 +3691,7 @@ Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) { TQWidget *modal=0, *top=TQApplication::activeModalWidget(); if ( rettop ) *rettop = top; - if ( qApp->activePopupWidget() ) + if ( tqApp->activePopupWidget() ) return TRUE; #ifdef Q_WS_MACX diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 4579b98fd..72e29b148 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -419,7 +419,7 @@ static bool qt_x11EventFilter( XEvent* ev ) { if ( qt_x11_event_filter && qt_x11_event_filter( ev ) ) return TRUE; - return qApp->x11EventFilter( ev ); + return tqApp->x11EventFilter( ev ); } @@ -620,7 +620,7 @@ TQWidgetList *TQApplication::icHolderWidgets() */ void TQApplication::changeAllInputContext( const TQString &identifierName ) { - TQWidgetList *list = qApp->icHolderWidgets(); + TQWidgetList *list = tqApp->icHolderWidgets(); TQWidgetListIt it(*list); while(it.current()) { it.current()->changeInputContext( identifierName ); @@ -687,7 +687,7 @@ void TQApplication::create_im() */ void TQApplication::close_im() { - TQWidgetList *list = qApp->icHolderWidgets(); + TQWidgetList *list = tqApp->icHolderWidgets(); TQWidgetListIt it(*list); while(it.current()) { it.current()->destroyInputContext(); @@ -708,7 +708,7 @@ void TQApplication::create_xim() qt_xim_preferred_style = xim_default_style; #endif // QT_NO_XIM - TQWidgetList *list= qApp->topLevelWidgets(); + TQWidgetList *list= tqApp->topLevelWidgets(); TQWidgetListIt it(*list); TQWidget * w; while( (w=it.current()) != 0 ) { @@ -733,7 +733,7 @@ void TQApplication::close_xim() // qt_xim = 0; #endif // QT_NO_XIM - TQWidgetList *list = qApp->topLevelWidgets(); + TQWidgetList *list = tqApp->topLevelWidgets(); TQWidgetListIt it(*list); while(it.current()) { it.current()->destroyInputContext(); @@ -807,7 +807,7 @@ static int qt_x_errhandler( Display *dpy, XErrorEvent *err ) static int qt_xio_errhandler( Display * ) { qWarning( "%s: Fatal IO error: client killed", appName ); - qApp = 0; + tqApp = 0; exit( 1 ); //### give the application a chance for a proper shutdown instead, //### exit(1) doesn't help. @@ -1065,7 +1065,7 @@ bool TQApplication::x11_apply_settings() if (defaultcodec != "none") { TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec); if (codec) - qApp->setDefaultCodec(codec); + tqApp->setDefaultCodec(codec); } TQStringList strut = settings.readListEntry("/qt/globalStrut"); @@ -1559,7 +1559,7 @@ void qt_x11_create_wm_client_leader() (unsigned char *)&qt_x11_wm_client_leader, 1 ); // If we are session managed, inform the window manager about it - TQCString session = qApp->sessionId().latin1(); + TQCString session = tqApp->sessionId().latin1(); if ( !session.isEmpty() ) { XChangeProperty( TQPaintDevice::x11AppDisplay(), qt_x11_wm_client_leader, qt_sm_client_id, @@ -1808,7 +1808,7 @@ void qt_init_internal( int *argcptr, char **argv, if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) { qWarning( "%s: cannot connect to X server %s", appName, XDisplayName(appDpyName) ); - qApp = 0; + tqApp = 0; exit( 1 ); } @@ -2206,7 +2206,7 @@ void qt_init_internal( int *argcptr, char **argv, #endif if( qt_is_gui_used ) { - qApp->setName( appName ); + tqApp->setName( appName ); int screen; for ( screen = 0; screen < appScreenCount; ++screen ) { @@ -2398,7 +2398,7 @@ void qt_init_internal( int *argcptr, char **argv, if (defaultcodec != "none") { TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec); if (codec) - qApp->setDefaultCodec(codec); + tqApp->setDefaultCodec(codec); } qt_resolve_symlinks = @@ -2623,7 +2623,7 @@ const char *tqAppName() // get application name return appName; } -const char *qAppClass() // get application class +const char *tqAppClass() // get application class { return appClass; } @@ -3482,7 +3482,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) case XKeyRelease: do { popup->close(); - } while ( (popup = qApp->activePopupWidget()) ); + } while ( (popup = tqApp->activePopupWidget()) ); return 1; } } @@ -4102,7 +4102,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) || nextEvent.type == PropertyNotify || nextEvent.type == Expose || nextEvent.type == NoExpose ) { - qApp->x11ProcessEvent( &nextEvent ); + tqApp->x11ProcessEvent( &nextEvent ); continue; } else if ( nextEvent.type != MotionNotify || nextEvent.xmotion.window != event->xmotion.window || @@ -4170,7 +4170,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) // take care about grabbing. We do this here since it // is clear that we return anyway - if ( qApp->inPopupMode() && popupGrabOk ) + if ( tqApp->inPopupMode() && popupGrabOk ) XAllowEvents( x11Display(), SyncPointer, CurrentTime ); // We are only interested in ButtonPress. @@ -4264,8 +4264,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) if ( type == 0 ) // don't send event return FALSE; - if ( qApp->inPopupMode() ) { // in popup mode - TQWidget *popup = qApp->activePopupWidget(); + if ( tqApp->inPopupMode() ) { // in popup mode + TQWidget *popup = tqApp->activePopupWidget(); if ( popup != this ) { if ( testWFlags(WType_Popup) && rect().contains(pos) ) popup = this; @@ -4334,7 +4334,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) if ( releaseAfter ) qt_button_down = 0; - if ( qApp->inPopupMode() ) { // still in popup mode + if ( tqApp->inPopupMode() ) { // still in popup mode if ( popupGrabOk ) XAllowEvents( dpy, SyncPointer, CurrentTime ); } else { @@ -4394,7 +4394,7 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int { // send the event to the widget or its ancestors { - TQWidget* popup = qApp->activePopupWidget(); + TQWidget* popup = tqApp->activePopupWidget(); if ( popup && topLevelWidget() != popup ) popup->close(); TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), @@ -4405,8 +4405,8 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int // send the event to the widget that has the focus or its ancestors, if different TQWidget *w = this; - if ( w != qApp->focusWidget() && ( w = qApp->focusWidget() ) ) { - TQWidget* popup = qApp->activePopupWidget(); + if ( w != tqApp->focusWidget() && ( w = tqApp->focusWidget() ) ) { + TQWidget* popup = tqApp->activePopupWidget(); if ( popup && w != popup ) popup->hide(); TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), @@ -6366,7 +6366,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd ) smd->sessionKey = TQString::number( tv.tv_sec ) + "_" + TQString::number(tv.tv_usec); // tell the session manager about our program in best POSIX style - sm_setProperty( SmProgram, TQString( qApp->argv()[0] ) ); + sm_setProperty( SmProgram, TQString( tqApp->argv()[0] ) ); // tell the session manager about our user as well. struct passwd* entry = getpwuid( geteuid() ); if ( entry ) @@ -6374,8 +6374,8 @@ static void sm_performSaveYourself( TQSessionManagerData* smd ) // generate a restart and discard command that makes sense TQStringList restart; - restart << qApp->argv()[0] << "-session" << smd->sessionId + "_" + smd->sessionKey; - if (qstricmp(tqAppName(), qAppClass()) != 0) + restart << tqApp->argv()[0] << "-session" << smd->sessionId + "_" + smd->sessionKey; + if (qstricmp(tqAppName(), tqAppClass()) != 0) restart << "-name" << tqAppName(); sm->setRestartCommand( restart ); TQStringList discard; @@ -6383,15 +6383,15 @@ static void sm_performSaveYourself( TQSessionManagerData* smd ) switch ( sm_saveType ) { case SmSaveBoth: - qApp->commitData( *sm ); + tqApp->commitData( *sm ); if ( sm_isshutdown && sm_cancel) break; // we cancelled the shutdown, no need to save state // fall through case SmSaveLocal: - qApp->saveState( *sm ); + tqApp->saveState( *sm ); break; case SmSaveGlobal: - qApp->commitData( *sm ); + tqApp->commitData( *sm ); break; default: break; @@ -6438,7 +6438,7 @@ static void sm_dieCallback( SmcConn smcConn, SmPointer /* clientData */) return; resetSmState(); TQEvent quitEvent(TQEvent::Quit); - TQApplication::sendEvent(qApp, &quitEvent); + TQApplication::sendEvent(tqApp, &quitEvent); } static void sm_shutdownCancelledCallback( SmcConn smcConn, SmPointer /* clientData */) @@ -6446,7 +6446,7 @@ static void sm_shutdownCancelledCallback( SmcConn smcConn, SmPointer /* clientDa if (smcConn != smcConnection ) return; if ( sm_waitingForInteraction ) - qApp->exit_loop(); + tqApp->exit_loop(); resetSmState(); } @@ -6462,7 +6462,7 @@ static void sm_interactCallback( SmcConn smcConn, SmPointer /* clientData */ ) if (smcConn != smcConnection ) return; if ( sm_waitingForInteraction ) - qApp->exit_loop(); + tqApp->exit_loop(); } static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData ) @@ -6570,7 +6570,7 @@ bool TQSessionManager::allowsInteraction() sm_interactCallback, (SmPointer*) this ); } if ( sm_waitingForInteraction ) { - qApp->enter_loop(); + tqApp->enter_loop(); sm_waitingForInteraction = FALSE; if ( sm_smActive ) { // not cancelled sm_interactionActive = TRUE; @@ -6594,7 +6594,7 @@ bool TQSessionManager::allowsErrorInteraction() sm_interactCallback, (SmPointer*) this ); } if ( sm_waitingForInteraction ) { - qApp->enter_loop(); + tqApp->enter_loop(); sm_waitingForInteraction = FALSE; if ( sm_smActive ) { // not cancelled sm_interactionActive = TRUE; diff --git a/src/kernel/qasyncimageio.cpp b/src/kernel/qasyncimageio.cpp index 21485fd1f..320e4bd4b 100644 --- a/src/kernel/qasyncimageio.cpp +++ b/src/kernel/qasyncimageio.cpp @@ -844,7 +844,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer, case GlobalColorMap: case LocalColorMap: hold[count++]=ch; if (count==3) { - TQRgb rgb = qRgb(hold[0], hold[1], hold[2]); + TQRgb rgb = tqRgb(hold[0], hold[1], hold[2]); if ( state == LocalColorMap ) { if ( ccount < lncols ) localcmap[ccount] = rgb; diff --git a/src/kernel/qclipboard_x11.cpp b/src/kernel/qclipboard_x11.cpp index 8f602d84e..32f428fcf 100644 --- a/src/kernel/qclipboard_x11.cpp +++ b/src/kernel/qclipboard_x11.cpp @@ -480,7 +480,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event, TQTime started = TQTime::currentTime(); TQTime now = started; - if (qApp->eventLoop()->inherits("TQMotif")) { // yes yes, evil hack, we know + if (tqApp->eventLoop()->inherits("TQMotif")) { // yes yes, evil hack, we know if ( waiting_for_data ) qFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" ); @@ -503,7 +503,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event, started = now; // 0x08 == ExcludeTimers for X11 only - qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | + tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers | TQEventLoop::WaitForMore | 0x08 ); @@ -537,7 +537,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event, // process other clipboard events, since someone is probably requesting data from us XEvent e; if (XCheckIfEvent(dpy, &e, checkForClipboardEvents, 0)) - qApp->x11ProcessEvent(&e); + tqApp->x11ProcessEvent(&e); now = TQTime::currentTime(); if ( started > now ) // crossed midnight diff --git a/src/kernel/qcolor.cpp b/src/kernel/qcolor.cpp index 832e5b7f7..a7f6b30ba 100644 --- a/src/kernel/qcolor.cpp +++ b/src/kernel/qcolor.cpp @@ -259,10 +259,10 @@ void TQColor::initGlobalColors() // HACK: we need a way to recognize color0 and color1 uniquely, so // that we can use color0 and color1 with fixed pixel values on // all screens - stdcol[ 0].d.argb = qRgba(255, 255, 255, 1); - stdcol[ 1].d.argb = qRgba( 0, 0, 0, 1); + stdcol[ 0].d.argb = tqRgba(255, 255, 255, 1); + stdcol[ 1].d.argb = tqRgba( 0, 0, 0, 1); #else - stdcol[ 0].d.argb = qRgb(255,255,255); + stdcol[ 0].d.argb = tqRgb(255,255,255); stdcol[ 1].d.argb = 0; #endif // Q_WS_X11 stdcol[ 0].setPixel( COLOR0_PIX ); @@ -605,9 +605,9 @@ void TQColor::hsv( int *h, int *s, int *v ) const { if ( !h || !s || !v ) return; - int r = qRed(d.argb); - int g = qGreen(d.argb); - int b = qBlue(d.argb); + int r = tqRed(d.argb); + int g = tqGreen(d.argb); + int b = tqBlue(d.argb); uint max = r; // maximum RGB component int whatmax = 0; // r=>0, g=>1, b=>2 if ( (uint)g > max ) { @@ -712,7 +712,7 @@ void TQColor::setHsv( int h, int s, int v ) For an invalid color, the alpha value of the returned color is unspecified. - \sa setRgb(), hsv(), qRed(), qBlue(), qGreen(), isValid() + \sa setRgb(), hsv(), tqRed(), tqBlue(), tqGreen(), isValid() */ /*! \fn void TQColor::getRgb( int *r, int *g, int *b ) const @@ -727,9 +727,9 @@ void TQColor::setHsv( int h, int s, int v ) /*! \obsolete Use getRgb() instead */ void TQColor::rgb( int *r, int *g, int *b ) const { - *r = qRed(d.argb); - *g = qGreen(d.argb); - *b = qBlue(d.argb); + *r = tqRed(d.argb); + *g = tqGreen(d.argb); + *b = tqBlue(d.argb); } @@ -749,7 +749,7 @@ void TQColor::setRgb( int r, int g, int b ) #endif return; } - d.argb = qRgb( r, g, b ); + d.argb = tqRgb( r, g, b ); if ( colormodel == d8 ) { d.d8.invalid = FALSE; d.d8.direct = FALSE; @@ -959,60 +959,60 @@ TQDataStream &operator>>( TQDataStream &s, TQColor &c ) *****************************************************************************/ /*! - \fn int qRed( TQRgb rgb ) + \fn int tqRed( TQRgb rgb ) \relates TQColor Returns the red component of the RGB triplet \a rgb. - \sa qRgb(), TQColor::red() + \sa tqRgb(), TQColor::red() */ /*! - \fn int qGreen( TQRgb rgb ) + \fn int tqGreen( TQRgb rgb ) \relates TQColor Returns the green component of the RGB triplet \a rgb. - \sa qRgb(), TQColor::green() + \sa tqRgb(), TQColor::green() */ /*! - \fn int qBlue( TQRgb rgb ) + \fn int tqBlue( TQRgb rgb ) \relates TQColor Returns the blue component of the RGB triplet \a rgb. - \sa qRgb(), TQColor::blue() + \sa tqRgb(), TQColor::blue() */ /*! - \fn int qAlpha( TQRgb rgba ) + \fn int tqAlpha( TQRgb rgba ) \relates TQColor Returns the alpha component of the RGBA quadruplet \a rgba. */ /*! - \fn TQRgb qRgb( int r, int g, int b ) + \fn TQRgb tqRgb( int r, int g, int b ) \relates TQColor Returns the RGB triplet \a (r,g,b). The return type TQRgb is equivalent to \c unsigned \c int. - \sa qRgba(), qRed(), qGreen(), qBlue() + \sa tqRgba(), tqRed(), tqGreen(), tqBlue() */ /*! - \fn TQRgb qRgba( int r, int g, int b, int a ) + \fn TQRgb tqRgba( int r, int g, int b, int a ) \relates TQColor Returns the RGBA quadruplet \a (r,g,b,a). The return type TQRgba is equivalent to \c unsigned \c int. - \sa qRgb(), qRed(), qGreen(), qBlue() + \sa tqRgb(), tqRed(), tqGreen(), tqBlue() */ /*! - \fn int qGray( int r, int g, int b ) + \fn int tqGray( int r, int g, int b ) \relates TQColor Returns a gray value 0..255 from the (\a r, \a g, \a b) triplet. @@ -1022,7 +1022,7 @@ TQDataStream &operator>>( TQDataStream &s, TQColor &c ) */ /*! - \overload int qGray( qRgb rgb ) + \overload int tqGray( tqRgb rgb ) \relates TQColor Returns a gray value 0..255 from the given \a rgb colour. diff --git a/src/kernel/qcolor_x11.cpp b/src/kernel/qcolor_x11.cpp index 4328babc0..6be79b40b 100644 --- a/src/kernel/qcolor_x11.cpp +++ b/src/kernel/qcolor_x11.cpp @@ -396,9 +396,9 @@ uint TQColor::alloc( int screen ) screen = TQPaintDevice::x11AppScreen(); if ( !color_init ) return dpy ? (uint)BlackPixel(dpy, screen) : 0; - int r = qRed(d.argb); - int g = qGreen(d.argb); - int b = qBlue(d.argb); + int r = tqRed(d.argb); + int g = tqGreen(d.argb); + int b = tqBlue(d.argb); uint pix = 0; TQColorScreenData *sd = screendata[screen]; if ( sd->g_truecolor ) { // truecolor: map to pixel @@ -493,7 +493,7 @@ uint TQColor::alloc( int screen ) int unused, value; hsv(&unused, &unused, &value); if (value < 128) { // dark, use black - d.argb = qRgb(0,0,0); + d.argb = tqRgb(0,0,0); pix = (uint)BlackPixel( dpy, screen ); if ( screen == TQPaintDevice::x11AppScreen() ) { d.d8.invalid = FALSE; @@ -501,7 +501,7 @@ uint TQColor::alloc( int screen ) d.d8.pix = pix; } } else { // light, use white - d.argb = qRgb(0xff,0xff,0xff); + d.argb = tqRgb(0xff,0xff,0xff); pix = (uint)WhitePixel( dpy, screen ); if ( screen == TQPaintDevice::x11AppScreen() ) { d.d8.invalid = FALSE; @@ -547,7 +547,7 @@ uint TQColor::alloc( int screen ) int unused, value; hsv(&unused, &unused, &value); if (value < 128) { // dark, use black - d.argb = qRgb(0,0,0); + d.argb = tqRgb(0,0,0); pix = (uint)BlackPixel( dpy, screen ); if ( screen == TQPaintDevice::x11AppScreen() ) { d.d8.invalid = FALSE; @@ -555,7 +555,7 @@ uint TQColor::alloc( int screen ) d.d8.pix = pix; } } else { // light, use white - d.argb = qRgb(0xff,0xff,0xff); + d.argb = tqRgb(0xff,0xff,0xff); pix = (uint)WhitePixel( dpy, screen ); if ( screen == TQPaintDevice::x11AppScreen() ) { d.d8.invalid = FALSE; @@ -614,7 +614,7 @@ uint TQColor::pixel( int screen ) const if (screen != TQPaintDevice::x11AppScreen() && // don't allocate color0 or color1, they have fixed pixel // values for all screens - d.argb != qRgba(255, 255, 255, 1) && d.argb != qRgba(0, 0, 0, 1)) + d.argb != tqRgba(255, 255, 255, 1) && d.argb != tqRgba(0, 0, 0, 1)) return ((TQColor*)this)->alloc( screen ); return pixel(); } @@ -630,7 +630,7 @@ void TQColor::setSystemNamedColor( const TQString& name ) d.argb = qt_get_rgb_val( name.latin1() ); TQRgb rgb; if ( qt_get_named_rgb( name.latin1(), &rgb ) ) { - setRgb( qRed(rgb), qGreen(rgb), qBlue(rgb) ); + setRgb( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) ); if ( colormodel == d8 ) { d.d8.invalid = FALSE; d.d8.dirty = TRUE; diff --git a/src/kernel/qcursor_x11.cpp b/src/kernel/qcursor_x11.cpp index 56529a077..790ebafc7 100644 --- a/src/kernel/qcursor_x11.cpp +++ b/src/kernel/qcursor_x11.cpp @@ -176,7 +176,7 @@ void TQCursor::initialize() TQCursor::TQCursor() { if ( !initialized ) { - if ( qApp->startingUp() ) { + if ( tqApp->startingUp() ) { data = 0; return; } diff --git a/src/kernel/qdnd_x11.cpp b/src/kernel/qdnd_x11.cpp index 8c64ce107..149c2fe05 100644 --- a/src/kernel/qdnd_x11.cpp +++ b/src/kernel/qdnd_x11.cpp @@ -965,11 +965,11 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e) if ( beingCancelled ) { if ( e->type() == TQEvent::KeyRelease && ((TQKeyEvent*)e)->key() == Key_Escape ) { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); object = 0; dragSource = 0; beingCancelled = FALSE; - qApp->exit_loop(); + tqApp->exit_loop(); return TRUE; // block the key release } return FALSE; @@ -989,7 +989,7 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e) need_modifiers_check = FALSE; return TRUE; } else if ( e->type() == TQEvent::MouseButtonRelease ) { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); if ( willDrop ) drop(); else @@ -997,7 +997,7 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e) object = 0; dragSource = 0; beingCancelled = FALSE; - qApp->exit_loop(); + tqApp->exit_loop(); return TRUE; } else if ( e->type() == TQEvent::DragResponse ) { if ( ((TQDragResponseEvent *)e)->dragAccepted() ) { @@ -1019,11 +1019,11 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e) TQKeyEvent *ke = ((TQKeyEvent*)e); if ( ke->key() == Key_Escape && e->type() == TQEvent::KeyPress ) { cancel(); - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); object = 0; dragSource = 0; beingCancelled = FALSE; - qApp->exit_loop(); + tqApp->exit_loop(); } else { if( updateMode(ke->stateAfter())) { qt_xdnd_source_sameanswer = TQRect(); // force move @@ -1125,7 +1125,7 @@ void TQDragManager::updateCursor() } #ifndef QT_NO_CURSOR if ( c ) - qApp->setOverrideCursor( *c, TRUE ); + tqApp->setOverrideCursor( *c, TRUE ); #endif } @@ -1738,7 +1738,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode ) if ( object ) { cancel(); - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); beingCancelled = FALSE; } @@ -1754,7 +1754,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode ) XEvent event; if ( XCheckTypedEvent( TQPaintDevice::x11AppDisplay(), ClientMessage, &event ) ) - qApp->x11ProcessEvent( &event ); + tqApp->x11ProcessEvent( &event ); now = TQTime::currentTime(); if ( started > now ) // crossed midnight @@ -1780,7 +1780,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode ) dragSource = (TQWidget *)(object->parent()); qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget()); - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); qt_xdnd_source_current_time = qt_x_time; XSetSelectionOwner( TQPaintDevice::x11AppDisplay(), qt_xdnd_selection, dragSource->topLevelWidget()->winId(), @@ -1795,7 +1795,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode ) need_modifiers_check = FALSE; #ifndef QT_NO_CURSOR - qApp->setOverrideCursor( arrowCursor ); + tqApp->setOverrideCursor( arrowCursor ); restoreCursor = TRUE; updateCursor(); #endif @@ -1806,10 +1806,10 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode ) if (!TQWidget::mouseGrabber()) qt_xdnd_deco->grabMouse(); - qApp->enter_loop(); // Do the DND. + tqApp->enter_loop(); // Do the DND. #ifndef QT_NO_CURSOR - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); #endif delete qt_xdnd_deco; diff --git a/src/kernel/qdragobject.cpp b/src/kernel/qdragobject.cpp index e74847cd0..66e1c66cb 100644 --- a/src/kernel/qdragobject.cpp +++ b/src/kernel/qdragobject.cpp @@ -264,7 +264,7 @@ TQDragManager * qt_dnd_manager = 0; TQDragManager::TQDragManager() - : TQObject( qApp, "global drag manager" ) + : TQObject( tqApp, "global drag manager" ) { n_cursor = 3; pm_cursor = new TQPixmap[n_cursor]; @@ -312,7 +312,7 @@ TQDragObject::TQDragObject( TQWidget * dragSource, const char * name ) d = new TQDragObjectData(); d->pm_cursor = 0; #ifndef QT_NO_DRAGANDDROP - if ( !qt_dnd_manager && qApp ) + if ( !qt_dnd_manager && tqApp ) (void)new TQDragManager(); #endif } diff --git a/src/kernel/qevent.cpp b/src/kernel/qevent.cpp index 9c9aace01..198062b8d 100644 --- a/src/kernel/qevent.cpp +++ b/src/kernel/qevent.cpp @@ -2566,6 +2566,6 @@ TQCustomEvent::TQCustomEvent( int type ) TQEvent::~TQEvent() { - if ( posted && qApp ) + if ( posted && tqApp ) TQApplication::removePostedEvent( this ); } diff --git a/src/kernel/qeventloop.cpp b/src/kernel/qeventloop.cpp index f09d3e9a8..c01d8ad5f 100644 --- a/src/kernel/qeventloop.cpp +++ b/src/kernel/qeventloop.cpp @@ -210,7 +210,7 @@ int TQEventLoop::enterLoop() d->quitnow = FALSE; d->exitloop = FALSE; d->shortcut = FALSE; - emit qApp->aboutToQuit(); + emit tqApp->aboutToQuit(); // send deferred deletes TQApplication::sendPostedEvents( 0, TQEvent::DeferredDelete ); diff --git a/src/kernel/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp index ae2183a0e..1e446bace 100644 --- a/src/kernel/qeventloop_x11.cpp +++ b/src/kernel/qeventloop_x11.cpp @@ -192,7 +192,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) } nevents++; - if ( qApp->x11ProcessEvent( &event ) == 1 ) + if ( tqApp->x11ProcessEvent( &event ) == 1 ) return TRUE; } } @@ -301,7 +301,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // we are awake, broadcast it emit awake(); - emit qApp->guiThreadAwake(); + emit tqApp->guiThreadAwake(); if (nsel == -1) { if (errno == EBADF) { diff --git a/src/kernel/qfont.cpp b/src/kernel/qfont.cpp index 4521e89b4..ed2555228 100644 --- a/src/kernel/qfont.cpp +++ b/src/kernel/qfont.cpp @@ -2943,7 +2943,7 @@ static TQSingleCleanupHandler cleanup_fontcache; TQFontCache::TQFontCache() - : TQObject( qApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ), + : TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ), current_timestamp( 0 ), fast( FALSE ), timer_id( -1 ) { Q_ASSERT( instance == 0 ); diff --git a/src/kernel/qfontdatabase.cpp b/src/kernel/qfontdatabase.cpp index 1138dfefe..09846b029 100644 --- a/src/kernel/qfontdatabase.cpp +++ b/src/kernel/qfontdatabase.cpp @@ -2170,7 +2170,7 @@ TQString TQFontDatabase::scriptName(TQFont::Script script) break; } - return qApp ? qApp->translate("TQFont", name) : TQString::fromLatin1(name); + return tqApp ? tqApp->translate("TQFont", name) : TQString::fromLatin1(name); } diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index d904b28c7..bb7e1da93 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -98,10 +98,10 @@ setAlphaBuffer() alpha buffer\endlink. An entry in the color table is an RGB triplet encoded as a \c - uint. Use the \link ::qRed() qRed()\endlink, \link ::qGreen() - qGreen()\endlink and \link ::qBlue() qBlue()\endlink functions (\c - ntqcolor.h) to access the components, and \link ::qRgb() - qRgb\endlink to make an RGB triplet (see the TQColor class + uint. Use the \link ::tqRed() tqRed()\endlink, \link ::tqGreen() + tqGreen()\endlink and \link ::tqBlue() tqBlue()\endlink functions (\c + ntqcolor.h) to access the components, and \link ::tqRgb() + tqRgb\endlink to make an RGB triplet (see the TQColor class documentation). 1-bpp (monochrome) images have a color table with a most two @@ -127,7 +127,7 @@ \code TQImage image; // set entry 19 in the color table to yellow - image.setColor( 19, qRgb(255,255,0) ); + image.setColor( 19, tqRgb(255,255,0) ); // set 8 bit pixel at (x,y) to value yellow (in color table) *(image.scanLine(y) + x) = 19; \endcode @@ -140,7 +140,7 @@ TQImage image; // sets 32 bit pixel at (x,y) to yellow. uint *p = (uint *)image.scanLine(y) + x; - *p = qRgb(255,255,0); + *p = tqRgb(255,255,0); \endcode On TQt/Embedded, scanlines are aligned to the pixel depth and may @@ -888,9 +888,9 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const Returns the color in the color table at index \a i. The first color is at index 0. - A color value is an RGB triplet. Use the \link ::qRed() - qRed()\endlink, \link ::qGreen() qGreen()\endlink and \link - ::qBlue() qBlue()\endlink functions (defined in \c ntqcolor.h) to + A color value is an RGB triplet. Use the \link ::tqRed() + tqRed()\endlink, \link ::tqGreen() tqGreen()\endlink and \link + ::tqBlue() tqBlue()\endlink functions (defined in \c ntqcolor.h) to get the color value components. \sa setColor() numColors() TQColor @@ -901,8 +901,8 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const Sets a color in the color table at index \a i to \a c. - A color value is an RGB triplet. Use the \link ::qRgb() - qRgb()\endlink function (defined in \c ntqcolor.h) to make RGB + A color value is an RGB triplet. Use the \link ::tqRgb() + tqRgb()\endlink function (defined in \c ntqcolor.h) to make RGB triplets. \sa color() setNumColors() numColors() @@ -920,9 +920,9 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const pointer to \c{TQRgb*} (TQRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the \c{uchar*} pointer directly, because the pixel format depends on the byte order on - the underlying platform. Hint: use \link ::qRed() qRed()\endlink, - \link ::qGreen() qGreen()\endlink and \link ::qBlue() - qBlue()\endlink, etc. (ntqcolor.h) to access the pixels. + the underlying platform. Hint: use \link ::tqRed() tqRed()\endlink, + \link ::tqGreen() tqGreen()\endlink and \link ::tqBlue() + tqBlue()\endlink, etc. (ntqcolor.h) to access the pixels. \warning If you are accessing 16-bpp image data, you must handle endianness yourself. (TQt/Embedded only) @@ -1522,7 +1522,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl for ( bc=0; bc<=MAX_B; bc++ ) { dst->setColor( INDEXOF(rc,gc,bc), (amask&0xff000000) - | qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); + | tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); } int sw = src->width(); @@ -1551,9 +1551,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl if ( ( conversion_flags & TQt::Dither_Mask ) == TQt::ThresholdDither ) { #define DITHER(p,m) ((uchar) ((p * (m) + 127) / 255)) while ( p < end ) { - rc = qRed( *p ); - gc = qGreen( *p ); - bc = qBlue( *p ); + rc = tqRed( *p ); + gc = tqGreen( *p ); + bc = tqBlue( *p ); *b++ = INDEXOF( @@ -1572,9 +1572,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl while ( p < end ) { uint d = bm[y&15][x&15]; - rc = qRed( *p ); - gc = qGreen( *p ); - bc = qBlue( *p ); + rc = tqRed( *p ); + gc = tqGreen( *p ); + bc = tqBlue( *p ); *b++ = INDEXOF( @@ -1805,8 +1805,8 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, dithermode = Diffuse; } - dst->setColor( 0, qRgb(255, 255, 255) ); - dst->setColor( 1, qRgb( 0, 0, 0) ); + dst->setColor( 0, tqRgb(255, 255, 255) ); + dst->setColor( 1, tqRgb( 0, 0, 0) ); int w = src->width(); int h = src->height(); int d = src->depth(); @@ -1822,7 +1822,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, // Pixel 0x00 -> 1 pixels (black) // Pixel 0xFF -> 0 pixels (white) for ( int i=0; inumColors(); i++ ) - gray[i] = qGray( src->color(i) & 0x00ffffff ); + gray[i] = tqGray( src->color(i) & 0x00ffffff ); } } @@ -1852,7 +1852,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, } } else { while ( p < end ) { - *b2++ = qGray(*(uint*)p); + *b2++ = tqGray(*(uint*)p); p += 4; } } @@ -1878,7 +1878,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, } } else { while ( p < end ) { - *b2++ = qGray(*(uint*)p); + *b2++ = tqGray(*(uint*)p); p += 4; } } @@ -1970,7 +1970,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, } } else { while ( p < end ) { - if ( (uint)qGray(*p++) < bm[j++&15][i&15] ) + if ( (uint)tqGray(*p++) < bm[j++&15][i&15] ) *m |= 1 << bit; if ( bit == 0 ) { m++; @@ -2028,7 +2028,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst, } } else { while ( p < end ) { - if ( qGray(*p++) < 128 ) + if ( tqGray(*p++) < 128 ) *m |= 1 << bit; // Set pixel "black" if ( bit == 0 ) { m++; @@ -2241,7 +2241,7 @@ int TQImage::pixelIndex( int x, int y ) const If (\a x, \a y) is not \link valid() on the image\endlink, the results are undefined. - \sa setPixel() qRed() qGreen() qBlue() valid() + \sa setPixel() tqRed() tqGreen() tqBlue() valid() */ TQRgb TQImage::pixel( int x, int y ) const @@ -2285,7 +2285,7 @@ TQRgb TQImage::pixel( int x, int y ) const If the image is a paletted image (depth() \<= 8) and \a index_or_rgb \>= numColors(), the result is undefined. - \sa pixelIndex() pixel() qRgb() qRgba() valid() + \sa pixelIndex() pixel() tqRgb() tqRgba() valid() */ void TQImage::setPixel( int x, int y, uint index_or_rgb ) @@ -2377,8 +2377,8 @@ TQImage TQImage::convertBitOrder( Endian bitOrder ) const static bool isGray(TQRgb c) { - return qRed(c) == qGreen(c) - && qRed(c) == qBlue(c); + return tqRed(c) == tqGreen(c) + && tqRed(c) == tqBlue(c); } /*! @@ -2440,7 +2440,7 @@ bool TQImage::isGrayscale() const #endif //QT_NO_IMAGE_TRUECOLOR case 8: { for (int i=0; ictbl[i] != qRgb(i,i,i)) + if (data->ctbl[i] != tqRgb(i,i,i)) return FALSE; return TRUE; } @@ -2532,14 +2532,14 @@ void pnmscale(const TQImage& src, TQImage& dst) xelrow = (TQRgb*)src.scanLine(rowsread++); for ( col = 0, xP = xelrow; col < cols; ++col, ++xP ) { if (as) { - as[col] += fracrowleft * qAlpha( *xP ); - rs[col] += fracrowleft * qRed( *xP ) * qAlpha( *xP ) / 255; - gs[col] += fracrowleft * qGreen( *xP ) * qAlpha( *xP ) / 255; - bs[col] += fracrowleft * qBlue( *xP ) * qAlpha( *xP ) / 255; + as[col] += fracrowleft * tqAlpha( *xP ); + rs[col] += fracrowleft * tqRed( *xP ) * tqAlpha( *xP ) / 255; + gs[col] += fracrowleft * tqGreen( *xP ) * tqAlpha( *xP ) / 255; + bs[col] += fracrowleft * tqBlue( *xP ) * tqAlpha( *xP ) / 255; } else { - rs[col] += fracrowleft * qRed( *xP ); - gs[col] += fracrowleft * qGreen( *xP ); - bs[col] += fracrowleft * qBlue( *xP ); + rs[col] += fracrowleft * tqRed( *xP ); + gs[col] += fracrowleft * tqGreen( *xP ); + bs[col] += fracrowleft * tqBlue( *xP ); } } fracrowtofill -= fracrowleft; @@ -2558,19 +2558,19 @@ void pnmscale(const TQImage& src, TQImage& dst) register long r, g, b; if ( as ) { - r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g = gs[col] + fracrowtofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b = bs[col] + fracrowtofill * qBlue( *xP ) * qAlpha( *xP ) / 255; - a = as[col] + fracrowtofill * qAlpha( *xP ); + r = rs[col] + fracrowtofill * tqRed( *xP ) * tqAlpha( *xP ) / 255; + g = gs[col] + fracrowtofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255; + b = bs[col] + fracrowtofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255; + a = as[col] + fracrowtofill * tqAlpha( *xP ); if ( a ) { r = r * 255 / a * SCALE; g = g * 255 / a * SCALE; b = b * 255 / a * SCALE; } } else { - r = rs[col] + fracrowtofill * qRed( *xP ); - g = gs[col] + fracrowtofill * qGreen( *xP ); - b = bs[col] + fracrowtofill * qBlue( *xP ); + r = rs[col] + fracrowtofill * tqRed( *xP ); + g = gs[col] + fracrowtofill * tqGreen( *xP ); + b = bs[col] + fracrowtofill * tqBlue( *xP ); } r /= SCALE; if ( r > maxval ) r = maxval; @@ -2581,10 +2581,10 @@ void pnmscale(const TQImage& src, TQImage& dst) if ( as ) { a /= SCALE; if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); + *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a ); as[col] = HALFSCALE; } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); + *nxP = tqRgb( (int)r, (int)g, (int)b ); } rs[col] = gs[col] = bs[col] = HALFSCALE; } @@ -2617,19 +2617,19 @@ void pnmscale(const TQImage& src, TQImage& dst) a = r = g = b = HALFSCALE; } if ( as ) { - r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; - a += fraccoltofill * qAlpha( *xP ); + r += fraccoltofill * tqRed( *xP ) * tqAlpha( *xP ) / 255; + g += fraccoltofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255; + b += fraccoltofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255; + a += fraccoltofill * tqAlpha( *xP ); if ( a ) { r = r * 255 / a * SCALE; g = g * 255 / a * SCALE; b = b * 255 / a * SCALE; } } else { - r += fraccoltofill * qRed( *xP ); - g += fraccoltofill * qGreen( *xP ); - b += fraccoltofill * qBlue( *xP ); + r += fraccoltofill * tqRed( *xP ); + g += fraccoltofill * tqGreen( *xP ); + b += fraccoltofill * tqBlue( *xP ); } r /= SCALE; if ( r > maxval ) r = maxval; @@ -2640,9 +2640,9 @@ void pnmscale(const TQImage& src, TQImage& dst) if (as) { a /= SCALE; if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); + *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a ); } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); + *nxP = tqRgb( (int)r, (int)g, (int)b ); } fraccolleft -= fraccoltofill; fraccoltofill = SCALE; @@ -2655,14 +2655,14 @@ void pnmscale(const TQImage& src, TQImage& dst) needcol = 0; } if (as) { - a += fraccolleft * qAlpha( *xP ); - r += fraccolleft * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccolleft * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccolleft * qBlue( *xP ) * qAlpha( *xP ) / 255; + a += fraccolleft * tqAlpha( *xP ); + r += fraccolleft * tqRed( *xP ) * tqAlpha( *xP ) / 255; + g += fraccolleft * tqGreen( *xP ) * tqAlpha( *xP ) / 255; + b += fraccolleft * tqBlue( *xP ) * tqAlpha( *xP ) / 255; } else { - r += fraccolleft * qRed( *xP ); - g += fraccolleft * qGreen( *xP ); - b += fraccolleft * qBlue( *xP ); + r += fraccolleft * tqRed( *xP ); + g += fraccolleft * tqGreen( *xP ); + b += fraccolleft * tqBlue( *xP ); } fraccoltofill -= fraccolleft; } @@ -2670,19 +2670,19 @@ void pnmscale(const TQImage& src, TQImage& dst) if ( fraccoltofill > 0 ) { --xP; if (as) { - a += fraccolleft * qAlpha( *xP ); - r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; + a += fraccolleft * tqAlpha( *xP ); + r += fraccoltofill * tqRed( *xP ) * tqAlpha( *xP ) / 255; + g += fraccoltofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255; + b += fraccoltofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255; if ( a ) { r = r * 255 / a * SCALE; g = g * 255 / a * SCALE; b = b * 255 / a * SCALE; } } else { - r += fraccoltofill * qRed( *xP ); - g += fraccoltofill * qGreen( *xP ); - b += fraccoltofill * qBlue( *xP ); + r += fraccoltofill * tqRed( *xP ); + g += fraccoltofill * tqGreen( *xP ); + b += fraccoltofill * tqBlue( *xP ); } } if ( ! needcol ) { @@ -2695,9 +2695,9 @@ void pnmscale(const TQImage& src, TQImage& dst) if (as) { a /= SCALE; if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); + *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a ); } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); + *nxP = tqRgb( (int)r, (int)g, (int)b ); } } } @@ -4704,7 +4704,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) for ( int i=0; ireadBlock( (char *)rgb, rgb_len ) != rgb_len ) return FALSE; - image.setColor( i, qRgb(rgb[2],rgb[1],rgb[0]) ); + image.setColor( i, tqRgb(rgb[2],rgb[1],rgb[0]) ); if ( d->atEnd() ) // truncated file return FALSE; } @@ -4758,7 +4758,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) d->at(d->at()+pad); #endif } - if ( ncols == 2 && qGray(image.color(0)) < qGray(image.color(1)) ) + if ( ncols == 2 && tqGray(image.color(0)) < tqGray(image.color(1)) ) swapPixel01( &image ); // pixel 0 is white! } @@ -4929,7 +4929,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) c = *(uchar*)b | (*(uchar*)(b+1)<<8); if (nbits != 16) c |= *(uchar*)(b+2)<<16; - *p++ = qRgb(((c & red_mask) >> red_shift) * red_scale, + *p++ = tqRgb(((c & red_mask) >> red_shift) * red_scale, ((c & green_mask) >> green_shift) * green_scale, ((c & blue_mask) >> blue_shift) * blue_scale); b += nbits/8; @@ -5012,9 +5012,9 @@ bool qt_write_dib( TQDataStream& s, TQImage image ) uchar *rgb = color_table; TQRgb *c = image.colorTable(); for ( int i=0; iwriteBlock( (char *)color_table, 4*image.numColors() ); @@ -5062,9 +5062,9 @@ bool qt_write_dib( TQDataStream& s, TQImage image ) TQRgb *end = p + image.width(); b = buf; while ( p < end ) { - *b++ = qBlue(*p); - *b++ = qGreen(*p); - *b++ = qRed(*p); + *b++ = tqBlue(*p); + *b++ = tqGreen(*p); + *b++ = tqRed(*p); p++; } } @@ -5216,7 +5216,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data end = p + w; b = buf24; while ( p < end ) { - *p++ = qRgb(b[0],b[1],b[2]); + *p++ = tqRgb(b[0],b[1],b[2]); b += 3; } } @@ -5260,7 +5260,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data r = read_pbm_int( d ); g = read_pbm_int( d ); b = read_pbm_int( d ); - *((TQRgb*)p) = qRgb( r, g, b ); + *((TQRgb*)p) = tqRgb( r, g, b ); p += 4; } } else { @@ -5268,7 +5268,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data r = read_pbm_int( d ) * maxc / mcc; g = read_pbm_int( d ) * maxc / mcc; b = read_pbm_int( d ) * maxc / mcc; - *((TQRgb*)p) = qRgb( r, g, b ); + *((TQRgb*)p) = tqRgb( r, g, b ); p += 4; } } @@ -5278,12 +5278,12 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data if ( nbits == 1 ) { // bitmap image.setNumColors( 2 ); - image.setColor( 0, qRgb(255,255,255) ); // white - image.setColor( 1, qRgb(0,0,0) ); // black + image.setColor( 0, tqRgb(255,255,255) ); // white + image.setColor( 1, tqRgb(0,0,0) ); // black } else if ( nbits == 8 ) { // graymap image.setNumColors( maxc+1 ); for ( int i=0; i<=maxc; i++ ) - image.setColor( i, qRgb(i*255/maxc,i*255/maxc,i*255/maxc) ); + image.setColor( i, tqRgb(i*255/maxc,i*255/maxc,i*255/maxc) ); } iio->setImage( image ); @@ -5308,7 +5308,7 @@ static void write_pbm_image( TQImageIO *iio ) } if ( image.depth() == 1 && image.numColors() == 2 ) { - if ( qGray(image.color(0)) < qGray(image.color(1)) ) { + if ( tqGray(image.color(0)) < tqGray(image.color(1)) ) { // 0=dark/black, 1=light/white - invert image.detach(); for ( int y=0; ywriteBlock((char*)buf, bpl) ) { @@ -5394,15 +5394,15 @@ static void write_pbm_image( TQImageIO *iio ) uchar *end = buf+bpl; if ( gray ) { while ( p < end ) { - uchar g = (uchar)qGray(*b++); + uchar g = (uchar)tqGray(*b++); *p++ = g; } } else { while ( p < end ) { TQRgb rgb = *b++; - *p++ = qRed(rgb); - *p++ = qGreen(rgb); - *p++ = qBlue(rgb); + *p++ = tqRed(rgb); + *p++ = tqGreen(rgb); + *p++ = tqBlue(rgb); } } if ( bpl != (uint)out->writeBlock((char*)buf, bpl) ) { @@ -5544,8 +5544,8 @@ static void read_xbm_image( TQImageIO *iio ) if ( image.isNull() ) return; - image.setColor( 0, qRgb(255,255,255) ); // white - image.setColor( 1, qRgb(0,0,0) ); // black + image.setColor( 0, tqRgb(255,255,255) ); // white + image.setColor( 1, tqRgb(0,0,0) ); // black int x = 0, y = 0; uchar *b = image.scanLine(0); @@ -5597,7 +5597,7 @@ static void write_xbm_image( TQImageIO *iio ) if ( image.bitOrder() != TQImage::LittleEndian ) image = image.convertBitOrder( TQImage::LittleEndian ); - bool invert = qGray(image.color(0)) < qGray(image.color(1)); + bool invert = tqGray(image.color(0)) < tqGray(image.color(1)); char hexrep[16]; for ( i=0; i<10; i++ ) hexrep[i] = '0' + i; @@ -5784,10 +5784,10 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc int transparentColor = currentColor; if ( image.depth() == 8 ) { image.setColor( transparentColor, - RGB_MASK & qRgb(198,198,198) ); + TQT_RGB_MASK & tqRgb(198,198,198) ); colorMap.insert( index, transparentColor ); } else { - TQRgb rgb = RGB_MASK & qRgb(198,198,198); + TQRgb rgb = TQT_RGB_MASK & tqRgb(198,198,198); colorMap.insert( index, rgb ); } } else { @@ -5947,15 +5947,15 @@ static void write_xpm_image( TQImageIO * iio ) TQMap::Iterator c = colorMap.begin(); while ( c != colorMap.end() ) { TQRgb color = c.key(); - if ( image.hasAlphaBuffer() && color == (color & RGB_MASK) ) + if ( image.hasAlphaBuffer() && color == (color & TQT_RGB_MASK) ) line.sprintf( "\"%s c None\"", xpm_color_name(cpp, *c) ); else line.sprintf( "\"%s c #%02x%02x%02x\"", xpm_color_name(cpp, *c), - qRed(color), - qGreen(color), - qBlue(color) ); + tqRed(color), + tqGreen(color), + tqBlue(color) ); ++c; s << "," << endl << line; } @@ -6182,17 +6182,17 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src, const int ds = src->width() - sw; while ( sh-- ) { for ( int t=sw; t--; ) { - unsigned char a = qAlpha(*s); + unsigned char a = tqAlpha(*s); if ( a == 255 ) *d++ = *s++; else if ( a == 0 ) ++d,++s; // nothing else { - unsigned char r = ((qRed(*s)-qRed(*d)) * a) / 256 + qRed(*d); - unsigned char g = ((qGreen(*s)-qGreen(*d)) * a) / 256 + qGreen(*d); - unsigned char b = ((qBlue(*s)-qBlue(*d)) * a) / 256 + qBlue(*d); - a = TQMAX(qAlpha(*d),a); // alternatives... - *d++ = qRgba(r,g,b,a); + unsigned char r = ((tqRed(*s)-tqRed(*d)) * a) / 256 + tqRed(*d); + unsigned char g = ((tqGreen(*s)-tqGreen(*d)) * a) / 256 + tqGreen(*d); + unsigned char b = ((tqBlue(*s)-tqBlue(*d)) * a) / 256 + tqBlue(*d); + a = TQMAX(tqAlpha(*d),a); // alternatives... + *d++ = tqRgba(r,g,b,a); ++s; } } @@ -6485,7 +6485,7 @@ TQGfx * TQImage::graphicsContext() TQRgb * tmp=colorTable(); int nc=numColors(); if(tmp==0) { - static TQRgb table[2] = { qRgb(255,255,255), qRgb(0,0,0) }; + static TQRgb table[2] = { tqRgb(255,255,255), tqRgb(0,0,0) }; tmp=table; nc=2; } diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp index 41fbc2bc4..e7b33f8ca 100644 --- a/src/kernel/qjpegio.cpp +++ b/src/kernel/qjpegio.cpp @@ -263,7 +263,7 @@ void read_jpeg_image(TQImageIO* iio) } else if ( cinfo.output_components == 1 ) { created = image.create( sWidth, sHeight, 8, 256 ); for (int i=0; i<256; i++) - image.setColor(i, qRgb(i,i,i)); + image.setColor(i, tqRgb(i,i,i)); } else { // Unsupported format } @@ -288,7 +288,7 @@ void read_jpeg_image(TQImageIO* iio) // the weight of it when added to the output buffer. At present it is a non-smooth scale which is // inefficently implemented, it still uncompresses all the jpeg, an optimization for progressive // jpegs could be made if scaling by say 50% or some other special cases - out[sWidth * i / cinfo.output_width] = qRgb( in[0], in[1], in[2] ); + out[sWidth * i / cinfo.output_width] = tqRgb( in[0], in[1], in[2] ); in += 3; } } else { @@ -312,7 +312,7 @@ void read_jpeg_image(TQImageIO* iio) } else if ( cinfo.output_components == 1 ) { created = image.create( cinfo.output_width, cinfo.output_height, 8, 256 ); for (int i=0; i<256; i++) - image.setColor(i, qRgb(i,i,i)); + image.setColor(i, tqRgb(i,i,i)); } else { // Unsupported format } @@ -335,7 +335,7 @@ void read_jpeg_image(TQImageIO* iio) for (uint i=cinfo.output_width; i--; ) { in-=3; - out[i] = qRgb(in[0], in[1], in[2]); + out[i] = tqRgb(in[0], in[1], in[2]); } } } @@ -475,8 +475,8 @@ void write_jpeg_image(TQImageIO* iio) gray = TRUE; int i; for (i=image.numColors(); gray && i--; ) { - gray = gray & ( qRed(cmap[i]) == qGreen(cmap[i]) && - qRed(cmap[i]) == qBlue(cmap[i]) ); + gray = gray & ( tqRed(cmap[i]) == tqGreen(cmap[i]) && + tqRed(cmap[i]) == tqBlue(cmap[i]) ); } cinfo.input_components = gray ? 1 : 3; cinfo.in_color_space = gray ? JCS_GRAYSCALE : JCS_RGB; @@ -522,12 +522,12 @@ void write_jpeg_image(TQImageIO* iio) if ( image.bitOrder() == TQImage::LittleEndian ) { for (int i=0; i> 3)) & (1 << (i & 7))); - row[i] = qRed(cmap[bit]); + row[i] = tqRed(cmap[bit]); } } else { for (int i=0; i> 3)) & (1 << (7 -(i & 7)))); - row[i] = qRed(cmap[bit]); + row[i] = tqRed(cmap[bit]); } } } else { @@ -535,16 +535,16 @@ void write_jpeg_image(TQImageIO* iio) if ( image.bitOrder() == TQImage::LittleEndian ) { for (int i=0; i> 3)) & (1 << (i & 7))); - *row++ = qRed(cmap[bit]); - *row++ = qGreen(cmap[bit]); - *row++ = qBlue(cmap[bit]); + *row++ = tqRed(cmap[bit]); + *row++ = tqGreen(cmap[bit]); + *row++ = tqBlue(cmap[bit]); } } else { for (int i=0; i> 3)) & (1 << (7 -(i & 7)))); - *row++ = qRed(cmap[bit]); - *row++ = qGreen(cmap[bit]); - *row++ = qBlue(cmap[bit]); + *row++ = tqRed(cmap[bit]); + *row++ = tqGreen(cmap[bit]); + *row++ = tqBlue(cmap[bit]); } } } @@ -553,15 +553,15 @@ void write_jpeg_image(TQImageIO* iio) if (gray) { uchar* pix = image.scanLine(cinfo.next_scanline); for (int i=0; iprocessEvents(); + tqApp->processEvents(); } if (!that) return; @@ -365,7 +365,7 @@ void TQLocalFs::operationPut( TQNetworkOperation *op ) emit dataTransferProgress( i + blockSize, ba.size(), op ); i += blockSize; TQGuardedPtr that = this; - qApp->processEvents(); + tqApp->processEvents(); if (!that) return; } diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index abe951b1c..d79d655ef 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -2493,7 +2493,7 @@ static void dumpRecursive( int level, TQObject *object ) buf += " "; const char *name = object->name(); TQString flags=""; - if ( qApp->focusWidget() == object ) + if ( tqApp->focusWidget() == object ) flags += 'F'; if ( object->isWidgetType() ) { TQWidget * w = (TQWidget *)object; diff --git a/src/kernel/qpaintdevice_x11.cpp b/src/kernel/qpaintdevice_x11.cpp index e3a2617e6..1036664e8 100644 --- a/src/kernel/qpaintdevice_x11.cpp +++ b/src/kernel/qpaintdevice_x11.cpp @@ -131,7 +131,7 @@ bool *TQPaintDevice::x_appdefvisual_arr; TQPaintDevice::TQPaintDevice( uint devflags ) { - if ( !qApp ) { // global constructor + if ( !tqApp ) { // global constructor #if defined(QT_CHECK_STATE) qFatal( "TQPaintDevice: Must construct a TQApplication before a " "TQPaintDevice" ); diff --git a/src/kernel/qpainter.cpp b/src/kernel/qpainter.cpp index 64a11c0bb..d21be3703 100644 --- a/src/kernel/qpainter.cpp +++ b/src/kernel/qpainter.cpp @@ -2434,8 +2434,8 @@ void TQPainter::drawImage( int x, int y, const TQImage & image, // This is a bit dubious if(image2.depth()==1) { image2.setNumColors( 2 ); - image2.setColor( 0, qRgb(255,255,255) ); - image2.setColor( 1, qRgb(0,0,0) ); + image2.setColor( 0, tqRgb(255,255,255) ); + image2.setColor( 1, tqRgb(0,0,0) ); } if ( image2.hasAlphaBuffer() ) gfx->setAlphaType(TQGfx::InlineAlpha); diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp index f88f03801..badbe9e23 100644 --- a/src/kernel/qpainter_x11.cpp +++ b/src/kernel/qpainter_x11.cpp @@ -1841,7 +1841,7 @@ void TQPainter::drawWinFocusRect( int x, int y, int w, int h, setPen( white ); setRasterOp( XorROP ); } else { - if ( qGray( bgColor.rgb() ) < 128 ) + if ( tqGray( bgColor.rgb() ) < 128 ) setPen( white ); else setPen( black ); diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index 2322214cc..cc8da0d3c 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -393,7 +393,7 @@ extern "C" XftDraw *XftDrawCreateAlpha( Display *, TQt::HANDLE, int ); void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim ) { #if defined(QT_CHECK_STATE) - if ( qApp->type() == TQApplication::Tty ) { + if ( tqApp->type() == TQApplication::Tty ) { qWarning( "TQPixmap: Cannot create a TQPixmap when no GUI " "is being used" ); } @@ -474,7 +474,7 @@ void TQPixmap::deref() qSafeXDestroyImage( (XImage*)data->ximage ); if ( data->maskgc ) XFreeGC( x11Display(), (GC)data->maskgc ); - if ( qApp && hd) { + if ( tqApp && hd) { #ifndef QT_NO_XFTFREETYPE if (rendhd) { @@ -914,17 +914,17 @@ TQImage TQPixmap::convertToImage() const b = blue_scale_table[b]; if (alf) { - *dst++ = qRgba(r, g, b, asrc[x]); + *dst++ = tqRgba(r, g, b, asrc[x]); } else if (msk) { if ( ale ) { *dst++ = (asrc[x >> 3] & (1 << (x & 7))) - ? qRgba(r, g, b, 0xff) : qRgba(r, g, b, 0x00); + ? tqRgba(r, g, b, 0xff) : tqRgba(r, g, b, 0x00); } else { *dst++ = (asrc[x >> 3] & (1 << (7 -(x & 7)))) - ? qRgba(r, g, b, 0xff) : qRgba(r, g, b, 0x00); + ? tqRgba(r, g, b, 0xff) : tqRgba(r, g, b, 0x00); } } else { - *dst++ = qRgb(r, g, b); + *dst++ = tqRgb(r, g, b); } } } @@ -953,8 +953,8 @@ TQImage TQPixmap::convertToImage() const if ( mono ) { // bitmap image.setNumColors( 2 ); - image.setColor( 0, qRgb(255,255,255) ); - image.setColor( 1, qRgb(0,0,0) ); + image.setColor( 0, tqRgb(255,255,255) ); + image.setColor( 1, tqRgb(0,0,0) ); } else if ( !trucol ) { // pixmap with colormap register uchar *p; uchar *end; @@ -1044,7 +1044,7 @@ TQImage TQPixmap::convertToImage() const if ( use[i] ) { image.setColor( j++, ( msk ? 0xff000000 : 0 ) - | qRgb( (carr[i].red >> 8) & 255, + | tqRgb( (carr[i].red >> 8) & 255, (carr[i].green >> 8) & 255, (carr[i].blue >> 8) & 255 ) ); } @@ -1142,7 +1142,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) if ( image.numColors() == 2 ) { TQRgb c0 = image.color(0); // Auto: convert to best TQRgb c1 = image.color(1); - conv8 = TQMIN(c0,c1) != qRgb(0,0,0) || TQMAX(c0,c1) != qRgb(255,255,255); + conv8 = TQMIN(c0,c1) != tqRgb(0,0,0) || TQMAX(c0,c1) != tqRgb(255,255,255); } else { // eg. 1-color monochrome images (they do exist). conv8 = TRUE; @@ -1263,9 +1263,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) if ( d8 ) { // setup pixel translation TQRgb *ctable = image.colorTable(); for ( int i=0; i 0 ? r << red_shift : r >> -red_shift; g = green_shift > 0 ? g << green_shift : g >> -green_shift; b = blue_shift > 0 ? b << blue_shift : b >> -blue_shift; @@ -1381,9 +1381,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) int pixel; \ if ( d8 ) pixel = pix[*src++]; \ else { \ - int r = qRed ( *p ); \ - int g = qGreen( *p ); \ - int b = qBlue ( *p++ ); \ + int r = tqRed ( *p ); \ + int g = tqGreen( *p ); \ + int b = tqBlue ( *p++ ); \ r = red_shift > 0 \ ? r << red_shift : r >> -red_shift; \ g = green_shift > 0 \ @@ -1396,7 +1396,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) // optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice, // use direct values instead of variables, and use only one statement -// (*p >> 16), (*p >> 8 ) and (*p) are qRed(),qGreen() and qBlue() without masking +// (*p >> 16), (*p >> 8 ) and (*p) are tqRed(),tqGreen() and tqBlue() without masking // shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction #define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \ int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \ @@ -1405,9 +1405,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) ++p; #define GET_PIXEL_DITHER_TC \ - int r = qRed ( *p ); \ - int g = qGreen( *p ); \ - int b = qBlue ( *p++ ); \ + int r = tqRed ( *p ); \ + int g = tqGreen( *p ); \ + int b = tqBlue ( *p++ ); \ const int thres = D[x%16][y%16]; \ if ( r <= (255-(1<<(8-rbits))) && ((r< thres) \ @@ -1431,15 +1431,15 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) #define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \ rbits,gbits,bbits) \ const int thres = D[x%16][y%16]; \ - int r = qRed ( *p ); \ + int r = tqRed ( *p ); \ if ( r <= (255-(1<<(8-rbits))) && ((r< thres) \ r += (1<<(8-rbits)); \ - int g = qGreen( *p ); \ + int g = tqGreen( *p ); \ if ( g <= (255-(1<<(8-gbits))) && ((g< thres) \ g += (1<<(8-gbits)); \ - int b = qBlue ( *p++ ); \ + int b = tqBlue ( *p++ ); \ if ( b <= (255-(1<<(8-bbits))) && ((b< thres) \ b += (1<<(8-bbits)); \ @@ -1655,9 +1655,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) TQRgb* ctable = image.colorTable(); for ( i=0; i<256; i++ ) { // init pixel array if ( pop[i] > 0 ) { - px->r = qRed ( ctable[i] ); - px->g = qGreen( ctable[i] ); - px->b = qBlue ( ctable[i] ); + px->r = tqRed ( ctable[i] ); + px->g = tqGreen( ctable[i] ); + px->b = tqBlue ( ctable[i] ); px->n = 0; px->use = pop[i]; if ( pop[i] > maxpop ) { // select most popular entry @@ -1830,7 +1830,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) if (image.depth() == 8) { const TQRgb * const rgb = image.colorTable(); for (int i = 0, count = image.numColors(); i < count; ++i) { - const int alpha = qAlpha(rgb[i]); + const int alpha = tqAlpha(rgb[i]); if (alpha != 0 && alpha != 0xff) { alphamap = TRUE; break; @@ -1890,7 +1890,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) for (uint y = 0; y < h; ++y) { const uchar *iptr = image.scanLine(y); for (uint x = 0; x < w; ++x) - *aptr++ = qAlpha(rgb[*iptr++]); + *aptr++ = tqAlpha(rgb[*iptr++]); aptr += ( axi->bytes_per_line - w ); } } diff --git a/src/kernel/qpngio.cpp b/src/kernel/qpngio.cpp index c4a5c9979..2d12ec985 100644 --- a/src/kernel/qpngio.cpp +++ b/src/kernel/qpngio.cpp @@ -156,8 +156,8 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc png_read_update_info( png_ptr, info_ptr ); if (!image.create( width, height, 1, 2, TQImage::BigEndian )) return; - image.setColor( 1, qRgb(0,0,0) ); - image.setColor( 0, qRgb(255,255,255) ); + image.setColor( 1, tqRgb(0,0,0) ); + image.setColor( 0, tqRgb(255,255,255) ); } else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { png_set_expand(png_ptr); png_set_strip_16(png_ptr); @@ -182,7 +182,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc return; for (int i=0; i1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) @@ -194,7 +194,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc #endif if (g < ncols) { image.setAlphaBuffer(TRUE); - image.setColor(g, image.color(g) & RGB_MASK); + image.setColor(g, image.color(g) & TQT_RGB_MASK); } } } @@ -225,13 +225,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) while ( i < info_ptr_num_trans ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr_palette[i].red, info_ptr_palette[i].green, info_ptr_palette[i].blue, #else /* LIBPNG 1.5 */ while ( i < info_ptr->num_trans ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, @@ -250,13 +250,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc } #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) while ( i < info_ptr_num_palette ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr_palette[i].red, info_ptr_palette[i].green, info_ptr_palette[i].blue, #else /* LIBPNG 1.5 */ while ( i < info_ptr->num_palette ) { - image.setColor(i, qRgba( + image.setColor(i, tqRgba( info_ptr->palette[i].red, info_ptr->palette[i].green, info_ptr->palette[i].blue, @@ -387,7 +387,7 @@ void read_png_image(TQImageIO* iio) #if 0 // libpng takes care of this. png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { - TQRgb trans = 0xFF000000 | qRgb( + TQRgb trans = 0xFF000000 | tqRgb( #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 ) (info_ptr->trans_color.red << 8 >> bit_depth)&0xff, (info_ptr->trans_color.green << 8 >> bit_depth)&0xff, @@ -435,7 +435,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) c = image.colorTable(); n = image.numColors(); } - while ( n-- && qAlpha(*c++)==0xff ) + while ( n-- && tqAlpha(*c++)==0xff ) ; if ( n<0 ) // LIAR! image.setAlphaBuffer(FALSE); @@ -622,13 +622,13 @@ should be able to comment this out. for (int i=0; i1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) - info_ptr_palette[i].red = qRed(rgb); - info_ptr_palette[i].green = qGreen(rgb); - info_ptr_palette[i].blue = qBlue(rgb); + info_ptr_palette[i].red = tqRed(rgb); + info_ptr_palette[i].green = tqGreen(rgb); + info_ptr_palette[i].blue = tqBlue(rgb); #else /* LIBPNG 1.5 */ - info_ptr->palette[i].red = qRed(rgb); - info_ptr->palette[i].green = qGreen(rgb); - info_ptr->palette[i].blue = qBlue(rgb); + info_ptr->palette[i].red = tqRed(rgb); + info_ptr->palette[i].green = tqGreen(rgb); + info_ptr->palette[i].blue = tqBlue(rgb); #endif /* LIBPNG 1.5 */ if (image.hasAlphaBuffer()) { trans[i] = rgb >> 24; @@ -907,7 +907,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img) if ( i == alignx ) { // All the same for (i=0; icolorMode() == TQPrinter::GrayScale ) sprintf( returnbuffer, "%d d2 ", - qGray( c.red(), c.green(),c.blue() ) ); + tqGray( c.red(), c.green(),c.blue() ) ); else sprintf( returnbuffer, "%d %d %d ", c.red(), c.green(), c.blue() ); diff --git a/src/kernel/qrichtext_p.cpp b/src/kernel/qrichtext_p.cpp index 5e749df91..f426fcead 100644 --- a/src/kernel/qrichtext_p.cpp +++ b/src/kernel/qrichtext_p.cpp @@ -198,13 +198,13 @@ TQTextFormat::~TQTextFormat() } TQTextFormat::TQTextFormat() - : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( qApp->font().pointSize() ) + : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() ) { ref = 0; usePixelSizes = FALSE; if ( stdSize == -1 ) { - stdSize = qApp->font().pixelSize(); + stdSize = tqApp->font().pixelSize(); usePixelSizes = TRUE; } @@ -214,13 +214,13 @@ TQTextFormat::TQTextFormat() } TQTextFormat::TQTextFormat( const TQStyleSheetItem *style ) - : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( qApp->font().pointSize() ) + : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() ) { ref = 0; usePixelSizes = FALSE; if ( stdSize == -1 ) { - stdSize = qApp->font().pixelSize(); + stdSize = tqApp->font().pixelSize(); usePixelSizes = TRUE; } diff --git a/src/kernel/qsound_x11.cpp b/src/kernel/qsound_x11.cpp index 692e89e50..9c2a0dae3 100644 --- a/src/kernel/qsound_x11.cpp +++ b/src/kernel/qsound_x11.cpp @@ -157,7 +157,7 @@ void TQAuServerNAS::play(const TQString& filename) AuFlush(nas); dataReceived(); AuFlush(nas); - qApp->flushX(); + tqApp->flushX(); } } @@ -207,7 +207,7 @@ void TQAuServerNAS::play(TQSound* s) AuFlush(nas); dataReceived(); AuFlush(nas); - qApp->flushX(); + tqApp->flushX(); } } @@ -219,7 +219,7 @@ void TQAuServerNAS::stop(TQSound* s) AuFlush(nas); dataReceived(); AuFlush(nas); - qApp->flushX(); + tqApp->flushX(); } } @@ -270,14 +270,14 @@ TQAuServerNull::TQAuServerNull(TQObject* parent) : TQAuServer* qt_new_audio_server() { #ifdef QT_NAS_SUPPORT - TQAuServer* s=new TQAuServerNAS(qApp); + TQAuServer* s=new TQAuServerNAS(tqApp); if (s->okay()) { return s; } else { delete s; } #endif - return new TQAuServerNull(qApp); + return new TQAuServerNull(tqApp); } #endif // QT_NO_SOUND diff --git a/src/kernel/qtextengine.cpp b/src/kernel/qtextengine.cpp index c299e61a0..318722c97 100644 --- a/src/kernel/qtextengine.cpp +++ b/src/kernel/qtextengine.cpp @@ -150,7 +150,7 @@ static TQChar::Direction basicDirection( const TQString &str ) } -static void qAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) +static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) { TQScriptItemArray &items = engine->items; const TQChar *text = engine->string.unicode(); @@ -244,7 +244,7 @@ static void qAppendItems(TQTextEngine *engine, int &start, int &stop, BidiContro } typedef void (* fAppendItems)(TQTextEngine *, int &start, int &stop, BidiControl &control, TQChar::Direction dir); -static fAppendItems appendItems = qAppendItems; +static fAppendItems appendItems = tqAppendItems; // creates the next TQScript items. static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) diff --git a/src/kernel/qtranslator.cpp b/src/kernel/qtranslator.cpp index 18d3c839a..7758d31be 100644 --- a/src/kernel/qtranslator.cpp +++ b/src/kernel/qtranslator.cpp @@ -365,8 +365,8 @@ TQTranslator::TQTranslator( TQObject * parent, const char * name ) TQTranslator::~TQTranslator() { - if ( qApp ) - qApp->removeTranslator( this ); + if ( tqApp ) + tqApp->removeTranslator( this ); clear(); delete d; } @@ -597,8 +597,8 @@ bool TQTranslator::do_load( const uchar *data, int len ) } array.resetRawData( (const char *) data, len ); - if ( qApp && qApp->translators && qApp->translators->contains(this) ) - qApp->setReverseLayout( qt_detectRTLLanguage() ); + if ( tqApp && tqApp->translators && tqApp->translators->contains(this) ) + tqApp->setReverseLayout( qt_detectRTLLanguage() ); return ok; } @@ -690,8 +690,8 @@ void TQTranslator::clear() d->messages = 0; #endif - if ( qApp ) { - qApp->setReverseLayout( qt_detectRTLLanguage() ); + if ( tqApp ) { + tqApp->setReverseLayout( qt_detectRTLLanguage() ); TQWidgetList *list = TQApplication::topLevelWidgets(); TQWidgetListIt it( *list ); @@ -699,7 +699,7 @@ void TQTranslator::clear() while ( ( w=it.current() ) != 0 ) { ++it; if (!w->isDesktop()) - qApp->postEvent( w, new TQEvent( TQEvent::LanguageChange ) ); + tqApp->postEvent( w, new TQEvent( TQEvent::LanguageChange ) ); } delete list; } diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 16bce332f..82b31d430 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -881,7 +881,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n ) : TQObject( parent, name ), TQPaintDevice( TQInternal::Widget ) { #if defined(QT_CHECK_STATE) && !defined(Q_WS_WIN) - if ( qApp->type() == TQApplication::Tty ) { + if ( tqApp->type() == TQApplication::Tty ) { qWarning( "TQWidget: Cannot create a TQWidget when no GUI " "is being used" ); } @@ -975,8 +975,8 @@ TQWidget::~TQWidget() if ( TQApplication::main_widget == this ) { // reset main widget TQApplication::main_widget = 0; - if (qApp) - qApp->quit(); + if (tqApp) + tqApp->quit(); } if ( hasFocus() ) @@ -1231,7 +1231,7 @@ void TQWidget::deactivateWidgetCleanup() { // If this was the active application window, reset it if ( this == TQApplication::active_window ) - qApp->setActiveWindow( 0 ); + tqApp->setActiveWindow( 0 ); // If the is the active mouse press widget, reset it #ifdef Q_WS_MAC extern TQGuardedPtr qt_button_down; @@ -1321,7 +1321,7 @@ TQStyle& TQWidget::style() const { if ( extra && extra->style ) return *extra->style; - TQStyle &ret = qApp->style(); + TQStyle &ret = tqApp->style(); return ret; } @@ -3236,7 +3236,7 @@ void TQWidget::focusProxyDestroyed() \brief whether this widget (or its focus proxy) has the keyboard input focus - Effectively equivalent to \c {qApp->focusWidget() == this}. + Effectively equivalent to \c {tqApp->focusWidget() == this}. \sa setFocus(), clearFocus(), setFocusPolicy(), TQApplication::focusWidget() */ @@ -3245,7 +3245,7 @@ bool TQWidget::hasFocus() const const TQWidget* w = this; while ( w->focusProxy() ) w = w->focusProxy(); - return qApp->focusWidget() == w; + return tqApp->focusWidget() == w; } /*! @@ -3284,7 +3284,7 @@ void TQWidget::setFocus() } TQFocusData * f = focusData( TRUE ); - if ( f->it.current() == this && qApp->focusWidget() == this + if ( f->it.current() == this && tqApp->focusWidget() == this #if defined(Q_WS_WIN) && GetFocus() == winId() #endif @@ -3303,7 +3303,7 @@ void TQWidget::setFocus() } if ( isActiveWindow() ) { - TQWidget * prev = qApp->focus_widget; + TQWidget * prev = tqApp->focus_widget; if ( prev ) { // This part is never executed when Q_WS_X11? Preceding XFocusOut // had already reset focus_widget when received XFocusIn @@ -3329,7 +3329,7 @@ void TQWidget::setFocus() TQInputContext::endComposition(); } #endif - qApp->focus_widget = this; + tqApp->focus_widget = this; if( isInputMethodEnabled() ) focusInputContext(); @@ -3351,7 +3351,7 @@ void TQWidget::setFocus() TQApplication::sendEvent( prev, &out ); } - if ( qApp->focus_widget == this ) { + if ( tqApp->focus_widget == this ) { TQFocusEvent in( TQEvent::FocusIn ); TQApplication::sendEvent( this, &in ); } @@ -3384,9 +3384,9 @@ void TQWidget::clearFocus() #else unfocusInputContext(); #endif - TQWidget* w = qApp->focusWidget(); + TQWidget* w = tqApp->focusWidget(); // clear active focus - qApp->focus_widget = 0; + tqApp->focus_widget = 0; TQFocusEvent out( TQEvent::FocusOut ); TQApplication::sendEvent( w, &out ); #if defined(Q_WS_WIN) @@ -3588,7 +3588,7 @@ bool TQWidget::isActiveWindow() const TQWidget *tlw = topLevelWidget(); if(testWFlags(WSubWindow) && parentWidget()) tlw = parentWidget()->topLevelWidget(); - if(tlw == qApp->activeWindow() || ( isVisible() && tlw->isPopup() )) + if(tlw == tqApp->activeWindow() || ( isVisible() && tlw->isPopup() )) return TRUE; #ifndef QT_NO_STYLE if(style().styleHint(TQStyle::SH_Widget_ShareActivation, this )) { @@ -3596,7 +3596,7 @@ bool TQWidget::isActiveWindow() const !tlw->testWFlags(TQt::WShowModal) && (!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow())) return TRUE; - TQWidget *w = qApp->activeWindow(); + TQWidget *w = tqApp->activeWindow(); if( !testWFlags(WSubWindow) && w && w->testWFlags(WSubWindow) && w->parentWidget()->topLevelWidget() == tlw) return TRUE; @@ -4037,7 +4037,7 @@ void TQWidget::show() // stores the correct old focus widget even if it's stolen in the showevent #if defined(Q_WS_WIN) if ( testWFlags(WType_Popup) ) - qApp->openPopup( this ); + tqApp->openPopup( this ); #endif TQShowEvent showEvent; @@ -4058,7 +4058,7 @@ void TQWidget::show() #if !defined(Q_WS_WIN) if ( testWFlags(WType_Popup) ) - qApp->openPopup( this ); + tqApp->openPopup( this ); #endif #if defined(QT_ACCESSIBILITY_SUPPORT) @@ -4090,7 +4090,7 @@ void TQWidget::hide() setWState( WState_ForceHide ); if ( testWFlags(WType_Popup) ) - qApp->closePopup( this ); + tqApp->closePopup( this ); // Move test modal here. Otherwise, a modal dialog could get // destroyed and we lose all access to its parent because we haven't @@ -4110,7 +4110,7 @@ void TQWidget::hide() // next bit tries to move the focus if the focus widget is now // hidden. - if ( qApp && qApp->focusWidget() == this ) + if ( tqApp && tqApp->focusWidget() == this ) focusNextPrevChild( TRUE ); TQHideEvent hideEvent; TQApplication::sendEvent( this, &hideEvent ); @@ -4235,7 +4235,7 @@ void TQWidget::polish() if ( pm && !pm->isNull() ) setIcon( *pm ); else { - mw = qApp ? qApp->mainWidget() : 0; + mw = tqApp ? tqApp->mainWidget() : 0; pm = mw ? mw->icon() : 0; if ( pm && !pm->isNull() ) setIcon( *pm ); @@ -4254,7 +4254,7 @@ void TQWidget::polish() unsetPalette(); #endif setWState(WState_Polished); - qApp->polish( this ); + tqApp->polish( this ); TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); } } @@ -4304,7 +4304,7 @@ bool TQWidget::close( bool alsoDelete ) return TRUE; is_closing = 1; WId id = winId(); - bool isMain = qApp->mainWidget() == this; + bool isMain = tqApp->mainWidget() == this; bool checkLastWindowClosed = isTopLevel() && !isPopup(); bool deleted = FALSE; TQCloseEvent e; @@ -4317,11 +4317,11 @@ bool TQWidget::close( bool alsoDelete ) if ( !deleted && !isHidden() ) hide(); if ( checkLastWindowClosed - && qApp->receivers(SIGNAL(lastWindowClosed())) ) { + && tqApp->receivers(SIGNAL(lastWindowClosed())) ) { /* if there is no non-withdrawn top level window left (except the desktop, popups, or dialogs with parents), we emit the lastWindowClosed signal */ - TQWidgetList *list = qApp->topLevelWidgets(); + TQWidgetList *list = tqApp->topLevelWidgets(); TQWidget *widget = list->first(); while ( widget ) { if ( !widget->isHidden() @@ -4333,10 +4333,10 @@ bool TQWidget::close( bool alsoDelete ) } delete list; if ( widget == 0 ) - emit qApp->lastWindowClosed(); + emit tqApp->lastWindowClosed(); } if ( isMain ) - qApp->quit(); + tqApp->quit(); if ( deleted ) return TRUE; is_closing = 0; @@ -5045,9 +5045,9 @@ void TQWidget::mousePressEvent( TQMouseEvent *e ) if ( isPopup() ) { e->accept(); TQWidget* w; - while ( (w = qApp->activePopupWidget() ) && w != this ){ + while ( (w = tqApp->activePopupWidget() ) && w != this ){ w->close(); - if (qApp->activePopupWidget() == w) // widget does not want to dissappear + if (tqApp->activePopupWidget() == w) // widget does not want to dissappear w->hide(); // hide at least } if (!rect().contains(e->pos()) ){ diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp index da6ec4817..41b048b67 100644 --- a/src/kernel/qwidget_x11.cpp +++ b/src/kernel/qwidget_x11.cpp @@ -236,11 +236,11 @@ Q_EXPORT void qt_wait_for_window_manager( TQWidget* w ) break; if ( t.elapsed() > 500 ) return; // give up, no event available - qApp->syncX(); // non-busy wait + tqApp->syncX(); // non-busy wait } - qApp->x11ProcessEvent( &ev ); + tqApp->x11ProcessEvent( &ev ); if ( XCheckTypedWindowEvent( w->x11Display(), w->winId(), ConfigureNotify, &ev ) ) - qApp->x11ProcessEvent( &ev ); + tqApp->x11ProcessEvent( &ev ); } static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom two = 0) @@ -668,7 +668,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) XClassHint class_hint; class_hint.res_name = (char *) tqAppName(); // application name - class_hint.res_class = (char *) qAppClass(); // application class + class_hint.res_class = (char *) tqAppClass(); // application class XSetWMProperties( dpy, id, 0, 0, 0, 0, &size_hints, &wm_hints, &class_hint ); @@ -802,7 +802,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows ) if ( testWFlags(WShowModal) ) // just be sure we leave modal qt_leave_modal( this ); else if ( testWFlags(WType_Popup) ) - qApp->closePopup( this ); + tqApp->closePopup( this ); #ifndef QT_NO_XFTFREETYPE if ( rendhd) { @@ -1825,7 +1825,7 @@ void TQWidget::setWindowState(uint newstate) (getWFlags() & 0xffff0000), mapToGlobal(TQPoint(0, 0))); const TQRect r = top->normalGeometry; - setGeometry(qApp->desktop()->screenGeometry(this)); + setGeometry(tqApp->desktop()->screenGeometry(this)); top->normalGeometry = r; if ( top->normalGeometry.width() < 0 ) @@ -2873,7 +2873,7 @@ void TQWidget::updateFrameStrut() const */ TQWidget *TQWidget::icHolderWidget() { - return qApp->locateICHolderWidget(this); + return tqApp->locateICHolderWidget(this); } @@ -2923,7 +2923,7 @@ void TQWidget::changeInputContext( const TQString& identifierName ) *qicp = qic; if ( qic ) { TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)), - qApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); + tqApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); TQObject::connect( qic, SIGNAL(deletionRequested()), icWidget, SLOT(destroyInputContext()) ); } @@ -2962,7 +2962,7 @@ void TQWidget::createInputContext() *qicp = qic; if ( qic ) { TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)), - qApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); + tqApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); TQObject::connect( qic, SIGNAL(deletionRequested()), icWidget, SLOT(destroyInputContext()) ); } diff --git a/src/moc/moc.y b/src/moc/moc.y index 8de0cd73e..c9c3f0b9f 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -2962,8 +2962,8 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#ifndef QT_NO_TRANSLATION\n" ); fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n", (const char*)qualifiedClassName() ); - fprintf( out, " if ( qApp )\n" ); - fprintf( out, "\treturn qApp->translate( \"%s\", s, c," + fprintf( out, " if ( tqApp )\n" ); + fprintf( out, "\treturn tqApp->translate( \"%s\", s, c," " TQApplication::DefaultCodec );\n", (const char*)qualifiedClassName() ); fprintf( out, " else\n" ); @@ -2972,8 +2972,8 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" ); fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n", (const char*)qualifiedClassName() ); - fprintf( out, " if ( qApp )\n" ); - fprintf( out, "\treturn qApp->translate( \"%s\", s, c," + fprintf( out, " if ( tqApp )\n" ); + fprintf( out, "\treturn tqApp->translate( \"%s\", s, c," " TQApplication::UnicodeUTF8 );\n", (const char*)qualifiedClassName() ); fprintf( out, " else\n" ); diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp index 41a8449d6..f3c5c75c5 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/moc/moc_yacc.cpp @@ -5788,8 +5788,8 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#ifndef QT_NO_TRANSLATION\n" ); fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n", (const char*)qualifiedClassName() ); - fprintf( out, " if ( qApp )\n" ); - fprintf( out, "\treturn qApp->translate( \"%s\", s, c," + fprintf( out, " if ( tqApp )\n" ); + fprintf( out, "\treturn tqApp->translate( \"%s\", s, c," " TQApplication::DefaultCodec );\n", (const char*)qualifiedClassName() ); fprintf( out, " else\n" ); @@ -5798,8 +5798,8 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" ); fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n", (const char*)qualifiedClassName() ); - fprintf( out, " if ( qApp )\n" ); - fprintf( out, "\treturn qApp->translate( \"%s\", s, c," + fprintf( out, " if ( tqApp )\n" ); + fprintf( out, "\treturn tqApp->translate( \"%s\", s, c," " TQApplication::UnicodeUTF8 );\n", (const char*)qualifiedClassName() ); fprintf( out, " else\n" ); diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp index e6dafa6c6..17b78b684 100644 --- a/src/network/qdns.cpp +++ b/src/network/qdns.cpp @@ -132,7 +132,7 @@ public: { #if defined(Q_DNS_SYNCHRONOUS) #if defined(Q_OS_UNIX) - noEventLoop = qApp==0 || qApp->loopLevel()==0; + noEventLoop = tqApp==0 || tqApp->loopLevel()==0; #else noEventLoop = FALSE; #endif @@ -922,7 +922,7 @@ void TQDnsUgleHack::ugle( bool emitAnyway) TQDnsManager::TQDnsManager() - : TQDnsSocket( qApp, "Internal DNS manager" ), + : TQDnsSocket( tqApp, "Internal DNS manager" ), queries( TQPtrVector( 0 ) ), cache( TQDict( 83, FALSE ) ), ipv4Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv4, 0 ) ) diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index caa763981..8989a05b4 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -765,7 +765,7 @@ TQColor TQGLContext::overlayTransparentColor() const uchar r = (uchar)((col.red / 65535.0) * 255.0 + 0.5); uchar g = (uchar)((col.green / 65535.0) * 255.0 + 0.5); uchar b = (uchar)((col.blue / 65535.0) * 255.0 + 0.5); - return TQColor(qRgb(r,g,b), trans_colors[i].color); + return TQColor(tqRgb(r,g,b), trans_colors[i].color); } } } @@ -823,9 +823,9 @@ uint TQGLContext::colorIndex( const TQColor& c ) const XColor col; col.flags = DoRed | DoGreen | DoBlue; col.pixel = color_map_entry; - col.red = (ushort)((qRed(c.rgb()) / 255.0) * 65535.0 + 0.5); - col.green = (ushort)((qGreen(c.rgb()) / 255.0) * 65535.0 + 0.5); - col.blue = (ushort)((qBlue(c.rgb()) / 255.0) * 65535.0 + 0.5); + col.red = (ushort)((tqRed(c.rgb()) / 255.0) * 65535.0 + 0.5); + col.green = (ushort)((tqGreen(c.rgb()) / 255.0) * 65535.0 + 0.5); + col.blue = (ushort)((tqBlue(c.rgb()) / 255.0) * 65535.0 + 0.5); XStoreColor(TQPaintDevice::x11AppDisplay(), x->cmap, &col); cmap->insert(color_map_entry, target); @@ -1275,9 +1275,9 @@ static void qStoreColors( TQWidget * tlw, Colormap cmap, for ( int i = 0; i < cols.size(); i++ ) { color = cols.entryRgb( i ); c.pixel = i; - c.red = (ushort)( (qRed( color ) / 255.0) * 65535.0 + 0.5 ); - c.green = (ushort)( (qGreen( color ) / 255.0) * 65535.0 + 0.5 ); - c.blue = (ushort)( (qBlue( color ) / 255.0) * 65535.0 + 0.5 ); + c.red = (ushort)( (tqRed( color ) / 255.0) * 65535.0 + 0.5 ); + c.green = (ushort)( (tqGreen( color ) / 255.0) * 65535.0 + 0.5 ); + c.blue = (ushort)( (tqBlue( color ) / 255.0) * 65535.0 + 0.5 ); c.flags = DoRed | DoGreen | DoBlue; XStoreColor( tlw->x11Display(), cmap, &c ); } diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp index 048b7dc29..d095a754c 100644 --- a/src/opengl/qglcolormap.cpp +++ b/src/opengl/qglcolormap.cpp @@ -86,7 +86,7 @@ // This will fill the colormap with colors ranging from // black to white. for ( int i = 0; i < colormap.size(); i++ ) - colormap.setEntry( i, qRgb( i, i, i ) ); + colormap.setEntry( i, tqRgb( i, i, i ) ); widget.setColormap( colormap ); widget.show(); @@ -273,15 +273,15 @@ int TQGLColormap::findNearest( TQRgb color ) const return idx; int mapSize = size(); int mindist = 200000; - int r = qRed( color ); - int g = qGreen( color ); - int b = qBlue( color ); + int r = tqRed( color ); + int g = tqGreen( color ); + int b = tqBlue( color ); int rx, gx, bx, dist; for ( int i=0; i < mapSize; i++ ) { TQRgb ci = d->cells[i]; - rx = r - qRed( ci ); - gx = g - qGreen( ci ); - bx = b - qBlue( ci ); + rx = r - tqRed( ci ); + gx = g - tqGreen( ci ); + bx = b - tqBlue( ci ); dist = rx*rx + gx*gx + bx*bx; // calculate distance if ( dist < mindist ) { // minimal? mindist = dist; diff --git a/src/sql/qsqldatabase.cpp b/src/sql/qsqldatabase.cpp index ebe65d1ba..582219b49 100644 --- a/src/sql/qsqldatabase.cpp +++ b/src/sql/qsqldatabase.cpp @@ -211,12 +211,12 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance() { static TQGuardedPtr sqlConnection = 0; if ( !sqlConnection ) { - if( qApp == 0 ){ + if( tqApp == 0 ){ qFatal( "TQSqlDatabaseManager: A TQApplication object has to be " "instantiated in order to use the SQL module." ); return 0; } - sqlConnection = new TQSqlDatabaseManager( qApp, "database manager" ); + sqlConnection = new TQSqlDatabaseManager( tqApp, "database manager" ); } return (TQSqlDatabaseManager*)sqlConnection; } diff --git a/src/sql/qsqlmanager_p.cpp b/src/sql/qsqlmanager_p.cpp index 0ed88cf8c..c7c3ec3c5 100644 --- a/src/sql/qsqlmanager_p.cpp +++ b/src/sql/qsqlmanager_p.cpp @@ -869,10 +869,10 @@ TQSql::Confirm TQDataManager::confirmEdit( TQWidget* parent, TQSql::Op m ) if ( m == TQSql::Delete ) { #ifndef QT_NO_MESSAGEBOX ans = TQMessageBox::information( parent, - qApp->translate( "TQSql", "Delete" ), - qApp->translate( "TQSql", "Delete this record?" ), - qApp->translate( "TQSql", "Yes" ), - qApp->translate( "TQSql", "No" ), + tqApp->translate( "TQSql", "Delete" ), + tqApp->translate( "TQSql", "Delete this record?" ), + tqApp->translate( "TQSql", "Yes" ), + tqApp->translate( "TQSql", "No" ), TQString::null, 0, 1 ); #else ans = TQSql::No; @@ -880,16 +880,16 @@ TQSql::Confirm TQDataManager::confirmEdit( TQWidget* parent, TQSql::Op m ) } else if ( m != TQSql::None ) { TQString caption; if ( m == TQSql::Insert ) { - caption = qApp->translate( "TQSql", "Insert" ); + caption = tqApp->translate( "TQSql", "Insert" ); } else { // TQSql::Update - caption = qApp->translate( "TQSql", "Update" ); + caption = tqApp->translate( "TQSql", "Update" ); } #ifndef QT_NO_MESSAGEBOX ans = TQMessageBox::information( parent, caption, - qApp->translate( "TQSql", "Save edits?" ), - qApp->translate( "TQSql", "Yes" ), - qApp->translate( "TQSql", "No" ), - qApp->translate( "TQSql", "Cancel" ), + tqApp->translate( "TQSql", "Save edits?" ), + tqApp->translate( "TQSql", "Yes" ), + tqApp->translate( "TQSql", "No" ), + tqApp->translate( "TQSql", "Cancel" ), 0, 2 ); #else ans = TQSql::No; @@ -921,10 +921,10 @@ TQSql::Confirm TQDataManager::confirmCancel( TQWidget* parent, TQSql::Op ) { #ifndef QT_NO_MESSAGEBOX switch ( TQMessageBox::information( parent, - qApp->translate( "TQSql", "Confirm" ), - qApp->translate( "TQSql", "Cancel your edits?" ), - qApp->translate( "TQSql", "Yes" ), - qApp->translate( "TQSql", "No" ), + tqApp->translate( "TQSql", "Confirm" ), + tqApp->translate( "TQSql", "Cancel your edits?" ), + tqApp->translate( "TQSql", "Yes" ), + tqApp->translate( "TQSql", "No" ), TQString::null, 0, 1 ) ) { case 0: return TQSql::Yes; diff --git a/src/styles/qstylefactory.cpp b/src/styles/qstylefactory.cpp index 88f25642d..c8c797e48 100644 --- a/src/styles/qstylefactory.cpp +++ b/src/styles/qstylefactory.cpp @@ -83,7 +83,7 @@ static TQStyleFactoryPrivate *instance = 0; TQPluginManager *TQStyleFactoryPrivate::manager = 0; TQStyleFactoryPrivate::TQStyleFactoryPrivate() -: TQObject( qApp ) +: TQObject( tqApp ) { manager = new TQPluginManager( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE ); } diff --git a/src/styles/qwindowsstyle.cpp b/src/styles/qwindowsstyle.cpp index 92c6de147..b58eb9d86 100644 --- a/src/styles/qwindowsstyle.cpp +++ b/src/styles/qwindowsstyle.cpp @@ -2096,8 +2096,8 @@ int TQWindowsStyle::styleHint( StyleHint hint, ret = 1; } else if (d->altDown()) { ret = 1; - } else if (qApp->focusWidget() && qApp->focusWidget()->isPopup()) { - popupMenu = ::qt_cast(qApp->focusWidget()); + } else if (tqApp->focusWidget() && tqApp->focusWidget()->isPopup()) { + popupMenu = ::qt_cast(tqApp->focusWidget()); TQMenuData *pm = popupMenu ? (TQMenuData*)popupMenu->qt_cast("TQMenuData") : 0; if (pm && ((FriendlyMenuData*)pm)->parentMenu == menuBar) { if (d->hasSeenAlt(menuBar)) diff --git a/src/table/qtable.cpp b/src/table/qtable.cpp index b9926f3fa..0a1d9c62f 100644 --- a/src/table/qtable.cpp +++ b/src/table/qtable.cpp @@ -2781,7 +2781,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) } drawActiveSelection = hasFocus() || viewport()->hasFocus() || d->inMenuMode - || is_child_of( qApp->focusWidget(), viewport() ) + || is_child_of( tqApp->focusWidget(), viewport() ) || !style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ); if ( rowlast == -1 ) rowlast = numRows() - 1; @@ -4315,7 +4315,7 @@ void TQTable::focusOutEvent( TQFocusEvent* ) if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { d->inMenuMode = TQFocusEvent::reason() == TQFocusEvent::Popup || - (qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); + (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar")); if ( !d->inMenuMode ) repaintSelections(); } diff --git a/src/tools/qcomponentfactory.cpp b/src/tools/qcomponentfactory.cpp index 9109cc5b2..22e871409 100644 --- a/src/tools/qcomponentfactory.cpp +++ b/src/tools/qcomponentfactory.cpp @@ -180,7 +180,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid & res = library->queryInterface( iid, iface ); } TQLibraryInterface *libiface = 0; - if ( library->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) != TQS_OK || !qApp ) { + if ( library->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) != TQS_OK || !tqApp ) { delete library; // only deletes the object, thanks to TQLibrary::Manual } else { libiface->release(); diff --git a/src/tools/qfile.cpp b/src/tools/qfile.cpp index dc0a2427e..78c08c7dd 100644 --- a/src/tools/qfile.cpp +++ b/src/tools/qfile.cpp @@ -681,7 +681,7 @@ void TQFile::setDecodingFunction( DecoderFn f ) TQMessageBox::critical( this, tr("Open failed"), - tr("Could not open file for reading: %1").arg( qApp->translate("TQFile",f.errorString()) ) + tr("Could not open file for reading: %1").arg( tqApp->translate("TQFile",f.errorString()) ) ); return; } diff --git a/src/widgets/qbuttongroup.cpp b/src/widgets/qbuttongroup.cpp index f90223225..c94ba0378 100644 --- a/src/widgets/qbuttongroup.cpp +++ b/src/widgets/qbuttongroup.cpp @@ -499,7 +499,7 @@ void TQButtonGroup::setRadioButtonExclusive( bool on) void TQButtonGroup::moveFocus( int key ) { - TQWidget * f = qApp->focusWidget(); + TQWidget * f = tqApp->focusWidget(); TQButtonItem * i; i = buttons->first(); diff --git a/src/widgets/qcheckbox.cpp b/src/widgets/qcheckbox.cpp index a4b78c136..8a2ffd4e6 100644 --- a/src/widgets/qcheckbox.cpp +++ b/src/widgets/qcheckbox.cpp @@ -353,7 +353,7 @@ void TQCheckBox::updateMask() bool TQCheckBox::hitButton( const TQPoint &pos ) const { TQRect r = TQStyle::visualRect( style().subRect( TQStyle::SR_CheckBoxFocusRect, this ), this ); - if ( qApp->reverseLayout() ) { + if ( tqApp->reverseLayout() ) { r.setRight( width() ); } else { r.setLeft( 0 ); diff --git a/src/widgets/qcombobox.cpp b/src/widgets/qcombobox.cpp index 59fa0244b..60a85337c 100644 --- a/src/widgets/qcombobox.cpp +++ b/src/widgets/qcombobox.cpp @@ -1379,7 +1379,7 @@ void TQComboBox::mousePressEvent( TQMouseEvent *e ) if ( d->usingListBox() ) { listBox()->blockSignals( TRUE ); - qApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll + tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll listBox()->setCurrentItem(d->current); listBox()->blockSignals( FALSE ); popup(); diff --git a/src/widgets/qdatetimeedit.cpp b/src/widgets/qdatetimeedit.cpp index c7fa1d5a6..117c20cdc 100644 --- a/src/widgets/qdatetimeedit.cpp +++ b/src/widgets/qdatetimeedit.cpp @@ -495,7 +495,7 @@ bool TQDateTimeEditor::event( TQEvent *e ) { if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { if ( e->type() == TQEvent::FocusOut ) - qApp->sendEvent( cw, e ); + tqApp->sendEvent( cw, e ); update( rect() ); } else if ( e->type() == TQEvent::AccelOverride ) { TQKeyEvent* ke = (TQKeyEvent*) e; @@ -648,7 +648,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) } } - qApp->sendEvent( w, e ); + tqApp->sendEvent( w, e ); return TRUE; } } break; @@ -1547,7 +1547,7 @@ void TQDateEdit::addNumber( int sec, int num ) emit valueChanged( date() ); } d->overwrite = overwrite; - d->timerId = startTimer( qApp->doubleClickInterval()*4 ); + d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); d->ed->repaint( d->ed->rect(), FALSE ); } @@ -2459,7 +2459,7 @@ void TQTimeEdit::addNumber( int sec, int num ) if ( accepted ) emit valueChanged( time() ); d->overwrite = overwrite; - d->timerId = startTimer( qApp->doubleClickInterval()*4 ); + d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); d->ed->repaint( d->ed->rect(), FALSE ); } diff --git a/src/widgets/qdockwindow.cpp b/src/widgets/qdockwindow.cpp index 875f6d610..a0f4163c1 100644 --- a/src/widgets/qdockwindow.cpp +++ b/src/widgets/qdockwindow.cpp @@ -442,7 +442,7 @@ void TQDockWindowHandle::mousePressEvent( TQMouseEvent *e ) if ( !dockWindow->dockArea ) return; ctrlDown = ( e->state() & ControlButton ) == ControlButton; - oldFocus = qApp->focusWidget(); + oldFocus = tqApp->focusWidget(); setFocus(); e->ignore(); if ( e->button() != LeftButton ) @@ -453,7 +453,7 @@ void TQDockWindowHandle::mousePressEvent( TQMouseEvent *e ) offset = e->pos(); dockWindow->startRectDraw( mapToGlobal( e->pos() ), !opaque ); if ( !opaque ) - qApp->installEventFilter( dockWindow ); + tqApp->installEventFilter( dockWindow ); } void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e ) @@ -469,7 +469,7 @@ void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e ) void TQDockWindowHandle::mouseReleaseEvent( TQMouseEvent *e ) { ctrlDown = FALSE; - qApp->removeEventFilter( dockWindow ); + tqApp->removeEventFilter( dockWindow ); if ( oldFocus ) oldFocus->setFocus(); if ( !mousePressed ) @@ -610,7 +610,7 @@ void TQDockWindowTitleBar::mousePressEvent( TQMouseEvent *e ) } ctrlDown = ( e->state() & ControlButton ) == ControlButton; - oldFocus = qApp->focusWidget(); + oldFocus = tqApp->focusWidget(); // setFocus activates the window, which deactivates the main window // not what we want, and not required anyway on Windows #ifndef Q_WS_WIN @@ -659,7 +659,7 @@ void TQDockWindowTitleBar::mouseReleaseEvent( TQMouseEvent *e ) } ctrlDown = FALSE; - qApp->removeEventFilter( dockWindow ); + tqApp->removeEventFilter( dockWindow ); if ( oldFocus ) oldFocus->setFocus(); @@ -1117,7 +1117,7 @@ void TQDockWindow::setOrientation( Orientation o ) TQDockWindow::~TQDockWindow() { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); if ( area() ) area()->removeDockWindow( this, FALSE, FALSE ); TQDockArea *a = area(); @@ -1158,7 +1158,7 @@ void TQDockWindow::swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offse TQWidget *TQDockWindow::areaAt( const TQPoint &gp ) { - TQWidget *w = qApp->widgetAt( gp, TRUE ); + TQWidget *w = tqApp->widgetAt( gp, TRUE ); if ( w && ( w == this || w == titleBar ) && parentWidget() ) w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) ); @@ -1407,7 +1407,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos ) } dockArea = 0; TQPoint topLeft = currRect.topLeft(); - TQRect screen = qApp->desktop()->availableGeometry( topLeft ); + TQRect screen = tqApp->desktop()->availableGeometry( topLeft ); if ( !screen.contains( topLeft ) ) { topLeft.setY(TQMAX(topLeft.y(), screen.top())); topLeft.setY(TQMIN(topLeft.y(), screen.bottom()-height())); @@ -1968,7 +1968,7 @@ void TQDockWindow::hideEvent( TQHideEvent *e ) void TQDockWindow::showEvent( TQShowEvent *e ) { if (curPlace == OutsideDock && (parent() && strcmp(parent()->name(), "qt_hide_dock") != 0)) { - TQRect sr = qApp->desktop()->availableGeometry( this ); + TQRect sr = tqApp->desktop()->availableGeometry( this ); if ( !sr.contains( pos() ) ) { int nx = TQMIN( TQMAX( x(), sr.x() ), sr.right()-width() ); int ny = TQMIN( TQMAX( y(), sr.y() ), sr.bottom()-height() ); @@ -2060,7 +2060,7 @@ bool TQDockWindow::eventFilter( TQObject * o, TQEvent *e ) verHandle->mousePressed = titleBar->mousePressed = FALSE; endRectDraw( !opaque ); - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); return TRUE; } } else if ( ((TQWidget*)o)->topLevelWidget() != this && place() == OutsideDock && isTopLevel() ) { diff --git a/src/widgets/qeffects.cpp b/src/widgets/qeffects.cpp index 98939b4c2..7377eba78 100644 --- a/src/widgets/qeffects.cpp +++ b/src/widgets/qeffects.cpp @@ -145,7 +145,7 @@ void TQAlphaWidget::run( int time ) checkTime.start(); showWidget = TRUE; - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); widget->setWState( WState_Visible ); @@ -251,7 +251,7 @@ void TQAlphaWidget::render() alpha = 1; if ( alpha >= 1 || !showWidget) { anim.stop(); - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); if ( widget ) { if ( !showWidget ) { @@ -318,9 +318,9 @@ void TQAlphaWidget::alphaBlend() Q_UINT32 bp = bl[sx]; Q_UINT32 fp = fl[sx]; - ((Q_UINT32*)(md[sy]))[sx] = qRgb(int (qRed(bp)*ia + qRed(fp)*alpha), - int (qGreen(bp)*ia + qGreen(fp)*alpha), - int (qBlue(bp)*ia + qBlue(fp)*alpha) ); + ((Q_UINT32*)(md[sy]))[sx] = tqRgb(int (tqRed(bp)*ia + tqRed(fp)*alpha), + int (tqGreen(bp)*ia + tqGreen(fp)*alpha), + int (tqBlue(bp)*ia + tqBlue(fp)*alpha) ); } } } @@ -519,7 +519,7 @@ void TQRollEffect::run( int time ) show(); setEnabled(FALSE); - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); showWidget = TRUE; done = FALSE; @@ -581,7 +581,7 @@ void TQRollEffect::scroll() } if ( done ) { anim.stop(); - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); if ( widget ) { if ( !showWidget ) { #ifdef Q_WS_WIN @@ -633,8 +633,8 @@ void qScrollEffect( TQWidget* w, TQEffects::DirFlags orient, int time ) q_roll = 0; } - qApp->sendPostedEvents( w, TQEvent::Move ); - qApp->sendPostedEvents( w, TQEvent::Resize ); + tqApp->sendPostedEvents( w, TQEvent::Move ); + tqApp->sendPostedEvents( w, TQEvent::Resize ); #ifdef Q_WS_X11 uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | (w->isPopup() ? TQt::WType_Popup : (TQt::WX11BypassWM | TQt::WStyle_Tool)); @@ -657,8 +657,8 @@ void qFadeEffect( TQWidget* w, int time ) q_blend = 0; } - qApp->sendPostedEvents( w, TQEvent::Move ); - qApp->sendPostedEvents( w, TQEvent::Resize ); + tqApp->sendPostedEvents( w, TQEvent::Move ); + tqApp->sendPostedEvents( w, TQEvent::Resize ); #ifdef Q_WS_X11 uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop diff --git a/src/widgets/qlistbox.cpp b/src/widgets/qlistbox.cpp index 2dc526655..f38550260 100644 --- a/src/widgets/qlistbox.cpp +++ b/src/widgets/qlistbox.cpp @@ -2734,7 +2734,7 @@ void TQListBox::focusOutEvent( TQFocusEvent* ) if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { d->inMenuMode = TQFocusEvent::reason() == TQFocusEvent::Popup || - (qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); + (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar")); if ( !d->inMenuMode ) repaintSelection(); } diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index 173548c38..7b776d523 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -4308,7 +4308,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e ) bool close = i->isOpen(); setOpen( i, !close ); // ### Looks dangerous, removed because of reentrance problems - // qApp->processEvents(); + // tqApp->processEvents(); if ( !d->focusItem ) { d->focusItem = i; repaintItem( d->focusItem ); @@ -4518,7 +4518,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e ) bool close = i->isOpen(); setOpen( i, !close ); // ### Looks dangerous, removed because of reentrance problems - // qApp->processEvents(); + // tqApp->processEvents(); if ( !d->focusItem ) { d->focusItem = i; repaintItem( d->focusItem ); @@ -4845,7 +4845,7 @@ void TQListView::focusOutEvent( TQFocusEvent* ) if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) ) { d->inMenuMode = TQFocusEvent::reason() == TQFocusEvent::Popup - || (qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); + || (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar")); if ( !d->inMenuMode ) { bool db = d->useDoubleBuffer; d->useDoubleBuffer = TRUE; diff --git a/src/widgets/qmenubar.cpp b/src/widgets/qmenubar.cpp index d1fde81c2..ed592df6a 100644 --- a/src/widgets/qmenubar.cpp +++ b/src/widgets/qmenubar.cpp @@ -594,7 +594,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event ) waitforalt = 0; } // ### ! block all accelerator events when the menu bar is active - if ( qApp && qApp->focusWidget() == this ) { + if ( tqApp && tqApp->focusWidget() == this ) { return TRUE; } @@ -1504,13 +1504,13 @@ void TQMenuBar::setAltMode( bool enable ) actItemDown = FALSE; if ( enable ) { if ( !TQMenuData::d->aWidget ) - TQMenuData::d->aWidget = qApp->focusWidget(); + TQMenuData::d->aWidget = tqApp->focusWidget(); setFocus(); updateItem( idAt( actItem ) ); } else { // set the focus back to the previous widget if // we still have the focus. - if ( qApp->focusWidget() == this ) { + if ( tqApp->focusWidget() == this ) { if ( TQMenuData::d->aWidget ) TQMenuData::d->aWidget->setFocus(); else diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index ed9aa45c8..f6858c25e 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -111,7 +111,7 @@ static void cleanup() static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) { if ( !singleSingleShot ) { - singleSingleShot = new TQTimer( qApp, "popup submenu timer" ); + singleSingleShot = new TQTimer( tqApp, "popup submenu timer" ); qAddPostRoutine( cleanup ); } @@ -314,8 +314,8 @@ TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name ) TQPopupMenu::~TQPopupMenu() { - if ( syncMenu == this && qApp ) { - qApp->exit_loop(); + if ( syncMenu == this && tqApp ) { + tqApp->exit_loop(); syncMenu = 0; } @@ -558,7 +558,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint ) int h = height(); if ( snapToMouse ) { - if ( qApp->reverseLayout() ) + if ( tqApp->reverseLayout() ) x -= w; if ( x+w > sx+sw ) x = mouse.x()-w; @@ -587,7 +587,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint ) if( parent == NULL ) parent = TQApplication::widgetAt( pos ); if( parent == NULL ) - parent = qApp->activeWindow(); + parent = tqApp->activeWindow(); if( parent != NULL ) x11SetWindowTransient( parent ); } @@ -649,9 +649,9 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint ) actItem = -1; #ifndef QT_NO_EFFECTS - int hGuess = qApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll; + int hGuess = tqApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll; int vGuess = TQEffects::DownScroll; - if ( qApp->reverseLayout() ) { + if ( tqApp->reverseLayout() ) { if ( snapToMouse && ( x + w/2 > mouse.x() ) || ( parentMenu && parentMenu->isPopupMenu && ( x + w/2 > ((TQPopupMenu*)parentMenu)->x() ) ) ) @@ -1403,8 +1403,8 @@ void TQPopupMenu::show() void TQPopupMenu::hide() { - if ( syncMenu == this && qApp ) { - qApp->exit_loop(); + if ( syncMenu == this && tqApp ) { + tqApp->exit_loop(); syncMenu = 0; } @@ -2200,7 +2200,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e ) #ifdef Q_OS_WIN32 if ( !ok_key && !( e->key() == Key_Control || e->key() == Key_Shift || e->key() == Key_Meta ) ) - qApp->beep(); + tqApp->beep(); #endif // Q_OS_WIN32 } @@ -2480,7 +2480,7 @@ void TQPopupMenu::updateRow( int row ) int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint ) { snapToMouse = TRUE; - if ( !qApp ) + if ( !tqApp ) return -1; TQPopupMenu* priorSyncMenu = syncMenu; @@ -2491,7 +2491,7 @@ int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint ) TQGuardedPtr that = this; connectModal( that, TRUE ); popup( pos, indexAtPoint ); - qApp->enter_loop(); + tqApp->enter_loop(); connectModal( that, FALSE ); syncMenu = priorSyncMenu; diff --git a/src/widgets/qpushbutton.cpp b/src/widgets/qpushbutton.cpp index cbb45e443..09e57b119 100644 --- a/src/widgets/qpushbutton.cpp +++ b/src/widgets/qpushbutton.cpp @@ -712,7 +712,7 @@ void TQPushButton::popupPressed() #endif if ( horizontal ) { if ( topLeft ) { - if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + popup->sizeHint().height() <= qApp->desktop()->height() ) + if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + popup->sizeHint().height() <= tqApp->desktop()->height() ) popup->exec( mapToGlobal( rect().bottomLeft() ) ); else popup->exec( mapToGlobal( rect().topLeft() - TQPoint( 0, popup->sizeHint().height() ) ) ); @@ -724,7 +724,7 @@ void TQPushButton::popupPressed() } } else { if ( topLeft ) { - if ( mapToGlobal( TQPoint( rect().right(), 0 ) ).x() + popup->sizeHint().width() <= qApp->desktop()->width() ) + if ( mapToGlobal( TQPoint( rect().right(), 0 ) ).x() + popup->sizeHint().width() <= tqApp->desktop()->width() ) popup->exec( mapToGlobal( rect().topRight() ) ); else popup->exec( mapToGlobal( rect().topLeft() - TQPoint( popup->sizeHint().width(), 0 ) ) ); diff --git a/src/widgets/qradiobutton.cpp b/src/widgets/qradiobutton.cpp index 2d0515137..d04c0ff10 100644 --- a/src/widgets/qradiobutton.cpp +++ b/src/widgets/qradiobutton.cpp @@ -179,7 +179,7 @@ bool TQRadioButton::hitButton( const TQPoint &pos ) const TQRect r = TQStyle::visualRect( style().subRect( TQStyle::SR_RadioButtonFocusRect, this ), this ); - if ( qApp->reverseLayout() ) { + if ( tqApp->reverseLayout() ) { r.setRight( width() ); } else { r.setLeft( 0 ); diff --git a/src/widgets/qspinbox.cpp b/src/widgets/qspinbox.cpp index 754d39ff5..44692688b 100644 --- a/src/widgets/qspinbox.cpp +++ b/src/widgets/qspinbox.cpp @@ -659,7 +659,7 @@ bool TQSpinBox::eventFilter( TQObject* o, TQEvent* ev ) return FALSE; if ( edited ) interpretText(); - qApp->sendEvent( this, ev ); + tqApp->sendEvent( this, ev ); retval = TRUE; } if ( k->key() == Key_Up ) { stepUp(); diff --git a/src/widgets/qsplashscreen.cpp b/src/widgets/qsplashscreen.cpp index 6be1506be..1896269b2 100644 --- a/src/widgets/qsplashscreen.cpp +++ b/src/widgets/qsplashscreen.cpp @@ -115,10 +115,10 @@ public: splash->show(); ... // Loading some items splash->message( "Loaded modules" ); - qApp->processEvents(); + tqApp->processEvents(); ... // Establishing connections splash->message( "Established connections" ); - qApp->processEvents(); + tqApp->processEvents(); \endcode */ diff --git a/src/widgets/qtabbar.cpp b/src/widgets/qtabbar.cpp index b141de8d4..dcee15084 100644 --- a/src/widgets/qtabbar.cpp +++ b/src/widgets/qtabbar.cpp @@ -585,7 +585,7 @@ void TQTabBar::paint( TQPainter * p, TQTab * t, bool selected ) const if (isEnabled() && t->isEnabled()) flags |= TQStyle::Style_Enabled; - if (topLevelWidget() == qApp->activeWindow()) + if (topLevelWidget() == tqApp->activeWindow()) flags |= TQStyle::Style_Active; if ( selected ) flags |= TQStyle::Style_Selected; diff --git a/src/widgets/qtabwidget.cpp b/src/widgets/qtabwidget.cpp index b255aaabe..bb2eccf8e 100644 --- a/src/widgets/qtabwidget.cpp +++ b/src/widgets/qtabwidget.cpp @@ -961,7 +961,7 @@ bool TQTabWidget::eventFilter( TQObject *o, TQEvent * e) page = 0; } setCurrentPage( page ); - if ( !qApp->focusWidget() ) + if ( !tqApp->focusWidget() ) d->tabs->setFocus(); return TRUE; } diff --git a/src/widgets/qtextbrowser.cpp b/src/widgets/qtextbrowser.cpp index d8d9b8a27..1dcf689aa 100644 --- a/src/widgets/qtextbrowser.cpp +++ b/src/widgets/qtextbrowser.cpp @@ -229,7 +229,7 @@ void TQTextBrowser::setSource(const TQString& name) { #ifndef QT_NO_CURSOR if ( isVisible() ) - qApp->setOverrideCursor( waitCursor ); + tqApp->setOverrideCursor( waitCursor ); #endif d->textOrSourceChanged = TRUE; TQString source = name; @@ -263,7 +263,7 @@ void TQTextBrowser::setSource(const TQString& name) if ( firstTag.left( 3 ) == "restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); #endif return; } @@ -304,7 +304,7 @@ void TQTextBrowser::setSource(const TQString& name) #ifndef QT_NO_CURSOR if ( isVisible() ) - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); #endif emit sourceChanged( url ); diff --git a/src/widgets/qtextedit.cpp b/src/widgets/qtextedit.cpp index cb6da79c3..5910ef4c6 100644 --- a/src/widgets/qtextedit.cpp +++ b/src/widgets/qtextedit.cpp @@ -2604,7 +2604,7 @@ void TQTextEdit::contentsMouseDoubleClickEvent( TQMouseEvent * e ) repaintChanged(); - d->trippleClickTimer->start( qApp->doubleClickInterval(), TRUE ); + d->trippleClickTimer->start( tqApp->doubleClickInterval(), TRUE ); d->trippleClickPoint = e->globalPos(); } inDoubleClick = TRUE; diff --git a/src/widgets/qtoolbutton.cpp b/src/widgets/qtoolbutton.cpp index eac653d99..644353820 100644 --- a/src/widgets/qtoolbutton.cpp +++ b/src/widgets/qtoolbutton.cpp @@ -915,7 +915,7 @@ void TQToolButton::popupTimerDone() horizontal = FALSE; #endif TQPoint p; - TQRect screen = qApp->desktop()->availableGeometry( this ); + TQRect screen = tqApp->desktop()->availableGeometry( this ); if ( horizontal ) { if ( TQApplication::reverseLayout() ) { if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + d->popup->sizeHint().height() <= screen.height() ) { diff --git a/src/widgets/qtooltip.cpp b/src/widgets/qtooltip.cpp index 5507bfc79..fc33aef55 100644 --- a/src/widgets/qtooltip.cpp +++ b/src/widgets/qtooltip.cpp @@ -156,7 +156,7 @@ static void initTipManager() TQTipManager::TQTipManager() - : TQObject( qApp, "toolTipManager" ) + : TQObject( tqApp, "toolTipManager" ) { wakeUpDelay = 700; tips = new TQPtrDict( 313 ); @@ -173,9 +173,9 @@ TQTipManager::TQTipManager() TQTipManager::~TQTipManager() { - if ( isApplicationFilter && !qApp->closingDown() ) { - qApp->setGlobalMouseTracking( FALSE ); - qApp->removeEventFilter( tipManager ); + if ( isApplicationFilter && !tqApp->closingDown() ) { + tqApp->setGlobalMouseTracking( FALSE ); + tqApp->removeEventFilter( tipManager ); } delete label; @@ -234,10 +234,10 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w, showTip(); } - if ( !isApplicationFilter && qApp ) { + if ( !isApplicationFilter && tqApp ) { isApplicationFilter = TRUE; - qApp->installEventFilter( tipManager ); - qApp->setGlobalMouseTracking( TRUE ); + tqApp->installEventFilter( tipManager ); + tqApp->setGlobalMouseTracking( TRUE ); } if ( t->group ) { @@ -371,11 +371,11 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e ) // avoid dumping core in case of application madness, and return // tquickly for some common but irrelevant events if ( e->type() == TQEvent::WindowDeactivate && - qApp && !qApp->activeWindow() && + tqApp && !tqApp->activeWindow() && label && label->isVisible() ) hideTipAndSleep(); - if ( !qApp + if ( !tqApp || !obj || !obj->isWidgetType() // isWidgetType() catches most stuff || e->type() == TQEvent::Paint || e->type() == TQEvent::Timer diff --git a/src/widgets/qwhatsthis.cpp b/src/widgets/qwhatsthis.cpp index f1c4fe6a5..6e3338b0b 100644 --- a/src/widgets/qwhatsthis.cpp +++ b/src/widgets/qwhatsthis.cpp @@ -475,7 +475,7 @@ void TQWhatsThisButton::mouseReleased() TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); #endif wt->state = TQWhatsThisPrivate::Waiting; - qApp->installEventFilter( wt ); + tqApp->installEventFilter( wt ); } } @@ -502,7 +502,7 @@ TQWhatsThisPrivate::TQWhatsThisPrivate() TQWhatsThisPrivate::~TQWhatsThisPrivate() { #ifndef QT_NO_CURSOR - if ( state == Waiting && qApp ) + if ( state == Waiting && tqApp ) TQApplication::restoreOverrideCursor(); #endif // the two straight-and-simple dicts @@ -643,7 +643,7 @@ void TQWhatsThisPrivate::leaveWhatsThisMode() TQApplication::restoreOverrideCursor(); #endif state = Inactive; - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); } } @@ -923,7 +923,7 @@ void TQWhatsThis::enterWhatsThisMode() TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); #endif wt->state = TQWhatsThisPrivate::Waiting; - qApp->installEventFilter( wt ); + tqApp->installEventFilter( wt ); } } diff --git a/src/widgets/qwidgetresizehandler.cpp b/src/widgets/qwidgetresizehandler.cpp index ff964b12c..f0d21a600 100644 --- a/src/widgets/qwidgetresizehandler.cpp +++ b/src/widgets/qwidgetresizehandler.cpp @@ -64,7 +64,7 @@ TQWidgetResizeHandler::TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw, co range = frame ? frame->frameWidth() : RANGE; range = TQMAX( RANGE, range ); activeForMove = activeForResize = TRUE; - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); } void TQWidgetResizeHandler::setActive( Action ac, bool b ) @@ -116,7 +116,7 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee ) #ifndef QT_NO_SIZEGRIP || ::qt_cast(o) #endif - || qApp->activePopupWidget() ) { + || tqApp->activePopupWidget() ) { if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease ) buttonDown = FALSE; return FALSE; diff --git a/src/workspace/qworkspace.cpp b/src/workspace/qworkspace.cpp index e57f07f7d..b46a9dddb 100644 --- a/src/workspace/qworkspace.cpp +++ b/src/workspace/qworkspace.cpp @@ -601,7 +601,7 @@ void TQWorkspace::place( TQWidget* w) TQRect r2(0, 0, 0, 0); TQRect maxRect = rect(); if(d->wmode == TopLevel) { - const TQDesktopWidget *dw = qApp->desktop(); + const TQDesktopWidget *dw = tqApp->desktop(); maxRect = dw->availableGeometry(dw->screenNumber(topLevelWidget())); } int x = maxRect.left(), y = maxRect.top(); @@ -800,7 +800,7 @@ void TQWorkspace::resizeEvent( TQResizeEvent * ) void TQWorkspace::handleUndock(TQDockWindow *w) { - const TQDesktopWidget *dw = qApp->desktop(); + const TQDesktopWidget *dw = tqApp->desktop(); TQRect maxRect = dw->availableGeometry(dw->screenNumber(d->mainwindow)); TQPoint wpos(maxRect.left(), maxRect.top()); int possible = 0; @@ -1026,8 +1026,8 @@ void TQWorkspace::showEvent( TQShowEvent *e ) TQWidget *w = new TQWidget(NULL, "TQDoesNotExist", WType_Dialog | WStyle_Customize | WStyle_NoBorder); -// if(qApp->mainWidget() == o) -// TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); +// if(tqApp->mainWidget() == o) +// TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit())); TQDesktopWidget *dw = TQApplication::desktop(); w->setGeometry(dw->availableGeometry(dw->screenNumber(o))); o->reparent(w, TQPoint(0, 0), TRUE); @@ -1197,9 +1197,9 @@ void TQWorkspace::maximizeWindow( TQWidget* w) c->adjustToFullscreen(); c->show(); c->internalRaise(); - qApp->sendPostedEvents( c, TQEvent::Resize ); - qApp->sendPostedEvents( c, TQEvent::Move ); - qApp->sendPostedEvents( c, TQEvent::ShowWindowRequest ); + tqApp->sendPostedEvents( c, TQEvent::Resize ); + tqApp->sendPostedEvents( c, TQEvent::Move ); + tqApp->sendPostedEvents( c, TQEvent::ShowWindowRequest ); if ( d->maxWindow != c ) { if ( d->maxWindow ) d->maxWindow->setGeometry( d->maxRestore ); @@ -1892,7 +1892,7 @@ void TQWorkspace::cascade() int h = prefSize.height(); child->showNormal(); - qApp->sendPostedEvents( 0, TQEvent::ShowNormal ); + tqApp->sendPostedEvents( 0, TQEvent::ShowNormal ); if ( y + h > height() ) y = 0; if ( x + w > width() ) @@ -1987,7 +1987,7 @@ void TQWorkspace::tile() c->TQFrame::move( p ); } else { c->showNormal(); - qApp->sendPostedEvents( 0, TQEvent::ShowNormal ); + tqApp->sendPostedEvents( 0, TQEvent::ShowNormal ); used[row*cols+col] = TRUE; TQSize sz(w, h); TQSize bsize(c->baseSize()); @@ -2731,9 +2731,9 @@ void TQWorkspaceChild::adjustToFullscreen() if ( !childWidget ) return; - qApp->sendPostedEvents( this, TQEvent::Resize ); - qApp->sendPostedEvents( childWidget, TQEvent::Resize ); - qApp->sendPostedEvents( childWidget, TQEvent::Move ); + tqApp->sendPostedEvents( this, TQEvent::Resize ); + tqApp->sendPostedEvents( childWidget, TQEvent::Resize ); + tqApp->sendPostedEvents( childWidget, TQEvent::Move ); if( style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this) ) { setGeometry( 0, 0, parentWidget()->width(), parentWidget()->height()); } else { diff --git a/tools/assistant/config.cpp b/tools/assistant/config.cpp index e47e38bdc..ad7e7edda 100644 --- a/tools/assistant/config.cpp +++ b/tools/assistant/config.cpp @@ -53,7 +53,7 @@ inline TQString getVersionString() Config::Config() : hideSidebar( FALSE ), profil( 0 ), maximized(FALSE) { - fontSiz = qApp->font().pointSize(); + fontSiz = tqApp->font().pointSize(); if( !static_configuration ) { static_configuration = this; } else { @@ -120,13 +120,13 @@ void Config::load() linkCol = settings.readEntry( key + "LinkColor", "#0000FF" ); src = settings.readListEntry( profkey + "Source" ); sideBar = settings.readNumEntry( key + "SideBarPage" ); - if (qApp->type() != TQApplication::Tty) { - fontFam = settings.readEntry( key + "Family", qApp->font().family() ); + if (tqApp->type() != TQApplication::Tty) { + fontFam = settings.readEntry( key + "Family", tqApp->font().family() ); fontFix = settings.readEntry( key + "FixedFamily", "courier" ); fontSiz = settings.readNumEntry( key + "Size", -1 ); if ( fontSiz < 4 ) { - fontSiz = qApp->font().pointSize(); + fontSiz = tqApp->font().pointSize(); } geom.setRect( settings.readNumEntry( key + "GeometryX", TQApplication::desktop()->availableGeometry().x() ), @@ -162,14 +162,14 @@ void Config::saveSettings() settings.writeEntry( key + "LinkColor", linkCol ); settings.writeEntry( profkey + "Source", src ); settings.writeEntry( key + "SideBarPage", sideBarPage() ); - if (qApp->type() != TQApplication::Tty) { + if (tqApp->type() != TQApplication::Tty) { settings.writeEntry( key + "GeometryX", geom.x() ); settings.writeEntry( key + "GeometryY", geom.y() ); settings.writeEntry( key + "GeometryWidth", geom.width() ); settings.writeEntry( key + "GeometryHeight", geom.height() ); settings.writeEntry( key + "GeometryMaximized", maximized ); settings.writeEntry( key + "Family", fontFam ); - settings.writeEntry( key + "Size", fontSiz < 4 ? qApp->font().pointSize() : fontSiz ); + settings.writeEntry( key + "Size", fontSiz < 4 ? tqApp->font().pointSize() : fontSiz ); settings.writeEntry( key + "FixedFamily", fontFix ); } if ( !hideSidebar ) diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp index c447c4cb4..adf39f2fe 100644 --- a/tools/assistant/helpdialogimpl.cpp +++ b/tools/assistant/helpdialogimpl.cpp @@ -230,7 +230,7 @@ void HelpDialog::initialize() listContents->header()->hide(); listContents->header()->setStretchEnabled( TRUE ); framePrepare->hide(); - connect( qApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()) ); + connect( tqApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()) ); termsEdit->setValidator( new SearchValidator( termsEdit ) ); @@ -254,7 +254,7 @@ void HelpDialog::initialize() void HelpDialog::processEvents() { - qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); + tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); } @@ -292,7 +292,7 @@ void HelpDialog::timerEvent(TQTimerEvent *e) help->setWindowOpacity((opacity-=4)/255.0); if (opacity<=0) #endif - qApp->quit(); + tqApp->quit(); } diff --git a/tools/assistant/index.cpp b/tools/assistant/index.cpp index 4ce081deb..24372feed 100644 --- a/tools/assistant/index.cpp +++ b/tools/assistant/index.cpp @@ -69,7 +69,7 @@ Index::Index( const TQString &dp, const TQString &hp ) { alreadyHaveDocList = FALSE; lastWindowClosed = FALSE; - connect( qApp, SIGNAL( lastWindowClosed() ), + connect( tqApp, SIGNAL( lastWindowClosed() ), this, SLOT( setLastWinClosed() ) ); } @@ -79,7 +79,7 @@ Index::Index( const TQStringList &dl, const TQString &hp ) docList = dl; alreadyHaveDocList = TRUE; lastWindowClosed = FALSE; - connect( qApp, SIGNAL( lastWindowClosed() ), + connect( tqApp, SIGNAL( lastWindowClosed() ), this, SLOT( setLastWinClosed() ) ); } diff --git a/tools/assistant/mainwindow.ui.h b/tools/assistant/mainwindow.ui.h index d257c7cf9..d9847b8df 100644 --- a/tools/assistant/mainwindow.ui.h +++ b/tools/assistant/mainwindow.ui.h @@ -118,14 +118,14 @@ void MainWindow::setup() if( setupCompleted ) return; - qApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); + tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); statusBar()->message( tr( "Initializing TQt Assistant..." ) ); setupCompleted = TRUE; helpDock->initialize(); connect( actionGoPrevious, SIGNAL( activated() ), tabs, SLOT( backward() ) ); connect( actionGoNext, SIGNAL( activated() ), tabs, SLOT( forward() ) ); connect( actionEditCopy, SIGNAL( activated() ), tabs, SLOT( copy() ) ); - connect( actionFileExit, SIGNAL( activated() ), qApp, SLOT( closeAllWindows() ) ); + connect( actionFileExit, SIGNAL( activated() ), tqApp, SLOT( closeAllWindows() ) ); connect( actionAddBookmark, SIGNAL( activated() ), helpDock, SLOT( addBookmark() ) ); connect( helpDock, SIGNAL( showLink( const TQString& ) ), @@ -167,7 +167,7 @@ void MainWindow::setup() PopupMenu->insertItem( tr( "Vie&ws" ), createDockWindowMenu() ); helpDock->tabWidget->setCurrentPage( config->sideBarPage() ); - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); actionGoPrevious->setEnabled( FALSE ); actionGoNext->setEnabled( FALSE ); } @@ -335,8 +335,8 @@ void MainWindow::print() if ( !p.begin( &printer ) ) return; - qApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); - qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); + tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); + tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); TQPaintDeviceMetrics metrics(p.device()); TQTextBrowser *browser = tabs->currentBrowser(); @@ -352,7 +352,7 @@ void MainWindow::print() richText.setWidth( &p, view.width() ); int page = 1; do { - qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); + tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); richText.draw( &p, margin, margin, view, palette().active() ); view.moveBy( 0, view.height() ); @@ -365,8 +365,8 @@ void MainWindow::print() page++; } while (TRUE); - qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); - qApp->restoreOverrideCursor(); + tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); + tqApp->restoreOverrideCursor(); } } diff --git a/tools/designer/designer/customwidgeteditorimpl.cpp b/tools/designer/designer/customwidgeteditorimpl.cpp index ac517f1df..515715200 100644 --- a/tools/designer/designer/customwidgeteditorimpl.cpp +++ b/tools/designer/designer/customwidgeteditorimpl.cpp @@ -403,7 +403,7 @@ void CustomWidgetEditor::checkWidgetName() "to rename this widget with this name." ).arg( s ) ); if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) { boxWidgets->setCurrentItem( i ); - qApp->processEvents(); + tqApp->processEvents(); } editClass->setText( w->className ); classNameChanged( w->className ); diff --git a/tools/designer/designer/formfile.cpp b/tools/designer/designer/formfile.cpp index 2afe8423d..4f88b29e5 100644 --- a/tools/designer/designer/formfile.cpp +++ b/tools/designer/designer/formfile.cpp @@ -218,7 +218,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) TQCString data( f.size() ); f.readBlock( data.data(), f.size() ); f2.writeBlock( data ); - } else if ( qApp->type() != TQApplication::Tty ) { + } else if ( tqApp->type() != TQApplication::Tty ) { TQMessageBox::warning( MainWindow::self, "Save", "The file " + codeFile() + " could not be saved" ); } diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp index b352b11d1..50dd96207 100644 --- a/tools/designer/designer/formwindow.cpp +++ b/tools/designer/designer/formwindow.cpp @@ -606,7 +606,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) delete l; } } - qApp->processEvents(); + tqApp->processEvents(); } if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && sel && e->button() == LeftButton ) { // control pressed and selected, unselect widget @@ -860,7 +860,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) break; case CONNECT_TOOL: restoreConnectionLine(); - wid = qApp->widgetAt( e->globalPos(), TRUE ); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) wid = designerWidget( wid ); if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) @@ -874,7 +874,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) mainWindow()->statusBar()->message( tr( "Connect '%1' to '%2'" ).arg( startWidget->name() ). arg( endWidget->name() ) ); currentPos = mapFromGlobal( e->globalPos() ); - qApp->processEvents(); + tqApp->processEvents(); if ( drawRecRect ) restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), ( (TQWidget*)oldendWidget )->size() ) ); @@ -884,7 +884,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( !validForBuddy ) break; restoreConnectionLine(); - wid = qApp->widgetAt( e->globalPos(), TRUE ); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) wid = designerWidget( wid ); if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) @@ -904,7 +904,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) else mainWindow()->statusBar()->message( tr( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); currentPos = mapFromGlobal( e->globalPos() ); - qApp->processEvents(); + tqApp->processEvents(); if ( drawRecRect && oldendWidget ) restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), ( (TQWidget*)oldendWidget )->size() ) ); @@ -1035,7 +1035,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) ( (TQWidget*)endWidget )->pos() ), ( (TQWidget*)endWidget )->size() ) ); endUnclippedPainter(); - qApp->processEvents(); + tqApp->processEvents(); if ( startWidget && endWidget ) { if ( currTool == CONNECT_TOOL ) diff --git a/tools/designer/designer/hierarchyview.cpp b/tools/designer/designer/hierarchyview.cpp index 77c84d0b9..25d0f3340 100644 --- a/tools/designer/designer/hierarchyview.cpp +++ b/tools/designer/designer/hierarchyview.cpp @@ -953,7 +953,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T item->setRenameEnabled( 0, TRUE ); setCurrentItem( item ); ensureItemVisible( item ); - qApp->processEvents(); + tqApp->processEvents(); newItem = item; item->startRename( 0 ); } diff --git a/tools/designer/designer/listeditor.ui.h b/tools/designer/designer/listeditor.ui.h index 5468f796a..3092706d5 100644 --- a/tools/designer/designer/listeditor.ui.h +++ b/tools/designer/designer/listeditor.ui.h @@ -30,7 +30,7 @@ void ListEditor::addItem() { TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() ); i->setRenameEnabled( 0, TRUE ); - qApp->processEvents(); + tqApp->processEvents(); i->startRename( 0 ); } diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 4f22fb8b5..1d97ffe44 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -185,7 +185,7 @@ MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir ) setupPluginManagers(); if ( !single ) - qApp->setMainWidget( this ); + tqApp->setMainWidget( this ); TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); #ifndef Q_WS_MACX setIcon( TQPixmap::fromMimeSource( "designer_appicon.png" ) ); @@ -247,13 +247,13 @@ MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir ) emit hasActiveWindow( FALSE ); lastPressWidget = 0; - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); - TQSize as( qApp->desktop()->size() ); + TQSize as( tqApp->desktop()->size() ); as -= TQSize( 30, 30 ); resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - connect( qApp->clipboard(), SIGNAL( dataChanged() ), + connect( tqApp->clipboard(), SIGNAL( dataChanged() ), this, SLOT( clipboardChanged() ) ); clipboardChanged(); layoutChilds = FALSE; @@ -734,7 +734,7 @@ void MainWindow::previewForm( const TQString & style ) void MainWindow::helpContents() { - TQWidget *focusWidget = qApp->focusWidget(); + TQWidget *focusWidget = tqApp->focusWidget(); bool showClassDocu = TRUE; while ( focusWidget ) { if ( focusWidget->isA( "PropertyList" ) ) { @@ -1525,7 +1525,7 @@ void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) setupRMBSpecialCommands( ids, commands, fw ); setupRMBProperties( ids, commands, fw ); - qApp->processEvents(); + tqApp->processEvents(); int r = rmbFormWindow->exec( gp ); handleRMBProperties( r, commands, fw ); @@ -1543,7 +1543,7 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg setupRMBSpecialCommands( ids, commands, w ); setupRMBProperties( ids, commands, w ); - qApp->processEvents(); + tqApp->processEvents(); int r = rmbWidgets->exec( gp ); handleRMBProperties( r, commands, w ); @@ -1997,7 +1997,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap &command void MainWindow::clipboardChanged() { - TQString text( qApp->clipboard()->text() ); + TQString text( tqApp->clipboard()->text() ); if (qWorkspace()->activeWindow() && ::qt_cast(qWorkspace()->activeWindow())) { actionEditPaste->setEnabled(!text.isEmpty()); } else { @@ -3355,7 +3355,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) fw->showNormal(); fw->setFocus(); lastActiveFormWindow = fw; - qApp->processEvents(); + tqApp->processEvents(); se = editSource(); if ( se ) { switch ( lm ) { @@ -3430,7 +3430,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); else fw->formFile()->showEditor( FALSE ); - qApp->processEvents(); // give all views the chance to get the formwindow + tqApp->processEvents(); // give all views the chance to get the formwindow SourceEditor *se = editSource(); if ( se ) { switch ( lm ) { diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index 86da0e524..dbff60da0 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -1082,7 +1082,7 @@ void MainWindow::fileQuit() { close(); if ( !singleProjectMode() ) - qApp->closeAllWindows(); + tqApp->closeAllWindows(); } void MainWindow::fileClose() @@ -1531,7 +1531,7 @@ void MainWindow::editCopy() return; } if ( formWindow() ) - qApp->clipboard()->setText( formWindow()->copy() ); + tqApp->clipboard()->setText( formWindow()->copy() ); } void MainWindow::editPaste() @@ -1555,7 +1555,7 @@ void MainWindow::editPaste() } if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - formWindow()->paste( qApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); + formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); hierarchyView->widgetInserted( 0 ); formWindow()->commandHistory()->setModified( TRUE ); } else { @@ -2048,8 +2048,8 @@ void MainWindow::showStartDialog() { if ( singleProjectMode() ) return; - for ( int i = 1; i < qApp->argc(); ++i ) { - TQString arg = qApp->argv()[i]; + for ( int i = 1; i < tqApp->argc(); ++i ) { + TQString arg = tqApp->argv()[i]; if ( arg[0] != '-' ) return; } diff --git a/tools/designer/designer/menubareditor.cpp b/tools/designer/designer/menubareditor.cpp index 6687eddb2..2667519ff 100644 --- a/tools/designer/designer/menubareditor.cpp +++ b/tools/designer/designer/menubareditor.cpp @@ -822,7 +822,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) { - TQWidget * fw = qApp->focusWidget(); + TQWidget * fw = tqApp->focusWidget(); if ( e->lostFocus() && !::qt_cast(fw) ) hideItem(); update(); diff --git a/tools/designer/designer/multilineeditorimpl.cpp b/tools/designer/designer/multilineeditorimpl.cpp index d257d1636..b7ccc67ac 100644 --- a/tools/designer/designer/multilineeditorimpl.cpp +++ b/tools/designer/designer/multilineeditorimpl.cpp @@ -265,7 +265,7 @@ int MultiLineEditor::exec() { res = 1; show(); - qApp->enter_loop(); + tqApp->enter_loop(); return res; } @@ -315,7 +315,7 @@ void MultiLineEditor::cancelClicked() void MultiLineEditor::closeEvent( TQCloseEvent *e ) { - qApp->exit_loop(); + tqApp->exit_loop(); MultiLineEditorBase::closeEvent( e ); } diff --git a/tools/designer/designer/outputwindow.cpp b/tools/designer/designer/outputwindow.cpp index 5a4479b9d..e54dc9de1 100644 --- a/tools/designer/designer/outputwindow.cpp +++ b/tools/designer/designer/outputwindow.cpp @@ -114,7 +114,7 @@ static void debugMessageOutput( TQtMsgType type, const char *msg ) abort(); } - qApp->flush(); + tqApp->flush(); } void OutputWindow::setupDebug() diff --git a/tools/designer/designer/pixmapchooser.cpp b/tools/designer/designer/pixmapchooser.cpp index 4693013bb..de90f369f 100644 --- a/tools/designer/designer/pixmapchooser.cpp +++ b/tools/designer/designer/pixmapchooser.cpp @@ -89,7 +89,7 @@ void PixmapView::previewUrl( const TQUrl &u ) static void buildImageFormatList( TQString &filter, TQString &all ) { - all = qApp->translate( "qChoosePixmap", "All Pixmaps (" ); + all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" ); for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { TQString outputFormat = TQImageIO::outputFormats().at( i ); TQString outputExtension; @@ -97,12 +97,12 @@ static void buildImageFormatList( TQString &filter, TQString &all ) outputExtension = outputFormat.lower(); else outputExtension = "jpg;*.jpeg"; - filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ). + filter += tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ). arg( outputFormat ).arg( "*." + outputExtension); all += "*." + outputExtension + ";"; } - filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) ); - filter += qApp->translate( "qChoosePixmap", "All Files (*)" ); + filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) ); + filter += tqApp->translate( "qChoosePixmap", "All Files (*)" ); } TQStringList qChoosePixmaps( TQWidget *parent ) @@ -121,7 +121,7 @@ TQStringList qChoosePixmaps( TQWidget *parent ) fd.setContentsPreview( pw, pw ); fd.setViewMode( TQFileDialog::List ); fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images..." ) ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); if ( fd.exec() == TQDialog::Accepted ) return fd.selectedFiles(); return TQStringList(); @@ -144,7 +144,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T fd.setContentsPreview( pw, pw ); fd.setViewMode( TQFileDialog::List ); fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( qApp->translate( "qChoosePixmap", "Choose a Pixmap..." ) ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose a Pixmap..." ) ); if ( fd.exec() == TQDialog::Accepted ) { TQPixmap pix( fd.selectedFile() ); if ( fn ) diff --git a/tools/designer/designer/popupmenueditor.cpp b/tools/designer/designer/popupmenueditor.cpp index af5a59594..355a65491 100644 --- a/tools/designer/designer/popupmenueditor.cpp +++ b/tools/designer/designer/popupmenueditor.cpp @@ -1011,7 +1011,7 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) { - TQWidget * fw = qApp->focusWidget(); + TQWidget * fw = tqApp->focusWidget(); if ( !fw || ( !::qt_cast(fw) && fw != lineEdit ) ) { hideSubMenu(); if ( fw && ::qt_cast(fw) ) diff --git a/tools/designer/designer/project.cpp b/tools/designer/designer/project.cpp index 862dd1742..2d5dc2dd2 100644 --- a/tools/designer/designer/project.cpp +++ b/tools/designer/designer/project.cpp @@ -1594,5 +1594,5 @@ TQString Project::locationOfObject( TQObject *o ) bool Project::hasGUI() const { - return qApp->type() != TQApplication::Tty; + return tqApp->type() != TQApplication::Tty; } diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index efbe42b9d..af0db8e31 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -333,14 +333,14 @@ void PropertyItem::setOpen( bool b ) children.setAutoDelete( TRUE ); children.clear(); children.setAutoDelete( FALSE ); - qApp->processEvents(); + tqApp->processEvents(); listview->updateEditorSize(); return; } createChildren(); initChildren(); - qApp->processEvents(); + tqApp->processEvents(); listview->updateEditorSize(); } @@ -552,10 +552,10 @@ TQString PropertyItem::currentItemFromObject() const void PropertyItem::setFocus( TQWidget *w ) { - if ( !qApp->focusWidget() || + if ( !tqApp->focusWidget() || listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) && - !qApp->focusWidget()->inherits( "Editor" ) ) ) + ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) && + !tqApp->focusWidget()->inherits( "Editor" ) ) ) w->setFocus(); } @@ -2560,7 +2560,7 @@ void PropertyKeysequenceItem::setValue() PropertyItem::setValue( v ); if (sequence->hasFocus() // if the user wants to use F1 as accelerator, Designer will pop up a TQWhatsThat widget - || (qApp->focusWidget() && qApp->focusWidget()->inherits("TQWhatsThat"))) + || (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQWhatsThat"))) notifyValueChange(); setChanged( TRUE ); } @@ -3314,7 +3314,7 @@ void PropertyList::setupProperties() sort(); setSorting( -1 ); setCurrentItem( firstChild() ); - qApp->processEvents(); + tqApp->processEvents(); } updateEditorSize(); diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index 4f6c997dc..96720dc4e 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -1637,7 +1637,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant case TQVariant::Font: { TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; - TQFont f( qApp->font() ); + TQFont f( tqApp->font() ); if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) f = ((TQWidget*)w)->parentWidget()->font(); TQFont f2( v.toFont() ); @@ -2188,7 +2188,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD TQVariant defVarient; if ( e.tagName() == "font" ) { - TQFont f( qApp->font() ); + TQFont f( tqApp->font() ); if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) f = ( (TQWidget*)obj )->parentWidget()->font(); defVarient = TQVariant( f ); diff --git a/tools/designer/designer/syntaxhighlighter_html.cpp b/tools/designer/designer/syntaxhighlighter_html.cpp index 629941d7a..c41c8bac3 100644 --- a/tools/designer/designer/syntaxhighlighter_html.cpp +++ b/tools/designer/designer/syntaxhighlighter_html.cpp @@ -41,12 +41,12 @@ SyntaxHighlighter_HTML::SyntaxHighlighter_HTML() : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) { - TQFont f( qApp->font() ); + TQFont f( tqApp->font() ); - addFormat(Standard, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Text))); - addFormat(Keyword, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Dark))); - addFormat(Attribute, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Link))); - addFormat(AttribValue, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited))); + addFormat(Standard, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Text))); + addFormat(Keyword, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Dark))); + addFormat(Attribute, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Link))); + addFormat(AttribValue, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited))); } SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML() diff --git a/tools/designer/editor/conf.cpp b/tools/designer/editor/conf.cpp index 336f44712..bff128679 100644 --- a/tools/designer/editor/conf.cpp +++ b/tools/designer/editor/conf.cpp @@ -41,10 +41,10 @@ TQMap Config::defaultStyles() { ConfigStyle s; TQMap styles; - int normalSize = qApp->font().pointSize(); - TQString normalFamily = qApp->font().family(); + int normalSize = tqApp->font().pointSize(); + TQString normalFamily = tqApp->font().family(); TQString commentFamily = "times"; - int normalWeight = qApp->font().weight(); + int normalWeight = tqApp->font().weight(); s.font = TQFont( normalFamily, normalSize, normalWeight ); s.color = TQt::black; diff --git a/tools/designer/examples/addressbook/addressbook.ui.h b/tools/designer/examples/addressbook/addressbook.ui.h index 9b1d5460d..a86d28448 100644 --- a/tools/designer/examples/addressbook/addressbook.ui.h +++ b/tools/designer/examples/addressbook/addressbook.ui.h @@ -112,7 +112,7 @@ void AddressBook::fileSaveAs() void AddressBook::fileExit() { - qApp->exit(); + tqApp->exit(); } void AddressBook::editFind() diff --git a/tools/designer/examples/multiclip/multiclip.ui.h b/tools/designer/examples/multiclip/multiclip.ui.h index a2b0b0cf7..a4287fa44 100644 --- a/tools/designer/examples/multiclip/multiclip.ui.h +++ b/tools/designer/examples/multiclip/multiclip.ui.h @@ -35,7 +35,7 @@ void MulticlipForm::init() lengthLCDNumber->setBackgroundColor( darkBlue ); currentLineEdit->setFocus(); - cb = qApp->clipboard(); + cb = tqApp->clipboard(); connect( cb, SIGNAL( dataChanged() ), SLOT( dataChanged() ) ); if ( cb->supportsSelection() ) connect( cb, SIGNAL( selectionChanged() ), SLOT( selectionChanged() ) ); diff --git a/tools/designer/examples/richedit/richedit.ui.h b/tools/designer/examples/richedit/richedit.ui.h index e6acad87b..02f7b1ef4 100644 --- a/tools/designer/examples/richedit/richedit.ui.h +++ b/tools/designer/examples/richedit/richedit.ui.h @@ -17,7 +17,7 @@ void EditorForm::init() void EditorForm::fileExit() { if ( saveAndContinue( "Exit" ) ) - qApp->exit(); + tqApp->exit(); } void EditorForm::fileNew() diff --git a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp index ce30936c0..7607cf730 100644 --- a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp +++ b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp @@ -134,7 +134,7 @@ static TQMap > *wordMap = 0; SyntaxHighlighter_CPP::SyntaxHighlighter_CPP() : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) { - TQFont f( qApp->font() ); + TQFont f( tqApp->font() ); addFormat( Standard, new TQTextFormat( f, TQt::black ) ); addFormat( Number, new TQTextFormat( f, TQt::darkBlue ) ); diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp index 626b30934..f886a2595 100644 --- a/tools/designer/plugins/glade/glade2ui.cpp +++ b/tools/designer/plugins/glade/glade2ui.cpp @@ -2192,7 +2192,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName ) yyOut = TQString::null; widgetNo++; - qApp->processEvents(); + tqApp->processEvents(); if ( fremskritt.wasCancelled() ) break; fremskritt.setProgress( widgetNo ); diff --git a/tools/designer/plugins/wizards/main.cpp b/tools/designer/plugins/wizards/main.cpp index b3400acc4..5060ec7ee 100644 --- a/tools/designer/plugins/wizards/main.cpp +++ b/tools/designer/plugins/wizards/main.cpp @@ -106,12 +106,12 @@ void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *wi templ == "TQDataView" || templ == "TQDataBrowser" || templ == "TQDataTable" ) { - SqlFormWizard wizard( aIface, widget, qApp->mainWidget(), fw, 0, TRUE ); + SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, TRUE ); wizard.exec(); } #endif if ( templ == "TQMainWindow" ) { - MainWindowWizardBase wizard( qApp->mainWidget(), 0, TRUE ); + MainWindowWizardBase wizard( tqApp->mainWidget(), 0, TRUE ); wizard.setAppInterface( aIface, fw, widget ); wizard.exec(); } diff --git a/tools/designer/shared/globaldefs.h b/tools/designer/shared/globaldefs.h index 4f4c2cb21..f093e0a36 100644 --- a/tools/designer/shared/globaldefs.h +++ b/tools/designer/shared/globaldefs.h @@ -51,7 +51,7 @@ static void init_colors() return; #if 0 // a calculated alternative for backColor1 - TQColorGroup myCg = qApp->palette().active(); + TQColorGroup myCg = tqApp->palette().active(); int h1, s1, v1; int h2, s2, v2; myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 ); diff --git a/tools/designer/uilib/qwidgetfactory.cpp b/tools/designer/uilib/qwidgetfactory.cpp index cbf49cc47..9cd0ad75d 100644 --- a/tools/designer/uilib/qwidgetfactory.cpp +++ b/tools/designer/uilib/qwidgetfactory.cpp @@ -296,7 +296,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, bool failed = FALSE; if ( !f.open( IO_ReadOnly ) ) failed = TRUE; - if ( failed && qApp->type() == TQApplication::Tty ) { + if ( failed && tqApp->type() == TQApplication::Tty ) { // for TQSA: If we have no GUI, we have no form definition // files, but just the code. So try if only the code exists. f.setName( uiFile + ".qs" ); @@ -331,7 +331,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge widgetFactory->toplevel = 0; // If we have no GUI, we only want to load the code - if ( qApp->type() != TQApplication::Tty ) { + if ( tqApp->type() != TQApplication::Tty ) { TQIODevice::Offset start = dev->at(); Q_UINT32 magic; TQDataStream in( dev ); @@ -2612,12 +2612,12 @@ void TQWidgetFactory::loadExtraSource() TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment ) { - return qApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), + return tqApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), TQApplication::UnicodeUTF8 ); } TQString TQWidgetFactory::translate( const char *sourceText, const char *comment ) { - return qApp->translate( d->translationContext, sourceText, comment, + return tqApp->translate( d->translationContext, sourceText, comment, TQApplication::UnicodeUTF8 ); } diff --git a/tools/linguist/book/linguist-programmer.leaf b/tools/linguist/book/linguist-programmer.leaf index 771fff592..7074d59ff 100644 --- a/tools/linguist/book/linguist-programmer.leaf +++ b/tools/linguist/book/linguist-programmer.leaf @@ -253,7 +253,7 @@ QApplication::translate() function directly: void same_global_function( LoginWidget *logwid ) { QLabel *label = new QLabel( - qApp->translate("LoginWidget", "Password:"), + tqApp->translate("LoginWidget", "Password:"), logwid ); } \endcode @@ -291,7 +291,7 @@ Example of QT_TRANSLATE_NOOP(): QString global_greeting( int greet_type ) { - return qApp->translate( "FriendlyConversation", + return tqApp->translate( "FriendlyConversation", greeting_strings[greet_type] ); } \endcode @@ -597,7 +597,7 @@ The \c TQ_OBJECT macro defines \c tr(x) in \c ArrowPad like this \index translate()!QApplication \code - qApp->translate( "ArrowPad", x ) + tqApp->translate( "ArrowPad", x ) \endcode Knowing which class each source text appears in enables \e {Qt diff --git a/tools/linguist/linguist/msgedit.cpp b/tools/linguist/linguist/msgedit.cpp index 21d54af8f..86c3b55d4 100644 --- a/tools/linguist/linguist/msgedit.cpp +++ b/tools/linguist/linguist/msgedit.cpp @@ -515,7 +515,7 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, this, SIGNAL(cutAvailable(bool)) ); connect( editorPage->translationMed, SIGNAL(copyAvailable(bool)), this, SIGNAL(copyAvailable(bool)) ); - connect( qApp->clipboard(), SIGNAL(dataChanged()), + connect( tqApp->clipboard(), SIGNAL(dataChanged()), this, SLOT(updateCanPaste()) ); connect( phraseLv, SIGNAL(doubleClicked(TQListViewItem *)), this, SLOT(insertPhraseInTranslation(TQListViewItem *)) ); @@ -814,7 +814,7 @@ void MessageEditor::updateCanPaste() { bool oldCanPaste = canPaste; canPaste = ( !editorPage->translationMed->isReadOnly() && - !qApp->clipboard()->text().isNull() ); + !tqApp->clipboard()->text().isNull() ); if ( canPaste != oldCanPaste ) emit pasteAvailable( canPaste ); } diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index 945d41507..0a93e89b8 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -130,7 +130,7 @@ bool QphHandler::fatalError( const TQXmlParseException& exception ) msg.sprintf( "Parse error at line %d, column %d (%s).", exception.lineNumber(), exception.columnNumber(), exception.message().latin1() ); - TQMessageBox::information( qApp->mainWidget(), + TQMessageBox::information( tqApp->mainWidget(), TQObject::tr("TQt Linguist"), msg ); } return FALSE; diff --git a/tools/linguist/linguist/trwindow.cpp b/tools/linguist/linguist/trwindow.cpp index d044ca699..eaa339d6f 100644 --- a/tools/linguist/linguist/trwindow.cpp +++ b/tools/linguist/linguist/trwindow.cpp @@ -329,7 +329,7 @@ TrWindow::TrWindow() "are marked with a warning.") ); showNewCurrent( 0 ); - TQSize as( qApp->desktop()->size() ); + TQSize as( tqApp->desktop()->size() ); as -= TQSize( 30, 30 ); resize( TQSize( 1000, 800 ).boundedTo( as ) ); readConfig(); @@ -349,7 +349,7 @@ void TrWindow::openFile( const TQString& name ) { if ( !name.isEmpty() ) { statusBar()->message( tr("Loading...") ); - qApp->processEvents(); + tqApp->processEvents(); tor.clear(); if ( tor.load(name) ) { slv->clear(); @@ -376,7 +376,7 @@ void TrWindow::openFile( const TQString& name ) srcChars = 0; srcCharsSpc = 0; for ( it = all.begin(); it != all.end(); ++it ) { - qApp->processEvents(); + tqApp->processEvents(); ContextLVI *c = contexts.find( TQString((*it).context()) ); if ( c == 0 ) { c = new ContextLVI( lv, tor.toUnicode((*it).context(), @@ -682,7 +682,7 @@ void TrWindow::findAgain() slv->setUpdatesEnabled( TRUE ); slv->triggerUpdate(); - qApp->beep(); + tqApp->beep(); TQMessageBox::warning( this, tr("TQt Linguist"), TQString( tr("Cannot find the string '%1'.") ).arg(findText) ); foundItem = 0; @@ -1038,7 +1038,7 @@ void TrWindow::updateFinished( bool finished ) danger(m->sourceText(), m->translation(), !oldDanger) ); if ( !oldDanger && m->danger() ) - qApp->beep(); + tqApp->beep(); tor.insert( m->message() ); if ( !dirty ) { dirty = TRUE; @@ -1066,7 +1066,7 @@ void TrWindow::doneAndNext() dirty = TRUE; updateCaption(); } - qApp->beep(); + tqApp->beep(); } updateStatistics(); } @@ -1090,7 +1090,7 @@ void TrWindow::toggleFinished( TQListViewItem *item, const TQPoint& /* p */, m->setDanger( danger(m->sourceText(), m->translation(), !oldDanger) ); if ( !oldDanger && m->danger() ) - qApp->beep(); + tqApp->beep(); tor.insert( m->message() ); if ( !dirty ) { dirty = TRUE; @@ -1115,7 +1115,7 @@ void TrWindow::nextUnfinished() if( (cItem == 0) && !(cItem = lv->firstChild()) ) { statusBar()->message( tr("No phrase to translate."), MessageMS ); - qApp->beep(); + tqApp->beep(); return; } else { showNewScope( cItem ); @@ -1130,7 +1130,7 @@ void TrWindow::nextUnfinished() } else { statusBar()->message( tr("No phrase to translate."), MessageMS ); - qApp->beep(); + tqApp->beep(); return; } } @@ -1182,7 +1182,7 @@ void TrWindow::nextUnfinished() // If no Unfinished message is left, the user has finished the job. We // congratulate on a job well done with this ringing bell. statusBar()->message( tr("No untranslated phrases left."), MessageMS ); - qApp->beep(); + tqApp->beep(); } static TQListViewItem * lastChild( TQListView * view ) @@ -1214,7 +1214,7 @@ void TrWindow::prevUnfinished() if( (cItem == 0) && !(cItem = lv->firstChild()) ) { statusBar()->message( tr("No phrase to translate."), MessageMS ); - qApp->beep(); + tqApp->beep(); return; } else { showNewScope( cItem ); @@ -1229,7 +1229,7 @@ void TrWindow::prevUnfinished() } else { statusBar()->message( tr("No phrase to translate."), MessageMS ); - qApp->beep(); + tqApp->beep(); return; } } @@ -1275,7 +1275,7 @@ void TrWindow::prevUnfinished() } while ( q != 0 ); } statusBar()->message( tr("No untranslated phrases left."), MessageMS ); - qApp->beep(); + tqApp->beep(); } void TrWindow::prev() diff --git a/tools/linguist/shared/metatranslator.cpp b/tools/linguist/shared/metatranslator.cpp index 5da969d8b..3ea91f2cb 100644 --- a/tools/linguist/shared/metatranslator.cpp +++ b/tools/linguist/shared/metatranslator.cpp @@ -192,10 +192,10 @@ bool TsHandler::fatalError( const TQXmlParseException& exception ) msg.sprintf( "Parse error at line %d, column %d (%s).", exception.lineNumber(), exception.columnNumber(), exception.message().latin1() ); - if ( qApp == 0 ) + if ( tqApp == 0 ) fprintf( stderr, "XML error: %s\n", msg.latin1() ); else - TQMessageBox::information( qApp->mainWidget(), + TQMessageBox::information( tqApp->mainWidget(), TQObject::tr("TQt Linguist"), msg ); } return FALSE; diff --git a/tools/linguist/tutorial/tt2/mainwindow.cpp b/tools/linguist/tutorial/tt2/mainwindow.cpp index 6a9808de1..b2951f6e9 100644 --- a/tools/linguist/tutorial/tt2/mainwindow.cpp +++ b/tools/linguist/tutorial/tt2/mainwindow.cpp @@ -19,7 +19,7 @@ MainWindow::MainWindow( TQWidget *parent, const char *name ) setCentralWidget( ap ); TQPopupMenu *file = new TQPopupMenu( this ); - file->insertItem( tr("E&xit"), qApp, SLOT(quit()), + file->insertItem( tr("E&xit"), tqApp, SLOT(quit()), tr("Ctrl+Q", "Quit") ); menuBar()->insertItem( tr("&File"), file ); menuBar()->setSeparator( TQMenuBar::InWindowsStyle ); diff --git a/tools/linguist/tutorial/tt3/mainwindow.cpp b/tools/linguist/tutorial/tt3/mainwindow.cpp index 86d2e0073..efaaac932 100644 --- a/tools/linguist/tutorial/tt3/mainwindow.cpp +++ b/tools/linguist/tutorial/tt3/mainwindow.cpp @@ -22,7 +22,7 @@ MainWindow::MainWindow( TQWidget *parent, const char *name ) setCentralWidget( pp ); TQPopupMenu *file = new TQPopupMenu( this ); - file->insertItem( tr("E&xit"), qApp, SLOT(quit()), + file->insertItem( tr("E&xit"), tqApp, SLOT(quit()), tr("Ctrl+Q", "Quit") ); TQPopupMenu *help = new TQPopupMenu( this ); help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 ); diff --git a/tools/makeqpf/main.cpp b/tools/makeqpf/main.cpp index 5d9bb185f..8abd2162e 100644 --- a/tools/makeqpf/main.cpp +++ b/tools/makeqpf/main.cpp @@ -198,7 +198,7 @@ public: TQListViewItem* c = view->firstChild(); while ( c ) { renderAndSave(c); - qApp->processEvents(); + tqApp->processEvents(); c = c->nextSibling(); } } diff --git a/tools/qconfig/main.cpp b/tools/qconfig/main.cpp index f0b6772f9..dcfcfde63 100644 --- a/tools/qconfig/main.cpp +++ b/tools/qconfig/main.cpp @@ -306,7 +306,7 @@ Main::Main() file->insertSeparator(); file->insertItem( "&Test all", this, SLOT(testAll()), CTRL+Key_T ); file->insertSeparator(); - file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); + file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q ); menuBar()->insertItem( "&File",file ); diff --git a/tools/qtconfig/colorbutton.cpp b/tools/qtconfig/colorbutton.cpp index 2ed4e2386..948043774 100644 --- a/tools/qtconfig/colorbutton.cpp +++ b/tools/qtconfig/colorbutton.cpp @@ -67,7 +67,7 @@ void ColorButton::setColor(const TQColor &c) void ColorButton::changeColor() { - TQColor c = TQColorDialog::getColor(col, qApp->activeWindow()); + TQColor c = TQColorDialog::getColor(col, tqApp->activeWindow()); if (c.isValid()) { setColor(c); diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index bf399bd40..0d3cd74db 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -572,7 +572,7 @@ void MainWindow::fileSave() void MainWindow::fileExit() { - qApp->closeAllWindows(); + tqApp->closeAllWindows(); } @@ -1123,7 +1123,7 @@ void MainWindow::closeEvent(TQCloseEvent *e) tr("Save changes to settings?"), tr("&Yes"), tr("&No"), tr("&Cancel"), 0, 2)) { case 0: // save - qApp->processEvents(); + tqApp->processEvents(); fileSave(); // fall through intended diff --git a/tools/qvfb/qanimationwriter.cpp b/tools/qvfb/qanimationwriter.cpp index 76dc94644..8a3c32cca 100644 --- a/tools/qvfb/qanimationwriter.cpp +++ b/tools/qvfb/qanimationwriter.cpp @@ -371,7 +371,7 @@ void TQAnimationWriter::appendFrame(const TQImage& frm, const TQPoint& offset) if ( i == alignx ) { // All the same for (i=0; iinsertItem( "&Save image...", this, SLOT(saveImage()), ALT+CTRL+Key_S ); file->insertItem( "&Animation...", this, SLOT(toggleAnimation()), ALT+CTRL+Key_A ); file->insertSeparator(); - file->insertItem( "&Quit", qApp, SLOT(quit()) ); + file->insertItem( "&Quit", tqApp, SLOT(quit()) ); menu->insertItem( "&File", file ); diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp index 08566fd94..1532fe36c 100644 --- a/tools/qvfb/qvfbview.cpp +++ b/tools/qvfb/qvfbview.cpp @@ -214,7 +214,7 @@ void TQVFbView::setGamma(double gr, double gg, double gb) if ( r > 255 ) r = 255; if ( g > 255 ) g = 255; if ( b > 255 ) b = 255; - gammatable[i] = qRgb(r,g,b); + gammatable[i] = tqRgb(r,g,b); //qDebug("%d: %d,%d,%d",i,r,g,b); } @@ -225,9 +225,9 @@ void TQVFbView::getGamma(int i, TQRgb& rgb) { if ( i > 255 ) i = 255; if ( i < 0 ) i = 0; - rgb = qRgb(qRed(gammatable[i*rmax/255]), - qGreen(gammatable[i*rmax/255]), - qBlue(gammatable[i*rmax/255])); + rgb = tqRgb(tqRed(gammatable[i*rmax/255]), + tqGreen(gammatable[i*rmax/255]), + tqBlue(gammatable[i*rmax/255])); } int TQVFbView::displayId() const @@ -257,7 +257,7 @@ void TQVFbView::setZoom( double z ) setDirty(TQRect(0,0,hdr->width,hdr->height)); resizeContents( int(hdr->width*z), int(hdr->height*z) ); updateGeometry(); - qApp->sendPostedEvents(); + tqApp->sendPostedEvents(); topLevelWidget()->adjustSize(); drawScreen(); } @@ -398,10 +398,10 @@ TQImage TQVFbView::getBuffer( const TQRect &r, int &leading ) const ushort s = *sptr++; #ifdef QT_QWS_REVERSE_BYTE_ENDIANNESS ushort s2 = *sptr++; - *dptr++ = qRgb(qRed(gammatable[(s2>>rsh)&rmax]),qGreen(gammatable[(s2>>gsh)&gmax]),qBlue(gammatable[(s2>>bsh)&bmax])); + *dptr++ = tqRgb(tqRed(gammatable[(s2>>rsh)&rmax]),tqGreen(gammatable[(s2>>gsh)&gmax]),tqBlue(gammatable[(s2>>bsh)&bmax])); #endif - *dptr++ = qRgb(qRed(gammatable[(s>>rsh)&rmax]),qGreen(gammatable[(s>>gsh)&gmax]),qBlue(gammatable[(s>>bsh)&bmax])); - //*dptr++ = qRgb(((s>>rsh)&rmax)*255/rmax,((s>>gsh)&gmax)*255/gmax,((s>>bsh)&bmax)*255/bmax); + *dptr++ = tqRgb(tqRed(gammatable[(s>>rsh)&rmax]),tqGreen(gammatable[(s>>gsh)&gmax]),tqBlue(gammatable[(s>>bsh)&bmax])); + //*dptr++ = tqRgb(((s>>rsh)&rmax)*255/rmax,((s>>gsh)&gmax)*255/gmax,((s>>bsh)&bmax)*255/bmax); } } leading = 0; diff --git a/tutorial/t10/main.cpp b/tutorial/t10/main.cpp index af106d2f4..7b14dc14b 100644 --- a/tutorial/t10/main.cpp +++ b/tutorial/t10/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/tutorial/t11/main.cpp b/tutorial/t11/main.cpp index 7a8e57987..4ddd2938c 100644 --- a/tutorial/t11/main.cpp +++ b/tutorial/t11/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/tutorial/t12/main.cpp b/tutorial/t12/main.cpp index 2fd1c3d08..5401d9972 100644 --- a/tutorial/t12/main.cpp +++ b/tutorial/t12/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); diff --git a/tutorial/t13/gamebrd.cpp b/tutorial/t13/gamebrd.cpp index fdb29d10f..a8ee16c54 100644 --- a/tutorial/t13/gamebrd.cpp +++ b/tutorial/t13/gamebrd.cpp @@ -22,7 +22,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); diff --git a/tutorial/t14/gamebrd.cpp b/tutorial/t14/gamebrd.cpp index bf6ddf1b3..2aebec56e 100644 --- a/tutorial/t14/gamebrd.cpp +++ b/tutorial/t14/gamebrd.cpp @@ -24,7 +24,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); @@ -78,7 +78,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name ) accel->connectItem( accel->insertItem( Key_Return ), this, SLOT(fire()) ); accel->connectItem( accel->insertItem( CTRL+Key_Q ), - qApp, SLOT(quit()) ); + tqApp, SLOT(quit()) ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); grid->addWidget( quit, 0, 0 ); diff --git a/tutorial/t4/main.cpp b/tutorial/t4/main.cpp index 6495263fd..e72550b9d 100644 --- a/tutorial/t4/main.cpp +++ b/tutorial/t4/main.cpp @@ -26,7 +26,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) quit->setGeometry( 62, 40, 75, 30 ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); } diff --git a/tutorial/t5/main.cpp b/tutorial/t5/main.cpp index 23b777e72..cbc5c00a7 100644 --- a/tutorial/t5/main.cpp +++ b/tutorial/t5/main.cpp @@ -25,7 +25,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); diff --git a/tutorial/t6/main.cpp b/tutorial/t6/main.cpp index fdea55c59..75d1440e3 100644 --- a/tutorial/t6/main.cpp +++ b/tutorial/t6/main.cpp @@ -41,7 +41,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQGrid *grid = new TQGrid( 4, this ); diff --git a/tutorial/t7/main.cpp b/tutorial/t7/main.cpp index 985f28d0a..773e91114 100644 --- a/tutorial/t7/main.cpp +++ b/tutorial/t7/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); TQGrid *grid = new TQGrid( 4, this ); diff --git a/tutorial/t8/main.cpp b/tutorial/t8/main.cpp index 858411c58..97947afe4 100644 --- a/tutorial/t8/main.cpp +++ b/tutorial/t8/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); diff --git a/tutorial/t9/main.cpp b/tutorial/t9/main.cpp index 521be5527..ffd6739ba 100644 --- a/tutorial/t9/main.cpp +++ b/tutorial/t9/main.cpp @@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name ) TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( this, "angle" ); angle->setRange( 5, 70 ); -- cgit v1.2.1