OMNotebook: IAEX::CellCursor Class Reference

- Main Page
- Classes
- Files
- Related Pages
- Examples

- Class List
- Class Hierarchy
- Class Members

# IAEX::CellCursor Class Reference

Implements a special type of cell that is used as a cursor within the document. More...

Inheritance diagram for IAEX::CellCursor:

List of all members.

## Public Member Functions
| CellCursor (QWidget *parent=0)
| The class constructor.
virtual | ~CellCursor ()
| The class destructor.
void | deleteCurrentCell ()
void | removeCurrentCell ()
void | replaceCurrentWith (Cell *newCell)
| Replaces current cell with a new cell.
Cell * | currentCell ()
void | moveDown ()
void | moveToFirstChild (Cell *parent)
void | moveToLastChild (Cell *parent)
void | moveAfter (Cell *current)
virtual void | accept (Visitor &v)
bool | isEditable ()
| Function for telling if the user is allowed to change the text settings for the text inside the cell. User isn't allowed to change the text settings for cellcursor so this function always return false.
bool | isClickedOn ()
| Return state of the clickedOn_ property.
## Protected Member Functions
void | mousePressEvent (QMouseEvent *event)
| Reimplemenation of the mousePressEvent function.

## Detailed Description

Implements a special type of cell that is used as a cursor within the document.

The cellcursor class acts like a ordinary cell. It extends a cell with the functionality to move around in the celltree. See moveUp and moveDown members.

This class should be inherited with a lot of precaution. It has a lot of responsibility and dependency within the application. So change it with caution.

To change the cursors look reimplement the CursorWidget to have the desired look.

## Constructor & Destructor Documentation

IAEX::CellCursor::CellCursor | ( | QWidget * | parent = `0` | ) |

| The class constructor. Author: Ingemar Axelsson

IAEX::CellCursor::~CellCursor | ( |  | ) | `[virtual]`

| The class destructor. Author: Ingemar Axelsson

## Member Function Documentation

void IAEX::CellCursor::accept | ( | Visitor & | v | ) | `[virtual]`

| Bug: This does not work correctly. Reimplemented from IAEX::Cell.

Cell * IAEX::CellCursor::currentCell | ( |  | ) |

| Returns current cell.

void IAEX::CellCursor::deleteCurrentCell | ( |  | ) |

| Bug: Segfault in cellgroups. Probably a parent, child or last. Deletion of last cell in cellgroup should be taken care of.

bool IAEX::CellCursor::isClickedOn | ( |  | ) |

| Return state of the clickedOn_ property. Author: Anders Fernström Date: 2006-04-27

bool IAEX::CellCursor::isEditable | ( |  | ) | `[virtual]`

| Function for telling if the user is allowed to change the text settings for the text inside the cell. User isn't allowed to change the text settings for cellcursor so this function always return false. Author: Anders Fernström Date: 2005-10-28 Returns: False Implements IAEX::Cell.

void IAEX::CellCursor::mousePressEvent | ( | QMouseEvent * | event | ) | `[protected]`

| Reimplemenation of the mousePressEvent function. Author: Anders Fernström Date: 2006-04-27

void IAEX::CellCursor::moveAfter | ( | Cell * | current | ) |

| Bug: Fel vid flytt så cursor hamnar som sista barn.

void IAEX::CellCursor::moveDown | ( |  | ) |

| Bug: Segmentationfault when last cell. Todo: It is better that Commands take care of how to change state of cells.(Ingemar Axelsson)

void IAEX::CellCursor::moveToFirstChild | ( | Cell * | parent | ) |

| Insert this cell as first child of parent. Bug: This does not seem to work correctly.

void IAEX::CellCursor::moveToLastChild | ( | Cell * | parent | ) |

| Bug: This does not seem to work correctly.

void IAEX::CellCursor::removeCurrentCell | ( |  | ) |

| Removes a cell and all its subcells from the tree. This should work for all cells. But it will leave an empty cellgroup if last cell is deleted in cellgroup. This does not delete the cell, it just removes the cell from the celltree.

void IAEX::CellCursor::replaceCurrentWith | ( | Cell * | newCell | ) |

| Replaces current cell with a new cell. Todo: create a cellcopy operation. test!

The documentation for this class was generated from the following files:

- C:/OpenModelica/OMNotebookQT4 v2/OMNotebookQT4/cellcursor.h
- C:/OpenModelica/OMNotebookQT4 v2/OMNotebookQT4/cellcursor.cpp
- C:/OpenModelica/OMNotebookQT4 v2/OMNotebookQT4/moc_cellcursor.cpp