lib

View Class Reference

#include <kformulaview.h>

Inherits QObject.

List of all members.


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 *)
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 ContainergetDocument () const
FormulaCursorgetCursor () 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

QPoint View::getCursorPoint (  )  const

Returns:
the point inside the formula view where the cursor is.

Definition at line 133 of file kformulaview.cc.

void View::setReadOnly ( bool  ro  ) 

Puts the widget in read only mode.

Definition at line 138 of file kformulaview.cc.

virtual Container* View::getDocument (  )  const [inline, virtual]

The document we show.

Definition at line 100 of file kformulaview.h.

FormulaCursor* View::getCursor (  )  const [inline]

Our cursor.

Definition at line 105 of file kformulaview.h.

bool View::isHome (  )  const

Returns:
whether the cursor is at the first position.

Definition at line 365 of file kformulaview.cc.

bool View::isEnd (  )  const

Returns:
whether the cursor is at the last position.

Definition at line 370 of file kformulaview.cc.

void View::cursorChanged ( bool  visible,
bool  selecting 
) [signal]

Is emitted every time the cursor might have changed.

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 289 of file kformulaview.cc.

void View::slotFormulaLoaded ( FormulaElement formula  )  [protected, slot]

A new formula has been loaded.

Definition at line 297 of file kformulaview.cc.

void View::slotElementWillVanish ( BasicElement element  )  [protected, slot]

There is an element that will disappear from the tree.

our cursor must not be inside it.

Definition at line 302 of file kformulaview.cc.

void View::slotBlinkCursor (  )  [protected, slot]

Tell the cursor to change its visibility status.

Definition at line 308 of file kformulaview.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys