diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
commit | 520c05ef06ce203ad32470730f68402bc7719157 (patch) | |
tree | 8d0bb18bbbecb4c837e232848905e5819db84b81 /src/kernel | |
parent | b82553bf90cb5311cfe8e673b07cf6cffc95fd3c (diff) | |
download | tqt3-520c05ef06ce203ad32470730f68402bc7719157.tar.gz tqt3-520c05ef06ce203ad32470730f68402bc7719157.zip |
Automated update from qt3
Diffstat (limited to 'src/kernel')
33 files changed, 398 insertions, 398 deletions
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<TQFontCache> 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; i<src->numColors(); 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; i<numColors(); i++) - if (data->ctbl[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; i<ncols; i++ ) { if ( d->readBlock( (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; i<image.numColors(); i++ ) { - *rgb++ = qBlue ( c[i] ); - *rgb++ = qGreen( c[i] ); - *rgb++ = qRed ( c[i] ); + *rgb++ = tqBlue ( c[i] ); + *rgb++ = tqGreen( c[i] ); + *rgb++ = tqRed ( c[i] ); *rgb++ = 0; } d->writeBlock( (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; y<image.height(); y++ ) { @@ -5359,15 +5359,15 @@ static void write_pbm_image( TQImageIO *iio ) uchar *end = buf+bpl; if ( gray ) { while ( p < end ) { - uchar g = (uchar)qGray(color[*b++]); + uchar g = (uchar)tqGray(color[*b++]); *p++ = g; } } else { while ( p < end ) { TQRgb rgb = color[*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) ) { @@ -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<TQRgb, int>::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<w; i++) { bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7))); - row[i] = qRed(cmap[bit]); + row[i] = tqRed(cmap[bit]); } } else { for (int i=0; i<w; i++) { bool bit = !!(*(data + (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<w; i++) { bool bit = !!(*(data + (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<w; i++) { bool bit = !!(*(data + (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; i<w; i++) { - *row = qRed(cmap[*pix]); + *row = tqRed(cmap[*pix]); ++row; ++pix; } } else { uchar* pix = image.scanLine(cinfo.next_scanline); for (int i=0; i<w; i++) { - *row++ = qRed(cmap[*pix]); - *row++ = qGreen(cmap[*pix]); - *row++ = qBlue(cmap[*pix]); + *row++ = tqRed(cmap[*pix]); + *row++ = tqGreen(cmap[*pix]); + *row++ = tqBlue(cmap[*pix]); ++pix; } } @@ -569,9 +569,9 @@ void write_jpeg_image(TQImageIO* iio) case 32: { TQRgb* rgb = (TQRgb*)image.scanLine(cinfo.next_scanline); for (int i=0; i<w; i++) { - *row++ = qRed(*rgb); - *row++ = qGreen(*rgb); - *row++ = qBlue(*rgb); + *row++ = tqRed(*rgb); + *row++ = tqGreen(*rgb); + *row++ = tqBlue(*rgb); ++rgb; } } diff --git a/src/kernel/qlocalfs.cpp b/src/kernel/qlocalfs.cpp index a3e141ba3..73a0c8a5b 100644 --- a/src/kernel/qlocalfs.cpp +++ b/src/kernel/qlocalfs.cpp @@ -312,7 +312,7 @@ void TQLocalFs::operationGet( TQNetworkOperation *op ) emit dataTransferProgress( f.size() - remaining, f.size(), op ); remaining -= remaining; } - qApp->processEvents(); + tqApp->processEvents(); } if (!that) return; @@ -365,7 +365,7 @@ void TQLocalFs::operationPut( TQNetworkOperation *op ) emit dataTransferProgress( i + blockSize, ba.size(), op ); i += blockSize; TQGuardedPtr<TQObject> 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<image.numColors(); i++ ) { - int r = qRed (ctable[i]); - int g = qGreen(ctable[i]); - int b = qBlue (ctable[i]); + int r = tqRed (ctable[i]); + int g = tqGreen(ctable[i]); + int b = tqBlue (ctable[i]); r = red_shift > 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<<rbits) & 255) \ > 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<<rbits) & 255) \ > thres) \ r += (1<<(8-rbits)); \ - int g = qGreen( *p ); \ + int g = tqGreen( *p ); \ if ( g <= (255-(1<<(8-gbits))) && ((g<<gbits) & 255) \ > thres) \ g += (1<<(8-gbits)); \ - int b = qBlue ( *p++ ); \ + int b = tqBlue ( *p++ ); \ if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \ > 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; i<ncols; i++) { int c = i*255/(ncols-1); - image.setColor( i, qRgba(c,c,c,0xff) ); + image.setColor( i, tqRgba(c,c,c,0xff) ); } if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { #if PNG_LIBPNG_VER_MAJOR>1 || ( 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; i<num_palette; i++) { TQRgb rgb=image.color(i); #if PNG_LIBPNG_VER_MAJOR>1 || ( 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; i<alignx; i++) { - ld[x+i] = qRgba(0,0,0,0); + ld[x+i] = tqRgba(0,0,0,0); } } else { // Some different @@ -921,7 +921,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img) if ( li[x] != lp[x] ) ld[x] = 0xff000000 | li[x]; else - ld[x] = qRgba(0,0,0,0); + ld[x] = tqRgba(0,0,0,0); } } } diff --git a/src/kernel/qpsprinter.cpp b/src/kernel/qpsprinter.cpp index 1fc1190a7..7d660b471 100644 --- a/src/kernel/qpsprinter.cpp +++ b/src/kernel/qpsprinter.cpp @@ -5407,12 +5407,12 @@ static TQByteArray compress( const TQImage & image, bool gray ) { for( int x=0; x < width; x++ ) { TQRgb rgb = image.color( s[x] ); if ( gray ) { - pixel[i] = (unsigned char) qGray( rgb ); + pixel[i] = (unsigned char) tqGray( rgb ); i++; } else { - pixel[i] = (unsigned char) qRed( rgb ); - pixel[i+1] = (unsigned char) qGreen( rgb ); - pixel[i+2] = (unsigned char) qBlue( rgb ); + pixel[i] = (unsigned char) tqRed( rgb ); + pixel[i+1] = (unsigned char) tqGreen( rgb ); + pixel[i+2] = (unsigned char) tqBlue( rgb ); i += 3; } } @@ -5423,15 +5423,15 @@ static TQByteArray compress( const TQImage & image, bool gray ) { TQRgb * s = (TQRgb*)(image.scanLine( y )); for( int x=0; x < width; x++ ) { TQRgb rgb = (*s++); - if ( alpha && qAlpha( rgb ) < 0x40 ) // 25% alpha, convert to white - - rgb = qRgb( 0xff, 0xff, 0xff ); + if ( alpha && tqAlpha( rgb ) < 0x40 ) // 25% alpha, convert to white - + rgb = tqRgb( 0xff, 0xff, 0xff ); if ( gray ) { - pixel[i] = (unsigned char) qGray( rgb ); + pixel[i] = (unsigned char) tqGray( rgb ); i++; } else { - pixel[i] = (unsigned char) qRed( rgb ); - pixel[i+1] = (unsigned char) qGreen( rgb ); - pixel[i+2] = (unsigned char) qBlue( rgb ); + pixel[i] = (unsigned char) tqRed( rgb ); + pixel[i+1] = (unsigned char) tqGreen( rgb ); + pixel[i+2] = (unsigned char) tqBlue( rgb ); i += 3; } } @@ -5767,7 +5767,7 @@ static const char * color( const TQColor &c, TQPrinter * printer ) sprintf( returnbuffer, "%d d2 ", c.red() ); else if ( printer->colorMode() == 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<TQWidget> 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()) ); } |