kword
KWCanvas Class Reference
#include <KWCanvas.h>
Detailed Description
Class: KWCanvas This class is responsible for the rendering of the frames to the screen as well as the interaction with the user via mouse and keyboard.There is one per view.
Definition at line 60 of file KWCanvas.h.
Public Types | |
enum | MouseMode { MM_EDIT = 0, MM_CREATE_TEXT = 2, MM_CREATE_PIX = 3, MM_CREATE_TABLE = 5, MM_CREATE_FORMULA = 6, MM_CREATE_PART = 7 } |
Signals | |
void | currentFrameSetEditChanged () |
void | selectionChanged (bool hasSelection) |
void | currentMouseModeChanged (int newMouseMode) |
void | frameSelectedChanged () |
void | docStructChanged (int _type) |
void | overwriteModeChanged (bool m_overwriteMode) |
void | viewTransformationsChanged () |
void | updateRuler () |
Public Member Functions | |
KWCanvas (const QString &viewMode, QWidget *parent, KWDocument *d, KWGUI *lGui) | |
virtual | ~KWCanvas () |
KWDocument * | kWordDocument () const |
KWGUI * | gui () const |
KWFrameViewManager * | frameViewManager () |
KWFrameSetEdit * | currentFrameSetEdit () const |
void | switchViewMode (const QString &newViewMode) |
KWViewMode * | viewMode () const |
void | repaintAll (bool erase=false) |
void | repaintChanged (KWFrameSet *fs, bool resetChanged) |
void | viewportResizeEvent (QResizeEvent *) |
void | print (QPainter *painter, KPrinter *printer) |
bool | eventFilter (QObject *o, QEvent *e) |
bool | focusNextPrevChild (bool next) |
void | setFrameBackgroundColor (const QBrush &backColor) |
void | editFrameProperties () |
void | editFrameProperties (KWFrameSet *frameset) |
void | pasteFrames () |
void | mpCreate (const QPoint &normalPoint, bool noGrid) |
void | mpCreatePixmap (const QPoint &normalPoint, bool noGrid) |
void | mmCreate (const QPoint &normalPoint, bool noGrid) |
void | mrEditFrame () |
void | mrCreateText () |
void | mrCreatePixmap () |
void | mrCreatePart () |
void | mrCreateFormula () |
void | mrCreateTable () |
void | setMouseMode (MouseMode _mm) |
MouseMode | mouseMode () const |
void | insertPicture (const KoPicture &newPicture, QSize pixmapSize, bool _keepRatio) |
void | insertPart (const KoDocumentEntry &entry) |
void | pasteImage (QMimeSource *e, const KoPoint &docPoint) |
void | insertPictureDirect (const KoPicture &picture, const KoPoint &pos, const QSize &sz=QSize()) |
void | updateCurrentFormat () |
void | updateFrameFormat () |
unsigned int | tableRows () const |
void | setTableRows (unsigned int rows) |
unsigned int | tableCols () const |
void | setTableCols (unsigned int cols) |
int | tableWidthMode () const |
int | tableHeightMode () const |
bool | tableIsFloating () const |
int | tableFormat () const |
void | setTableFormat (int _nb) |
QString | tableTemplateName () const |
void | setTableTemplateName (const QString &_name) |
void | setPictureInline (bool _inline) |
bool | pictureInline () const |
void | setPictureKeepRatio (bool _keep) |
bool | pictureKeepRatio () const |
void | createTable (unsigned int rows, unsigned int cols, intwid, inthei, bool isFloating, KWTableTemplate *tt=0L, int format=31) |
KWTableFrameSet * | getCurrentTable () const |
int | currentTableRow () const |
int | currentTableCol () const |
void | scrollToOffset (const KoPoint &dPoint) |
void | dragStarted () |
void | setXimPosition (int x, int y, int w, int h) |
void | updateRulerOffsets (int cx=-1, int cy=-1) |
void | inlinePictureStarted () |
void | ensureCursorVisible () |
void | editFrameSet (KWFrameSet *frameSet, bool onlyText=false) |
void | editTextFrameSet (KWFrameSet *fs, KoTextParag *parag, int index) |
bool | checkCurrentEdit (KWFrameSet *fs, bool onlyText=false) |
NoteType | footNoteType () const |
KWFootNoteVariable::Numbering | numberingFootNoteType () const |
void | setFootNoteType (NoteType _type) |
void | setNumberingFootNoteType (KWFootNoteVariable::Numbering _type) |
void | tableSelectCell (KWTableFrameSet *table, KWFrameSet *cell) |
void | selectAllFrames (bool select) |
KCommand * | createTextBox (const KoRect &rect) |
void | viewportScroll (bool up) |
void | resetStatusBarText () |
KoPoint | caretPos () |
void | applyGrid (KoPoint &p) |
bool | overwriteMode () const |
KWTextFrameSetEdit * | currentTextEdit () const |
bool | insertInlinePicture () |
Protected Member Functions | |
void | drawGrid (QPainter &p, const QRect &rect) |
virtual void | drawContents (QPainter *p, int cx, int cy, int cw, int ch) |
void | drawDocument (QPainter *painter, const QRect &crect, KWViewMode *viewMode) |
void | drawPageBorders (QPainter *painter, const QRect &crect, const QRegion &emptySpaceRegion) |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | contentsMousePressEvent (QMouseEvent *e) |
virtual void | contentsMouseMoveEvent (QMouseEvent *e) |
virtual void | contentsMouseReleaseEvent (QMouseEvent *e) |
virtual void | contentsMouseDoubleClickEvent (QMouseEvent *e) |
virtual void | contentsDragEnterEvent (QDragEnterEvent *e) |
virtual void | contentsDragMoveEvent (QDragMoveEvent *e) |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *e) |
virtual void | contentsDropEvent (QDropEvent *e) |
virtual void | resizeEvent (QResizeEvent *e) |
KWTableFrameSet * | createTable () |
void | terminateCurrentEdit () |
bool | insertInlineTable () |
Member Function Documentation
|
Returns the caret position in document coordinates. The current frame must be editable, i.e., a caret is possible. Definition at line 2002 of file KWCanvas.cpp. |
|
When the cursor is in a table cell, this returns the column.
Definition at line 1969 of file KWCanvas.cpp. |
|
When the cursor is in a table cell, this returns the row.
Definition at line 1956 of file KWCanvas.cpp. |
|
Reimplemented from QScrollView, to draw the contents of the canvas.
Definition at line 256 of file KWCanvas.cpp. |
|
The main drawing method.
Definition at line 271 of file KWCanvas.cpp. |
|
Draw page borders, but also clear up the space between the frames and the page borders, draw the page shadow, and the gray area.
|
|
Starting editing
In all cases, position the cursor at Definition at line 1261 of file KWCanvas.cpp. |
|
The current table (either because one or more cells are selected, or because the cursor is in a table cell.
Definition at line 161 of file KWCanvas.h. |
|
Only repaint the frameset
Definition at line 186 of file KWCanvas.cpp. |
|
Resets the status bar text.
Definition at line 1990 of file KWCanvas.cpp. |
|
We need to repaint if the window is resized.
Definition at line 207 of file KWCanvas.cpp. |
The documentation for this class was generated from the following files: