summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqabstractlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqabstractlayout.cpp')
-rw-r--r--src/kernel/tqabstractlayout.cpp140
1 files changed, 70 insertions, 70 deletions
diff --git a/src/kernel/tqabstractlayout.cpp b/src/kernel/tqabstractlayout.cpp
index cbace549d..094c21fa0 100644
--- a/src/kernel/tqabstractlayout.cpp
+++ b/src/kernel/tqabstractlayout.cpp
@@ -269,9 +269,9 @@ TQWidget * TQWidgetItem::widget()
}
/*!
- Returns TRUE if this layout's preferred height depends on its
- width; otherwise returns FALSE. The default implementation returns
- FALSE.
+ Returns true if this layout's preferred height depends on its
+ width; otherwise returns false. The default implementation returns
+ false.
Reimplement this function in layout managers that support height
for width.
@@ -280,7 +280,7 @@ TQWidget * TQWidgetItem::widget()
*/
bool TQLayoutItem::hasHeightForWidth() const
{
- return FALSE;
+ return false;
}
/*!
@@ -403,7 +403,7 @@ TQRect TQLayout::geometry() const
bool TQWidgetItem::hasHeightForWidth() const
{
if ( isEmpty() )
- return FALSE;
+ return false;
if ( wid->layout() )
return wid->layout()->hasHeightForWidth();
return wid->sizePolicy().hasHeightForWidth();
@@ -544,16 +544,16 @@ TQSize TQWidgetItem::sizeHint() const
}
/*!
- Returns TRUE because a spacer item never contains widgets.
+ Returns true because a spacer item never contains widgets.
*/
bool TQSpacerItem::isEmpty() const
{
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if the widget has been hidden; otherwise returns
- FALSE.
+ Returns true if the widget has been hidden; otherwise returns
+ false.
*/
bool TQWidgetItem::isEmpty() const
{
@@ -611,7 +611,7 @@ TQLayout::TQLayout( TQWidget *parent, int margin, int spacing, const char *name
parent->name() );
parent->removeChild( this );
} else {
- topLevel = TRUE;
+ topLevel = true;
parent->installEventFilter( this );
setWidgetLayout( parent, this );
}
@@ -627,14 +627,14 @@ void TQLayout::init()
{
insideSpacing = 0;
outsideBorder = 0;
- topLevel = FALSE;
- enabled = TRUE;
- autoNewChild = FALSE;
- frozen = FALSE;
- activated = FALSE;
- marginImpl = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ topLevel = false;
+ enabled = true;
+ autoNewChild = false;
+ frozen = false;
+ activated = false;
+ marginImpl = false;
+ autoMinimum = false;
+ autoResizeMode = true;
extraData = 0;
#ifndef TQT_NO_MENUBAR
menubar = 0;
@@ -717,8 +717,8 @@ TQLayout::TQLayout( int spacing, const char *name )
/*!
\fn bool TQLayout::isTopLevel () const
- Returns TRUE if this layout is a top-level layout, i.e. not a
- child of another layout; otherwise returns FALSE.
+ Returns true if this layout is a top-level layout, i.e. not a
+ child of another layout; otherwise returns false.
*/
/*!
@@ -784,12 +784,12 @@ TQWidget *TQLayout::mainWidget()
}
/*!
- Returns TRUE if this layout is empty. The default implementation
- returns FALSE.
+ Returns true if this layout is empty. The default implementation
+ returns false.
*/
bool TQLayout::isEmpty() const
{
- return FALSE; //### should check
+ return false; //### should check
}
/*!
@@ -821,17 +821,17 @@ void TQLayout::invalidate()
static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
{
- bool didSomething = FALSE;
+ bool didSomething = false;
TQLayoutIterator it = lay->iterator();
TQLayoutItem *child;
while ( (child = it.current()) != 0 ) {
if ( child->widget() == w ) {
it.deleteCurrent();
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else if ( removeWidgetRecursively(child, w) ) {
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else {
++it;
}
@@ -848,10 +848,10 @@ static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
bool TQLayout::eventFilter( TQObject *o, TQEvent *e )
{
if ( !enabled )
- return FALSE;
+ return false;
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
switch ( e->type() ) {
case TQEvent::Resize:
@@ -1184,7 +1184,7 @@ bool TQLayout::activate()
{
invalidateRecursive( this );
if ( !topLevel )
- return FALSE;
+ return false;
TQWidget *mw = mainWidget();
if (!mw) {
@@ -1192,9 +1192,9 @@ bool TQLayout::activate()
tqWarning( "TQLayout::activate: %s \"%s\" does not have a main widget",
TQObject::className(), TQObject::name() );
#endif
- return FALSE;
+ return false;
}
- activated = TRUE;
+ activated = true;
TQSize s = mw->size();
TQSize ms;
int mbh = 0;
@@ -1237,7 +1237,7 @@ bool TQLayout::activate()
// ideally only if sizeHint() or sizePolicy() has changed
mw->updateGeometry();
- return TRUE;
+ return true;
}
/*!
@@ -1346,7 +1346,7 @@ bool TQLayout::activate()
TQSizePolicy::SizeType sizing types\endlink affect how the widget
is treated by the \link TQLayout layout engine\endlink.
- If \a hfw is TRUE, the preferred height of the widget is dependent
+ If \a hfw is true, the preferred height of the widget is dependent
on the width of the widget (for example, a TQLabel with line
wrapping).
@@ -1360,7 +1360,7 @@ bool TQLayout::activate()
sizing types \a hor and \a ver, and stretch factors \a horStretch
and \a verStretch.
- If \a hfw is TRUE, the preferred height of the widget is dependent on the
+ If \a hfw is true, the preferred height of the widget is dependent on the
width of the widget.
\sa horStretch() verStretch()
@@ -1385,8 +1385,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkHorizontally() const
- Returns TRUE if the widget can sensibly be narrower than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be narrower than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkVertically() mayGrowHorizontally()
*/
@@ -1394,8 +1394,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkVertically() const
- Returns TRUE if the widget can sensibly be shorter than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be shorter than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkHorizontally() mayGrowVertically()
*/
@@ -1403,8 +1403,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowHorizontally() const
- Returns TRUE if the widget can sensibly be wider than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be wider than its
+ sizeHint(); otherwise returns false.
\sa mayGrowVertically() mayShrinkHorizontally()
*/
@@ -1412,8 +1412,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowVertically() const
- Returns TRUE if the widget can sensibly be taller than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be taller than its
+ sizeHint(); otherwise returns false.
\sa mayGrowHorizontally() mayShrinkVertically()
*/
@@ -1450,8 +1450,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::hasHeightForWidth() const
- Returns TRUE if the widget's preferred height depends on its
- width; otherwise returns FALSE.
+ Returns true if the widget's preferred height depends on its
+ width; otherwise returns false.
\sa setHeightForWidth()
*/
@@ -1506,8 +1506,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator==( const TQSizePolicy &s ) const
- Returns TRUE if this policy is equal to \a s; otherwise returns
- FALSE.
+ Returns true if this policy is equal to \a s; otherwise returns
+ false.
\sa operator!=()
*/
@@ -1515,8 +1515,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator!=( const TQSizePolicy &s ) const
- Returns TRUE if this policy is different from \a s; otherwise
- returns FALSE.
+ Returns true if this policy is different from \a s; otherwise
+ returns false.
\sa operator==()
*/
@@ -1713,24 +1713,24 @@ void TQLayout::setResizeMode( ResizeMode mode )
switch ( mode ) {
case Auto:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = true;
break;
case Fixed:
- frozen = TRUE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = true;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case FreeResize:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case Minimum:
- frozen = FALSE;
- autoMinimum = TRUE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = true;
+ autoResizeMode = false;
}
if ( mainWidget() && mainWidget()->isVisible() )
activate();
@@ -1745,9 +1745,9 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
/*!
\fn bool TQLayout::autoAdd() const
- Returns TRUE if this layout automatically grabs all new
+ Returns true if this layout automatically grabs all new
mainWidget()'s new children and adds them as defined by addItem();
- otherwise returns FALSE. This has effect only for top-level
+ otherwise returns false. This has effect only for top-level
layouts, i.e. layouts that are direct children of their
mainWidget().
@@ -1760,7 +1760,7 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
*/
/*!
- If \a b is TRUE, auto-add is enabled; otherwise auto-add is
+ If \a b is true, auto-add is enabled; otherwise auto-add is
disabled.
\warning If auto-add is enabled, you cannot set stretch factors
@@ -1779,19 +1779,19 @@ void TQLayout::setAutoAdd( bool b )
/*!
\fn bool TQLayout::supportsMargin() const
- Returns TRUE if this layout supports \l TQLayout::margin on
- non-top-level layouts; otherwise returns FALSE.
+ Returns true if this layout supports \l TQLayout::margin on
+ non-top-level layouts; otherwise returns false.
\sa margin
*/
/*!
- Sets the value returned by supportsMargin(). If \a b is TRUE,
+ Sets the value returned by supportsMargin(). If \a b is true,
margin() handling is implemented by the subclass. If \a b is
- FALSE (the default), TQLayout will add margin() around top-level
+ false (the default), TQLayout will add margin() around top-level
layouts.
- If \a b is TRUE, margin handling needs to be implemented in
+ If \a b is true, margin handling needs to be implemented in
setGeometry(), maximumSize(), minimumSize(), sizeHint() and
heightForWidth().
@@ -1904,7 +1904,7 @@ void TQLayout::removeItem( TQLayoutItem *item )
}
/*!
- Enables this layout if \a enable is TRUE, otherwise disables it.
+ Enables this layout if \a enable is true, otherwise disables it.
An enabled layout adjusts dynamically to changes; a disabled
layout acts as if it did not exist.
@@ -1919,7 +1919,7 @@ void TQLayout::setEnabled( bool enable )
}
/*!
- Returns TRUE if the layout is enabled; otherwise returns FALSE.
+ Returns true if the layout is enabled; otherwise returns false.
\sa setEnabled()
*/