diff options
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r-- | src/kernel/qapplication.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 146659572..36c2ddea5 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -331,12 +331,12 @@ TQStyle *TQApplication::app_style = 0; // default application style bool tqt_explicit_app_style = FALSE; // style explicitly set by programmer int TQApplication::app_cspec = TQApplication::NormalColor; -#ifndef QT_NO_PALETTE +#ifndef TQT_NO_PALETTE TQPalette *TQApplication::app_pal = 0; // default application palette #endif TQFont *TQApplication::app_font = 0; // default application font bool tqt_app_has_font = FALSE; -#ifndef QT_NO_CURSOR +#ifndef TQT_NO_CURSOR TQCursor *TQApplication::app_cursor = 0; // default application cursor #endif int TQApplication::app_tracking = 0; // global mouse tracking @@ -349,7 +349,7 @@ TQWidget *TQApplication::active_window = 0; // toplevel with keyboard focus bool TQApplication::obey_desktop_settings = TRUE; // use winsys resources int TQApplication::cursor_flash_time = 1000; // text caret flash time int TQApplication::mouse_double_click_time = 400; // mouse dbl click limit -#ifndef QT_NO_WHEELEVENT +#ifndef TQT_NO_WHEELEVENT int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll #endif bool tqt_is_gui_used; @@ -369,7 +369,7 @@ bool TQApplication::fade_tooltip = FALSE; bool TQApplication::animate_toolbox = FALSE; bool TQApplication::widgetCount = FALSE; TQApplication::Type tqt_appType=TQApplication::Tty; -#ifndef QT_NO_COMPONENT +#ifndef TQT_NO_COMPONENT TQStringList *TQApplication::app_libpaths = 0; #endif bool TQApplication::metaComposeUnicode = FALSE; @@ -410,7 +410,7 @@ TQEventLoop* TQApplication::currentEventLoop() { } #endif -#ifndef QT_NO_ACCEL +#ifndef TQT_NO_ACCEL extern bool tqt_dispatchAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp extern bool tqt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp #endif @@ -530,13 +530,13 @@ Q_EXPORT void tqRemovePostRoutine( TQtCleanUpFunction p ) TQAsciiDict<TQPalette> *TQApplication::app_palettes = 0; TQAsciiDict<TQFont> *TQApplication::app_fonts = 0; -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER TQString *TQApplication::session_key = 0; // ## session key. Should be a member in 4.0 #endif TQWidgetList *TQApplication::popupWidgets = 0; // has keyboard input focus TQDesktopWidget *tqt_desktopWidget = 0; // root window widgets -#ifndef QT_NO_CLIPBOARD +#ifndef TQT_NO_CLIPBOARD TQClipboard *tqt_clipboard = 0; // global clipboard object #endif TQWidgetList * tqt_modal_stack=0; // stack of modal widgets @@ -617,7 +617,7 @@ uint qGlobalPostedEventsCount() static TQSingleCleanupHandler<TQPostEventList> qapp_cleanup_events; -#ifndef QT_NO_PALETTE +#ifndef TQT_NO_PALETTE TQPalette *tqt_std_pal = 0; void tqt_create_std_palette() @@ -675,7 +675,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv ) } else if ( qstrcmp(arg,"-style") == 0 && i < argc-1 ) { s = argv[++i]; s = s.lower(); -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER } else if ( qstrcmp(arg,"-session") == 0 && i < argc-1 ) { TQCString s = argv[++i]; if ( !s.isEmpty() ) { @@ -697,7 +697,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv ) } else { argv[j++] = argv[i]; } -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( !s.isEmpty() ) { setStyle( s ); } @@ -733,7 +733,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv ) to process command line arguments. TQt debugging options (not available if TQt was compiled with the - QT_NO_DEBUG flag defined): + TQT_NO_DEBUG flag defined): \list \i -nograb, tells TQt that it must never grab the mouse or the keyboard. \i -dograb (only under X11), running under a debugger can cause @@ -1053,7 +1053,7 @@ void TQApplication::init_precmdline() { translators = 0; is_app_closing = FALSE; -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER is_session_restored = FALSE; #endif #if defined(QT_CHECK_STATE) @@ -1085,12 +1085,12 @@ void TQApplication::initialize( int argc, char **argv, bool enable_sm ) quit_now = FALSE; quit_code = 0; TQWidget::createMapper(); // create widget mapper -#ifndef QT_NO_PALETTE +#ifndef TQT_NO_PALETTE (void) palette(); // trigger creation of application palette #endif is_app_running = TRUE; // no longer starting up -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER if (enable_sm) { // connect to the session manager if ( !session_key ) @@ -1157,7 +1157,7 @@ TQWidget *TQApplication::activeModalWidget() TQApplication::~TQApplication() { -#ifndef QT_NO_CLIPBOARD +#ifndef TQT_NO_CLIPBOARD // flush clipboard contents if ( tqt_clipboard ) { TQCustomEvent event( TQEvent::Clipboard ); @@ -1185,12 +1185,12 @@ TQApplication::~TQApplication() tqt_desktopWidget = 0; is_app_closing = TRUE; -#ifndef QT_NO_CLIPBOARD +#ifndef TQT_NO_CLIPBOARD delete tqt_clipboard; tqt_clipboard = 0; #endif TQWidget::destroyMapper(); -#ifndef QT_NO_PALETTE +#ifndef TQT_NO_PALETTE delete tqt_std_pal; tqt_std_pal = 0; delete app_pal; @@ -1202,11 +1202,11 @@ TQApplication::~TQApplication() app_font = 0; delete app_fonts; app_fonts = 0; -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE delete app_style; app_style = 0; #endif -#ifndef QT_NO_CURSOR +#ifndef TQT_NO_CURSOR delete app_cursor; app_cursor = 0; #endif @@ -1214,14 +1214,14 @@ TQApplication::~TQApplication() delete translators; #endif -#ifndef QT_NO_DRAGANDDROP +#ifndef TQT_NO_DRAGANDDROP extern TQDragManager *qt_dnd_manager; delete qt_dnd_manager; #endif tqt_cleanup(); -#ifndef QT_NO_COMPONENT +#ifndef TQT_NO_COMPONENT delete app_libpaths; app_libpaths = 0; #endif @@ -1243,7 +1243,7 @@ TQApplication::~TQApplication() if ( widgetCount ) { tqDebug( "Widgets left: %i Max widgets: %i \n", TQWidget::instanceCounter, TQWidget::maxInstances ); } -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER if ( session_manager ) { delete session_manager; } @@ -1252,7 +1252,7 @@ TQApplication::~TQApplication() delete session_key; } session_key = 0; -#endif //QT_NO_SESSIONMANAGER +#endif //TQT_NO_SESSIONMANAGER #ifdef TQT_THREAD_SUPPORT delete tqt_sharedMetaObjectMutex; @@ -1271,7 +1271,7 @@ TQApplication::~TQApplication() obey_desktop_settings = TRUE; cursor_flash_time = 1000; mouse_double_click_time = 400; -#ifndef QT_NO_WHEELEVENT +#ifndef TQT_NO_WHEELEVENT wheel_scroll_lines = 3; #endif drag_time = 500; @@ -1349,7 +1349,7 @@ TQApplication::~TQApplication() */ -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE static TQString *qt_style_override = 0; @@ -1360,7 +1360,7 @@ static TQString *qt_style_override = 0; */ TQStyle& TQApplication::style() { -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( app_style ) return *app_style; if ( !tqt_is_gui_used ) @@ -1408,7 +1408,7 @@ TQStyle& TQApplication::style() !(app_style = TQStyleFactory::create( "Aqua" ) ) && !(app_style = TQStyleFactory::create( "SGI" ) ) && !(app_style = TQStyleFactory::create( "Compact" ) ) -#ifndef QT_NO_STRINGLIST +#ifndef TQT_NO_STRINGLIST && !(app_style = TQStyleFactory::create( TQStyleFactory::keys()[0] ) ) #endif ) @@ -1699,7 +1699,7 @@ void TQApplication::setGlobalStrut( const TQSize& strut ) extern const char *tqAppFileName(); #endif -#ifndef QT_NO_DIR +#ifndef TQT_NO_DIR #ifndef Q_WS_WIN static TQString resolveSymlinks( const TQString& path, int depth = 0 ) { @@ -1840,9 +1840,9 @@ TQString TQApplication::applicationFilePath() } #endif } -#endif // QT_NO_DIR +#endif // TQT_NO_DIR -#ifndef QT_NO_COMPONENT +#ifndef TQT_NO_COMPONENT /*! Returns a list of paths that the application will search when @@ -1953,7 +1953,7 @@ void TQApplication::removeLibraryPath( const TQString &path ) if ( app_libpaths->contains( path ) ) app_libpaths->remove( path ); } -#endif //QT_NO_COMPONENT +#endif //TQT_NO_COMPONENT /*! Returns the application palette. @@ -1967,7 +1967,7 @@ void TQApplication::removeLibraryPath( const TQString &path ) \sa setPalette(), TQWidget::palette() */ -#ifndef QT_NO_PALETTE +#ifndef TQT_NO_PALETTE TQPalette TQApplication::palette(const TQWidget* w) { #if defined(QT_CHECK_STATE) @@ -2051,7 +2051,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets, { TQPalette pal = palette; TQPalette *oldpal = 0; -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( !startingUp() ) // on startup this has been done already tqApp->style().polish( pal ); // NB: non-const reference #endif @@ -2090,7 +2090,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets, } } -#endif // QT_NO_PALETTE +#endif // TQT_NO_PALETTE /*! Returns the default font for the widget \a w, or the default @@ -2196,7 +2196,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets, void TQApplication::polish( TQWidget *w ) { -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE w->style().polish( w ); #endif } @@ -2387,9 +2387,9 @@ void TQApplication::closeAllWindows() */ void TQApplication::aboutTQt() { -#ifndef QT_NO_MESSAGEBOX +#ifndef TQT_NO_MESSAGEBOX TQMessageBox::aboutTQt( mainWidget() ); -#endif // QT_NO_MESSAGEBOX +#endif // TQT_NO_MESSAGEBOX } @@ -2558,7 +2558,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e ) res = internalNotify( receiver, e ); } else switch ( e->type() ) { -#ifndef QT_NO_ACCEL +#ifndef TQT_NO_ACCEL case TQEvent::Accel: { TQKeyEvent* key = (TQKeyEvent*) e; @@ -2575,14 +2575,14 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e ) } } break; -#endif //QT_NO_ACCEL +#endif //TQT_NO_ACCEL case TQEvent::KeyPress: case TQEvent::KeyRelease: case TQEvent::AccelOverride: { TQWidget* w = (TQWidget*)receiver; TQKeyEvent* key = (TQKeyEvent*) e; -#ifndef QT_NO_ACCEL +#ifndef TQT_NO_ACCEL if ( tqt_tryComposeUnicode( w, key ) ) break; #endif @@ -2635,7 +2635,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e ) mouse->ignore(); } break; -#ifndef QT_NO_WHEELEVENT +#ifndef TQT_NO_WHEELEVENT case TQEvent::Wheel: { if ( e->spontaneous() ) { @@ -2833,7 +2833,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e) handled = TRUE; consumed = TRUE; break; -#ifndef QT_NO_DRAGANDDROP +#ifndef TQT_NO_DRAGANDDROP case TQEvent::DragEnter: case TQEvent::DragMove: ( (TQDragMoveEvent*) e)->ignore(); @@ -2850,7 +2850,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e) handled = TRUE; break; #endif -#ifndef QT_NO_WHEELEVENT +#ifndef TQT_NO_WHEELEVENT case TQEvent::Wheel: ( (TQWheelEvent*) e)->ignore(); handled = TRUE; @@ -3238,7 +3238,7 @@ void TQApplication::removeTranslator( TQTranslator * mf ) } } -#ifndef QT_NO_TEXTCODEC +#ifndef TQT_NO_TEXTCODEC /*! \obsolete This is the same as TQTextCodec::setCodecForTr(). */ @@ -3254,7 +3254,7 @@ TQTextCodec* TQApplication::defaultCodec() const { return TQTextCodec::codecForTr(); } -#endif //QT_NO_TEXTCODEC +#endif //TQT_NO_TEXTCODEC /*! \enum TQApplication::Encoding @@ -3322,7 +3322,7 @@ TQString TQApplication::translate( const char * context, const char * sourceText return result; } } -#ifndef QT_NO_TEXTCODEC +#ifndef TQT_NO_TEXTCODEC if ( encoding == UnicodeUTF8 ) return TQString::fromUtf8( sourceText ); else if ( TQTextCodec::codecForTr() != 0 ) @@ -3426,7 +3426,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event ) }; } -#if !defined(QT_NO_IM) +#if !defined(TQT_NO_IM) // if this is one of the compressible IM events, do compression else if ( event->type() == TQEvent::IMCompose ) { l->last(); @@ -3734,7 +3734,7 @@ void TQApplication::removePostedEvent( TQEvent * event ) case TQEvent::MouseMove: n = "MouseMove"; break; -#ifndef QT_NO_WHEELEVENT +#ifndef TQT_NO_WHEELEVENT case TQEvent::Wheel: n = "Wheel"; break; @@ -3862,7 +3862,7 @@ void TQApplication::setActiveWindow( TQWidget* act ) // first the activation/deactivation events if ( active_window ) { TQWidgetList deacts; -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( style().styleHint(TQStyle::SH_Widget_ShareActivation, active_window ) ) { TQWidgetList *list = topLevelWidgets(); if ( list ) { @@ -3885,7 +3885,7 @@ void TQApplication::setActiveWindow( TQWidget* act ) if ( active_window ) { TQEvent e( TQEvent::WindowActivate ); TQWidgetList acts; -#ifndef QT_NO_STYLE +#ifndef TQT_NO_STYLE if ( style().styleHint(TQStyle::SH_Widget_ShareActivation, active_window ) ) { TQWidgetList *list = topLevelWidgets(); if ( list ) { @@ -4096,7 +4096,7 @@ TQDesktopWidget *TQApplication::desktop() return tqt_desktopWidget; } -#ifndef QT_NO_CLIPBOARD +#ifndef TQT_NO_CLIPBOARD /*! Returns a pointer to the application global clipboard. */ @@ -4108,7 +4108,7 @@ TQClipboard *TQApplication::clipboard() } return tqt_clipboard; } -#endif // QT_NO_CLIPBOARD +#endif // TQT_NO_CLIPBOARD /*! By default, TQt will try to use the current standard colors, fonts @@ -4283,7 +4283,7 @@ bool TQApplication::tryLock() \sa isSessionRestored(), sessionId(), saveState(), \link session.html the Session Management overview\endlink */ -#ifndef QT_NO_SESSIONMANAGER +#ifndef TQT_NO_SESSIONMANAGER void TQApplication::commitData( TQSessionManager& sm ) { @@ -4345,7 +4345,7 @@ void TQApplication::commitData( TQSessionManager& sm ) void TQApplication::saveState( TQSessionManager& /* sm */ ) { } -#endif //QT_NO_SESSIONMANAGER +#endif //TQT_NO_SESSIONMANAGER /*! Sets the time after which a drag should start to \a ms ms. @@ -4807,8 +4807,8 @@ void MyApplication::commitData( TQSessionManager& sm ) { /***************************************************************************** Stubbed session management support *****************************************************************************/ -#ifndef QT_NO_SESSIONMANAGER -#if defined( QT_NO_SM_SUPPORT ) || defined( Q_WS_WIN ) || defined( Q_WS_MAC ) || defined( Q_WS_QWS ) +#ifndef TQT_NO_SESSIONMANAGER +#if defined( TQT_NO_SM_SUPPORT ) || defined( Q_WS_WIN ) || defined( Q_WS_MAC ) || defined( Q_WS_QWS ) class TQSessionManagerData { @@ -4932,5 +4932,5 @@ void TQSessionManager::requestPhase2() { } -#endif // QT_NO_SM_SUPPORT -#endif //QT_NO_SESSIONMANAGER +#endif // TQT_NO_SM_SUPPORT +#endif //TQT_NO_SESSIONMANAGER |