summaryrefslogtreecommitdiffstats
path: root/kommander/editor/resource.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor/resource.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/resource.cpp')
-rw-r--r--kommander/editor/resource.cpp1174
1 files changed, 587 insertions, 587 deletions
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index 99fab90a..b725b7bc 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -18,13 +18,13 @@
**
**********************************************************************/
-#include <qmenudata.h>
+#include <tqmenudata.h>
#include "resource.h"
#include "defs.h"
#include "metadatabase.h"
#include "formwindow.h"
#include "mainwindow.h"
-#include "qdom.h"
+#include "tqdom.h"
#include "widgetdatabase.h"
#include "widgetfactory.h"
#include "layout.h"
@@ -41,60 +41,60 @@
#endif
#include "formfile.h"
-#include <qfeatures.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qworkspace.h>
-#include <qtabwidget.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qtabbar.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqworkspace.h>
+#include <tqtabwidget.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqtabbar.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <zlib.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#include <klocale.h>
-static QString makeIndent( int indent )
+static TQString makeIndent( int indent )
{
- QString s;
+ TQString s;
s.fill( ' ', indent * 4 );
return s;
}
-static QString entitize( const QString &s, bool attribute = false )
+static TQString entitize( const TQString &s, bool attribute = false )
{
- QString s2 = s;
- s2 = s2.replace( QRegExp( "&" ), "&amp;" );
- s2 = s2.replace( QRegExp( ">" ), "&gt;" );
- s2 = s2.replace( QRegExp( "<" ), "&lt;" );
+ TQString s2 = s;
+ s2 = s2.replace( TQRegExp( "&" ), "&amp;" );
+ s2 = s2.replace( TQRegExp( ">" ), "&gt;" );
+ s2 = s2.replace( TQRegExp( "<" ), "&lt;" );
if ( attribute ) {
- s2 = s2.replace( QRegExp( "\"" ), "&quot;" );
- s2 = s2.replace( QRegExp( "'" ), "&apos;" );
+ s2 = s2.replace( TQRegExp( "\"" ), "&quot;" );
+ s2 = s2.replace( TQRegExp( "'" ), "&apos;" );
}
return s2;
}
-static QString mkBool( bool b )
+static TQString mkBool( bool b )
{
return b? "true" : "false";
}
@@ -151,7 +151,7 @@ void Resource::setWidget( FormWindow *w )
toplevel = w;
}
-QWidget *Resource::widget() const
+TQWidget *Resource::widget() const
{
return toplevel;
}
@@ -163,7 +163,7 @@ bool Resource::load( FormFile *ff )
currFileName = ff->absFileName();
mainContainerSet = false;
- QFile f( ff->absFileName() );
+ TQFile f( ff->absFileName() );
f.open( IO_ReadOnly );
bool b = load( ff, &f );
@@ -172,19 +172,19 @@ bool Resource::load( FormFile *ff )
return b;
}
-bool Resource::load( FormFile *ff, QIODevice* dev )
+bool Resource::load( FormFile *ff, TQIODevice* dev )
{
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
- QTextStream stream(dev);
- QString content = stream.read();
+ TQTextStream stream(dev);
+ TQString content = stream.read();
if (content.startsWith("#!"))
{
content = content.mid(content.find('\n'));
}
if ( !doc.setContent( content) ) {
- // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
return false;
}
@@ -205,63 +205,63 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
}
#endif
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
- QDomElement forwards = e;
+ TQDomElement forwards = e;
while ( forwards.tagName() != "forwards" && !forwards.isNull() )
forwards = forwards.nextSibling().toElement();
- QDomElement includes = e;
+ TQDomElement includes = e;
while ( includes.tagName() != "includes" && !includes.isNull() )
includes = includes.nextSibling().toElement();
- QDomElement variables = e;
+ TQDomElement variables = e;
while ( variables.tagName() != "variables" && !variables.isNull() )
variables = variables.nextSibling().toElement();
- QDomElement eltSignals = e;
+ TQDomElement eltSignals = e;
while ( eltSignals.tagName() != "signals" && !eltSignals.isNull() )
eltSignals = eltSignals.nextSibling().toElement();
- QDomElement eltSlots = e;
+ TQDomElement eltSlots = e;
while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() )
eltSlots = eltSlots.nextSibling().toElement();
- QDomElement connections = e;
+ TQDomElement connections = e;
while ( connections.tagName() != "connections" && !connections.isNull() )
connections = connections.nextSibling().toElement();
- QDomElement imageCollection = e;
+ TQDomElement imageCollection = e;
images.clear();
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.nextSibling().toElement();
- QDomElement customWidgets = e;
+ TQDomElement customWidgets = e;
while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
customWidgets = customWidgets.nextSibling().toElement();
- QDomElement tabOrder = e;
+ TQDomElement tabOrder = e;
while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() )
tabOrder = tabOrder.nextSibling().toElement();
- QDomElement actions = e;
+ TQDomElement actions = e;
while ( actions.tagName() != "actions" && !actions.isNull() )
actions = actions.nextSibling().toElement();
- QDomElement toolbars = e;
+ TQDomElement toolbars = e;
while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() )
toolbars = toolbars.nextSibling().toElement();
- QDomElement menubar = e;
+ TQDomElement menubar = e;
while ( menubar.tagName() != "menubar" && !menubar.isNull() )
menubar = menubar.nextSibling().toElement();
- QDomElement functions = e;
+ TQDomElement functions = e;
while ( functions.tagName() != "functions" && !functions.isNull() )
functions = functions.nextSibling().toElement();
- QDomElement widget;
+ TQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "widget" ) {
widget = e;
@@ -291,8 +291,8 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
} else if ( e.tagName() == "layoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", QString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", QString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
}
e = e.nextSibling().toElement();
@@ -305,7 +305,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
#if defined (QT_NON_COMMERCIAL)
bool previewMode = MainWindow::self->isPreviewing();
- QWidget *w = (QWidget*)createObject( widget, !previewMode ? (QWidget*)formwindow : MainWindow::self);
+ TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self);
if ( !w )
return false;
if ( previewMode )
@@ -316,13 +316,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
#endif
if ( !forwards.isNull() ) {
- for ( QDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "forward" )
metaForwards << n.firstChild().toText().data();
}
if ( !includes.isNull() ) {
- for ( QDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "include" ) {
if ( n.tagName() == "include" ) {
MetaDataBase::Include inc;
@@ -340,17 +340,17 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
}
if ( !variables.isNull() ) {
- for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "variable" )
metaVariables << n.firstChild().toText().data();
}
if ( !eltSignals.isNull() ) {
- for ( QDomElement n = eltSignals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = eltSignals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "signal" )
metaSignals << n.firstChild().toText().data();
}
if ( !eltSlots.isNull() ) {
- for ( QDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "slot" ) {
MetaDataBase::Slot slot;
slot.specifier = n.attribute( "specifier", "virtual" );
@@ -413,13 +413,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
return true;
}
-bool Resource::save( const QString& filename, bool formCodeOnly )
+bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
return false;
currFileName = filename;
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return false;
bool b = save( &f );
@@ -427,26 +427,26 @@ bool Resource::save( const QString& filename, bool formCodeOnly )
return b;
}
-bool Resource::save( QIODevice* dev )
+bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
return false;
- QTextStream ts( dev );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( dev );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
if ( formwindow->mainContainer()->property("useShebang").toBool() )
ts << formwindow->mainContainer()->property("shebang").toString() << endl;
ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
saveObject( formwindow->mainContainer(), 0, ts, 0 );
- if ( formwindow->mainContainer()->inherits( "QMainWindow" ) ) {
- saveMenuBar( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
- saveToolBars( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) {
+ saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
+ saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
- if ( formwindow->mainContainer()->inherits( "QMainWindow" ) )
+ if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
@@ -460,20 +460,20 @@ bool Resource::save( QIODevice* dev )
return true;
}
-QString Resource::copy()
+TQString Resource::copy()
{
if ( !formwindow )
- return QString::null;
+ return TQString::null;
copying = true;
- QString s;
- QTextOStream ts( &s );
+ TQString s;
+ TQTextOStream ts( &s );
ts << "<!DOCTYPE UI-SELECTION><UI-SELECTION>" << endl;
- QWidgetList widgets = formwindow->selectedWidgets();
- QWidgetList tmp( widgets );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
- QWidget *p = w->parentWidget();
+ TQWidgetList widgets = formwindow->selectedWidgets();
+ TQWidgetList tmp( widgets );
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
+ TQWidget *p = w->parentWidget();
bool save = true;
while ( p ) {
if ( tmp.findRef( p ) != -1 ) {
@@ -495,30 +495,30 @@ QString Resource::copy()
}
-void Resource::paste( const QString &cb, QWidget *parent )
+void Resource::paste( const TQString &cb, TQWidget *parent )
{
if ( !formwindow )
return;
mainContainerSet = true;
pasting = true;
- QBuffer buf( QCString( cb.utf8() ) );
+ TQBuffer buf( TQCString( cb.utf8() ) );
buf.open( IO_ReadOnly );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &buf, &errMsg, &errLine ) ) {
- // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
}
- QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
- QDomElement imageCollection = firstWidget;
+ TQDomElement imageCollection = firstWidget;
images.clear();
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.nextSibling().toElement();
- QDomElement customWidgets = firstWidget;
+ TQDomElement customWidgets = firstWidget;
while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
customWidgets = customWidgets.nextSibling().toElement();
@@ -527,13 +527,13 @@ void Resource::paste( const QString &cb, QWidget *parent )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
- QWidgetList widgets;
+ TQWidgetList widgets;
formwindow->clearSelection( false );
formwindow->setPropertyShowingBlocked( true );
formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
- QWidget *w = (QWidget*)createObject( firstWidget, parent, 0 );
+ TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
if ( !w )
continue;
widgets.append( w );
@@ -547,7 +547,7 @@ void Resource::paste( const QString &cb, QWidget *parent )
w->move( x, y );
formwindow->selectWidget( w );
} else if ( firstWidget.tagName() == "spacer" ) {
- QWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
if ( !w )
continue;
widgets.append( w );
@@ -571,26 +571,26 @@ void Resource::paste( const QString &cb, QWidget *parent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
- if ( obj && obj->isWidgetType() && ( (QWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
+ if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
return;
- QString closeTag;
+ TQString closeTag;
if ( obj->isWidgetType() ) {
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
- usedCustomWidgets << QString( className );
- if ( obj != formwindow && !formwindow->widgets()->find( (QWidget*)obj ) )
+ usedCustomWidgets << TQString( className );
+ if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
- QString attributes;
+ TQString attributes;
if ( grid ) {
- QDesignerGridLayout::Item item = grid->items[ (QWidget*)obj ];
- attributes += QString(" row=\"") + QString::number(item.row) + "\"";
- attributes += QString(" column=\"") + QString::number(item.column) + "\"";
+ QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
+ attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
- attributes += QString(" rowspan=\"") + QString::number(item.rowspan) + "\"";
- attributes += QString(" colspan=\"") + QString::number(item.colspan) + "\"";
+ attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\"";
+ attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\"";
}
}
@@ -615,16 +615,16 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
return;
}
- if ( obj->inherits( "QTabWidget" ) ) {
- QTabWidget* tw = (QTabWidget*) obj;
- QObjectList* tmpl = tw->queryList( "QWidgetStack" );
- QWidgetStack *ws = (QWidgetStack*)tmpl->first();
- QTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ if ( obj->inherits( "TQTabWidget" ) ) {
+ TQTabWidget* tw = (TQTabWidget*) obj;
+ TQObjectList* tmpl = tw->queryList( "TQWidgetStack" );
+ TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
+ TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
- QTab *t = tb->tabAt( i );
+ TQTab *t = tb->tabAt( i );
if ( !t )
continue;
- QWidget *w = ws->widget( t->identifier() );
+ TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
@@ -648,10 +648,10 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
}
delete tmpl;
} else
- if ( ::qt_cast<QToolBox*>(obj) ) {
- QToolBox* tb = (QToolBox*)obj;
+ if ( ::qt_cast<TQToolBox*>(obj) ) {
+ TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) {
- QWidget *w = tb->item( i );
+ TQWidget *w = tb->item( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
@@ -665,7 +665,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", QVariant::Invalid, ts, indent );
+ saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -678,9 +678,9 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</widget>" << endl;
}
}
- else if ( obj->inherits( "QWizard" ) ) {
- QWizard* wiz = (QWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
- QWidget *w = wiz->page( i );
+ else if ( obj->inherits( "TQWizard" ) ) {
+ TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
+ TQWidget *w = wiz->page( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
@@ -702,8 +702,8 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( obj->inherits( "QMainWindow" ) ) {
- saveChildrenOf( ( (QMainWindow*)obj )->centralWidget(), ts, indent );
+ } else if ( obj->inherits( "TQMainWindow" ) ) {
+ saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
}
@@ -712,56 +712,56 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << closeTag;
}
-void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
+void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{
- if ( obj->inherits( "QListBox" ) || obj->inherits( "QComboBox" ) ) {
- QListBox *lb = 0;
- if ( obj->inherits( "QListBox" ) )
- lb = (QListBox*)obj;
+ if ( obj->inherits( "TQListBox" ) || obj->inherits( "TQComboBox" ) ) {
+ TQListBox *lb = 0;
+ if ( obj->inherits( "TQListBox" ) )
+ lb = (TQListBox*)obj;
else
- lb = ( (QComboBox*)obj )->listBox();
+ lb = ( (TQComboBox*)obj )->listBox();
- QListBoxItem *i = lb->firstItem();
+ TQListBoxItem *i = lb->firstItem();
for ( ; i; i = i->next() ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( obj->inherits( "QIconView" ) ) {
- QIconView *iv = (QIconView*)obj;
+ } else if ( obj->inherits( "TQIconView" ) ) {
+ TQIconView *iv = (TQIconView*)obj;
- QIconViewItem *i = iv->firstItem();
+ TQIconViewItem *i = iv->firstItem();
for ( ; i; i = i->nextItem() ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( obj->inherits( "QListView" ) ) {
- QListView *lv = (QListView*)obj;
+ } else if ( obj->inherits( "TQListView" ) ) {
+ TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
ts << makeIndent( indent ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << lv->header()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( true );
if ( lv->header()->iconSet( i ) )
- pix.append( new QPixmap( lv->header()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
ts << makeIndent( indent ) << "<property name=\"clickable\">" << endl;
indent++;
@@ -779,11 +779,11 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
saveItem( lv->firstChild(), ts, indent - 1 );
}
#ifndef QT_NO_TABLE
- else if ( obj->inherits( "QTable" ) ) {
- QTable *table = (QTable*)obj;
+ else if ( obj->inherits( "TQTable" ) ) {
+ TQTable *table = (TQTable*)obj;
int i;
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
- bool isDataTable = table->inherits( "QDataTable" );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
+ bool isDataTable = table->inherits( "TQDataTable" );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
table->horizontalHeader()->label( i ).toInt() != i + 1 ||
@@ -791,14 +791,14 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
isDataTable ) {
ts << makeIndent( indent ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->horizontalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( true );
if ( table->horizontalHeader()->iconSet( i ) )
- pix.append( new QPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
- if ( table->inherits( "QDataTable" ) && !columnFields.isEmpty() ) {
+ if ( table->inherits( "TQDataTable" ) && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
@@ -815,12 +815,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
table->verticalHeader()->iconSet( i ) ) {
ts << makeIndent( indent ) << "<row>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->verticalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( true );
if ( table->verticalHeader()->iconSet( i ) )
- pix.append( new QPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
indent--;
ts << makeIndent( indent ) << "</row>" << endl;
@@ -830,15 +830,15 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
#endif
}
-void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent )
+void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent )
{
- QListView *lv = i->listView();
+ TQListView *lv = i->listView();
while ( i ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QPtrList<QPixmap> pixmaps;
- QStringList textes;
+ TQPtrList<TQPixmap> pixmaps;
+ TQStringList textes;
for ( int c = 0; c < lv->columns(); ++c ) {
pixmaps.append( i->pixmap( c ) );
textes << i->text( c );
@@ -854,7 +854,7 @@ void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent )
}
}
-void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname )
+void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname )
{
if ( p.isNull() ) {
ts << makeIndent( indent ) << "<" + tagname + "></" + tagname + ">" << endl;
@@ -873,39 +873,39 @@ void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const
<< "</" + tagname + ">" << endl;
}
-QPixmap Resource::loadPixmap( const QDomElement &e, const QString &/*tagname*/ )
+TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ )
{
- QString arg = e.firstChild().toText().data();
+ TQString arg = e.firstChild().toText().data();
if ( formwindow && formwindow->savePixmapInline() ) {
- QImage img = loadFromCollection( arg );
- QPixmap pix;
+ TQImage img = loadFromCollection( arg );
+ TQPixmap pix;
pix.convertFromImage( img );
MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
#ifndef KOMMANDER
else if ( formwindow && formwindow->savePixmapInProject() ) {
- QPixmap pix;
+ TQPixmap pix;
if ( mainwindow && mainwindow->currProject() )
pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg );
}
#endif
else
{
- QPixmap pix;
+ TQPixmap pix;
pix = PixmapChooser::loadPixmap( "image.xpm" );
MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix;
}
- QPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
+ TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
-void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixmaps, QTextStream &ts, int indent )
+void Resource::saveItem( const TQStringList &text, const TQPtrList<TQPixmap> &pixmaps, TQTextStream &ts, int indent )
{
- QStringList::ConstIterator it = text.begin();
+ TQStringList::ConstIterator it = text.begin();
for ( ; it != text.end(); ++it ) {
ts << makeIndent( indent ) << "<property name=\"text\">" << endl;
indent++;
@@ -915,33 +915,33 @@ void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixma
}
for ( int i = 0; i < (int)pixmaps.count(); ++i ) {
- QPixmap *p = ( (QPtrList<QPixmap>)pixmaps ).at( i );
+ TQPixmap *p = ( (TQPtrList<TQPixmap>)pixmaps ).at( i );
ts << makeIndent( indent ) << "<property name=\"pixmap\">" << endl;
indent++;
if ( p )
savePixmap( *p, ts, indent );
else
- savePixmap( QPixmap(), ts, indent );
+ savePixmap( TQPixmap(), ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
}
-void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
+void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
{
- const QObjectList *l = obj->children();
+ const TQObjectList *l = obj->children();
if ( !l )
return; // no children to save
- QString closeTag;
+ TQString closeTag;
// if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
- QLayout *layout = 0;
+ TQLayout *layout = 0;
QDesignerGridLayout* grid = 0;
- if ( !obj->inherits( "QSplitter" ) &&
+ if ( !obj->inherits( "TQSplitter" ) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::layoutType( (QWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (QWidget*)obj, layout );
+ WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "</hbox>";
@@ -969,7 +969,7 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
- for ( QPtrListIterator<QObject> it ( *l ); it.current(); ++it )
+ for ( TQPtrListIterator<TQObject> it ( *l ); it.current(); ++it )
saveObject( it.current(), grid, ts, indent );
if ( !closeTag.isEmpty() ) {
indent--;
@@ -977,10 +977,10 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
}
-void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
+void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
{
- QStringList saved;
- QStringList changed;
+ TQStringList saved;
+ TQStringList changed;
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
if ( w->inherits( "Spacer" ) ) {
@@ -989,7 +989,7 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
if ( !changed.contains( "geometry" ) )
changed << "geometry";
}
- } else if ( w->inherits( "QLayout" ) ) { // #### should be cleaner (RS)
+ } else if ( w->inherits( "TQLayout" ) ) { // #### should be cleaner (RS)
changed << "margin" << "spacing";
}
@@ -1003,22 +1003,22 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
- bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (QWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
- QStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() )
+ TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.find( QString::fromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() )
continue;
- saved << QString::fromLatin1( it.current() );
- const QMetaProperty* p = w->metaObject()->
+ saved << TQString::fromLatin1( it.current() );
+ const TQMetaProperty* p = w->metaObject()->
property( w->metaObject()->findProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
- if ( w->inherits( "QLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
- ( !( (QLabel*)w )->pixmap() || ( (QLabel*)w )->pixmap()->isNull() ) )
+ if ( w->inherits( "TQLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
if ( w->inherits( "QDesignerMenuBar" ) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
@@ -1033,19 +1033,19 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
ts << ">" << endl;
indent++;
if ( p->isSetType() ) {
- saveSetProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
} else if ( p->isEnumType() ) {
- saveEnumProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
} else {
- saveProperty( w, it.current(), w->property( p->name() ), QVariant::nameToType( p->type() ), ts, indent );
+ saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent );
}
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
- QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
- for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
+ TQMap<TQString, TQVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
+ for ( TQMap<TQString, TQVariant>::Iterator fake = fakeProperties->begin();
fake != fakeProperties->end(); ++fake ) {
if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
if ( w->inherits( "CustomWidget" ) ) {
@@ -1064,11 +1064,11 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
}
}
-void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
- QStrList l( p->valueToKeys( w->property( name ).toInt() ) );
- QString v;
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
+ TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
v += l.at( i );
if ( i < l.count() - 1 )
@@ -1077,123 +1077,123 @@ void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type,
ts << makeIndent( indent ) << "<set>" << v << "</set>" << endl;
}
-void Resource::saveEnumProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
-void Resource::saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent )
+void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "layoutMargin" || name =="layoutSpacing" )
return;
int num, unum;
double dob;
- QString comment;
- if ( w && formwindow->widgets()->find( (QWidget*)w ) )
+ TQString comment;
+ if ( w && formwindow->widgets()->find( (TQWidget*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
ts << makeIndent( indent ) << "<string>" << entitize( value.toString() ) << "</string>" << endl;
if ( !comment.isEmpty() )
ts << makeIndent( indent ) << "<comment>" << entitize( comment ) << "</comment>" << endl;
break;
- case QVariant::CString:
+ case TQVariant::CString:
ts << makeIndent( indent ) << "<cstring>" << entitize( value.toCString() ).latin1() << "</cstring>" << endl;
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
break;
- case QVariant::Int:
+ case TQVariant::Int:
num = value.toInt();
- if ( w && w->inherits( "QLayout" ) ) {
+ if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
}
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
- case QVariant::Double:
+ case TQVariant::Double:
dob = value.toDouble();
- ts << makeIndent( indent ) << "<number>" << QString::number( dob ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( dob ) << "</number>" << endl;
break;
- case QVariant::KeySequence:
+ case TQVariant::KeySequence:
num = value.toInt();
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
unum = value.toUInt();
- if ( w && w->inherits( "QLayout" ) ) {
+ if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::layoutParent( (QLayout*)w ) );
+ num = MetaDataBase::spacing( WidgetFactory::layoutParent( (TQLayout*)w ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::layoutParent( (QLayout*)w ) );
+ num = MetaDataBase::margin( WidgetFactory::layoutParent( (TQLayout*)w ) );
}
- ts << makeIndent( indent ) << "<number>" << QString::number( unum ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
- case QVariant::Rect: {
- QVariant v( value );
+ case TQVariant::Rect: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<rect>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toRect().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toRect().y() ) << "</y>" << endl;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toRect().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toRect().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toRect().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toRect().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toRect().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toRect().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</rect>" << endl;
} break;
- case QVariant::Point: {
- QVariant v( value );
+ case TQVariant::Point: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<point>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toPoint().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toPoint().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toPoint().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toPoint().y() ) << "</y>" << endl;
indent--;
ts << makeIndent( indent ) << "</point>" << endl;
} break;
- case QVariant::Size: {
- QVariant v( value );
+ case TQVariant::Size: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<size>" << endl;
indent++;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toSize().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toSize().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toSize().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toSize().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</size>" << endl;
} break;
- case QVariant::Color: {
- QVariant v( value );
+ case TQVariant::Color: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<color>" << endl;
indent++;
saveColor( ts, indent, v.toColor() );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
} break;
- case QVariant::Font: {
- QVariant v( value );
+ case TQVariant::Font: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
- QFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((QWidget*)w)->parentWidget() )
- f = ((QWidget*)w)->parentWidget()->font();
- QFont f2( v.toFont() );
+ TQFont f( qApp->font() );
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
+ f = ((TQWidget*)w)->parentWidget()->font();
+ TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
ts << makeIndent( indent ) << "<family>" << f2.family() << "</family>" << endl;
if ( f.pointSize() != f2.pointSize() )
- ts << makeIndent( indent ) << "<pointsize>" << QString::number( f2.pointSize() ) << "</pointsize>" << endl;
+ ts << makeIndent( indent ) << "<pointsize>" << TQString::number( f2.pointSize() ) << "</pointsize>" << endl;
if ( f.bold() != f2.bold() )
- ts << makeIndent( indent ) << "<bold>" << QString::number( (int)f2.bold() ) << "</bold>" << endl;
+ ts << makeIndent( indent ) << "<bold>" << TQString::number( (int)f2.bold() ) << "</bold>" << endl;
if ( f.italic() != f2.italic() )
- ts << makeIndent( indent ) << "<italic>" << QString::number( (int)f2.italic() ) << "</italic>" << endl;
+ ts << makeIndent( indent ) << "<italic>" << TQString::number( (int)f2.italic() ) << "</italic>" << endl;
if ( f.underline() != f2.underline() )
- ts << makeIndent( indent ) << "<underline>" << QString::number( (int)f2.underline() ) << "</underline>" << endl;
+ ts << makeIndent( indent ) << "<underline>" << TQString::number( (int)f2.underline() ) << "</underline>" << endl;
if ( f.strikeOut() != f2.strikeOut() )
- ts << makeIndent( indent ) << "<strikeout>" << QString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
+ ts << makeIndent( indent ) << "<strikeout>" << TQString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
indent--;
ts << makeIndent( indent ) << "</font>" << endl;
} break;
- case QVariant::SizePolicy: {
- QSizePolicy sp( value.toSizePolicy() );
+ case TQVariant::SizePolicy: {
+ TQSizePolicy sp( value.toSizePolicy() );
ts << makeIndent( indent ) << "<sizepolicy>" << endl;
indent++;
ts << makeIndent( indent ) << "<hsizetype>" << (int)sp.horData() << "</hsizetype>" << endl;
@@ -1204,17 +1204,17 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</sizepolicy>" << endl;
break;
}
- case QVariant::Pixmap:
+ case TQVariant::Pixmap:
savePixmap( value.toPixmap(), ts, indent );
break;
- case QVariant::IconSet:
+ case TQVariant::IconSet:
savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" );
break;
- case QVariant::Image:
+ case TQVariant::Image:
ts << makeIndent( indent ) << "<image>" << saveInCollection( value.toImage() ) << "</image>" << endl;
break;
- case QVariant::Palette: {
- QPalette p( value.toPalette() );
+ case TQVariant::Palette: {
+ TQPalette p( value.toPalette() );
ts << makeIndent( indent ) << "<palette>" << endl;
indent++;
@@ -1239,11 +1239,11 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</palette>" << endl;
} break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
break;
- case QVariant::StringList: {
- QStringList lst = value.toStringList();
+ case TQVariant::StringList: {
+ TQStringList lst = value.toStringList();
uint i = 0;
ts << makeIndent( indent ) << "<stringlist>" << endl;
indent++;
@@ -1254,8 +1254,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</stringlist>" << endl;
} break;
- case QVariant::Date: {
- QDate d = value.toDate();
+ case TQVariant::Date: {
+ TQDate d = value.toDate();
ts << makeIndent( indent ) << "<date>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << d.year() << "</year>" << endl;
@@ -1265,8 +1265,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</date>" << endl;
break;
}
- case QVariant::Time: {
- QTime t = value.toTime();
+ case TQVariant::Time: {
+ TQTime t = value.toTime();
ts << makeIndent( indent ) << "<time>" << endl;
indent++;
ts << makeIndent( indent ) << "<hour>" << t.hour() << "</hour>" << endl;
@@ -1276,8 +1276,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</time>" << endl;
break;
}
- case QVariant::DateTime: {
- QDateTime dt = value.toDateTime();
+ case TQVariant::DateTime: {
+ TQDateTime dt = value.toDateTime();
ts << makeIndent( indent ) << "<datetime>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << dt.date().year() << "</year>" << endl;
@@ -1295,33 +1295,33 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
}
}
-void Resource::saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg )
+void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg )
{
- for( int r = 0 ; r < QColorGroup::NColorRoles ; r++ ) {
+ for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) {
ts << makeIndent( indent ) << "<color>" << endl;
indent++;
- saveColor( ts, indent, cg.color( (QColorGroup::ColorRole)r ) );
+ saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
- QPixmap* pm = cg.brush( (QColorGroup::ColorRole)r ).pixmap();
+ TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap();
if ( pm && !pm->isNull() )
savePixmap( *pm, ts, indent );
}
}
-void Resource::saveColor( QTextStream &ts, int indent, const QColor &c )
+void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
{
- ts << makeIndent( indent ) << "<red>" << QString::number( c.red() ) << "</red>" << endl;
- ts << makeIndent( indent ) << "<green>" << QString::number( c.green() ) << "</green>" << endl;
- ts << makeIndent( indent ) << "<blue>" << QString::number( c.blue() ) << "</blue>" << endl;
+ ts << makeIndent( indent ) << "<red>" << TQString::number( c.red() ) << "</red>" << endl;
+ ts << makeIndent( indent ) << "<green>" << TQString::number( c.green() ) << "</green>" << endl;
+ ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl;
}
-QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* layout )
+TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
{
lastItem = 0;
- QDomElement n = e.firstChild().toElement();
- QWidget *w = 0; // the widget that got created
- QObject *obj = 0; // gets the properties
+ TQDomElement n = e.firstChild().toElement();
+ TQWidget *w = 0; // the widget that got created
+ TQObject *obj = 0; // gets the properties
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
@@ -1332,7 +1332,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
if ( colspan < 1 )
colspan = 1;
- QString className = e.attribute( "class", "QWidget" );
+ TQString className = e.attribute( "class", "TQWidget" );
if ( !className.isNull() ) {
obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
@@ -1340,19 +1340,19 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
return 0;
if ( !mainContainerSet ) {
if ( formwindow )
- formwindow->setMainContainer( (QWidget*)obj );
+ formwindow->setMainContainer( (TQWidget*)obj );
mainContainerSet = true;
}
- w = (QWidget*)obj;
- if ( w->inherits( "QMainWindow" ) )
- w = ( (QMainWindow*)w )->centralWidget();
+ w = (TQWidget*)obj;
+ if ( w->inherits( "TQMainWindow" ) )
+ w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch ( WidgetFactory::layoutType( layout ) ) {
case WidgetFactory::HBox:
- ( (QHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)layout )->addWidget( w );
break;
case WidgetFactory::VBox:
- ( (QVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)layout )->addWidget( w );
break;
case WidgetFactory::Grid:
( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
@@ -1368,9 +1368,9 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
layout = 0;
if ( w && formwindow ) {
- if ( !parent || ( !parent->inherits( "QToolBox" ) && !parent->inherits( "QTabWidget" ) && !parent->inherits( "QWizard" ) ) )
+ if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) )
formwindow->insertWidget( w, pasting );
- else if ( parent && ( parent->inherits( "QToolBox" ) || parent->inherits( "QTabWidget" ) || parent->inherits( "QWizard" ) ) )
+ else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) )
MetaDataBase::addEntry( w );
if (w->inherits("Dialog"))
dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
@@ -1400,18 +1400,18 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
} else if ( n.tagName() == "property" && obj ) {
setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "attribute" && w ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
- if ( parent->inherits( "QTabWidget" ) ) {
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ if ( parent->inherits( "TQTabWidget" ) ) {
if ( attrib == "title" )
- ( (QTabWidget*)parent )->insertTab( w, v.toString() );
+ ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
} else
- if ( parent->inherits( "QToolBox" ) ) {
+ if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
- ( (QToolBox*)parent )->addItem( w, v.toString() );
- } else if ( parent->inherits( "QWizard" ) ) {
+ ( (TQToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
- ( (QWizard*)parent )->addPage( w, v.toString() );
+ ( (TQWizard*)parent )->addPage( w, v.toString() );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -1421,7 +1421,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
// qDebug("Resource : Tag == event");
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( obj, formwindow, MainWindow::self->currProject()->language(),
- n.attribute( "name" ), QStringList::split( ',', n.attribute( "functions" ) ), false );
+ n.attribute( "name" ), TQStringList::split( ',', n.attribute( "functions" ) ), false );
#endif
}
@@ -1431,22 +1431,22 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
return w;
}
-void Resource::createColumn( const QDomElement &e, QWidget *widget )
+void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
{
if ( !widget )
return;
- if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) {
- QListView *lv = (QListView*)widget;
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) {
+ TQListView *lv = (TQListView*)widget;
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
bool clickable = true, resizeable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -1470,24 +1470,24 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
lv->header()->setResizeEnabled( resizeable, i );
}
#ifndef QT_NO_TABLE
- else if ( widget->inherits( "QTable" ) ) {
- QTable *table = (QTable*)widget;
+ else if ( widget->inherits( "TQTable" ) ) {
+ TQTable *table = (TQTable*)widget;
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
table->setNumRows( table->numRows() + 1 );
else
table->setNumCols( table->numCols() + 1 );
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
- QString field;
- QMap<QString, QString> fieldMap = MetaDataBase::columnFields( table );
+ TQString txt;
+ TQString field;
+ TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -1501,7 +1501,7 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
}
int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
- QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
+ TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
if ( hasPixmap )
h->setLabel( i, pix, txt );
else
@@ -1513,14 +1513,14 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
#endif
}
-void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
- QDomElement n = e;
+ TQDomElement n = e;
hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -1532,57 +1532,57 @@ void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool
}
}
-void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) )
return;
- if ( widget->inherits( "QListBox" ) || widget->inherits( "QComboBox" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QListBox *lb = 0;
- if ( widget->inherits( "QListBox" ) )
- lb = (QListBox*)widget;
+ TQListBox *lb = 0;
+ if ( widget->inherits( "TQListBox" ) )
+ lb = (TQListBox*)widget;
else
- lb = ( (QComboBox*)widget)->listBox();
+ lb = ( (TQComboBox*)widget)->listBox();
if ( hasPixmap ) {
- new QListBoxPixmap( lb, pix, txt );
+ new TQListBoxPixmap( lb, pix, txt );
} else {
- new QListBoxText( lb, txt );
+ new TQListBoxText( lb, txt );
}
- } else if ( widget->inherits( "QIconView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ } else if ( widget->inherits( "TQIconView" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QIconView *iv = (QIconView*)widget;
- new QIconViewItem( iv, txt, pix );
- } else if ( widget->inherits( "QListView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
- QValueList<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ TQIconView *iv = (TQIconView*)widget;
+ new TQIconViewItem( iv, txt, pix );
+ } else if ( widget->inherits( "TQListView" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
+ TQValueList<TQPixmap> pixmaps;
+ TQStringList textes;
+ TQListViewItem *item = 0;
+ TQListView *lv = (TQListView*)widget;
if ( i )
- item = new QListViewItem( i, lastItem );
+ item = new TQListViewItem( i, lastItem );
else
- item = new QListViewItem( lv, lastItem );
+ item = new TQListViewItem( lv, lastItem );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
textes << v.toString();
else if ( attrib == "pixmap" ) {
- QString s = v.toString();
+ TQString s = v.toString();
if ( s.isEmpty() ) {
- pixmaps << QPixmap();
+ pixmaps << TQPixmap();
} else {
pix = loadPixmap( n.firstChild().toElement() );
pixmaps << pix;
@@ -1605,9 +1605,9 @@ void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem
}
}
-QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o )
+TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
int rowspan = e.attribute( "rowspan" ).toInt();
@@ -1630,8 +1630,8 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
- if ( layout->inherits( "QBoxLayout" ) )
- ( (QBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ if ( layout->inherits( "TQBoxLayout" ) )
+ ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else
( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
spacer->alignment() );
@@ -1642,11 +1642,11 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout
/*!
Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both.
*/
-void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomElement &e )
+void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+ const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
- if ( !obj->inherits( "QLayout" ) ) {// no layouts in metadatabase... (RS)
+ if ( !obj->inherits( "TQLayout" ) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -1655,16 +1655,16 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
MetaDataBase::setPropertyChanged( obj, prop, true );
}
- QVariant defVarient;
+ TQVariant defVarient;
if ( e.tagName() == "font" ) {
- QFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
- f = ( (QWidget*)obj )->parentWidget()->font();
- defVarient = QVariant( f );
+ TQFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
+ f = ( (TQWidget*)obj )->parentWidget()->font();
+ defVarient = TQVariant( f );
}
- QString comment;
- QVariant v( DomTool::elementToVariant( e, defVarient, comment ) );
+ TQString comment;
+ TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) );
if ( !comment.isEmpty() ) {
MetaDataBase::addEntry( obj );
@@ -1672,24 +1672,24 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( e.tagName() == "pixmap" ) {
- QPixmap pix = loadPixmap( e );
+ TQPixmap pix = loadPixmap( e );
if ( pix.isNull() )
return;
- v = QVariant( pix );
+ v = TQVariant( pix );
} else if ( e.tagName() == "iconset" ) {
- QPixmap pix = loadPixmap( e, "iconset" );
+ TQPixmap pix = loadPixmap( e, "iconset" );
if ( pix.isNull() )
return;
- v = QVariant( QIconSet( pix ) );
+ v = TQVariant( TQIconSet( pix ) );
} else if ( e.tagName() == "image" ) {
- v = QVariant( loadFromCollection( v.toString() ) );
+ v = TQVariant( loadFromCollection( v.toString() ) );
}
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
if ( prop == "database" && obj != toplevel ) {
- QStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
+ TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
else if ( lst.count() == 2 )
@@ -1701,10 +1701,10 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
if ( e.tagName() == "palette" ) {
- QDomElement n = e.firstChild().toElement();
- QPalette p;
+ TQDomElement n = e.firstChild().toElement();
+ TQPalette p;
while ( !n.isNull() ) {
- QColorGroup cg;
+ TQColorGroup cg;
if ( n.tagName() == "active" ) {
cg = loadColorGroup( n );
p.setActive( cg );
@@ -1717,22 +1717,22 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
n = n.nextSibling().toElement();
}
- v = QPalette( p );
+ v = TQPalette( p );
} else if ( e.tagName() == "enum" && p && p->isEnumType() ) {
- QString key( v.toString() );
- v = QVariant( p->keyToValue( key ) );
+ TQString key( v.toString() );
+ v = TQVariant( p->keyToValue( key ) );
} else if ( e.tagName() == "set" && p && p->isSetType() ) {
- QString keys( v.toString() );
- QStringList lst = QStringList::split( '|', keys );
- QStrList l;
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ TQString keys( v.toString() );
+ TQStringList lst = TQStringList::split( '|', keys );
+ TQStrList l;
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
l.append( *it );
- v = QVariant( p->keysToValue( l ) );
+ v = TQVariant( p->keysToValue( l ) );
}
if ( prop == "caption" ) {
- QCString s1 = v.toCString();
- QString s2 = v.toString();
+ TQCString s1 = v.toCString();
+ TQString s2 = v.toString();
if ( !s1.isEmpty() )
formwindow->setCaption( s1 );
else if ( !s2.isEmpty() )
@@ -1754,21 +1754,21 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
}
- if ( obj->inherits( "QLayout" ) ) {
+ if ( obj->inherits( "TQLayout" ) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return;
}
if ( prop == "margin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return;
}
}
if ( prop == "name" ) {
if ( pasting ) {
- QString s = v.toString();
- formwindow->unify( (QWidget*)obj, s, true );
+ TQString s = v.toString();
+ formwindow->unify( (TQWidget*)obj, s, true );
obj->setName( s );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@@ -1777,18 +1777,18 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( prop == "sizePolicy" ) {
- QSizePolicy sp = v.toSizePolicy();
- sp.setHeightForWidth( ( (QWidget*)obj )->sizePolicy().hasHeightForWidth() );
+ TQSizePolicy sp = v.toSizePolicy();
+ sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() );
}
obj->setProperty( prop, v );
}
-QString Resource::saveInCollection( const QImage &img )
+TQString Resource::saveInCollection( const TQImage &img )
{
- QString imgName = "none";
- QValueList<Image>::Iterator it = images.begin();
+ TQString imgName = "none";
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
if ( img == ( *it ).img ) {
imgName = ( *it ).name;
@@ -1798,7 +1798,7 @@ QString Resource::saveInCollection( const QImage &img )
if ( imgName == "none" ) {
Image i;
- imgName = "image" + QString::number( images.count() );
+ imgName = "image" + TQString::number( images.count() );
i.name = imgName;
i.img = img;
images.append( i );
@@ -1806,19 +1806,19 @@ QString Resource::saveInCollection( const QImage &img )
return imgName;
}
-void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
+void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
{
- QByteArray ba;
- QBuffer buf( ba );
+ TQByteArray ba;
+ TQBuffer buf( ba );
buf.open( IO_WriteOnly | IO_Translate );
- QImageIO iio( &buf, "XPM" );
+ TQImageIO iio( &buf, "XPM" );
iio.setImage( img );
iio.write();
buf.close();
ulong len = ba.size() * 2;
- QByteArray bazip( len );
+ TQByteArray bazip( len );
::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
- QString res;
+ TQString res;
ts << makeIndent( indent ) << "<data format=\"XPM.GZ\" length=\"" << ba.size() << "\">";
static const char hexchars[] = "0123456789abcdef";
for ( int i = 0; i < (int)len; ++i ) {
@@ -1829,12 +1829,12 @@ void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
ts << "</data>" << endl;
}
-void Resource::saveImageCollection( QTextStream &ts, int indent )
+void Resource::saveImageCollection( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<images>" << endl;
indent++;
- QValueList<Image>::Iterator it = images.begin();
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
ts << makeIndent( indent ) << "<image name=\"" << (*it).name << "\">" << endl;
indent++;
@@ -1847,10 +1847,10 @@ void Resource::saveImageCollection( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</images>" << endl;
}
-static QImage loadImageData( QDomElement &n2 )
+static TQImage loadImageData( TQDomElement &n2 )
{
- QImage img;
- QString data = n2.firstChild().toText().data();
+ TQImage img;
+ TQString data = n2.firstChild().toText().data();
char *ba = new char[ data.length() / 2 ];
for ( int i = 0; i < (int)data.length() / 2; ++i ) {
char h = data[ 2 * i ].latin1();
@@ -1867,12 +1867,12 @@ static QImage loadImageData( QDomElement &n2 )
r += l - 'a' + 10;
ba[ i ] = r;
}
- QString format = n2.attribute( "format", "PNG" );
+ TQString format = n2.attribute( "format", "PNG" );
if ( format == "XPM.GZ" ) {
ulong len = n2.attribute( "length" ).toULong();
if ( len < data.length() * 5 )
len = data.length() * 5;
- QByteArray baunzip( len );
+ TQByteArray baunzip( len );
::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 );
img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" );
} else {
@@ -1883,14 +1883,14 @@ static QImage loadImageData( QDomElement &n2 )
return img;
}
-void Resource::loadImageCollection( const QDomElement &e )
+void Resource::loadImageCollection( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "image" ) {
Image img;
img.name = n.attribute( "name" );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "data" )
img.img = loadImageData( n2 );
@@ -1902,30 +1902,30 @@ void Resource::loadImageCollection( const QDomElement &e )
}
}
-QImage Resource::loadFromCollection( const QString &name )
+TQImage Resource::loadFromCollection( const TQString &name )
{
- QValueList<Image>::Iterator it = images.begin();
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
if ( ( *it ).name == name )
return ( *it ).img;
}
- return QImage();
+ return TQImage();
}
-void Resource::saveConnections( QTextStream &ts, int indent )
+void Resource::saveConnections( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<connections>" << endl;
indent++;
- QValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
- QValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
- if ( ( knownNames.findIndex( QString( conn.sender->name() ) ) == -1 &&
+ if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 &&
qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
- ( knownNames.findIndex( QString( conn.receiver->name() ) ) == -1 &&
+ ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
- if ( formwindow->isMainContainer( (QWidget*)(*it).receiver ) &&
+ if ( formwindow->isMainContainer( (TQWidget*)(*it).receiver ) &&
!MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) )
continue;
@@ -1952,21 +1952,21 @@ void Resource::saveConnections( QTextStream &ts, int indent )
}
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
LanguageInterface *iface = langIface;
if ( iface && MetaDataBase::hasEvents( lang ) ) {
- QObjectList *l = formwindow->queryList( "QWidget" );
+ TQObjectList *l = formwindow->queryList( "TQWidget" );
l->append( formwindow );
- QPtrList<QAction> lst = formwindow->actionList();
- for ( QAction *a = lst.first(); a; a = lst.next() )
+ TQPtrList<TQAction> lst = formwindow->actionList();
+ for ( TQAction *a = lst.first(); a; a = lst.next() )
l->append( a );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !MetaDataBase::hasObject( o ) )
continue;
- QMap<QString, QStringList> eventFunctions = MetaDataBase::eventFunctions( o );
- QMap<QString, QStringList>::ConstIterator it = eventFunctions.begin();
+ TQMap<TQString, TQStringList> eventFunctions = MetaDataBase::eventFunctions( o );
+ TQMap<TQString, TQStringList>::ConstIterator it = eventFunctions.begin();
for ( ; it != eventFunctions.end(); ++it ) {
- QString sls = (*it).join( "," );
+ TQString sls = (*it).join( "," );
MetaDataBase::Connection conn;
conn.sender = o;
conn.signal = it.key();
@@ -1982,24 +1982,24 @@ void Resource::saveConnections( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</connections>" << endl;
}
-void Resource::loadConnections( const QDomElement &e )
+void Resource::loadConnections( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "connection" ) {
- QString lang = n.attribute( "language", "C++" );
- QDomElement n2 = n.firstChild().toElement();
+ TQString lang = n.attribute( "language", "C++" );
+ TQDomElement n2 = n.firstChild().toElement();
MetaDataBase::Connection conn;
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
conn.sender = 0;
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2011,11 +2011,11 @@ void Resource::loadConnections( const QDomElement &e )
} else if ( n2.tagName() == "signal" ) {
conn.signal = n2.firstChild().toText().data();
} else if ( n2.tagName() == "receiver" ) {
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.receiver = toplevel;
} else {
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2041,7 +2041,7 @@ void Resource::loadConnections( const QDomElement &e )
}
else if ( MetaDataBase::hasEvents( lang ) ) {
MetaDataBase::setEventFunctions( conn.sender, formwindow, lang, conn.signal,
- QStringList::split( ',', conn.slot ), false );
+ TQStringList::split( ',', conn.slot ), false );
}
#else
MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
@@ -2073,12 +2073,12 @@ void Resource::loadConnections( const QDomElement &e )
}
}
-void Resource::saveCustomWidgets( QTextStream &ts, int indent )
+void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<customwidgets>" << endl;
indent++;
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
if ( usedCustomWidgets.findIndex( w->className ) == -1 )
continue;
@@ -2105,16 +2105,16 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</sizepolicy>" << endl;
ts << makeIndent( indent ) << "<pixmap>" << saveInCollection( w->pixmap->convertToImage() ) << "</pixmap>" << endl;
if ( !w->lstSignals.isEmpty() ) {
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
ts << makeIndent( indent ) << "<signal>" << entitize( *it ) << "</signal>" << endl;
}
if ( !w->lstSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent( indent ) << "<slot access=\"" << (*it).access << "\" specifier=\""
<< (*it).specifier << "\">" << entitize( (*it).slot ) << "</slot>" << endl;
}
if ( !w->lstProperties.isEmpty() ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
ts << makeIndent( indent ) << "<property type=\"" << (*it).type << "\">" << entitize( (*it).property ) << "</property>" << endl;
}
indent--;
@@ -2126,25 +2126,25 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</customwidgets>" << endl;
}
-void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
+void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "customwidget" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
while ( !n2.isNull() ) {
if ( n2.tagName() == "class" ) {
w->className = n2.firstChild().toText().data();
} else if ( n2.tagName() == "header" ) {
w->includeFile = n2.firstChild().toText().data();
- QString s = n2.attribute( "location" );
+ TQString s = n2.attribute( "location" );
if ( s != "local" )
w->includePolicy = MetaDataBase::CustomWidget::Global;
else
w->includePolicy = MetaDataBase::CustomWidget::Local;
} else if ( n2.tagName() == "sizehint" ) {
- QDomElement n3 = n2.firstChild().toElement();
+ TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() );
@@ -2153,12 +2153,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "sizepolicy" ) {
- QDomElement n3 = n2.firstChild().toElement();
+ TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "hordata" )
- w->sizePolicy.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verdata" )
- w->sizePolicy.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
@@ -2166,12 +2166,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "pixmap" ) {
- QPixmap pix;
+ TQPixmap pix;
if ( r ) {
pix = r->loadPixmap( n2 );
} else {
- QDomElement n3 = n2.firstChild().toElement();
- QImage img;
+ TQDomElement n3 = n2.firstChild().toElement();
+ TQImage img;
while ( !n3.isNull() ) {
if ( n3.tagName() == "data" ) {
img = loadImageData( n3 );
@@ -2180,7 +2180,7 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
}
pix.convertFromImage( img );
}
- w->pixmap = new QPixmap( pix );
+ w->pixmap = new TQPixmap( pix );
} else if ( n2.tagName() == "signal" ) {
w->lstSignals.append( n2.firstChild().toText().data().latin1() );
} else if ( n2.tagName() == "container" ) {
@@ -2204,16 +2204,16 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
}
}
-void Resource::saveTabOrder( QTextStream &ts, int indent )
+void Resource::saveTabOrder( TQTextStream &ts, int indent )
{
- QWidgetList l = MetaDataBase::tabOrder( toplevel );
+ TQWidgetList l = MetaDataBase::tabOrder( toplevel );
if ( l.isEmpty() )
return;
ts << makeIndent( indent ) << "<tabstops>" << endl;
indent++;
- for ( QWidget *w = l.first(); w; w = l.next() ) {
+ for ( TQWidget *w = l.first(); w; w = l.next() ) {
if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
continue;
ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
@@ -2223,20 +2223,20 @@ void Resource::saveTabOrder( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</tabstops>" << endl;
}
-void Resource::loadTabOrder( const QDomElement &e )
+void Resource::loadTabOrder( const TQDomElement &e )
{
- QWidget *last = 0;
- QDomElement n = e.firstChild().toElement();
- QWidgetList widgets;
+ TQWidget *last = 0;
+ TQDomElement n = e.firstChild().toElement();
+ TQWidgetList widgets;
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
- QString name = n.firstChild().toText().data();
+ TQString name = n.firstChild().toText().data();
if ( name.isEmpty() )
continue;
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
- QWidget *w = (QWidget*)l->first();
+ TQWidget *w = (TQWidget*)l->first();
widgets.append( w );
if ( last )
toplevel->setTabOrder( last, w );
@@ -2252,10 +2252,10 @@ void Resource::loadTabOrder( const QDomElement &e )
MetaDataBase::setTabOrder( toplevel, widgets );
}
-void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
+void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(formwindow);
- QString cn = formwindow->name();
+ TQString cn = formwindow->name();
ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl;
if (!info.comment.isEmpty())
ts << makeIndent(indent) << "<comment>" << entitize(info.comment) << "</comment>" << endl;
@@ -2267,17 +2267,17 @@ void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
ts << makeIndent(indent) << "<version>" << entitize(info.version) << "</version>" << endl;
}
-void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
+void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
- QString extensionInclude;
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQString extensionInclude;
bool needExtensionInclude = false;
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
indent++;
- for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
ts << makeIndent( indent ) << "<include location=\"" << (*it).location
<< "\" impldecl=\"" << (*it).implDecl << "\">" << (*it).header << "</include>" << endl;
if ( needExtensionInclude )
@@ -2291,32 +2291,32 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- QStringList forwards = MetaDataBase::forwards( formwindow );
+ TQStringList forwards = MetaDataBase::forwards( formwindow );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl;
indent++;
- for ( QStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 )
+ for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 )
ts << makeIndent( indent ) << "<forward>" << entitize( *it2 ) << "</forward>" << endl;
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- QStringList sigs = MetaDataBase::signalList( formwindow );
+ TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
- for ( QStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 )
ts << makeIndent( indent ) << "<signal>" << entitize( *it3 ) << "</signal>" << endl;
indent--;
ts << makeIndent( indent ) << "</signals>" << endl;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
#endif
- QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
+ TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
for ( ; it != slotList.end(); ++it ) {
MetaDataBase::Slot slot = *it;
ts << makeIndent( indent ) << "<slot";
@@ -2346,37 +2346,37 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
<< "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
}
-QColorGroup Resource::loadColorGroup( const QDomElement &e )
+TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QColor col;
+ TQDomElement n = e.firstChild().toElement();
+ TQColor col;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
} else if ( n.tagName() == "pixmap" ) {
- QPixmap pix = loadPixmap( n );
- cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) );
+ TQPixmap pix = loadPixmap( n );
+ cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) );
}
n = n.nextSibling().toElement();
}
return cg;
}
-void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
+void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
{
if ( !a->children() )
return;
- QObjectListIt it( *a->children() );
+ TQObjectListIt it( *a->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
- QAction *ac = (QAction*)o;
- bool isGroup = ac->inherits( "QActionGroup" );
+ TQAction *ac = (TQAction*)o;
+ bool isGroup = ac->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2396,16 +2396,16 @@ void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
}
}
-void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent )
+void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent )
{
if ( actions.isEmpty() )
return;
ts << makeIndent( indent ) << "<actions>" << endl;
indent++;
- QPtrListIterator<QAction> it( actions );
+ TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) {
- QAction *a = it.current();
- bool isGroup = a->inherits( "QActionGroup" );
+ TQAction *a = it.current();
+ bool isGroup = a->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2428,14 +2428,14 @@ void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, i
ts << makeIndent( indent ) << "</actions>" << endl;
}
-void Resource::loadChildAction( QObject *parent, const QDomElement &e )
+void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
{
- QDomElement n = e;
- QAction *a = 0;
+ TQDomElement n = e;
+ TQAction *a = 0;
if ( n.tagName() == "action" ) {
a = new QDesignerAction( parent );
MetaDataBase::addEntry( a );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -2444,17 +2444,17 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e )
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
n2.attribute( "name" ),
- QStringList::split( ',', n2.attribute( "functions" ) ), false );
+ TQStringList::split( ',', n2.attribute( "functions" ) ), false );
#endif
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
a = new QDesignerActionGroup( parent );
MetaDataBase::addEntry( a );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -2466,19 +2466,19 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e )
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
n2.attribute( "name" ),
- QStringList::split( ',', n2.attribute( "functions" ) ), false );
+ TQStringList::split( ',', n2.attribute( "functions" ) ), false );
#endif
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
formwindow->actionList().append( a );
}
}
-void Resource::loadActions( const QDomElement &e )
+void Resource::loadActions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
loadChildAction( formwindow, n );
@@ -2489,36 +2489,36 @@ void Resource::loadActions( const QDomElement &e )
}
}
-void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent )
+void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<toolbars>" << endl;
indent++;
- QPtrList<QToolBar> tbList;
+ TQPtrList<TQToolBar> tbList;
for ( int i = 0; i <= (int)Qt::DockMinimized; ++i ) {
tbList = mw->toolBars( (Qt::Dock)i );
if ( tbList.isEmpty() )
continue;
- for ( QToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
+ for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
if ( tb->isHidden() )
continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
saveObjectProperties( tb, ts, indent );
- QPtrList<QAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( a->inherits( "QSeparatorAction" ) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
- QWidget *w = ( (QDesignerAction*)a )->widget();
+ TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
saveObjectProperties( w, ts, indent );
const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) )
- usedCustomWidgets << QString( className );
+ usedCustomWidgets << TQString( className );
if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) )
saveItems( w, ts, indent );
indent--;
@@ -2536,9 +2536,9 @@ void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</toolbars>" << endl;
}
-void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
+void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
{
- if ( !mw->child( 0, "QMenuBar" ) )
+ if ( !mw->child( 0, "TQMenuBar" ) )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
@@ -2548,11 +2548,11 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
<< "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
indent++;
- QMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
+ TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
if ( !m )
continue;
- QPtrList<QAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( a->inherits( "QSeparatorAction" ) )
ts << makeIndent( indent ) << "<separator/>" << endl;
else
@@ -2565,29 +2565,29 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</menubar>" << endl;
}
-void Resource::loadToolBars( const QDomElement &e )
+void Resource::loadToolBars( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() );
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
QDesignerToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
tb = new QDesignerToolBar( mw, dock );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
- QAction *a = formwindow->findAction( n2.attribute( "name" ) );
+ TQAction *a = formwindow->findAction( n2.attribute( "name" ) );
if ( a ) {
a->addTo( tb );
tb->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
- QWidget *w = (QWidget*)createObject( n2, tb );
+ TQWidget *w = (TQWidget*)createObject( n2, tb );
QDesignerAction *a = new QDesignerAction( w, tb );
a->addTo( tb );
tb->addAction( a );
@@ -2602,25 +2602,25 @@ void Resource::loadToolBars( const QDomElement &e )
}
}
-void Resource::loadMenuBar( const QDomElement &e )
+void Resource::loadMenuBar( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() );
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
QDesignerMenuBar *mb = new QDesignerMenuBar( mw );
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw );
popup->setName( n.attribute( "name" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
- QAction *a = formwindow->findAction( n2.attribute( "name" ) );
+ TQAction *a = formwindow->findAction( n2.attribute( "name" ) );
if ( a ) {
a->addTo( popup );
popup->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( popup );
popup->addAction( a );
}
@@ -2638,35 +2638,35 @@ void Resource::loadMenuBar( const QDomElement &e )
void Resource::saveFormCode()
{
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
#else
- QString lang = "C++";
+ TQString lang = "C++";
#endif
LanguageInterface *iface = langIface;
if ( !iface )
return;
- QMap<QString, QString> functionBodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> functionBodies = MetaDataBase::functionBodies( formwindow );
if ( langIface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
if ( formwindow->formFile()->hasTempFileName() ||
formwindow->formFile()->code().isEmpty() ||
!formwindow->formFile()->hasFormCode() )
return;
#ifndef KOMMANDER
- QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+ TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
#else
- QFile f( formwindow->formFile()->codeFile() );
+ TQFile f( formwindow->formFile()->codeFile() );
#endif
if ( f.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
ts << formwindow->formFile()->code();
}
} else {
- QValueList<LanguageInterface::Function> funcs;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- QValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
+ TQValueList<LanguageInterface::Function> funcs;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
for ( ; sit != slotList.end(); ++sit ) {
MetaDataBase::Slot slot = *sit;
- QMap<QString, QString>::Iterator it =
+ TQMap<TQString, TQString>::Iterator it =
functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) );
LanguageInterface::Function func;
func.name = slot.slot;
@@ -2676,9 +2676,9 @@ void Resource::saveFormCode()
funcs.append( func );
}
- QValueList<LanguageInterface::Connection> conns;
- QValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
- for ( QValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
+ TQValueList<LanguageInterface::Connection> conns;
+ TQValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
it != mconns.end(); ++it ) {
LanguageInterface::Connection conn;
conn.sender = (*it).sender->name();
@@ -2688,7 +2688,7 @@ void Resource::saveFormCode()
}
iface->saveFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
- funcs, QStringList(), QStringList(), QStringList(),
+ funcs, TQStringList(), TQStringList(), TQStringList(),
MetaDataBase::variables( formwindow ), conns );
}
}
@@ -2696,57 +2696,57 @@ void Resource::saveFormCode()
// compatibility with early 3.0 betas
-static QString make_function_pretty( const QString &s )
+static TQString make_function_pretty( const TQString &s )
{
- QString res = s;
+ TQString res = s;
if ( res.find( ")" ) - res.find( "(" ) == 1 )
return res;
- res.replace( QRegExp( "[(]" ), "( " );
- res.replace( QRegExp( "[)]" ), " )" );
- res.replace( QRegExp( "&" ), " &" );
- res.replace( QRegExp( "[*]" ), " *" );
- res.replace( QRegExp( "," ), ", " );
- res.replace( QRegExp( ":" ), " : " );
+ res.replace( TQRegExp( "[(]" ), "( " );
+ res.replace( TQRegExp( "[)]" ), " )" );
+ res.replace( TQRegExp( "&" ), " &" );
+ res.replace( TQRegExp( "[*]" ), " *" );
+ res.replace( TQRegExp( "," ), ", " );
+ res.replace( TQRegExp( ":" ), " : " );
res = res.simplifyWhiteSpace();
return res;
}
#ifndef KOMMANDER
-void Resource::loadFunctions( const QDomElement &e )
+void Resource::loadFunctions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMap<QString, QString> bodies;
+ TQDomElement n = e.firstChild().toElement();
+ TQMap<TQString, TQString> bodies;
while ( !n.isNull() ) {
if ( n.tagName() == "function" ) {
- QString name = n.attribute( "name" );
- QString body = n.firstChild().toText().data();
+ TQString name = n.attribute( "name" );
+ TQString body = n.firstChild().toText().data();
bodies.insert( name, body );
}
n = n.nextSibling().toElement();
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
if ( !bodies.isEmpty() ) {
LanguageInterface *iface = langIface;
if ( !iface )
return;
- QString code;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- for ( QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
+ TQString code;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
#ifndef KOMMANDER
if ( (*it).language != formwindow->project()->language() )
#else
if ( (*it).language != "C++" )
#endif
continue;
- QString sl( (*it).slot );
- QString comments = MetaDataBase::functionComments( formwindow, sl );
+ TQString sl( (*it).slot );
+ TQString comments = MetaDataBase::functionComments( formwindow, sl );
if ( !comments.isEmpty() )
code += comments + "\n";
code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ),
( (*it).returnType.isEmpty() ?
- QString( "void" ) :
+ TQString( "void" ) :
(*it).returnType ) );
- QMap<QString, QString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
+ TQMap<TQString, TQString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
if ( bit != bodies.end() )
code += "\n" + *bit + "\n\n";
else
@@ -2763,47 +2763,47 @@ void Resource::loadFunctions( const QDomElement &e )
void Resource::loadExtraSource()
{
#ifndef KOMMANDER
- QString lang = MainWindow::self->currProject()->language();
+ TQString lang = MainWindow::self->currProject()->language();
#else
- QString lang = "C++";
+ TQString lang = "C++";
#endif
LanguageInterface *iface = langIface;
if ( hasFunctions || !iface )
return;
- QValueList<LanguageInterface::Function> functions;
- QStringList forwards;
- QStringList includesImpl;
- QStringList includesDecl;
- QStringList vars;
- QValueList<LanguageInterface::Connection> connections;
+ TQValueList<LanguageInterface::Function> functions;
+ TQStringList forwards;
+ TQStringList includesImpl;
+ TQStringList includesDecl;
+ TQStringList vars;
+ TQValueList<LanguageInterface::Connection> connections;
iface->loadFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
functions, forwards, includesImpl, includesDecl, vars, connections );
if ( iface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
#ifndef KOMMANDER
- QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+ TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
#else
- QFile f( formwindow->formFile()->codeFile() );
+ TQFile f( formwindow->formFile()->codeFile() );
#endif
- QString code;
+ TQString code;
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
code = ts.read();
}
formwindow->formFile()->setCode( code );
}
- for ( QValueList<LanguageInterface::Connection>::Iterator cit = connections.begin();
+ for ( TQValueList<LanguageInterface::Connection>::Iterator cit = connections.begin();
cit != connections.end(); ++cit ) {
- QObject *sender = 0;
- QString name = (*cit).sender;
+ TQObject *sender = 0;
+ TQString name = (*cit).sender;
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
sender = ( (FormWindow*)toplevel )->mainContainer();
} else {
if ( name == "this" )
name = toplevel->name();
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
sender = l->first();
@@ -2813,12 +2813,12 @@ void Resource::loadExtraSource()
sender = formwindow->findAction( name );
}
MetaDataBase::setEventFunctions( sender, formwindow, lang, (*cit).signal,
- QStringList::split( ',', (*cit).slot ), false );
+ TQStringList::split( ',', (*cit).slot ), false );
}
- QMap<QString, QString> bodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> bodies = MetaDataBase::functionBodies( formwindow );
- for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
@@ -2827,20 +2827,20 @@ void Resource::loadExtraSource()
MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments );
bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body );
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
- QStringList v = MetaDataBase::variables( formwindow );
- QStringList::Iterator vit;
+ TQStringList v = MetaDataBase::variables( formwindow );
+ TQStringList::Iterator vit;
for ( vit = vars.begin(); vit != vars.end(); ++vit )
v << *vit;
MetaDataBase::setVariables( formwindow, v );
- QStringList f = MetaDataBase::forwards( formwindow );
+ TQStringList f = MetaDataBase::forwards( formwindow );
for ( vit = forwards.begin(); vit != forwards.end(); ++vit )
f << *vit;
MetaDataBase::setForwards( formwindow, f );
- QValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
+ TQValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) {
MetaDataBase::Include inc;
inc.header = *vit;