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 /kword/KWTableFrameSet.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 'kword/KWTableFrameSet.h')
-rw-r--r-- | kword/KWTableFrameSet.h | 111 |
1 files changed, 56 insertions, 55 deletions
diff --git a/kword/KWTableFrameSet.h b/kword/KWTableFrameSet.h index 92a5a867..3a3b5d64 100644 --- a/kword/KWTableFrameSet.h +++ b/kword/KWTableFrameSet.h @@ -30,15 +30,15 @@ DESCRIPTION #include "KWFrame.h" #include "KWTextFrameSet.h" -#include <qptrlist.h> -#include <qvaluevector.h> -#include <qobject.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqvaluevector.h> +#include <tqobject.h> +#include <tqstring.h> #include <KoRichText.h> class KWDocument; class KWTableFrameSetEdit; -class QPainter; +class TQPainter; class KWAnchor; class KWordFrameSetIface; class KWFrameViewManager; @@ -58,6 +58,7 @@ class RemovedColumn; class KWTableFrameSet : public KWFrameSet { Q_OBJECT + TQ_OBJECT public: /** @@ -77,7 +78,7 @@ public: public: /// constructor - Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const QString & name = QString::null ); + Cell( KWTableFrameSet *table, unsigned int row, unsigned int col, const TQString & name = TQString() ); Cell( KWTableFrameSet *table, const Cell &original ); // destructor virtual ~Cell(); @@ -137,8 +138,8 @@ public: bool marked() const { return m_marker; } /** Overloaded to not clear any preview borders. */ - void drawContents( QPainter *painter, const QRect & crect, - const QColorGroup & cg, bool onlyChanged, bool resetChanged, + void drawContents( TQPainter *painter, const TQRect & crect, + const TQColorGroup & cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit * edit, KWViewMode * viewMode, KWFrameViewManager *frameViewManager ); @@ -161,7 +162,7 @@ public: * If a cell has m_cols = N, N values in this array point to the same cell. * (Same thing is a cell from a row above has m_rows > 1) */ - QPtrVector< Cell > m_cellArray; + TQPtrVector< Cell > m_cellArray; }; @@ -303,10 +304,10 @@ public: virtual KWordFrameSetIface* dcopObject(); - virtual void addTextFrameSets( QPtrList<KWTextFrameSet> & lst, bool onlyReadWrite =false ); + virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & lst, bool onlyReadWrite =false ); /// constructor - KWTableFrameSet( KWDocument *_doc, const QString & name ); + KWTableFrameSet( KWDocument *_doc, const TQString & name ); /// destructor virtual ~KWTableFrameSet(); @@ -318,16 +319,16 @@ public: * @param crect the clip rect, outside which nothing is important * @param viewMode the current view mode */ - virtual void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode ); - void drawBorders( QPainter& painter, const QRect &crect, KWViewMode *viewMode ); - virtual void drawContents( QPainter * painter, const QRect & crect, - const QColorGroup & cg, bool onlyChanged, bool resetChanged, + virtual void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode ); + void drawBorders( TQPainter& painter, const TQRect &crect, KWViewMode *viewMode ); + virtual void drawContents( TQPainter * painter, const TQRect & crect, + const TQColorGroup & cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager ); /// Dummy since we reimplement drawContents - virtual void drawFrame(KWFrame *, QPainter *, const QRect &, const QRect&, - const QPoint&, - KWFrame *, const QColorGroup &, bool, bool, + virtual void drawFrame(KWFrame *, TQPainter *, const TQRect &, const TQRect&, + const TQPoint&, + KWFrame *, const TQColorGroup &, bool, bool, KWFrameSetEdit *, KWViewMode *, bool ) {} // Frameset management @@ -392,7 +393,7 @@ public: /** returns the number of columns */ unsigned int getColumns() const { return m_cols; } - /** returns the number of cells the table contains, this includes + /** returns the number of cells the table tqcontains, this includes * temporary headers. */ unsigned int getNumCells()const { return m_nr_cells; } @@ -441,38 +442,38 @@ public: * @param listFrame needed for undo reasons */ KCommand * splitCell(unsigned int intoRows, unsigned int intoColumns, unsigned int column, - unsigned int row, QPtrList<KWFrameSet> listFrameSet=QPtrList<KWFrameSet>(), - QPtrList<KWFrame>listFrame=QPtrList<KWFrame>() ); + unsigned int row, TQPtrList<KWFrameSet> listFrameSet=TQPtrList<KWFrameSet>(), + TQPtrList<KWFrame>listFrame=TQPtrList<KWFrame>() ); /** display formatting information */ - void viewFormatting( QPainter &painter, int zoom ); + void viewFormatting( TQPainter &painter, int zoom ); /** do a number of complex tests to test the validity of the table. Missing/duplicate cells * and wrong values will be detected (and corrected) */ void validate(); /** override save so we save in table style.. */ - virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true ); + virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true ); virtual void saveOasis( KoXmlWriter&, KoSavingContext&, bool saveFrames ) const; - void loadOasis( const QDomElement& tag, KoOasisContext& context ); + void loadOasis( const TQDomElement& tag, KoOasisContext& context ); virtual bool canBeSavedAsInlineCharacter() const { return false; } /** load one cell */ - Cell* loadCell( QDomElement &frameElem, bool loadFrames = true, bool useNames = true ); + Cell* loadCell( TQDomElement &frameElem, bool loadFrames = true, bool useNames = true ); /** from and to XML - used when copying and pasting a table */ - virtual QDomElement toXML( QDomElement &parentElem, bool saveFrames = true ); - virtual void fromXML( QDomElement &framesetElem, bool loadFrames = true, bool useNames = true ); + virtual TQDomElement toXML( TQDomElement &tqparentElem, bool saveFrames = true ); + virtual void fromXML( TQDomElement &framesetElem, bool loadFrames = true, bool useNames = true ); /** Contribute to the document statistics */ virtual int paragraphs(); virtual int paragraphsSelected(); - virtual bool statistics( QProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words, + virtual bool statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace, ulong & words, ulong & sentences, ulong & syllables,ulong & lines, bool selected ); virtual void finalize(); - virtual void invalidate(); - virtual void layout(); + virtual void tqinvalidate(); + virtual void tqlayout(); virtual void updateFrames( int flags = 0xff ); @@ -506,7 +507,7 @@ public: */ void setZOrder(); - QByteArray convertTableToText(); + TQByteArray convertTableToText(); #ifndef NDEBUG virtual void printDebug( KWFrame * frame ); @@ -519,16 +520,16 @@ protected: /// \overload KWFrameSet::deleteAnchors virtual void deleteAnchors(); /// \overload KWFrameSet::createAnchors - virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool repaint = true ); + virtual void createAnchors( KoTextParag * parag, int index, bool placeHolderExists = false, bool tqrepaint = true ); private: void addCellToArray( Cell* cell ); void afterLoadingCell( Cell* cell ); - void parseInsideOfTable( const QDomElement& parent, KoOasisContext& context, - const QMemArray<double> & columnLefts, uint& row, uint& column, + void parseInsideOfTable( const TQDomElement& tqparent, KoOasisContext& context, + const TQMemArray<double> & columnLefts, uint& row, uint& column, double currentRowHeight ); - void loadOasisCell( const QDomElement& element, KoOasisContext& context, - const QMemArray<double> & columnLefts, uint row, uint column, + void loadOasisCell( const TQDomElement& element, KoOasisContext& context, + const TQMemArray<double> & columnLefts, uint row, uint column, double currentRowHeight ); /** @@ -570,7 +571,7 @@ private: private: unsigned int m_rows, m_cols, m_nr_cells; bool m_active; - QPtrVector< Row > m_rowArray; + TQPtrVector< Row > m_rowArray; /** The list of page boundaries. * Each page the table spans has an entry in this list which points to the last _line_ @@ -578,9 +579,9 @@ private: * For a 1 page table there is no page break; and therefor for such tables this list is * empty. */ - QValueList<unsigned int> m_pageBoundaries; + TQValueList<unsigned int> m_pageBoundaries; unsigned int m_redrawFromCol; - QValueList<double> m_rowPositions, m_colPositions; + TQValueList<double> m_rowPositions, m_colPositions; }; @@ -671,8 +672,8 @@ public: class RemovedColumn { - QPtrList<KWTableFrameSet::Cell> m_column; - QValueList<bool> m_removed; + TQPtrList<KWTableFrameSet::Cell> m_column; + TQValueList<bool> m_removed; uint m_index; double m_width; bool m_initialized; @@ -704,25 +705,25 @@ public: KWFrameSetEdit* currentCell() const { return m_currentCell; } // Forward all events to the current cell - virtual void keyPressEvent( QKeyEvent * e ); - virtual void keyReleaseEvent( QKeyEvent * e ); - virtual void imStartEvent( QIMEvent* e ); - virtual void imComposeEvent( QIMEvent* e ); - virtual void imEndEvent( QIMEvent* e ); - virtual void mousePressEvent( QMouseEvent * e, const QPoint &, const KoPoint & ); - virtual void mouseMoveEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d ) + virtual void keyPressEvent( TQKeyEvent * e ); + virtual void keyReleaseEvent( TQKeyEvent * e ); + virtual void imStartEvent( TQIMEvent* e ); + virtual void imComposeEvent( TQIMEvent* e ); + virtual void imEndEvent( TQIMEvent* e ); + virtual void mousePressEvent( TQMouseEvent * e, const TQPoint &, const KoPoint & ); + virtual void mouseMoveEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d ) { if ( m_currentCell ) m_currentCell->mouseMoveEvent( e, n, d ); } - virtual void mouseReleaseEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d ) + virtual void mouseReleaseEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d ) { if ( m_currentCell ) m_currentCell->mouseReleaseEvent( e, n, d ); } - virtual void mouseDoubleClickEvent( QMouseEvent * e, const QPoint & n, const KoPoint & d ) + virtual void mouseDoubleClickEvent( TQMouseEvent * e, const TQPoint & n, const KoPoint & d ) { if ( m_currentCell ) m_currentCell->mouseDoubleClickEvent( e, n, d ); } // TODO check current cell - virtual void dragEnterEvent( QDragEnterEvent * e ) + virtual void dragEnterEvent( TQDragEnterEvent * e ) { if ( m_currentCell ) m_currentCell->dragEnterEvent( e ); } - virtual void dragMoveEvent( QDragMoveEvent * e, const QPoint &n, const KoPoint &d ); - virtual void dragLeaveEvent( QDragLeaveEvent * e ) + virtual void dragMoveEvent( TQDragMoveEvent * e, const TQPoint &n, const KoPoint &d ); + virtual void dragLeaveEvent( TQDragLeaveEvent * e ) { if ( m_currentCell ) m_currentCell->dragLeaveEvent( e ); } - virtual void dropEvent( QDropEvent * e, const QPoint &n, const KoPoint &d, KWView* view ) + virtual void dropEvent( TQDropEvent * e, const TQPoint &n, const KoPoint &d, KWView* view ) { if ( m_currentCell ) m_currentCell->dropEvent( e, n, d, view ); } // TODO check current cell virtual void focusInEvent() { if ( m_currentCell ) m_currentCell->focusInEvent(); } @@ -738,7 +739,7 @@ public: /// Set the cell which is currently being edited void setCurrentCell( const KoPoint & dPoint ); - void showPopup( KWFrame* frame, KWView* view, const QPoint & _point ); + void showPopup( KWFrame* frame, KWView* view, const TQPoint & _point ); protected: KWFrameSetEdit * m_currentCell; |