lib
KoTextView Class Reference
#include <KoTextView.h>
Inheritance diagram for KoTextView:

Detailed Description
Object that is created to edit a KoTextObject.It handles all the events for it (mouse, keyboard). There can be several KoTextView instances for the same KoTextObject.
Definition at line 53 of file KoTextView.h.
Public Types | |
enum | CursorAction { MoveBackward, MoveForward, MoveWordBackward, MoveWordForward, MoveUp, MoveDown, MoveLineStart, MoveLineEnd, MoveHome, MoveEnd, MovePgUp, MovePgDown, MoveParagUp, MoveParagDown, MoveViewportUp, MoveViewportDown } |
Public Slots | |
virtual void | updateUI (bool updateFormat, bool force=false) |
virtual void | ensureCursorVisible ()=0 |
void | showCurrentFormat () |
void | hideCursor () |
void | showCursor () |
void | insertText (const QString &text) |
void | newParagraph () |
void | copyLink () |
void | removeLink () |
void | completion () |
void | setCursor (KoTextCursor *_cursor) |
Signals | |
void | copy () |
void | cut () |
void | paste () |
Public Member Functions | |
KoTextView (KoTextObject *textobj) | |
virtual | ~KoTextView () |
void | setBackSpeller (KoBgSpellCheck *backSpeller) |
virtual KoTextViewIface * | dcopObject () |
void | terminate (bool removeselection=true) |
KoTextObject * | textObject () const |
KoTextCursor * | cursor () const |
void | setCursor (const KoTextCursor &cursor) |
KoTextDocument * | textDocument () const |
bool | isReadWrite () const |
void | setReadWrite (bool b) |
virtual KoTextFormat * | currentFormat () const |
void | setCurrentFormat (KoTextFormat *fmt) |
virtual const KoParagLayout * | currentParagLayoutFormat () const |
virtual bool | rtl () const |
virtual KCommand * | setChangeCaseOfTextCommand (KoChangeCaseDia::TypeOfCase _type) |
virtual KCommand * | setParagLayoutFormatCommand (KoParagLayout *newLayout, int flags, int marginIndex=-1) |
virtual KCommand * | setFormatCommand (const KoTextFormat *newFormat, int flags, bool zoomFont=false) |
KCommand * | setCounterCommand (const KoParagCounter &counter) |
KCommand * | setAlignCommand (int align) |
KCommand * | setPageBreakingCommand (int pageBreaking) |
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 * | setTabListCommand (const KoTabulatorList &tabList) |
KCommand * | setBackgroundColorCommand (const QColor &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) |
bool | handleMousePressEvent (QMouseEvent *e, const QPoint &iPoint, bool canStartDrag=true, bool insertDirectCursor=false) |
void | handleMouseMoveEvent (QMouseEvent *e, const QPoint &iPoint) |
void | handleMouseReleaseEvent () |
void | handleMouseDoubleClickEvent (QMouseEvent *e, const QPoint &iPoint) |
void | handleMouseTripleClickEvent (QMouseEvent *e, const QPoint &) |
bool | maybeStartDrag (QMouseEvent *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) |
QString | wordUnderCursor (const KoTextCursor &cursor) |
QPtrList< KAction > | dataToolActionList (KInstance *instance, const QString &word, bool &_singleWord) |
void | insertSoftHyphen () |
void | insertLineBreak () |
void | insertNonbreakingSpace () |
void | insertNonbreakingHyphen () |
void | increaseNumberingLevel (const KoStyleCollection *styleCollection) |
void | decreaseNumberingLevel (const KoStyleCollection *styleCollection) |
void | insertSpecialChar (QChar _c, const QString &font) |
void | changeCaseOfText (KoChangeCaseDia::TypeOfCase _type) |
void | addBookmarks (const QString &) |
KoVariable * | variable () |
KoLinkVariable * | linkVariable () |
KCommand * | prepareDropMove (KoTextCursor dropCursor) |
void | removeComment () |
void | copyTextOfComment () |
KoParagStyle * | createStyleFromSelection (const QString &name) |
void | updateStyleFromSelection (KoParagStyle *style) |
QString | currentWordOrSelection () const |
virtual void | removeToolTipCompletion () |
bool | placeCursor (const QPoint &pos, bool insertDirectCursor=false) |
void | setOverwriteMode (bool overwriteMode) |
void | moveCursor (CursorAction action, bool select) |
bool | moveCursor (CursorAction action) |
Protected Slots | |
virtual void | startDrag ()=0 |
void | slotToolActivated (const KDataToolInfo &info, const QString &command) |
Protected Member Functions | |
virtual void | doAutoFormat (KoTextCursor *, KoTextParag *, int, QChar) |
virtual bool | doCompletion (KoTextCursor *, KoTextParag *, int) |
virtual bool | doToolTipCompletion (KoTextCursor *, KoTextParag *, int, int) |
virtual void | showToolTipBox (KoTextParag *, int, QWidget *, const QPoint &) |
virtual void | textIncreaseIndent () |
virtual bool | textDecreaseIndent () |
virtual bool | doIgnoreDoubleSpace (KoTextParag *, int, QChar) |
virtual void | showFormat (KoTextFormat *format)=0 |
virtual void | drawCursor (bool b) |
virtual bool | openLink (KoLinkVariable *linkVariable) |
virtual bool | pgUpKeyPressed ()=0 |
virtual bool | pgDownKeyPressed ()=0 |
virtual void | ctrlPgUpKeyPressed () |
virtual void | ctrlPgDownKeyPressed () |
void | deleteWordLeft () |
void | deleteWordRight () |
bool | insertParagraph (const QPoint &pos) |
Protected Attributes | |
KoTextViewIface * | dcop |
Constructor & Destructor Documentation
|
Constructor. A KoTextView is associated to a KoTextObject. Don't forget to call updateUI(true,true) in your derived constructor Definition at line 65 of file KoTextView.cpp. |
Member Function Documentation
|
Reimplement this to handle CTRL+PageDown. Default implementation calls pgDownKeyPressed Definition at line 246 of file KoTextView.h. |
|
Reimplement this to handle CTRL+PageUp. Default implementation calls pgUpKeyPressed Definition at line 244 of file KoTextView.h. |
|
Interface for accessing the current format.
Implements KoTextFormatInterface. Definition at line 83 of file KoTextView.h. |
|
Use this format for displaying the properties (Align/counter/. ..) of the object Implements KoTextFormatInterface. Definition at line 1256 of file KoTextView.cpp. |
|
Return the list of actions from data-tools. Used to populate a RMB popupmenu usually. Definition at line 1083 of file KoTextView.cpp. |
|
Called when a character ( This is a virtual method rather than a signal for performance reasons. Definition at line 211 of file KoTextView.h. |
|
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) Definition at line 943 of file KoTextView.cpp. |
|
This is a slot so that it's accessible from DCOP.
Definition at line 404 of file KoTextView.cpp. |
|
Return true if the view is allowed to modify the text object. This is the case by default Definition at line 79 of file KoTextView.h. |
|
Called when clicking on a link.
Definition at line 1192 of file KoTextView.cpp. |
|
Reimplement this to handle PageDown. Example implementation: textView->cursor()->gotoPageDown( scrollview->visibleHeight() ); |
|
Reimplement this to handle PageUp. Example implementation: textView->cursor()->gotoPageUp( scrollview->visibleHeight() ); |
|
A "drop move" will move the selected text to the given cursor position. This method only takes care of "removing the selected text" if the drop cursor isn't in the selected text (and !protectContent). Definition at line 1367 of file KoTextView.cpp. |
|
Implement the KoTextFormatInterface.
Implements KoTextFormatInterface. Definition at line 967 of file KoTextView.cpp. |
|
Interface for changing the paragraph layout.
Implements KoTextFormatInterface. Definition at line 1267 of file KoTextView.cpp. |
|
Call setReadWrite(false) to make the text view readonly.
Definition at line 81 of file KoTextView.h. |
|
Show the settings of this format in the GUI. Needs to be implemented in the application. |
|
Start a drag.
|
|
don't remove selection when we made dnd between different frame
Definition at line 123 of file KoTextView.cpp. |
|
Show the current settings (those for the paragraph and character under the cursor), in the GUI. The default implementation handles m_currentFormat and calls showCurrentFormat(). If you reimplement, make sure to call KoTextView::updateUI(updateFormat,force); Definition at line 987 of file KoTextView.cpp. |
The documentation for this class was generated from the following files: