summaryrefslogtreecommitdiffstats
path: root/kommander/factory
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/factory
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/factory')
-rw-r--r--kommander/factory/domtool.cpp154
-rw-r--r--kommander/factory/domtool.h22
-rw-r--r--kommander/factory/kommanderfactory.cpp888
-rw-r--r--kommander/factory/kommanderfactory.h132
4 files changed, 598 insertions, 598 deletions
diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
index d8c9fcd3..0bd7088c 100644
--- a/kommander/factory/domtool.cpp
+++ b/kommander/factory/domtool.cpp
@@ -20,14 +20,14 @@
#include "domtool.h"
-#include <qsizepolicy.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqsizepolicy.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqfont.h>
+#include <tqdom.h>
/*!
\class DomTool domtool.h
@@ -46,9 +46,9 @@
\sa hasProperty()
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -64,9 +64,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
\sa readProperty()
*/
-bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -77,13 +77,13 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name )
return false;
}
-QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type )
+TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type )
{
- QStringList result;
- QDomElement n;
+ TQStringList result;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == type )
result += n.attribute( "name" );
}
@@ -92,20 +92,20 @@ QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type
}
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
- QString dummy;
+ TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
- QVariant v;
+ TQVariant v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -118,9 +118,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QRect( x, y, w, h ) );
+ v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -129,9 +129,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QPoint( x, y ) );
+ v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -140,12 +140,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QSize( w, h ) );
+ v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
- v = QVariant( readColor( e ) );
+ v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QFont f( defValue.toFont() );
+ TQDomElement n3 = e.firstChild().toElement();
+ TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
@@ -161,58 +161,58 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( f );
+ v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
- v = QVariant( e.firstChild().toText().data() );
- QDomElement n = e;
+ v = TQVariant( e.firstChild().toText().data() );
+ TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = QVariant( QCString( e.firstChild().toText().data() ) );
+ v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
bool ok = true;
- v = QVariant( e.firstChild().toText().data().toInt( &ok ) );
+ v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
if ( !ok )
- v = QVariant( e.firstChild().toText().data().toDouble() );
+ v = TQVariant( e.firstChild().toText().data().toDouble() );
} else if ( e.tagName() == "bool" ) {
- QString t = e.firstChild().toText().data();
- v = QVariant( t == "true" || t == "1", 0 );
+ TQString t = e.firstChild().toText().data();
+ v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
sp.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
sp.setVerStretch( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( sp );
+ v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
- v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
} else if ( e.tagName() == "stringlist" ) {
- QStringList lst;
- QDomElement n;
+ TQStringList lst;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
lst << n.firstChild().toText().data();
- v = QVariant( lst );
+ v = TQVariant( lst );
} else if ( e.tagName() == "date" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int y, m, d;
y = m = d = 0;
while ( !n3.isNull() ) {
@@ -224,9 +224,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDate( y, m, d ) );
+ v = TQVariant( TQDate( y, m, d ) );
} else if ( e.tagName() == "time" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, m, s;
h = m = s = 0;
while ( !n3.isNull() ) {
@@ -238,9 +238,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
s = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QTime( h, m, s ) );
+ v = TQVariant( TQTime( h, m, s ) );
} else if ( e.tagName() == "datetime" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, mi, s, y, mo, d ;
h = mi = s = y = mo = d = 0;
while ( !n3.isNull() ) {
@@ -258,7 +258,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) );
+ v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) );
}
return v;
}
@@ -267,9 +267,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
/*! Returns the color which is returned in the dom element \a e.
*/
-QColor DomTool::readColor( const QDomElement &e )
+TQColor DomTool::readColor( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
@@ -281,7 +281,7 @@ QColor DomTool::readColor( const QDomElement &e )
n = n.nextSibling().toElement();
}
- return QColor( r, g, b );
+ return TQColor( r, g, b );
}
/*!
@@ -291,9 +291,9 @@ QColor DomTool::readColor( const QDomElement &e )
\sa hasAttribute()
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -309,9 +309,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
\sa readAttribute()
*/
-bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -322,7 +322,7 @@ bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
return false;
}
-static bool toBool( const QString& s )
+static bool toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
@@ -330,11 +330,11 @@ static bool toBool( const QString& s )
/*!
Convert Qt 2.x format to Qt 3.0 format if necessary
*/
-void DomTool::fixDocument( QDomDocument& doc )
+void DomTool::fixDocument( TQDomDocument& doc )
{
- QDomElement e;
- QDomNode n;
- QDomNodeList nl;
+ TQDomElement e;
+ TQDomNode n;
+ TQDomNodeList nl;
uint i = 0;
e = doc.firstChild().toElement();
@@ -350,8 +350,8 @@ void DomTool::fixDocument( QDomDocument& doc )
uint nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -373,8 +373,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -386,8 +386,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -399,8 +399,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "class" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "class", name );
diff --git a/kommander/factory/domtool.h b/kommander/factory/domtool.h
index fac628a4..98e299a2 100644
--- a/kommander/factory/domtool.h
+++ b/kommander/factory/domtool.h
@@ -21,8 +21,8 @@
#ifndef DOMTOOL_H
#define DOMTOOL_H
-#include <qvariant.h>
-#include <qnamespace.h>
+#include <tqvariant.h>
+#include <tqnamespace.h>
class QDomElement;
class QDomDocument;
@@ -30,15 +30,15 @@ class QDomDocument;
class DomTool : public Qt
{
public:
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasProperty( const QDomElement& e, const QString& name );
- static QStringList propertiesOfType( const QDomElement& e, const QString& type );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasAttribute( const QDomElement& e, const QString& name );
- static QColor readColor( const QDomElement &e );
- static void fixDocument( QDomDocument& );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasProperty( const TQDomElement& e, const TQString& name );
+ static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasAttribute( const TQDomElement& e, const TQString& name );
+ static TQColor readColor( const TQDomElement &e );
+ static void fixDocument( TQDomDocument& );
};
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index f3078830..3add83ae 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -26,71 +26,71 @@
#include <kommanderplugin.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
#include "config.h"
#ifndef QT_NO_SQL
#include "database2.h"
#endif
-#include <qdom.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqmetaobject.h>
#include "domtool.h"
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qobjectlist.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqobjectlist.h>
#include <private/qpluginmanager_p.h>
-#include <qmime.h>
-#include <qdragobject.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
#include <zlib.h>
#ifndef QT_NO_SQL
-#include <qsqlrecord.h>
-#include <qsqldatabase.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqldatabase.h>
+#include <tqdatatable.h>
#endif
// include all Qt widgets we support
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qiconview.h>
-#include <qheader.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqiconview.h>
+#include <tqheader.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qwizard.h>
-#include <qlcdnumber.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qtextbrowser.h>
-#include <qdial.h>
-#include <qslider.h>
-#include <qframe.h>
-#include <qwidgetstack.h>
-#include <qtextedit.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qsplitter.h>
-#include <qaction.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qdatetimeedit.h>
-#include <qtoolbox.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqwizard.h>
+#include <tqlcdnumber.h>
+#include <tqprogressbar.h>
+#include <tqtextview.h>
+#include <tqtextbrowser.h>
+#include <tqdial.h>
+#include <tqslider.h>
+#include <tqframe.h>
+#include <tqwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqsplitter.h>
+#include <tqaction.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
+#include <tqdatetimeedit.h>
+#include <tqtoolbox.h>
#include <stdlib.h>
#include <kglobal.h>
@@ -98,14 +98,14 @@
#include "kmdrmainwindow.h"
-QPtrList<KommanderPlugin> widgetPlugins;
+TQPtrList<KommanderPlugin> widgetPlugins;
-QMap<QWidget*, QString> *qwf_functions = 0;
-QMap<QWidget*, QString> *qwf_forms = 0;
-QString *qwf_language = 0;
+TQMap<TQWidget*, TQString> *qwf_functions = 0;
+TQMap<TQWidget*, TQString> *qwf_forms = 0;
+TQString *qwf_language = 0;
bool qwf_execute_code = true;
bool qwf_stays_on_top = false;
-QString *qwf_currFileName = 0L; //is this really used?
+TQString *qwf_currFileName = 0L; //is this really used?
KommanderFactory::KommanderFactory()
: dbControls( 0 ), usePixmapCollection( false )
@@ -114,7 +114,7 @@ KommanderFactory::KommanderFactory()
defSpacing = 6;
defMargin = 11;
if (!qwf_currFileName)
- qwf_currFileName = new QString();
+ qwf_currFileName = new TQString();
}
KommanderFactory::~KommanderFactory()
@@ -123,33 +123,33 @@ KommanderFactory::~KommanderFactory()
qwf_currFileName = 0L;
}
-QWidget *KommanderFactory::create( const QString &uiFile, QObject *connector, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector, TQWidget *parent, const char *name )
{
- QFile f( uiFile );
+ TQFile f( uiFile );
if ( !f.open( IO_ReadOnly ) )
return 0;
if (!qwf_currFileName)
- qwf_currFileName = new QString();
+ qwf_currFileName = new TQString();
*qwf_currFileName = uiFile;
- QWidget *w = KommanderFactory::create( &f, connector, parent, name );
+ TQWidget *w = KommanderFactory::create( &f, connector, parent, name );
if ( !qwf_forms )
- qwf_forms = new QMap<QWidget*, QString>;
+ qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
return w;
}
-QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
{
- 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 0;
}
@@ -158,45 +158,45 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
KommanderFactory *widgetFactory = new KommanderFactory;
widgetFactory->toplevel = 0;
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
- QDomElement variables = e;
+ TQDomElement variables = e;
while ( variables.tagName() != "variables" && !variables.isNull() )
variables = variables.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;
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.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;
@@ -205,8 +205,8 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
} else if ( e.tagName() == "pixmapinproject" ) {
widgetFactory->usePixmapCollection = true;
} else if ( e.tagName() == "layoutdefaults" ) {
- widgetFactory->defSpacing = e.attribute( "spacing", QString::number( widgetFactory->defSpacing ) ).toInt();
- widgetFactory->defMargin = e.attribute( "margin", QString::number( widgetFactory->defMargin ) ).toInt();
+ widgetFactory->defSpacing = e.attribute( "spacing", TQString::number( widgetFactory->defSpacing ) ).toInt();
+ widgetFactory->defMargin = e.attribute( "margin", TQString::number( widgetFactory->defMargin ) ).toInt();
}
e = e.nextSibling().toElement();
}
@@ -214,22 +214,22 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
if ( !imageCollection.isNull() )
widgetFactory->loadImageCollection( imageCollection );
- widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "QWidget") );
- QWidget *w = widgetFactory->toplevel;
+ widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") );
+ TQWidget *w = widgetFactory->toplevel;
if ( !w ) {
delete widgetFactory;
return 0;
}
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" )
widgetFactory->variables << 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" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) );
}
}
@@ -252,7 +252,7 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
if ( widgetFactory->toplevel ) {
#ifndef QT_NO_SQL
- QMap<QWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
+ TQMap<TQWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) {
if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
@@ -262,42 +262,42 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
}
- for ( QMap<QString, QStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
- QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" );
+ for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
+ TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), "TQDataTable" );
if ( !table )
continue;
if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
- QValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
- QString conn = (*it)[ 0 ];
- QSqlCursor* c = 0;
- QSqlDatabase *db = 0;
+ TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
+ TQString conn = (*it)[ 0 ];
+ TQSqlCursor* c = 0;
+ TQSqlDatabase *db = 0;
if ( conn.isEmpty() || conn == "(default)" ) {
- db = QSqlDatabase::database();
- c = new QSqlCursor( (*it)[ 1 ] );
+ db = TQSqlDatabase::database();
+ c = new TQSqlCursor( (*it)[ 1 ] );
} else {
- db = QSqlDatabase::database( conn );
- c = new QSqlCursor( (*it)[ 1 ], true, db );
+ db = TQSqlDatabase::database( conn );
+ c = new TQSqlCursor( (*it)[ 1 ], true, db );
}
if ( db ) {
table->setSqlCursor( c, fieldMap.isEmpty(), true );
- table->refresh( QDataTable::RefreshAll );
+ table->refresh( TQDataTable::RefreshAll );
}
}
#endif
}
- for ( QMap<QString, QString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
- QLabel *label = (QLabel*)widgetFactory->toplevel->child( it.key(), "QLabel" );
- QWidget *buddy = (QWidget*)widgetFactory->toplevel->child( *it, "QWidget" );
+ for ( TQMap<TQString, TQString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
+ TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key(), "TQLabel" );
+ TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( *it, "TQWidget" );
if ( label && buddy )
label->setBuddy( buddy );
}
delete widgetFactory;
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
return w;
}
@@ -307,121 +307,121 @@ void KommanderFactory::addPlugin( KommanderPlugin *plugin )
widgetPlugins.append( plugin );
}
-QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWidget *parent, const char *name )
{
- QString className = literalClassName;
+ TQString className = literalClassName;
// create widgets we know
- if (className == "QPushButton")
- return new QPushButton(parent, name);
- else if (className == "QToolButton")
- return new QToolButton(parent, name);
- else if (className == "QCheckBox")
- return new QCheckBox(parent, name);
- else if (className == "QRadioButton")
- return new QRadioButton(parent, name);
- else if (className == "QGroupBox")
- return new QGroupBox(parent, name);
- else if (className == "QButtonGroup")
- return new QButtonGroup(parent, name);
- else if (className == "QIconView")
+ if (className == "TQPushButton")
+ return new TQPushButton(parent, name);
+ else if (className == "TQToolButton")
+ return new TQToolButton(parent, name);
+ else if (className == "TQCheckBox")
+ return new TQCheckBox(parent, name);
+ else if (className == "TQRadioButton")
+ return new TQRadioButton(parent, name);
+ else if (className == "TQGroupBox")
+ return new TQGroupBox(parent, name);
+ else if (className == "TQButtonGroup")
+ return new TQButtonGroup(parent, name);
+ else if (className == "TQIconView")
{
#if !defined(QT_NO_ICONVIEW)
- return new QIconView(parent, name);
+ return new TQIconView(parent, name);
#endif
}
- else if (className == "QTable")
+ else if (className == "TQTable")
{
#if !defined(QT_NO_TABLE)
- return new QTable(parent, name);
+ return new TQTable(parent, name);
#endif
}
- else if (className == "QListBox")
- return new QListBox(parent, name);
- else if (className == "QListView")
- return new QListView(parent, name);
- else if (className == "QLineEdit")
- return new QLineEdit(parent, name);
- else if (className == "QSpinBox")
- return new QSpinBox(parent, name);
- else if (className == "QMultiLineEdit")
- return new QMultiLineEdit(parent, name);
- else if (className == "QLabel")
- return new QLabel(parent, name);
+ else if (className == "TQListBox")
+ return new TQListBox(parent, name);
+ else if (className == "TQListView")
+ return new TQListView(parent, name);
+ else if (className == "TQLineEdit")
+ return new TQLineEdit(parent, name);
+ else if (className == "TQSpinBox")
+ return new TQSpinBox(parent, name);
+ else if (className == "TQMultiLineEdit")
+ return new TQMultiLineEdit(parent, name);
+ else if (className == "TQLabel")
+ return new TQLabel(parent, name);
else if (className == "QLayoutWidget")
- return new QWidget(parent, name);
- else if (className == "QTabWidget")
- return new QTabWidget(parent, name);
- else if (className == "QComboBox")
- return new QComboBox(false, parent, name);
- else if (className == "QWidget")
+ return new TQWidget(parent, name);
+ else if (className == "TQTabWidget")
+ return new TQTabWidget(parent, name);
+ else if (className == "TQComboBox")
+ return new TQComboBox(false, parent, name);
+ else if (className == "TQWidget")
{
if (!qwf_stays_on_top)
- return new QWidget(parent, name);
- return new QWidget(parent, name, Qt::WStyle_StaysOnTop);
+ return new TQWidget(parent, name);
+ return new TQWidget(parent, name, Qt::WStyle_StaysOnTop);
}
- else if (className == "QDialog")
+ else if (className == "TQDialog")
{
if (!qwf_stays_on_top)
- return new QDialog(parent, name);
- return new QDialog(parent, name, false, Qt::WStyle_StaysOnTop);
+ return new TQDialog(parent, name);
+ return new TQDialog(parent, name, false, Qt::WStyle_StaysOnTop);
}
- else if (className == "QWizard")
- return new QWizard(parent, name);
- else if (className == "QLCDNumber")
- return new QLCDNumber(parent, name);
- else if (className == "QProgressBar")
- return new QProgressBar(parent, name);
- else if (className == "QTextView")
- return new QTextView(parent, name);
- else if (className == "QTextBrowser")
- return new QTextBrowser(parent, name);
- else if (className == "QDial")
- return new QDial(parent, name);
- else if (className == "QSlider")
- return new QSlider(parent, name);
- else if (className == "QFrame")
- return new QFrame(parent, name);
- else if (className == "QSplitter")
- return new QSplitter(parent, name);
+ else if (className == "TQWizard")
+ return new TQWizard(parent, name);
+ else if (className == "TQLCDNumber")
+ return new TQLCDNumber(parent, name);
+ else if (className == "TQProgressBar")
+ return new TQProgressBar(parent, name);
+ else if (className == "TQTextView")
+ return new TQTextView(parent, name);
+ else if (className == "TQTextBrowser")
+ return new TQTextBrowser(parent, name);
+ else if (className == "TQDial")
+ return new TQDial(parent, name);
+ else if (className == "TQSlider")
+ return new TQSlider(parent, name);
+ else if (className == "TQFrame")
+ return new TQFrame(parent, name);
+ else if (className == "TQSplitter")
+ return new TQSplitter(parent, name);
else if (className == "Line")
{
- QFrame *f = new QFrame(parent, name);
- f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ TQFrame *f = new TQFrame(parent, name);
+ f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken);
return f;
}
- else if (className == "QTextEdit")
- return new QTextEdit(parent, name);
+ else if (className == "TQTextEdit")
+ return new TQTextEdit(parent, name);
else if (className == "QDateEdit")
return new QDateEdit(parent, name);
else if (className == "QTimeEdit")
return new QTimeEdit(parent, name);
else if (className == "QDateTimeEdit")
return new QDateTimeEdit(parent, name);
- else if (className == "QScrollBar")
- return new QScrollBar(parent, name);
- else if (className == "QPopupMenu")
- return new QPopupMenu(parent, name);
- else if (className == "QWidgetStack")
- return new QWidgetStack(parent, name);
- else if (className == "QMainWindow")
+ else if (className == "TQScrollBar")
+ return new TQScrollBar(parent, name);
+ else if (className == "TQPopupMenu")
+ return new TQPopupMenu(parent, name);
+ else if (className == "TQWidgetStack")
+ return new TQWidgetStack(parent, name);
+ else if (className == "TQMainWindow")
{
- QMainWindow *mw = 0;
+ TQMainWindow *mw = 0;
if (!qwf_stays_on_top)
mw = new KmdrMainWindow(parent, name);
else
mw = new KmdrMainWindow(parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop);
- mw->setCentralWidget(new QWidget(mw, "qt_central_widget"));
+ mw->setCentralWidget(new TQWidget(mw, "qt_central_widget"));
mw->centralWidget()->show();
(void) mw->statusBar();
return mw;
}
#if !defined(QT_NO_SQL)
- else if (className == "QDataTable")
- return new QDataTable(parent, name);
- else if (className == "QDataBrowser")
+ else if (className == "TQDataTable")
+ return new TQDataTable(parent, name);
+ else if (className == "TQDataBrowser")
return new QDesignerDataBrowser2(parent, name);
- else if (className == "QDataView")
+ else if (className == "TQDataView")
return new QDesignerDataView2(parent, name);
#endif
@@ -429,7 +429,7 @@ QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidge
//find the widget plugin which can create className
for (KommanderPlugin * p = widgetPlugins.first(); p; p = widgetPlugins.next())
{
- QWidget *w = p->create(className, parent, name);
+ TQWidget *w = p->create(className, parent, name);
if (w)
return w;
}
@@ -447,9 +447,9 @@ int KommanderFactory::loadPlugins(bool force)
num_plugins_loaded = 0;
KConfig cfg("kommanderrc", true);
- QStringList plugins = "libkommanderwidgets";
+ TQStringList plugins = "libkommanderwidgets";
plugins += cfg.readListEntry("plugins");
- QStringList::Iterator it;
+ TQStringList::Iterator it;
KLibLoader *f = KLibLoader::self();
for (it = plugins.begin(); it != plugins.end(); ++it)
{
@@ -482,11 +482,11 @@ FeatureList KommanderFactory::featureList()
FeatureList features;
for ( KommanderPlugin *p = widgetPlugins.first(); p ; p = widgetPlugins.next() )
{
- QStringList widgets = p->widgets();
- QStringList::Iterator it;
+ TQStringList widgets = p->widgets();
+ TQStringList::Iterator it;
for( it = widgets.begin() ; it != widgets.end() ; ++it )
{
- QString wn = *it;
+ TQString wn = *it;
features[wn] = KommanderWidgetInfo( p->group(wn), p->toolTip(wn),p->iconSet(wn), p->whatsThis(wn), p->isContainer(wn) );
}
}
@@ -494,14 +494,14 @@ FeatureList KommanderFactory::featureList()
//iterate through widgetPlugins, appending KommanderPlugin::widgets() to features
}
-QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg )
+TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg )
{
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
- QString className = classNameArg;
+ TQString className = classNameArg;
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
@@ -513,7 +513,7 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
colspan = 1;
if ( !className.isEmpty() ) {
if ( !layout && className == "QLayoutWidget" )
- className = "QWidget";
+ className = "TQWidget";
if ( layout && className == "QLayoutWidget" ) {
// hide layout widgets
w = parent;
@@ -523,21 +523,21 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
{
return 0;
}
- w = (QWidget*)obj;
+ w = (TQWidget*)obj;
if ( !toplevel )
toplevel = w;
- if ( w->inherits( "QMainWindow" ) )
- w = ( (QMainWindow*)w )->centralWidget();
+ if ( w->inherits( "TQMainWindow" ) )
+ w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch( layoutType( layout ) ) {
case HBox:
- ( (QHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)layout )->addWidget( w );
break;
case VBox:
- ( (QVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)layout )->addWidget( w );
break;
case Grid:
- ( (QGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -555,57 +555,57 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
if ( n.tagName() == "spacer" ) {
createSpacer( n, layout );
} else if ( n.tagName() == "widget" ) {
- QMap< QString, QString> *oldDbControls = dbControls;
- createWidgetInternal( n, w, layout, n.attribute( "class", "QWidget" ) );
+ TQMap< TQString, TQString> *oldDbControls = dbControls;
+ createWidgetInternal( n, w, layout, n.attribute( "class", "TQWidget" ) );
dbControls = oldDbControls;
} else if ( n.tagName() == "hbox" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::HBox );
else
layout = createLayout( w, layout, KommanderFactory::HBox );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "grid" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::Grid );
else
layout = createLayout( w, layout, KommanderFactory::Grid );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "vbox" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::VBox );
else
layout = createLayout( w, layout, KommanderFactory::VBox );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "property" && obj ) {
setProperty( 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, translate(v.toString()) );
+ ( (TQTabWidget*)parent )->insertTab( w, translate(v.toString()) );
} else
- if ( parent->inherits( "QToolBox" ) ) {
+ if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
- ( (QToolBox*)parent )->addItem( w, translate(v.toString()) );
- }else if ( parent->inherits( "QWizard" ) ) {
+ ( (TQToolBox*)parent )->addItem( w, translate(v.toString()) );
+ }else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
- ( (QWizard*)parent )->addPage( w, translate(v.toString()) );
+ ( (TQWizard*)parent )->addPage( w, translate(v.toString()) );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -619,39 +619,39 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
return w;
}
-QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, LayoutType type )
+TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, LayoutType type )
{
int spacing = defSpacing;
int margin = defMargin;
- if ( !layout && widget && widget->inherits( "QTabWidget" ) )
- widget = ((QTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "QToolBox" ) )
- widget = ((QToolBox*)widget)->currentItem();
+ if ( !layout && widget && widget->inherits( "TQTabWidget" ) )
+ widget = ((TQTabWidget*)widget)->currentPage();
+ if ( !layout && widget && widget->inherits( "TQToolBox" ) )
+ widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( "QWizard" ) )
- widget = ((QWizard*)widget)->currentPage();
+ if ( !layout && widget && widget->inherits( "TQWizard" ) )
+ widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "QWidgetStack" ) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
+ if ( !layout && widget && widget->inherits( "TQWidgetStack" ) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( !layout && widget && widget->inherits( "QGroupBox" ) ) {
- QGroupBox *gb = (QGroupBox*)widget;
+ if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
+ TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 );
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( gb->layout() );
+ l = new TQHBoxLayout( gb->layout() );
l->setAlignment( Qt::AlignTop );
return l;
case VBox:
- l = new QVBoxLayout( gb->layout(), spacing );
+ l = new TQVBoxLayout( gb->layout(), spacing );
l->setAlignment( Qt::AlignTop );
return l;
case Grid:
- l = new QGridLayout( gb->layout() );
+ l = new TQGridLayout( gb->layout() );
l->setAlignment( Qt::AlignTop );
return l;
default:
@@ -659,20 +659,20 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
}
} else {
if ( layout ) {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( layout );
+ l = new TQHBoxLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case VBox:
- l = new QVBoxLayout( layout );
+ l = new TQVBoxLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case Grid: {
- l = new QGridLayout( layout );
+ l = new TQGridLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
@@ -681,24 +681,24 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
return 0;
}
} else {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( widget );
+ l = new TQHBoxLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
}
return l;
case VBox:
- l = new QVBoxLayout( widget );
+ l = new TQVBoxLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
}
return l;
case Grid: {
- l = new QGridLayout( widget );
+ l = new TQGridLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
@@ -712,61 +712,61 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
}
}
-KommanderFactory::LayoutType KommanderFactory::layoutType( QLayout *layout ) const
+KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) const
{
- if ( layout->inherits( "QHBoxLayout" ) )
+ if ( layout->inherits( "TQHBoxLayout" ) )
return HBox;
- else if ( layout->inherits( "QVBoxLayout" ) )
+ else if ( layout->inherits( "TQVBoxLayout" ) )
return VBox;
- else if ( layout->inherits( "QGridLayout" ) )
+ else if ( layout->inherits( "TQGridLayout" ) )
return Grid;
return NoLayout;
}
-void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDomElement &e )
+void KommanderFactory::setProperty( 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 );
- QVariant defVariant;
+ TQVariant defVariant;
if ( e.tagName() == "font" ) {
- QFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
- f = ( (QWidget*)obj )->parentWidget()->font();
- defVariant = QVariant( f );
+ TQFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
+ f = ( (TQWidget*)obj )->parentWidget()->font();
+ defVariant = TQVariant( f );
}
- QString comment;
- QVariant v( DomTool::elementToVariant( e, defVariant, comment ) );
+ TQString comment;
+ TQVariant v( DomTool::elementToVariant( e, defVariant, comment ) );
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 );
+ TQPixmap pix = loadPixmap( e );
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() ) );
} else if ( e.tagName() == "string" ) {
- v = QVariant( translate( v.asString(), comment ) );
+ v = TQVariant( translate( v.asString(), comment ) );
}
if ( !p ) {
if ( obj->isWidgetType() ) {
if ( prop == "toolTip" ) {
if ( !v.toString().isEmpty() )
- QToolTip::add( (QWidget*)obj, translate(v.toString()) );
+ TQToolTip::add( (TQWidget*)obj, translate(v.toString()) );
} else if ( prop == "whatsThis" ) {
if ( !v.toString().isEmpty() )
- QWhatsThis::add( (QWidget*)obj, translate(v.toString()) );
+ TQWhatsThis::add( (TQWidget*)obj, translate(v.toString()) );
}
#ifndef QT_NO_SQL
- if ( prop == "database" && !obj->inherits( "QDataView" )
- && !obj->inherits( "QDataBrowser" ) ) {
- QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
+ if ( prop == "database" && !obj->inherits( "TQDataView" )
+ && !obj->inherits( "TQDataBrowser" ) ) {
+ TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList();
if ( lst.count() > 2 ) {
if ( dbControls )
dbControls->insert( obj->name(), lst[ 2 ] );
@@ -774,10 +774,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
dbTables.insert( obj->name(), lst );
}
} else if ( prop == "database" ) {
- QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
- if ( lst.count() == 2 && obj->inherits( "QWidget" ) ) {
+ TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList();
+ if ( lst.count() == 2 && obj->inherits( "TQWidget" ) ) {
SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] );
- sqlWidgetConnections.insert( (QWidget*)obj, conn );
+ sqlWidgetConnections.insert( (TQWidget*)obj, conn );
dbControls = conn.dbControls;
}
} else
@@ -785,12 +785,12 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
if ( prop == "buddy" ) {
buddies.insert( obj->name(), v.toCString() );
} else if ( prop == "frameworkCode" ) {
- if ( !DomTool::elementToVariant( e, QVariant( true, 0 ) ).toBool() ) {
+ if ( !DomTool::elementToVariant( e, TQVariant( true, 0 ) ).toBool() ) {
noDatabaseWidgets << obj->name();
}
} else if ( prop == "buttonGroupId" ) {
- if ( obj->inherits( "QButton" ) && obj->parent()->inherits( "QButtonGroup" ) )
- ( (QButtonGroup*)obj->parent() )->insert( (QButton*)obj, v.toInt() );
+ if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) )
+ ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, v.toInt() );
}
return;
@@ -798,10 +798,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
}
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 );
@@ -814,17 +814,17 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
}
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 == "geometry" ) {
@@ -837,9 +837,9 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
obj->setProperty( prop, v );
}
-void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
+void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
{
- 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();
@@ -847,10 +847,10 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
Qt::Orientation orient = Qt::Horizontal;
int w = 0, h = 0;
- QSizePolicy::SizeType sizeType = QSizePolicy::Preferred;
+ TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString prop = n.attribute( "name" );
+ TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
orient = Qt::Horizontal;
@@ -858,17 +858,17 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
orient = Qt::Vertical;
} else if ( prop == "sizeType" ) {
if ( n.firstChild().firstChild().toText().data() == "Fixed" )
- sizeType = QSizePolicy::Fixed;
+ sizeType = TQSizePolicy::Fixed;
else if ( n.firstChild().firstChild().toText().data() == "Minimum" )
- sizeType = QSizePolicy::Minimum;
+ sizeType = TQSizePolicy::Minimum;
else if ( n.firstChild().firstChild().toText().data() == "Maximum" )
- sizeType = QSizePolicy::Maximum;
+ sizeType = TQSizePolicy::Maximum;
else if ( n.firstChild().firstChild().toText().data() == "Preferred" )
- sizeType = QSizePolicy::Preferred;
+ sizeType = TQSizePolicy::Preferred;
else if ( n.firstChild().firstChild().toText().data() == "MinimumExpanding" )
- sizeType = QSizePolicy::MinimumExpanding;
+ sizeType = TQSizePolicy::MinimumExpanding;
else if ( n.firstChild().firstChild().toText().data() == "Expanding" )
- sizeType = QSizePolicy::Expanding;
+ sizeType = TQSizePolicy::Expanding;
} else if ( prop == "sizeHint" ) {
w = n.firstChild().firstChild().firstChild().toText().data().toInt();
h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt();
@@ -881,21 +881,21 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
rowspan = 1;
if ( colspan < 1 )
colspan = 1;
- QSpacerItem *item = new QSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : QSizePolicy::Minimum,
- orient == Qt::Vertical ? sizeType : QSizePolicy::Minimum );
+ TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
+ orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
if ( layout ) {
- if ( layout->inherits( "QBoxLayout" ) )
- ( (QBoxLayout*)layout )->addItem( item );
+ if ( layout->inherits( "TQBoxLayout" ) )
+ ( (TQBoxLayout*)layout )->addItem( item );
else
- ( (QGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
+ ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter );
}
}
-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();
@@ -912,12 +912,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 {
@@ -928,14 +928,14 @@ static QImage loadImageData( QDomElement &n2 )
return img;
}
-void KommanderFactory::loadImageCollection( const QDomElement &e )
+void KommanderFactory::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 );
@@ -947,47 +947,47 @@ void KommanderFactory::loadImageCollection( const QDomElement &e )
}
}
-QImage KommanderFactory::loadFromCollection( const QString &name )
+TQImage KommanderFactory::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();
}
-QPixmap KommanderFactory::loadPixmap( const QDomElement &e )
+TQPixmap KommanderFactory::loadPixmap( const TQDomElement &e )
{
- QString arg = e.firstChild().toText().data();
+ TQString arg = e.firstChild().toText().data();
if ( usePixmapCollection ) {
- const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( arg );
+ const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( arg );
if ( !m )
- return QPixmap();
- QPixmap pix;
- QImageDrag::decode( m, pix );
+ return TQPixmap();
+ TQPixmap pix;
+ TQImageDrag::decode( m, pix );
return pix;
}
- QImage img = loadFromCollection( arg );
- QPixmap pix;
+ TQImage img = loadFromCollection( arg );
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
}
-QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e )
+TQColorGroup KommanderFactory::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();
}
@@ -996,8 +996,8 @@ QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e )
struct Connection
{
- QObject *sender, *receiver;
- QCString signal, slot;
+ TQObject *sender, *receiver;
+ TQCString signal, slot;
bool operator==( const Connection &c ) const {
return sender == c.sender && receiver == c.receiver &&
signal == c.signal && slot == c.slot ;
@@ -1007,27 +1007,27 @@ struct Connection
class NormalizeObject : public QObject
{
public:
- NormalizeObject() : QObject() {}
- static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); }
+ NormalizeObject() : TQObject() {}
+ static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); }
};
-void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector )
+void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connector )
{
- 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();
Connection conn;
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
- 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();
@@ -1039,11 +1039,11 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
} 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();
@@ -1059,8 +1059,8 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
conn.signal = NormalizeObject::normalizeSignalSlot( conn.signal );
conn.slot = NormalizeObject::normalizeSignalSlot( conn.slot );
- QObject *sender = 0, *receiver = 0;
- QObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
+ TQObject *sender = 0, *receiver = 0;
+ TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
sender = toplevel;
} else {
@@ -1089,13 +1089,13 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
}
if ( lang == "C++" ) {
- QString s = "2""%1";
+ TQString s = "2""%1";
s = s.arg( conn.signal );
- QString s2 = "1""%1";
+ TQString s2 = "1""%1";
s2 = s2.arg( conn.slot );
- QStrList signalList = sender->metaObject()->signalNames( true );
- QStrList slotList = receiver->metaObject()->slotNames( true );
+ TQStrList signalList = sender->metaObject()->signalNames( true );
+ TQStrList slotList = receiver->metaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
@@ -1109,32 +1109,32 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
n = n.nextSibling().toElement();
continue;
}
- QObject::connect( sender, s, receiver, s2 );
+ TQObject::connect( sender, s, receiver, s2 );
} else {
EventFunction ef = eventMap[ conn.sender ];
ef.events.append( conn.signal );
- ef.functions.append( QStringList::split( ',', conn.slot ) );
+ ef.functions.append( TQStringList::split( ',', conn.slot ) );
eventMap.replace( conn.sender, ef );
}
} else if ( n.tagName() == "slot" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) );
}
n = n.nextSibling().toElement();
}
}
-void KommanderFactory::loadTabOrder( const QDomElement &e )
+void KommanderFactory::loadTabOrder( const TQDomElement &e )
{
- QWidget *last = 0;
- QDomElement n = e.firstChild().toElement();
+ TQWidget *last = 0;
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
- QString name = n.firstChild().toText().data();
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQString name = n.firstChild().toText().data();
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
- QWidget *w = (QWidget*)l->first();
+ TQWidget *w = (TQWidget*)l->first();
if ( last )
toplevel->setTabOrder( last, w );
last = w;
@@ -1146,19 +1146,19 @@ void KommanderFactory::loadTabOrder( const QDomElement &e )
}
}
-void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget )
+void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget )
{
- 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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1182,10 +1182,10 @@ void KommanderFactory::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;
#ifndef QT_NO_SQL
- bool isSql = (widget->inherits( "QDataTable" ));
+ bool isSql = (widget->inherits( "TQDataTable" ));
#endif
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
@@ -1197,20 +1197,20 @@ void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget )
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;
- QValueList<Field> fieldMap;
+ TQString txt;
+ TQString field;
+ TQValueList<Field> fieldMap;
if ( fieldMaps.find( table ) != fieldMaps.end() ) {
fieldMap = *fieldMaps.find( table );
fieldMaps.remove( 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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1224,39 +1224,39 @@ void KommanderFactory::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 ) {
#ifndef QT_NO_SQL
if ( isSql )
- ((QDataTable*)table)->addColumn( field, txt, -1, pix );
+ ((TQDataTable*)table)->addColumn( field, txt, -1, pix );
else
#endif
h->setLabel( i, pix, txt );
} else {
#ifndef QT_NO_SQL
if ( isSql ) {
- ((QDataTable*)table)->addColumn( field, txt );
+ ((TQDataTable*)table)->addColumn( field, txt );
}
else
#endif
h->setLabel( i, txt );
}
if ( !isRow && !field.isEmpty() ) {
- fieldMap.append( Field( txt, (hasPixmap ? pix : QPixmap()), field ) );
+ fieldMap.append( Field( txt, (hasPixmap ? pix : TQPixmap()), field ) );
fieldMaps.insert( table, fieldMap );
}
}
#endif
}
-void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+void KommanderFactory::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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1268,56 +1268,56 @@ void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &tx
}
}
-void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+void KommanderFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
- 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 );
}
#ifndef QT_NO_ICONVIEW
- } 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 );
+ TQIconView *iv = (TQIconView*)widget;
+ new TQIconViewItem( iv, txt, pix );
#endif
- } else if ( widget->inherits( "QListView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
- QValueList<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ } 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 << translate(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;
@@ -1341,28 +1341,28 @@ void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListV
-void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e )
+void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
{
- QDomElement n = e;
- QAction *a = 0;
+ TQDomElement n = e;
+ TQAction *a = 0;
EventFunction ef;
if ( n.tagName() == "action" ) {
- a = new QAction( parent );
- QDomElement n2 = n.firstChild().toElement();
+ a = new TQAction( parent );
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
} else if ( n2.tagName() == "event" ) {
ef.events.append( n2.attribute( "name" ) );
- ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) );
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new QActionGroup( parent );
- QDomElement n2 = n.firstChild().toElement();
+ a = new TQActionGroup( parent );
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -1371,20 +1371,20 @@ void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e )
loadChildAction( a, n2 );
} else if ( n2.tagName() == "event" ) {
ef.events.append( n2.attribute( "name" ) );
- ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) );
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
}
if ( a )
eventMap.insert( a, ef );
}
-void KommanderFactory::loadActions( const QDomElement &e )
+void KommanderFactory::loadActions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
loadChildAction( toplevel, n );
@@ -1395,27 +1395,27 @@ void KommanderFactory::loadActions( const QDomElement &e )
}
}
-void KommanderFactory::loadToolBars( const QDomElement &e )
+void KommanderFactory::loadToolBars( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)toplevel );
- QToolBar *tb = 0;
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)toplevel );
+ TQToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new QToolBar( QString::null, mw, dock );
+ tb = new TQToolBar( TQString::null, mw, dock );
tb->setLabel( n.attribute( "label" ) );
tb->setName( n.attribute( "name" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
- QAction *a = findAction( n2.attribute( "name" ) );
+ TQAction *a = findAction( n2.attribute( "name" ) );
if ( a )
a->addTo( tb );
} else if ( n2.tagName() == "separator" ) {
tb->addSeparator();
} else if ( n2.tagName() == "widget" ) {
- (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "QWidget" ) );
+ (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) );
} else if ( n2.tagName() == "property" ) {
setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
}
@@ -1426,19 +1426,19 @@ void KommanderFactory::loadToolBars( const QDomElement &e )
}
}
-void KommanderFactory::loadMenuBar( const QDomElement &e )
+void KommanderFactory::loadMenuBar( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)toplevel );
- QMenuBar *mb = mw->menuBar();
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)toplevel );
+ TQMenuBar *mb = mw->menuBar();
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
- QPopupMenu *popup = new QPopupMenu( mw );
+ TQPopupMenu *popup = new TQPopupMenu( 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 = findAction( n2.attribute( "name" ) );
+ TQAction *a = findAction( n2.attribute( "name" ) );
if ( a )
a->addTo( popup );
} else if ( n2.tagName() == "separator" ) {
@@ -1455,27 +1455,27 @@ void KommanderFactory::loadMenuBar( const QDomElement &e )
}
-QAction *KommanderFactory::findAction( const QString &name )
+TQAction *KommanderFactory::findAction( const TQString &name )
{
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( QString( a->name() ) == name )
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( TQString( a->name() ) == name )
return a;
- QAction *ac = (QAction*)a->child( name.latin1(), "QAction" );
+ TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" );
if ( ac )
return ac;
}
return 0;
}
-void KommanderFactory::loadImages( const QString &dir )
+void KommanderFactory::loadImages( const TQString &dir )
{
- QDir d(dir);
- QStringList l = d.entryList(QDir::Files);
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it)
- QMimeSourceFactory::defaultFactory()->setPixmap(*it, QPixmap(d.path() + "/" + *it, "PNG"));
+ TQDir d(dir);
+ TQStringList l = d.entryList(TQDir::Files);
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
+ TQMimeSourceFactory::defaultFactory()->setPixmap(*it, TQPixmap(d.path() + "/" + *it, "PNG"));
}
-QString KommanderFactory::translate( const QString& sourceText, const QString& comment )
+TQString KommanderFactory::translate( const TQString& sourceText, const TQString& comment )
{
if (!sourceText.isEmpty() && !comment.isEmpty())
return KGlobal::locale()->translate(comment.utf8(), sourceText.utf8());
diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h
index 0b9a7eab..03861c85 100644
--- a/kommander/factory/kommanderfactory.h
+++ b/kommander/factory/kommanderfactory.h
@@ -22,13 +22,13 @@
#ifndef _HAVE_KOMMANDERFACTORY_H_
#define _HAVE_KOMMANDERFACTORY_H_
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qaction.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqaction.h>
#include "kommander_export.h"
class QWidget;
@@ -42,17 +42,17 @@ class KommanderPlugin;
struct KommanderWidgetInfo
{
KommanderWidgetInfo() {}
- KommanderWidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = FALSE )
+ KommanderWidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = FALSE )
: group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
{
}
- QString group;
- QString toolTip;
- QIconSet *iconSet;
- QString whatsThis;
+ TQString group;
+ TQString toolTip;
+ TQIconSet *iconSet;
+ TQString whatsThis;
bool isContainer;
};
-typedef QMap<QString, KommanderWidgetInfo> FeatureList;
+typedef TQMap<TQString, KommanderWidgetInfo> FeatureList;
class KOMMANDER_EXPORT KommanderFactory
{
@@ -60,42 +60,42 @@ public:
KommanderFactory();
virtual ~KommanderFactory();
- static QWidget *create( const QString &uiFile, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
- static QWidget *create( QIODevice *dev, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
static int loadPlugins( bool force = FALSE );
static void addPlugin( KommanderPlugin *plugin );
- static void loadImages( const QString &dir );
+ static void loadImages( const TQString &dir );
- static QWidget *createWidget( const QString &className, QWidget *parent, const char *name );
+ static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name );
static FeatureList featureList();
private:
enum LayoutType { HBox, VBox, Grid, NoLayout };
- void loadImageCollection( const QDomElement &e );
- void loadConnections( const QDomElement &e, QObject *connector );
- void loadTabOrder( const QDomElement &e );
- QWidget *createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg );
- QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
- LayoutType layoutType( QLayout *l ) const;
- void setProperty( QObject* widget, const QString &prop, const QDomElement &e );
- void createSpacer( const QDomElement &e, QLayout *layout );
- QImage loadFromCollection( const QString &name );
- QPixmap loadPixmap( const QDomElement &e );
- QColorGroup loadColorGroup( const QDomElement &e );
- void createColumn( const QDomElement &e, QWidget *widget );
- void loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap );
- void createItem( const QDomElement &e, QWidget *widget, QListViewItem *i = 0 );
- void loadChildAction( QObject *parent, const QDomElement &e );
- void loadActions( const QDomElement &e );
- void loadToolBars( const QDomElement &e );
- void loadMenuBar( const QDomElement &e );
- QAction *findAction( const QString &name );
- QString translate( const QString& sourceText, const QString& comment = "" );
+ void loadImageCollection( const TQDomElement &e );
+ void loadConnections( const TQDomElement &e, TQObject *connector );
+ void loadTabOrder( const TQDomElement &e );
+ TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
+ TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ LayoutType layoutType( TQLayout *l ) const;
+ void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );
+ void createSpacer( const TQDomElement &e, TQLayout *layout );
+ TQImage loadFromCollection( const TQString &name );
+ TQPixmap loadPixmap( const TQDomElement &e );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+ void createColumn( const TQDomElement &e, TQWidget *widget );
+ void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
+ void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+ void loadChildAction( TQObject *parent, const TQDomElement &e );
+ void loadActions( const TQDomElement &e );
+ void loadToolBars( const TQDomElement &e );
+ void loadMenuBar( const TQDomElement &e );
+ TQAction *findAction( const TQString &name );
+ TQString translate( const TQString& sourceText, const TQString& comment = "" );
private:
struct Image {
- QImage img;
- QString name;
+ TQImage img;
+ TQString name;
bool operator==( const Image &i ) const {
return ( i.name == name &&
i.img == img );
@@ -105,10 +105,10 @@ private:
struct Field
{
Field() {}
- Field( const QString &s1, const QPixmap &p, const QString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
- QString name;
- QPixmap pix;
- QString field;
+ Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
+ TQString name;
+ TQPixmap pix;
+ TQString field;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Field& ) const { return FALSE; }
#endif
@@ -117,41 +117,41 @@ private:
struct EventFunction
{
EventFunction() {}
- EventFunction( const QString &e, const QStringList &f )
+ EventFunction( const TQString &e, const TQStringList &f )
: events( e ) { functions.append( f ); }
- QStringList events;
- QValueList<QStringList> functions;
+ TQStringList events;
+ TQValueList<TQStringList> functions;
};
struct SqlWidgetConnection
{
SqlWidgetConnection() {}
- SqlWidgetConnection( const QString &c, const QString &t )
- : conn( c ), table( t ), dbControls( new QMap<QString, QString>() ) {}
- QString conn;
- QString table;
- QMap<QString, QString> *dbControls;
+ SqlWidgetConnection( const TQString &c, const TQString &t )
+ : conn( c ), table( t ), dbControls( new TQMap<TQString, TQString>() ) {}
+ TQString conn;
+ TQString table;
+ TQMap<TQString, TQString> *dbControls;
};
struct Functions
{
- QString functions;
+ TQString functions;
};
- QValueList<Image> images;
- QWidget *toplevel;
- QListViewItem *lastItem;
- QMap<QString, QString> *dbControls;
- QMap<QString, QStringList> dbTables;
- QMap<QWidget*, SqlWidgetConnection> sqlWidgetConnections;
- QMap<QString, QString> buddies;
- QMap<QTable*, QValueList<Field> > fieldMaps;
- QPtrList<QAction> actionList;
- QMap<QObject *, EventFunction> eventMap;
- QMap<QString, QString> languageSlots;
- QMap<QString, Functions*> languageFunctions;
- QStringList variables;
- QStringList noDatabaseWidgets;
+ TQValueList<Image> images;
+ TQWidget *toplevel;
+ TQListViewItem *lastItem;
+ TQMap<TQString, TQString> *dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQMap<TQWidget*, SqlWidgetConnection> sqlWidgetConnections;
+ TQMap<TQString, TQString> buddies;
+ TQMap<TQTable*, TQValueList<Field> > fieldMaps;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQObject *, EventFunction> eventMap;
+ TQMap<TQString, TQString> languageSlots;
+ TQMap<TQString, Functions*> languageFunctions;
+ TQStringList variables;
+ TQStringList noDatabaseWidgets;
bool usePixmapCollection;
int defMargin, defSpacing;