KoTextView Class Reference
Object that is created to edit a KoTextObject. More...
#include <kotextview.h>
Inheritance diagram for KoTextView:


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 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 * | setMarginCommand (QStyleSheetItem::Margin m, double margin) |
KCommand * | setTabListCommand (const KoTabulatorList &tabList) |
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 | 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 |
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 52 of file kotextview.h.
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 59 of file kotextview.cc. References KoTextObject::formatMore(), startDrag(), KoTextObject::textDocument(), and updateUI(). |
Member Function Documentation
|
don't remove selection when we made dnd between different frame
Definition at line 116 of file kotextview.cc. |
|
Return true if the view is allowed to modify the text object. This is the case by default Definition at line 76 of file kotextview.h. |
|
Call setReadWrite(false) to make the text view readonly.
Definition at line 78 of file kotextview.h. |
|
Interface for accessing the current format.
Implements KoTextFormatInterface. Definition at line 80 of file kotextview.h. Referenced by updateUI(). |
|
Use this format for displaying the properties (Align/counter/. ..) of the object Implements KoTextFormatInterface. Definition at line 1251 of file kotextview.cc. |
|
Interface for changing the paragraph layout.
Implements KoTextFormatInterface. Definition at line 1262 of file kotextview.cc. |
|
Implement the KoTextFormatInterface.
Implements KoTextFormatInterface. Definition at line 970 of file kotextview.cc. |
|
Return the list of actions from data-tools. Used to populate a RMB popupmenu usually. Definition at line 1078 of file kotextview.cc. |
|
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 1357 of file kotextview.cc. References KoTextObject::protectContent(). |
|
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 990 of file kotextview.cc. References currentFormat(), and KoTextFormat::setMisspelled(). Referenced by KoTextView(). |
|
This is a slot so that it's accessible from DCOP.
Definition at line 412 of file kotextview.cc. |
|
Start a drag.
Referenced by KoTextView(). |
|
Called when a character ( This is a virtual method rather than a signal for performance reasons. Definition at line 205 of file kotextview.h. |
|
Show the settings of this format in the GUI. Needs to be implemented in the application. |
|
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 946 of file kotextview.cc. |
|
Called when clicking on a link.
Definition at line 1187 of file kotextview.cc. |
|
Reimplement this to handle PageUp. Example implementation: textView->cursor()->gotoPageUp( scrollview->visibleHeight() ); |
|
Reimplement this to handle PageDown. Example implementation: textView->cursor()->gotoPageDown( scrollview->visibleHeight() ); |
|
Reimplement this to handle CTRL+PageUp. Default implementation calls pgUpKeyPressed Definition at line 238 of file kotextview.h. |
|
Reimplement this to handle CTRL+PageDown. Default implementation calls pgDownKeyPressed Definition at line 240 of file kotextview.h. |
The documentation for this class was generated from the following files: