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/KWDocument.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/KWDocument.h')
-rw-r--r-- | kword/KWDocument.h | 313 |
1 files changed, 157 insertions, 156 deletions
diff --git a/kword/KWDocument.h b/kword/KWDocument.h index 1b8ebac9..2d4e5abf 100644 --- a/kword/KWDocument.h +++ b/kword/KWDocument.h @@ -26,7 +26,7 @@ #include <config.h> #endif -class QDragObject; +class TQDragObject; class KoSavingContext; class KoGenStyles; class KWDocument; @@ -48,7 +48,7 @@ class KWFrame; class KWViewMode; class KMacroCommand; class KoDocumentEntry; -class QPainter; +class TQPainter; class KoAutoFormat; class KCommand; class KoCommandHistory; @@ -72,9 +72,9 @@ class KWDocumentChild; class KWPageManager; class KWPage; -class QFont; -class QStringList; -class QRect; +class TQFont; +class TQStringList; +class TQRect; namespace KFormula { class Document; @@ -92,10 +92,10 @@ class KoOasisSettings; #include <KoPictureKey.h> #include <KoStyleCollection.h> // for KoStyleChangeDefMap -#include <qmap.h> -#include <qptrlist.h> -#include <qfont.h> -#include <qvaluevector.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqfont.h> +#include <tqvaluevector.h> /******************************************************************/ /* Class: KWDocument */ @@ -104,33 +104,34 @@ class KoOasisSettings; class KWDocument : public KoDocument, public KoTextZoomHandler { Q_OBJECT - Q_PROPERTY( double ptColumnWidth READ ptColumnWidth ) - Q_PROPERTY( double ptColumnSpacing READ ptColumnSpacing ) - Q_PROPERTY( double gridX READ gridX WRITE setGridX ) - Q_PROPERTY( double gridY READ gridY WRITE setGridY ) - Q_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid ) - Q_PROPERTY( double indentValue READ indentValue WRITE setIndentValue ) - Q_PROPERTY( int nbPagePerRow READ nbPagePerRow WRITE setNbPagePerRow ) - Q_PROPERTY( double defaultColumnSpacing READ defaultColumnSpacing WRITE setDefaultColumnSpacing ) - Q_PROPERTY( int maxRecentFiles READ maxRecentFiles ) - Q_PROPERTY( QString globalLanguage READ globalLanguage WRITE setGlobalLanguage ) - Q_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation ) - Q_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor ) - Q_PROPERTY( QStringList personalExpressionPath READ personalExpressionPath WRITE setPersonalExpressionPath ) - Q_PROPERTY( bool viewFormattingBreak READ viewFormattingBreak WRITE setViewFormattingBreak ) - Q_PROPERTY( bool viewFormattingTabs READ viewFormattingTabs WRITE setViewFormattingTabs ) - Q_PROPERTY( bool viewFormattingSpace READ viewFormattingSpace WRITE setViewFormattingSpace ) - Q_PROPERTY( bool viewFormattingEndParag READ viewFormattingEndParag WRITE setViewFormattingEndParag ) - Q_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea ) - Q_PROPERTY( bool pgUpDownMovesCaret READ pgUpDownMovesCaret WRITE setPgUpDownMovesCaret ) - Q_PROPERTY( bool allowAutoFormat READ allowAutoFormat WRITE setAllowAutoFormat ) - Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit ) + TQ_OBJECT + TQ_PROPERTY( double ptColumnWidth READ ptColumnWidth ) + TQ_PROPERTY( double ptColumnSpacing READ ptColumnSpacing ) + TQ_PROPERTY( double gridX READ gridX WRITE setGridX ) + TQ_PROPERTY( double gridY READ gridY WRITE setGridY ) + TQ_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid ) + TQ_PROPERTY( double indentValue READ indentValue WRITE setIndentValue ) + TQ_PROPERTY( int nbPagePerRow READ nbPagePerRow WRITE setNbPagePerRow ) + TQ_PROPERTY( double defaultColumnSpacing READ defaultColumnSpacing WRITE setDefaultColumnSpacing ) + TQ_PROPERTY( int maxRecentFiles READ maxRecentFiles ) + TQ_PROPERTY( TQString globalLanguage READ globalLanguage WRITE setGlobalLanguage ) + TQ_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation ) + TQ_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor ) + TQ_PROPERTY( TQStringList personalExpressionPath READ personalExpressionPath WRITE setPersonalExpressionPath ) + TQ_PROPERTY( bool viewFormattingBreak READ viewFormattingBreak WRITE setViewFormattingBreak ) + TQ_PROPERTY( bool viewFormattingTabs READ viewFormattingTabs WRITE setViewFormattingTabs ) + TQ_PROPERTY( bool viewFormattingSpace READ viewFormattingSpace WRITE setViewFormattingSpace ) + TQ_PROPERTY( bool viewFormattingEndParag READ viewFormattingEndParag WRITE setViewFormattingEndParag ) + TQ_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea ) + TQ_PROPERTY( bool pgUpDownMovesCaret READ pgUpDownMovesCaret WRITE setPgUpDownMovesCaret ) + TQ_PROPERTY( bool allowAutoFormat READ allowAutoFormat WRITE setAllowAutoFormat ) + TQ_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit ) public: friend class KWOasisLoader; friend class KWStartupWidget; - KWDocument( QWidget *parentWidget = 0, const char *widname = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false ); + KWDocument( TQWidget *tqparentWidget = 0, const char *widname = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false ); ~KWDocument(); enum ProcessingType {WP = 0, DTP = 1}; @@ -138,9 +139,9 @@ public: static const int CURRENT_SYNTAX_VERSION; public: - virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0); + virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0); - virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store ); + virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store ); /** * Those values are used as KoGenStyle types. @@ -164,15 +165,15 @@ public: /** * Return a drag object with the selected frames */ - QDragObject* dragSelected( const QValueList<KWFrameView*> &selectedFrames); + TQDragObject* dragSelected( const TQValueList<KWFrameView*> &selectedFrames); /** * Return a drag object with the selected text */ - QDragObject* dragSelected( QWidget *parent, KWTextFrameSet* fs ); + TQDragObject* dragSelected( TQWidget *tqparent, KWTextFrameSet* fs ); - virtual bool loadXML( QIODevice *, const QDomDocument & dom ); + virtual bool loadXML( TQIODevice *, const TQDomDocument & dom ); virtual bool loadChildren( KoStore *store ); - virtual QDomDocument saveXML(); + virtual TQDomDocument saveXML(); void processPictureRequests(); void processAnchorRequests(); bool processFootNoteRequests(); @@ -185,20 +186,20 @@ public: /** * Draw as embedded. */ - virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 ); + virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 ); - virtual QPixmap generatePreview( const QSize &size ); + virtual TQPixmap generatePreview( const TQSize &size ); /** * @param emptyRegion The region is modified to subtract the areas painted, thus * allowing the caller to determine which areas remain to be painted. */ - void createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode * viewMode ); + void createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode * viewMode ); /** * Erase the empty space defined by @p emptySpaceRegion. * Usually used to clear the space where there is no frame (e.g. page margins). */ - void eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, const QBrush & brush ); + void eraseEmptySpace( TQPainter * painter, const TQRegion & emptySpaceRegion, const TQBrush & brush ); virtual void setEmpty(); @@ -207,15 +208,15 @@ public: virtual void addShell( KoMainWindow *shell ); - KWPartFrameSet* insertObject( const KoRect& rect, KoDocumentEntry& e, QWidget* parentWidget ); + KWPartFrameSet* insertObject( const KoRect& rect, KoDocumentEntry& e, TQWidget* tqparentWidget ); /// Create an embedded document; used by KWPartFrameSet but is defined here /// because KoDocument:insertChild is protected. KWDocumentChild* createChildDoc( const KoRect& rect, KoDocument* childDoc ); - void setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true ); + void setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews = true ); - void getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf ); + void getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf ); KWTextFrameSet * textFrameSet ( unsigned int num ) const; /// Return the frameset number @p num @@ -223,19 +224,19 @@ public: { return m_lstFrameSet.at( num ); } /// Return the frameset with a given name - KWFrameSet * frameSetByName( const QString & name ); + KWFrameSet * frameSetByName( const TQString & name ); /// Return the total number of framesets unsigned int frameSetCount() const { return m_lstFrameSet.count(); } /// Generate a new name for a frameset. @p templateName must contain a %1 [for a number]. - QString generateFramesetName( const QString & templateName ); + TQString generateFramesetName( const TQString & templateName ); /// Prefer this over frameSet(i), if iterating over all of them - QPtrListIterator<KWFrameSet> framesetsIterator() const { return QPtrListIterator<KWFrameSet>(m_lstFrameSet); } + TQPtrListIterator<KWFrameSet> framesetsIterator() const { return TQPtrListIterator<KWFrameSet>(m_lstFrameSet); } - QValueList<KoTextObject *> visibleTextObjects(KWViewMode *viewmode) const; + TQValueList<KoTextObject *> visibleTextObjects(KWViewMode *viewmode) const; /// Register new frameset void addFrameSet( KWFrameSet *f, bool finalize = true ); @@ -259,27 +260,27 @@ public: unsigned int numColumns() const { return m_pageColumns.columns; } - void repaintAllViews( bool erase = false ); + void tqrepaintAllViews( bool erase = false ); /** Update all views of this document, area can be cleared before redrawing with the * erase flag. (false implied). All views EXCEPT the argument view are updated ( give 0L for all ) */ - void repaintAllViewsExcept( KWView *view, bool erase = false ); + void tqrepaintAllViewsExcept( KWView *view, bool erase = false ); /** - * schedule a repaint of all views but don't execute immediately + * schedule a tqrepaint of all views but don't execute immediately */ void delayedRepaintAllViews(); /** - * schedule a frame layout (e.g. for footnotes) but don't execute immediately + * schedule a frame tqlayout (e.g. for footnotes) but don't execute immediately */ void delayedRecalcFrames( int fromPage ); /** * Return a double-buffer pixmap of (at least) the given size. */ - QPixmap* doubleBufferPixmap( const QSize& ); + TQPixmap* doubleBufferPixmap( const TQSize& ); /** * Call this when you're done with the double-buffer pixmap (at the * end of the current painting, for all objects that need to be painted). @@ -289,31 +290,31 @@ public: /** * Tell this method when a frame is moved / resized / created / deleted - * and everything will be update / repainted accordingly. + * and everything will be update / tqrepainted accordingly. */ void frameChanged( KWFrame * frame ); - void framesChanged( const QPtrList<KWFrame> & frames, KWView * view = 0L ); + void framesChanged( const TQPtrList<KWFrame> & frames, KWView * view = 0L ); - QString uniqueFramesetName( const QString& oldName ); + TQString uniqueFramesetName( const TQString& oldName ); /** * @param copyFootNote ... * @param dontCreateFootNote true when we copy footnote into an other frameset than mainFrameSet => footnote is removed ! * @param selectFrames if true, pasted frames are auto-selected. Set to false when loading from a file etc. */ - void pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote = false, bool dontCreateFootNote = false, bool selectFrames = true ); + void pasteFrames( TQDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote = false, bool dontCreateFootNote = false, bool selectFrames = true ); - void insertEmbedded( KoStore *store, QDomElement topElem, KMacroCommand * macroCmd, double offset ); + void insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCommand * macroCmd, double offset ); void completePasting(); void completeOasisPasting(); - void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const QByteArray& headerFooterContent ) const; + void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const TQByteArray& headerFooterContent ) const; KoStyleCollection * styleCollection()const { return m_styleColl;} KWFrameStyleCollection * frameStyleCollection()const { return m_frameStyleColl;} KWTableStyleCollection * tableStyleCollection()const { return m_tableStyleColl;} KWTableTemplateCollection * tableTemplateCollection()const { return m_tableTemplateColl;} - QFont defaultFont() const { return m_defaultFont; } - void setDefaultFont( const QFont & newFont ) { + TQFont defaultFont() const { return m_defaultFont; } + void setDefaultFont( const TQFont & newFont ) { m_defaultFont = newFont; } @@ -337,7 +338,7 @@ public: KoPictureCollection *pictureCollection() { return m_pictureCollection; } KoVariableFormatCollection *variableFormatCollection()const { return m_varFormatCollection; } - QValueList<KWView *> getAllViews() const { return m_lstViews; } + TQValueList<KWView *> getAllViews() const { return m_lstViews; } /** * Insert a new page after another, @@ -364,7 +365,7 @@ public: * Used by insertPage but also by KWTextFrameSet to check if it's worth * auto-inserting a new page (to avoid infinite loops if not) */ - QPtrList<KWFrame> framesToCopyOnNewPage( int afterPageNum ) const; + TQPtrList<KWFrame> framesToCopyOnNewPage( int afterPageNum ) const; /** * Remove a page. Call afterRemovePages() after removing one or more pages. @@ -384,13 +385,13 @@ public: bool tryRemovingPages(); ProcessingType processingType()const { return m_processingType; } - int frameSetNum( KWFrameSet* fs ) { return m_lstFrameSet.findRef( fs ); } + int frameSetNum( KWFrameSet* fs ) { return m_lstFrameSet.tqfindRef( fs ); } void lowerMainFrames( int pageNum ); void lowerMainFrames( int pageNum, int lowestZOrder ); /// \note This method considers _all_ text framesets, even table cells - QPtrList<KWTextFrameSet> allTextFramesets( bool onlyReadWrite ) const; + TQPtrList<KWTextFrameSet> allTextFramesets( bool onlyReadWrite ) const; /// \note This method considers _all_ text framesets, even table cells int numberOfTextFrameSet( KWFrameSet* fs, bool onlyReadWrite ); /// \note This method considers _all_ text framesets, even table cells @@ -398,7 +399,7 @@ public: /// Reimplementation from KoDocument. /// \note This method considers _all_ text framesets, even table cells - virtual QValueList<KoTextDocument *> allTextDocuments() const; + virtual TQValueList<KoTextDocument *> allTextDocuments() const; /** Gather all the frames which are on a certain page and return them. @@ -406,7 +407,7 @@ public: * @param pageNum the number of the page * @param sorted if true the list is ordered per z-order. should be true always. */ - QPtrList<KWFrame> framesInPage( int pageNum , bool sorted=true) const; + TQPtrList<KWFrame> framesInPage( int pageNum , bool sorted=true) const; /** @@ -436,12 +437,12 @@ public: //int applyStyleChangeMask() { return styleMask; } //void setApplyStyleChangeMask( int f ) { styleMask = f; } - // paragLayoutChanged is a set of flags for the parag layout - see the enum in KWParagLayout + // paragLayoutChanged is a set of flags for the parag tqlayout - see the enum in KWParagLayout // formatChanged is a set of flags from KoTextFormat // If both are -1, it means the style has been deleted. void applyStyleChange( KoStyleChangeDefMap changed ); void updateAllStyleLists(); - void updateStyleListOrder( const QStringList &list ); + void updateStyleListOrder( const TQStringList &list ); void updateAllFrameStyleLists(); void updateAllTableStyleLists(); @@ -480,18 +481,18 @@ public: * This is used upon loading, to delay certain things until completeLoading, * for KWTextParag */ - void addAnchorRequest( const QString &framesetName, const KWAnchorPosition &anchorPos ); + void addAnchorRequest( const TQString &framesetName, const KWAnchorPosition &anchorPos ); /** * This is used upon loading, to delay certain things until completeLoading, * for KWFootNoteVariable */ - void addFootNoteRequest( const QString &framesetName, KWFootNoteVariable* var ); + void addFootNoteRequest( const TQString &framesetName, KWFootNoteVariable* var ); /// This is used by loadFrameSets() and by KWCanvas to paste framesets - KWFrameSet *loadFrameSet( QDomElement framesetElem, bool loadFrames = true , bool loadFootnote = true); - void loadEmbeddedObjects( QDomElement& word ); - void saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<KoDocumentChild>& childList ); - void loadEmbedded( const QDomElement &embedded ); + KWFrameSet *loadFrameSet( TQDomElement framesetElem, bool loadFrames = true , bool loadFootnote = true); + void loadEmbeddedObjects( TQDomElement& word ); + void saveEmbeddedObjects( TQDomElement& tqparentElem, const TQPtrList<KoDocumentChild>& childList ); + void loadEmbedded( const TQDomElement &embedded ); void recalcVariables( int type ); @@ -518,42 +519,42 @@ public: void newZoomAndResolution( bool updateViews, bool forPrint ); /** - * Due to the way the text formatter works (it caches layout information in + * Due to the way the text formatter works (it caches tqlayout information in * the paragraphs and characters), we currently can't have one viewmode per view. * It has to be the same for all views. */ - QString viewModeType() const { return m_viewModeType; } + TQString viewModeType() const { return m_viewModeType; } /** - * The view mode used for text layouting. + * The view mode used for text tqlayouting. */ - KWViewMode* layoutViewMode() const { return m_layoutViewMode; } + KWViewMode* tqlayoutViewMode() const { return m_layoutViewMode; } /** * Changes m_viewMode, and updates all views to this viewmode */ - void switchViewMode( const QString& newViewMode ); + void switchViewMode( const TQString& newViewMode ); /// \todo useless method - static QString getAttribute(QDomElement &element, const char *attributeName, const QString &defaultValue) + static TQString getAttribute(TQDomElement &element, const char *attributeName, const TQString &defaultValue) { return element.attribute( attributeName, defaultValue ); } - static int getAttribute(QDomElement &element, const char *attributeName, int defaultValue) + static int getAttribute(TQDomElement &element, const char *attributeName, int defaultValue) { - QString value; - if ( ( value = element.attribute( attributeName ) ) != QString::null ) + TQString value; + if ( ( value = element.attribute( attributeName ) ) != TQString() ) return value.toInt(); else return defaultValue; } - static double getAttribute(QDomElement &element, const char *attributeName, double defaultValue) + static double getAttribute(TQDomElement &element, const char *attributeName, double defaultValue) { - QString value; - if ( ( value = element.attribute( attributeName ) ) != QString::null ) + TQString value; + if ( ( value = element.attribute( attributeName ) ) != TQString() ) return value.toDouble(); else return defaultValue; @@ -564,8 +565,8 @@ public: void printDebug(); #endif - /** calls layout() on all framesets */ - void layout(); + /** calls tqlayout() on all framesets */ + void tqlayout(); // This settings has to be here [instead of KWView] because we need to // format paragraphs slightly differently (to add room for the CR char) @@ -653,18 +654,18 @@ public: /// Returns if the document has a table of contents bool tocPresent(){return m_hasTOC;} - QString sectionTitle( int pageNum ) const; + TQString sectionTitle( int pageNum ) const; void updateRulerFrameStartEnd(); /** Convert a color into a color to be displayed for it * (when using color schemes, we still want to print black on white). * See also KoTextFormat::defaultTextColor. */ - static QColor resolveTextColor( const QColor & col, QPainter * painter ); - static QColor defaultTextColor( QPainter * painter ); - static QColor resolveBgColor( const QColor & col, QPainter * painter = 0 ); - static QBrush resolveBgBrush( const QBrush & brush, QPainter * painter = 0 ); - static QColor defaultBgColor( QPainter * painter ); + static TQColor resolveTextColor( const TQColor & col, TQPainter * painter ); + static TQColor defaultTextColor( TQPainter * painter ); + static TQColor resolveBgColor( const TQColor & col, TQPainter * painter = 0 ); + static TQBrush resolveBgBrush( const TQBrush & brush, TQPainter * painter = 0 ); + static TQColor defaultBgColor( TQPainter * painter ); virtual DCOPObject* dcopObject(); @@ -684,9 +685,9 @@ public: void updateHeaderButton(); void updateFooterButton(); - QStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; } - void setSpellCheckIgnoreList( const QStringList& lst ); - void addSpellCheckIgnoreWord( const QString & ); + TQStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; } + void setSpellCheckIgnoreList( const TQStringList& lst ); + void addSpellCheckIgnoreWord( const TQString & ); void updateTextFrameSetEdit(); void changeFootNoteConfig(); @@ -699,7 +700,7 @@ public: void changeBgSpellCheckingState( bool b ); // To position the cursor when opening a document - QString initialFrameSet() const; ///< \note can be empty for "unset" + TQString initialFrameSet() const; ///< \note can be empty for "unset" int initialCursorParag() const; int initialCursorIndex() const; /// Once we're done with this info, get rid of it @@ -721,34 +722,34 @@ public: void setFootNoteSeparatorLineType( SeparatorLineLineType type) {m_footNoteSeparatorLineType = type;} const KoTextBookmarkList* bookmarkList() const { return m_bookmarkList; } - void insertBookmark( const QString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end ); - void deleteBookmark( const QString &name ); - void renameBookmark( const QString &oldname, const QString &newName ); + void insertBookmark( const TQString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end ); + void deleteBookmark( const TQString &name ); + void renameBookmark( const TQString &oldname, const TQString &newName ); - const KoTextBookmark * bookmarkByName( const QString & name ) const; - QStringList listOfBookmarkName(KWViewMode * viewMode) const; + const KoTextBookmark * bookmarkByName( const TQString & name ) const; + TQStringList listOfBookmarkName(KWViewMode * viewMode) const; void paragraphDeleted( KoTextParag *parag, KWFrameSet *frm); void paragraphModified(KoTextParag* parag, int /*KoTextParag::ParagModifyType*/ type, int start, int lenght); void initBookmarkList(); void loadImagesFromStore( KoStore *store ); - void loadPictureMap ( QDomElement& domElement ); + void loadPictureMap ( TQDomElement& domElement ); void testAndCloseAllFrameSetProtectedContent(); void updateRulerInProtectContentMode(); KoPageLayout pageLayout(int pageNumber = 0) const; - QStringList personalExpressionPath() const { return m_personalExpressionPath;} - void setPersonalExpressionPath( const QStringList & ); + TQStringList personalExpressionPath() const { return m_personalExpressionPath;} + void setPersonalExpressionPath( const TQStringList & ); void updateDirectCursorButton(); - QString globalLanguage()const { return m_globalLanguage; } - void setGlobalLanguage( const QString & lang ){m_globalLanguage = lang;} - void addWordToDictionary( const QString & ); + TQString globalLanguage()const { return m_globalLanguage; } + void setGlobalLanguage( const TQString & lang ){m_globalLanguage = lang;} + void addWordToDictionary( const TQString & ); bool globalHyphenation() const { return m_bGlobalHyphenation; } void setGlobalHyphenation ( bool hyphen ); @@ -763,8 +764,8 @@ public: KWBgSpellCheck* backSpeller() const { return m_bgSpellCheck; } - /// Load the given page layout; public for KWTextParag - bool loadOasisPageLayout( const QString& masterPageName, KoOasisContext& context ); + /// Load the given page tqlayout; public for KWTextParag + bool loadOasisPageLayout( const TQString& masterPageName, KoOasisContext& context ); // end of public methods signals: @@ -772,7 +773,7 @@ signals: /// This is emitted by setPageLayout if updateViews=true void pageLayoutChanged( const KoPageLayout& ); - /// Emitted when the scrollview contents must be resized (e.g. new page, new layout...) + /// Emitted when the scrollview contents must be resized (e.g. new page, new tqlayout...) void newContentsSize(); /** This is emitted when the height of the text in the main frameset changes @@ -793,10 +794,10 @@ signals: public slots: void slotRepaintChanged( KWFrameSet * frameset ); - void framesChanged( const QValueList<KWFrame*> &frames); + void framesChanged( const TQValueList<KWFrame*> &frames); - /** calls invalidate() on all framesets */ - void invalidate(const KWFrameSet *skipThisFrameSet=0); + /** calls tqinvalidate() on all framesets */ + void tqinvalidate(const KWFrameSet *skipThisFrameSet=0); virtual void initEmpty(); @@ -809,8 +810,8 @@ protected slots: void slotChapterParagraphFormatted( KoTextParag* parag ); void saveDialogShown(); ///< called just before the save-dialog is shown - virtual void openExistingFile( const QString& file ); - virtual void openTemplate( const QString& file ); + virtual void openExistingFile( const TQString& file ); + virtual void openTemplate( const TQString& file ); private slots: /// is called from a singleShot timer due to frameChanged() @@ -820,32 +821,32 @@ protected: void nextParagraphNeedingCheck(); /// fix up Z-order for import from older kword versions. void fixZOrders(); - QString checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet*, int pageNum ) const; - KoView* createViewInstance( QWidget* parent, const char* name ); + TQString checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet*, int pageNum ) const; + KoView* createViewInstance( TQWidget* tqparent, const char* name ); virtual bool completeLoading( KoStore* store ); virtual bool completeSaving( KoStore *store ); - void loadFrameSets( const QDomElement &framesets ); - void loadStyleTemplates( const QDomElement &styles ); - void saveStyle( KoParagStyle *sty, QDomElement parentElem ); - void saveFrameStyle( KWFrameStyle *sty, QDomElement parentElem ); - void saveTableStyle( KWTableStyle *sty, QDomElement parentElem ); + void loadFrameSets( const TQDomElement &framesets ); + void loadStyleTemplates( const TQDomElement &styles ); + void saveStyle( KoParagStyle *sty, TQDomElement tqparentElem ); + void saveFrameStyle( KWFrameStyle *sty, TQDomElement tqparentElem ); + void saveTableStyle( KWTableStyle *sty, TQDomElement tqparentElem ); - void loadFrameStyleTemplates( const QDomElement &styles ); + void loadFrameStyleTemplates( const TQDomElement &styles ); void loadDefaultFrameStyleTemplates(); - void loadTableStyleTemplates( const QDomElement &styles ); + void loadTableStyleTemplates( const TQDomElement &styles ); void loadDefaultTableStyleTemplates(); void loadDefaultTableTemplates(); - bool loadMasterPageStyle( const QString& masterPageName, KoOasisContext& context ); + bool loadMasterPageStyle( const TQString& masterPageName, KoOasisContext& context ); void saveOasisBody( KoXmlWriter& writer, KoSavingContext& context ) const; void saveOasisCustomFied( KoXmlWriter &writer )const; - QValueList<KoPictureKey> savePictureList(); + TQValueList<KoPictureKey> savePictureList(); /// helper method for the 2 different dragSelected() versions - QDragObject* dragSelectedPrivate( QWidget *parent, const QValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs); + TQDragObject* dragSelectedPrivate( TQWidget *tqparent, const TQValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs); /** * Save the whole document, or just the selection, into OASIS format * When saving the selection, also return the data as plain text and/or plain picture, @@ -861,16 +862,16 @@ protected: * @param fs the text frameset, which must be set when saveFlag==SaveSelected. */ bool saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, - const QValueList<KWFrameView*> &selectedFrames, - QString* plainText = 0, KoPicture* picture = 0, KWTextFrameSet* fs = 0 ); + const TQValueList<KWFrameView*> &selectedFrames, + TQString* plainText = 0, KoPicture* picture = 0, KWTextFrameSet* fs = 0 ); void saveOasisSettings( KoXmlWriter &settingsWriter ) const; void saveSelectedFrames( KoXmlWriter& bodyWriter, - KoSavingContext& savingContext, QValueList<KoPictureKey>& pictureList, - const QValueList<KWFrameView*> &selectedFrames, QString* plainText ) const; + KoSavingContext& savingContext, TQValueList<KoPictureKey>& pictureList, + const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText ) const; // inherited from KoDocument - QWidget* createCustomDocumentWidget(QWidget *parent); + TQWidget* createCustomDocumentWidget(TQWidget *tqparent); private: void clear(); @@ -878,25 +879,25 @@ private: class FramesChangedHandler { public: - FramesChangedHandler(KWDocument *parent); + FramesChangedHandler(KWDocument *tqparent); void addFrame(KWFrame*); void addFrameSet(KWFrameSet*); void execute(); private: KWDocument *m_parent; - QValueList<KWFrameSet*> m_frameSets; + TQValueList<KWFrameSet*> m_frameSets; bool m_needLayout; }; // Variables: - QValueList<KWView *> m_lstViews; + TQValueList<KWView *> m_lstViews; KoColumns m_pageColumns; KoKWHeaderFooter m_pageHeaderFooter; KoPictureCollection* m_pictureCollection; - QPtrList<KWFrameSet> m_lstFrameSet; + TQPtrList<KWFrameSet> m_lstFrameSet; unsigned int m_itemsLoaded; unsigned int m_nrItemsToLoad; @@ -911,18 +912,18 @@ private: // ===== Legacy loading stuff, remove when switching to OASIS ===== /// \note Shared between loadXML and loadComplete - QString m_urlIntern; + TQString m_urlIntern; - QMap<KoPictureKey, QString> m_pictureMap; + TQMap<KoPictureKey, TQString> m_pictureMap; /// List used to help loading and saving images of the old type ("text image" of class KWTextImage) - QPtrList<KWTextImage> m_textImageRequests; - QPtrList<KWPictureFrameSet> m_pictureRequests; - QMap<QString, KWAnchorPosition> m_anchorRequests; - QMap<QString, KWFootNoteVariable *> m_footnoteVarRequests; ///< \todo still needed? (move to KWLoadingInfo if so) + TQPtrList<KWTextImage> m_textImageRequests; + TQPtrList<KWPictureFrameSet> m_pictureRequests; + TQMap<TQString, KWAnchorPosition> m_anchorRequests; + TQMap<TQString, KWFootNoteVariable *> m_footnoteVarRequests; ///< \todo still needed? (move to KWLoadingInfo if so) // ===== End of legacy loading stuff ===== - QMap<QString,QString> * m_pasteFramesetsMap; + TQMap<TQString,TQString> * m_pasteFramesetsMap; KoVariableFormatCollection *m_varFormatCollection; KWMailMergeDataBase *m_slDataBase; @@ -935,7 +936,7 @@ private: */ int m_syntaxVersion; - QFont m_defaultFont; + TQFont m_defaultFont; bool m_headerVisible, m_footerVisible; bool m_viewFrameBorders; bool m_bShowRuler; @@ -943,7 +944,7 @@ private: bool m_hasTOC; bool m_bShowStatusBar; bool m_pgUpDownMovesCaret; - bool m_repaintAllViewsPending; + bool m_tqrepaintAllViewsPending; bool m_bAllowAutoFormat; bool m_bShowScrollBar; bool m_cursorInProtectectedArea; @@ -969,8 +970,8 @@ private: int m_recalcFramesPending; /// The name of the viewmode used by all views. - QString m_viewModeType; - /// The viewmode used for text layouting + TQString m_viewModeType; + /// The viewmode used for text tqlayouting KWViewMode* m_layoutViewMode; KWVariableCollection *m_varColl; KWBgSpellCheck *m_bgSpellCheck; @@ -990,12 +991,12 @@ private: /** Page number -> section title array, for the Section variable. * Note that pages without a section title don't appear in the array. */ - QValueVector< QString > m_sectionTitles; + TQValueVector< TQString > m_sectionTitles; double m_tabStop; - QStringList m_spellCheckIgnoreList; // per-document - QStringList m_spellCheckPersonalDict; // per-user - QPixmap* m_bufPixmap; + TQStringList m_spellCheckIgnoreList; // per-document + TQStringList m_spellCheckPersonalDict; // per-user + TQPixmap* m_bufPixmap; KWLoadingInfo* m_loadingInfo; @@ -1005,8 +1006,8 @@ private: KoTextBookmarkList* m_bookmarkList; - QStringList m_personalExpressionPath; - QString m_globalLanguage; + TQStringList m_personalExpressionPath; + TQString m_globalLanguage; bool m_bGlobalHyphenation; bool m_bGeneratingPreview; |