diff options
Diffstat (limited to 'tools/designer/plugins/rc/rc2ui.cpp')
-rw-r--r-- | tools/designer/plugins/rc/rc2ui.cpp | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/tools/designer/plugins/rc/rc2ui.cpp b/tools/designer/plugins/rc/rc2ui.cpp index df37abdd9..5755fab21 100644 --- a/tools/designer/plugins/rc/rc2ui.cpp +++ b/tools/designer/plugins/rc/rc2ui.cpp @@ -160,26 +160,26 @@ void RC2UI::writeSet( const TQString& name, const TQString& value ) void RC2UI::writeStyles( const TQStringList styles, bool isFrame ) { if ( isFrame ) { - bool defineFrame = FALSE; + bool defineFrame = false; TQString shadow = "NoFrame"; TQString shape = "StyledPanel"; int width = 2; if ( styles.contains( "WS_EX_STATICEDGE" ) ) { shadow = "Plain"; width = 1; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_CLIENTEDGE" ) ) { shadow = "Sunken"; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_DLGMODALFRAME" ) ) { shadow = "Raised"; - defineFrame = TRUE; + defineFrame = true; } if ( !styles.contains( "WS_BORDER" ) ) { shape = "NoFrame"; - defineFrame = TRUE; + defineFrame = true; } if ( defineFrame ) { @@ -190,11 +190,11 @@ void RC2UI::writeStyles( const TQStringList styles, bool isFrame ) } if ( styles.contains("WS_DISABLED") ) - writeBool("enabled", FALSE ); + writeBool("enabled", false ); if ( styles.contains("WS_EX_ACCEPTFILES") ) - writeBool("acceptDrops", TRUE ); + writeBool("acceptDrops", true ); if ( styles.contains("WS_EX_TRANSPARENT") ) - writeBool("autoMask", TRUE ); + writeBool("autoMask", true ); if ( !styles.contains("WS_TABSTOP") ) writeEnum("focusPolicy", "NoFocus"); } @@ -207,7 +207,7 @@ RC2UI::RC2UI( TQTextStream* input ) : blockStart1( "/////////////////////////////////////////////////////////////////////////////" ), blockStart2( "//" ) { - writeToFile = TRUE; + writeToFile = true; in = input; indentation = 0; out = 0; @@ -231,11 +231,11 @@ bool RC2UI::parse() while ( line != blockStart1 && !in->eof() ) line = in->readLine(); if ( in->eof() ) - return FALSE; + return false; while ( line != blockStart2 && !in->eof() ) line = in->readLine(); if ( in->eof() ) - return FALSE; + return false; line = in->readLine(); @@ -244,37 +244,37 @@ bool RC2UI::parse() if ( in->readLine() == "//" && in->readLine().isEmpty() && !in->eof() ) { if ( type == "Dialog" ) { if ( !makeDialog() ) - return FALSE; + return false; } /* else if ( type == "Bitmap" ) { if ( !makeBitmap() ) - return FALSE; + return false; } else if ( type == "String Table" ) { if ( !makeStringTable() ) - return FALSE; + return false; } else if ( type == "Accelerator" ) { if ( !makeAccelerator() ) - return FALSE; + return false; } else if ( type == "Cursor" ) { if ( !makeCursor() ) - return FALSE; + return false; } else if ( type == "HTML" ) { if ( !makeHTML() ) - return FALSE; + return false; } else if ( type == "Icon" ) { if ( !makeIcon() ) - return FALSE; + return false; } else if ( type == "Version" ) { if ( !makeVersion() ) - return FALSE; + return false; } */ } } else - return FALSE; + return false; } - return TRUE; + return true; } /*! @@ -283,7 +283,7 @@ bool RC2UI::parse() bool RC2UI::parse( TQStringList& get ) { - writeToFile = FALSE; + writeToFile = false; bool result = parse(); get = target; return result; @@ -322,7 +322,7 @@ bool RC2UI::makeDialog() TQCString className; uint x, y, w, h; uint endDesc; - bool space = FALSE; + bool space = false; for ( endDesc = 0; endDesc < line.length() ; endDesc++ ) { char c = (TQChar)line.at(endDesc); if ( space && (c >= '0') && (c <= '9') ) @@ -338,7 +338,7 @@ bool RC2UI::makeDialog() count = sscanf( line, "%u, %u, %u, %u", &x, &y, &w, &h ); if ( !count && count == EOF ) - return FALSE; + return false; char property[256]; TQStringList styles; @@ -354,7 +354,7 @@ bool RC2UI::makeDialog() line = ""; do { if ( in->eof() ) - return TRUE; + return true; line += in->readLine(); } while ( line[(int)line.length()-1] == '|' || line[(int)line.length()-1] == ',' ); @@ -398,7 +398,7 @@ bool RC2UI::makeDialog() do { if ( in->eof() ) - return TRUE; + return true; line = in->readLine().stripWhiteSpace(); if ( line == "END" ) @@ -416,30 +416,30 @@ bool RC2UI::makeDialog() TQString controlType; TQString widgetID; TQString widgetText; - bool hasText = FALSE; - bool isControl = FALSE; - bool isFrame = FALSE; + bool hasText = false; + bool isControl = false; + bool isFrame = false; if ( widgetType == "PUSHBUTTON" ) { ID = IDPushButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "DEFPUSHBUTTON" ) { ID = IDPushButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "LTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "CTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "RTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "EDITTEXT" ) { ID = IDLineEdit; } else if ( widgetType == "GROUPBOX" ) { ID = IDGroupBox; - hasText = TRUE; + hasText = true; } else if ( widgetType == "COMBOBOX" ) { ID = IDComboBox; } else if ( widgetType == "LISTBOX" ) { @@ -448,12 +448,12 @@ bool RC2UI::makeDialog() ID = IDScrollBar; } else if ( widgetType == "CHECKBOX" ) { ID = IDCheckBox; - hasText = TRUE; + hasText = true; } else if ( widgetType == "RADIOBUTTON" ) { ID = IDRadioButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "CONTROL" ) { - isControl = TRUE; + isControl = true; widgetText = stripQM(parseNext( arguments )); widgetID = parseNext( arguments ); controlType = stripQM(parseNext( arguments )); @@ -526,12 +526,12 @@ bool RC2UI::makeDialog() writeRect( "geometry", x, y, w, h ); writeString( "text", widgetText ); if ( widgetType == "DEFPUSHBUTTON" ) - writeBool( "default", TRUE ); + writeBool( "default", true ); } break; case IDLabel: { - isFrame = TRUE, + isFrame = true, writeClass("TQLabel"); writeCString( "name", useName("Label_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -558,7 +558,7 @@ bool RC2UI::makeDialog() writeRect("geometry", x,y,w,h); writeString("text", widgetText ); if ( styles.contains( "BS_3STATE" ) ) - writeBool( "tristate", TRUE ); + writeBool( "tristate", true ); } break; case IDRadioButton: @@ -571,7 +571,7 @@ bool RC2UI::makeDialog() break; case IDGroupBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQGroupBox"); writeCString( "name", useName("GroupBox_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -609,31 +609,31 @@ bool RC2UI::makeDialog() break; case IDIconView: { - isFrame = TRUE; + isFrame = true; writeClass("TQIconView"); writeCString("name", useName("IconView_"+widgetID) ); writeRect("geometry", x,y,w,h ); if ( !styles.contains( "LVS_SINGLESEL" ) ) writeEnum( "selectionMode", "Extended" ); if ( styles.contains( "LVS_NOLABELWRAP" ) ) - writeBool("wordWrapIconText", FALSE ); + writeBool("wordWrapIconText", false ); } break; case IDListView: { - isFrame = TRUE; + isFrame = true; writeClass("TQListView"); writeCString("name", useName("ListView_"+widgetID) ); writeRect("geometry", x,y,w,h ); if ( styles.contains( "TVS_LINESATROOT" ) ) - writeBool( "rootIsDecorated", TRUE ); + writeBool( "rootIsDecorated", true ); if ( styles.contains( "TVS_FULLROWSELECT" ) ) - writeBool( "allColumnsShowFocus", TRUE ); + writeBool( "allColumnsShowFocus", true ); } break; case IDProgressBar: { - isFrame = TRUE; + isFrame = true; writeClass("TQProgressBar"); writeCString("name", useName("ProgressBar_"+widgetID) ); writeRect("geometry", x,y,w,h ); @@ -659,7 +659,7 @@ bool RC2UI::makeDialog() break; case IDSpinBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQSpinBox"); writeCString("name", useName("SpinBox_"+widgetID) ); writeRect("geometry", x,y,w,h); @@ -690,7 +690,7 @@ bool RC2UI::makeDialog() break; case IDListBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQListBox"); writeCString("name", useName("ListBox_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -769,7 +769,7 @@ bool RC2UI::makeDialog() } while ( line != blockStart1 ); - return TRUE; + return true; } /*! Not yet implemented @@ -777,7 +777,7 @@ bool RC2UI::makeDialog() bool RC2UI::makeBitmap() { - return TRUE; + return true; } /*! Not yet implemented @@ -785,7 +785,7 @@ bool RC2UI::makeBitmap() bool RC2UI::makeAccelerator() { - return TRUE; + return true; } /*! Not yet implemented @@ -793,7 +793,7 @@ bool RC2UI::makeAccelerator() bool RC2UI::makeCursor() { - return TRUE; + return true; } /*! Not yet implemented @@ -801,7 +801,7 @@ bool RC2UI::makeCursor() bool RC2UI::makeHTML() { - return TRUE; + return true; } /*! Not yet implemented @@ -809,7 +809,7 @@ bool RC2UI::makeHTML() bool RC2UI::makeIcon() { - return TRUE; + return true; } /*! @@ -820,7 +820,7 @@ bool RC2UI::makeIcon() bool RC2UI::makeStringTable() { if ( !writeToFile ) - return TRUE; + return true; TQFile fileOut; line = in->readLine(); @@ -829,7 +829,7 @@ bool RC2UI::makeStringTable() char discard[12]; sscanf( line, "%s %s", stringtable, discard ); if ( TQString(stringtable) != "STRINGTABLE" ) - return TRUE; + return true; do { line = in->readLine(); } while ( line != "BEGIN" ); @@ -876,7 +876,7 @@ bool RC2UI::makeStringTable() } } while ( line != blockStart1 ); - return TRUE; + return true; } /*! Not yet implemented @@ -884,5 +884,5 @@ bool RC2UI::makeStringTable() bool RC2UI::makeVersion() { - return TRUE; + return true; } |