Warning, file /education/parley/src/practice/writtenbackendmode.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef WRITTENBACKENDMODE_H 0007 #define WRITTENBACKENDMODE_H 0008 0009 #include "abstractbackendmode.h" 0010 #include "practice/sessionmanagerbase.h" 0011 #include "practice/writtenpracticevalidator.h" 0012 #include <QScopedPointer> 0013 0014 namespace Practice 0015 { 0016 class WrittenBackendMode : public AbstractBackendMode 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 WrittenBackendMode(Practice::AbstractFrontend *frontend, QObject *parent, Practice::SessionManagerBase *sessionManager, KEduVocDocument *doc); 0022 0023 bool setTestEntry(TestEntry *current) override; 0024 0025 void checkAnswer() override; 0026 0027 public Q_SLOTS: 0028 void hintAction() override; 0029 0030 private: 0031 QString getFeedbackString(TestEntry::ErrorTypes error); 0032 0033 QString m_lastAnswer; 0034 QString m_currentHint; 0035 bool m_firstAttempt{true}; 0036 SessionManagerBase *m_sessionManager{nullptr}; 0037 QScopedPointer<WrittenPracticeValidator> m_validator; 0038 KEduVocDocument *m_doc{nullptr}; 0039 }; 0040 0041 } 0042 0043 #endif // WRITTENBACKENDMODE_H