summaryrefslogtreecommitdiffstats
path: root/kommander/editor/widgetfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/widgetfactory.h')
-rw-r--r--kommander/editor/widgetfactory.h304
1 files changed, 152 insertions, 152 deletions
diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h
index 03d2b2f1..68fcc9ea 100644
--- a/kommander/editor/widgetfactory.h
+++ b/kommander/editor/widgetfactory.h
@@ -21,28 +21,28 @@
#ifndef WIDGETFACTORY_H
#define WIDGETFACTORY_H
-#include <qvariant.h>
-#include <qiconset.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qtabwidget.h>
-#include <qpixmap.h>
-#include <qsize.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qptrdict.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqvariant.h>
+#include <tqiconset.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqtabwidget.h>
+#include <tqpixmap.h>
+#include <tqsize.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqptrdict.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include "metadatabase.h"
#ifndef KOMMANDER
-#include "qwidgetfactory.h"
+#include "tqwidgetfactory.h"
#include "ewidgetfactory.h"
#else
#include "kommanderfactory.h"
@@ -70,40 +70,40 @@ public:
NoLayout
};
- static QWidget *create( int id, QWidget *parent, const char *name = 0, bool init = TRUE,
- const QRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
- static QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
- static void deleteLayout( QWidget *widget );
+ static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
+ const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
+ static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ static void deleteLayout( TQWidget *widget );
- static LayoutType layoutType( QWidget *w );
- static LayoutType layoutType( QWidget *w, QLayout *&layout );
- static LayoutType layoutType( QLayout *layout );
- static QWidget *layoutParent( QLayout *layout );
+ static LayoutType layoutType( TQWidget *w );
+ static LayoutType layoutType( TQWidget *w, TQLayout *&layout );
+ static LayoutType layoutType( TQLayout *layout );
+ static TQWidget *layoutParent( TQLayout *layout );
- static QWidget* containerOfWidget( QWidget *w );
- static QWidget* widgetOfContainer( QWidget *w );
+ static TQWidget* containerOfWidget( TQWidget *w );
+ static TQWidget* widgetOfContainer( TQWidget *w );
- static bool isPassiveInteractor( QObject* o );
- static const char* classNameOf( QObject* o );
+ static bool isPassiveInteractor( TQObject* o );
+ static const char* classNameOf( TQObject* o );
- static void initChangedProperties( QObject *o );
+ static void initChangedProperties( TQObject *o );
static bool hasSpecialEditor( int id );
static bool hasItems( int id );
- static void editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
- static bool canResetProperty( QObject *w, const QString &propName );
- static bool resetProperty( QObject *w, const QString &propName );
- static QVariant defaultValue( QObject *w, const QString &propName );
- static QString defaultCurrentItem( QObject *w, const QString &propName );
+ static bool canResetProperty( TQObject *w, const TQString &propName );
+ static bool resetProperty( TQObject *w, const TQString &propName );
+ static TQVariant defaultValue( TQObject *w, const TQString &propName );
+ static TQString defaultCurrentItem( TQObject *w, const TQString &propName );
- static QVariant property( QObject *w, const char *name );
- static void saveDefaultProperties( QWidget *w, int id );
+ static TQVariant property( TQObject *w, const char *name );
+ static void saveDefaultProperties( TQWidget *w, int id );
private:
- static QWidget *createWidget( const QString &className, QWidget *parent, const char *name, bool init,
- const QRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
- static QWidget *createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
+ static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+ const TQRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
+ static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
};
@@ -112,28 +112,28 @@ class QDesignerTabWidget : public QTabWidget
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerTabWidget( QWidget *parent, const char *name );
+ QDesignerTabWidget( TQWidget *parent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
int count() const;
- QTabBar *tabBar() const { return QTabWidget::tabBar(); }
+ TQTabBar *tabBar() const { return TQTabWidget::tabBar(); }
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
- QPoint pressPoint;
- QWidget *dropIndicator;
- QWidget *dragPage;
- QString dragLabel;
+ TQPoint pressPoint;
+ TQWidget *dropIndicator;
+ TQWidget *dragPage;
+ TQString dragLabel;
bool mousePressed;
};
@@ -141,28 +141,28 @@ class EditorTabWidget : public TabWidget
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorTabWidget( QWidget *parent, const char *name );
+ EditorTabWidget( TQWidget *parent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
int count() const;
- QTabBar *tabBar() const { return QTabWidget::tabBar(); }
+ TQTabBar *tabBar() const { return TQTabWidget::tabBar(); }
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
- QPoint pressPoint;
- QWidget *dropIndicator;
- QWidget *dragPage;
- QString dragLabel;
+ TQPoint pressPoint;
+ TQWidget *dropIndicator;
+ TQWidget *dragPage;
+ TQString dragLabel;
bool mousePressed;
};
@@ -170,17 +170,17 @@ class EditorToolBox : public ToolBox
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorToolBox( QWidget *parent, const char *name );
+ EditorToolBox( TQWidget *parent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
int count() const;
};
@@ -189,34 +189,34 @@ class QDesignerWizard : public QWizard
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerWizard( QWidget *parent, const char *name ) : QWizard( parent, name ) {}
+ QDesignerWizard( TQWidget *parent, const char *name ) : TQWizard( parent, name ) {}
int currentPageNum() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
- int pageNum( QWidget *page );
- void addPage( QWidget *p, const QString & );
- void removePage( QWidget *p );
- void insertPage( QWidget *p, const QString &t, int index );
- bool isPageRemoved( QWidget *p ) { return (removedPages.find( p ) != 0); }
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
+ int pageNum( TQWidget *page );
+ void addPage( TQWidget *p, const TQString & );
+ void removePage( TQWidget *p );
+ void insertPage( TQWidget *p, const TQString &t, int index );
+ bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); }
void reject() {}
private:
struct Page
{
- Page( QWidget *a, const QString &b ) : p( a ), t( b ) {}
- Page() : p( 0 ), t( QString::null ) {}
- QWidget *p;
- QString t;
+ Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {}
+ Page() : p( 0 ), t( TQString::null ) {}
+ TQWidget *p;
+ TQString t;
};
- QPtrDict<QWidget> removedPages;
+ TQPtrDict<TQWidget> removedPages;
};
@@ -225,15 +225,15 @@ class QLayoutWidget : public QWidget
Q_OBJECT
public:
- QLayoutWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), sp( QWidget::sizePolicy() ) {}
+ QLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( TQWidget::sizePolicy() ) {}
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
void updateSizePolicy();
protected:
- void paintEvent( QPaintEvent * );
- bool event( QEvent * );
- QSizePolicy sp;
+ void paintEvent( TQPaintEvent * );
+ bool event( TQEvent * );
+ TQSizePolicy sp;
};
@@ -243,26 +243,26 @@ class CustomWidget : public QWidget
Q_OBJECT
public:
- CustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
- : QWidget( parent, name ), cusw( cw ) {
+ CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
+ : TQWidget( parent, name ), cusw( cw ) {
alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" );
setSizePolicy( cw->sizePolicy );
if ( !alwaysExpand )
setBackgroundMode( PaletteDark );
}
- QSize sizeHint() const {
- QSize sh = cusw->sizeHint;
+ TQSize sizeHint() const {
+ TQSize sh = cusw->sizeHint;
if ( sh.isValid() )
return sh;
- return QWidget::sizeHint();
+ return TQWidget::sizeHint();
}
- QString realClassName() { return cusw->className; }
+ TQString realClassName() { return cusw->className; }
MetaDataBase::CustomWidget *customWidget() const { return cusw; }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
MetaDataBase::CustomWidget *cusw;
bool alwaysExpand;
@@ -277,11 +277,11 @@ class Line : public QFrame
Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
Q_OVERRIDE( int frameWidth DESIGNABLE false )
Q_OVERRIDE( Shape frameShape DESIGNABLE false )
- Q_OVERRIDE( QRect frameRect DESIGNABLE false )
- Q_OVERRIDE( QRect contentsRect DESIGNABLE false )
+ Q_OVERRIDE( TQRect frameRect DESIGNABLE false )
+ Q_OVERRIDE( TQRect contentsRect DESIGNABLE false )
public:
- Line( QWidget *parent, const char *name )
- : QFrame( parent, name, WMouseNoMask ) {
+ Line( TQWidget *parent, const char *name )
+ : TQFrame( parent, name, WMouseNoMask ) {
setFrameStyle( HLine | Sunken );
}
@@ -300,23 +300,23 @@ class QDesignerLabel : public QLabel
{
Q_OBJECT
- Q_PROPERTY( QCString buddy READ buddyWidget WRITE setBuddyWidget )
+ Q_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
public:
- QDesignerLabel( QWidget *parent = 0, const char *name = 0 )
- : QLabel( parent, name ) { myBuddy = 0; }
+ QDesignerLabel( TQWidget *parent = 0, const char *name = 0 )
+ : TQLabel( parent, name ) { myBuddy = 0; }
- void setBuddyWidget( const QCString &b ) {
+ void setBuddyWidget( const TQCString &b ) {
myBuddy = b;
updateBuddy();
}
- QCString buddyWidget() const {
+ TQCString buddyWidget() const {
return myBuddy;
};
protected:
- void showEvent( QShowEvent *e ) {
- QLabel::showEvent( e );
+ void showEvent( TQShowEvent *e ) {
+ TQLabel::showEvent( e );
updateBuddy();
}
@@ -324,7 +324,7 @@ protected:
private:
void updateBuddy();
- QCString myBuddy;
+ TQCString myBuddy;
};
@@ -333,11 +333,11 @@ class QDesignerWidget : public QWidget
Q_OBJECT
public:
- QDesignerWidget( FormWindow *fw, QWidget *parent, const char *name )
- : QWidget( parent, name, WResizeNoErase ), formwindow( fw ) {}
+ QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) {}
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -349,11 +349,11 @@ class QDesignerDialog : public QDialog
Q_OBJECT
public:
- QDesignerDialog( FormWindow *fw, QWidget *parent, const char *name )
- : QDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
+ QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
+ : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -366,19 +366,19 @@ class QDesignerToolButton : public QToolButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerToolButton( QWidget *parent, const char *name )
- : QToolButton( parent, name ) {}
+ QDesignerToolButton( TQWidget *parent, const char *name )
+ : TQToolButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
};
@@ -389,19 +389,19 @@ class QDesignerRadioButton : public QRadioButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerRadioButton( QWidget *parent, const char *name )
- : QRadioButton( parent, name ) {}
+ QDesignerRadioButton( TQWidget *parent, const char *name )
+ : TQRadioButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -413,19 +413,19 @@ class QDesignerPushButton : public QPushButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerPushButton( QWidget *parent, const char *name )
- : QPushButton( parent, name ) {}
+ QDesignerPushButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -437,19 +437,19 @@ class QDesignerCheckBox : public QCheckBox
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerCheckBox( QWidget *parent, const char *name )
- : QCheckBox( parent, name ) {}
+ QDesignerCheckBox( TQWidget *parent, const char *name )
+ : TQCheckBox( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -460,11 +460,11 @@ class EditorDialog : public Dialog
Q_OBJECT
public:
- EditorDialog( FormWindow *fw, QWidget *parent, const char *name )
+ EditorDialog( FormWindow *fw, TQWidget *parent, const char *name )
: Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;