aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result/stringresult.h
blob: 0e469fe5b701c4efe5f8c46704bcad913585912a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef STRINGRESULT_H
#define STRINGRESULT_H

#include "result.h"
#include <QString>
/**
 * @brief The StringResult class stores command result for String.
 */
class StringResult : public Result
{
public:
    /**
     * @brief StringResult
     */
    StringResult();
    /**
     * @brief StringResult
     */
    virtual ~StringResult();
    /**
     * @brief setText
     * @param text
     */
    void setText(QString text);
    /**
     * @brief getText
     * @return
     */
    QString getText() const;
    /**
     * @brief getScalar
     * @return
     */
    virtual QVariant getResult(Dice::RESULT_TYPE);
    /**
     * @brief toString
     * @return
     */
    virtual QString toString(bool);

    virtual void setHighLight(bool);
    virtual bool hasHighLight() const;
    virtual bool hasResultOfType(Dice::RESULT_TYPE resultType) const;
    virtual Result* getCopy() const;

private:
    QString m_value;
    bool m_highlight;
};

#endif // STRINGRESULT_H