diff options
Diffstat (limited to 'src/kernel/qwidget.cpp')
-rw-r--r-- | src/kernel/qwidget.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
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()) ){ |