diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/dockers/vdocumentdocker.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karbon/dockers/vdocumentdocker.h')
-rw-r--r-- | karbon/dockers/vdocumentdocker.h | 118 |
1 files changed, 61 insertions, 57 deletions
diff --git a/karbon/dockers/vdocumentdocker.h b/karbon/dockers/vdocumentdocker.h index 278f56ba..4f60949a 100644 --- a/karbon/dockers/vdocumentdocker.h +++ b/karbon/dockers/vdocumentdocker.h @@ -20,14 +20,14 @@ #ifndef __VDOCUMENTDOCKER_H__ #define __VDOCUMENTDOCKER_H__ -#include <qlistview.h> -#include <qptrdict.h> +#include <tqlistview.h> +#include <tqptrdict.h> -class QHButtonGroup; -class QPoint; -class QLabel; -class QPixmap; -class QCheckBox; +class TQHButtonGroup; +class TQPoint; +class TQLabel; +class TQPixmap; +class TQCheckBox; class VDocument; class VLayer; @@ -37,19 +37,20 @@ class KarbonView; * Document Tab * *************************************************************************/ -class VDocumentPreview : public QWidget +class VDocumentPreview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VDocumentPreview( KarbonView* view, QWidget* parent = 0 ); + VDocumentPreview( KarbonView* view, TQWidget* tqparent = 0 ); ~VDocumentPreview(); void reset(); protected: - void paintEvent( QPaintEvent* e ); - virtual bool eventFilter( QObject* object, QEvent* event ); + void paintEvent( TQPaintEvent* e ); + virtual bool eventFilter( TQObject* object, TQEvent* event ); private: VDocument *m_document; @@ -57,15 +58,16 @@ class VDocumentPreview : public QWidget KoPoint m_firstPoint; KoPoint m_lastPoint; bool m_dragging; - QPixmap *m_docpixmap; + TQPixmap *m_docpixmap; }; // VDocumentPreview -class VDocumentTab : public QWidget +class VDocumentTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VDocumentTab( KarbonView* view, QWidget* parent ); + VDocumentTab( KarbonView* view, TQWidget* tqparent ); ~VDocumentTab(); public slots: @@ -77,10 +79,10 @@ class VDocumentTab : public QWidget private: VDocumentPreview* m_documentPreview; - QLabel* m_height; - QLabel* m_width; - QLabel* m_layers; - QLabel* m_format; + TQLabel* m_height; + TQLabel* m_width; + TQLabel* m_layers; + TQLabel* m_format; KarbonView* m_view; }; // VDocumentTab @@ -89,17 +91,17 @@ class VDocumentTab : public QWidget * Layers Tab * *************************************************************************/ -class VLayerListViewItem : public QCheckListItem +class VLayerListViewItem : public TQCheckListItem { public: - VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map ); + VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map ); virtual ~VLayerListViewItem(); VLayer* layer() { return m_layer; } int pos(); void update(); - virtual QString key( int column, bool ascending ) const; - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; void setKey( uint key ) { m_key = key; } protected: @@ -109,43 +111,44 @@ private: VLayer *m_layer; VDocument *m_document; uint m_key; - QPtrDict<VLayerListViewItem> *m_map; + TQPtrDict<VLayerListViewItem> *m_map; }; // VLayerListViewItem -class VObjectListViewItem : public QListViewItem +class VObjectListViewItem : public TQListViewItem { public: - VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map ); + VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map ); virtual ~VObjectListViewItem(); VObject* object() { return m_object; } void update(); - virtual QString key( int column, bool ascending ) const; - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; void setKey( uint key ) { m_key = key; } private: VObject *m_object; VDocument *m_document; uint m_key; - QPtrDict<VObjectListViewItem> *m_map; + TQPtrDict<VObjectListViewItem> *m_map; }; -class VLayersTab : public QWidget +class VLayersTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VLayersTab( KarbonView* view, QWidget* parent = 0 ); + VLayersTab( KarbonView* view, TQWidget* tqparent = 0 ); ~VLayersTab(); public slots: void updatePreviews(); void updateLayers(); - void itemClicked( QListViewItem* item, const QPoint&, int col ); + void itemClicked( TQListViewItem* item, const TQPoint&, int col ); void selectionChangedFromList(); void selectionChangedFromTool(); - void renameItem( QListViewItem* item, const QPoint&, int col ); + void renameItem( TQListViewItem* item, const TQPoint&, int col ); void addLayer(); void raiseItem(); void lowerItem(); @@ -155,22 +158,22 @@ public slots: private slots: void slotButtonClicked( int ID ); void removeDeletedObjectsFromList(); - void updateChildItems( QListViewItem *item ); + void updateChildItems( TQListViewItem *item ); void toggleState( VObject *obj, int col ); protected: VLayerListViewItem* listItem( int pos ); - void updateObjects( VObject *object, QListViewItem *item ); + void updateObjects( VObject *object, TQListViewItem *item ); void resetSelection(); void selectActiveLayer(); private: - QListView *m_layersListView; - QHButtonGroup *m_buttonGroup; + TQListView *m_layersListView; + TQHButtonGroup *m_buttonGroup; KarbonView *m_view; VDocument *m_document; - QPtrDict<VLayerListViewItem> m_layers; - QPtrDict<VObjectListViewItem> m_objects; + TQPtrDict<VLayerListViewItem> m_layers; + TQPtrDict<VObjectListViewItem> m_objects; }; // VLayersTab /************************************************************************* @@ -179,50 +182,51 @@ private: class VHistoryItem; -class VHistoryGroupItem : public QListViewItem +class VHistoryGroupItem : public TQListViewItem { public: - VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after ); + VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after ); ~VHistoryGroupItem(); - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); - void paintFocus( QPainter*, const QColorGroup&, const QRect& ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); + void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ); - virtual QString key( int, bool ) const { return m_key; } + virtual TQString key( int, bool ) const { return m_key; } virtual int rtti() const { return 1001; } private: - QString m_key; + TQString m_key; }; // VHistoryGroupItem -class VHistoryItem : public QListViewItem +class VHistoryItem : public TQListViewItem { public: - VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after ); - VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after ); + VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after ); + VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after ); ~VHistoryItem(); VCommand* command() { return m_command; } - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); - void paintFocus( QPainter*, const QColorGroup&, const QRect& ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); + void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ); - virtual QString key( int, bool ) const { return m_key; } + virtual TQString key( int, bool ) const { return m_key; } virtual int rtti() const { return 1002; } private: void init(); - QString m_key; + TQString m_key; VCommand* m_command; }; // VHistoryItem -class VHistoryTab : public QWidget +class VHistoryTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VHistoryTab( KarbonPart* part, QWidget* parent ); + VHistoryTab( KarbonPart* part, TQWidget* tqparent ); ~VHistoryTab(); bool groupingEnabled(); @@ -234,7 +238,7 @@ class VHistoryTab : public QWidget void removeFirstCommand(); void removeLastCommand(); - void commandClicked( int button, QListViewItem* item, const QPoint& point, int col ); + void commandClicked( int button, TQListViewItem* item, const TQPoint& point, int col ); void groupingChanged( int ); signals: @@ -244,9 +248,9 @@ class VHistoryTab : public QWidget void redoCommandsTo( VCommand* command ); private: - QListView* m_history; - QListViewItem* m_lastCommand; - QCheckBox* m_groupCommands; + TQListView* m_history; + TQListViewItem* m_lastCommand; + TQCheckBox* m_groupCommands; long m_lastCommandIndex; KarbonPart* m_part; |