lib
View Class Reference
#include <kformulaview.h>
Detailed Description
The view that shows the formula.Its main purpose is to handle the cursor. There are methods to move the cursor around. To edit the formula use the document.
The view is meant to be easy embeddable into a widget or to be used alone if there is a bigger widget the formula is to be drawn into.
Definition at line 50 of file kformulaview.h.
Public Slots | |
void | slotSelectAll () |
Signals | |
void | cursorChanged (bool visible, bool selecting) |
Public Member Functions | |
View (Container *) | |
virtual | ~View () |
QPoint | getCursorPoint () const |
void | setReadOnly (bool ro) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | mouseDoubleClickEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | wheelEvent (QWheelEvent *event) |
void | mousePressEvent (QMouseEvent *event, const PtPoint &pos) |
void | mouseReleaseEvent (QMouseEvent *event, const PtPoint &pos) |
void | mouseDoubleClickEvent (QMouseEvent *event, const PtPoint &pos) |
void | mouseMoveEvent (QMouseEvent *event, const PtPoint &pos) |
void | wheelEvent (QWheelEvent *event, const PtPoint &pos) |
void | mousePressEvent (QMouseEvent *event, const LuPixelPoint &pos) |
void | mouseReleaseEvent (QMouseEvent *event, const LuPixelPoint &pos) |
void | mouseDoubleClickEvent (QMouseEvent *event, const LuPixelPoint &pos) |
void | mouseMoveEvent (QMouseEvent *event, const LuPixelPoint &pos) |
void | wheelEvent (QWheelEvent *event, const LuPixelPoint &pos) |
void | keyPressEvent (QKeyEvent *event) |
virtual void | focusInEvent (QFocusEvent *event) |
virtual void | focusOutEvent (QFocusEvent *event) |
void | calcCursor () |
void | draw (QPainter &painter, const QRect &rect, const QColorGroup &cg) |
void | draw (QPainter &painter, const QRect &rect) |
virtual Container * | getDocument () const |
FormulaCursor * | getCursor () const |
void | setSmallCursor (bool small) |
void | moveLeft (int flag=NormalMovement) |
void | moveRight (int flag=NormalMovement) |
void | moveUp (int flag=NormalMovement) |
void | moveDown (int flag=NormalMovement) |
void | moveHome (int flag=NormalMovement) |
void | moveEnd (int flag=NormalMovement) |
bool | isHome () const |
bool | isEnd () const |
void | eraseSelection (Direction direction=beforeCursor) |
void | addText (QString str) |
Protected Slots | |
void | slotCursorMoved (FormulaCursor *cursor) |
void | slotFormulaLoaded (FormulaElement *) |
void | slotElementWillVanish (BasicElement *) |
void | slotBlinkCursor () |
Protected Member Functions | |
virtual bool | cursorVisible () |
Member Function Documentation
void View::cursorChanged | ( | bool | visible, | |
bool | selecting | |||
) | [signal] |
Is emitted every time the cursor might have changed.
FormulaCursor* View::getCursor | ( | ) | const [inline] |
QPoint View::getCursorPoint | ( | ) | const |
- Returns:
- the point inside the formula view where the cursor is.
Definition at line 133 of file kformulaview.cc.
virtual Container* View::getDocument | ( | ) | const [inline, virtual] |
bool View::isEnd | ( | ) | const |
bool View::isHome | ( | ) | const |
- Returns:
- whether the cursor is at the first position.
Definition at line 363 of file kformulaview.cc.
void View::setReadOnly | ( | bool | ro | ) |
void View::slotBlinkCursor | ( | ) | [protected, slot] |
void View::slotCursorMoved | ( | FormulaCursor * | cursor | ) | [protected, slot] |
The cursor has been moved by the container.
We need to repaint if it was ours.
Definition at line 287 of file kformulaview.cc.
void View::slotElementWillVanish | ( | BasicElement * | ) | [protected, slot] |
There is an element that will disappear from the tree.
our cursor must not be inside it.
Definition at line 300 of file kformulaview.cc.
void View::slotFormulaLoaded | ( | FormulaElement * | ) | [protected, slot] |
The documentation for this class was generated from the following files: