diff options
Diffstat (limited to 'tools/designer/tquic/tquic.cpp')
| -rw-r--r-- | tools/designer/tquic/tquic.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tools/designer/tquic/tquic.cpp b/tools/designer/tquic/tquic.cpp index b39ba4a4b..246c3164a 100644 --- a/tools/designer/tquic/tquic.cpp +++ b/tools/designer/tquic/tquic.cpp @@ -44,7 +44,7 @@ #include <stdio.h> #include <stdlib.h> -bool TQUic::isMainWindow = FALSE; +bool TQUic::isMainWindow = false; TQString TQUic::getComment( const TQDomNode& n ) { @@ -59,7 +59,7 @@ TQString TQUic::getComment( const TQDomNode& n ) TQString TQUic::mkBool( bool b ) { - return b? "TRUE" : "FALSE"; + return b? "true" : "false"; } TQString TQUic::mkBool( const TQString& s ) @@ -104,13 +104,13 @@ TQString TQUic::trcall( const TQString& sourceText, const TQString& comment ) return "TQString::null"; TQString t = trmacro; - bool encode = FALSE; + bool encode = false; if ( t.isNull() ) { t = "tr"; for ( int i = 0; i < (int) sourceText.length(); i++ ) { if ( sourceText[i].unicode() >= 0x80 ) { t = "trUtf8"; - encode = TRUE; + encode = true; break; } } @@ -144,10 +144,10 @@ TQUic::TQUic( const TQString &fn, const char *outputFn, TQTextStream &outStream, outputFileName( outputFn ), trmacro( trm ), nofwd( omitForwardDecls ) { fileName = fn; - writeFunctImpl = TRUE; + writeFunctImpl = true; defMargin = BOXLAYOUT_DEFAULT_MARGIN; defSpacing = BOXLAYOUT_DEFAULT_SPACING; - externPixmaps = FALSE; + externPixmaps = false; indent = " "; // default indent item_used = cg_used = pal_used = 0; @@ -170,7 +170,7 @@ TQUic::TQUic( const TQString &fn, const char *outputFn, TQTextStream &outStream, if ( e.tagName() == "widget" ) { widget = e; } else if ( e.tagName() == "pixmapinproject" ) { - externPixmaps = TRUE; + externPixmaps = true; } else if ( e.tagName() == "layoutdefaults" ) { defSpacing = e.attribute( "spacing", defSpacing.toString() ); defMargin = e.attribute( "margin", defMargin.toString() ); @@ -256,7 +256,7 @@ TQString TQUic::getClassName( const TQDomElement& e ) return s; } -/*! Returns TRUE if database framework code is generated, else FALSE. +/*! Returns true if database framework code is generated, else false. */ bool TQUic::isFrameworkCodeGenerated( const TQDomElement& e ) @@ -264,8 +264,8 @@ bool TQUic::isFrameworkCodeGenerated( const TQDomElement& e ) TQDomElement n = getObjectProperty( e, "frameworkCode" ); if ( n.attribute("name") == "frameworkCode" && !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( true ) ).toBool() ) - return FALSE; - return TRUE; + return false; + return true; } /*! Extracts an object name from \a e. It's stored in the 'name' @@ -407,8 +407,8 @@ void TQUic::createActionImpl( const TQDomElement &n, const TQString &parent ) out << indent << objName << " = new TQActionGroup( " << parent << ", \"" << objName << "\" );" << endl; else continue; - bool subActionsDone = FALSE; - bool hasMenuText = FALSE; + bool subActionsDone = false; + bool hasMenuText = false; TQString actionText; for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) { if ( n2.tagName() == "property" ) { @@ -431,7 +431,7 @@ void TQUic::createActionImpl( const TQDomElement &n, const TQString &parent ) call += value + " );"; if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; else if (prop == "text") actionText = value; @@ -442,7 +442,7 @@ void TQUic::createActionImpl( const TQDomElement &n, const TQString &parent ) } } else if ( !subActionsDone && ( n2.tagName() == "actiongroup" || n2.tagName() == "action" ) ) { createActionImpl( n2, objName ); - subActionsDone = TRUE; + subActionsDone = true; } } // workaround for loading pre-3.3 files expecting bogus TQAction behavior @@ -647,7 +647,7 @@ TQString TQUic::createListViewItemImpl( const TQDomElement &e, const TQString &p s = indent + item + " = "; else s = indent + "TQListViewItem * " + item + " = "; - item_used = TRUE; + item_used = true; } if ( !parentItem.isEmpty() ) @@ -672,7 +672,7 @@ TQString TQUic::createListViewItemImpl( const TQDomElement &e, const TQString &p pixmaps << pix; } } else if ( n.tagName() == "item" ) { - s += indent + item + "->setOpen( TRUE );\n"; + s += indent + item + "->setOpen( true );\n"; s += createListViewItemImpl( n, parent, item ); } n = n.nextSibling().toElement(); @@ -700,7 +700,7 @@ TQString TQUic::createListViewColumnImpl( const TQDomElement &e, const TQString TQString txt; TQString com; TQString pix; - bool clickable = FALSE, resizable = FALSE; + bool clickable = false, resizable = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute("name"); @@ -730,9 +730,9 @@ TQString TQUic::createListViewColumnImpl( const TQDomElement &e, const TQString if ( !pix.isEmpty() ) s += indent + parent + "->header()->setLabel( " + parent + "->header()->count() - 1, " + pix + ", " + trcall( txt, com ) + " );\n"; if ( !clickable ) - s += indent + parent + "->header()->setClickEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setClickEnabled( false, " + parent + "->header()->count() - 1 );\n"; if ( !resizable ) - s += indent + parent + "->header()->setResizeEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setResizeEnabled( false, " + parent + "->header()->count() - 1 );\n"; return s; } @@ -993,7 +993,7 @@ TQColorGroup TQUic::loadColorGroup( const TQDomElement &e ) return cg; } -/*! Returns TRUE if the widget properties specify that it belongs to +/*! Returns true if the widget properties specify that it belongs to the database \a connection and \a table. */ @@ -1002,8 +1002,8 @@ bool TQUic::isWidgetInTable( const TQDomElement& e, const TQString& connection, TQString conn = getDatabaseInfo( e, "connection" ); TQString tab = getDatabaseInfo( e, "table" ); if ( conn == connection && tab == table ) - return TRUE; - return FALSE; + return true; + return false; } /*! @@ -1115,7 +1115,7 @@ TQString TQUic::createObjectInstance( const TQString& objClass, const TQString& { if (( objClass.mid( 1 ) == "ComboBox" ) || ( objClass.mid( 2 ) == "ComboBox" )) { - return objClass + "( FALSE, " + parent + ", \"" + objName + "\" )"; + return objClass + "( false, " + parent + ", \"" + objName + "\" )"; } return objClass + "( " + parent + ", \"" + objName + "\" )"; } |
