-
Notifications
You must be signed in to change notification settings - Fork 0
/
colorspace.h
37 lines (28 loc) · 906 Bytes
/
colorspace.h
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
#ifndef COLORSPACE_H
#define COLORSPACE_H
#include "channel.h"
#include "ifilter.h"
#include <QHash>
class ColorSpace
{
public:
enum Identifier { RGB, HLS, YUV, SMYK, HSV };
ColorSpace();
ColorSpace(ColorSpace::Identifier);
ColorSpace(ColorSpace::Identifier, QList<Channel>);
void addChannel(const Channel&);
bool containsChannel(Channel::Identifier);
QImage getChannelImage(Channel::Identifier);
//virtual
QImage restore();
void setInactual();
void setActual();
void applyFilter(IFilter*, Channel::Identifier);
void setImage(const QImage& img);
ColorSpace::Identifier getId();
protected:
QHash<Channel::Identifier, Channel> channels;
ColorSpace::Identifier id;
bool actual;
};
#endif // COLORSPACE_H