File indexing completed on 2024-09-01 03:42:00
0001 /* 0002 SPDX-FileCopyrightText: 2010 Frederik Gladhorn <gladhorn@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef COMPARISONMODEWIDGET_H 0007 #define COMPARISONMODEWIDGET_H 0008 0009 #include "abstractwidget.h" 0010 0011 namespace Ui 0012 { 0013 class ComparisonPracticeWidget; 0014 } 0015 0016 namespace Practice 0017 { 0018 class ComparisonModeWidget : public AbstractModeWidget 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit ComparisonModeWidget(GuiFrontend *frontend, QWidget *parent = nullptr); 0024 QVariant userInput() override; 0025 0026 void setQuestion(const QVariant &question) override; 0027 void setSolution(const QVariant &solution) override; 0028 void setHint(const QVariant &hint) override; 0029 void setFeedback(const QVariant &feedback) override; 0030 void setFeedbackState(AbstractFrontend::ResultState feedbackState) override 0031 { 0032 Q_UNUSED(feedbackState); 0033 } 0034 void setResultState(AbstractFrontend::ResultState resultState) override 0035 { 0036 Q_UNUSED(resultState); 0037 } 0038 0039 void setQuestionFont(const QFont &font) override; 0040 void setSolutionFont(const QFont &font) override; 0041 void setQuestionSound(const QUrl &soundUrl) override; 0042 void setSolutionSound(const QUrl &soundUrl) override; 0043 void setSolutionPronunciation(const QString &pronunciationText) override; 0044 void setQuestionPronunciation(const QString &pronunciationText) override; 0045 void setSynonym(const QString & /*entry*/) override 0046 { 0047 } 0048 0049 public Q_SLOTS: 0050 void showQuestion() override; 0051 void showSolution() override; 0052 void showSynonym() override 0053 { 0054 } 0055 0056 private Q_SLOTS: 0057 void nextComparisonForm(); 0058 0059 private: 0060 Ui::ComparisonPracticeWidget *m_ui{nullptr}; 0061 QStringList m_solution; 0062 }; 0063 0064 } 0065 0066 #endif