summaryrefslogtreecommitdiffstats
path: root/quanta/components/framewizard/visualframeeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/components/framewizard/visualframeeditor.cpp')
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp
index 3795a3ce..215bdf63 100644
--- a/quanta/components/framewizard/visualframeeditor.cpp
+++ b/quanta/components/framewizard/visualframeeditor.cpp
@@ -109,9 +109,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){
// then every asterisk must be assigned a percentage of 10% so the real percentage
// notation is cols="40%,50%,10%"
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
- if(!(*it).tqcontains("%") && !(*it).tqcontains("*")) leftPercentage -= ( (*it).toInt()*100 )/d;
- if((*it).tqcontains("%")) leftPercentage -= (*it).section("%",0,0).toInt();
- if((*it).tqcontains("*")) {
+ if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d;
+ if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt();
+ if((*it).contains("*")) {
int weight= (*it).section("*",0,0).toInt();
if( weight==0 ) weight=1;
weightAsteriskCounter += weight;
@@ -125,7 +125,7 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){
// a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione.
// In genere la differenza �dell' 1%
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
- if((*it).tqcontains("*")){
+ if((*it).contains("*")){
int weight= (*it).section("*",0,0).toInt();
if(weight==0) weight=1;
int newPercentage = weight*leftPercentageDistributedAmongAsterisks;
@@ -138,9 +138,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){
void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
TQString line = m_existingStructure.first();
- if(line.tqcontains("<frameset")) {
- if(line.tqcontains("rows")) {
- split(tqparent,(line.tqcontains(",")+1),HORIZONTAL);
+ if(line.contains("<frameset")) {
+ if(line.contains("rows")) {
+ split(tqparent,(line.contains(",")+1),HORIZONTAL);
TQRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
@@ -148,7 +148,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
TQRect dummy=m_internalTree->findNode(tqparent)->atts()->tqgeometry();
TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height());
- int dummyDimension=dummy.height()-cancelledPixels(line.tqcontains(",")+1);
+ int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1);
TQPtrList<treeNode> list=m_internalTree->findNode(tqparent)->tqchildrenList();
TQPtrListIterator<treeNode> it( list );
@@ -157,7 +157,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
++it;
TQRect newGeometry(dummy);
double newDimension;
- if(percentages.first().tqcontains("%"))
+ if(percentages.first().contains("%"))
newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0;
else newDimension=(double)percentages.first().toInt();
newGeometry.setHeight( proxInt(newDimension) );
@@ -166,15 +166,15 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
}
}
else
- if(line.tqcontains("cols")) {
- split(tqparent,(line.tqcontains(",")+1),VERTICAL);
+ if(line.contains("cols")) {
+ split(tqparent,(line.contains(",")+1),VERTICAL);
TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
TQRect dummy=m_internalTree->findNode(tqparent)->atts()->tqgeometry();
TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width());
- int dummyDimension=dummy.width()-cancelledPixels(line.tqcontains(",")+1);
+ int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1);
TQPtrList<treeNode> list=m_internalTree->findNode(tqparent)->tqchildrenList();
TQPtrListIterator<treeNode> it( list );
@@ -183,7 +183,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
++it;
TQRect newGeometry(dummy);
double newDimension;
- if(percentages.first().tqcontains("%"))
+ if(percentages.first().contains("%"))
newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0;
else newDimension=(double)percentages.first().toInt();
newGeometry.setWidth( proxInt(newDimension) );
@@ -201,7 +201,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
}
else {
TQMap<TQString,TQString> attributeMap;
- if( line.tqcontains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
+ if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
else attributeMap["noresize"] = TQString();
TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files
@@ -287,7 +287,7 @@ void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* tqparent){
if(n->hasChildren()) {
TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10));
TQSplitter *splitter = new TQSplitter(tqparent,splitterName.ascii());
- if(SIZES.tqcontains(splitterName)) splitter->setSizes( SIZES[splitterName] );
+ if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] );
switch( n->splitType() ){
case VERTICAL : splitter->setOrientation(Qt::Horizontal);break;
case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break;
@@ -421,9 +421,9 @@ TQString VisualFrameEditor::formatStructure(){
TQString s;
int tabNum = 0;
for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) {
- if((*it).tqcontains("<frameset")) tabNum++;
+ if((*it).contains("<frameset")) tabNum++;
else
- if((*it).tqcontains("</frameset>")) {
+ if((*it).contains("</frameset>")) {
tabNum--;
s.truncate(s.length()-1);
}
@@ -441,9 +441,9 @@ TQString VisualFrameEditor::framesetStructure() {
}
void VisualFrameEditor::setMarkupLanguage(const TQString& s){
- if( s.tqcontains("xhtml",false)!=0 ) m_markupLanguage = XHTML;
+ if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML;
else
- if( s.tqcontains("html",false)!=0 ) m_markupLanguage = HTML;
+ if( s.contains("html",false)!=0 ) m_markupLanguage = HTML;
}
#include "visualframeeditor.moc"