Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 3 months ago
parent a47244adc8
commit b6fa5c8b16
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -151,7 +151,7 @@ class TransparentWidget : public TQWidget
public: public:
TransparentWidget(Basket *basket); TransparentWidget(Basket *basket);
void setPosition(int x, int y); void setPosition(int x, int y);
//void reparent(TQWidget *parent, WFlags f, const TQPoint &p, bool showIt = FALSE); //void reparent(TQWidget *parent, WFlags f, const TQPoint &p, bool showIt = false);
protected: protected:
void paintEvent(TQPaintEvent*); void paintEvent(TQPaintEvent*);
void mouseMoveEvent(TQMouseEvent *event); void mouseMoveEvent(TQMouseEvent *event);

@ -28,7 +28,7 @@
/* From TQt documentation: /* From TQt documentation:
* " Note that only visible widgets can grab mouse input. * " Note that only visible widgets can grab mouse input.
* If isVisible() returns FALSE for a widget, that widget cannot call grabMouse(). " * If isVisible() returns false for a widget, that widget cannot call grabMouse(). "
* So, we should use an always visible widget to be able to pick a color from screen, * So, we should use an always visible widget to be able to pick a color from screen,
* even by first hidding the main window (user seldomly want to grab a color from BasKet!) * even by first hidding the main window (user seldomly want to grab a color from BasKet!)
* or use a global shortcut (main window can be hidden when hitting that shortcut). * or use a global shortcut (main window can be hidden when hitting that shortcut).

@ -69,7 +69,7 @@ TQAlphaWidget::TQAlphaWidget( TQWidget* w, WFlags f )
"tqt internal alpha effect widget", f ) "tqt internal alpha effect widget", f )
{ {
#if 1 //ndef TQ_WS_WIN #if 1 //ndef TQ_WS_WIN
setEnabled( FALSE ); setEnabled( false );
#endif #endif
pm.setOptimization( TQPixmap::BestOptim ); pm.setOptimization( TQPixmap::BestOptim );
@ -103,7 +103,7 @@ void TQAlphaWidget::run( int time )
elapsed = 0; elapsed = 0;
checkTime.start(); checkTime.start();
showWidget = TRUE; showWidget = true;
tqApp->installEventFilter( this ); tqApp->installEventFilter( this );
widget->setWState( WState_Visible ); widget->setWState( WState_Visible );
@ -123,7 +123,7 @@ void TQAlphaWidget::run( int time )
mixed = back.copy(); mixed = back.copy();
pm = mixed; pm = mixed;
show(); show();
setEnabled(FALSE); setEnabled(false);
connect( &anim, TQ_SIGNAL(timeout()), this, TQ_SLOT(render())); connect( &anim, TQ_SIGNAL(timeout()), this, TQ_SLOT(render()));
anim.start( 1 ); anim.start( 1 );
@ -155,15 +155,15 @@ bool TQAlphaWidget::eventFilter( TQObject* o, TQEvent* e )
break; break;
#endif #endif
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
setEnabled(TRUE); setEnabled(true);
showWidget = FALSE; showWidget = false;
render(); render();
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent *ke = (TQKeyEvent*)e; TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape ) if ( ke->key() == Key_Escape )
showWidget = FALSE; showWidget = false;
else else
duration = 0; duration = 0;
render(); render();
@ -184,7 +184,7 @@ void TQAlphaWidget::closeEvent( TQCloseEvent *e )
if ( !q_blend ) if ( !q_blend )
return; return;
showWidget = FALSE; showWidget = false;
render(); render();
TQWidget::closeEvent( e ); TQWidget::closeEvent( e );
@ -215,7 +215,7 @@ void TQAlphaWidget::render()
if ( widget ) { if ( widget ) {
if ( !showWidget ) { if ( !showWidget ) {
#ifdef TQ_WS_WIN #ifdef TQ_WS_WIN
setEnabled(TRUE); setEnabled(true);
setFocus(); setFocus();
#endif #endif
widget->hide(); widget->hide();
@ -251,7 +251,7 @@ void TQAlphaWidget::render()
widget->clearWState( WState_ForceHide ); widget->clearWState( WState_ForceHide );
alphaBlend(); alphaBlend();
pm = mixed; pm = mixed;
repaint( FALSE ); repaint( false );
} }
} }
@ -300,7 +300,7 @@ TQRollEffect::TQRollEffect( TQWidget* w, WFlags f, DirFlags orient )
"tqt internal roll effect widget", f ), orientation(orient) "tqt internal roll effect widget", f ), orientation(orient)
{ {
#if 1 //ndef TQ_WS_WIN #if 1 //ndef TQ_WS_WIN
setEnabled( FALSE ); setEnabled( false );
#endif #endif
widget = (TQAccessWidget*) w; widget = (TQAccessWidget*) w;
Q_ASSERT( widget ); Q_ASSERT( widget );
@ -336,7 +336,7 @@ void TQRollEffect::paintEvent( TQPaintEvent* )
int y = orientation & DownScroll ? TQMIN(0, currentHeight - totalHeight) : 0; int y = orientation & DownScroll ? TQMIN(0, currentHeight - totalHeight) : 0;
bitBlt( this, x, y, &pm, bitBlt( this, x, y, &pm,
0, 0, pm.width(), pm.height(), CopyROP, TRUE ); 0, 0, pm.width(), pm.height(), CopyROP, true );
} }
/* /*
@ -355,9 +355,9 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::Close: case TQEvent::Close:
if ( o != widget || done ) if ( o != widget || done )
break; break;
setEnabled(TRUE); setEnabled(true);
showWidget = FALSE; showWidget = false;
done = TRUE; done = true;
scroll(); scroll();
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
@ -368,9 +368,9 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
if ( done ) if ( done )
break; break;
setEnabled(TRUE); setEnabled(true);
showWidget = FALSE; showWidget = false;
done = TRUE; done = true;
scroll(); scroll();
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
@ -385,8 +385,8 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
if ( ke->key() == Key_Escape ) if ( ke->key() == Key_Escape )
showWidget = FALSE; showWidget = false;
done = TRUE; done = true;
scroll(); scroll();
break; break;
} }
@ -404,8 +404,8 @@ void TQRollEffect::closeEvent( TQCloseEvent *e )
e->accept(); e->accept();
if ( done ) if ( done )
return; return;
showWidget = FALSE; showWidget = false;
done = TRUE; done = true;
scroll(); scroll();
TQWidget::closeEvent( e ); TQWidget::closeEvent( e );
@ -442,12 +442,12 @@ void TQRollEffect::run( int time )
resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) ); resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) );
show(); show();
setEnabled(FALSE); setEnabled(false);
tqApp->installEventFilter( this ); tqApp->installEventFilter( this );
showWidget = TRUE; showWidget = true;
done = FALSE; done = false;
anim.start( 1 ); anim.start( 1 );
checkTime.start(); checkTime.start();
} }
@ -492,7 +492,7 @@ void TQRollEffect::scroll()
if ( orientation & DownScroll || orientation & UpScroll ) if ( orientation & DownScroll || orientation & UpScroll )
h = TQMIN( currentHeight, totalHeight ); h = TQMIN( currentHeight, totalHeight );
setUpdatesEnabled( FALSE ); setUpdatesEnabled( false );
if ( orientation & UpScroll ) if ( orientation & UpScroll )
y = widget->geometry().y() + TQMAX( 0, totalHeight - currentHeight ); y = widget->geometry().y() + TQMAX( 0, totalHeight - currentHeight );
if ( orientation & LeftScroll ) if ( orientation & LeftScroll )
@ -501,8 +501,8 @@ void TQRollEffect::scroll()
move( x, y ); move( x, y );
resize( w, h ); resize( w, h );
setUpdatesEnabled( TRUE ); setUpdatesEnabled( true );
repaint( FALSE ); repaint( false );
} }
if ( done ) { if ( done ) {
anim.stop(); anim.stop();
@ -510,7 +510,7 @@ void TQRollEffect::scroll()
if ( widget ) { if ( widget ) {
if ( !showWidget ) { if ( !showWidget ) {
#ifdef TQ_WS_WIN #ifdef TQ_WS_WIN
setEnabled(TRUE); setEnabled(true);
setFocus(); setFocus();
#endif #endif
widget->hide(); widget->hide();

Loading…
Cancel
Save