#include <exercisemodel.h>

Signals | |
| void | printError (QString) |
| void | setSelection (uint, int) |
| void | resetView () |
Public Member Functions | |
| ExerciseModel (bool exercise, DataProject *project=0, QAbstractItemModel *parent=0) | |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| QModelIndex | parent (const QModelIndex &index) const |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| void | addChapter (QString chapterName, uint chapterId) |
| void | addExercise (QString chapterName, QString exerciseName, uint exerciseId, DataExerciseStatus status) |
| void | addOtherExercises (uint chapterId, ExerciseItem *oldExercise) |
| bool | existsChapter (QString chapterName) |
| bool | existsExercise (QString chapterName, QString exerciseName) |
| void | editState (QString exerciseName, int exerciseId, DataExerciseStatus state) |
| void | replaceChapterName (ExerciseItem *oldChapter, QString name) |
| void | replaceExerciseName (ExerciseItem *oldExercise, QString name) |
| void | removeChapterByName (QString chapterName) |
| void | removeExerciseByName (QString chapterName, QString exerciseName, uint chapterId=0) |
| void | editChapter (QString oldChap, QString newChap) |
| void | removeChapter (int chapterID, QString chapterName) |
| void | removeExercise (ExerciseItem *chapter, QString exerciseName) |
| int | chapterID (QString chapterName) |
| QString | chapterName (uint chapterId) |
| ExerciseItem * | chapter (uint chapterId, QString name) |
| ExerciseItem * | chapterByName (QString name) |
| ExerciseItem * | chapterById (uint chapterId) |
| uint | maxChapterID () |
| uint | maxExerciseIdByChapterId (uint chapterId) |
| uint | maxExerciseIdByChapterName (QString chapterName) |
| ExerciseItem * | getExercise (QString chapterName, QString exerciseName) const |
| ExerciseItem * | getItemByName (QString name) const |
| ExerciseItem * | getRootItem () |
| void | setTeacher (bool state) |
| void | drawTreeOnDebugOutput () |
| void | setPrintDialogUser (bool used) |
chapter -> Name QMap -> chapterId Exercise -> Name QMap -> exerciseId -> chapterId -> state
Definition at line 29 of file exercisemodel.h.
| ExerciseModel::ExerciseModel | ( | bool | exercise, | |
| DataProject * | project = 0, |
|||
| QAbstractItemModel * | parent = 0 | |||
| ) |
| void ExerciseModel::addChapter | ( | QString | chapterName, | |
| uint | chapterId | |||
| ) |
Definition at line 287 of file exercisemodel.cpp.


| void ExerciseModel::addExercise | ( | QString | chapterName, | |
| QString | exerciseName, | |||
| uint | exerciseId, | |||
| DataExerciseStatus | status | |||
| ) |
Definition at line 312 of file exercisemodel.cpp.


| void ExerciseModel::addOtherExercises | ( | uint | chapterId, | |
| ExerciseItem * | oldExercise | |||
| ) |
Definition at line 342 of file exercisemodel.cpp.


| ExerciseItem* ExerciseModel::chapter | ( | uint | chapterId, | |
| QString | name | |||
| ) |

| ExerciseItem * ExerciseModel::chapterById | ( | uint | chapterId | ) |
Definition at line 495 of file exercisemodel.cpp.


| ExerciseItem * ExerciseModel::chapterByName | ( | QString | name | ) |
Definition at line 508 of file exercisemodel.cpp.


| int ExerciseModel::chapterID | ( | QString | chapterName | ) |
Definition at line 521 of file exercisemodel.cpp.


| QString ExerciseModel::chapterName | ( | uint | chapterId | ) |
Definition at line 535 of file exercisemodel.cpp.


| int ExerciseModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| QVariant ExerciseModel::data | ( | const QModelIndex & | index, | |
| int | role = Qt::DisplayRole | |||
| ) | const |
Definition at line 158 of file exercisemodel.cpp.


| void ExerciseModel::drawTreeOnDebugOutput | ( | ) |
| void ExerciseModel::editChapter | ( | QString | oldChap, | |
| QString | newChap | |||
| ) |
| void ExerciseModel::editState | ( | QString | exerciseName, | |
| int | exerciseId, | |||
| DataExerciseStatus | state | |||
| ) |
Definition at line 421 of file exercisemodel.cpp.


| bool ExerciseModel::existsChapter | ( | QString | chapterName | ) |
Definition at line 540 of file exercisemodel.cpp.


| bool ExerciseModel::existsExercise | ( | QString | chapterName, | |
| QString | exerciseName | |||
| ) |
Definition at line 554 of file exercisemodel.cpp.


| Qt::ItemFlags ExerciseModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 37 of file exercisemodel.cpp.
| ExerciseItem * ExerciseModel::getExercise | ( | QString | chapterName, | |
| QString | exerciseName | |||
| ) | const |
| ExerciseItem * ExerciseModel::getItemByName | ( | QString | name | ) | const |
| ExerciseItem* ExerciseModel::getRootItem | ( | ) | [inline] |
| QVariant ExerciseModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const |
| QModelIndex ExerciseModel::index | ( | int | row, | |
| int | column, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) | const |
Definition at line 73 of file exercisemodel.cpp.


| uint ExerciseModel::maxChapterID | ( | ) | [inline] |
| uint ExerciseModel::maxExerciseIdByChapterId | ( | uint | chapterId | ) |
| uint ExerciseModel::maxExerciseIdByChapterName | ( | QString | chapterName | ) |
| QModelIndex ExerciseModel::parent | ( | const QModelIndex & | index | ) | const |
| void ExerciseModel::printError | ( | QString | ) | [signal] |

| void ExerciseModel::removeChapter | ( | int | chapterID, | |
| QString | chapterName | |||
| ) |
Definition at line 467 of file exercisemodel.cpp.


| void ExerciseModel::removeChapterByName | ( | QString | chapterName | ) |
| void ExerciseModel::removeExercise | ( | ExerciseItem * | chapter, | |
| QString | exerciseName | |||
| ) |
Definition at line 481 of file exercisemodel.cpp.


| void ExerciseModel::removeExerciseByName | ( | QString | chapterName, | |
| QString | exerciseName, | |||
| uint | chapterId = 0 | |||
| ) |
| void ExerciseModel::replaceChapterName | ( | ExerciseItem * | oldChapter, | |
| QString | name | |||
| ) |
Definition at line 382 of file exercisemodel.cpp.


| void ExerciseModel::replaceExerciseName | ( | ExerciseItem * | oldExercise, | |
| QString | name | |||
| ) |
Definition at line 400 of file exercisemodel.cpp.


| void ExerciseModel::resetView | ( | ) | [signal] |

| int ExerciseModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| bool ExerciseModel::setData | ( | const QModelIndex & | index, | |
| const QVariant & | value, | |||
| int | role = Qt::EditRole | |||
| ) |
| void ExerciseModel::setPrintDialogUser | ( | bool | used | ) | [inline] |
| void ExerciseModel::setSelection | ( | uint | , | |
| int | ||||
| ) | [signal] |

| void ExerciseModel::setTeacher | ( | bool | state | ) | [inline] |
1.5.9