diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/uilib/qwidgetfactory.h | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/uilib/qwidgetfactory.h')
-rw-r--r-- | kdevdesigner/uilib/qwidgetfactory.h | 190 |
1 files changed, 95 insertions, 95 deletions
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 |