File indexing completed on 2024-05-12 05:39:29
0001 #ifndef STRINGRESULT_H 0002 #define STRINGRESULT_H 0003 0004 #include "diceresult.h" 0005 #include <QString> 0006 /** 0007 * @brief The StringResult class stores command result for String. 0008 */ 0009 0010 class StringResult : public DiceResult 0011 { 0012 public: 0013 /** 0014 * @brief StringResult 0015 */ 0016 StringResult(); 0017 /** 0018 * @brief StringResult 0019 */ 0020 virtual ~StringResult() override; 0021 void addText(QString text); 0022 void finished(); 0023 QString getText() const; 0024 virtual QVariant getResult(Dice::RESULT_TYPE) override; 0025 virtual QString toString(bool) override; 0026 0027 virtual void setHighLight(bool); 0028 virtual bool hasHighLight() const; 0029 virtual bool hasResultOfType(Dice::RESULT_TYPE resultType) const override; 0030 virtual Result* getCopy() const override; 0031 0032 bool isDigitOnly() const; 0033 0034 void setStringCount(int count); 0035 QString getStringResult() const override; 0036 void setNoComma(bool b); 0037 0038 private: 0039 QStringList m_value; 0040 bool m_highlight= true; 0041 int m_stringCount= 0; 0042 bool m_commaSeparator= true; 0043 }; 0044 0045 #endif // STRINGRESULT_H