summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/propertyeditor.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-04-08 12:59:07 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-04-10 17:35:38 +0900
commitd2d30bfbef26707f9158cbc31d5763a9a1d4ab2d (patch)
tree6d2d4502d6fbe4d6810bfb7bcf297cbf995d3db8 /kdevdesigner/designer/propertyeditor.cpp
parentb9618de13e8f38c3558e9ed393a75c1f13af665c (diff)
downloadtdevelop-r14.1.4.tar.gz
tdevelop-r14.1.4.zip
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 5198c9d3ac02aa9c7949f49e3cf374f683facb18)
Diffstat (limited to 'kdevdesigner/designer/propertyeditor.cpp')
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp426
1 files changed, 213 insertions, 213 deletions
diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index af1d26d7..41d21a02 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -151,7 +151,7 @@ bool PropertyWhatsThis::clicked( const TQString& href )
TQAssistantClient *ac = MainWindow::self->assistantClient();
ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href );
}
- return FALSE; // do not hide window
+ return false; // do not hide window
}
@@ -173,10 +173,10 @@ bool PropertyWhatsThis::clicked( const TQString& href )
PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
{
- setSelectable( FALSE );
- open = FALSE;
+ setSelectable( false );
+ open = false;
setText( 0, propertyName );
- changed = FALSE;
+ changed = false;
setText( 1, "" );
resetButton = 0;
}
@@ -247,7 +247,7 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( isChanged() && column == 0 ) {
p->save();
TQFont f = p->font();
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
@@ -299,13 +299,13 @@ void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRec
p->restore();
}
-/*! Subclasses which are expandable items have to return TRUE
- here. Default is FALSE.
+/*! Subclasses which are expandable items have to return true
+ here. Default is false.
*/
bool PropertyItem::hasSubItems() const
{
- return FALSE;
+ return false;
}
/*! Returns the parent property item here if this is a child or 0
@@ -329,9 +329,9 @@ void PropertyItem::setOpen( bool b )
open = b;
if ( !open ) {
- children.setAutoDelete( TRUE );
+ children.setAutoDelete( true );
children.clear();
- children.setAutoDelete( FALSE );
+ children.setAutoDelete( false );
tqApp->processEvents();
listview->updateEditorSize();
return;
@@ -429,7 +429,7 @@ void PropertyItem::updateResetButtonState()
if ( !resetButton )
return;
if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) )
- resetButton->setEnabled( FALSE );
+ resetButton->setEnabled( false );
else
resetButton->setEnabled( isChanged() );
}
@@ -445,7 +445,7 @@ void PropertyItem::placeEditor( TQWidget *w )
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
#if defined(TQ_WS_WIN)
- listview->repaintContents( FALSE );
+ listview->repaintContents( false );
#endif
r = listview->itemRect( this );
}
@@ -468,12 +468,12 @@ void PropertyItem::notifyValueChange()
{
if ( !propertyParent() ) {
listview->valueChanged( this );
- setChanged( TRUE );
+ setChanged( true );
if ( hasSubItems() )
initChildren();
} else {
propertyParent()->childValueChanged( this );
- setChanged( TRUE );
+ setChanged( true );
}
}
@@ -507,12 +507,12 @@ PropertyItem *PropertyItem::child( int i ) const
/*! If the contents of the item is not displayable with a text, but
you want to draw it yourself (using drawCustomContents()), return
- TRUE here.
+ true here.
*/
bool PropertyItem::hasCustomContents() const
{
- return FALSE;
+ return false;
}
/*!
@@ -600,7 +600,7 @@ TQLineEdit *PropertyTextItem::lined()
if ( PropertyItem::name() == "name" ) {
lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) );
if ( listview->propertyEditor()->formWindow()->isFake() )
- lin->setEnabled( FALSE );
+ lin->setEnabled( false );
} else {
lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
@@ -616,7 +616,7 @@ TQLineEdit *PropertyTextItem::lined()
button->setFixedWidth( 20 );
connect( button, TQ_SIGNAL( clicked() ),
this, TQ_SLOT( getText() ) );
- lin->setFrame( FALSE );
+ lin->setFrame( false );
}
connect( lin, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( setValue() ) );
@@ -657,16 +657,16 @@ void PropertyTextItem::childValueChanged( PropertyItem *child )
PropertyItem::name(), child->value().toString() );
else
MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() );
- listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE );
+ listview->propertyEditor()->formWindow()->commandHistory()->setModified( true );
}
void PropertyTextItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin || lin->text().length() == 0 ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( value().toString() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
TQWidget* w;
@@ -686,7 +686,7 @@ void PropertyTextItem::createChildren()
{
PropertyTextItem *i = new PropertyTextItem( listview, this, this,
PropertyItem::name() == "name" ?
- "export macro" : "comment", FALSE, FALSE,
+ "export macro" : "comment", false, false,
PropertyItem::name() == "name" );
i->lined()->setEnabled( isChanged() );
addChild( i );
@@ -724,13 +724,13 @@ void PropertyTextItem::setValue( const TQVariant &v )
&& value() == v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
lined()->setText( v.toString() );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, v.toString() );
PropertyItem::setValue( v );
@@ -755,15 +755,15 @@ void PropertyTextItem::getText()
{
bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" );
- bool doWrap = FALSE;
+ bool doWrap = false;
TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
if ( !txt.isEmpty() ) {
setText( 1, txt );
PropertyItem::setValue( txt );
notifyValueChange();
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( txt );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
}
@@ -801,9 +801,9 @@ void PropertyDoubleItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( TQString::number( value().toDouble() ) );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
TQWidget* w = lined();
@@ -827,13 +827,13 @@ void PropertyDoubleItem::setValue( const TQVariant &v )
if ( value() == v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
lined()->setText( TQString::number( v.toDouble() ) );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, TQString::number( v.toDouble() ) );
PropertyItem::setValue( v );
@@ -880,9 +880,9 @@ void PropertyDateItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setDate( value().toDate() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -905,10 +905,10 @@ void PropertyDateItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->date() != v.toDate() )
lined()->setDate( v.toDate() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, v.toDate().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -955,9 +955,9 @@ void PropertyTimeItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setTime( value().toTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -980,10 +980,10 @@ void PropertyTimeItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->time() != v.toTime() )
lined()->setTime( v.toTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, v.toTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -1030,9 +1030,9 @@ void PropertyDateTimeItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setDateTime( value().toDateTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -1055,10 +1055,10 @@ void PropertyDateTimeItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->dateTime() != v.toDateTime() )
lined()->setDateTime( v.toDateTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, v.toDateTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -1085,7 +1085,7 @@ TQComboBox *PropertyBoolItem::combo()
{
if ( comb )
return comb;
- comb = new TQComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( false, listview->viewport() );
comb->hide();
comb->insertItem( i18n( "False" ) );
comb->insertItem( i18n( "True" ) );
@@ -1112,12 +1112,12 @@ void PropertyBoolItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
if ( value().toBool() )
combo()->setCurrentItem( 1 );
else
combo()->setCurrentItem( 0 );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -1139,12 +1139,12 @@ void PropertyBoolItem::setValue( const TQVariant &v )
return;
if ( comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
if ( v.toBool() )
combo()->setCurrentItem( 1 );
else
combo()->setCurrentItem( 0 );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
TQString tmp = i18n( "True" );
if ( !v.toBool() )
@@ -1158,7 +1158,7 @@ void PropertyBoolItem::setValue()
if ( !comb )
return;
setText( 1, combo()->currentText() );
- bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
+ bool b = combo()->currentItem() != 0;
PropertyItem::setValue( TQVariant( b ) );
notifyValueChange();
}
@@ -1201,12 +1201,12 @@ void PropertyIntItem::showEditor()
{
PropertyItem::showEditor();
if ( !spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
if ( signedValue )
spinBox()->setValue( value().toInt() );
else
spinBox()->setValue( value().toUInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
placeEditor( spinBox() );
if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) {
@@ -1228,12 +1228,12 @@ void PropertyIntItem::setValue( const TQVariant &v )
return;
if ( spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
if ( signedValue )
spinBox()->setValue( v.toInt() );
else
spinBox()->setValue( v.toUInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
if ( signedValue )
@@ -1291,9 +1291,9 @@ void PropertyLayoutItem::showEditor()
{
PropertyItem::showEditor();
if ( !spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
spinBox()->setValue( value().toInt() );
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
}
placeEditor( spinBox() );
if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) {
@@ -1311,9 +1311,9 @@ void PropertyLayoutItem::hideEditor()
void PropertyLayoutItem::setValue( const TQVariant &v )
{
if ( spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
spinBox()->setValue( v.toInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
TQString s = v.toString();
if ( v.toInt() == -1 )
@@ -1369,10 +1369,10 @@ void PropertyListItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -1390,10 +1390,10 @@ void PropertyListItem::hideEditor()
void PropertyListItem::setValue( const TQVariant &v )
{
if ( comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( v.toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
setText( 1, v.toStringList().first() );
PropertyItem::setValue( v );
@@ -1424,10 +1424,10 @@ void PropertyListItem::setCurrentItem( const TQString &s )
return;
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
for ( uint i = 0; i < combo()->listBox()->count(); ++i ) {
if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) {
@@ -1451,10 +1451,10 @@ void PropertyListItem::setCurrentItem( int i )
return;
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
combo()->setCurrentItem( i );
setText( 1, combo()->currentText() );
@@ -1492,7 +1492,7 @@ TQLineEdit *PropertyCoordItem::lined()
if ( lin )
return lin;
lin = new TQLineEdit( listview->viewport() );
- lin->setReadOnly( TRUE );
+ lin->setReadOnly( true );
lin->installEventFilter( listview );
lin->hide();
return lin;
@@ -1502,15 +1502,15 @@ void PropertyCoordItem::createChildren()
{
PropertyItem *i = this;
if ( typ == Rect || typ == Point ) {
- i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "x" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "y" ), true );
addChild( i );
}
if ( typ == Rect || typ == Size ) {
- i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "width" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "height" ), true );
addChild( i );
}
}
@@ -1592,7 +1592,7 @@ void PropertyCoordItem::setValue( const TQVariant &v )
bool PropertyCoordItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyCoordItem::childValueChanged( PropertyItem *child )
@@ -1699,7 +1699,7 @@ void PropertyPixmapItem::getPixmap()
bool PropertyPixmapItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -1754,11 +1754,11 @@ PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, Prop
void PropertyColorItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Red" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Green" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), true );
addChild( i );
}
@@ -1838,7 +1838,7 @@ void PropertyColorItem::getColor()
bool PropertyColorItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -1863,8 +1863,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- lined->setFrame( FALSE );
- lined->setReadOnly( TRUE );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
box->setFocusProxy( lined );
box->installEventFilter( listview );
lined->installEventFilter( listview );
@@ -1876,9 +1876,9 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
void PropertyFontItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "Family" ), false );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), true );
addChild( i );
i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) );
addChild( i );
@@ -1944,7 +1944,7 @@ void PropertyFontItem::setValue( const TQVariant &v )
void PropertyFontItem::getFont()
{
- bool ok = FALSE;
+ bool ok = false;
TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
@@ -1954,7 +1954,7 @@ void PropertyFontItem::getFont()
bool PropertyFontItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyFontItem::childValueChanged( PropertyItem *child )
@@ -1990,8 +1990,8 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- lined->setFrame( FALSE );
- lined->setReadOnly( TRUE );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
box->setFocusProxy( lined );
box->installEventFilter( listview );
lined->installEventFilter( listview );
@@ -2001,12 +2001,12 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after
void PropertyDatabaseItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Connection" ), true );
addChild( i );
- i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Table" ), true );
addChild( i );
if ( withField ) {
- i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Field" ), true );
addChild( i );
}
}
@@ -2110,7 +2110,7 @@ void PropertyDatabaseItem::setValue( const TQVariant &v )
bool PropertyDatabaseItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
@@ -2158,7 +2158,7 @@ TQLineEdit *PropertySizePolicyItem::lined()
return lin;
lin = new TQLineEdit( listview->viewport() );
lin->hide();
- lin->setReadOnly( TRUE );
+ lin->setReadOnly( true );
return lin;
}
@@ -2168,15 +2168,15 @@ void PropertySizePolicyItem::createChildren()
lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), false );
i->setValue( lst );
addChild( i );
- i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), false );
i->setValue( lst );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), true );
addChild( i );
}
@@ -2250,7 +2250,7 @@ void PropertySizePolicyItem::childValueChanged( PropertyItem *child )
bool PropertySizePolicyItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
// --------------------------------------------------------------
@@ -2305,7 +2305,7 @@ void PropertyPaletteItem::getPalette()
{
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
- bool ok = FALSE;
+ bool ok = false;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport();
@@ -2320,7 +2320,7 @@ void PropertyPaletteItem::getPalette()
bool PropertyPaletteItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -2354,7 +2354,7 @@ TQComboBox *PropertyCursorItem::combo()
{
if ( comb )
return comb;
- comb = new TQComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( false, listview->viewport() );
comb->hide();
TQBitmap cur;
@@ -2406,9 +2406,9 @@ void PropertyCursorItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->setCurrentItem( (int)value().toCursor().shape() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -2429,9 +2429,9 @@ void PropertyCursorItem::setValue( const TQVariant &v )
&& value() == v )
return;
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->setCurrentItem( (int)v.toCursor().shape() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
setText( 1, combo()->currentText() );
PropertyItem::setValue( v );
}
@@ -2454,7 +2454,7 @@ PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l,
PropertyItem *prop,
const TQString &propName )
: PropertyItem( l, after, prop, propName ),
- k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE )
+ k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( false )
{
box = new TQHBox( listview->viewport() );
box->hide();
@@ -2493,22 +2493,22 @@ bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e )
if ( !mouseEnter &&
(k->key() == TQObject::Key_Up ||
k->key() == TQObject::Key_Down) )
- return FALSE;
+ return false;
handleKeyEvent( k );
- return TRUE;
+ return true;
} else if ( (e->type() == TQEvent::FocusIn) ||
(e->type() == TQEvent::MouseButtonPress) ) {
mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) ||
(e->type() == TQEvent::MouseButtonPress);
- return TRUE;
+ return true;
}
// Lets eat accelerators now..
if ( e->type() == TQEvent::Accel ||
e->type() == TQEvent::AccelOverride ||
e->type() == TQEvent::KeyRelease )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e )
@@ -2568,7 +2568,7 @@ void PropertyKeysequenceItem::setValue()
PropertyItem::setValue( v );
if ( sequence->hasFocus() )
notifyValueChange();
- setChanged( TRUE );
+ setChanged( true );
}
void PropertyKeysequenceItem::setValue( const TQVariant &v )
@@ -2595,7 +2595,7 @@ EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f )
setFrameStyle( Panel | Plain );
setPaletteBackgroundColor( TQt::white );
popLayout = new TQVBoxLayout( this, 3 );
- checkBoxList.setAutoDelete( TRUE );
+ checkBoxList.setAutoDelete( true );
}
EnumPopup::~EnumPopup()
@@ -2656,18 +2656,18 @@ EnumBox::EnumBox( TQWidget *parent, const char *name )
pop = new EnumPopup( this, "popup", TQObject::WType_Popup );
connect( pop, TQ_SIGNAL( hidden() ), this, TQ_SLOT( popupHidden() ) );
connect( pop, TQ_SIGNAL( closed() ), this, TQ_SLOT( popupClosed() ) );
- popupShown = FALSE;
- arrowDown = FALSE;
+ popupShown = false;
+ arrowDown = false;
}
void EnumBox::popupHidden()
{
- popupShown = FALSE;
+ popupShown = false;
}
void EnumBox::popupClosed()
{
- popupShown = FALSE;
+ popupShown = false;
emit valueChanged();
}
@@ -2684,7 +2684,7 @@ void EnumBox::paintEvent( TQPaintEvent * )
flags |= TQStyle::Style_HasFocus;
if ( width() < 5 || height() < 5 ) {
- qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2,
+ qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, false, 2,
&g.brush( TQColorGroup::Button ) );
return;
}
@@ -2723,14 +2723,14 @@ void EnumBox::popup()
{
if ( popupShown ) {
pop->closeWidget();
- popupShown = FALSE;
+ popupShown = false;
return;
}
pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
pop->setMinimumWidth( width() );
emit aboutToShowPopup();
pop->show();
- popupShown = TRUE;
+ popupShown = true;
}
void EnumBox::mousePressEvent( TQMouseEvent *e )
@@ -2745,8 +2745,8 @@ void EnumBox::mousePressEvent( TQMouseEvent *e )
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( arrowRect.contains( e->pos() ) ) {
- arrowDown = TRUE;
- repaint( FALSE );
+ arrowDown = true;
+ repaint( false );
}
popup();
@@ -2765,14 +2765,14 @@ void EnumBox::keyPressEvent( TQKeyEvent *e )
void EnumBox::restoreArrow()
{
- arrowDown = FALSE;
- repaint( FALSE );
+ arrowDown = false;
+ repaint( false );
}
void EnumBox::setText( const TQString &text )
{
str = text;
- repaint( FALSE );
+ repaint( false );
}
@@ -2820,8 +2820,8 @@ void PropertyEnumItem::setValue( const TQVariant &v )
TQStringList lst = v.toStringList();
TQValueListConstIterator<TQString> it = lst.begin();
for ( ; it != lst.end(); ++it )
- enumList.append( EnumItem( *it, FALSE ) );
- enumList.first().selected = TRUE;
+ enumList.append( EnumItem( *it, false ) );
+ enumList.first().selected = true;
enumString = enumList.first().key;
box->setText( enumString );
setText( 1, enumString );
@@ -2856,10 +2856,10 @@ void PropertyEnumItem::setCurrentValues( TQStrList lst )
TQStrList::ConstIterator it = lst.begin();
TQValueList<EnumItem>::Iterator eit = enumList.begin();
for ( ; eit != enumList.end(); ++eit ) {
- (*eit).selected = FALSE;
+ (*eit).selected = false;
for ( it = lst.begin(); it != lst.end(); ++it ) {
if ( TQString( *it ) == (*eit).key ) {
- (*eit).selected = TRUE;
+ (*eit).selected = true;
enumString += "|" + (*eit).key;
break;
}
@@ -2909,11 +2909,11 @@ PropertyList::PropertyList( PropertyEditor *e )
init_colors();
whatsThis = new PropertyWhatsThis( this );
- showSorted = FALSE;
- header()->setMovingEnabled( FALSE );
- header()->setStretchEnabled( TRUE );
+ showSorted = false;
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
setResizePolicy( TQScrollView::Manual );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
viewport()->installEventFilter( this );
addColumn( i18n( "Property" ) );
addColumn( i18n( "Value" ) );
@@ -2931,7 +2931,7 @@ PropertyList::PropertyList( PropertyEditor *e )
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
setColumnWidthMode( 1, Manual );
- mousePressed = FALSE;
+ mousePressed = false;
pressItem = 0;
theLastEvent = MouseEvent;
header()->installEventFilter( this );
@@ -3020,10 +3020,10 @@ static bool parent_is_data_aware( TQWidget *w )
TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
if ( ::tqt_cast<QDesignerDataBrowser*>(p) || ::tqt_cast<QDesignerDataView*>(p) )
- return TRUE;
+ return true;
p = p->parentWidget();
}
- return FALSE;
+ return false;
}
#endif
@@ -3072,7 +3072,7 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
continue;
}
- unique.insert( TQString::fromLatin1( it.current() ), TRUE );
+ unique.insert( TQString::fromLatin1( it.current() ), true );
if ( editor->widget()->isWidgetType() &&
editor->formWindow()->isMainContainer( editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
@@ -3167,27 +3167,27 @@ void PropertyList::setupProperties()
<< p->valueToKey( AlignHCenter )
<< p->valueToKey( AlignRight )
<< p->valueToKey( AlignJustify );
- item = new PropertyListItem( this, item, 0, "hAlign", FALSE );
+ item = new PropertyListItem( this, item, 0, "hAlign", false );
item->setValue( lst );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
<< p->valueToKey( AlignBottom );
- item = new PropertyListItem( this, item, 0, "vAlign", FALSE );
+ item = new PropertyListItem( this, item, 0, "vAlign", false );
item->setValue( lst );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
if ( ::tqt_cast<TQGroupBox*>(w) )
- item->setVisible( FALSE );
+ item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
} else {
TQStrList lst( p->enumKeys() );
@@ -3201,7 +3201,7 @@ void PropertyList::setupProperties()
item->setValue( l );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
} else if ( p->isEnumType() ) {
TQStrList l = p->enumKeys();
@@ -3213,7 +3213,7 @@ void PropertyList::setupProperties()
continue;
lst << k;
}
- item = new PropertyListItem( this, item, 0, p->name(), FALSE );
+ item = new PropertyListItem( this, item, 0, p->name(), false );
item->setValue( lst );
} else {
TQVariant::Type t = TQVariant::nameToType( p->type() );
@@ -3227,7 +3227,7 @@ void PropertyList::setupProperties()
valueSet << item->name();
}
if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
}
@@ -3237,20 +3237,20 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
|| MetaDataBase::spacing( editor->widget() ) != -1 )
- layoutInitValue( item, TRUE );
+ layoutInitValue( item, true );
else
layoutInitValue( item );
item = new PropertyLayoutItem( this, item, 0, "layoutMargin" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" )
|| MetaDataBase::margin( editor->widget() ) != -1 )
- layoutInitValue( item, TRUE );
+ layoutInitValue( item, true );
else
layoutInitValue( item );
TQWidget *widget = (TQWidget*)w;
if ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
- item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
+ item = new PropertyListItem( this, item, 0, "resizeMode", false );
TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
item->setValue( lst );
@@ -3258,22 +3258,22 @@ void PropertyList::setupProperties()
TQString resizeMod = MetaDataBase::resizeMode( editor->widget() );
if ( !resizeMod.isEmpty() &&
resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) {
- item->setChanged( TRUE, FALSE );
- MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE );
+ item->setChanged( true, false );
+ MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", true );
}
}
}
if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
!::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) ) {
- item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
+ item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
- item->setChanged( TRUE, FALSE );
- item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE );
+ item->setChanged( true, false );
+ item = new PropertyTextItem( this, item, 0, "whatsThis", true, true );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
#ifndef TQT_NO_SQL
@@ -3282,19 +3282,19 @@ void PropertyList::setupProperties()
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
::tqt_cast<TQDataView*>(editor->widget()) ) {
- item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
+ item = new PropertyDatabaseItem( this, item, 0, "database", false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "frameworkCode" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
#endif
@@ -3337,18 +3337,18 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
if ( unique.contains( TQString( (*it).property ) ) )
continue;
- unique.insert( TQString( (*it).property ), TRUE );
+ unique.insert( TQString( (*it).property ), true );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
}
bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
{
if ( name == "buddy" ) {
- PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE );
+ PropertyListItem *itm = new PropertyListItem( this, item, 0, name, true );
TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets();
TQPtrDictIterator<TQWidget> it( *widgets );
TQStringList l;
@@ -3363,12 +3363,12 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
l.sort();
itm->setValue( l );
item = itm;
- return TRUE;
+ return true;
}
switch ( t ) {
case TQVariant::String:
- item = new PropertyTextItem( this, item, 0, name, TRUE,
+ item = new PropertyTextItem( this, item, 0, name, true,
::tqt_cast<TQLabel*>(editor->widget()) ||
::tqt_cast<TQTextView*>(editor->widget()) ||
::tqt_cast<TQButton*>(editor->widget()) );
@@ -3377,7 +3377,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
editor->widget() == editor->formWindow()->mainContainer(),
- FALSE, TRUE );
+ false, true );
break;
case TQVariant::Bool:
item = new PropertyBoolItem( this, item, 0, name );
@@ -3387,13 +3387,13 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
break;
case TQVariant::Int:
if ( name == "accel" )
- item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE );
+ item = new PropertyTextItem( this, item, 0, name, false, false, false, true );
else if ( name == "layoutSpacing" || name == "layoutMargin" )
item = new PropertyLayoutItem( this, item, 0, name );
else if ( name == "resizeMode" )
- item = new PropertyListItem( this, item, 0, name, TRUE );
+ item = new PropertyListItem( this, item, 0, name, true );
else
- item = new PropertyIntItem( this, item, 0, name, TRUE );
+ item = new PropertyIntItem( this, item, 0, name, true );
break;
case TQVariant::Double:
item = new PropertyDoubleItem( this, item, 0, name );
@@ -3402,10 +3402,10 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyKeysequenceItem( this, item, 0, name );
break;
case TQVariant::UInt:
- item = new PropertyIntItem( this, item, 0, name, FALSE );
+ item = new PropertyIntItem( this, item, 0, name, false );
break;
case TQVariant::StringList:
- item = new PropertyListItem( this, item, 0, name, TRUE );
+ item = new PropertyListItem( this, item, 0, name, true );
break;
case TQVariant::Rect:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
@@ -3417,7 +3417,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
break;
case TQVariant::Color:
- item = new PropertyColorItem( this, item, 0, name, TRUE );
+ item = new PropertyColorItem( this, item, 0, name, true );
break;
case TQVariant::Pixmap:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap );
@@ -3447,9 +3447,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyDateTimeItem( this, item, 0, name );
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r )
@@ -3489,7 +3489,7 @@ void PropertyList::valueChanged( PropertyItem *i )
i->value(), i->currentItem(), i->currentItemFromObject() );
cmd->execute();
- editor->formWindow()->commandHistory()->addCommand( cmd, TRUE );
+ editor->formWindow()->commandHistory()->addCommand( cmd, true );
}
void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
@@ -3503,7 +3503,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
i->value(), i->currentItem(), i->currentItemFromObject() );
cmd->execute();
if ( i->value().toString() != "-1" )
- changed = TRUE;
+ changed = true;
i->setChanged( changed );
}
@@ -3534,7 +3534,7 @@ void PropertyList::toggleOpen( TQListViewItem *i )
bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e )
- return TRUE;
+ return true;
PropertyItem *i = (PropertyItem*)currentItem();
if ( e->type() == TQEvent::KeyPress )
@@ -3548,22 +3548,22 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
- return TRUE;
+ return true;
} else if ( ( !::tqt_cast<TQLineEdit*>(o) ||
( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
ke->key() == Key_Right ))
- i->setOpen( TRUE );
+ i->setOpen( true );
else if ( i->isOpen() &&
( ke->key() == Key_Minus ||
ke->key() == Key_Left ) )
- i->setOpen( FALSE );
+ i->setOpen( false );
} else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 );
- return TRUE;
+ return true;
}
} else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQ_SLOT( checkCompressedCommand() ) );
@@ -3577,7 +3577,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
pressPos = me->pos();
- mousePressed = TRUE;
+ mousePressed = true;
}
break;
case TQEvent::MouseMove:
@@ -3597,7 +3597,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
@@ -3606,7 +3606,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
TQImage img = pix.convertToImage();
TQImageDrag *drg = new TQImageDrag( img, this );
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
}
@@ -3621,15 +3621,15 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( e->type() == TQEvent::ContextMenu ) {
((TQContextMenuEvent *)e)->accept();
TQPopupMenu menu( 0 );
- menu.setCheckable( TRUE );
+ menu.setCheckable( true );
const int cat_id = 1;
const int alpha_id = 2;
menu.insertItem( i18n( "Sort &Categorized" ), cat_id );
int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id );
if ( showSorted )
- menu.setItemChecked( alpha_id, TRUE );
+ menu.setItemChecked( alpha_id, true );
else
- menu.setItemChecked( cat_id, TRUE );
+ menu.setItemChecked( cat_id, true );
int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() );
if ( res != -1 ) {
bool newShowSorted = ( res == alpha );
@@ -3639,7 +3639,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
editor->setup();
}
}
- return TRUE;
+ return true;
}
}
@@ -3661,12 +3661,12 @@ void PropertyList::refetchData()
bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() );
if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) {
if ( i->value().toString() != "-1" )
- i->setChanged( TRUE, FALSE );
+ i->setChanged( true, false );
else
- i->setChanged( FALSE, FALSE );
+ i->setChanged( false, false );
}
else if ( changed != i->isChanged() )
- i->setChanged( changed, FALSE );
+ i->setChanged( changed, false );
}
updateEditorSize();
}
@@ -3689,12 +3689,12 @@ void PropertyList::setPropertyValue( PropertyItem *i )
{
const TQMetaProperty *p =
editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE );
+ property( editor->widget()->metaObject()->findProperty( i->name(), true), true );
if ( !p ) {
if ( i->name() == "hAlign" ) {
int align = editor->widget()->property( "alignment" ).toInt();
p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
align &= ~AlignVertical_Mask;
TQStrList l = p->valueToKeys( align );
clearAlignList( l );
@@ -3702,7 +3702,7 @@ void PropertyList::setPropertyValue( PropertyItem *i )
} else if ( i->name() == "vAlign" ) {
int align = editor->widget()->property( "alignment" ).toInt();
p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
align &= ~AlignHorizontal_Mask;
( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() );
} else if ( i->name() == "wordwrap" ) {
@@ -3771,9 +3771,9 @@ void PropertyList::resetProperty()
i->name(), i->value(),
WidgetFactory::defaultValue( editor->widget(), i->name() ),
WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ),
- i->currentItem(), TRUE );
+ i->currentItem(), true );
cmd->execute();
- editor->formWindow()->commandHistory()->addCommand( cmd, FALSE );
+ editor->formWindow()->commandHistory()->addCommand( cmd, false );
if ( i->hasSubItems() )
i->initChildren();
}
@@ -3913,11 +3913,11 @@ PropertyList::LastEventType PropertyList::lastEvent()
// ------------------------------------------------------------
EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
- : HierarchyList( parent, fw, TRUE ), editor( e )
+ : HierarchyList( parent, fw, true ), editor( e )
{
header()->hide();
removeColumn( 1 );
- setRootIsDecorated( TRUE );
+ setRootIsDecorated( true );
connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
this, TQ_SLOT( renamed( TQListViewItem * ) ) );
}
@@ -3964,7 +3964,7 @@ void EventList::setup()
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0,
it.current(), TQString(), TQString() );
- eventItem->setOpen( TRUE );
+ eventItem->setOpen( true );
TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0;
@@ -4062,15 +4062,15 @@ void EventList::renamed( TQListViewItem *i )
if ( !i->parent() )
return;
TQListViewItem *itm = i->parent()->firstChild();
- bool del = FALSE;
+ bool del = false;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
- del = TRUE;
+ del = true;
break;
}
itm = itm->nextSibling();
}
- i->setRenameEnabled( 0, FALSE );
+ i->setRenameEnabled( 0, false );
if ( del ) {
delete i;
} else {
@@ -4106,11 +4106,11 @@ void EventList::renamed( TQListViewItem *i )
/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public",
"slot", formWindow->project()->language(), "void" );
editor->formWindow()->mainWindow()->
- editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/
+ editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), true );*/
cmd->execute();
cmd2->execute();
editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
- editor->formWindow()->formFile()->setModified( TRUE );
+ editor->formWindow()->formFile()->setModified( true );
}
}
@@ -4160,13 +4160,13 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
if ( w && w == wid ) {
// if there is no properties displayed then we really should show them.
// to do this check the number of properties in the list.
- bool ret = (listview->childCount() > 0) ? TRUE : FALSE;
+ bool ret = listview->childCount() > 0;
if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
TQListViewItemIterator it( listview );
- ret = FALSE;
+ ret = false;
while ( it.current() ) {
if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
- ret = TRUE;
+ ret = true;
break;
}
++it;
@@ -4187,11 +4187,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
wid = w;
formwindow = fw;
setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) );
- listview->viewport()->setUpdatesEnabled( FALSE );
- listview->setUpdatesEnabled( FALSE );
+ listview->viewport()->setUpdatesEnabled( false );
+ listview->setUpdatesEnabled( false );
clear();
- listview->viewport()->setUpdatesEnabled( TRUE );
- listview->setUpdatesEnabled( TRUE );
+ listview->viewport()->setUpdatesEnabled( true );
+ listview->setUpdatesEnabled( true );
setup();
}
@@ -4207,15 +4207,15 @@ void PropertyEditor::setup()
{
if ( !formwindow || !wid )
return;
- listview->viewport()->setUpdatesEnabled( FALSE );
+ listview->viewport()->setUpdatesEnabled( false );
listview->setupProperties();
- listview->viewport()->setUpdatesEnabled( TRUE );
+ listview->viewport()->setUpdatesEnabled( true );
listview->updateEditorSize();
if ( !wid->isA( "PropertyObject" ) ) {
- eList->viewport()->setUpdatesEnabled( FALSE );
+ eList->viewport()->setUpdatesEnabled( false );
eList->setup();
- eList->viewport()->setUpdatesEnabled( TRUE );
+ eList->viewport()->setUpdatesEnabled( true );
}
}
@@ -4272,7 +4272,7 @@ TQString PropertyEditor::classOfCurrentProperty() const
TQString curr = currentProperty();
TQMetaObject *mo = o->metaObject();
while ( mo ) {
- TQStrList props = mo->propertyNames( FALSE );
+ TQStrList props = mo->propertyNames( false );
if ( props.find( curr.latin1() ) != -1 )
return mo->className();
mo = mo->superClass();
@@ -4320,9 +4320,9 @@ void PropertyEditor::updateWindow()
{
if ( isHidden() && count() ) {
parentWidget()->show();
- MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), true );
} else if ( isShown() && !count() ) {
parentWidget()->hide();
- MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), false );
}
}