summaryrefslogtreecommitdiffstats
path: root/src/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qwidget.cpp')
-rw-r--r--src/kernel/qwidget.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp
index 0e9c606a..1af274c6 100644
--- a/src/kernel/qwidget.cpp
+++ b/src/kernel/qwidget.cpp
@@ -62,11 +62,11 @@
#if defined(QT_ACCESSIBILITY_SUPPORT)
#include "ntqaccessible.h"
#endif
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
#include "qt_windows.h"
#include "qinputcontext_p.h"
#endif
-#if defined(Q_WS_QWS)
+#if defined(TQ_WS_QWS)
#include "qwsmanager_qws.h"
#endif
#include "qfontdata_p.h"
@@ -455,7 +455,7 @@
in the file qapp_xxx.cpp.
*****************************************************************************/
-#if defined(Q_WS_QWS) || defined(Q_OS_TEMP)
+#if defined(TQ_WS_QWS) || defined(Q_OS_TEMP)
static const int WDictSize = 163; // plenty for small devices
#else
static const int WDictSize = 1123; // plenty for 5 big complex windows
@@ -558,7 +558,7 @@ TQSize qt_naturalWidgetSize( TQWidget *w ) {
s.setWidth( TQMAX( s.width(), 200 ) );
if ( exp & TQSizePolicy::Vertically )
s.setHeight( TQMAX( s.height(), 150 ) );
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
TQRect screen = TQApplication::desktop()->screenGeometry( w->x11Screen() );
#else // all others
TQRect screen = TQApplication::desktop()->screenGeometry( w->pos() );
@@ -883,7 +883,7 @@ TQSize qt_naturalWidgetSize( TQWidget *w ) {
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 defined(QT_CHECK_STATE) && !defined(TQ_WS_WIN)
if ( tqApp->type() == TQApplication::Tty ) {
tqWarning( "TQWidget: Cannot create a TQWidget when no GUI "
"is being used" );
@@ -924,9 +924,9 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
#endif
if ( ! isTopLevel() )
fnt = parentWidget()->font();
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
fnt.x11SetScreen( x11Screen() );
-#endif // Q_WS_X11
+#endif // TQ_WS_X11
if ( !isDesktop() )
setBackgroundFromMode(); //### parts of this are done in create but not all (see reparent(...) )
@@ -1100,7 +1100,7 @@ void TQWidget::setWinId( WId id ) // set widget identifier
if ( winid )
mapper->remove( winid );
winid = id;
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
hd = id; // X11: hd == ident
#endif
if ( id )
@@ -1139,7 +1139,7 @@ void TQWidget::createTLExtra()
createExtra();
if ( !extra->topextra ) {
TQTLWExtra* x = extra->topextra = new TQTLWExtra;
-#if defined( Q_WS_WIN ) || defined( Q_WS_MAC )
+#if defined( TQ_WS_WIN ) || defined( TQ_WS_MAC )
x->opacity = 255;
#endif
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1150,7 +1150,7 @@ void TQWidget::createTLExtra()
x->incw = x->inch = 0;
x->basew = x->baseh = 0;
x->normalGeometry = TQRect(0,0,-1,-1);
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
x->embedded = 0;
x->parentWinId = 0;
x->spont_unmapped = 0;
@@ -1159,7 +1159,7 @@ void TQWidget::createTLExtra()
x->ussize = 0;
#endif
x->savedFlags = 0;
-#if defined(Q_WS_QWS) && !defined(TQT_NO_QWS_MANAGER)
+#if defined(TQ_WS_QWS) && !defined(TQT_NO_QWS_MANAGER)
x->decor_allocated_region = TQRegion();
x->qwsManager = 0;
#endif
@@ -1221,7 +1221,7 @@ void TQWidget::deleteExtra()
delete extra->topextra->icon;
#endif
delete extra->topextra->focusData;
-#if defined(Q_WS_QWS) && !defined(TQT_NO_QWS_MANAGER)
+#if defined(TQ_WS_QWS) && !defined(TQT_NO_QWS_MANAGER)
delete extra->topextra->qwsManager;
#endif
delete extra->topextra;
@@ -1246,7 +1246,7 @@ void TQWidget::deactivateWidgetCleanup()
if ( this == TQApplication::active_window )
tqApp->setActiveWindow( 0 );
// If the is the active mouse press widget, reset it
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
extern TQGuardedPtr<TQWidget> qt_button_down;
#else
extern TQWidget *qt_button_down;
@@ -1768,7 +1768,7 @@ void TQWidget::setEnabled( bool enable )
}
}
}
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
if ( testWState( WState_OwnCursor ) ) {
// enforce the windows behavior of clearing the cursor on
// disabled widgets
@@ -1777,7 +1777,7 @@ void TQWidget::setEnabled( bool enable )
tqt_x11_enforce_cursor( this );
}
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
TQInputContext::enable( this, im_enabled & !((bool)testWState(WState_Disabled)) );
#endif
}
@@ -2549,7 +2549,7 @@ void TQWidget::setBackgroundFromMode()
r = TQColorGroup::ButtonText;
break;
case X11ParentRelative:
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
setBackgroundX11Relative();
#endif
return;
@@ -3000,7 +3000,7 @@ void TQWidget::setFont( const TQFont &font )
return;
TQFont old = fnt;
fnt = font.resolve( qt_naturalWidgetFont( this ) );
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
// make sure the font set on this widget is associated with the correct screen
fnt.x11SetScreen( x11Screen() );
#endif
@@ -3298,7 +3298,7 @@ void TQWidget::setFocus()
TQFocusData * f = focusData( TRUE );
if ( f->it.current() == this && tqApp->focusWidget() == this
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
&& GetFocus() == winId()
#endif
)
@@ -3318,7 +3318,7 @@ void TQWidget::setFocus()
if ( isActiveWindow() ) {
TQWidget * prev = tqApp->focus_widget;
if ( prev ) {
- // This part is never executed when Q_WS_X11? Preceding XFocusOut
+ // This part is never executed when TQ_WS_X11? Preceding XFocusOut
// had already reset focus_widget when received XFocusIn
// Don't reset input context explicitly here. Whether reset or not
@@ -3337,7 +3337,7 @@ void TQWidget::setFocus()
#endif
}
}
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
else {
TQInputContext::endComposition();
}
@@ -3346,7 +3346,7 @@ void TQWidget::setFocus()
if( isInputMethodEnabled() )
focusInputContext();
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( !topLevelWidget()->isPopup() )
SetFocus( winId() );
else {
@@ -3354,7 +3354,7 @@ void TQWidget::setFocus()
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::Focus );
#endif
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
}
#endif
@@ -3392,7 +3392,7 @@ void TQWidget::clearFocus()
focusProxy()->clearFocus();
return;
} else if ( hasFocus() ) {
-#if !defined(Q_WS_X11)
+#if !defined(TQ_WS_X11)
resetInputContext();
#else
unfocusInputContext();
@@ -3402,7 +3402,7 @@ void TQWidget::clearFocus()
tqApp->focus_widget = 0;
TQFocusEvent out( TQEvent::FocusOut );
TQApplication::sendEvent( w, &out );
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( !isPopup() && GetFocus() == winId() )
SetFocus( 0 );
else {
@@ -3410,7 +3410,7 @@ void TQWidget::clearFocus()
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::Focus );
#endif
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
}
#endif
}
@@ -3540,7 +3540,7 @@ TQFocusData * TQWidget::focusData( bool create )
void TQWidget::setInputMethodEnabled( bool b )
{
im_enabled = b;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
TQInputContext::enable( this, im_enabled & !((bool)testWState(WState_Disabled)) );
#endif
}
@@ -3629,7 +3629,7 @@ bool TQWidget::isActiveWindow() const
}
}
#endif
-#if defined(Q_WS_WIN32)
+#if defined(TQ_WS_WIN32)
HWND parent = tlw->winId();
HWND topparent = GetActiveWindow();
while ( parent ) {
@@ -4056,7 +4056,7 @@ void TQWidget::show()
// On Windows, show the popup now so that our own focus handling
// stores the correct old focus widget even if it's stolen in the showevent
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( testWFlags(WType_Popup) )
tqApp->openPopup( this );
#endif
@@ -4077,7 +4077,7 @@ void TQWidget::show()
else
showWindow();
-#if !defined(Q_WS_WIN)
+#if !defined(TQ_WS_WIN)
if ( testWFlags(WType_Popup) )
tqApp->openPopup( this );
#endif
@@ -4119,7 +4119,7 @@ void TQWidget::hide()
if ( testWFlags(WShowModal) )
tqt_leave_modal( this );
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
if ( isTopLevel() && !isPopup() && parentWidget() && isActiveWindow() )
parentWidget()->setActiveWindow(); // Activate parent
#endif
@@ -4543,7 +4543,7 @@ void TQWidget::adjustSize()
if ( isTopLevel() ) {
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
TQRect screen = TQApplication::desktop()->screenGeometry( x11Screen() );
#else // all others
TQRect screen = TQApplication::desktop()->screenGeometry( pos() );
@@ -4923,7 +4923,7 @@ bool TQWidget::event( TQEvent *e )
case TQEvent::ApplicationPaletteChange:
if ( !own_palette && !isDesktop() )
unsetPalette();
-# if defined(Q_WS_QWS) && !defined (TQT_NO_QWS_MANAGER)
+# if defined(TQ_WS_QWS) && !defined (TQT_NO_QWS_MANAGER)
if ( isTopLevel() && topData()->qwsManager ) {
TQRegion r( topData()->qwsManager->region() );
TQApplication::postEvent(topData()->qwsManager, new TQPaintEvent(r, FALSE) );
@@ -5568,7 +5568,7 @@ void TQWidget::hideEvent( TQHideEvent * )
*/
-#if defined(Q_WS_MAC)
+#if defined(TQ_WS_MAC)
/*!
This special event handler can be reimplemented in a subclass to
@@ -5590,7 +5590,7 @@ bool TQWidget::macEvent( MSG * )
}
#endif
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
/*!
This special event handler can be reimplemented in a subclass to
@@ -5611,7 +5611,7 @@ bool TQWidget::winEvent( MSG * )
}
#endif
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
/*!
This special event handler can be reimplemented in a subclass to
@@ -5632,7 +5632,7 @@ bool TQWidget::x11Event( XEvent * )
}
#endif
-#if defined(Q_WS_QWS)
+#if defined(TQ_WS_QWS)
/*!
This special event handler can be reimplemented in a subclass to