summaryrefslogtreecommitdiffstats
path: root/src/widgets/tqwhatsthis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/tqwhatsthis.cpp')
-rw-r--r--src/widgets/tqwhatsthis.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/widgets/tqwhatsthis.cpp b/src/widgets/tqwhatsthis.cpp
index 6f4a7ec10..d4906554e 100644
--- a/src/widgets/tqwhatsthis.cpp
+++ b/src/widgets/tqwhatsthis.cpp
@@ -241,12 +241,12 @@ void tqWhatsThisBDH()
TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name )
- : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( FALSE ), widget( w )
+ : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( false ), widget( w )
{
setBackgroundMode( NoBackground );
setPalette( TQToolTip::palette() );
- setMouseTracking( TRUE );
+ setMouseTracking( true );
#ifndef TQT_NO_CURSOR
setCursor( arrowCursor );
#endif
@@ -307,7 +307,7 @@ void TQWhatsThat::hide()
void TQWhatsThat::mousePressEvent( TQMouseEvent* e )
{
- pressed = TRUE;
+ pressed = true;
if ( e->button() == LeftButton && rect().contains( e->pos() ) ) {
#ifndef TQT_NO_RICHTEXT
if ( doc )
@@ -364,7 +364,7 @@ void TQWhatsThat::keyPressEvent( TQKeyEvent* )
void TQWhatsThat::paintEvent( TQPaintEvent* )
{
- bool drawShadow = TRUE;
+ bool drawShadow = true;
#if defined(TQ_WS_WIN)
if ( (qWinVersion()&WV_NT_based) > WV_2000 ) {
BOOL shadow;
@@ -372,7 +372,7 @@ void TQWhatsThat::paintEvent( TQPaintEvent* )
drawShadow = !shadow;
}
#elif defined(TQ_WS_MACX)
- drawShadow = FALSE; //never draw it on OS X we get it for free
+ drawShadow = false; //never draw it on OS X we get it for free
#endif
TQRect r = rect();
@@ -450,8 +450,8 @@ TQWhatsThisButton::TQWhatsThisButton( TQWidget * parent, const char * name )
{
TQPixmap p( (const char**)button_image );
setPixmap( p );
- setToggleButton( TRUE );
- setAutoRaise( TRUE );
+ setToggleButton( true );
+ setAutoRaise( true );
setFocusPolicy( NoFocus );
setTextLabel( tr( "What's this?" ) );
wt->buttons->insert( (void *)this, this );
@@ -472,7 +472,7 @@ void TQWhatsThisButton::mouseReleased()
if ( wt->state == TQWhatsThisPrivate::Inactive && isOn() ) {
TQWhatsThisPrivate::setUpWhatsThis();
#ifndef TQT_NO_CURSOR
- TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
+ TQApplication::setOverrideCursor( whatsThisCursor, false );
#endif
wt->state = TQWhatsThisPrivate::Waiting;
tqApp->installEventFilter( wt );
@@ -535,9 +535,9 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
if ( e->type() == TQEvent::MouseButtonPress && o->isWidgetType() ) {
TQWidget * w = (TQWidget *) o;
if ( ( (TQMouseEvent*)e)->button() == RightButton )
- return FALSE; // ignore RMB
+ return false; // ignore RMB
if ( w->customWhatsThis() )
- return FALSE;
+ return false;
TQWhatsThisPrivate::WhatsThisItem * i = 0;
TQMouseEvent* me = (TQMouseEvent*) e;
TQPoint p = me->pos();
@@ -545,7 +545,7 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
i = dict->find( w );
if ( !i ) {
p += w->pos();
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
leaveWhatsThisMode();
@@ -553,16 +553,16 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd );
#endif
- return TRUE;
+ return true;
}
if ( i->whatsthis )
say( w, i->whatsthis->text( p ), me->globalPos() );
else
say( w, i->s, me->globalPos() );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
if ( ( (TQMouseEvent*)e)->button() == RightButton )
- return FALSE; // ignore RMB
+ return false; // ignore RMB
return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis();
} else if ( e->type() == TQEvent::MouseMove ) {
return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis();
@@ -571,20 +571,20 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
if ( kev->key() == TQt::Key_Escape ) {
leaveWhatsThisMode();
- return TRUE;
+ return true;
} else if ( o->isWidgetType() && ((TQWidget*)o)->customWhatsThis() ) {
- return FALSE;
+ return false;
} else if ( kev->key() == Key_Menu ||
( kev->key() == Key_F10 &&
kev->state() == ShiftButton ) ) {
// we don't react to these keys, they are used for context menus
- return FALSE;
+ return false;
} else if ( kev->state() == kev->stateAfter() &&
kev->key() != Key_Meta ) { // not a modifier key
leaveWhatsThisMode();
}
} else if ( e->type() == TQEvent::MouseButtonDblClick ) {
- return TRUE;
+ return true;
}
break;
case Inactive:
@@ -595,16 +595,16 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
TQWidget * w = ((TQWidget *)o)->focusWidget();
if ( !w )
break;
- TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), TRUE );
+ TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), true );
if ( !s.isNull() ) {
say ( w, s, w->mapToGlobal( w->rect().center() ) );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
}
}
break;
}
- return FALSE;
+ return false;
}
@@ -637,7 +637,7 @@ void TQWhatsThisPrivate::leaveWhatsThisMode()
TQWhatsThisButton * b;
while( (b=it.current()) != 0 ) {
++it;
- b->setOn( FALSE );
+ b->setOn( false );
}
#ifndef TQT_NO_CURSOR
TQApplication::restoreOverrideCursor();
@@ -805,7 +805,7 @@ void TQWhatsThis::remove( TQWidget * widget )
the mouse position; this is useful, for example, if you've
subclassed to make the text that is displayed position dependent.
- If \a includeParents is TRUE, parent widgets are taken into
+ If \a includeParents is true, parent widgets are taken into
consideration as well when looking for what's this help text.
\sa add()
@@ -821,7 +821,7 @@ TQString TQWhatsThis::textFor( TQWidget * w, const TQPoint& pos, bool includePar
break;
if ( !i ) {
p += w->pos();
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
if (!i)
@@ -889,14 +889,14 @@ TQString TQWhatsThis::text( const TQPoint & )
"What's this?" window. \a href is the link the user clicked on, or
TQString::null if there was no link.
- If the function returns TRUE (the default), the "What's this?"
+ If the function returns true (the default), the "What's this?"
window is closed, otherwise it remains visible.
- The default implementation ignores \a href and returns TRUE.
+ The default implementation ignores \a href and returns true.
*/
bool TQWhatsThis::clicked( const TQString& )
{
- return TRUE;
+ return true;
}
@@ -920,7 +920,7 @@ void TQWhatsThis::enterWhatsThisMode()
if ( wt->state == TQWhatsThisPrivate::Inactive ) {
wt->enterWhatsThisMode();
#ifndef TQT_NO_CURSOR
- TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
+ TQApplication::setOverrideCursor( whatsThisCursor, false );
#endif
wt->state = TQWhatsThisPrivate::Waiting;
tqApp->installEventFilter( wt );
@@ -929,15 +929,15 @@ void TQWhatsThis::enterWhatsThisMode()
/*!
- Returns TRUE if the application is in "What's this?" mode;
- otherwise returns FALSE.
+ Returns true if the application is in "What's this?" mode;
+ otherwise returns false.
\sa enterWhatsThisMode(), leaveWhatsThisMode()
*/
bool TQWhatsThis::inWhatsThisMode()
{
if (!wt)
- return FALSE;
+ return false;
return wt->state == TQWhatsThisPrivate::Waiting;
}
@@ -994,7 +994,7 @@ void TQWhatsThis::display( const TQString& text, const TQPoint& pos, TQWidget* w
*/
void TQWhatsThis::setFont( const TQFont &font )
{
- TQApplication::setFont( font, TRUE, "TQWhatsThat" );
+ TQApplication::setFont( font, true, "TQWhatsThat" );
}
#include "tqwhatsthis.moc"