summaryrefslogtreecommitdiffstats
path: root/tools/designer/plugins/glade/glade2ui.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-30 14:27:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-25 16:43:08 +0900
commit35ced32e331ee29fda1642616c803637952f5b22 (patch)
treeda44726777f814e19c7ef1e43854f6a1693dd6fb /tools/designer/plugins/glade/glade2ui.cpp
parent7dd4848d61e4c52091d6c644356c84c67536bde2 (diff)
downloadtqt-35ced32e331ee29fda1642616c803637952f5b22.tar.gz
tqt-35ced32e331ee29fda1642616c803637952f5b22.zip
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'tools/designer/plugins/glade/glade2ui.cpp')
-rw-r--r--tools/designer/plugins/glade/glade2ui.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp
index b1bbe9ca7..442776e8d 100644
--- a/tools/designer/plugins/glade/glade2ui.cpp
+++ b/tools/designer/plugins/glade/glade2ui.cpp
@@ -270,7 +270,7 @@ Glade2Ui::Glade2Ui()
TQString Glade2Ui::imageName( const TQString& fileName )
{
return *yyImages.insert( fileName, TQString("image%1").arg(yyImages.count()),
- FALSE );
+ false );
}
TQString Glade2Ui::opening( const TQString& tag, const AttributeMap& attr )
@@ -476,8 +476,8 @@ TQString Glade2Ui::gtk2qtClass( const TQString& gtkClass,
if ( gtkClass == TQString("GtkScrolledWindow") ) {
if ( childWidgets.count() == 1 ) {
TQString g;
- bool editable = FALSE;
- bool showTitles = TRUE;
+ bool editable = false;
+ bool showTitles = true;
TQDomNode n = childWidgets.first().firstChild();
while ( !n.isNull() ) {
@@ -909,7 +909,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors,
Emit the application name.
*/
emitOpeningWidget( TQString("TQLabel") );
- emitFontProperty( TQString("font"), 24, TRUE );
+ emitFontProperty( TQString("font"), 24, true );
emitProperty( TQString("text"), prog );
emitProperty( TQString("alignment"), TQString("AlignAuto|AlignCenter"),
TQString("set") );
@@ -919,7 +919,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors,
Emit the copyright notice.
*/
emitOpeningWidget( TQString("TQLabel") );
- emitFontProperty( TQString("font"), 12, TRUE );
+ emitFontProperty( TQString("font"), 12, true );
emitProperty( TQString("text"), copyright );
emitClosing( TQString("widget") );
@@ -930,14 +930,14 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors,
emitOpening( TQString("hbox") );
emitOpeningWidget( TQString("TQLabel") );
- emitFontProperty( TQString("font"), 12, TRUE );
+ emitFontProperty( TQString("font"), 12, true );
emitProperty( TQString("text"), TQString("Authors:") );
emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"),
TQString("set") );
emitClosing( TQString("widget") );
emitOpeningWidget( TQString("TQLabel") );
- emitFontProperty( TQString("font"), 12, FALSE );
+ emitFontProperty( TQString("font"), 12, false );
emitProperty( TQString("text"), authors );
emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"),
TQString("set") );
@@ -952,7 +952,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors,
Emit the comments.
*/
emitOpeningWidget( TQString("TQLabel") );
- emitFontProperty( TQString("font"), 10, FALSE );
+ emitFontProperty( TQString("font"), 10, false );
emitProperty( TQString("text"), comments );
emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"),
TQString("set") );
@@ -1004,7 +1004,7 @@ void Glade2Ui::emitGnomeAppChildWidgetsPass1(
}
if ( childName == TQString("GnomeDock:contents") ) {
- emitWidget( *c, FALSE );
+ emitWidget( *c, false );
} else {
emitGnomeAppChildWidgetsPass1( grandchildWidgets );
}
@@ -1188,7 +1188,7 @@ void Glade2Ui::emitGtkNotebookChildWidgets(
tabNames.remove( tabNames.begin() );
emitAttribute( TQString("title"), accelerate(tabLabels.first()) );
tabLabels.remove( tabLabels.begin() );
- emitWidget( *c, FALSE );
+ emitWidget( *c, false );
emitClosing( TQString("widget") );
}
++c;
@@ -1359,7 +1359,7 @@ void Glade2Ui::emitGtkWindowChildWidgets(
const TQValueList<TQDomElement>& childWidgets, const TQString& qtClass )
{
if ( childWidgets.count() == 1 && qtClass == TQString("TQWizard") ) {
- emitFontProperty( TQString("titleFont"), 18, FALSE );
+ emitFontProperty( TQString("titleFont"), 18, false );
TQDomNode n = childWidgets.first().firstChild();
while ( !n.isNull() ) {
@@ -1368,7 +1368,7 @@ void Glade2Ui::emitGtkWindowChildWidgets(
n = n.nextSibling();
}
} else {
- emitChildWidgets( childWidgets, FALSE );
+ emitChildWidgets( childWidgets, false );
}
}
@@ -1388,7 +1388,7 @@ bool Glade2Ui::packEnd( const TQDomElement& widget )
}
n = n.nextSibling();
}
- return FALSE;
+ return false;
}
void Glade2Ui::emitChildWidgets( const TQValueList<TQDomElement>& childWidgets,
@@ -1436,9 +1436,9 @@ void Glade2Ui::emitOpeningWidget( const TQString& qtClass, int leftAttach,
}
/*
- Returns TRUE if the vbox containing childWidgets should have a
+ Returns true if the vbox containing childWidgets should have a
spacer at the end to prevent it from looking bad, otherwise returns
- FALSE.
+ false.
The algorithm is very experimental.
*/
@@ -1466,10 +1466,10 @@ bool Glade2Ui::shouldPullup( const TQValueList<TQDomElement>& childWidgets )
if ( !gtkSmallWidget.exactMatch(gtkClass) ||
!shouldPullup(grandchildWidgets) )
- return FALSE;
+ return false;
++c;
}
- return TRUE;
+ return true;
}
TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
@@ -1492,13 +1492,13 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
int numRows = 0;
int numColumns = 0;
- bool active = FALSE;
+ bool active = false;
TQString authors;
TQString childName;
TQString comments;
TQString copyright;
TQString creationFunction;
- bool editable = TRUE;
+ bool editable = true;
TQString filename;
TQString focusTarget;
TQString hscrollbarPolicy;
@@ -1513,21 +1513,21 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
int pageSize = 10;
TQString selectionMode;
TQString shadowType( "GTK_SHADOW_NONE" );
- bool showText = TRUE;
- bool showTitles = TRUE;
+ bool showText = true;
+ bool showTitles = true;
int step = 1;
TQString tabPos;
TQString text;
int textMaxLength = 0;
- bool textVisible = TRUE;
+ bool textVisible = true;
TQString tooltip;
TQString type;
int upper = 123456789;
int value = 123456789;
- bool valueInList = TRUE;
+ bool valueInList = true;
TQString vscrollbarPolicy;
TQString watermarkImage;
- bool wrap = FALSE;
+ bool wrap = false;
bool topLevel = yyFormName.isEmpty();
if ( topLevel )
@@ -1758,7 +1758,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
if ( gtkClass == TQString("GtkHButtonBox") ||
childName == TQString("Dialog:action_area") )
emitSpacer( orientation );
- emitChildWidgets( childWidgets, TRUE );
+ emitChildWidgets( childWidgets, true );
if ( gtkClass == TQString("GtkVButtonBox") ||
childName == TQString("Dialog:action_area") ||
@@ -1773,7 +1773,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
if ( layouted )
emitClosing( TQString("widget") );
} else if ( gtkClass == TQString("GtkFixed") && !layouted ) {
- emitChildWidgets( childWidgets, FALSE );
+ emitChildWidgets( childWidgets, false );
/*
Placeholders in a grid are typically needless.
*/
@@ -1781,7 +1781,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
bool needFakeLayout = ( !layouted && !topLevel && x == 0 && y == 0 &&
width == 0 && height == 0 );
TQString qtClass = gtk2qtClass( gtkClass, childWidgets );
- bool unknown = FALSE;
+ bool unknown = false;
if ( qtClass == TQString("TQFrame") && !label.isEmpty() ) {
qtClass = TQString( "TQButtonGroup" );
@@ -1793,7 +1793,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
yyCustomWidgets.insert( qtClass, TQString::null );
} else if ( qtClass == TQString("Unknown") ) {
qtClass = TQString( "TQLabel" );
- unknown = TRUE;
+ unknown = true;
}
if ( qtClass.isEmpty() ) {
@@ -1940,7 +1940,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
emitGnomeAppChildWidgetsPass1( childWidgets );
} else if ( gtkClass == TQString("GnomePropertyBox") ) {
emitOpening( TQString("vbox") );
- emitChildWidgets( childWidgets, TRUE );
+ emitChildWidgets( childWidgets, true );
emitOpeningWidget( TQString("TQLayoutWidget") );
emitOpening( TQString("hbox") );
emitPushButton( TQString("&Help"), TQString("helpButton") );
@@ -1975,7 +1975,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted,
TQString("AlignAuto|AlignCenter"),
TQString("set") );
} else if ( qtClass != TQString("TQListBox") ) {
- emitChildWidgets( childWidgets, FALSE );
+ emitChildWidgets( childWidgets, false );
}
emitClosing( TQString("widget") );
@@ -2024,7 +2024,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
TQProgressDialog fremskritt( TQString("Converting Glade files..."),
TQString("Abort Conversion"), numWidgets, 0,
- "fremskritt", TRUE );
+ "fremskritt", true );
n = root.firstChild();
while ( !n.isNull() ) {
@@ -2058,7 +2058,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
uniqueToolBar = 1;
emitHeader();
- TQString name = emitWidget( n.toElement(), FALSE );
+ TQString name = emitWidget( n.toElement(), false );
if ( !yyCustomWidgets.isEmpty() ) {
emitOpening( TQString("customwidgets") );