diff options
Diffstat (limited to 'krita/ui/layerlist.h')
-rw-r--r-- | krita/ui/layerlist.h | 157 |
1 files changed, 79 insertions, 78 deletions
diff --git a/krita/ui/layerlist.h b/krita/ui/layerlist.h index b981b266..129baa7c 100644 --- a/krita/ui/layerlist.h +++ b/krita/ui/layerlist.h @@ -21,27 +21,28 @@ #ifndef LAYERLIST_H #define LAYERLIST_H -#include <qiconset.h> +#include <tqiconset.h> #include <klistview.h> -class QMouseEvent; -class QString; +class TQMouseEvent; +class TQString; class KPopupMenu; class LayerItem; class LayerFolder; -template<class T> class QPtrList; +template<class T> class TQPtrList; class LayerList: public KListView { Q_OBJECT + TQ_OBJECT public: - LayerList( QWidget *parent = 0, const char *name = 0 ); + LayerList( TQWidget *tqparent = 0, const char *name = 0 ); virtual ~LayerList(); - void addProperty( const QString &name, const QString &displayName, const QIconSet &icon = QIconSet(), + void addProperty( const TQString &name, const TQString &displayName, const TQIconSet &icon = TQIconSet(), bool defaultValue = false, bool validForFolders = true ); - void addProperty( const QString &name, const QString &displayName, QPixmap enabled, QPixmap disabled, + void addProperty( const TQString &name, const TQString &displayName, TQPixmap enabled, TQPixmap disabled, bool defaultValue = false, bool validForFolders = true ); bool foldersCanBeActive() const; @@ -55,13 +56,13 @@ public: LayerItem *activeLayer() const; int activeLayerID() const; - QValueList<LayerItem*> selectedLayers() const; - QValueList<int> selectedLayerIDs() const; + TQValueList<LayerItem*> selectedLayers() const; + TQValueList<int> selectedLayerIDs() const; void makeFolder( int id ); bool isFolder( int id ) const; - QString displayName( int id ) const; - bool property( int id, const QString &name ) const; + TQString displayName( int id ) const; + bool property( int id, const TQString &name ) const; struct MenuItems { @@ -78,29 +79,29 @@ public slots: void setActiveLayer( LayerItem *layer ); void setActiveLayer( int id ); - void setLayerDisplayName( LayerItem *layer, const QString &displayName ); - void setLayerDisplayName( int id, const QString &displayName ); + void setLayerDisplayName( LayerItem *layer, const TQString &displayName ); + void setLayerDisplayName( int id, const TQString &displayName ); - void setLayerProperty( LayerItem *layer, const QString &name, bool on ); - void setLayerProperty( int id, const QString &name, bool on ); + void setLayerProperty( LayerItem *layer, const TQString &name, bool on ); + void setLayerProperty( int id, const TQString &name, bool on ); - void toggleLayerProperty( LayerItem *layer, const QString &name ); - void toggleLayerProperty( int id, const QString &name ); + void toggleLayerProperty( LayerItem *layer, const TQString &name ); + void toggleLayerProperty( int id, const TQString &name ); - void setLayerPreviewImage( LayerItem *layer, QImage *image ); - void setLayerPreviewImage( int id, QImage *image ); + void setLayerPreviewImage( LayerItem *layer, TQImage *image ); + void setLayerPreviewImage( int id, TQImage *image ); void layerPreviewChanged( LayerItem *layer ); void layerPreviewChanged( int id ); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayer( const QString &displayName, int afterID, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, int afterID, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, int parentID, int afterID = -1, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, int tqparentID, int afterID = -1, int id = -1 ); - void moveLayer( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void moveLayer( int id, int parentID, int afterID ); + void moveLayer( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void moveLayer( int id, int tqparentID, int afterID ); void removeLayer( LayerItem *layer ); void removeLayer( int id ); @@ -109,26 +110,26 @@ signals: void activated( LayerItem *layer ); void activated( int id ); - void displayNameChanged( LayerItem *layer, const QString &displayName ); - void displayNameChanged( int id, const QString &displayName ); + void displayNameChanged( LayerItem *layer, const TQString &displayName ); + void displayNameChanged( int id, const TQString &displayName ); - void propertyChanged( LayerItem *layer, const QString &name, bool on ); - void propertyChanged( int id, const QString &name, bool on ); + void propertyChanged( LayerItem *layer, const TQString &name, bool on ); + void propertyChanged( int id, const TQString &name, bool on ); - void layerMoved( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void layerMoved( int id, int parentID, int afterID ); + void layerMoved( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void layerMoved( int id, int tqparentID, int afterID ); - void requestNewLayer( LayerItem *parent, LayerItem *after ); - void requestNewLayer( int parentID, int afterID ); + void requestNewLayer( LayerItem *tqparent, LayerItem *after ); + void requestNewLayer( int tqparentID, int afterID ); - void requestNewFolder( LayerItem *parent, LayerItem *after ); - void requestNewFolder( int parentID, int afterID ); + void requestNewFolder( LayerItem *tqparent, LayerItem *after ); + void requestNewFolder( int tqparentID, int afterID ); void requestRemoveLayer( LayerItem *layer ); void requestRemoveLayer( int id ); - void requestRemoveLayers( QValueList<LayerItem*> layers ); - void requestRemoveLayers( QValueList<int> ids ); + void requestRemoveLayers( TQValueList<LayerItem*> layers ); + void requestRemoveLayers( TQValueList<int> ids ); void requestLayerProperties( LayerItem *layer ); void requestLayerProperties( int id ); @@ -150,26 +151,26 @@ private: Private* const d; private slots: - void slotItemRenamed( QListViewItem *item, const QString &text, int col ); - void slotItemMoved( QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>& ); + void slotItemRenamed( TQListViewItem *item, const TQString &text, int col ); + void slotItemMoved( TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>& ); void showContextMenu(); void hideTip(); void maybeTip(); public: //reimplemented for internal reasons - virtual void setCurrentItem( QListViewItem *i ); + virtual void setCurrentItem( TQListViewItem *i ); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); - virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e ); - virtual void findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); + virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e ); + virtual void findDrop( const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after ); }; class LayerItem: public KListViewItem { public: - LayerItem( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ); - LayerItem( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); virtual ~LayerItem(); void makeFolder(); @@ -177,24 +178,24 @@ public: // Returns true if this item is the given item or the tree rooted at // this item contains the given item. - bool contains(const LayerItem *item); + bool tqcontains(const LayerItem *item); int id() const; - QString displayName() const; - void setDisplayName( const QString &displayName ); + TQString displayName() const; + void setDisplayName( const TQString &displayName ); bool isActive() const; void setActive(); - bool property( const QString &name ) const; - void setProperty( const QString &name, bool on ); - void toggleProperty( const QString &name ); + bool property( const TQString &name ) const; + void setProperty( const TQString &name, bool on ); + void toggleProperty( const TQString &name ); - void setPreviewImage( QImage *image ); + void setPreviewImage( TQImage *image ); void previewChanged(); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); LayerItem *prevSibling() const; @@ -202,41 +203,41 @@ public: //convenience LayerItem *nextSibling() const; LayerList *listView() const; LayerItem *firstChild() const; - LayerItem *parent() const; - void update() const; //like QWidget::update() + LayerItem *tqparent() const; + void update() const; //like TQWidget::update() protected: - virtual QRect rect() const; + virtual TQRect rect() const; int mapXFromListView( int x ) const; int mapYFromListView( int y ) const; - QPoint mapFromListView( const QPoint &point ) const; - QRect mapFromListView( const QRect &rect ) const; + TQPoint mapFromListView( const TQPoint &point ) const; + TQRect mapFromListView( const TQRect &rect ) const; int mapXToListView( int x ) const; int mapYToListView( int y ) const; - QPoint mapToListView( const QPoint &point ) const; - QRect mapToListView( const QRect &rect ) const; + TQPoint mapToListView( const TQPoint &point ) const; + TQRect mapToListView( const TQRect &rect ) const; - virtual QRect textRect() const; - virtual QRect iconsRect() const; - virtual QRect previewRect() const; + virtual TQRect textRect() const; + virtual TQRect iconsRect() const; + virtual TQRect previewRect() const; - virtual void drawText( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawIcons( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawPreview( QPainter *p, const QColorGroup &cg, const QRect &r ); + virtual void drawText( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawIcons( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawPreview( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); bool multiline() const; bool showPreview() const; - virtual QFont font() const; - QFontMetrics fontMetrics() const; + virtual TQFont font() const; + TQFontMetrics fontMetrics() const; - virtual bool mousePressEvent( QMouseEvent *e ); + virtual bool mousePressEvent( TQMouseEvent *e ); - virtual QString tooltip() const; + virtual TQString tooltip() const; - virtual QImage *previewImage() const; - virtual QImage tooltipPreview() const; + virtual TQImage *previewImage() const; + virtual TQImage tooltipPreview() const; private: typedef KListViewItem super; @@ -249,8 +250,8 @@ private: void init(); public: //reimplemented for internal reasons - virtual int width( const QFontMetrics &fm, const QListView *lv, int c ) const; - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual int width( const TQFontMetrics &fm, const TQListView *lv, int c ) const; + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); virtual void setup(); virtual void setSelected( bool selected ); }; @@ -258,10 +259,10 @@ public: //reimplemented for internal reasons class LayerFolder: public LayerItem { public: - LayerFolder( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } - LayerFolder( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } }; |