File indexing completed on 2025-02-09 04:18:25
0001 /* 0002 SPDX-FileCopyrightText: 2010 Daniel Laidig <d.laidig@gmx.de> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef PRACTICE_MIXEDLETTERSMODEWIDGET_H 0007 #define PRACTICE_MIXEDLETTERSMODEWIDGET_H 0008 0009 #include "writtenpracticewidget.h" 0010 0011 namespace Ui 0012 { 0013 class WrittenPracticeWidget; 0014 } 0015 0016 namespace Practice 0017 { 0018 class MixedLettersModeWidget : public Practice::WrittenPracticeWidget 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit MixedLettersModeWidget(GuiFrontend *frontend, QWidget *parent = nullptr); 0024 0025 void setQuestion(const QVariant &question) override; 0026 void setSolution(const QVariant &solution) override; 0027 void setSolutionFont(const QFont &font) override; 0028 0029 public Q_SLOTS: 0030 void showQuestion() override; 0031 0032 private Q_SLOTS: 0033 void updatePixmap(); 0034 0035 private: 0036 QString m_solution; 0037 QString m_mixedSolution; 0038 QString m_question; 0039 QList<int> m_positions; 0040 QPixmap m_pixmap; 0041 QFont m_solutionFont; 0042 }; 0043 0044 } 0045 0046 #endif // PRACTICE_MIXEDLETTERSMODEWIDGET_H