summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/uilib
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/uilib')
-rw-r--r--kdevdesigner/uilib/database.cpp8
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp92
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.h2
3 files changed, 51 insertions, 51 deletions
diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp
index 4e1c8d57..325451d5 100644
--- a/kdevdesigner/uilib/database.cpp
+++ b/kdevdesigner/uilib/database.cpp
@@ -82,13 +82,13 @@ bool TQDesignerDataBrowser::event( TQEvent* e )
#endif
if ( e->type() == TQEvent::Show ) {
if ( con ) {
- TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con );
- setSqlCursor( cursor, TRUE );
+ TQSqlCursor* cursor = new TQSqlCursor( tbl, true, con );
+ setSqlCursor( cursor, true );
setForm( frm );
refresh();
first();
}
- return TRUE;
+ return true;
}
#if defined(DESIGNER)
}
@@ -110,7 +110,7 @@ bool TQDesignerDataView::event( TQEvent* e )
if ( e->type() == TQEvent::Show ) {
setForm( frm );
readFields();
- return TRUE;
+ return true;
}
#if defined(DESIGNER)
}
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index 9d0d3656..da1c456f 100644
--- a/kdevdesigner/uilib/qwidgetfactory.cpp
+++ b/kdevdesigner/uilib/qwidgetfactory.cpp
@@ -115,8 +115,8 @@ static TQStringList *availableWidgetList = 0;
TQMap<TQWidget*, TQString> *qwf_forms = 0;
TQString *qwf_language = 0;
-bool qwf_execute_code = TRUE;
-bool qwf_stays_on_top = FALSE;
+bool qwf_execute_code = true;
+bool qwf_stays_on_top = false;
TQString qwf_currFileName = "";
TQObject *qwf_form_object = 0;
TQString *qwf_plugin_dir = 0;
@@ -158,7 +158,7 @@ static void setupWidgetListAndMap()
availableWidgetMap = new TQMap<TQString, bool>;
for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it )
- availableWidgetMap->insert( *it, TRUE );
+ availableWidgetMap->insert( *it, true );
}
static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data )
@@ -243,10 +243,10 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str )
TQWidgetFactory::TQWidgetFactory()
: d( new TQWidgetFactoryPrivate() ), dbControls( 0 ),
- usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 )
+ usePixmapCollection( false ), defMargin( 11 ), defSpacing( 6 )
{
- widgetFactories.setAutoDelete( TRUE );
- d->customWidgets.setAutoDelete( TRUE );
+ widgetFactories.setAutoDelete( true );
+ d->customWidgets.setAutoDelete( true );
}
/*! \fn TQWidgetFactory::~TQWidgetFactory()
@@ -282,9 +282,9 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
{
setupPluginDir();
TQFile f( uiFile );
- bool failed = FALSE;
+ bool failed = false;
if ( !f.open( IO_ReadOnly ) )
- failed = TRUE;
+ failed = true;
if ( failed && tqApp->type() == TQApplication::Tty ) {
// for TQSA: If we have no GUI, we have no form definition
// files, but just the code. So try if only the code exists.
@@ -379,10 +379,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
c = new TQSqlCursor( (*it)[ 1 ] );
} else {
db = TQSqlDatabase::database( conn );
- c = new TQSqlCursor( (*it)[ 1 ], TRUE, db );
+ c = new TQSqlCursor( (*it)[ 1 ], true, db );
}
if ( db ) {
- table->setSqlCursor( c, fieldMap.isEmpty(), TRUE );
+ table->setSqlCursor( c, fieldMap.isEmpty(), true );
table->refresh( TQDataTable::RefreshAll );
}
}
@@ -455,7 +455,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
} else if ( e.tagName() == "widget" ) {
widget = e;
} else if ( e.tagName() == "pixmapinproject" ) {
- usePixmapCollection = TRUE;
+ usePixmapCollection = true;
} else if ( e.tagName() == "layoutdefaults" ) {
defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt();
defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt();
@@ -658,7 +658,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
TQVariant value;
TQCString comment;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
- bool vertical = FALSE;
+ bool vertical = false;
int w = 0;
int h = 0;
TQ_UINT16 column = 0;
@@ -720,8 +720,8 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
TQString text;
TQPixmap pixmap;
TQString field;
- bool clickable = TRUE;
- bool resizable = TRUE;
+ bool clickable = true;
+ bool resizable = true;
TQCString name;
TQVariant value;
@@ -803,7 +803,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
switch ( objectTag ) {
case Object_Item:
if ( listView != 0 )
- d->lastItem->setOpen( TRUE );
+ d->lastItem->setOpen( true );
inputItem( strings, in, parent, item );
break;
case Object_TextProperty:
@@ -994,7 +994,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
metAttribute = 2;
break;
case Object_Column:
- inputColumnOrRow( strings, in, obj, FALSE );
+ inputColumnOrRow( strings, in, obj, false );
break;
case Object_Event:
unpackCString( strings, in, name );
@@ -1020,13 +1020,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
font.setPointSize( pointSize );
}
if ( fontFlags & Font_Bold )
- font.setBold( TRUE );
+ font.setBold( true );
if ( fontFlags & Font_Italic )
- font.setItalic( TRUE );
+ font.setItalic( true );
if ( fontFlags & Font_Underline )
- font.setUnderline( TRUE );
+ font.setUnderline( true );
if ( fontFlags & Font_StrikeOut )
- font.setStrikeOut( TRUE );
+ font.setStrikeOut( true );
if ( obj != 0 )
setProperty( obj, name, font );
@@ -1089,7 +1089,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
}
break;
case Object_Row:
- inputColumnOrRow( strings, in, obj, TRUE );
+ inputColumnOrRow( strings, in, obj, true );
break;
case Object_Spacer:
inputSpacer( strings, in, layout );
@@ -1291,7 +1291,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
unpackCString( strings, in, d->translationContext );
if ( introFlags & Intro_Pixmapinproject )
- usePixmapCollection = TRUE;
+ usePixmapCollection = true;
if ( defaultMargin != -32768 )
defMargin = defaultMargin;
if ( defaultSpacing != -32768 )
@@ -1447,7 +1447,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
} else if ( className == "TQTabWidget" ) {
return new TQTabWidget( parent, name );
} else if ( className == "TQComboBox" ) {
- return new TQComboBox( FALSE, parent, name );
+ return new TQComboBox( false, parent, name );
} else if ( className == "TQWidget" ) {
if ( !qwf_stays_on_top )
return new TQWidget( parent, name );
@@ -1455,7 +1455,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
} else if ( className == "TQDialog" ) {
if ( !qwf_stays_on_top )
return new TQDialog( parent, name );
- return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop );
+ return new TQDialog( parent, name, false, TQt::WStyle_StaysOnTop );
} else if ( className == "TQWizard" ) {
return new TQWizard( parent, name );
} else if ( className == "TQLCDNumber" ) {
@@ -1534,7 +1534,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
if ( iface ) {
TQWidget *w = iface->create( className, parent, name );
if ( w ) {
- d->customWidgets.replace( className.latin1(), new bool(TRUE) );
+ d->customWidgets.replace( className.latin1(), new bool(true) );
return w;
}
}
@@ -1586,12 +1586,12 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
if ( colspan < 1 )
colspan = 1;
- bool isTQLayoutWidget = FALSE;
+ bool isTQLayoutWidget = false;
if ( !className.isEmpty() ) {
if ( !layout && className == "TQLayoutWidget" ) {
className = "TQWidget";
- isTQLayoutWidget = TRUE;
+ isTQLayoutWidget = true;
}
if ( layout && className == "TQLayoutWidget" ) {
// hide layout widgets
@@ -1627,7 +1627,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
TQString parentClassName = parent ? parent->className() : 0;
- bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE;
+ bool isPlugin = parent ? d->customWidgets.find( parent->className() ) : false;
if ( isPlugin )
tqWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
@@ -1808,7 +1808,7 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) cons
void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
TQVariant value )
{
- int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE );
+ int offset = obj->metaObject()->findProperty( prop.ascii(), true );
if ( offset != -1 ) {
if ( prop == "geometry" && obj == toplevel ) {
@@ -1819,7 +1819,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
if ( value.type() == TQVariant::String ||
value.type() == TQVariant::CString ) {
const TQMetaProperty *metaProp =
- obj->metaObject()->property( offset, TRUE );
+ obj->metaObject()->property( offset, true );
if ( metaProp != 0 && metaProp->isEnumType() ) {
if ( metaProp->isSetType() ) {
TQStrList flagsCStr;
@@ -2073,7 +2073,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
} else {
if ( name == "this" )
name = toplevel->name();
- TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2089,7 +2089,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.receiver = toplevel;
} else {
- TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2111,7 +2111,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
}
TQObject *sender = 0, *receiver = 0;
- TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE );
+ TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
sender = toplevel;
} else {
@@ -2129,7 +2129,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
receiver = toplevel;
} else {
- l = toplevel->queryList( 0, conn.receiver->name(), FALSE );
+ l = toplevel->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
delete l;
n = n.nextSibling().toElement();
@@ -2144,12 +2144,12 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQString s2 = "1""%1";
s2 = s2.arg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( TRUE );
- TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
+ TQStrList signalList = sender->metaObject()->signalNames( true );
+ TQStrList slotList = receiver->metaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
if ( slotList.find( conn.slot ) == -1 && (receiver == toplevel) && connector ) {
- slotList = connector->metaObject()->slotNames( TRUE );
+ slotList = connector->metaObject()->slotNames( true );
receiver = connector;
}
@@ -2172,7 +2172,7 @@ void TQWidgetFactory::loadTabOrder( const TQDomElement &e )
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
TQString name = n.firstChild().toText().data();
- TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@@ -2261,7 +2261,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget )
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
TQString txt;
- bool clickable = TRUE, resizable = TRUE;
+ bool clickable = true, resizable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2310,7 +2310,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget )
void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
TQDomElement n = e;
- hasPixmap = FALSE;
+ hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2331,7 +2331,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
@@ -2348,7 +2348,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
} else if ( widget->inherits( "TQIconView" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
@@ -2382,7 +2382,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
}
}
} else if ( n.tagName() == "item" ) {
- item->setOpen( TRUE );
+ item->setOpen( true );
createItem( n, widget, item );
}
@@ -2403,7 +2403,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
- bool hasMenuText = FALSE;
+ bool hasMenuText = false;
if ( n.tagName() == "action" ) {
a = new TQAction( parent );
TQDomElement n2 = n.firstChild().toElement();
@@ -2412,7 +2412,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
if ( n2.tagName() == "property" ) {
TQString prop(n2.attribute("name"));
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
setProperty( a, prop, n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
@@ -2426,7 +2426,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
if ( n2.tagName() == "property" ) {
TQString prop(n2.attribute("name"));
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
setProperty( a, prop, n2.firstChild().toElement() );
} else if ( n2.tagName() == "action" ||
n2.tagName() == "actiongroup" ) {
diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h
index 8f2b1427..c7045cd3 100644
--- a/kdevdesigner/uilib/qwidgetfactory.h
+++ b/kdevdesigner/uilib/qwidgetfactory.h
@@ -67,7 +67,7 @@ private:
void loadConnections( const TQDomElement &e, TQObject *connector );
void loadTabOrder( const TQDomElement &e );
TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
- TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = FALSE );
+ TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = false );
LayoutType layoutType( TQLayout *l ) const;
void setProperty( TQObject* widget, const TQString &prop, TQVariant value );
void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );