diff options
Diffstat (limited to 'lib/kotext/KoTextView.h')
-rw-r--r-- | lib/kotext/KoTextView.h | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/lib/kotext/KoTextView.h b/lib/kotext/KoTextView.h index 51da4fb2..f094053d 100644 --- a/lib/kotext/KoTextView.h +++ b/lib/kotext/KoTextView.h @@ -20,10 +20,10 @@ #ifndef kotextview_h #define kotextview_h -#include <qobject.h> -#include <qpoint.h> -#include <qcolor.h> -#include <qfont.h> +#include <tqobject.h> +#include <tqpoint.h> +#include <tqcolor.h> +#include <tqfont.h> #include <KoRuler.h> // for KoTabulatorList #include <KoTextObject.h> // for KoTextView #include <koffice_export.h> @@ -34,7 +34,7 @@ class KoTextParag; class KoTextFormat; class KoParagCounter; class KCommand; -class QTimer; +class TQTimer; class KAction; class KInstance; class KDataToolInfo; @@ -50,9 +50,10 @@ class KoParagStyle; * It handles all the events for it (mouse, keyboard). * There can be several KoTextView instances for the same KoTextObject. */ -class KOTEXT_EXPORT KoTextView : public QObject, public KoTextFormatInterface +class KOTEXT_EXPORT KoTextView : public TQObject, public KoTextFormatInterface { Q_OBJECT + TQ_OBJECT public: /** * Constructor. A KoTextView is associated to a KoTextObject. @@ -104,36 +105,36 @@ public: KCommand * setLineSpacingCommand( double spacing, KoParagLayout::SpacingType _type ); KCommand * setBordersCommand( const KoBorder& leftBorder, const KoBorder& rightBorder, const KoBorder& bottomBorder, const KoBorder& topBorder ); KCommand * setJoinBordersCommand( bool join ); - KCommand * setMarginCommand( QStyleSheetItem::Margin m, double margin ); + KCommand * setMarginCommand( TQStyleSheetItem::Margin m, double margin ); KCommand * setTabListCommand( const KoTabulatorList & tabList ); - KCommand * setBackgroundColorCommand( const QColor & color ); + KCommand * setBackgroundColorCommand( const TQColor & color ); void applyStyle( const KoParagStyle * style ); void dragStarted(); void focusInEvent(); void focusOutEvent(); - void handleKeyPressEvent( QKeyEvent * e, QWidget *, const QPoint& ); - void handleKeyReleaseEvent( QKeyEvent * e ); - void handleImStartEvent( QIMEvent * e ); - void handleImComposeEvent( QIMEvent * e ); - void handleImEndEvent( QIMEvent * e ); + void handleKeyPressEvent( TQKeyEvent * e, TQWidget *, const TQPoint& ); + void handleKeyReleaseEvent( TQKeyEvent * e ); + void handleImStartEvent( TQIMEvent * e ); + void handleImComposeEvent( TQIMEvent * e ); + void handleImEndEvent( TQIMEvent * e ); // iPoint is in Layout Unit pixels // return true if we add new parag with "insert direct cursor" - bool handleMousePressEvent( QMouseEvent* e, const QPoint& iPoint, bool canStartDrag = true, bool insertDirectCursor = false ); - void handleMouseMoveEvent( QMouseEvent* e, const QPoint& iPoint ); + bool handleMousePressEvent( TQMouseEvent* e, const TQPoint& iPoint, bool canStartDrag = true, bool insertDirectCursor = false ); + void handleMouseMoveEvent( TQMouseEvent* e, const TQPoint& iPoint ); void handleMouseReleaseEvent(); - void handleMouseDoubleClickEvent( QMouseEvent* e, const QPoint& iPoint ); - void handleMouseTripleClickEvent( QMouseEvent* e, const QPoint& /* Currently unused */ ); - bool maybeStartDrag( QMouseEvent* e ); + void handleMouseDoubleClickEvent( TQMouseEvent* e, const TQPoint& iPoint ); + void handleMouseTripleClickEvent( TQMouseEvent* e, const TQPoint& /* Currently unused */ ); + bool maybeStartDrag( TQMouseEvent* e ); KoTextCursor selectWordUnderCursor( const KoTextCursor& cursor, int selectionId = KoTextDocument::Standard ); KoTextCursor selectParagUnderCursor( const KoTextCursor& cursor, int selectionId = KoTextDocument::Standard, bool copyAndNotify = true ); - void extendParagraphSelection( const QPoint& iPoint ); + void extendParagraphSelection( const TQPoint& iPoint ); - QString wordUnderCursor( const KoTextCursor& cursor ); + TQString wordUnderCursor( const KoTextCursor& cursor ); /** Return the list of actions from data-tools. Used to populate a RMB popupmenu usually. */ - QPtrList<KAction> dataToolActionList( KInstance * instance, const QString& word, bool & _singleWord ); + TQPtrList<KAction> dataToolActionList( KInstance * instance, const TQString& word, bool & _singleWord ); void insertSoftHyphen(); void insertLineBreak(); @@ -141,10 +142,10 @@ public: void insertNonbreakingHyphen(); void increaseNumberingLevel( const KoStyleCollection* styleCollection ); void decreaseNumberingLevel( const KoStyleCollection* styleCollection ); - void insertSpecialChar( QChar _c, const QString& font ); + void insertSpecialChar( TQChar _c, const TQString& font ); void changeCaseOfText( KoChangeCaseDia::TypeOfCase _type ); - void addBookmarks( const QString& ); + void addBookmarks( const TQString& ); //return a pointer to the variable under the cursor, if any KoVariable *variable(); @@ -161,15 +162,15 @@ public: void copyTextOfComment(); // This is in fact "from selection or cursor" - KoParagStyle * createStyleFromSelection( const QString & name ); + KoParagStyle * createStyleFromSelection( const TQString & name ); void updateStyleFromSelection( KoParagStyle* style ); - QString currentWordOrSelection() const; + TQString currentWordOrSelection() const; virtual void removeToolTipCompletion() {} // return true if we "insert direct cursor" and we insert new parag - bool placeCursor( const QPoint &pos /* in internal coordinates */, bool insertDirectCursor=false ); + bool placeCursor( const TQPoint &pos /* in internal coordinates */, bool insertDirectCursor=false ); void setOverwriteMode( bool overwriteMode ); public slots: @@ -185,7 +186,7 @@ public slots: void showCursor() { drawCursor( true ); } /** This is a slot so that it's accessible from DCOP */ - void insertText( const QString &text ); + void insertText( const TQString &text ); void newParagraph(); void copyLink(); @@ -197,7 +198,7 @@ public slots: protected slots: /** Start a drag */ virtual void startDrag() = 0; - void slotToolActivated( const KDataToolInfo & info, const QString & command ); + void slotToolActivated( const KDataToolInfo & info, const TQString & command ); signals: void copy(); void cut(); @@ -209,25 +210,25 @@ protected: * This is a virtual method rather than a signal for performance reasons. */ virtual void doAutoFormat( KoTextCursor* /*cursor*/, KoTextParag * /*parag*/, - int /*index*/, QChar /*ch*/ ) { } + int /*index*/, TQChar /*ch*/ ) { } virtual bool doCompletion( KoTextCursor* , KoTextParag *, int ) { return false; } virtual bool doToolTipCompletion( KoTextCursor* , KoTextParag *, int, int ) { return false; } - virtual void showToolTipBox( KoTextParag *, int , QWidget *, const QPoint& ) {} + virtual void showToolTipBox( KoTextParag *, int , TQWidget *, const TQPoint& ) {} virtual void textIncreaseIndent() {} virtual bool textDecreaseIndent() { return true; } //return true if we are a doubleSpace virtual bool doIgnoreDoubleSpace(KoTextParag * /*parag*/, - int /*index*/,QChar /*ch*/ ) { return false;} + int /*index*/,TQChar /*ch*/ ) { return false;} /** Show the settings of this format in the GUI. Needs to be implemented in the application. */ virtual void showFormat( KoTextFormat *format ) = 0; /** Draws the cursor (or hides it if b is false). * The default implementation only changes an internal flag, make sure to reimplement - * and to call the parent implementation (in all cases) + * and to call the tqparent implementation (in all cases) */ virtual void drawCursor( bool b ); @@ -247,7 +248,7 @@ protected: void deleteWordLeft(); void deleteWordRight(); - bool insertParagraph( const QPoint &pos ); + bool insertParagraph( const TQPoint &pos ); private slots: void blinkCursor(); @@ -256,7 +257,7 @@ private slots: protected: KoTextViewIface *dcop; public: // necessary to be public to allow script action in KoTextViewIface - enum CursorAction { // keep in sync with QTextEdit + enum CursorAction { // keep in sync with TQTextEdit MoveBackward, MoveForward, MoveWordBackward, @@ -287,10 +288,10 @@ private: bool m_overwriteMode; KoTextFormat *m_currentFormat; - QTimer *blinkTimer, *dragStartTimer; + TQTimer *blinkTimer, *dragStartTimer; class KoTextViewPrivate; KoTextViewPrivate *d; - QPoint dragStartPos; + TQPoint dragStartPos; bool m_cursorVisible; bool blinkCursorVisible; bool inDoubleClick; @@ -300,7 +301,7 @@ private: bool afterTripleClick; bool m_singleWord; - QString m_wordUnderCursor; + TQString m_wordUnderCursor; }; #endif |