-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolorer.h
More file actions
55 lines (43 loc) · 1.1 KB
/
colorer.h
File metadata and controls
55 lines (43 loc) · 1.1 KB
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
#ifndef COLORER_H
#define COLORER_H
#include <QWidget>
#include <mainwindow.h>
class MainWindow;
namespace Ui {
class Colorer;
}
class Colorer : public QWidget
{
Q_OBJECT
public:
explicit Colorer(QWidget *parent = 0);
~Colorer();
void setSource(MainWindow* source);
void setImage(QImage picture);
QRgb countPixel(QColor pixel, int newHue, int newSat, int newLight);
QRgb countPixelRGB(QColor pixel, int newRed, int newGreen, int newBlue);
void dropSliders();
int linear(int source, int slideOne, int slideTwo);
protected:
MainWindow* window;
private:
Ui::Colorer *ui;
QImage image;
QImage result;
int hueSet, satuSet, lightSet;
int redSet, greenSet, blueSet;
int autoThreshold;
private slots:
void hueChanged(int value);
void satuChanged(int value);
void lightnessChanged(int value);
void invertSlot();
void bnwSlot();
void redChanged(int value);
void greenChanged(int value);
void blueChanged(int value);
void autoBalanceSlot();
void thresholdSlot(int value);
void greyMethod();
};
#endif // COLORER_H