summaryrefslogtreecommitdiffstats
path: root/kword/KWFrameSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'kword/KWFrameSet.h')
-rw-r--r--kword/KWFrameSet.h121
1 files changed, 61 insertions, 60 deletions
diff --git a/kword/KWFrameSet.h b/kword/KWFrameSet.h
index 2bba5e549..d4c1bae90 100644
--- a/kword/KWFrameSet.h
+++ b/kword/KWFrameSet.h
@@ -22,9 +22,9 @@
#define frame_set_h
#include "KWFrame.h"
-#include <qptrvector.h>
-#include <qptrlist.h>
-#include "qdom.h"
+#include <tqptrvector.h>
+#include <tqptrlist.h>
+#include "tqdom.h"
class KWAnchor;
class KWFrame;
@@ -45,8 +45,8 @@ class KoTextParag;
class KoXmlWriter;
class KCommand;
-class QPoint;
-class QProgressDialog;
+class TQPoint;
+class TQProgressDialog;
/**
@@ -58,9 +58,10 @@ class QProgressDialog;
* @see KWTextFrameSet, KWPartFrameSet, KWPictureFrameSet,
* KWFormulaFrameSet, KWTableFrameSet
*/
-class KWFrameSet : public QObject
+class KWFrameSet : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/// constructor
KWFrameSet( KWDocument *doc );
@@ -74,7 +75,7 @@ public:
*/
virtual FrameSetType type() const { return FT_BASE; }
- virtual void addTextFrameSets( QPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {};
+ virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> & /*lst*/, bool /*onlyReadWrite*/ = false ) {};
virtual bool ownLine() const { return FALSE;}
/** The different types of textFramesets (that TEXT is important here!)
@@ -139,7 +140,7 @@ public:
* is on the border.
* @param frame the frame to check inside of
*/
- bool isFrameAtPos( const KWFrame* frame, const QPoint& nPoint, bool borderOfFrameOnly=false ) const;
+ bool isFrameAtPos( const KWFrame* frame, const TQPoint& nPoint, bool borderOfFrameOnly=false ) const;
/** get a frame by number */
KWFrame *frame( unsigned int _num ) const;
@@ -155,7 +156,7 @@ public:
static KWFrame * settingsFrame( const KWFrame* frame );
/** Iterator over the child frames */
- const QPtrList<KWFrame> &frameIterator() const { return m_frames; }
+ const TQPtrList<KWFrame> &frameIterator() const { return m_frames; }
/** Get frame number */
int frameFromPtr( KWFrame *frame );
/** Get number of child frames */
@@ -172,7 +173,7 @@ public:
* free to paint on without interfering with later paints from us.
* For painting all frames of all framesets the painter needs to find out what area we
* will fill with a background color and possibly paint over.
- * What this method does is fill an QRegion with all the areas we are going to fill, which
+ * What this method does is fill an TQRegion with all the areas we are going to fill, which
* typically means we will paint the background of a frame there.
* @param emptyRegion The region is modified to subtract the areas painted, thus
* allowing the caller to determine which areas remain to be painted.
@@ -181,7 +182,7 @@ public:
* @param crect the cliprect; only parts inside this rect are of interrest to us
* @param viewMode For coordinate conversion, always set.
*/
- virtual void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode *viewMode );
+ virtual void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode *viewMode );
/**
* Paint this frameset
@@ -189,7 +190,7 @@ public:
* @param crect The rectangle (in scrollview "contents coordinates", i.e. "view coords")
* to be painted
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
@@ -198,14 +199,14 @@ public:
* The way this "onlyChanged/resetChanged" works is: when something changes,
* all views are asked to redraw themselves with onlyChanged=true.
* But all views except the last one shouldn't reset the changed flag to false,
- * otherwise the other views wouldn't repaint anything.
+ * otherwise the other views wouldn't tqrepaint anything.
* So resetChanged is called with "false" for all views except the last one,
* and with "true" for the last one, so that it resets the flag.
*
* Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to].
*/
- virtual void drawContents( QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawContents( TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrameViewManager *frameViewManager );
@@ -223,11 +224,11 @@ public:
* @param cg The colorgroup from which to get the colors
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
- * @param crect rectangle to be repainted, in view coordinates. Includes padding.
+ * @param crect rectangle to be tqrepainted, in view coordinates. Includes padding.
*/
void drawFrameAndBorders( KWFrame *frame,
- QPainter *painter, const QRect &crect,
- const QColorGroup &cg, bool, bool,
+ TQPainter *painter, const TQRect &crect,
+ const TQColorGroup &cg, bool, bool,
KWFrameSetEdit *edit, KWViewMode *viewMode,
KWFrame *settingsFrame, bool drawUnderlyingFrames );
@@ -239,31 +240,31 @@ public:
* @param crect The rectangle (in "contents coordinates") to be painted
* @param viewMode For coordinate conversion, always set.
*/
- void drawFrameBorder( QPainter *painter, KWFrame *frame, KWFrame *settingsFrame,
- const QRect &crect, KWViewMode *viewMode );
+ void drawFrameBorder( TQPainter *painter, KWFrame *frame, KWFrame *settingsFrame,
+ const TQRect &crect, KWViewMode *viewMode );
/**
* Draw a particular frame of this frameset.
* This is called by drawContents and is what framesets must reimplement.
- * @param fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels.
+ * @param fcrect rectangle to be tqrepainted, in the _frame_'s coordinate system, in pixels.
* Doesn't include padding.
*
- * @param crect rectangle to be repainted, in view coordinates. Includes padding.
+ * @param crect rectangle to be tqrepainted, in view coordinates. Includes padding.
* Default implementation does double-buffering and calls drawFrameContents.
* @param frame the frame to draw
* @param painter the painter to draw to
* @param settingsFrame The frame from which we take the settings (usually @p frame, but not with Copy behaviour)
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
* @param drawUnderlyingFrames if the frame implements it, then it should draw underlying frames.
* @param translationOffset offset this method will translate the paiter before doing its work.
*/
- virtual void drawFrame( KWFrame *frame, QPainter *painter, const QRect &fcrect, const QRect &crect,
- const QPoint& translationOffset,
- KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrame( KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect,
+ const TQPoint& translationOffset,
+ KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames );
/**
@@ -272,24 +273,24 @@ public:
* You MUST reimplement one or the other, or you'll get infinite recursion ;)
*
* In this method, the painter has been translated to the frame's coordinate system
- * @param fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels.
+ * @param fcrect rectangle to be tqrepainted, in the _frame_'s coordinate system, in pixels.
* Doesn't include padding.
* @param frame the frame to draw
* @param painter the painter to draw to
* @param cg The colorgroup from which to get the colors
- * @param onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
+ * @param onlyChanged If true, only redraw what has changed (see KWCanvas::tqrepaintChanged)
* @param resetChanged If true, set the changed flag to false after drawing.
* @param edit If set, this frameset is being edited, so a cursor is needed.
* @param viewMode For coordinate conversion, always set.
*/
- virtual void drawFrameContents( KWFrame * frame, QPainter *painter, const QRect& fcrect,
- const QColorGroup &cg, bool onlyChanged, bool resetChanged,
+ virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect& fcrect,
+ const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
KWFrameSetEdit * edit, KWViewMode *viewMode );
/**
* Draw the padding area inside of a specific frame of this frameSet
*/
- virtual void drawPadding( KWFrame *frame, QPainter *p, const QRect &fcrect, const QColorGroup &cg, KWViewMode *viewMode);
+ virtual void drawPadding( KWFrame *frame, TQPainter *p, const TQRect &fcrect, const TQColorGroup &cg, KWViewMode *viewMode);
enum UpdateFramesFlags {
UpdateFramesInPage = 1,
@@ -298,26 +299,26 @@ public:
};
/**
* Called when our frames change, or when another frameset's frames change.
- * Framesets can reimplement it, but should always call the parent method.
+ * Framesets can reimplement it, but should always call the tqparent method.
*/
virtual void updateFrames( int flags = 0xff );
/** Return list of frames in page @p pageNum.
* This is fast since it uses the m_framesInPage array.*/
- const QPtrList<KWFrame> & framesInPage( int pageNum ) const;
+ const TQPtrList<KWFrame> & framesInPage( int pageNum ) const;
/** Allows to detect that updateFrames() hasn't been called yet (e.g. on loading) */
bool hasFramesInPageArray() const { return !m_framesInPage.isEmpty(); }
- /** relayout text in frames, so that it flows correctly around other frames */
- virtual void layout() {}
- virtual void invalidate() {}
+ /** retqlayout text in frames, so that it flows correctly around other frames */
+ virtual void tqlayout() {}
+ virtual void tqinvalidate() {}
/// save to XML - when saving
- virtual QDomElement save( QDomElement &parentElem, bool saveFrames = true ) = 0;
+ virtual TQDomElement save( TQDomElement &tqparentElem, bool saveFrames = true ) = 0;
/// save to XML - when copying to clipboard
- virtual QDomElement toXML( QDomElement &parentElem, bool saveFrames = true )
- { return save( parentElem, saveFrames ); }
+ virtual TQDomElement toXML( TQDomElement &tqparentElem, bool saveFrames = true )
+ { return save( tqparentElem, saveFrames ); }
/// Save to OASIS format
virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const = 0;
/// If the frameset is inline, is it ok to save it inside an oasis <text:p>?
@@ -325,23 +326,23 @@ public:
virtual bool canBeSavedAsInlineCharacter() const { return true; }
/// load from XML - when loading
- virtual void load( QDomElement &framesetElem, bool loadFrames = true );
- KWFrame* loadOasisFrame( const QDomElement& tag, KoOasisContext& context );
+ virtual void load( TQDomElement &framesetElem, bool loadFrames = true );
+ KWFrame* loadOasisFrame( const TQDomElement& tag, KoOasisContext& context );
/// load from XML - when pasting from clipboard
- virtual void fromXML( QDomElement &framesetElem, bool loadFrames = true, bool /*useNames*/ = true )
+ virtual void fromXML( TQDomElement &framesetElem, bool loadFrames = true, bool /*useNames*/ = true )
{ load( framesetElem, loadFrames ); }
- virtual QString toPlainText() const { return QString::null; }
+ virtual TQString toPlainText() const { return TQString(); }
- //virtual void preparePrinting( QPainter *, QProgressDialog *, int & ) { }
+ //virtual void preparePrinting( TQPainter *, TQProgressDialog *, int & ) { }
/** Called once the frameset has been completely loaded or constructed.
- * The default implementation calls updateFrames() and zoom(). Call the parent :) */
+ * The default implementation calls updateFrames() and zoom(). Call the tqparent :) */
virtual void finalize();
virtual int paragraphs() { return 0; }
virtual int paragraphsSelected() { return 0; }
- 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 /*process only selected */ ) { return true; }
KWDocument* kWordDocument() const { return m_doc; }
@@ -358,11 +359,11 @@ public:
* Make this frameset anchored, with the anchor at @p paragId,@p index in the text frameset @p textfs.
* Also used during OASIS loading (placeHolderExists=true)
*/
- void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool repaint = true );
+ void setAnchored( KWTextFrameSet* textfs, KoTextParag* parag, int index, bool placeHolderExists = false, bool tqrepaint = true );
/** Make this frameset floating, with the anchor at @p paragId,@p index in the text frameset @p textfs.
* \deprecated
*/
- void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool repaint = true );
+ void setAnchored( KWTextFrameSet* textfs, int paragId, int index, bool placeHolderExists = false, bool tqrepaint = true );
/** Note that this frameset has been made floating already, and store anchor position */
void setAnchored( KWTextFrameSet* textfs );
/// Make this frameset fixed, i.e. not anchored
@@ -389,7 +390,7 @@ public:
virtual KoSize floatingFrameSize( int frameNum = 0 );
/** Get the rect of the "floating frame" identified by frameNum,
in coordinates RELATIVE TO THE PARENT FRAMESET.
- This is especially important for multi-parent inline frames. */
+ This is especially important for multi-tqparent inline frames. */
KoRect floatingFrameRect( int frameNum = 0 );
/** Get the 'baseline' to use for the "floating frame" identified by frameNum.
-1 means same as the height (usual case) */
@@ -424,8 +425,8 @@ public:
virtual void setVisible( bool v );
/// get/set frameset name. For tables in particular, this _must_ be unique
- QString name() const { return m_name; }
- void setName( const QString &name );
+ TQString name() const { return m_name; }
+ void setName( const TQString &name );
/// set frameBehavior on all frames, see KWFrame for specifics
void setFrameBehavior( KWFrame::FrameBehavior fb );
@@ -454,9 +455,9 @@ public:
signals:
/// Emitted when something has changed in this frameset,
- /// so that all views repaint it. KWDocument connects to it,
+ /// so that all views tqrepaint it. KWDocument connects to it,
/// and KWCanvas connects to KWDocument.
- void repaintChanged( KWFrameSet * frameset );
+ void tqrepaintChanged( KWFrameSet * frameset );
void sigFrameAdded(KWFrame*);
void sigFrameRemoved(KWFrame*);
@@ -466,36 +467,36 @@ signals:
protected:
/// save the common attributes for the frameset
- void saveCommon( QDomElement &parentElem, bool saveFrames );
+ void saveCommon( TQDomElement &tqparentElem, bool saveFrames );
/**Determine the clipping rectangle for drawing the contents of @p frame with @p painter
* in the rectangle delimited by @p crect.
* This determines where to clip the painter to draw the contents of a given frame
*/
- QRegion frameClipRegion( QPainter * painter, KWFrame *frame, const QRect & crect,
+ TQRegion frameClipRegion( TQPainter * painter, KWFrame *frame, const TQRect & crect,
KWViewMode * viewMode );
void deleteAnchor( KWAnchor * anchor );
virtual void deleteAnchors();
- 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 );
KWDocument *m_doc; // Document
- QPtrList<KWFrame> m_frames; // Our frames
+ TQPtrList<KWFrame> m_frames; // Our frames
// Cached info for optimization
/// This array provides a direct access to the frames on page N
- QPtrVector< QPtrList<KWFrame> > m_framesInPage;
+ TQPtrVector< TQPtrList<KWFrame> > m_framesInPage;
/// always equal to m_framesInPage[0].first()->pageNumber() :)
int m_firstPage;
/// always empty, for convenience in @ref framesInPage
- QPtrList<KWFrame> m_emptyList; // ## make static pointer to save memory ?
+ TQPtrList<KWFrame> m_emptyList; // ## make static pointer to save memory ?
Info m_info;
KWTableFrameSet *m_groupmanager;
bool m_visible;
bool m_protectSize;
- QString m_name;
+ TQString m_name;
KWTextFrameSet * m_anchorTextFs;
KWordFrameSetIface *m_dcop;
KWPageManager *m_pageManager;