lib Library API Documentation

View Class Reference

The view that shows the formula. More...

#include <kformulaview.h>

List of all members.

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 *)

Protected Member Functions

virtual bool cursorVisible ()


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.


Member Function Documentation

QPoint View::getCursorPoint  )  const
 

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

Definition at line 102 of file kformulaview.cc.

References KoZoomHandler::layoutUnitToPixel().

Referenced by KFormulaWidget::getCursorPoint().

void View::setReadOnly bool  ro  ) 
 

Puts the widget in read only mode.

Definition at line 107 of file kformulaview.cc.

References FormulaCursor::setReadOnly().

Referenced by KFormulaWidget::setReadOnly().

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

The document we show.

Definition at line 100 of file kformulaview.h.

Referenced by KFormulaWidget::getDocument().

FormulaCursor* View::getCursor  )  const [inline]
 

Our cursor.

Definition at line 105 of file kformulaview.h.

Referenced by KFormulaWidget::getCursor().

bool View::isHome  )  const
 

Returns:
whether the cursor is at the first position.

Definition at line 318 of file kformulaview.cc.

References FormulaCursor::isHome().

bool View::isEnd  )  const
 

Returns:
whether the cursor is at the last position.

Definition at line 323 of file kformulaview.cc.

References FormulaCursor::isEnd().

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

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

A new formula has been loaded.

Definition at line 256 of file kformulaview.cc.

References FormulaCursor::formulaLoaded().

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

References FormulaCursor::elementWillVanish().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 13:19:32 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2003