diff options
Diffstat (limited to 'kdevdesigner/uilib')
-rw-r--r-- | kdevdesigner/uilib/database.cpp | 46 | ||||
-rw-r--r-- | kdevdesigner/uilib/database2.h | 36 | ||||
-rw-r--r-- | kdevdesigner/uilib/qwidgetfactory.cpp | 1376 | ||||
-rw-r--r-- | kdevdesigner/uilib/qwidgetfactory.h | 190 |
4 files changed, 824 insertions, 824 deletions
diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp index a92a04c8..c9621604 100644 --- a/kdevdesigner/uilib/database.cpp +++ b/kdevdesigner/uilib/database.cpp @@ -37,10 +37,10 @@ #include "mainwindow.h" #endif -#include <qsqldatabase.h> -#include <qsqlform.h> -#include <qsqlcursor.h> -#include <qsqlrecord.h> +#include <tqsqldatabase.h> +#include <tqsqlform.h> +#include <tqsqlcursor.h> +#include <tqsqlrecord.h> DatabaseSupport::DatabaseSupport() { @@ -49,40 +49,40 @@ DatabaseSupport::DatabaseSupport() parent = 0; } -void DatabaseSupport::initPreview( const QString &connection, const QString &table, QObject *o, - const QMap<QString, QString> &databaseControls ) +void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap<TQString, TQString> &databaseControls ) { tbl = table; dbControls = databaseControls; parent = o; if ( connection != "(default)" ) - con = QSqlDatabase::database( connection ); + con = TQSqlDatabase::database( connection ); else - con = QSqlDatabase::database(); - frm = new QSqlForm( o, table ); - for ( QMap<QString, QString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - QObject *chld = parent->child( it.key(), "QWidget" ); + con = TQSqlDatabase::database(); + frm = new TQSqlForm( o, table ); + for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { + TQObject *chld = parent->child( it.key(), "TQWidget" ); if ( !chld ) continue; - frm->insert( (QWidget*)chld, *it ); + frm->insert( (TQWidget*)chld, *it ); } } -QDesignerDataBrowser::QDesignerDataBrowser( QWidget *parent, const char *name ) - : QDataBrowser( parent, name ) +QDesignerDataBrowser::QDesignerDataBrowser( TQWidget *parent, const char *name ) + : TQDataBrowser( parent, name ) { } -bool QDesignerDataBrowser::event( QEvent* e ) +bool QDesignerDataBrowser::event( TQEvent* e ) { - bool b = QDataBrowser::event( e ); + bool b = TQDataBrowser::event( e ); #if defined(DESIGNER) if ( MainWindow::self->isPreviewing() ) { #endif - if ( e->type() == QEvent::Show ) { + if ( e->type() == TQEvent::Show ) { if ( con ) { - QSqlCursor* cursor = new QSqlCursor( tbl, TRUE, con ); + TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); setSqlCursor( cursor, TRUE ); setForm( frm ); refresh(); @@ -96,18 +96,18 @@ bool QDesignerDataBrowser::event( QEvent* e ) return b; } -QDesignerDataView::QDesignerDataView( QWidget *parent, const char *name ) - : QDataView( parent, name ) +QDesignerDataView::QDesignerDataView( TQWidget *parent, const char *name ) + : TQDataView( parent, name ) { } -bool QDesignerDataView::event( QEvent* e ) +bool QDesignerDataView::event( TQEvent* e ) { - bool b = QDataView::event( e ); + bool b = TQDataView::event( e ); #if defined(DESIGNER) if ( MainWindow::self->isPreviewing() ) { #endif - if ( e->type() == QEvent::Show ) { + if ( e->type() == TQEvent::Show ) { setForm( frm ); readFields(); return TRUE; diff --git a/kdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h index 05a04712..2efc5c04 100644 --- a/kdevdesigner/uilib/database2.h +++ b/kdevdesigner/uilib/database2.h @@ -27,13 +27,13 @@ #ifndef DATABASE2_H #define DATABASE2_H -#include "qfeatures.h" +#include "tqfeatures.h" #ifndef QT_NO_SQL -#include <qdataview.h> -#include <qdatabrowser.h> -#include <qsqlcursor.h> -#include <qstring.h> +#include <tqdataview.h> +#include <tqdatabrowser.h> +#include <tqsqlcursor.h> +#include <tqstring.h> class QSqlDatabase; class QSqlForm; @@ -44,38 +44,38 @@ public: DatabaseSupport2(); virtual ~DatabaseSupport2() {} - void initPreview( const QString &connection, const QString &table, QObject *o, - const QMap<QString, QString> &databaseControls ); + void initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap<TQString, TQString> &databaseControls ); protected: - QSqlDatabase* con; - QSqlForm* frm; - QString tbl; - QMap<QString, QString> dbControls; - QObject *parent; + TQSqlDatabase* con; + TQSqlForm* frm; + TQString tbl; + TQMap<TQString, TQString> dbControls; + TQObject *parent; }; -class QDesignerDataBrowser2 : public QDataBrowser, public DatabaseSupport2 +class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2 { Q_OBJECT public: - QDesignerDataBrowser2( QWidget *parent, const char *name ); + QDesignerDataBrowser2( TQWidget *parent, const char *name ); protected: - bool event( QEvent* e ); + bool event( TQEvent* e ); }; -class QDesignerDataView2 : public QDataView, public DatabaseSupport2 +class QDesignerDataView2 : public TQDataView, public DatabaseSupport2 { Q_OBJECT public: - QDesignerDataView2( QWidget *parent, const char *name ); + QDesignerDataView2( TQWidget *parent, const char *name ); protected: - bool event( QEvent* e ); + bool event( TQEvent* e ); }; diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index 43c7c11e..b9a5211a 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -24,107 +24,107 @@ ** **********************************************************************/ -#include "qwidgetfactory.h" +#include "tqwidgetfactory.h" #include "../interfaces/languageinterface.h" #include "../interfaces/widgetinterface.h" -#include <qfeatures.h> +#include <tqfeatures.h> #include "database2.h" -#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 <uib.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> #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 <qtoolbox.h> -#include <qtextedit.h> -#include <qscrollbar.h> -#include <qmainwindow.h> -#include <qsplitter.h> -#include <qaction.h> -#include <qpopupmenu.h> -#include <qmenubar.h> -#include <qpopupmenu.h> -#include <qdatetimeedit.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qgrid.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 <tqtoolbox.h> +#include <tqtextedit.h> +#include <tqscrollbar.h> +#include <tqmainwindow.h> +#include <tqsplitter.h> +#include <tqaction.h> +#include <tqpopupmenu.h> +#include <tqmenubar.h> +#include <tqpopupmenu.h> +#include <tqdatetimeedit.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqgrid.h> #include <stdlib.h> class QWidgetFactoryPrivate { public: - QCString translationContext; - QListViewItem *lastItem; - QDict<bool> customWidgets; + TQCString translationContext; + TQListViewItem *lastItem; + TQDict<bool> customWidgets; }; -static QPtrList<QWidgetFactory> widgetFactories; +static TQPtrList<TQWidgetFactory> widgetFactories; static QPluginManager<LanguageInterface> *languageInterfaceManager = 0; static QPluginManager<WidgetInterface> *widgetInterfaceManager = 0; -static QMap<QString, bool> *availableWidgetMap = 0; -static QStringList *availableWidgetList = 0; +static TQMap<TQString, bool> *availableWidgetMap = 0; +static TQStringList *availableWidgetList = 0; -QMap<QWidget*, QString> *qwf_forms = 0; -QString *qwf_language = 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 = ""; -QObject *qwf_form_object = 0; -QString *qwf_plugin_dir = 0; +TQString qwf_currFileName = ""; +TQObject *qwf_form_object = 0; +TQString *qwf_plugin_dir = 0; static void setupPluginDir() { if ( !qwf_plugin_dir ) - qwf_plugin_dir = new QString( "/designer" ); + qwf_plugin_dir = new TQString( "/designer" ); } static void setupWidgetListAndMap() @@ -133,49 +133,49 @@ static void setupWidgetListAndMap() return; setupPluginDir(); availableWidgetList = new QStringList; - (*availableWidgetList) << "QPushButton" << "QToolButton" << "QCheckBox" << "QRadioButton" - << "QGroupBox" << "QButtonGroup" << "QIconView" << "QTable" - << "QListBox" << "QListView" << "QLineEdit" << "QSpinBox" - << "QMultiLineEdit" << "QLabel" << "TextLabel" << "PixmapLabel" - << "QLayoutWidget" << "QTabWidget" << "QComboBox" - << "QWidget" << "QDialog" << "QWizard" << "QLCDNumber"; + (*availableWidgetList) << "TQPushButton" << "TQToolButton" << "TQCheckBox" << "TQRadioButton" + << "TQGroupBox" << "TQButtonGroup" << "TQIconView" << "TQTable" + << "TQListBox" << "TQListView" << "TQLineEdit" << "TQSpinBox" + << "TQMultiLineEdit" << "TQLabel" << "TextLabel" << "PixmapLabel" + << "QLayoutWidget" << "TQTabWidget" << "TQComboBox" + << "TQWidget" << "TQDialog" << "TQWizard" << "TQLCDNumber"; // put less stress on the compiler by limiting the template nesting depth - (*availableWidgetList) << "QProgressBar" << "QTextView" << "QTextBrowser" - << "QDial" << "QSlider" << "QFrame" << "Line" << "QTextEdit" - << "QDateEdit" << "QTimeEdit" << "QDateTimeEdit" << "QScrollBar" - << "QPopupMenu" << "QWidgetStack" << "QMainWindow" - << "QDataTable" << "QDataBrowser" << "QDataView" - << "QVBox" << "QHBox" << "QGrid" << "QToolBox"; + (*availableWidgetList) << "TQProgressBar" << "TQTextView" << "TQTextBrowser" + << "TQDial" << "TQSlider" << "TQFrame" << "Line" << "TQTextEdit" + << "QDateEdit" << "QTimeEdit" << "QDateTimeEdit" << "TQScrollBar" + << "TQPopupMenu" << "TQWidgetStack" << "TQMainWindow" + << "TQDataTable" << "TQDataBrowser" << "TQDataView" + << "TQVBox" << "TQHBox" << "TQGrid" << "TQToolBox"; if ( !widgetInterfaceManager ) widgetInterfaceManager = - new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), *qwf_plugin_dir ); + new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir ); - QStringList l = widgetInterfaceManager->featureList(); - QStringList::Iterator it; + TQStringList l = widgetInterfaceManager->featureList(); + TQStringList::Iterator it; for ( it = l.begin(); it != l.end(); ++it ) (*availableWidgetList) << *it; - availableWidgetMap = new QMap<QString, bool>; + availableWidgetMap = new TQMap<TQString, bool>; for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it ) availableWidgetMap->insert( *it, TRUE ); } -static QImage loadImageData( const QString& format, ulong len, QByteArray data ) +static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data ) { - QImage img; + TQImage img; if ( format == "XPM.GZ" || format == "XBM.GZ" ) { if ( len < data.size() * 10 ) len = data.size() * 10; // qUncompress() expects the first 4 bytes to be the expected length of // the uncompressed data - QByteArray dataTmp( data.size() + 4 ); + TQByteArray dataTmp( data.size() + 4 ); memcpy( dataTmp.data()+4, data.data(), data.size() ); dataTmp[0] = ( len & 0xff000000 ) >> 24; dataTmp[1] = ( len & 0x00ff0000 ) >> 16; dataTmp[2] = ( len & 0x0000ff00 ) >> 8; dataTmp[3] = ( len & 0x000000ff ); - QByteArray baunzip = qUncompress( dataTmp ); + TQByteArray baunzip = qUncompress( dataTmp ); len = baunzip.size(); img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')) ); } else { @@ -184,22 +184,22 @@ static QImage loadImageData( const QString& format, ulong len, QByteArray data ) return img; } -static QSizePolicy::SizeType stringToSizeType( const QString& str ) +static TQSizePolicy::SizeType stringToSizeType( const TQString& str ) { if ( str == "Fixed" ) { - return QSizePolicy::Fixed; + return TQSizePolicy::Fixed; } else if ( str == "Minimum" ) { - return QSizePolicy::Minimum; + return TQSizePolicy::Minimum; } else if ( str == "Maximum" ) { - return QSizePolicy::Maximum; + return TQSizePolicy::Maximum; } else if ( str == "Preferred" ) { - return QSizePolicy::Preferred; + return TQSizePolicy::Preferred; } else if ( str == "MinimumExpanding" ) { - return QSizePolicy::MinimumExpanding; + return TQSizePolicy::MinimumExpanding; } else if ( str == "Expanding" ) { - return QSizePolicy::Expanding; + return TQSizePolicy::Expanding; } else { - return QSizePolicy::Ignored; + return TQSizePolicy::Ignored; } } @@ -207,7 +207,7 @@ static QSizePolicy::SizeType stringToSizeType( const QString& str ) /*! \class QWidgetFactory - \brief The QWidgetFactory class provides for the dynamic creation of widgets + \brief The TQWidgetFactory class provides for the dynamic creation of widgets from Qt Designer .ui files. This class basically offers two things: @@ -216,11 +216,11 @@ static QSizePolicy::SizeType stringToSizeType( const QString& str ) \i Dynamically creating widgets from \link designer-manual.book Qt Designer\endlink user interface description files. - You can do this using the static function QWidgetFactory::create(). + You can do this using the static function TQWidgetFactory::create(). This function also performs signal and slot connections, tab ordering, etc., as defined in the .ui file, and returns the top-level widget in the .ui file. After creating the widget you can - use QObject::child() and QObject::queryList() to access child + use TQObject::child() and TQObject::queryList() to access child widgets of this returned widget. \i Adding additional widget factories to be able to create custom @@ -239,9 +239,9 @@ static QSizePolicy::SizeType stringToSizeType( const QString& str ) Plugins documentation\endlink. */ -/*! Constructs a QWidgetFactory. */ +/*! Constructs a TQWidgetFactory. */ -QWidgetFactory::QWidgetFactory() +TQWidgetFactory::TQWidgetFactory() : d( new QWidgetFactoryPrivate() ), dbControls( 0 ), usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 ) { @@ -249,10 +249,10 @@ QWidgetFactory::QWidgetFactory() d->customWidgets.setAutoDelete( TRUE ); } -/*! \fn QWidgetFactory::~QWidgetFactory() +/*! \fn TQWidgetFactory::~TQWidgetFactory() Destructor. */ -QWidgetFactory::~QWidgetFactory() +TQWidgetFactory::~TQWidgetFactory() { delete d; } @@ -267,7 +267,7 @@ QWidgetFactory::~QWidgetFactory() ordering, etc., as described in the .ui file. In \e{Qt Designer} it is possible to add custom slots to a form and connect to them. If you want these connections to be made, you must create a class - derived from QObject, which implements all these slots. Then pass an + derived from TQObject, which implements all these slots. Then pass an instance of the object as \a connector to this function. If you do this, the connections to the custom slots will be done using the \a connector as slot. @@ -277,15 +277,15 @@ QWidgetFactory::~QWidgetFactory() The ownership of the returned widget is passed to the caller. */ -QWidget *QWidgetFactory::create( const QString &uiFile, QObject *connector, - QWidget *parent, const char *name ) +TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, + TQWidget *parent, const char *name ) { setupPluginDir(); - QFile f( uiFile ); + TQFile f( uiFile ); bool failed = FALSE; if ( !f.open( IO_ReadOnly ) ) failed = TRUE; - if ( failed && qApp->type() == QApplication::Tty ) { + if ( failed && qApp->type() == TQApplication::Tty ) { // for QSA: If we have no GUI, we have no form definition // files, but just the code. So try if only the code exists. f.setName( uiFile + ".qs" ); @@ -295,9 +295,9 @@ QWidget *QWidgetFactory::create( const QString &uiFile, QObject *connector, return 0; qwf_currFileName = uiFile; - QWidget *w = QWidgetFactory::create( &f, connector, parent, name ); + TQWidget *w = TQWidgetFactory::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; } @@ -308,22 +308,22 @@ QWidget *QWidgetFactory::create( const QString &uiFile, QObject *connector, Loads the user interface description from device \a dev. */ -QWidget *QWidgetFactory::create( QIODevice *dev, QObject *connector, QWidget *parent, const char *name ) +TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name ) { setupPluginDir(); - QWidget *w = 0; - QDomDocument doc; - QString errMsg; + TQWidget *w = 0; + TQDomDocument doc; + TQString errMsg; int errLine; - QWidgetFactory *widgetFactory = new QWidgetFactory; + TQWidgetFactory *widgetFactory = new QWidgetFactory; widgetFactory->toplevel = 0; // If we have no GUI, we only want to load the code - if ( qApp->type() != QApplication::Tty ) { - QIODevice::Offset start = dev->at(); + if ( qApp->type() != TQApplication::Tty ) { + TQIODevice::Offset start = dev->at(); Q_UINT32 magic; - QDataStream in( dev ); + TQDataStream in( dev ); in >> magic; if ( magic == UibMagic ) { w = widgetFactory->createFromUibFile( in, connector, parent, name ); @@ -333,7 +333,7 @@ QWidget *QWidgetFactory::create( QIODevice *dev, QObject *connector, QWidget *pa if ( doc.setContent( dev, &errMsg, &errLine ) ) { w = widgetFactory->createFromUiFile( doc, connector, parent, name ); } else { - // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine ); + // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); } } if ( !w ) { @@ -344,12 +344,12 @@ QWidget *QWidgetFactory::create( QIODevice *dev, QObject *connector, QWidget *pa if ( !languageInterfaceManager ) languageInterfaceManager = - new QPluginManager<LanguageInterface>( IID_Language, QApplication::libraryPaths(), *qwf_plugin_dir ); + new QPluginManager<LanguageInterface>( IID_Language, TQApplication::libraryPaths(), *qwf_plugin_dir ); widgetFactory->loadExtraSource(); 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() ) @@ -362,93 +362,93 @@ QWidget *QWidgetFactory::create( QIODevice *dev, QObject *connector, QWidget *pa cit.key(), *(*cit).dbControls ); } - for ( QMap<QString, QStringList>::Iterator it = widgetFactory->dbTables.begin(); + for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { - QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" ); + 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(); + for ( TQMap<TQString, TQString>::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" ); + 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; } -QWidget *QWidgetFactory::createFromUiFile( QDomDocument doc, QObject *connector, - QWidget *parent, const char *name ) +TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connector, + TQWidget *parent, const char *name ) { DomTool::fixDocument( doc ); uiFileVersion = doc.firstChild().toElement().attribute("version"); - 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 slots = e; + TQDomElement slots = e; while ( slots.tagName() != "slots" && !slots.isNull() ) slots = slots.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() == "class" ) { d->translationContext = e.firstChild().toText().data(); @@ -457,8 +457,8 @@ QWidget *QWidgetFactory::createFromUiFile( QDomDocument doc, QObject *connector, } else if ( e.tagName() == "pixmapinproject" ) { usePixmapCollection = TRUE; } else if ( e.tagName() == "layoutdefaults" ) { - defSpacing = e.attribute( "spacing", QString::number( defSpacing ) ).toInt(); - defMargin = e.attribute( "margin", QString::number( defMargin ) ).toInt(); + defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt(); + defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt(); } e = e.nextSibling().toElement(); } @@ -466,8 +466,8 @@ QWidget *QWidgetFactory::createFromUiFile( QDomDocument doc, QObject *connector, if ( !imageCollection.isNull() ) loadImageCollection( imageCollection ); - createWidgetInternal( widget, parent, 0, widget.attribute("class", "QWidget") ); - QWidget *w = toplevel; + createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") ); + TQWidget *w = toplevel; if ( !w ) return 0; @@ -494,7 +494,7 @@ QWidget *QWidgetFactory::createFromUiFile( QDomDocument doc, QObject *connector, return w; } -void QWidgetFactory::unpackUInt16( QDataStream& in, Q_UINT16& n ) +void TQWidgetFactory::unpackUInt16( TQDataStream& in, Q_UINT16& n ) { Q_UINT8 half; in >> half; @@ -505,7 +505,7 @@ void QWidgetFactory::unpackUInt16( QDataStream& in, Q_UINT16& n ) } } -void QWidgetFactory::unpackUInt32( QDataStream& in, Q_UINT32& n ) +void TQWidgetFactory::unpackUInt32( TQDataStream& in, Q_UINT32& n ) { Q_UINT16 half; in >> half; @@ -516,7 +516,7 @@ void QWidgetFactory::unpackUInt32( QDataStream& in, Q_UINT32& n ) } } -void QWidgetFactory::unpackByteArray( QDataStream& in, QByteArray& array ) +void TQWidgetFactory::unpackByteArray( TQDataStream& in, TQByteArray& array ) { Q_UINT32 size; unpackUInt32( in, size ); @@ -524,35 +524,35 @@ void QWidgetFactory::unpackByteArray( QDataStream& in, QByteArray& array ) in.readRawBytes( array.data(), size ); } -void QWidgetFactory::unpackCString( const UibStrTable& strings, QDataStream& in, - QCString& cstr ) +void TQWidgetFactory::unpackCString( const UibStrTable& strings, TQDataStream& in, + TQCString& cstr ) { Q_UINT32 n; unpackUInt32( in, n ); cstr = strings.asCString( n ); } -void QWidgetFactory::unpackString( const UibStrTable& strings, QDataStream& in, - QString& str ) +void TQWidgetFactory::unpackString( const UibStrTable& strings, TQDataStream& in, + TQString& str ) { Q_UINT32 n; unpackUInt32( in, n ); str = strings.asString( n ); } -void QWidgetFactory::unpackStringSplit( const UibStrTable& strings, - QDataStream& in, QString& str ) +void TQWidgetFactory::unpackStringSplit( const UibStrTable& strings, + TQDataStream& in, TQString& str ) { - QString remainder; + TQString remainder; unpackString( strings, in, str ); unpackString( strings, in, remainder ); str += remainder; } -void QWidgetFactory::unpackVariant( const UibStrTable& strings, QDataStream& in, - QVariant& value ) +void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& in, + TQVariant& value ) { - QString imageName; + TQString imageName; Q_UINT32 number; Q_UINT16 count; Q_UINT16 x; @@ -565,85 +565,85 @@ void QWidgetFactory::unpackVariant( const UibStrTable& strings, QDataStream& in, in >> type; switch ( type ) { - case QVariant::String: + case TQVariant::String: unpackString( strings, in, value.asString() ); break; - case QVariant::Pixmap: + case TQVariant::Pixmap: unpackString( strings, in, imageName ); if ( imageName.isEmpty() ) { - value.asPixmap() = QPixmap(); + value.asPixmap() = TQPixmap(); } else { value.asPixmap() = loadPixmap( imageName ); } break; - case QVariant::Image: + case TQVariant::Image: unpackString( strings, in, imageName ); if ( imageName.isEmpty() ) { - value.asImage() = QImage(); + value.asImage() = TQImage(); } else { value.asImage() = loadFromCollection( imageName ); } break; - case QVariant::IconSet: + case TQVariant::IconSet: unpackString( strings, in, imageName ); if ( imageName.isEmpty() ) { - value.asIconSet() = QIconSet(); + value.asIconSet() = TQIconSet(); } else { - value.asIconSet() = QIconSet( loadPixmap(imageName) ); + value.asIconSet() = TQIconSet( loadPixmap(imageName) ); } break; - case QVariant::StringList: + case TQVariant::StringList: unpackUInt16( in, count ); while ( count-- ) { - QString str; + TQString str; unpackString( strings, in, str ); value.asStringList().append( str ); } break; - case QVariant::Rect: + case TQVariant::Rect: unpackUInt16( in, x ); unpackUInt16( in, y ); unpackUInt16( in, width ); unpackUInt16( in, height ); - value = QRect( x, y, width, height ); + value = TQRect( x, y, width, height ); break; - case QVariant::Size: + case TQVariant::Size: unpackUInt16( in, width ); unpackUInt16( in, height ); - value = QSize( width, height ); + value = TQSize( width, height ); break; - case QVariant::Color: + case TQVariant::Color: in >> value.asColor(); break; - case QVariant::Point: + case TQVariant::Point: unpackUInt16( in, x ); unpackUInt16( in, y ); - value = QPoint( x, y ); + value = TQPoint( x, y ); break; - case QVariant::Int: + case TQVariant::Int: unpackUInt32( in, number ); value = (int) number; break; - case QVariant::Bool: + case TQVariant::Bool: in >> bit; - value = QVariant( bit != 0, 0 ); + value = TQVariant( bit != 0, 0 ); break; - case QVariant::Double: + case TQVariant::Double: in >> value.asDouble(); break; - case QVariant::CString: + case TQVariant::CString: unpackCString( strings, in, value.asCString() ); break; - case QVariant::Cursor: + case TQVariant::Cursor: in >> value.asCursor(); break; - case QVariant::Date: + case TQVariant::Date: in >> value.asDate(); break; - case QVariant::Time: + case TQVariant::Time: in >> value.asTime(); break; - case QVariant::DateTime: + case TQVariant::DateTime: in >> value.asDateTime(); break; default: @@ -651,13 +651,13 @@ void QWidgetFactory::unpackVariant( const UibStrTable& strings, QDataStream& in, } } -void QWidgetFactory::inputSpacer( const UibStrTable& strings, QDataStream& in, - QLayout *parent ) +void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, + TQLayout *parent ) { - QCString name; - QVariant value; - QCString comment; - QSizePolicy::SizeType sizeType = QSizePolicy::Preferred; + TQCString name; + TQVariant value; + TQCString comment; + TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; bool vertical = FALSE; int w = 0; int h = 0; @@ -696,15 +696,15 @@ void QWidgetFactory::inputSpacer( const UibStrTable& strings, QDataStream& in, } if ( parent != 0 ) { - QSpacerItem *spacer; + TQSpacerItem *spacer; if ( vertical ) { - spacer = new QSpacerItem( w, h, QSizePolicy::Minimum, sizeType ); + spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType ); } else { - spacer = new QSpacerItem( w, h, sizeType, QSizePolicy::Minimum ); + spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); } - if ( parent->inherits("QGridLayout") ) { - ((QGridLayout *) parent)->addMultiCell( spacer, row, + if ( parent->inherits("TQGridLayout") ) { + ((TQGridLayout *) parent)->addMultiCell( spacer, row, row + rowspan - 1, column, column + colspan - 1, vertical ? Qt::AlignHCenter : Qt::AlignVCenter ); } else { @@ -713,20 +713,20 @@ void QWidgetFactory::inputSpacer( const UibStrTable& strings, QDataStream& in, } } -void QWidgetFactory::inputColumnOrRow( const UibStrTable& strings, - QDataStream& in, QObject *parent, +void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, + TQDataStream& in, TQObject *parent, bool isRow ) { - QString text; - QPixmap pixmap; - QString field; + TQString text; + TQPixmap pixmap; + TQString field; bool clickable = TRUE; bool resizable = TRUE; - QCString name; - QVariant value; - QCString comment; - QString str; + TQCString name; + TQVariant value; + TQCString comment; + TQString str; Q_UINT8 objectTag; in >> objectTag; @@ -763,37 +763,37 @@ void QWidgetFactory::inputColumnOrRow( const UibStrTable& strings, } if ( parent != 0 ) { - if ( parent->inherits("QListView") ) { - createListViewColumn( (QListView *) parent, text, pixmap, clickable, + if ( parent->inherits("TQListView") ) { + createListViewColumn( (TQListView *) parent, text, pixmap, clickable, resizable ); #ifndef QT_NO_TABLE - } else if ( parent->inherits("QTable") ) { - createTableColumnOrRow( (QTable *) parent, text, pixmap, field, + } else if ( parent->inherits("TQTable") ) { + createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, isRow ); #endif } } } -void QWidgetFactory::inputItem( const UibStrTable& strings, QDataStream& in, - QObject *parent, QListViewItem *parentItem ) +void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, TQListViewItem *parentItem ) { - QStringList texts; - QValueList<QPixmap> pixmaps; - QCString name; - QVariant value; - QCString comment; + TQStringList texts; + TQValueList<TQPixmap> pixmaps; + TQCString name; + TQVariant value; + TQCString comment; Q_UINT8 objectTag; - QListView *listView = 0; - if ( parent != 0 && parent->inherits("QListView") ) - parent = (QListView *) parent; - QListViewItem *item = 0; + TQListView *listView = 0; + if ( parent != 0 && parent->inherits("TQListView") ) + parent = (TQListView *) parent; + TQListViewItem *item = 0; if ( listView != 0 ) { if ( parentItem == 0 ) { - item = new QListViewItem( listView, d->lastItem ); + item = new TQListViewItem( listView, d->lastItem ); } else { - item = new QListViewItem( parentItem, d->lastItem ); + item = new TQListViewItem( parentItem, d->lastItem ); } d->lastItem = item; } @@ -829,7 +829,7 @@ void QWidgetFactory::inputItem( const UibStrTable& strings, QDataStream& in, if ( listView != 0 ) { int i = 0; - QStringList::ConstIterator t = texts.begin(); + TQStringList::ConstIterator t = texts.begin(); while ( t != texts.end() ) { item->setText( i, *t ); ++i; @@ -837,57 +837,57 @@ void QWidgetFactory::inputItem( const UibStrTable& strings, QDataStream& in, } int j = 0; - QValueList<QPixmap>::ConstIterator p = pixmaps.begin(); + TQValueList<TQPixmap>::ConstIterator p = pixmaps.begin(); while ( p != pixmaps.end() ) { item->setPixmap( j, *p ); ++j; ++p; } } else { - QString text = texts.last(); - QPixmap pixmap = pixmaps.last(); + TQString text = texts.last(); + TQPixmap pixmap = pixmaps.last(); if ( parent != 0 ) { - if ( parent->inherits("QComboBox") || - parent->inherits("QListBox") ) { - QListBox *listBox = (QListBox *) parent->qt_cast( "QListBox" ); + if ( parent->inherits("TQComboBox") || + parent->inherits("TQListBox") ) { + TQListBox *listBox = (TQListBox *) parent->qt_cast( "TQListBox" ); if ( listBox == 0 ) - listBox = ((QComboBox *) parent)->listBox(); + listBox = ((TQComboBox *) parent)->listBox(); if ( pixmap.isNull() ) { - (void) new QListBoxText( listBox, text ); + (void) new TQListBoxText( listBox, text ); } else { - (void) new QListBoxPixmap( listBox, pixmap, text ); + (void) new TQListBoxPixmap( listBox, pixmap, text ); } #ifndef QT_NO_ICONVIEW - } else if ( parent->inherits("QIconView") ) { - (void) new QIconViewItem( (QIconView *) parent, text, pixmap ); + } else if ( parent->inherits("TQIconView") ) { + (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); #endif } } } } -void QWidgetFactory::inputMenuItem( QObject **objects, - const UibStrTable& strings, QDataStream& in, - QMenuBar *menuBar ) +void TQWidgetFactory::inputMenuItem( TQObject **objects, + const UibStrTable& strings, TQDataStream& in, + TQMenuBar *menuBar ) { - QCString name; - QCString text; + TQCString name; + TQCString text; Q_UINT16 actionNo; Q_UINT8 objectTag; unpackCString( strings, in, name ); unpackCString( strings, in, text ); - QPopupMenu *popupMenu = new QPopupMenu( menuBar->parentWidget(), name ); + TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->parentWidget(), name ); in >> objectTag; while ( !in.atEnd() && objectTag != Object_End ) { switch ( objectTag ) { case Object_ActionRef: unpackUInt16( in, actionNo ); - ((QAction *) objects[actionNo])->addTo( popupMenu ); + ((TQAction *) objects[actionNo])->addTo( popupMenu ); break; case Object_Separator: popupMenu->insertSeparator(); @@ -900,65 +900,65 @@ void QWidgetFactory::inputMenuItem( QObject **objects, menuBar->insertItem( translate(text.data()), popupMenu ); } -QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, +TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, const UibStrTable& strings, - QDataStream& in, QWidget *ancestorWidget, - QObject *parent, QCString className ) + TQDataStream& in, TQWidget *ancestorWidget, + TQObject *parent, TQCString className ) { - QObject *obj = 0; - QWidget *widget = 0; - QLayout *layout = 0; - QWidget *parentWidget = 0; - QLayout *parentLayout = 0; + TQObject *obj = 0; + TQWidget *widget = 0; + TQLayout *layout = 0; + TQWidget *parentWidget = 0; + TQLayout *parentLayout = 0; bool isQObject = !className.isEmpty(); if ( isQObject ) { if ( parent != 0 ) { if ( parent->isWidgetType() ) { - if ( parent->inherits("QMainWindow") ) { - parentWidget = ((QMainWindow *) parent)->centralWidget(); + if ( parent->inherits("TQMainWindow") ) { + parentWidget = ((TQMainWindow *) parent)->centralWidget(); } else { - parentWidget = (QWidget *) parent; + parentWidget = (TQWidget *) parent; } - } else if ( parent->inherits("QLayout") ) { - parentLayout = (QLayout *) parent; + } else if ( parent->inherits("TQLayout") ) { + parentLayout = (TQLayout *) parent; parentWidget = ancestorWidget; } } - if ( className == "QAction" ) { + if ( className == "TQAction" ) { unpackCString( strings, in, className ); - if ( className == "QActionGroup" ) { - obj = new QActionGroup( parent ); + if ( className == "TQActionGroup" ) { + obj = new TQActionGroup( parent ); } else { - obj = new QAction( parent ); + obj = new TQAction( parent ); } - } else if ( className == "QLayout" ) { + } else if ( className == "TQLayout" ) { unpackCString( strings, in, className ); LayoutType type = Grid; - if ( className == "QHBoxLayout" ) { + if ( className == "TQHBoxLayout" ) { type = HBox; - } else if ( className == "QVBoxLayout" ) { + } else if ( className == "TQVBoxLayout" ) { type = VBox; } - if ( parentLayout != 0 && parentLayout->inherits("QGridLayout") ) { + if ( parentLayout != 0 && parentLayout->inherits("TQGridLayout") ) { layout = createLayout( 0, 0, type ); } else { layout = createLayout( parentWidget, parentLayout, type ); } obj = layout; - } else if ( className == "QMenuBar" ) { + } else if ( className == "TQMenuBar" ) { unpackCString( strings, in, className ); - widget = ((QMainWindow *) parent)->menuBar(); + widget = ((TQMainWindow *) parent)->menuBar(); obj = widget; - } else if ( className == "QToolBar" ) { + } else if ( className == "TQToolBar" ) { Q_UINT8 dock; in >> dock; unpackCString( strings, in, className ); - widget = new QToolBar( QString::null, (QMainWindow *) parent, + widget = new TQToolBar( TQString::null, (TQMainWindow *) parent, (Qt::Dock) dock ); obj = widget; - } else if ( className == "QWidget" ) { + } else if ( className == "TQWidget" ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); obj = widget; @@ -970,10 +970,10 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, objects[numObjects++] = obj; } - QCString name; - QVariant value; - QCString comment; - QString str; + TQCString name; + TQVariant value; + TQCString comment; + TQString str; Q_UINT16 actionNo; int metAttribute = 0; Q_UINT16 column = 0; @@ -988,7 +988,7 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, switch ( objectTag ) { case Object_ActionRef: unpackUInt16( in, actionNo ); - ((QAction *) objects[actionNo])->addTo( (QToolBar *) widget ); + ((TQAction *) objects[actionNo])->addTo( (TQToolBar *) widget ); break; case Object_Attribute: metAttribute = 2; @@ -1003,8 +1003,8 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, break; case Object_FontProperty: { - QFont font; - QString family; + TQFont font; + TQString family; Q_UINT16 pointSize; Q_UINT8 fontFlags; @@ -1042,13 +1042,13 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, inputItem( strings, in, obj ); break; case Object_MenuItem: - inputMenuItem( objects, strings, in, (QMenuBar *) widget ); + inputMenuItem( objects, strings, in, (TQMenuBar *) widget ); break; case Object_PaletteProperty: { - QPalette palette; - QColorGroup colorGroup; - QColor color; + TQPalette palette; + TQColorGroup colorGroup; + TQColor color; int role = -1; unpackCString( strings, in, name ); @@ -1071,13 +1071,13 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, case Palette_Color: role++; in >> color; - colorGroup.setColor( (QColorGroup::ColorRole) role, + colorGroup.setColor( (TQColorGroup::ColorRole) role, color ); break; case Palette_Pixmap: unpackVariant( strings, in, value ); - colorGroup.setBrush( (QColorGroup::ColorRole) role, - QBrush(color, value.asPixmap()) ); + colorGroup.setBrush( (TQColorGroup::ColorRole) role, + TQBrush(color, value.asPixmap()) ); break; default: qFatal( "Corrupt" ); @@ -1095,19 +1095,19 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, inputSpacer( strings, in, layout ); break; case Object_Separator: - ((QToolBar *) widget)->addSeparator(); + ((TQToolBar *) widget)->addSeparator(); break; case Object_SubAction: inputObject( objects, numObjects, strings, in, parentWidget, - obj != 0 ? obj : parent, "QAction" ); + obj != 0 ? obj : parent, "TQAction" ); break; case Object_SubLayout: inputObject( objects, numObjects, strings, in, parentWidget, obj, - "QLayout" ); + "TQLayout" ); break; case Object_SubWidget: inputObject( objects, numObjects, strings, in, parentWidget, obj, - "QWidget" ); + "TQWidget" ); break; case Object_TextProperty: unpackCString( strings, in, name ); @@ -1118,10 +1118,10 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "title" ) { if ( parent != 0 ) { - if ( parent->inherits("QTabWidget") ) { - ((QTabWidget *) parent)->insertTab( widget, str ); - } else if ( parent->inherits("QWizard") ) { - ((QWizard *) parent)->addPage( widget, str ); + if ( parent->inherits("TQTabWidget") ) { + ((TQTabWidget *) parent)->insertTab( widget, str ); + } else if ( parent->inherits("TQWizard") ) { + ((TQWizard *) parent)->addPage( widget, str ); } } } @@ -1136,8 +1136,8 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "id" ) { - if ( parent != 0 && parent->inherits("QWidgetStack") ) - ((QWidgetStack *) parent)->addWidget( widget, value.toInt() ); + if ( parent != 0 && parent->inherits("TQWidgetStack") ) + ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); } } else { if ( obj != 0 ) @@ -1153,16 +1153,16 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, if ( parentLayout != 0 ) { if ( widget != 0 ) { - if ( parentLayout->inherits("QGridLayout") ) { - ((QGridLayout *) parentLayout)->addMultiCellWidget( + if ( parentLayout->inherits("TQGridLayout") ) { + ((TQGridLayout *) parentLayout)->addMultiCellWidget( widget, row, row + rowspan - 1, column, column + colspan - 1 ); } else { - ((QBoxLayout *) parentLayout)->addWidget( widget ); + ((TQBoxLayout *) parentLayout)->addWidget( widget ); } } else if ( layout != 0 ) { - if ( parentLayout->inherits("QGridLayout") ) { - ((QGridLayout *) parentLayout)->addMultiCellLayout( + if ( parentLayout->inherits("TQGridLayout") ) { + ((TQGridLayout *) parentLayout)->addMultiCellLayout( layout, row, row + rowspan - 1, column, column + colspan - 1 ); } @@ -1171,8 +1171,8 @@ QObject *QWidgetFactory::inputObject( QObject **objects, int& numObjects, return obj; } -QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, - QObject * /* connector */ , QWidget *parent, const char *name ) +TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, + TQObject * /* connector */ , TQWidget *parent, const char *name ) { #define END_OF_BLOCK() \ ( in.atEnd() || in.device()->at() >= nextBlock ) @@ -1195,7 +1195,7 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, in.setVersion( qdatastreamVersion ); UibStrTable strings; - QObject **objects = 0; + TQObject **objects = 0; int numObjects = 0; Q_UINT8 blockType; @@ -1204,7 +1204,7 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, in >> blockType; while ( !in.atEnd() && blockType != Block_End ) { unpackUInt32( in, blockSize ); - QIODevice::Offset nextBlock = in.device()->at() + blockSize; + TQIODevice::Offset nextBlock = in.device()->at() + blockSize; switch ( blockType ) { case Block_Actions: @@ -1218,20 +1218,20 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, do { unpackUInt16( in, labelNo ); unpackUInt16( in, buddyNo ); - QLabel *label = - (QLabel *) objects[labelNo]->qt_cast( "QLabel" ); + TQLabel *label = + (TQLabel *) objects[labelNo]->qt_cast( "TQLabel" ); if ( label != 0 ) - label->setBuddy( (QWidget *) objects[buddyNo] ); + label->setBuddy( (TQWidget *) objects[buddyNo] ); } while ( !END_OF_BLOCK() ); } break; case Block_Connections: { - QString language = "C++"; + TQString language = "C++"; Q_UINT16 senderNo = 0; - QString signal = "clicked()"; + TQString signal = "clicked()"; Q_UINT16 receiverNo = 0; - QString slot = "accept()"; + TQString slot = "accept()"; Q_UINT8 connectionFlags; do { @@ -1262,9 +1262,9 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, break; case Block_Images: { - QString format; + TQString format; Q_UINT32 length; - QByteArray data; + TQByteArray data; Image image; do { @@ -1296,17 +1296,17 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, defMargin = defaultMargin; if ( defaultSpacing != -32768 ) defSpacing = defaultSpacing; - objects = new QObject *[maxObjects]; + objects = new TQObject *[maxObjects]; } break; case Block_Menubar: inputObject( objects, numObjects, strings, in, toplevel, toplevel, - "QMenuBar" ); + "TQMenuBar" ); break; case Block_Slots: { - QString language; - QString slot; + TQString language; + TQString slot; do { unpackString( strings, in, language ); @@ -1325,8 +1325,8 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, unpackUInt16( in, beforeNo ); while ( !END_OF_BLOCK() ) { unpackUInt16( in, afterNo ); - toplevel->setTabOrder( (QWidget *) objects[beforeNo], - (QWidget *) objects[afterNo] ); + toplevel->setTabOrder( (TQWidget *) objects[beforeNo], + (TQWidget *) objects[afterNo] ); beforeNo = afterNo; } } @@ -1334,7 +1334,7 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - toplevel, "QToolBar" ); + toplevel, "TQToolBar" ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1343,9 +1343,9 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, in.device()->at( nextBlock ); break; case Block_Widget: - toplevel = (QWidget *) + toplevel = (TQWidget *) inputObject( objects, numObjects, strings, in, toplevel, parent, - "QWidget" ); + "TQWidget" ); if ( toplevel != 0 ) toplevel->setName( name ); break; @@ -1360,11 +1360,11 @@ QWidget *QWidgetFactory::createFromUibFile( QDataStream& in, } /*! Installs a widget factory \a factory, which normally contains - additional widgets that can then be created using a QWidgetFactory. + additional widgets that can then be created using a TQWidgetFactory. See createWidget() for further details. */ -void QWidgetFactory::addWidgetFactory( QWidgetFactory *factory ) +void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory ) { widgetFactories.append( factory ); } @@ -1388,136 +1388,136 @@ void QWidgetFactory::addWidgetFactory( QWidgetFactory *factory ) \list 1 \i Write a widget plugin. This allows you to use the widget in - \e{Qt Designer} and in this QWidgetFactory. See the widget plugin + \e{Qt Designer} and in this TQWidgetFactory. See the widget plugin documentation for further details. (See the "Creating Custom Widgets with Plugins" section of the \link designer-manual.book Qt Designer manual\endlink for an example. - \i Subclass QWidgetFactory. Then reimplement this function to + \i Subclass TQWidgetFactory. Then reimplement this function to create and return an instance of your custom widget if \a className equals the name of your widget, otherwise return 0. Then at the beginning of your program where you want to use the widget factory to create widgets do a: \code - QWidgetFactory::addWidgetFactory( new MyWidgetFactory ); + TQWidgetFactory::addWidgetFactory( new MyWidgetFactory ); \endcode - where MyWidgetFactory is your QWidgetFactory subclass. + where MyWidgetFactory is your TQWidgetFactory subclass. \endlist */ -QWidget *QWidgetFactory::createWidget( const QString &className, QWidget *parent, +TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const { // 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" || className == "TextLabel" || className == "PixmapLabel" ) { - 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" || className == "TextLabel" || className == "PixmapLabel" ) { + 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 ); - } else if ( className == "QDialog" ) { + return new TQWidget( parent, name ); + return new TQWidget( parent, name, Qt::WStyle_StaysOnTop ); + } else if ( className == "TQDialog" ) { if ( !qwf_stays_on_top ) - return new QDialog( parent, name ); - return new QDialog( 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 ); + return new TQDialog( parent, name ); + return new TQDialog( parent, name, FALSE, Qt::WStyle_StaysOnTop ); + } 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 == "QToolBox" ) { - return new QToolBox( parent, name ); - } else if ( className == "QVBox" ) { - return new QVBox( parent, name ); - } else if ( className == "QHBox" ) { - return new QHBox( parent, name ); - } else if ( className == "QGrid" ) { - return new QGrid( 4, parent, name ); - } else if ( className == "QMainWindow" ) { - QMainWindow *mw = 0; + } 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 == "TQToolBox" ) { + return new TQToolBox( parent, name ); + } else if ( className == "TQVBox" ) { + return new TQVBox( parent, name ); + } else if ( className == "TQHBox" ) { + return new TQHBox( parent, name ); + } else if ( className == "TQGrid" ) { + return new TQGrid( 4, parent, name ); + } else if ( className == "TQMainWindow" ) { + TQMainWindow *mw = 0; if ( !qwf_stays_on_top ) - mw = new QMainWindow( parent, name ); + mw = new TQMainWindow( parent, name ); else - mw = new QMainWindow( parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop ); - mw->setCentralWidget( new QWidget( mw, "qt_central_widget" ) ); + mw = new TQMainWindow( parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop ); + 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 @@ -1526,13 +1526,13 @@ QWidget *QWidgetFactory::createWidget( const QString &className, QWidget *parent // try to create it using the loaded widget plugins if ( !widgetInterfaceManager ) widgetInterfaceManager = - new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), + new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir ); QInterfacePtr<WidgetInterface> iface = 0; widgetInterfaceManager->queryInterface( className, &iface ); if ( iface ) { - QWidget *w = iface->create( className, parent, name ); + TQWidget *w = iface->create( className, parent, name ); if ( w ) { d->customWidgets.replace( className.latin1(), new bool(TRUE) ); return w; @@ -1540,8 +1540,8 @@ QWidget *QWidgetFactory::createWidget( const QString &className, QWidget *parent } // hope we have a factory which can do it - for ( QWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) { - QWidget *w = f->createWidget( className, parent, name ); + for ( TQWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) { + TQWidget *w = f->createWidget( className, parent, name ); if ( w ) return w; } @@ -1552,7 +1552,7 @@ QWidget *QWidgetFactory::createWidget( const QString &className, QWidget *parent /*! Returns the names of the widgets, which this facory can create. */ -QStringList QWidgetFactory::widgets() +TQStringList TQWidgetFactory::widgets() { setupWidgetListAndMap(); return *availableWidgetList; @@ -1561,21 +1561,21 @@ QStringList QWidgetFactory::widgets() /*! Returns whether this widget factory can create the widget \a widget */ -bool QWidgetFactory::supportsWidget( const QString &widget ) +bool TQWidgetFactory::supportsWidget( const TQString &widget ) { setupWidgetListAndMap(); return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() ); } -QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *parent, - QLayout* layout, const QString &classNameArg ) +TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, + TQLayout* layout, const TQString &classNameArg ) { d->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(); @@ -1590,31 +1590,31 @@ QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *pa if ( !className.isEmpty() ) { if ( !layout && className == "QLayoutWidget" ) { - className = "QWidget"; + className = "TQWidget"; isQLayoutWidget = TRUE; } if ( layout && className == "QLayoutWidget" ) { // hide layout widgets w = parent; } else { - obj = QWidgetFactory::createWidget( className, parent, 0 ); + obj = TQWidgetFactory::createWidget( className, parent, 0 ); if ( !obj ) 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: @@ -1626,7 +1626,7 @@ QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *pa } } #ifdef QT_CONTAINER_CUSTOM_WIDGETS - QString parentClassName = parent ? parent->className() : 0; + TQString parentClassName = parent ? parent->className() : 0; bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE; if ( isPlugin ) qWarning( "####### loading custom container widgets without page support not implemented!" ); @@ -1638,63 +1638,63 @@ QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *pa 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" ) ) - layout = createLayout( 0, 0, QWidgetFactory::HBox, isQLayoutWidget ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) + layout = createLayout( 0, 0, TQWidgetFactory::HBox, isQLayoutWidget ); else - layout = createLayout( w, layout, QWidgetFactory::HBox, isQLayoutWidget ); + layout = createLayout( w, layout, TQWidgetFactory::HBox, isQLayoutWidget ); obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( "QGridLayout" ) ) - ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + 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" ) ) - layout = createLayout( 0, 0, QWidgetFactory::Grid, isQLayoutWidget ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) + layout = createLayout( 0, 0, TQWidgetFactory::Grid, isQLayoutWidget ); else - layout = createLayout( w, layout, QWidgetFactory::Grid, isQLayoutWidget ); + layout = createLayout( w, layout, TQWidgetFactory::Grid, isQLayoutWidget ); obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( "QGridLayout" ) ) - ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + 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" ) ) - layout = createLayout( 0, 0, QWidgetFactory::VBox, isQLayoutWidget ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) + layout = createLayout( 0, 0, TQWidgetFactory::VBox, isQLayoutWidget ); else - layout = createLayout( w, layout, QWidgetFactory::VBox, isQLayoutWidget ); + layout = createLayout( w, layout, TQWidgetFactory::VBox, isQLayoutWidget ); obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( "QGridLayout" ) ) - ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + 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() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( parent ) { - if ( parent->inherits( "QTabWidget" ) ) { + if ( parent->inherits( "TQTabWidget" ) ) { if ( attrib == "title" ) - ( (QTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); - } else if ( parent->inherits( "QWidgetStack" ) ) { + ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); + } else if ( parent->inherits( "TQWidgetStack" ) ) { if ( attrib == "id" ) - ( (QWidgetStack*)parent )->addWidget( w, v.toInt() ); - } else if ( parent->inherits( "QToolBox" ) ) { + ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() ); + } else 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, translate( v.toString() ) ); + ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) ); #ifdef QT_CONTAINER_CUSTOM_WIDGETS } else if ( isPlugin ) { if ( attrib == "label" ) { @@ -1706,7 +1706,7 @@ QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *pa (QUnknownInterface**)&iface2 ); if ( iface2 ) { iface2->insertPage( parentClassName, - (QWidget*)parent, translate( v.toString() ), -1, w ); + (TQWidget*)parent, translate( v.toString() ), -1, w ); iface2->release(); } iface->release(); @@ -1728,7 +1728,7 @@ QWidget *QWidgetFactory::createWidgetInternal( const QDomElement &e, QWidget *pa return w; } -QLayout *QWidgetFactory::createLayout( QWidget *widget, QLayout* layout, +TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isQLayoutWidget ) { int spacing = defSpacing; @@ -1737,22 +1737,22 @@ QLayout *QWidgetFactory::createLayout( QWidget *widget, QLayout* layout, if ( layout || !widget || isQLayoutWidget ) margin = 0; - if ( !layout && widget && widget->inherits( "QTabWidget" ) ) - widget = ((QTabWidget*)widget)->currentPage(); + if ( !layout && widget && widget->inherits( "TQTabWidget" ) ) + widget = ((TQTabWidget*)widget)->currentPage(); - 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( "QToolBox" ) ) - widget = ((QToolBox*)widget)->currentItem(); + if ( !layout && widget && widget->inherits( "TQToolBox" ) ) + widget = ((TQToolBox*)widget)->currentItem(); - QLayout *l = 0; + TQLayout *l = 0; int align = 0; - 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 ); layout = gb->layout(); layout->setMargin( 0 ); @@ -1762,13 +1762,13 @@ QLayout *QWidgetFactory::createLayout( QWidget *widget, QLayout* layout, if ( layout ) { switch ( type ) { case HBox: - l = new QHBoxLayout( layout ); + l = new TQHBoxLayout( layout ); break; case VBox: - l = new QVBoxLayout( layout ); + l = new TQVBoxLayout( layout ); break; case Grid: - l = new QGridLayout( layout ); + l = new TQGridLayout( layout ); break; default: return 0; @@ -1776,13 +1776,13 @@ QLayout *QWidgetFactory::createLayout( QWidget *widget, QLayout* layout, } else { switch ( type ) { case HBox: - l = new QHBoxLayout( widget ); + l = new TQHBoxLayout( widget ); break; case VBox: - l = new QVBoxLayout( widget ); + l = new TQVBoxLayout( widget ); break; case Grid: - l = new QGridLayout( widget ); + l = new TQGridLayout( widget ); break; default: return 0; @@ -1794,19 +1794,19 @@ QLayout *QWidgetFactory::createLayout( QWidget *widget, QLayout* layout, return l; } -QWidgetFactory::LayoutType QWidgetFactory::layoutType( QLayout *layout ) const +TQWidgetFactory::LayoutType TQWidgetFactory::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 QWidgetFactory::setProperty( QObject* obj, const QString &prop, - QVariant value ) +void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, + TQVariant value ) { int offset = obj->metaObject()->findProperty( prop, TRUE ); @@ -1816,24 +1816,24 @@ void QWidgetFactory::setProperty( QObject* obj, const QString &prop, } else if ( prop == "accel" ) { obj->setProperty( prop, value.toKeySequence() ); } else { - if ( value.type() == QVariant::String || - value.type() == QVariant::CString ) { - const QMetaProperty *metaProp = + if ( value.type() == TQVariant::String || + value.type() == TQVariant::CString ) { + const TQMetaProperty *metaProp = obj->metaObject()->property( offset, TRUE ); if ( metaProp != 0 && metaProp->isEnumType() ) { if ( metaProp->isSetType() ) { - QStrList flagsCStr; - QStringList flagsStr = - QStringList::split( '|', value.asString() ); - QStringList::ConstIterator f = flagsStr.begin(); + TQStrList flagsCStr; + TQStringList flagsStr = + TQStringList::split( '|', value.asString() ); + TQStringList::ConstIterator f = flagsStr.begin(); while ( f != flagsStr.end() ) { flagsCStr.append( *f ); ++f; } - value = QVariant( metaProp->keysToValue(flagsCStr) ); + value = TQVariant( metaProp->keysToValue(flagsCStr) ); } else { - QCString key = value.toCString(); - value = QVariant( metaProp->keyToValue(key) ); + TQCString key = value.toCString(); + value = TQVariant( metaProp->keyToValue(key) ); } } } @@ -1843,19 +1843,19 @@ void QWidgetFactory::setProperty( QObject* obj, const QString &prop, if ( obj->isWidgetType() ) { if ( prop == "toolTip" ) { if ( !value.toString().isEmpty() ) - QToolTip::add( (QWidget*)obj, translate( value.toString() ) ); + TQToolTip::add( (TQWidget*)obj, translate( value.toString() ) ); } else if ( prop == "whatsThis" ) { if ( !value.toString().isEmpty() ) - QWhatsThis::add( (QWidget*)obj, translate( value.toString() ) ); + TQWhatsThis::add( (TQWidget*)obj, translate( value.toString() ) ); } else if ( prop == "buddy" ) { buddies.insert( obj->name(), value.toCString() ); } else if ( prop == "buttonGroupId" ) { - if ( obj->inherits( "QButton" ) && obj->parent()->inherits( "QButtonGroup" ) ) - ( (QButtonGroup*)obj->parent() )->insert( (QButton*)obj, value.toInt() ); + if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) ) + ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() ); #ifndef QT_NO_SQL - } else if ( prop == "database" && !obj->inherits( "QDataView" ) - && !obj->inherits( "QDataBrowser" ) ) { - const QStringList& lst = value.asStringList(); + } else if ( prop == "database" && !obj->inherits( "TQDataView" ) + && !obj->inherits( "TQDataBrowser" ) ) { + const TQStringList& lst = value.asStringList(); if ( lst.count() > 2 ) { if ( dbControls ) dbControls->insert( obj->name(), lst[ 2 ] ); @@ -1863,10 +1863,10 @@ void QWidgetFactory::setProperty( QObject* obj, const QString &prop, dbTables.insert( obj->name(), lst ); } } else if ( prop == "database" ) { - const QStringList& lst = value.asStringList(); - if ( lst.count() == 2 && obj->inherits( "QWidget" ) ) { + const TQStringList& lst = value.asStringList(); + 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; } #endif @@ -1878,28 +1878,28 @@ void QWidgetFactory::setProperty( QObject* obj, const QString &prop, } } -void QWidgetFactory::setProperty( QObject* widget, const QString &prop, const QDomElement &e ) +void TQWidgetFactory::setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ) { - QString comment; - QVariant value( DomTool::elementToVariant( e, QVariant(), comment ) ); + TQString comment; + TQVariant value( DomTool::elementToVariant( e, TQVariant(), comment ) ); if ( e.tagName() == "string" ) { value = translate( value.asString(), comment ); } else if ( e.tagName() == "pixmap" ) { - QPixmap pix = loadPixmap( value.toString() ); + TQPixmap pix = loadPixmap( value.toString() ); if ( !pix.isNull() ) value = pix; } else if ( e.tagName() == "iconset" ) { - QPixmap pix = loadPixmap( value.toString() ); + TQPixmap pix = loadPixmap( value.toString() ); if ( !pix.isNull() ) - value = QIconSet( pix ); + value = TQIconSet( pix ); } else if ( e.tagName() == "image" ) { value = loadFromCollection( value.toString() ); } else 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 ); @@ -1917,9 +1917,9 @@ void QWidgetFactory::setProperty( QObject* widget, const QString &prop, const QD setProperty( widget, prop, value ); } -void QWidgetFactory::createSpacer( const QDomElement &e, QLayout *layout ) +void TQWidgetFactory::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(); @@ -1927,10 +1927,10 @@ void QWidgetFactory::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; @@ -1950,36 +1950,36 @@ void QWidgetFactory::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 ) { - QString format = n2.attribute( "format", "PNG" ); - QString hex = n2.firstChild().toText().data(); + TQString format = n2.attribute( "format", "PNG" ); + TQString hex = n2.firstChild().toText().data(); int n = hex.length() / 2; - QByteArray data( n ); + TQByteArray data( n ); for ( int i = 0; i < n; i++ ) data[i] = (char) hex.mid( 2 * i, 2 ).toUInt( 0, 16 ); return loadImageData( format, n2.attribute("length").toULong(), data ); } -void QWidgetFactory::loadImageCollection( const QDomElement &e ) +void TQWidgetFactory::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 ); @@ -1991,47 +1991,47 @@ void QWidgetFactory::loadImageCollection( const QDomElement &e ) } } -QImage QWidgetFactory::loadFromCollection( const QString &name ) +TQImage TQWidgetFactory::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 QWidgetFactory::loadPixmap( const QString& name ) +TQPixmap TQWidgetFactory::loadPixmap( const TQString& name ) { - QPixmap pix; + TQPixmap pix; if ( usePixmapCollection ) { - const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( name ); + const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( name ); if ( m ) - QImageDrag::decode( m, pix ); + TQImageDrag::decode( m, pix ); } else { pix.convertFromImage( loadFromCollection(name) ); } return pix; } -QPixmap QWidgetFactory::loadPixmap( const QDomElement &e ) +TQPixmap TQWidgetFactory::loadPixmap( const TQDomElement &e ) { return loadPixmap( e.firstChild().toText().data() ); } -QColorGroup QWidgetFactory::loadColorGroup( const QDomElement &e ) +TQColorGroup TQWidgetFactory::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(); } @@ -2040,8 +2040,8 @@ QColorGroup QWidgetFactory::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 ; @@ -2053,27 +2053,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 QWidgetFactory::loadConnections( const QDomElement &e, QObject *connector ) +void TQWidgetFactory::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(); @@ -2085,11 +2085,11 @@ void QWidgetFactory::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(); @@ -2110,8 +2110,8 @@ void QWidgetFactory::loadConnections( const QDomElement &e, QObject *connector ) continue; } - 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 { @@ -2139,13 +2139,13 @@ void QWidgetFactory::loadConnections( const QDomElement &e, QObject *connector ) delete l; } - 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 ) { @@ -2159,23 +2159,23 @@ void QWidgetFactory::loadConnections( const QDomElement &e, QObject *connector ) n = n.nextSibling().toElement(); continue; } - QObject::connect( sender, s, receiver, s2 ); + TQObject::connect( sender, s, receiver, s2 ); } n = n.nextSibling().toElement(); } } -void QWidgetFactory::loadTabOrder( const QDomElement &e ) +void TQWidgetFactory::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; @@ -2187,8 +2187,8 @@ void QWidgetFactory::loadTabOrder( const QDomElement &e ) } } -void QWidgetFactory::createListViewColumn( QListView *lv, const QString& txt, - const QPixmap& pix, bool clickable, +void TQWidgetFactory::createListViewColumn( TQListView *lv, const TQString& txt, + const TQPixmap& pix, bool clickable, bool resizable ) { if ( pix.isNull() ) { @@ -2207,12 +2207,12 @@ void QWidgetFactory::createListViewColumn( QListView *lv, const QString& txt, } #ifndef QT_NO_TABLE -void QWidgetFactory::createTableColumnOrRow( QTable *table, const QString& txt, - const QPixmap& pix, - const QString& field, bool isRow ) +void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& txt, + const TQPixmap& pix, + const TQString& field, bool isRow ) { #ifndef QT_NO_SQL - bool isSql = table->inherits( "QDataTable" ); + bool isSql = table->inherits( "TQDataTable" ); #endif if ( isRow ) table->setNumRows( table->numRows() + 1 ); @@ -2223,25 +2223,25 @@ void QWidgetFactory::createTableColumnOrRow( QTable *table, const QString& txt, table->setNumCols( table->numCols() + 1 ); } - QValueList<Field> fieldMap; + TQValueList<Field> fieldMap; if ( fieldMaps.find( table ) != fieldMaps.end() ) { fieldMap = *fieldMaps.find( table ); fieldMaps.remove( table ); } int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); if ( !pix.isNull() ) { #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 ); @@ -2254,18 +2254,18 @@ void QWidgetFactory::createTableColumnOrRow( QTable *table, const QString& txt, } #endif -void QWidgetFactory::createColumn( const QDomElement &e, QWidget *widget ) +void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) { - if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) { - QListView *lv = (QListView*)widget; - QDomElement n = e.firstChild().toElement(); - QPixmap pix; - QString txt; + if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQString txt; bool clickable = TRUE, resizable = 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" ) @@ -2280,18 +2280,18 @@ void QWidgetFactory::createColumn( const QDomElement &e, QWidget *widget ) createListViewColumn( lv, txt, pix, clickable, resizable ); } #ifndef QT_NO_TABLE - else if ( widget->inherits( "QTable" ) ) { - QTable *table = (QTable*)widget; + else if ( widget->inherits( "TQTable" ) ) { + TQTable *table = (TQTable*)widget; - QDomElement n = e.firstChild().toElement(); - QPixmap pix; - QString txt; - QString field; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQString txt; + TQString field; 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" ) { @@ -2307,14 +2307,14 @@ void QWidgetFactory::createColumn( const QDomElement &e, QWidget *widget ) #endif } -void QWidgetFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap ) +void TQWidgetFactory::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" ) { @@ -2326,56 +2326,56 @@ void QWidgetFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, } } -void QWidgetFactory::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i ) +void TQWidgetFactory::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, d->lastItem ); + item = new TQListViewItem( i, d->lastItem ); else - item = new QListViewItem( lv, d->lastItem ); + item = new TQListViewItem( lv, d->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; @@ -2399,32 +2399,32 @@ void QWidgetFactory::createItem( const QDomElement &e, QWidget *widget, QListVie -void QWidgetFactory::loadChildAction( QObject *parent, const QDomElement &e ) +void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) { - QDomElement n = e; - QAction *a = 0; + TQDomElement n = e; + TQAction *a = 0; bool hasMenuText = FALSE; 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" ) { - QString prop(n2.attribute("name")); + TQString prop(n2.attribute("name")); if (prop == "menuText") hasMenuText = TRUE; setProperty( a, prop, n2.firstChild().toElement() ); } 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" ) { - QString prop(n2.attribute("name")); + TQString prop(n2.attribute("name")); if (prop == "menuText") hasMenuText = TRUE; setProperty( a, prop, n2.firstChild().toElement() ); @@ -2435,7 +2435,7 @@ void QWidgetFactory::loadChildAction( QObject *parent, const QDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( "QAction" ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } @@ -2443,9 +2443,9 @@ void QWidgetFactory::loadChildAction( QObject *parent, const QDomElement &e ) a->setMenuText(a->text()); } -void QWidgetFactory::loadActions( const QDomElement &e ) +void TQWidgetFactory::loadActions( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { loadChildAction( toplevel, n ); @@ -2456,27 +2456,27 @@ void QWidgetFactory::loadActions( const QDomElement &e ) } } -void QWidgetFactory::loadToolBars( const QDomElement &e ) +void TQWidgetFactory::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() ); } @@ -2487,14 +2487,14 @@ void QWidgetFactory::loadToolBars( const QDomElement &e ) } } -void QWidgetFactory::loadMenuBar( const QDomElement &e ) +void TQWidgetFactory::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 ); loadPopupMenu( popup, n ); popup->setName( n.attribute( "name" ) ); mb->insertItem( translate( n.attribute( "text" ) ), popup ); @@ -2507,16 +2507,16 @@ void QWidgetFactory::loadMenuBar( const QDomElement &e ) } } -void QWidgetFactory::loadPopupMenu( QPopupMenu *p, const QDomElement &e ) +void TQWidgetFactory::loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ) { - QMainWindow *mw = ( (QMainWindow*)toplevel ); - QDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - QAction *a = findAction( n.attribute( "name" ) ); - QDomElement n2 = n.nextSibling().toElement(); + TQAction *a = findAction( n.attribute( "name" ) ); + TQDomElement n2 = n.nextSibling().toElement(); if ( n2.tagName() == "item") { // load submenu - QPopupMenu *popup = new QPopupMenu( mw ); + TQPopupMenu *popup = new TQPopupMenu( mw ); popup->setName( n2.attribute( "name" ) ); if ( a ) { p->setAccel( a->accel(), p->insertItem( a->iconSet(), @@ -2542,16 +2542,16 @@ void QWidgetFactory::loadPopupMenu( QPopupMenu *p, const QDomElement &e ) // compatibility with early 3.0 betas // ### remove for 4.0 -void QWidgetFactory::loadFunctions( const QDomElement & ) +void TQWidgetFactory::loadFunctions( const TQDomElement & ) { } -QAction *QWidgetFactory::findAction( const QString &name ) +TQAction *TQWidgetFactory::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; } @@ -2561,46 +2561,46 @@ QAction *QWidgetFactory::findAction( const QString &name ) /*! If you use a pixmap collection (which is the default for new projects) rather than saving the pixmaps within the .ui XML file, - you must load the pixmap collection. QWidgetFactory looks in the - default QMimeSourceFactory for the pixmaps. Either add it there + you must load the pixmap collection. TQWidgetFactory looks in the + default TQMimeSourceFactory for the pixmaps. Either add it there manually, or call this function and specify the directory where the images can be found, as \a dir. This is normally the directory called \c images in the project's directory. */ -void QWidgetFactory::loadImages( const QString &dir ) +void TQWidgetFactory::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" ) ); } -void QWidgetFactory::loadExtraSource() +void TQWidgetFactory::loadExtraSource() { if ( !qwf_language || !languageInterfaceManager ) return; - QString lang = *qwf_language; + TQString lang = *qwf_language; LanguageInterface *iface = 0; languageInterfaceManager->queryInterface( lang, &iface ); if ( !iface ) return; - QFile f( qwf_currFileName + iface->formCodeExtension() ); + TQFile f( qwf_currFileName + iface->formCodeExtension() ); if ( f.open( IO_ReadOnly ) ) { - QTextStream ts( &f ); + TQTextStream ts( &f ); code = ts.read(); } } -QString QWidgetFactory::translate( const QString& sourceText, const QString& comment ) +TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment ) { return qApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), - QApplication::UnicodeUTF8 ); + TQApplication::UnicodeUTF8 ); } -QString QWidgetFactory::translate( const char *sourceText, const char *comment ) +TQString TQWidgetFactory::translate( const char *sourceText, const char *comment ) { return qApp->translate( d->translationContext, sourceText, comment, - QApplication::UnicodeUTF8 ); + TQApplication::UnicodeUTF8 ); } diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h index 9146e9a7..f2d07275 100644 --- a/kdevdesigner/uilib/qwidgetfactory.h +++ b/kdevdesigner/uilib/qwidgetfactory.h @@ -28,13 +28,13 @@ #define QWIDGETFACTORY_H #ifndef QT_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> #endif // QT_H class QDomDocument; @@ -51,87 +51,87 @@ class UibStrTable; class QWidgetFactory { public: - QWidgetFactory(); - virtual ~QWidgetFactory(); + TQWidgetFactory(); + virtual ~TQWidgetFactory(); - 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 void addWidgetFactory( QWidgetFactory *factory ); - static void loadImages( const QString &dir ); + 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 void addWidgetFactory( TQWidgetFactory *factory ); + static void loadImages( const TQString &dir ); - virtual QWidget *createWidget( const QString &className, QWidget *parent, const char *name ) const; - static QStringList widgets(); - static bool supportsWidget( const QString &widget ); + virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const; + static TQStringList widgets(); + static bool supportsWidget( const TQString &widget ); 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, bool isQLayoutWidget = FALSE ); - LayoutType layoutType( QLayout *l ) const; - void setProperty( QObject* widget, const QString &prop, QVariant value ); - 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 QString &name ); - QPixmap loadPixmap( const QDomElement &e ); - QColorGroup loadColorGroup( const QDomElement &e ); - void createListViewColumn( QListView *lv, const QString& txt, - const QPixmap& pix, bool clickable, + 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, bool isQLayoutWidget = FALSE ); + LayoutType layoutType( TQLayout *l ) const; + void setProperty( TQObject* widget, const TQString &prop, TQVariant value ); + 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 TQString &name ); + TQPixmap loadPixmap( const TQDomElement &e ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + void createListViewColumn( TQListView *lv, const TQString& txt, + const TQPixmap& pix, bool clickable, bool resizable ); #ifndef QT_NO_TABLE - void createTableColumnOrRow( QTable *table, const QString& txt, - const QPixmap& pix, const QString& field, + void createTableColumnOrRow( TQTable *table, const TQString& txt, + const TQPixmap& pix, const TQString& field, bool isRow ); #endif - 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 ); - void loadPopupMenu( QPopupMenu *p, const QDomElement &e ); - void loadFunctions( const QDomElement &e ); - QAction *findAction( const QString &name ); + 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 ); + void loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ); + void loadFunctions( const TQDomElement &e ); + TQAction *findAction( const TQString &name ); void loadExtraSource(); - QString translate( const char *sourceText, const char *comment = "" ); - QString translate( const QString& sourceText, const QString& comment = QString::null ); + TQString translate( const char *sourceText, const char *comment = "" ); + TQString translate( const TQString& sourceText, const TQString& comment = TQString::null ); - void unpackUInt16( QDataStream& in, Q_UINT16& n ); - void unpackUInt32( QDataStream& in, Q_UINT32& n ); - void unpackByteArray( QDataStream& in, QByteArray& array ); - void unpackCString( const UibStrTable& strings, QDataStream& in, - QCString& cstr ); - void unpackString( const UibStrTable& strings, QDataStream& in, - QString& str ); - void unpackStringSplit( const UibStrTable& strings, QDataStream& in, - QString& str ); - void unpackVariant( const UibStrTable& strings, QDataStream& in, - QVariant& value ); - void inputSpacer( const UibStrTable& strings, QDataStream& in, - QLayout *parent ); - void inputColumnOrRow( const UibStrTable& strings, QDataStream& in, - QObject *parent, bool isRow ); - void inputItem( const UibStrTable& strings, QDataStream& in, - QObject *parent, QListViewItem *parentItem = 0 ); - void inputMenuItem( QObject **objects, const UibStrTable& strings, - QDataStream& in, QMenuBar *menuBar ); - QObject *inputObject( QObject **objects, int& numObjects, - const UibStrTable& strings, QDataStream& in, - QWidget *ancestorWidget, QObject *parent, - QCString className = "" ); - QWidget *createFromUiFile( QDomDocument doc, QObject *connector, - QWidget *parent, const char *name ); - QWidget *createFromUibFile( QDataStream& in, QObject *connector, - QWidget *parent, const char *name ); + void unpackUInt16( TQDataStream& in, Q_UINT16& n ); + void unpackUInt32( TQDataStream& in, Q_UINT32& n ); + void unpackByteArray( TQDataStream& in, TQByteArray& array ); + void unpackCString( const UibStrTable& strings, TQDataStream& in, + TQCString& cstr ); + void unpackString( const UibStrTable& strings, TQDataStream& in, + TQString& str ); + void unpackStringSplit( const UibStrTable& strings, TQDataStream& in, + TQString& str ); + void unpackVariant( const UibStrTable& strings, TQDataStream& in, + TQVariant& value ); + void inputSpacer( const UibStrTable& strings, TQDataStream& in, + TQLayout *parent ); + void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, bool isRow ); + void inputItem( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, TQListViewItem *parentItem = 0 ); + void inputMenuItem( TQObject **objects, const UibStrTable& strings, + TQDataStream& in, TQMenuBar *menuBar ); + TQObject *inputObject( TQObject **objects, int& numObjects, + const UibStrTable& strings, TQDataStream& in, + TQWidget *ancestorWidget, TQObject *parent, + TQCString className = "" ); + TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector, + TQWidget *parent, const char *name ); + TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector, + TQWidget *parent, const char *name ); private: struct Image { - QImage img; - QString name; + TQImage img; + TQString name; bool operator==( const Image &i ) const { return ( i.name == name && i.img == img ); @@ -141,40 +141,40 @@ 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; Q_DUMMY_COMPARISON_OPERATOR( Field ) }; 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; Q_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection ) }; - QValueList<Image> images; - QWidget *toplevel; + TQValueList<Image> images; + TQWidget *toplevel; QWidgetFactoryPrivate *d; - 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<QString, QString> languageSlots; - QStringList noDatabaseWidgets; + 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<TQString, TQString> languageSlots; + TQStringList noDatabaseWidgets; bool usePixmapCollection; int defMargin; int defSpacing; - QString code; - QString uiFileVersion; + TQString code; + TQString uiFileVersion; }; #endif |