Warning, file /education/parley/src/practice/statustoggle.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: 2010 Daniel Laidig <laidig@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef PRACTICE_STATUSTOGGLE_H 0007 #define PRACTICE_STATUSTOGGLE_H 0008 0009 #include "imagewidget.h" 0010 0011 #include "abstractfrontend.h" 0012 0013 namespace Practice 0014 { 0015 class ThemedBackgroundRenderer; 0016 class StatusToggleButton; 0017 0018 class StatusToggle : public ImageWidget 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit StatusToggle(QWidget *parent = nullptr); 0024 QSize minimumSizeHint() const override; 0025 0026 void setRenderer(ThemedBackgroundRenderer *renderer); 0027 void setResultState(AbstractFrontend::ResultState state); 0028 0029 void updatePixmap(); 0030 void updateToggle(); 0031 0032 Q_SIGNALS: 0033 void toggle(); 0034 0035 private: 0036 ThemedBackgroundRenderer *m_renderer{nullptr}; 0037 0038 StatusToggleButton *m_toggle{nullptr}; 0039 QAction *m_toggleAction{nullptr}; 0040 0041 AbstractFrontend::ResultState m_resultState; 0042 0043 QPixmap m_defaultStatus; 0044 QPixmap m_correctStatus; 0045 QPixmap m_wrongStatus; 0046 0047 QPixmap m_toggleCorrect; 0048 QPixmap m_toggleCorrectHover; 0049 QPixmap m_toggleCorrectPressed; 0050 0051 QPixmap m_toggleWrong; 0052 QPixmap m_toggleWrongHover; 0053 QPixmap m_toggleWrongPressed; 0054 }; 0055 0056 } 0057 0058 #endif // PRACTICE_STATUSTOGGLE_H