]> Shamusworld >> Repos - architektonas/blob - src/base/rs_color.h
5420f453162999ec65d8f45c66d66f5648a78f5b
[architektonas] / src / base / rs_color.h
1 #ifndef RS_COLOR_H
2 #define RS_COLOR_H
3
4 #include <QtGui>
5 #include "rs_flags.h"
6
7 //! Color defined by layer not entity
8 //#define C_BY_LAYER     0x00000001
9 //! Color defined by block not entity
10 //#define C_BY_BLOCK     0x00000002
11
12 /**
13  * Color class.
14  *
15  * @author Andrew Mustun
16  */
17 class RS_Color: public QColor, public RS_Flags
18 {
19         public:
20                 RS_Color();
21                 RS_Color(int r, int g, int b);
22                 RS_Color(const QColor & c);
23                 RS_Color(const RS_Color & c);
24                 RS_Color(unsigned int f);
25
26                 RS_Color stripFlags() const;
27                 bool isByLayer() const;
28                 bool isByBlock() const;
29                 RS_Color & operator=(const RS_Color & c);
30                 bool operator==(const RS_Color & c) const;
31 //no,can't              bool operator==(const QColor & c) const;
32                 friend std::ostream & operator<<(std::ostream & os, const RS_Color & c);
33 };
34
35 #endif