33        Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
 
   34        Q_PROPERTY(
bool opened READ opened NOTIFY openedChanged)
 
   35        Q_PROPERTY(
bool saved READ saved NOTIFY savedChanged)
 
   36        Q_PROPERTY(
bool readOnly READ readOnly NOTIFY readOnlyChanged)
 
   37        Q_PROPERTY(
int lesson READ lesson WRITE setLesson NOTIFY lessonChanged)
 
   38        Q_PROPERTY(
int sublesson READ sublesson WRITE setSublesson NOTIFY sublessonChanged)
 
   39        Q_PROPERTY(
int exercise READ exercise WRITE setExercise NOTIFY exerciseChanged)
 
   40        Q_PROPERTY(QStringList lessonList READ lessonList NOTIFY lessonListChanged)
 
   41        Q_PROPERTY(QStringList sublessonList READ sublessonList NOTIFY sublessonListChanged)
 
   42        Q_PROPERTY(QStringList exerciseList READ exerciseList NOTIFY exerciseListChanged)
 
   43        Q_PROPERTY(QString currentText READ currentText NOTIFY currentTextChanged)
 
   44        Q_PROPERTY(QString currentRawText READ currentRawText WRITE setCurrentRawText NOTIFY currentRawTextChanged)
 
   45        Q_PROPERTY(QString currentRepeatType READ currentRepeatType WRITE setCurrentRepeatType NOTIFY currentRepeatTypeChanged)
 
   46        Q_PROPERTY(
int currentLengthLimit READ currentLengthLimit WRITE setCurrentLengthLimit NOTIFY currentLengthLimitChanged)
 
   47        Q_PROPERTY(
int currentLineLength READ currentLineLength WRITE setCurrentLineLength NOTIFY currentLineLengthChanged)
 
   48        Q_PROPERTY(QString currentLessonDescription READ currentLessonDescription WRITE setCurrentLessonDescription NOTIFY currentLessonDescriptionChanged)
 
   49        Q_PROPERTY(QList<int> unusedSublessons READ unusedSublessons NOTIFY unusedSublessonsChanged)
 
   50        Q_PROPERTY(
bool canRemove READ canRemove NOTIFY canRemoveChanged)
 
   55        const QString &fileName() 
const;
 
   56        void setFileName(
const QString &newFileName);
 
   62        bool readOnly() 
const;
 
   65        void setLesson(
int newLesson);
 
   67        int sublesson() 
const;
 
   68        void setSublesson(
int newSublesson);
 
   71        void setExercise(
int newExercise);
 
   73        const QStringList &lessonList() 
const;
 
   75        const QStringList &sublessonList() 
const;
 
   77        const QStringList &exerciseList() 
const;
 
   79        QString currentText() 
const;
 
   81        QString currentRawText() 
const;
 
   82        void setCurrentRawText(
const QString &newRawText);
 
   84        QString currentRepeatType() 
const;
 
   85        void setCurrentRepeatType(
const QString &newRepeatType);
 
   87        int currentLengthLimit() 
const;
 
   88        void setCurrentLengthLimit(
int newLengthLimit);
 
   90        int currentLineLength() 
const;
 
   91        void setCurrentLineLength(
int newLineLength);
 
   93        QString currentLessonDescription() 
const;
 
   94        void setCurrentLessonDescription(
const QString &newLessonDescription);
 
   96        QList<int> unusedSublessons() 
const;
 
   98        bool canRemove() 
const;
 
  100        Q_INVOKABLE 
void newFile();
 
  101        Q_INVOKABLE 
void open();
 
  102        Q_INVOKABLE 
bool save();
 
  103        Q_INVOKABLE 
bool saveAs(
const QString &fileName);
 
  105        Q_INVOKABLE 
void nextExercise();
 
  106        Q_INVOKABLE 
void previousExercise();
 
  108        Q_INVOKABLE QString sublessonName(
int id);
 
  110        Q_INVOKABLE 
void addLesson();
 
  111        Q_INVOKABLE 
void addSublesson(
int id);
 
  112        Q_INVOKABLE 
void addExercise();
 
  114        Q_INVOKABLE 
void removeCurrentExercise();
 
  118        void nextSublesson();
 
  119        void previousSublesson();
 
  120        void nextLesson(
bool updateExList = 
true);
 
  121        void previousLesson(
bool updateExList = 
true);
 
  123        void updateLessonList();
 
  124        void updateSublessonList();
 
  125        void updateExerciseList();
 
  126        void updateAbsoluteSublesson();
 
  127        void setAbsoluteSublesson(
int absoluteSublesson);
 
  128        void deleteExerciseLine(
int lesson, 
int sublesson, 
int exercise);
 
  129        void editExercise(
bool repeat, 
const QString &repeatType, 
int repeatLimit, 
int lineLength, 
const QString &desc, 
const QString &rawText);
 
  130        void moveExercise(
int lesson, 
int sublesson, 
int exercise, 
int newLesson, 
int newSublesson, 
int newExercise);
 
  131        void moveLesson(
int lesson, 
int newLesson);
 
  133        std::shared_ptr<IConfigParser> m_parser = 
nullptr;
 
  135        bool m_opened = 
false;
 
  136        bool m_saved = 
false;
 
  137        bool m_readOnly = 
false;
 
  140        int m_absoluteSublesson = 0;
 
  142        QStringList m_lessonList;
 
  143        QStringList m_sublessonList;
 
  144        QStringList m_exerciseList;
 
  147        void openedChanged();
 
  148        void fileNameChanged();
 
  150        void readOnlyChanged();
 
  151        void lessonChanged();
 
  152        void sublessonChanged();
 
  153        void exerciseChanged();
 
  154        void lessonListChanged();
 
  155        void sublessonListChanged();
 
  156        void exerciseListChanged();
 
  157        void currentTextChanged();
 
  158        void currentRawTextChanged();
 
  159        void currentRepeatTypeChanged();
 
  160        void currentLengthLimitChanged();
 
  161        void currentLineLengthChanged();
 
  162        void currentLessonDescriptionChanged();
 
  163        void unusedSublessonsChanged();
 
  164        void canRemoveChanged();