OptionsSettingCard.h 750 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef OPTIONSSETTINGCARD_H
  2. #define OPTIONSSETTINGCARD_H
  3. #include "ExpandGroupSettingCard.h"
  4. #include <QLabel>
  5. class OptionsSettingCard : public ExpandSettingCard
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit OptionsSettingCard(const QVariant &configItem, const QString &title, const QString &content = "",
  10. const QStringList &texts = {}, QWidget *parent = nullptr);
  11. void setValue(const QVariant &value) override;
  12. private slots:
  13. void onButtonClicked(QAbstractButton *button);
  14. signals:
  15. void optionChanged(const QVariant &);
  16. private:
  17. QVariant m_configItem;
  18. QString m_configName;
  19. QStringList m_texts;
  20. QLabel *m_choiceLabel;
  21. QButtonGroup *m_buttonGroup;
  22. };
  23. #endif // OPTIONSSETTINGCARD_H