summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/uilib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /kdevdesigner/uilib
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/uilib')
-rw-r--r--kdevdesigner/uilib/database.cpp28
-rw-r--r--kdevdesigner/uilib/database2.h26
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp772
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.h62
4 files changed, 445 insertions, 443 deletions
diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp
index 0097605b..89e17a6b 100644
--- a/kdevdesigner/uilib/database.cpp
+++ b/kdevdesigner/uilib/database.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
@@ -30,7 +30,7 @@
#include "database2.h"
#endif
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#if defined(DESIGNER)
#include "formwindow.h"
@@ -46,7 +46,7 @@ DatabaseSupport::DatabaseSupport()
{
con = 0;
frm = 0;
- parent = 0;
+ tqparent = 0;
}
void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o,
@@ -54,7 +54,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t
{
tbl = table;
dbControls = databaseControls;
- parent = o;
+ tqparent = o;
if ( connection != "(default)" )
con = TQSqlDatabase::database( connection );
@@ -62,19 +62,19 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t
con = TQSqlDatabase::database();
frm = new TQSqlForm( o, table.ascii() );
for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) {
- TQObject *chld = parent->child( it.key().ascii(), "TQWidget" );
+ TQObject *chld = tqparent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING );
if ( !chld )
continue;
frm->insert( (TQWidget*)chld, *it );
}
}
-QDesignerDataBrowser::QDesignerDataBrowser( TQWidget *parent, const char *name )
- : TQDataBrowser( parent, name )
+TQDesignerDataBrowser::TQDesignerDataBrowser( TQWidget *tqparent, const char *name )
+ : TQDataBrowser( tqparent, name )
{
}
-bool QDesignerDataBrowser::event( TQEvent* e )
+bool TQDesignerDataBrowser::event( TQEvent* e )
{
bool b = TQDataBrowser::event( e );
#if defined(DESIGNER)
@@ -96,12 +96,12 @@ bool QDesignerDataBrowser::event( TQEvent* e )
return b;
}
-QDesignerDataView::QDesignerDataView( TQWidget *parent, const char *name )
- : TQDataView( parent, name )
+TQDesignerDataView::TQDesignerDataView( TQWidget *tqparent, const char *name )
+ : TQDataView( tqparent, name )
{
}
-bool QDesignerDataView::event( TQEvent* e )
+bool TQDesignerDataView::event( TQEvent* e )
{
bool b = TQDataView::event( e );
#if defined(DESIGNER)
diff --git a/kdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h
index d0c1be9b..ada42364 100644
--- a/kdevdesigner/uilib/database2.h
+++ b/kdevdesigner/uilib/database2.h
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
@@ -29,7 +29,7 @@
#include "tqfeatures.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include <tqdataview.h>
#include <tqdatabrowser.h>
#include <tqsqlcursor.h>
@@ -52,27 +52,29 @@ protected:
TQSqlForm* frm;
TQString tbl;
TQMap<TQString, TQString> dbControls;
- TQObject *parent;
+ TQObject *tqparent;
};
-class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2
+class TQDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerDataBrowser2( TQWidget *parent, const char *name );
+ TQDesignerDataBrowser2( TQWidget *tqparent, const char *name );
protected:
bool event( TQEvent* e );
};
-class QDesignerDataView2 : public TQDataView, public DatabaseSupport2
+class TQDesignerDataView2 : public TQDataView, public DatabaseSupport2
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerDataView2( TQWidget *parent, const char *name );
+ TQDesignerDataView2( TQWidget *tqparent, const char *name );
protected:
bool event( TQEvent* e );
@@ -80,8 +82,8 @@ protected:
};
#define DatabaseSupport DatabaseSupport2
-#define QDesignerDataBrowser QDesignerDataBrowser2
-#define QDesignerDataView QDesignerDataView2
+#define TQDesignerDataBrowser TQDesignerDataBrowser2
+#define TQDesignerDataView TQDesignerDataView2
#endif
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index a3a16755..b19d7d14 100644
--- a/kdevdesigner/uilib/qwidgetfactory.cpp
+++ b/kdevdesigner/uilib/qwidgetfactory.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,14 +17,14 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#include "tqwidgetfactory.h"
+#include "qwidgetfactory.h"
#include "../interfaces/languageinterface.h"
#include "../interfaces/widgetinterface.h"
@@ -41,17 +41,17 @@
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include <tqobjectlist.h>
-#include <private/qpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
#include <tqmime.h>
#include <tqdragobject.h>
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include <tqsqlrecord.h>
#include <tqsqldatabase.h>
#include <tqdatatable.h>
#endif
-// include all Qt widgets we support
+// include all TQt widgets we support
#include <tqpushbutton.h>
#include <tqtoolbutton.h>
#include <tqcheckbox.h>
@@ -60,7 +60,7 @@
#include <tqbuttongroup.h>
#include <tqiconview.h>
#include <tqheader.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
#include <tqlistbox.h>
@@ -98,7 +98,7 @@
#include <stdlib.h>
-class QWidgetFactoryPrivate
+class TQWidgetFactoryPrivate
{
public:
TQCString translationContext;
@@ -107,8 +107,8 @@ public:
};
static TQPtrList<TQWidgetFactory> widgetFactories;
-static QPluginManager<LanguageInterface> *languageInterfaceManager = 0;
-static QPluginManager<WidgetInterface> *widgetInterfaceManager = 0;
+static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0;
+static TQPluginManager<WidgetInterface> *widgetInterfaceManager = 0;
static TQMap<TQString, bool> *availableWidgetMap = 0;
static TQStringList *availableWidgetList = 0;
@@ -149,7 +149,7 @@ static void setupWidgetListAndMap()
if ( !widgetInterfaceManager )
widgetInterfaceManager =
- new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir );
+ new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir );
TQStringList l = widgetInterfaceManager->featureList();
TQStringList::Iterator it;
@@ -167,7 +167,7 @@ static TQImage loadImageData( const TQString& format, ulong len, TQByteArray dat
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
+ // tqUncompress() expects the first 4 bytes to be the expected length of
// the uncompressed data
TQByteArray dataTmp( data.size() + 4 );
memcpy( dataTmp.data()+4, data.data(), data.size() );
@@ -175,9 +175,9 @@ static TQImage loadImageData( const TQString& format, ulong len, TQByteArray dat
dataTmp[1] = ( len & 0x00ff0000 ) >> 16;
dataTmp[2] = ( len & 0x0000ff00 ) >> 8;
dataTmp[3] = ( len & 0x000000ff );
- TQByteArray baunzip = qUncompress( dataTmp );
+ TQByteArray baunzip = tqUncompress( dataTmp );
len = baunzip.size();
- img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')).ascii() );
+ img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.tqfind('.')).ascii() );
} else {
img.loadFromData( (const uchar*)data.data(), data.size(), format.ascii() );
}
@@ -205,16 +205,16 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str )
/*!
- \class QWidgetFactory
+ \class TQWidgetFactory
\brief The TQWidgetFactory class provides for the dynamic creation of widgets
- from Qt Designer .ui files.
+ from TQt Designer .ui files.
This class basically offers two things:
\list
- \i Dynamically creating widgets from \link designer-manual.book Qt
+ \i Dynamically creating widgets from \link designer-manual.book TQt
Designer\endlink user interface description files.
You can do this using the static function TQWidgetFactory::create().
This function also performs signal and slot connections, tab
@@ -228,21 +228,21 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str )
\endlist
- This class is not included in the Qt library itself. To use it you
+ This class is not included in the TQt library itself. To use it you
must link against \c libqui.so (Unix) or \c qui.lib (Windows), which is
- built into \c INSTALL/lib if you built \e{Qt Designer} (\c INSTALL is
- the directory where Qt is installed ).
+ built into \c INSTALL/lib if you built \e{TQt Designer} (\c INSTALL is
+ the directory where TQt is installed ).
See the "Creating Dynamic Dialogs from .ui Files" section of the \link
- designer-manual.book Qt Designer manual\endlink for an example. See
- also the \l{QWidgetPlugin} class and the \link plugins-howto.html
+ designer-manual.book TQt Designer manual\endlink for an example. See
+ also the \l{TQWidgetPlugin} class and the \link plugins-howto.html
Plugins documentation\endlink.
*/
/*! Constructs a TQWidgetFactory. */
TQWidgetFactory::TQWidgetFactory()
- : d( new QWidgetFactoryPrivate() ), dbControls( 0 ),
+ : d( new TQWidgetFactoryPrivate() ), dbControls( 0 ),
usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 )
{
widgetFactories.setAutoDelete( TRUE );
@@ -259,12 +259,12 @@ TQWidgetFactory::~TQWidgetFactory()
/*!
- Loads the \e{Qt Designer} user interface description file \a uiFile
- and returns the top-level widget in that description. \a parent and
+ Loads the \e{TQt Designer} user interface description file \a uiFile
+ and returns the top-level widget in that description. \a tqparent and
\a name are passed to the constructor of the top-level widget.
This function also performs signal and slot connections, tab
- ordering, etc., as described in the .ui file. In \e{Qt Designer} it
+ ordering, etc., as described in the .ui file. In \e{TQt 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 TQObject, which implements all these slots. Then pass an
@@ -278,15 +278,15 @@ TQWidgetFactory::~TQWidgetFactory()
*/
TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
- TQWidget *parent, const char *name )
+ TQWidget *tqparent, const char *name )
{
setupPluginDir();
TQFile f( uiFile );
bool failed = FALSE;
if ( !f.open( IO_ReadOnly ) )
failed = TRUE;
- if ( failed && qApp->type() == TQApplication::Tty ) {
- // for QSA: If we have no GUI, we have no form definition
+ if ( failed && tqApp->type() == TQApplication::Tty ) {
+ // for TQSA: 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" );
failed = !f.open( IO_ReadOnly );
@@ -295,7 +295,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
return 0;
qwf_currFileName = uiFile;
- TQWidget *w = TQWidgetFactory::create( &f, connector, parent, name );
+ TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, tqparent, name );
if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
@@ -308,7 +308,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
Loads the user interface description from device \a dev.
*/
-TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
+TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *tqparent, const char *name )
{
setupPluginDir();
TQWidget *w = 0;
@@ -320,18 +320,18 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
widgetFactory->toplevel = 0;
// If we have no GUI, we only want to load the code
- if ( qApp->type() != TQApplication::Tty ) {
+ if ( tqApp->type() != TQApplication::Tty ) {
TQIODevice::Offset start = dev->at();
- Q_UINT32 magic;
+ TQ_UINT32 magic;
TQDataStream in( dev );
in >> magic;
if ( magic == UibMagic ) {
- w = widgetFactory->createFromUibFile( in, connector, parent, name );
+ w = widgetFactory->createFromUibFile( in, connector, tqparent, name );
} else {
in.unsetDevice();
dev->at( start );
if ( doc.setContent( dev, &errMsg, &errLine ) ) {
- w = widgetFactory->createFromUiFile( doc, connector, parent, name );
+ w = widgetFactory->createFromUiFile( doc, connector, tqparent, name );
} else {
// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
}
@@ -344,22 +344,22 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
if ( !languageInterfaceManager )
languageInterfaceManager =
- new QPluginManager<LanguageInterface>( IID_Language, TQApplication::libraryPaths(), *qwf_plugin_dir );
+ new TQPluginManager<LanguageInterface>( IID_Language, TQApplication::libraryPaths(), *qwf_plugin_dir );
widgetFactory->loadExtraSource();
if ( widgetFactory->toplevel ) {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQMap<TQWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) {
- if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) !=
+ if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) !=
widgetFactory->noDatabaseWidgets.end() )
continue;
- if ( cit.key()->inherits( "QDesignerDataBrowser2" ) )
- ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
- cit.key(), *(*cit).dbControls );
- else if ( cit.key()->inherits( "QDesignerDataView2" ) )
- ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
- cit.key(), *(*cit).dbControls );
+ if ( cit.key()->inherits( "TQDesignerDataBrowser2" ) )
+ ( (TQDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
+ TQT_TQOBJECT(cit.key()), *(*cit).dbControls );
+ else if ( cit.key()->inherits( "TQDesignerDataView2" ) )
+ ( (TQDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
+ TQT_TQOBJECT(cit.key()), *(*cit).dbControls );
}
for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin();
@@ -367,10 +367,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING );
if ( !table )
continue;
- if ( widgetFactory->noDatabaseWidgets.find( table->name() ) !=
+ if ( widgetFactory->noDatabaseWidgets.tqfind( table->name() ) !=
widgetFactory->noDatabaseWidgets.end() )
continue;
- TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
+ TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.tqfind( table );
TQString conn = (*it)[ 0 ];
TQSqlCursor* c = 0;
TQSqlDatabase *db = 0;
@@ -405,7 +405,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
}
TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connector,
- TQWidget *parent, const char *name )
+ TQWidget *tqparent, const char *name )
{
DomTool::fixDocument( doc );
@@ -456,7 +456,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
widget = e;
} else if ( e.tagName() == "pixmapinproject" ) {
usePixmapCollection = TRUE;
- } else if ( e.tagName() == "layoutdefaults" ) {
+ } else if ( e.tagName() == "tqlayoutdefaults" ) {
defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt();
defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt();
}
@@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
if ( !imageCollection.isNull() )
loadImageCollection( imageCollection );
- createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
+ createWidgetInternal( widget, tqparent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
TQWidget *w = toplevel;
if ( !w )
return 0;
@@ -480,7 +480,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
if ( !connections.isNull() )
loadConnections( connections, connector );
- if ( w && name && qstrlen( name ) > 0 )
+ if ( w && name && tqstrlen( name ) > 0 )
w->setName( name );
if ( !tabOrder.isNull() )
@@ -494,9 +494,9 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
return w;
}
-void TQWidgetFactory::unpackUInt16( TQDataStream& in, Q_UINT16& n )
+void TQWidgetFactory::unpackUInt16( TQDataStream& in, TQ_UINT16& n )
{
- Q_UINT8 half;
+ TQ_UINT8 half;
in >> half;
if ( half == 255 ) {
in >> n;
@@ -505,9 +505,9 @@ void TQWidgetFactory::unpackUInt16( TQDataStream& in, Q_UINT16& n )
}
}
-void TQWidgetFactory::unpackUInt32( TQDataStream& in, Q_UINT32& n )
+void TQWidgetFactory::unpackUInt32( TQDataStream& in, TQ_UINT32& n )
{
- Q_UINT16 half;
+ TQ_UINT16 half;
in >> half;
if ( half == 65535 ) {
in >> n;
@@ -518,7 +518,7 @@ void TQWidgetFactory::unpackUInt32( TQDataStream& in, Q_UINT32& n )
void TQWidgetFactory::unpackByteArray( TQDataStream& in, TQByteArray& array )
{
- Q_UINT32 size;
+ TQ_UINT32 size;
unpackUInt32( in, size );
array.resize( size );
in.readRawBytes( array.data(), size );
@@ -527,7 +527,7 @@ void TQWidgetFactory::unpackByteArray( TQDataStream& in, TQByteArray& array )
void TQWidgetFactory::unpackCString( const UibStrTable& strings, TQDataStream& in,
TQCString& cstr )
{
- Q_UINT32 n;
+ TQ_UINT32 n;
unpackUInt32( in, n );
cstr = strings.asCString( n );
}
@@ -535,7 +535,7 @@ void TQWidgetFactory::unpackCString( const UibStrTable& strings, TQDataStream& i
void TQWidgetFactory::unpackString( const UibStrTable& strings, TQDataStream& in,
TQString& str )
{
- Q_UINT32 n;
+ TQ_UINT32 n;
unpackUInt32( in, n );
str = strings.asString( n );
}
@@ -553,14 +553,14 @@ void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& i
TQVariant& value )
{
TQString imageName;
- Q_UINT32 number;
- Q_UINT16 count;
- Q_UINT16 x;
- Q_UINT16 y;
- Q_UINT16 width;
- Q_UINT16 height;
- Q_UINT8 bit;
- Q_UINT8 type;
+ TQ_UINT32 number;
+ TQ_UINT16 count;
+ TQ_UINT16 x;
+ TQ_UINT16 y;
+ TQ_UINT16 width;
+ TQ_UINT16 height;
+ TQ_UINT8 bit;
+ TQ_UINT8 type;
in >> type;
@@ -652,7 +652,7 @@ void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& i
}
void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
- TQLayout *parent )
+ TQLayout *tqparent )
{
TQCString name;
TQVariant value;
@@ -661,11 +661,11 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
bool vertical = FALSE;
int w = 0;
int h = 0;
- Q_UINT16 column = 0;
- Q_UINT16 row = 0;
- Q_UINT16 colspan = 1;
- Q_UINT16 rowspan = 1;
- Q_UINT8 objectTag;
+ TQ_UINT16 column = 0;
+ TQ_UINT16 row = 0;
+ TQ_UINT16 colspan = 1;
+ TQ_UINT16 rowspan = 1;
+ TQ_UINT8 objectTag;
in >> objectTag;
while ( !in.atEnd() && objectTag != Object_End ) {
@@ -682,7 +682,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
if ( name == "orientation" ) {
vertical = ( value == "Vertical" );
- } else if ( name == "sizeHint" ) {
+ } else if ( name == "tqsizeHint" ) {
w = value.toSize().width();
h = value.toSize().height();
} else if ( name == "sizeType" ) {
@@ -695,7 +695,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
in >> objectTag;
}
- if ( parent != 0 ) {
+ if ( tqparent != 0 ) {
TQSpacerItem *spacer;
if ( vertical ) {
spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType );
@@ -703,18 +703,18 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum );
}
- if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
- ((TQGridLayout *) parent)->addMultiCell( spacer, row,
+ if ( tqparent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ ((TQGridLayout *) tqparent)->addMultiCell( spacer, row,
row + rowspan - 1, column, column + colspan - 1,
- vertical ? Qt::AlignHCenter : Qt::AlignVCenter );
+ vertical ? TQt::AlignHCenter : TQt::AlignVCenter );
} else {
- parent->addItem( spacer );
+ tqparent->addItem( spacer );
}
}
}
void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
- TQDataStream& in, TQObject *parent,
+ TQDataStream& in, TQObject *tqparent,
bool isRow )
{
TQString text;
@@ -727,7 +727,7 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
TQVariant value;
TQCString comment;
TQString str;
- Q_UINT8 objectTag;
+ TQ_UINT8 objectTag;
in >> objectTag;
while ( !in.atEnd() && objectTag != Object_End ) {
@@ -762,13 +762,13 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
in >> objectTag;
}
- if ( parent != 0 ) {
- if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) {
- createListViewColumn( (TQListView *) parent, text, pixmap, clickable,
+ if ( tqparent != 0 ) {
+ if ( tqparent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) {
+ createListViewColumn( (TQListView *) tqparent, text, pixmap, clickable,
resizable );
-#ifndef QT_NO_TABLE
- } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) {
- createTableColumnOrRow( (TQTable *) parent, text, pixmap, field,
+#ifndef TQT_NO_TABLE
+ } else if ( tqparent->inherits(TQTABLE_OBJECT_NAME_STRING) ) {
+ createTableColumnOrRow( (TQTable *) tqparent, text, pixmap, field,
isRow );
#endif
}
@@ -776,24 +776,24 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
}
void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
- TQObject *parent, TQListViewItem *parentItem )
+ TQObject *tqparent, TQListViewItem *tqparentItem )
{
TQStringList texts;
TQValueList<TQPixmap> pixmaps;
TQCString name;
TQVariant value;
TQCString comment;
- Q_UINT8 objectTag;
+ TQ_UINT8 objectTag;
TQListView *listView = 0;
- if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) )
- parent = (TQListView *) parent;
+ if ( tqparent != 0 && tqparent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) )
+ tqparent = TQT_TQOBJECT((TQListView *) tqparent);
TQListViewItem *item = 0;
if ( listView != 0 ) {
- if ( parentItem == 0 ) {
+ if ( tqparentItem == 0 ) {
item = new TQListViewItem( listView, d->lastItem );
} else {
- item = new TQListViewItem( parentItem, d->lastItem );
+ item = new TQListViewItem( tqparentItem, d->lastItem );
}
d->lastItem = item;
}
@@ -804,7 +804,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
case Object_Item:
if ( listView != 0 )
d->lastItem->setOpen( TRUE );
- inputItem( strings, in, parent, item );
+ inputItem( strings, in, tqparent, item );
break;
case Object_TextProperty:
unpackCString( strings, in, name );
@@ -847,21 +847,21 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQString text = texts.last();
TQPixmap pixmap = pixmaps.last();
- if ( parent != 0 ) {
- if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ||
- parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) {
- TQListBox *listBox = (TQListBox *) parent->qt_cast( TQLISTBOX_OBJECT_NAME_STRING );
+ if ( tqparent != 0 ) {
+ if ( tqparent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ||
+ tqparent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) {
+ TQListBox *listBox = (TQListBox *) tqparent->qt_cast( TQLISTBOX_OBJECT_NAME_STRING );
if ( listBox == 0 )
- listBox = ((TQComboBox *) parent)->listBox();
+ listBox = ((TQComboBox *) tqparent)->listBox();
if ( pixmap.isNull() ) {
(void) new TQListBoxText( listBox, text );
} else {
(void) new TQListBoxPixmap( listBox, pixmap, text );
}
- #ifndef QT_NO_ICONVIEW
- } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) {
- (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap );
+ #ifndef TQT_NO_ICONVIEW
+ } else if ( tqparent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) {
+ (void) new TQIconViewItem( (TQIconView *) tqparent, text, pixmap );
#endif
}
}
@@ -874,13 +874,13 @@ void TQWidgetFactory::inputMenuItem( TQObject **objects,
{
TQCString name;
TQCString text;
- Q_UINT16 actionNo;
- Q_UINT8 objectTag;
+ TQ_UINT16 actionNo;
+ TQ_UINT8 objectTag;
unpackCString( strings, in, name );
unpackCString( strings, in, text );
- TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->parentWidget(), name );
+ TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->tqparentWidget(), name );
in >> objectTag;
while ( !in.atEnd() && objectTag != Object_End ) {
@@ -903,35 +903,35 @@ void TQWidgetFactory::inputMenuItem( TQObject **objects,
TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
const UibStrTable& strings,
TQDataStream& in, TQWidget *ancestorWidget,
- TQObject *parent, TQCString className )
+ TQObject *tqparent, TQCString className )
{
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(TQMAINWINDOW_OBJECT_NAME_STRING) ) {
- parentWidget = ((TQMainWindow *) parent)->centralWidget();
+ TQLayout *tqlayout = 0;
+ TQWidget *tqparentWidget = 0;
+ TQLayout *tqparentLayout = 0;
+
+ bool isTQObject = !className.isEmpty();
+ if ( isTQObject ) {
+ if ( tqparent != 0 ) {
+ if ( tqparent->isWidgetType() ) {
+ if ( tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) {
+ tqparentWidget = ((TQMainWindow *) tqparent)->centralWidget();
} else {
- parentWidget = (TQWidget *) parent;
+ tqparentWidget = (TQWidget *) tqparent;
}
- } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) {
- parentLayout = (TQLayout *) parent;
- parentWidget = ancestorWidget;
+ } else if ( tqparent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) {
+ tqparentLayout = (TQLayout *) tqparent;
+ tqparentWidget = ancestorWidget;
}
}
if ( className == TQACTION_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) {
- obj = new TQActionGroup( parent );
+ obj = new TQActionGroup( tqparent );
} else {
- obj = new TQAction( parent );
+ obj = new TQAction( tqparent );
}
} else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
@@ -941,27 +941,27 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
} else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) {
type = VBox;
}
- if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
- layout = createLayout( 0, 0, type );
+ if ( tqparentLayout != 0 && tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ tqlayout = createLayout( 0, 0, type );
} else {
- layout = createLayout( parentWidget, parentLayout, type );
+ tqlayout = createLayout( tqparentWidget, tqparentLayout, type );
}
- obj = layout;
+ obj = TQT_TQOBJECT(tqlayout);
} else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
- widget = ((TQMainWindow *) parent)->menuBar();
- obj = widget;
+ widget = ((TQMainWindow *) tqparent)->menuBar();
+ obj = TQT_TQOBJECT(widget);
} else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) {
- Q_UINT8 dock;
+ TQ_UINT8 dock;
in >> dock;
unpackCString( strings, in, className );
- widget = new TQToolBar( TQString::null, (TQMainWindow *) parent,
- (Qt::Dock) dock );
- obj = widget;
+ widget = new TQToolBar( TQString(), (TQMainWindow *) tqparent,
+ (TQt::Dock) dock );
+ obj = TQT_TQOBJECT(widget);
} else if ( className == TQWIDGET_OBJECT_NAME_STRING ) {
unpackCString( strings, in, className );
- widget = createWidget( className, parentWidget, 0 );
- obj = widget;
+ widget = createWidget( className, tqparentWidget, 0 );
+ obj = TQT_TQOBJECT(widget);
}
if ( widget != 0 )
@@ -974,14 +974,14 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
TQVariant value;
TQCString comment;
TQString str;
- Q_UINT16 actionNo;
+ TQ_UINT16 actionNo;
int metAttribute = 0;
- Q_UINT16 column = 0;
- Q_UINT16 row = 0;
- Q_UINT16 colspan = 1;
- Q_UINT16 rowspan = 1;
- Q_UINT8 paletteTag;
- Q_UINT8 objectTag;
+ TQ_UINT16 column = 0;
+ TQ_UINT16 row = 0;
+ TQ_UINT16 colspan = 1;
+ TQ_UINT16 rowspan = 1;
+ TQ_UINT8 paletteTag;
+ TQ_UINT8 objectTag;
in >> objectTag;
while ( !in.atEnd() && objectTag != Object_End ) {
@@ -1005,8 +1005,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
{
TQFont font;
TQString family;
- Q_UINT16 pointSize;
- Q_UINT8 fontFlags;
+ TQ_UINT16 pointSize;
+ TQ_UINT8 fontFlags;
unpackCString( strings, in, name );
in >> fontFlags;
@@ -1047,7 +1047,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
case Object_PaletteProperty:
{
TQPalette palette;
- TQColorGroup colorGroup;
+ TQColorGroup tqcolorGroup;
TQColor color;
int role = -1;
@@ -1057,26 +1057,26 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
while ( !in.atEnd() && paletteTag != Palette_End ) {
switch ( paletteTag ) {
case Palette_Active:
- palette.setActive( colorGroup );
+ palette.setActive( tqcolorGroup );
role = -1;
break;
case Palette_Inactive:
- palette.setInactive( colorGroup );
+ palette.setInactive( tqcolorGroup );
role = -1;
break;
case Palette_Disabled:
- palette.setDisabled( colorGroup );
+ palette.setDisabled( tqcolorGroup );
role = -1;
break;
case Palette_Color:
role++;
in >> color;
- colorGroup.setColor( (TQColorGroup::ColorRole) role,
+ tqcolorGroup.setColor( (TQColorGroup::ColorRole) role,
color );
break;
case Palette_Pixmap:
unpackVariant( strings, in, value );
- colorGroup.setBrush( (TQColorGroup::ColorRole) role,
+ tqcolorGroup.setBrush( (TQColorGroup::ColorRole) role,
TQBrush(color, value.asPixmap()) );
break;
default:
@@ -1092,21 +1092,21 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
inputColumnOrRow( strings, in, obj, TRUE );
break;
case Object_Spacer:
- inputSpacer( strings, in, layout );
+ inputSpacer( strings, in, tqlayout );
break;
case Object_Separator:
((TQToolBar *) widget)->addSeparator();
break;
case Object_SubAction:
- inputObject( objects, numObjects, strings, in, parentWidget,
- obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING );
+ inputObject( objects, numObjects, strings, in, tqparentWidget,
+ obj != 0 ? obj : tqparent, TQACTION_OBJECT_NAME_STRING );
break;
case Object_SubLayout:
- inputObject( objects, numObjects, strings, in, parentWidget, obj,
+ inputObject( objects, numObjects, strings, in, tqparentWidget, obj,
TQLAYOUT_OBJECT_NAME_STRING );
break;
case Object_SubWidget:
- inputObject( objects, numObjects, strings, in, parentWidget, obj,
+ inputObject( objects, numObjects, strings, in, tqparentWidget, obj,
TQWIDGET_OBJECT_NAME_STRING );
break;
case Object_TextProperty:
@@ -1117,11 +1117,11 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "title" ) {
- if ( parent != 0 ) {
- if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) {
- ((TQTabWidget *) parent)->insertTab( widget, str );
- } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) {
- ((TQWizard *) parent)->addPage( widget, str );
+ if ( tqparent != 0 ) {
+ if ( tqparent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) {
+ ((TQTabWidget *) tqparent)->insertTab( widget, str );
+ } else if ( tqparent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) {
+ ((TQWizard *) tqparent)->addPage( widget, str );
}
}
}
@@ -1136,8 +1136,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
if ( metAttribute > 0 ) {
if ( name == "id" ) {
- if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) )
- ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() );
+ if ( tqparent != 0 && tqparent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) )
+ ((TQWidgetStack *) tqparent)->addWidget( widget, value.toInt() );
}
} else {
if ( obj != 0 )
@@ -1151,19 +1151,19 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
metAttribute--;
}
- if ( parentLayout != 0 ) {
+ if ( tqparentLayout != 0 ) {
if ( widget != 0 ) {
- if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
- ((TQGridLayout *) parentLayout)->addMultiCellWidget(
+ if ( tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ ((TQGridLayout *) tqparentLayout)->addMultiCellWidget(
widget, row, row + rowspan - 1, column,
column + colspan - 1 );
} else {
- ((TQBoxLayout *) parentLayout)->addWidget( widget );
+ ((TQBoxLayout *) tqparentLayout)->addWidget( widget );
}
- } else if ( layout != 0 ) {
- if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
- ((TQGridLayout *) parentLayout)->addMultiCellLayout(
- layout, row, row + rowspan - 1, column,
+ } else if ( tqlayout != 0 ) {
+ if ( tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ ((TQGridLayout *) tqparentLayout)->addMultiCellLayout(
+ tqlayout, row, row + rowspan - 1, column,
column + colspan - 1 );
}
}
@@ -1172,13 +1172,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
}
TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
- TQObject * /* connector */ , TQWidget *parent, const char *name )
+ TQObject * /* connector */ , TQWidget *tqparent, const char *name )
{
#define END_OF_BLOCK() \
- ( in.atEnd() || in.device()->at() >= nextBlock )
+ ( in.atEnd() || in.tqdevice()->at() >= nextBlock )
- Q_UINT8 lf;
- Q_UINT8 cr;
+ TQ_UINT8 lf;
+ TQ_UINT8 cr;
in >> lf;
in >> cr;
if ( lf != '\n' || cr != '\r' ) {
@@ -1186,10 +1186,10 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
return 0;
}
- Q_UINT8 qdatastreamVersion;
+ TQ_UINT8 qdatastreamVersion;
in >> qdatastreamVersion;
if ( (int) qdatastreamVersion > in.version() ) {
- qWarning( "Incompatible version of Qt" );
+ qWarning( "Incompatible version of TQt" );
return 0;
}
in.setVersion( qdatastreamVersion );
@@ -1198,22 +1198,22 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
TQObject **objects = 0;
int numObjects = 0;
- Q_UINT8 blockType;
- Q_UINT32 blockSize;
+ TQ_UINT8 blockType;
+ TQ_UINT32 blockSize;
in >> blockType;
while ( !in.atEnd() && blockType != Block_End ) {
unpackUInt32( in, blockSize );
- TQIODevice::Offset nextBlock = in.device()->at() + blockSize;
+ TQIODevice::Offset nextBlock = in.tqdevice()->at() + blockSize;
switch ( blockType ) {
case Block_Actions:
- inputObject( objects, numObjects, strings, in, toplevel, toplevel );
+ inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) );
break;
case Block_Buddies:
{
- Q_UINT16 labelNo;
- Q_UINT16 buddyNo;
+ TQ_UINT16 labelNo;
+ TQ_UINT16 buddyNo;
do {
unpackUInt16( in, labelNo );
@@ -1228,11 +1228,11 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
case Block_Connections:
{
TQString language = "C++";
- Q_UINT16 senderNo = 0;
+ TQ_UINT16 senderNo = 0;
TQString signal = "clicked()";
- Q_UINT16 receiverNo = 0;
+ TQ_UINT16 receiverNo = 0;
TQString slot = "accept()";
- Q_UINT8 connectionFlags;
+ TQ_UINT8 connectionFlags;
do {
in >> connectionFlags;
@@ -1258,12 +1258,12 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
case Block_Functions:
// ###
qWarning( "Block_Functions not supported" );
- in.device()->at( nextBlock );
+ in.tqdevice()->at( nextBlock );
break;
case Block_Images:
{
TQString format;
- Q_UINT32 length;
+ TQ_UINT32 length;
TQByteArray data;
Image image;
@@ -1279,10 +1279,10 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
break;
case Block_Intro:
{
- Q_INT16 defaultMargin;
- Q_INT16 defaultSpacing;
- Q_UINT16 maxObjects;
- Q_UINT8 introFlags;
+ TQ_INT16 defaultMargin;
+ TQ_INT16 defaultSpacing;
+ TQ_UINT16 maxObjects;
+ TQ_UINT8 introFlags;
in >> introFlags;
in >> defaultMargin;
@@ -1300,7 +1300,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
}
break;
case Block_Menubar:
- inputObject( objects, numObjects, strings, in, toplevel, toplevel,
+ inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel),
TQMENUBAR_OBJECT_NAME_STRING );
break;
case Block_Slots:
@@ -1319,8 +1319,8 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
break;
case Block_Tabstops:
{
- Q_UINT16 beforeNo;
- Q_UINT16 afterNo;
+ TQ_UINT16 beforeNo;
+ TQ_UINT16 afterNo;
unpackUInt16( in, beforeNo );
while ( !END_OF_BLOCK() ) {
@@ -1334,17 +1334,17 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
case Block_Toolbars:
do {
inputObject( objects, numObjects, strings, in, toplevel,
- toplevel, TQTOOLBAR_OBJECT_NAME_STRING );
+ TQT_TQOBJECT(toplevel), TQTOOLBAR_OBJECT_NAME_STRING );
} while ( !END_OF_BLOCK() );
break;
case Block_Variables:
// ###
qWarning( "Block_Variables not supported" );
- in.device()->at( nextBlock );
+ in.tqdevice()->at( nextBlock );
break;
case Block_Widget:
toplevel = (TQWidget *)
- inputObject( objects, numObjects, strings, in, toplevel, parent,
+ inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(tqparent),
TQWIDGET_OBJECT_NAME_STRING );
if ( toplevel != 0 )
toplevel->setName( name );
@@ -1359,7 +1359,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
return toplevel;
}
-/*! Installs a widget factory \a factory, which normally contains
+/*! Installs a widget factory \a factory, which normally tqcontains
additional widgets that can then be created using a TQWidgetFactory.
See createWidget() for further details.
*/
@@ -1370,11 +1370,11 @@ void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory )
}
/*!
- Creates a widget of the type \a className passing \a parent and \a
+ Creates a widget of the type \a className passing \a tqparent and \a
name to its constructor.
- If \a className is a widget in the Qt library, it is directly
- created by this function. If the widget isn't in the Qt library,
+ If \a className is a widget in the TQt library, it is directly
+ created by this function. If the widget isn't in the TQt library,
each of the installed widget plugins is asked, in turn, to create
the widget. As soon as a plugin says it can create the widget it
is asked to do so. It may occur that none of the plugins can
@@ -1388,9 +1388,9 @@ void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory )
\list 1
\i Write a widget plugin. This allows you to use the widget in
- \e{Qt Designer} and in this TQWidgetFactory. See the widget plugin
+ \e{TQt 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
+ Widgets with Plugins" section of the \link designer-manual.book TQt
Designer manual\endlink for an example.
\i Subclass TQWidgetFactory. Then reimplement this function to
@@ -1406,119 +1406,119 @@ void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory )
\endlist
*/
-TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *parent,
+TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *tqparent,
const char *name ) const
{
// create widgets we know
if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) {
- return new TQPushButton( parent, name );
+ return new TQPushButton( tqparent, name );
} else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) {
- return new TQToolButton( parent, name );
+ return new TQToolButton( tqparent, name );
} else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) {
- return new TQCheckBox( parent, name );
+ return new TQCheckBox( tqparent, name );
} else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) {
- return new TQRadioButton( parent, name );
+ return new TQRadioButton( tqparent, name );
} else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) {
- return new TQGroupBox( parent, name );
+ return new TQGroupBox( tqparent, name );
} else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) {
- return new TQButtonGroup( parent, name );
+ return new TQButtonGroup( tqparent, name );
} else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) {
-#if !defined(QT_NO_ICONVIEW)
- return new TQIconView( parent, name );
+#if !defined(TQT_NO_ICONVIEW)
+ return new TQIconView( tqparent, name );
#endif
} else if ( className == TQTABLE_OBJECT_NAME_STRING ) {
-#if !defined(QT_NO_TABLE)
- return new TQTable( parent, name );
+#if !defined(TQT_NO_TABLE)
+ return new TQTable( tqparent, name );
#endif
} else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) {
- return new TQListBox( parent, name );
+ return new TQListBox( tqparent, name );
} else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) {
- return new TQListView( parent, name );
+ return new TQListView( tqparent, name );
} else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) {
- return new TQLineEdit( parent, name );
+ return new TQLineEdit( tqparent, name );
} else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) {
- return new TQSpinBox( parent, name );
+ return new TQSpinBox( tqparent, name );
} else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) {
- return new TQMultiLineEdit( parent, name );
+ return new TQMultiLineEdit( tqparent, name );
} else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) {
- return new TQLabel( parent, name );
+ return new TQLabel( tqparent, name );
} else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
- return new TQWidget( parent, name );
+ return new TQWidget( tqparent, name );
} else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) {
- return new TQTabWidget( parent, name );
+ return new TQTabWidget( tqparent, name );
} else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) {
- return new TQComboBox( FALSE, parent, name );
+ return new TQComboBox( FALSE, tqparent, name );
} else if ( className == TQWIDGET_OBJECT_NAME_STRING ) {
if ( !qwf_stays_on_top )
- return new TQWidget( parent, name );
- return new TQWidget( parent, name, Qt::WStyle_StaysOnTop );
+ return new TQWidget( tqparent, name );
+ return new TQWidget( tqparent, name, TQt::WStyle_StaysOnTop );
} else if ( className == TQDIALOG_OBJECT_NAME_STRING ) {
if ( !qwf_stays_on_top )
- return new TQDialog( parent, name );
- return new TQDialog( parent, name, FALSE, Qt::WStyle_StaysOnTop );
+ return new TQDialog( tqparent, name );
+ return new TQDialog( tqparent, name, FALSE, TQt::WStyle_StaysOnTop );
} else if ( className == TQWIZARD_OBJECT_NAME_STRING ) {
- return new TQWizard( parent, name );
+ return new TQWizard( tqparent, name );
} else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) {
- return new TQLCDNumber( parent, name );
+ return new TQLCDNumber( tqparent, name );
} else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) {
- return new TQProgressBar( parent, name );
+ return new TQProgressBar( tqparent, name );
} else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) {
- return new TQTextView( parent, name );
+ return new TQTextView( tqparent, name );
} else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) {
- return new TQTextBrowser( parent, name );
+ return new TQTextBrowser( tqparent, name );
} else if ( className == TQDIAL_OBJECT_NAME_STRING ) {
- return new TQDial( parent, name );
+ return new TQDial( tqparent, name );
} else if ( className == TQSLIDER_OBJECT_NAME_STRING ) {
- return new TQSlider( parent, name );
+ return new TQSlider( tqparent, name );
} else if ( className == TQFRAME_OBJECT_NAME_STRING ) {
- return new TQFrame( parent, name );
+ return new TQFrame( tqparent, name );
} else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) {
- return new TQSplitter( parent, name );
+ return new TQSplitter( tqparent, name );
} else if ( className == "Line" ) {
- TQFrame *f = new TQFrame( parent, name );
+ TQFrame *f = new TQFrame( tqparent, name );
f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
return f;
} else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) {
- return new TQTextEdit( parent, name );
+ return new TQTextEdit( tqparent, name );
} else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) {
- return new QDateEdit( parent, name );
+ return new TQDateEdit( tqparent, name );
} else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) {
- return new QTimeEdit( parent, name );
+ return new TQTimeEdit( tqparent, name );
} else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) {
- return new QDateTimeEdit( parent, name );
+ return new TQDateTimeEdit( tqparent, name );
} else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) {
- return new TQScrollBar( parent, name );
+ return new TQScrollBar( tqparent, name );
} else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) {
- return new TQPopupMenu( parent, name );
+ return new TQPopupMenu( tqparent, name );
} else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) {
- return new TQWidgetStack( parent, name );
+ return new TQWidgetStack( tqparent, name );
} else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) {
- return new TQToolBox( parent, name );
+ return new TQToolBox( tqparent, name );
} else if ( className == TQVBOX_OBJECT_NAME_STRING ) {
- return new TQVBox( parent, name );
+ return new TQVBox( tqparent, name );
} else if ( className == TQHBOX_OBJECT_NAME_STRING ) {
- return new TQHBox( parent, name );
+ return new TQHBox( tqparent, name );
} else if ( className == TQGRID_OBJECT_NAME_STRING ) {
- return new TQGrid( 4, parent, name );
+ return new TQGrid( 4, tqparent, name );
} else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) {
TQMainWindow *mw = 0;
if ( !qwf_stays_on_top )
- mw = new TQMainWindow( parent, name );
+ mw = new TQMainWindow( tqparent, name );
else
- mw = new TQMainWindow( parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop );
+ mw = new TQMainWindow( tqparent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop );
mw->setCentralWidget( new TQWidget( mw, "qt_central_widget" ) );
mw->centralWidget()->show();
(void)mw->statusBar();
return mw;
}
-#if !defined(QT_NO_SQL)
+#if !defined(TQT_NO_SQL)
else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) {
- return new TQDataTable( parent, name );
+ return new TQDataTable( tqparent, name );
} else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) {
- return new QDesignerDataBrowser2( parent, name );
+ return new TQDesignerDataBrowser2( tqparent, name );
} else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) {
- return new QDesignerDataView2( parent, name );
+ return new TQDesignerDataView2( tqparent, name );
}
#endif
@@ -1526,22 +1526,22 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
// try to create it using the loaded widget plugins
if ( !widgetInterfaceManager )
widgetInterfaceManager =
- new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(),
+ new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(),
*qwf_plugin_dir );
- QInterfacePtr<WidgetInterface> iface = 0;
+ TQInterfacePtr<WidgetInterface> iface = 0;
widgetInterfaceManager->queryInterface( className, &iface );
if ( iface ) {
- TQWidget *w = iface->create( className, parent, name );
+ TQWidget *w = iface->create( className, tqparent, name );
if ( w ) {
- d->customWidgets.replace( className.latin1(), new bool(TRUE) );
+ d->customWidgets.tqreplace( className.latin1(), new bool(TRUE) );
return w;
}
}
// hope we have a factory which can do it
for ( TQWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) {
- TQWidget *w = f->createWidget( className, parent, name );
+ TQWidget *w = f->createWidget( className, tqparent, name );
if ( w )
return w;
}
@@ -1564,11 +1564,11 @@ TQStringList TQWidgetFactory::widgets()
bool TQWidgetFactory::supportsWidget( const TQString &widget )
{
setupWidgetListAndMap();
- return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() );
+ return ( availableWidgetMap->tqfind( widget ) != availableWidgetMap->end() );
}
-TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent,
- TQLayout* layout, const TQString &classNameArg )
+TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *tqparent,
+ TQLayout* tqlayout, const TQString &classNameArg )
{
d->lastItem = 0;
TQDomElement n = e.firstChild().toElement();
@@ -1586,18 +1586,18 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
if ( colspan < 1 )
colspan = 1;
- bool isQLayoutWidget = FALSE;
+ bool isTQLayoutWidget = FALSE;
if ( !className.isEmpty() ) {
- if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
+ if ( !tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
className = TQWIDGET_OBJECT_NAME_STRING;
- isQLayoutWidget = TRUE;
+ isTQLayoutWidget = TRUE;
}
- if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
- // hide layout widgets
- w = parent;
+ if ( tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
+ // hide tqlayout widgets
+ w = tqparent;
} else {
- obj = TQWidgetFactory::createWidget( className, parent, 0 );
+ obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, tqparent, 0 ));
if ( !obj )
return 0;
w = (TQWidget*)obj;
@@ -1605,16 +1605,16 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
toplevel = w;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ( (TQMainWindow*)w )->centralWidget();
- if ( layout ) {
- switch( layoutType( layout ) ) {
+ if ( tqlayout ) {
+ switch( tqlayoutType( tqlayout ) ) {
case HBox:
- ( (TQHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
case VBox:
- ( (TQVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case Grid:
- ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -1622,12 +1622,12 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
}
- layout = 0;
+ tqlayout = 0;
}
}
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
- TQString parentClassName = parent ? parent->className() : 0;
- bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE;
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
+ TQString tqparentClassName = tqparent ? tqparent->className() : 0;
+ bool isPlugin = tqparent ? !!d->customWidgets.tqfind( tqparent->className() ) : FALSE;
if ( isPlugin )
qWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
@@ -1636,45 +1636,45 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
int idx = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
- createSpacer( n, layout );
+ createSpacer( n, tqlayout );
} else if ( n.tagName() == "widget" ) {
TQMap< TQString, TQString> *oldDbControls = dbControls;
- createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
+ createWidgetInternal( n, w, tqlayout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
dbControls = oldDbControls;
} else if ( n.tagName() == "hbox" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, TQWidgetFactory::HBox, isQLayoutWidget );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget );
else
- layout = createLayout( w, layout, TQWidgetFactory::HBox, isQLayoutWidget );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, TQWidgetFactory::HBox, isTQLayoutWidget );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row,
row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "grid" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, TQWidgetFactory::Grid, isQLayoutWidget );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget );
else
- layout = createLayout( w, layout, TQWidgetFactory::Grid, isQLayoutWidget );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, TQWidgetFactory::Grid, isTQLayoutWidget );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row,
row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "vbox" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, TQWidgetFactory::VBox, isQLayoutWidget );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget );
else
- layout = createLayout( w, layout, TQWidgetFactory::VBox, isQLayoutWidget );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, TQWidgetFactory::VBox, isTQLayoutWidget );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row,
row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "property" && obj ) {
@@ -1682,31 +1682,31 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
- if ( parent ) {
- if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
+ if ( tqparent ) {
+ if ( tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) );
- } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
+ ( (TQTabWidget*)tqparent )->insertTab( w, translate( v.toString() ) );
+ } else if ( tqparent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
if ( attrib == "id" )
- ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() );
- } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
+ ( (TQWidgetStack*)tqparent )->addWidget( w, v.toInt() );
+ } else if ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
if ( attrib == "label" )
- ( (TQToolBox*)parent )->addItem( w, v.toString() );
- } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
+ ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
+ } else if ( tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) );
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+ ( (TQWizard*)tqparent )->addPage( w, translate( v.toString() ) );
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( isPlugin ) {
if ( attrib == "label" ) {
WidgetInterface *iface = 0;
- widgetInterfaceManager->queryInterface( parentClassName, &iface );
+ widgetInterfaceManager->queryInterface( tqparentClassName, &iface );
if ( iface ) {
- QWidgetContainerInterfacePrivate *iface2 = 0;
- iface->queryInterface( IID_QWidgetContainer,
- (QUnknownInterface**)&iface2 );
+ TQWidgetContainerInterfacePrivate *iface2 = 0;
+ iface->queryInterface( IID_TQWidgetContainer,
+ (TQUnknownInterface**)&iface2 );
if ( iface2 ) {
- iface2->insertPage( parentClassName,
- (TQWidget*)parent, translate( v.toString() ), -1, w );
+ iface2->insertPage( tqparentClassName,
+ (TQWidget*)tqparent, translate( v.toString() ), -1, w );
iface2->release();
}
iface->release();
@@ -1728,47 +1728,47 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
return w;
}
-TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout,
- LayoutType type, bool isQLayoutWidget )
+TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* tqlayout,
+ LayoutType type, bool isTQLayoutWidget )
{
int spacing = defSpacing;
int margin = defMargin;
- if ( layout || !widget || isQLayoutWidget )
+ if ( tqlayout || !widget || isTQLayoutWidget )
margin = 0;
- if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ((TQToolBox*)widget)->currentItem();
TQLayout *l = 0;
int align = 0;
- if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
+ if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
- layout = gb->layout();
- layout->setMargin( 0 );
- layout->setSpacing( 0 );
- align = Qt::AlignTop;
+ tqlayout = gb->tqlayout();
+ tqlayout->setMargin( 0 );
+ tqlayout->setSpacing( 0 );
+ align = TQt::AlignTop;
}
- if ( layout ) {
+ if ( tqlayout ) {
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( layout );
+ l = new TQHBoxLayout( tqlayout );
break;
case VBox:
- l = new TQVBoxLayout( layout );
+ l = new TQVBoxLayout( tqlayout );
break;
case Grid:
- l = new TQGridLayout( layout );
+ l = new TQGridLayout( tqlayout );
break;
default:
return 0;
@@ -1788,19 +1788,19 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout,
return 0;
}
}
- l->setAlignment( align );
+ l->tqsetAlignment( align );
l->setMargin( margin );
l->setSpacing( spacing );
return l;
}
-TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) const
+TQWidgetFactory::LayoutType TQWidgetFactory::tqlayoutType( TQLayout *tqlayout ) const
{
- if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
+ if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
@@ -1808,18 +1808,18 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) cons
void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
TQVariant value )
{
- int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE );
+ int offset = obj->tqmetaObject()->tqfindProperty( prop.ascii(), TRUE );
if ( offset != -1 ) {
- if ( prop == "geometry" && obj == toplevel ) {
+ if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
toplevel->resize( value.toRect().size() );
} else if ( prop == "accel" ) {
- obj->setProperty( prop.ascii(), value.toKeySequence() );
+ obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) );
} else {
if ( value.type() == TQVariant::String ||
value.type() == TQVariant::CString ) {
const TQMetaProperty *metaProp =
- obj->metaObject()->property( offset, TRUE );
+ obj->tqmetaObject()->property( offset, TRUE );
if ( metaProp != 0 && metaProp->isEnumType() ) {
if ( metaProp->isSetType() ) {
TQStrList flagsCStr;
@@ -1850,9 +1850,9 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
} else if ( prop == "buddy" ) {
buddies.insert( obj->name(), value.toCString() );
} else if ( prop == "buttonGroupId" ) {
- if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
- ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() );
-#ifndef QT_NO_SQL
+ if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
+ ( (TQButtonGroup*)obj->tqparent() )->insert( (TQButton*)obj, value.toInt() );
+#ifndef TQT_NO_SQL
} else if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING )
&& !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) {
const TQStringList& lst = value.asStringList();
@@ -1917,7 +1917,7 @@ void TQWidgetFactory::setProperty( TQObject* widget, const TQString &prop, const
setProperty( widget, prop, value );
}
-void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
+void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *tqlayout )
{
TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
@@ -1938,7 +1938,7 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
orient = Qt::Vertical;
} else if ( prop == "sizeType" ) {
sizeType = stringToSizeType( n.firstChild().firstChild().toText().data() );
- } else if ( prop == "sizeHint" ) {
+ } else if ( prop == "tqsizeHint" ) {
w = n.firstChild().firstChild().firstChild().toText().data().toInt();
h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt();
}
@@ -1952,12 +1952,12 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
colspan = 1;
TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
- if ( layout ) {
- if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQBoxLayout*)layout )->addItem( item );
+ if ( tqlayout ) {
+ if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQBoxLayout*)tqlayout )->addItem( item );
else
- ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
- orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter );
+ ( (TQGridLayout*)tqlayout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
+ orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
}
}
@@ -2050,7 +2050,7 @@ struct Connection
Connection() : sender( 0 ), receiver( 0 ) { }
};
-class NormalizeObject : public QObject
+class NormalizeObject : public TQObject
{
public:
NormalizeObject() : TQObject() {}
@@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
- conn.sender = toplevel;
+ conn.sender = TQT_TQOBJECT(toplevel);
} else {
if ( name == "this" )
name = toplevel->name();
@@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
- conn.receiver = toplevel;
+ conn.receiver = TQT_TQOBJECT(toplevel);
} else {
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
if ( l ) {
@@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
- sender = toplevel;
+ sender = TQT_TQOBJECT(toplevel);
} else {
if ( !l || !l->first() ) {
delete l;
@@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
sender = findAction( conn.sender->name() );
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
- receiver = toplevel;
+ receiver = TQT_TQOBJECT(toplevel);
} else {
l = toplevel->queryList( 0, conn.receiver->name(), FALSE );
if ( !l || !l->first() ) {
@@ -2140,22 +2140,22 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
}
TQString s = "2""%1";
- s = s.arg( conn.signal );
+ s = s.tqarg( conn.signal.data() );
TQString s2 = "1""%1";
- s2 = s2.arg( conn.slot );
+ s2 = s2.tqarg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( TRUE );
- TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
+ TQStrList signalList = sender->tqmetaObject()->signalNames( TRUE );
+ TQStrList slotList = receiver->tqmetaObject()->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 ) {
- slotList = connector->metaObject()->slotNames( TRUE );
+ if ( slotList.tqfind( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) {
+ slotList = connector->tqmetaObject()->slotNames( TRUE );
receiver = connector;
}
// avoid warnings
- if ( signalList.find( conn.signal ) == -1 ||
- slotList.find( conn.slot ) == -1 ) {
+ if ( signalList.tqfind( conn.signal ) == -1 ||
+ slotList.tqfind( conn.slot ) == -1 ) {
n = n.nextSibling().toElement();
continue;
}
@@ -2206,40 +2206,40 @@ void TQWidgetFactory::createListViewColumn( TQListView *lv, const TQString& txt,
lv->header()->setResizeEnabled( resizable, i );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& txt,
const TQPixmap& pix,
const TQString& field, bool isRow )
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
bool isSql = table->inherits( TQDATATABLE_OBJECT_NAME_STRING );
#endif
if ( isRow )
table->setNumRows( table->numRows() + 1 );
else {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( !isSql )
#endif
table->setNumCols( table->numCols() + 1 );
}
TQValueList<Field> fieldMap;
- if ( fieldMaps.find( table ) != fieldMaps.end() ) {
- fieldMap = *fieldMaps.find( table );
+ if ( fieldMaps.tqfind( table ) != fieldMaps.end() ) {
+ fieldMap = *fieldMaps.tqfind( table );
fieldMaps.remove( table );
}
int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
if ( !pix.isNull() ) {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( isSql )
((TQDataTable*)table)->addColumn( field, txt, -1, pix );
else
#endif
h->setLabel( i, pix, txt );
} else {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( isSql )
((TQDataTable*)table)->addColumn( field, txt );
else
@@ -2279,7 +2279,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget )
}
createListViewColumn( lv, txt, pix, clickable, resizable );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
TQTable *table = (TQTable*)widget;
@@ -2344,7 +2344,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
} else {
new TQListBoxText( lb, txt );
}
-#ifndef QT_NO_ICONVIEW
+#ifndef TQT_NO_ICONVIEW
} else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
@@ -2399,13 +2399,13 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
-void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
+void TQWidgetFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
bool hasMenuText = FALSE;
if ( n.tagName() == "action" ) {
- a = new TQAction( parent );
+ a = new TQAction( tqparent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
@@ -2417,10 +2417,10 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
actionList.append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new TQActionGroup( parent );
+ a = new TQActionGroup( tqparent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
@@ -2435,7 +2435,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
actionList.append( a );
}
@@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( toplevel, n );
+ loadChildAction( TQT_TQOBJECT(toplevel), n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( toplevel, n );
+ loadChildAction( TQT_TQOBJECT(toplevel), n );
}
n = n.nextSibling().toElement();
}
@@ -2463,8 +2463,8 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
TQToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
- Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new TQToolBar( TQString::null, mw, dock );
+ TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
+ tb = new TQToolBar( TQString(), mw, dock );
tb->setLabel( n.attribute( "label" ) );
tb->setName( n.attribute( "name" ).ascii() );
TQDomElement n2 = n.firstChild().toElement();
@@ -2478,7 +2478,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
} else if ( n2.tagName() == "widget" ) {
(void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
} else if ( n2.tagName() == "property" ) {
- setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e )
popup->setName( n.attribute( "name" ).ascii() );
mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) {
- setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) {
mb->insertSeparator();
}
@@ -2595,12 +2595,12 @@ void TQWidgetFactory::loadExtraSource()
TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment )
{
- return qApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(),
+ return tqApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(),
TQApplication::UnicodeUTF8 );
}
TQString TQWidgetFactory::translate( const char *sourceText, const char *comment )
{
- return qApp->translate( d->translationContext, sourceText, comment,
+ return tqApp->translate( d->translationContext, sourceText, comment,
TQApplication::UnicodeUTF8 );
}
diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h
index 87daa640..c7028696 100644
--- a/kdevdesigner/uilib/qwidgetfactory.h
+++ b/kdevdesigner/uilib/qwidgetfactory.h
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,17 +17,17 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#ifndef QWIDGETFACTORY_H
-#define QWIDGETFACTORY_H
+#ifndef TQWIDGETFACTORY_H
+#define TQWIDGETFACTORY_H
-#ifndef QT_H
+#ifndef TQT_H
#include <tqstring.h>
#include <tqptrlist.h>
#include <tqimage.h>
@@ -35,7 +35,7 @@
#include <tqvaluelist.h>
#include <tqmap.h>
#include <tqaction.h>
-#endif // QT_H
+#endif // TQT_H
class TQDomDocument;
class TQDomElement;
@@ -45,21 +45,21 @@ class TQListViewItem;
class TQMenuBar;
class TQTable;
class TQWidget;
-class QWidgetFactoryPrivate;
+class TQWidgetFactoryPrivate;
class UibStrTable;
-class QWidgetFactory
+class TQWidgetFactory
{
public:
TQWidgetFactory();
virtual ~TQWidgetFactory();
- 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 TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
+ static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
static void addWidgetFactory( TQWidgetFactory *factory );
static void loadImages( const TQString &dir );
- virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const;
+ virtual TQWidget *createWidget( const TQString &className, TQWidget *tqparent, const char *name ) const;
static TQStringList widgets();
static bool supportsWidget( const TQString &widget );
@@ -68,12 +68,12 @@ private:
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;
+ TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout, const TQString &classNameArg );
+ TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type, bool isTQLayoutWidget = FALSE );
+ LayoutType tqlayoutType( 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 );
+ void createSpacer( const TQDomElement &e, TQLayout *tqlayout );
TQImage loadFromCollection( const TQString &name );
TQPixmap loadPixmap( const TQString &name );
TQPixmap loadPixmap( const TQDomElement &e );
@@ -81,7 +81,7 @@ private:
void createListViewColumn( TQListView *lv, const TQString& txt,
const TQPixmap& pix, bool clickable,
bool resizable );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
void createTableColumnOrRow( TQTable *table, const TQString& txt,
const TQPixmap& pix, const TQString& field,
bool isRow );
@@ -89,7 +89,7 @@ private:
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 loadChildAction( TQObject *tqparent, const TQDomElement &e );
void loadActions( const TQDomElement &e );
void loadToolBars( const TQDomElement &e );
void loadMenuBar( const TQDomElement &e );
@@ -98,10 +98,10 @@ private:
TQAction *findAction( const TQString &name );
void loadExtraSource();
TQString translate( const char *sourceText, const char *comment = "" );
- TQString translate( const TQString& sourceText, const TQString& comment = TQString::null );
+ TQString translate( const TQString& sourceText, const TQString& comment = TQString() );
- void unpackUInt16( TQDataStream& in, Q_UINT16& n );
- void unpackUInt32( TQDataStream& in, Q_UINT32& n );
+ void unpackUInt16( TQDataStream& in, TQ_UINT16& n );
+ void unpackUInt32( TQDataStream& in, TQ_UINT32& n );
void unpackByteArray( TQDataStream& in, TQByteArray& array );
void unpackCString( const UibStrTable& strings, TQDataStream& in,
TQCString& cstr );
@@ -112,21 +112,21 @@ private:
void unpackVariant( const UibStrTable& strings, TQDataStream& in,
TQVariant& value );
void inputSpacer( const UibStrTable& strings, TQDataStream& in,
- TQLayout *parent );
+ TQLayout *tqparent );
void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in,
- TQObject *parent, bool isRow );
+ TQObject *tqparent, bool isRow );
void inputItem( const UibStrTable& strings, TQDataStream& in,
- TQObject *parent, TQListViewItem *parentItem = 0 );
+ TQObject *tqparent, TQListViewItem *tqparentItem = 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,
+ TQWidget *ancestorWidget, TQObject *tqparent,
TQCString className = "" );
TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector,
- TQWidget *parent, const char *name );
+ TQWidget *tqparent, const char *name );
TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector,
- TQWidget *parent, const char *name );
+ TQWidget *tqparent, const char *name );
private:
struct Image {
@@ -145,7 +145,7 @@ private:
TQString name;
TQPixmap pix;
TQString field;
- Q_DUMMY_COMPARISON_OPERATOR( Field )
+ TQ_DUMMY_COMPARISON_OPERATOR( Field )
};
struct SqlWidgetConnection
@@ -156,12 +156,12 @@ private:
TQString conn;
TQString table;
TQMap<TQString, TQString> *dbControls;
- Q_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection )
+ TQ_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection )
};
TQValueList<Image> images;
TQWidget *toplevel;
- QWidgetFactoryPrivate *d;
+ TQWidgetFactoryPrivate *d;
TQMap<TQString, TQString> *dbControls;
TQMap<TQString, TQStringList> dbTables;
TQMap<TQWidget*, SqlWidgetConnection> sqlWidgetConnections;