File: StyleAttr.h

package info (click to toggle)
qweb 1.3-3
  • links: PTS
  • area: contrib
  • in suites: hamm, slink
  • size: 3,080 kB
  • ctags: 2,370
  • sloc: cpp: 12,808; makefile: 485; sh: 2
file content (58 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download
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
52
53
54
55
56
57
58
#ifndef _StyleAttr_h_
#define _StyleAttr_h_

#include <qstring.h>

class StyleAttrProto;

class StyleAttr {
    StyleAttrProto* _proto;
public:
    StyleAttr( StyleAttrProto* proto );
    StyleAttr( const StyleAttr& src );
    virtual ~StyleAttr();
    
    const QString&        name();
    int                   type();
    const StyleAttrProto* proto();
};

class StringStyleAttr : public StyleAttr {
    QString _value;
public:
    StringStyleAttr( StyleAttrProto* proto, const QString& value );
    StringStyleAttr( const StringStyleAttr& src );

    const QString& value();
};

class NumberStyleAttr : public StyleAttr {
    int  _value;
    bool _isPercent;
public:
    NumberStyleAttr( StyleAttrProto* proto, int value, bool isPercent );
    NumberStyleAttr( const NumberStyleAttr& src );

    int  value();
    bool isPercent();
};

class EnumeratedStyleAttr : public StyleAttr {
    int _value;
public:
    EnumeratedStyleAttr( StyleAttrProto* proto, int value );
    EnumeratedStyleAttr( const EnumeratedStyleAttr& src );

    int value();
};

class ListStyleAttr : public StyleAttr {
    QString _value;
public:
    ListStyleAttr( StyleAttrProto* proto, const QString& value );
    ListStyleAttr( const ListStyleAttr& src );

    const QString& value();
};

#endif