summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/actiondnd.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/actiondnd.h')
-rw-r--r--kdevdesigner/designer/actiondnd.h156
1 files changed, 78 insertions, 78 deletions
diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h
index fcf37fe9..5d189f7c 100644
--- a/kdevdesigner/designer/actiondnd.h
+++ b/kdevdesigner/designer/actiondnd.h
@@ -27,15 +27,15 @@
#ifndef ACTIONDND_H
#define ACTIONDND_H
-#include <qaction.h>
-#include <qdragobject.h>
-#include <qmap.h>
-#include <qmenubar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qtoolbar.h>
-#include <qguardedptr.h>
+#include <tqaction.h>
+#include <tqdragobject.h>
+#include <tqmap.h>
+#include <tqmenubar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqtoolbar.h>
+#include <tqguardedptr.h>
#include "../shared/widgetdatabase.h"
//class QDesignerPopupMenu;
@@ -48,8 +48,8 @@ class QDesignerIndicatorWidget : public QWidget
Q_OBJECT
public:
- QDesignerIndicatorWidget( QWidget *p )
- : QWidget( p, "qt_dockwidget_internal" ) {
+ QDesignerIndicatorWidget( TQWidget *p )
+ : TQWidget( p, "qt_dockwidget_internal" ) {
setBackgroundColor( red );
}
@@ -60,21 +60,21 @@ class ActionDrag : public QStoredDrag
Q_OBJECT
public:
- ActionDrag(const QString &type, QAction *action, QWidget *source);
- ActionDrag(QAction *action, QWidget *source);
- ActionDrag(QActionGroup *group, QWidget *source);
+ ActionDrag(const TQString &type, TQAction *action, TQWidget *source);
+ ActionDrag(TQAction *action, TQWidget *source);
+ ActionDrag(TQActionGroup *group, TQWidget *source);
~ActionDrag();
- static bool canDecode(QDropEvent *e);
+ static bool canDecode(TQDropEvent *e);
- static QAction *action()
+ static TQAction *action()
{
return the_action;
}
private:
- static QAction *the_action;
+ static TQAction *the_action;
};
class QDesignerActionGroup : public QActionGroup
@@ -82,32 +82,32 @@ class QDesignerActionGroup : public QActionGroup
Q_OBJECT
public:
- QDesignerActionGroup( QObject *parent )
- : QActionGroup( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
+ QDesignerActionGroup( TQObject *parent )
+ : TQActionGroup( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
void init();
- QWidget *widget() const { return wid; }
- QWidget *widget( QAction *a ) const { return *widgets.find( a ); }
+ TQWidget *widget() const { return wid; }
+ TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); }
int index() const { return idx; }
protected:
#if !defined(Q_NO_USING_KEYWORD)
- using QActionGroup::addedTo;
+ using TQActionGroup::addedTo;
#endif
- void addedTo( QWidget *w, QWidget * ) {
+ void addedTo( TQWidget *w, TQWidget * ) {
wid = w;
}
- void addedTo( QWidget *w, QWidget *, QAction *a ) {
+ void addedTo( TQWidget *w, TQWidget *, TQAction *a ) {
widgets.insert( a, w );
}
- void addedTo( int index, QPopupMenu * ) {
+ void addedTo( int index, TQPopupMenu * ) {
idx = index;
}
private:
- QWidget *wid;
- QMap<QAction *, QWidget *> widgets;
+ TQWidget *wid;
+ TQMap<TQAction *, TQWidget *> widgets;
int idx;
};
@@ -117,34 +117,34 @@ class QDesignerAction : public QAction
Q_OBJECT
public:
- QDesignerAction( QObject *parent )
- : QAction( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
- QDesignerAction( QWidget *w, QObject *parent )
- : QAction( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
+ QDesignerAction( TQObject *parent )
+ : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
+ QDesignerAction( TQWidget *w, TQObject *parent )
+ : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
void init();
- QWidget *widget() const { return wid; }
+ TQWidget *widget() const { return wid; }
int index() const { return idx; }
- bool addTo( QWidget *w );
- bool removeFrom( QWidget *w );
+ bool addTo( TQWidget *w );
+ bool removeFrom( TQWidget *w );
void remove();
bool supportsMenu() const { return !widgetToInsert; }
protected:
- void addedTo( QWidget *w, QWidget * ) {
+ void addedTo( TQWidget *w, TQWidget * ) {
wid = w;
}
- void addedTo( int index, QPopupMenu * ) {
+ void addedTo( int index, TQPopupMenu * ) {
idx = index;
}
private:
- QWidget *wid;
+ TQWidget *wid;
int idx;
- QWidget *widgetToInsert;
+ TQWidget *widgetToInsert;
};
@@ -153,15 +153,15 @@ class QDesignerToolBarSeparator : public QWidget
Q_OBJECT
public:
- QDesignerToolBarSeparator( Orientation, QToolBar *parent, const char* name=0 );
+ QDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
Orientation orientation() const { return orient; }
public slots:
void setOrientation( Orientation );
protected:
- void styleChange( QStyle& );
- void paintEvent( QPaintEvent * );
+ void styleChange( TQStyle& );
+ void paintEvent( TQPaintEvent * );
private:
Orientation orient;
};
@@ -172,15 +172,15 @@ class QSeparatorAction : public QAction
Q_OBJECT
public:
- QSeparatorAction( QObject *parent );
+ QSeparatorAction( TQObject *parent );
- bool addTo( QWidget *w );
- bool removeFrom( QWidget *w );
- QWidget *widget() const;
+ bool addTo( TQWidget *w );
+ bool removeFrom( TQWidget *w );
+ TQWidget *widget() const;
int index() const;
private:
- QWidget *wid;
+ TQWidget *wid;
int idx;
};
@@ -191,53 +191,53 @@ class QDesignerToolBar : public QToolBar
Q_OBJECT
public:
- QDesignerToolBar( QMainWindow *mw );
- QDesignerToolBar( QMainWindow *mw, Dock dock );
- QPtrList<QAction> insertedActions() const { return actionList; }
- void addAction( QAction *a );
+ QDesignerToolBar( TQMainWindow *mw );
+ QDesignerToolBar( TQMainWindow *mw, Dock dock );
+ TQPtrList<TQAction> insertedActions() const { return actionList; }
+ void addAction( TQAction *a );
void clear();
- void installEventFilters( QWidget *w );
- void insertAction( QWidget *w, QAction *a ) { actionMap.insert( w, a ); }
- void insertAction( int index, QAction *a ) { actionList.insert( index, a ); }
- void appendAction( QAction *a ) { actionList.append( a ); }
- void removeAction( QAction *a ) { actionList.remove( a ); }
+ void installEventFilters( TQWidget *w );
+ void insertAction( TQWidget *w, TQAction *a ) { actionMap.insert( w, a ); }
+ void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); }
+ void appendAction( TQAction *a ) { actionList.append( a ); }
+ void removeAction( TQAction *a ) { actionList.remove( a ); }
void reInsert();
- void removeWidget( QWidget *w );
+ void removeWidget( TQWidget *w );
protected:
- bool eventFilter( QObject *, QEvent * );
- void paintEvent( QPaintEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
+ void paintEvent( TQPaintEvent * );
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent( QDragEnterEvent * );
- void dragMoveEvent( QDragMoveEvent * );
- void dragLeaveEvent( QDragLeaveEvent * );
- void dropEvent( QDropEvent * );
+ void dragEnterEvent( TQDragEnterEvent * );
+ void dragMoveEvent( TQDragMoveEvent * );
+ void dragLeaveEvent( TQDragLeaveEvent * );
+ void dropEvent( TQDropEvent * );
#endif
- void contextMenuEvent( QContextMenuEvent *e );
- void mousePressEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
+ void contextMenuEvent( TQContextMenuEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
private slots:
void actionRemoved();
private:
- void drawIndicator( const QPoint &pos );
- QPoint calcIndicatorPos( const QPoint &pos );
- void buttonContextMenuEvent( QContextMenuEvent *e, QObject *o );
- void buttonMousePressEvent( QMouseEvent *e, QObject *o );
- void buttonMouseMoveEvent( QMouseEvent *e, QObject *o );
- void buttonMouseReleaseEvent( QMouseEvent *e, QObject *o );
- void doInsertWidget( const QPoint &p );
+ void drawIndicator( const TQPoint &pos );
+ TQPoint calcIndicatorPos( const TQPoint &pos );
+ void buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o );
+ void buttonMousePressEvent( TQMouseEvent *e, TQObject *o );
+ void buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o );
+ void buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *o );
+ void doInsertWidget( const TQPoint &p );
void findFormWindow();
private:
- QPoint lastIndicatorPos;
- QWidget *insertAnchor;
+ TQPoint lastIndicatorPos;
+ TQWidget *insertAnchor;
bool afterAnchor;
- QPtrList<QAction> actionList;
- QMap<QWidget*, QAction*> actionMap;
- QPoint dragStartPos;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQWidget*, TQAction*> actionMap;
+ TQPoint dragStartPos;
QDesignerIndicatorWidget *indicator;
bool widgetInserting;
FormWindow *formWindow;