summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp')
-rw-r--r--tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp b/tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp
index a9e87b0..7f7d3f3 100644
--- a/tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp
+++ b/tqtinterface/qt4/tools/designer/plugins/rc/rc2ui.cpp
@@ -63,8 +63,8 @@ TQStringList RC2UI::splitStyles( const TQString& styles, char sep )
TQString s = styles;
TQString style;
TQStringList l;
- while ( s.tqfind( sep ) > -1 ) {
- style = s.left( s.tqfind( sep ) );
+ while ( s.find( sep ) > -1 ) {
+ style = s.left( s.find( sep ) );
l << style.stripWhiteSpace();
s = s.right( s.length() - style.length() -1 );
}
@@ -75,7 +75,7 @@ TQStringList RC2UI::splitStyles( const TQString& styles, char sep )
TQString RC2UI::parseNext( TQString& arg, char sep )
{
- TQString next = arg.left( arg.tqfind(sep) );
+ TQString next = arg.left( arg.find(sep) );
arg = arg.right( arg.length() - next.length() - 1 );
return next;
}
@@ -164,20 +164,20 @@ void RC2UI::writeStyles( const TQStringList styles, bool isFrame )
TQString shadow = "NoFrame";
TQString tqshape = "StyledPanel";
int width = 2;
- if ( styles.tqcontains( "WS_EX_STATICEDGE" ) ) {
+ if ( styles.contains( "WS_EX_STATICEDGE" ) ) {
shadow = "Plain";
width = 1;
defineFrame = TRUE;
}
- if ( styles.tqcontains( "WS_EX_CLIENTEDGE" ) ) {
+ if ( styles.contains( "WS_EX_CLIENTEDGE" ) ) {
shadow = "Sunken";
defineFrame = TRUE;
}
- if ( styles.tqcontains( "WS_EX_DLGMODALFRAME" ) ) {
+ if ( styles.contains( "WS_EX_DLGMODALFRAME" ) ) {
shadow = "Raised";
defineFrame = TRUE;
}
- if ( !styles.tqcontains( "WS_BORDER" ) ) {
+ if ( !styles.contains( "WS_BORDER" ) ) {
tqshape = "NoFrame";
defineFrame = TRUE;
}
@@ -189,13 +189,13 @@ void RC2UI::writeStyles( const TQStringList styles, bool isFrame )
}
}
- if ( styles.tqcontains("WS_DISABLED") )
+ if ( styles.contains("WS_DISABLED") )
writeBool("enabled", FALSE );
- if ( styles.tqcontains("WS_EX_ACCEPTFILES") )
+ if ( styles.contains("WS_EX_ACCEPTFILES") )
writeBool("acceptDrops", TRUE );
- if ( styles.tqcontains("WS_EX_TRANSPARENT") )
+ if ( styles.contains("WS_EX_TRANSPARENT") )
writeBool("autoMask", TRUE );
- if ( !styles.tqcontains("WS_TABSTOP") )
+ if ( !styles.contains("WS_TABSTOP") )
writeEnum("focusPolicy", "NoFocus");
}
@@ -297,7 +297,7 @@ TQString RC2UI::useName( const TQString& start )
TQString name = start;
int id = 1;
- while ( usedNames.tqcontains( name ) ) {
+ while ( usedNames.contains( name ) ) {
name = start + TQString( "%1" ).arg( id );
id++;
}
@@ -359,19 +359,19 @@ bool RC2UI::makeDialog()
} while ( line[(int)line.length()-1] == '|' ||
line[(int)line.length()-1] == ',' );
count = sscanf( line, "%s", property );
- line = line.right( line.length() - line.tqfind(" ") -1 );
+ line = line.right( line.length() - line.find(" ") -1 );
if ( TQString(property) == "STYLE" ) {
styles = splitStyles(line);
- if ( styles.tqcontains( "WS_CAPTION" ) )
+ if ( styles.contains( "WS_CAPTION" ) )
baseClass = "TQDialog";
else
baseClass = "TQWidget";
} else if ( TQString(property) == "CAPTION" ) {
caption = stripQM( line );
} else if ( TQString(property) == "FONT" ) {
- TQString pt = line.left( line.tqfind(",") );
+ TQString pt = line.left( line.find(",") );
pointsize = pt.toInt();
- fontname = stripQM(line.right( line.length() - line.tqfind(",") - 2 ));
+ fontname = stripQM(line.right( line.length() - line.find(",") - 2 ));
}
} while ( line != "BEGIN" );
@@ -462,10 +462,10 @@ bool RC2UI::makeDialog()
if ( controlType == "Static" ) {
ID = IDLabel;
} else if ( controlType == "Button" ) {
- if ( styles.tqcontains("BS_AUTOCHECKBOX") ||
- styles.tqcontains("BS_3STATE") )
+ if ( styles.contains("BS_AUTOCHECKBOX") ||
+ styles.contains("BS_3STATE") )
ID = IDCheckBox;
- else if ( styles.tqcontains("BS_AUTORADIOBUTTON") )
+ else if ( styles.contains("BS_AUTORADIOBUTTON") )
ID = IDRadioButton;
} else if ( controlType == "msctls_updown32" ) {
ID = IDSpinBox;
@@ -514,7 +514,7 @@ bool RC2UI::makeDialog()
extendedStyles = splitStyles(parseNext( arguments ));
for ( uint i = 0; i < extendedStyles.count(); i++ )
styles << (*extendedStyles.at(i));
- } while ( arguments.tqfind(',') > -1 );
+ } while ( arguments.find(',') > -1 );
switch ( ID ) {
case IDWidget:
@@ -537,7 +537,7 @@ bool RC2UI::makeDialog()
writeRect( "geometry", x,y,w,h );
writeString( "text", widgetText );
TQString align;
- if ( !styles.tqcontains("SS_CENTERIMAGE") )
+ if ( !styles.contains("SS_CENTERIMAGE") )
align += "|AlignTop";
else
align += "|AlignVCenter";
@@ -557,7 +557,7 @@ bool RC2UI::makeDialog()
writeCString("name", useName("CheckBox_"+widgetID) );
writeRect("geometry", x,y,w,h);
writeString("text", widgetText );
- if ( styles.tqcontains( "BS_3STATE" ) )
+ if ( styles.contains( "BS_3STATE" ) )
writeBool( "tristate", TRUE );
}
break;
@@ -576,13 +576,13 @@ bool RC2UI::makeDialog()
writeCString( "name", useName("GroupBox_"+widgetID) );
writeRect( "geometry", x,y,w,h );
writeString( "title", widgetText );
- if ( !styles.tqcontains( "WS_BORDER" ) )
+ if ( !styles.contains( "WS_BORDER" ) )
styles.append( "WS_BORDER" );
}
break;
case IDLineEdit:
{
- if ( !styles.tqcontains("ES_MULTILINE") ) {
+ if ( !styles.contains("ES_MULTILINE") ) {
writeClass("TQLineEdit");
writeCString( "name", useName("LineEdit_"+widgetID) );
} else {
@@ -591,9 +591,9 @@ bool RC2UI::makeDialog()
}
writeRect( "geometry", x,y,w,h );
TQString align = "AlignTop";
- if ( styles.tqcontains("ES_CENTER") )
+ if ( styles.contains("ES_CENTER") )
align+="|AlignHCenter";
- else if ( styles.tqcontains("ES_RIGHT") )
+ else if ( styles.contains("ES_RIGHT") )
align+="|AlignRight";
else
align+="|AlignLeft";
@@ -613,9 +613,9 @@ bool RC2UI::makeDialog()
writeClass("TQIconView");
writeCString("name", useName("IconView_"+widgetID) );
writeRect("geometry", x,y,w,h );
- if ( !styles.tqcontains( "LVS_SINGLESEL" ) )
+ if ( !styles.contains( "LVS_SINGLESEL" ) )
writeEnum( "selectionMode", "Extended" );
- if ( styles.tqcontains( "LVS_NOLABELWRAP" ) )
+ if ( styles.contains( "LVS_NOLABELWRAP" ) )
writeBool("wordWrapIconText", FALSE );
}
break;
@@ -625,9 +625,9 @@ bool RC2UI::makeDialog()
writeClass("TQListView");
writeCString("name", useName("ListView_"+widgetID) );
writeRect("geometry", x,y,w,h );
- if ( styles.tqcontains( "TVS_LINESATROOT" ) )
+ if ( styles.contains( "TVS_LINESATROOT" ) )
writeBool( "rootIsDecorated", TRUE );
- if ( styles.tqcontains( "TVS_FULLROWSELECT" ) )
+ if ( styles.contains( "TVS_FULLROWSELECT" ) )
writeBool( "allColumnsShowFocus", TRUE );
}
break;
@@ -637,7 +637,7 @@ bool RC2UI::makeDialog()
writeClass("TQProgressBar");
writeCString("name", useName("ProgressBar_"+widgetID) );
writeRect("geometry", x,y,w,h );
- if ( styles.tqcontains("TBS_VERT") )
+ if ( styles.contains("TBS_VERT") )
writeEnum("orientation", "Vertical");
else
writeEnum("orientation", "Horizontal");
@@ -670,11 +670,11 @@ bool RC2UI::makeDialog()
writeClass("TQSlider");
writeCString("name", useName("Slider_"+widgetID) );
writeRect("geometry", x,y,w,h );
- if ( styles.tqcontains("TBS_VERT") )
+ if ( styles.contains("TBS_VERT") )
writeEnum("orientation", "Vertical");
else
writeEnum("orientation", "Horizontal");
- if ( !styles.tqcontains("TBS_NOTICKS") )
+ if ( !styles.contains("TBS_NOTICKS") )
writeEnum("tickmarks", "Left" );
}
break;
@@ -694,23 +694,23 @@ bool RC2UI::makeDialog()
writeClass("TQListBox");
writeCString("name", useName("ListBox_"+widgetID) );
writeRect( "geometry", x,y,w,h );
- if ( styles.tqcontains("WS_HSCROLL") )
+ if ( styles.contains("WS_HSCROLL") )
writeEnum("hScrollBarMode", "Auto");
else
writeEnum("hScrollBarMode", "AlwaysOff");
- if ( styles.tqcontains("WS_VSCROLL") )
+ if ( styles.contains("WS_VSCROLL") )
writeEnum("vScrollBarMode", "Auto");
else
writeEnum("vScrollBarMode", "AlwaysOff");
- if ( styles.tqcontains("LBS_EXTENDEDSEL") )
+ if ( styles.contains("LBS_EXTENDEDSEL") )
writeEnum("selectionMode", "Extended");
- else if ( styles.tqcontains("LBS_MULTIPLESEL") )
+ else if ( styles.contains("LBS_MULTIPLESEL") )
writeEnum("selectionMode", "Multi");
- else if ( styles.tqcontains("LBS_NOSEL") )
+ else if ( styles.contains("LBS_NOSEL") )
writeEnum("selectionMode", "NoSelection");
else
writeEnum("selectionMode", "Single");
- if ( !styles.tqcontains( "NO WS_BORDER" ) )
+ if ( !styles.contains( "NO WS_BORDER" ) )
styles.append( "WS_BORDER" );
}
break;
@@ -719,7 +719,7 @@ bool RC2UI::makeDialog()
writeClass("TQScrollBar");
writeCString("name", useName("ScrollBar_"+widgetID) );
writeRect("geometry", x,y,w,h );
- if ( styles.tqcontains("SBS_VERT") )
+ if ( styles.contains("SBS_VERT") )
writeEnum("orientation", "Vertical");
else
writeEnum("orientation", "Horizontal");