-
Notifications
You must be signed in to change notification settings - Fork 1
/
colorslicemenu.cpp
77 lines (59 loc) · 2.08 KB
/
colorslicemenu.cpp
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "colorslicemenu.h"
#include "ui_colorslicemenu.h"
#include "mousewheeleatereventfilter.h"
#include "focusindetectoreventfilter.h"
#include <QButtonGroup>
#include <QBitmap>
#include <QImage>
ColorSliceMenu::ColorSliceMenu(QWidget *parent) :
QScrollArea(parent),
ui(new Ui::ColorSliceMenu)
{
ui->setupUi(this);
MouseWheelEaterEventFilter *wheelFilter = new MouseWheelEaterEventFilter(this);
FocusInDetectorEventFilter *brushFocusFilter = new FocusInDetectorEventFilter(this);
FocusInDetectorEventFilter *wandFocusFilter = new FocusInDetectorEventFilter(this);
imageMask_m = nullptr;
//fix radio buttons to work in separate group boxes (for asthetics)
buttonGroup_m = new QButtonGroup(this);
buttonGroup_m->addButton(ui->radioButton_EnableBrush);
buttonGroup_m->addButton(ui->radioButton_EnableWand);
//setup colorslicemenu options
//focus in should be a signal from the widget
//setup brush options
ui->spinBox_Brush->installEventFilter(wheelFilter);
ui->horizontalSlider_Brush->installEventFilter(wheelFilter);
ui->spinBox_Brush->installEventFilter(brushFocusFilter);
ui->horizontalSlider_Brush->installEventFilter(brushFocusFilter);
//setup wand options
ui->spinBox_Wand->installEventFilter(wheelFilter);
ui->horizontalSlider_Wand->installEventFilter(wheelFilter);
ui->spinBox_Wand->installEventFilter(wandFocusFilter);
ui->horizontalSlider_Wand->installEventFilter(wandFocusFilter);
}
//autogenerated destructor
ColorSliceMenu::~ColorSliceMenu()
{
delete ui;
}
void ColorSliceMenu::initializeMenu()
{
}
//stores a pointer to the image that is loaded for image data needed by this object. For external use only.
void ColorSliceMenu::setImageReference(const QImage *image)
{
imageReference_m = image;
}
void ColorSliceMenu::receiveCoordinate(QPoint clickCenterPoint)
{
}
void ColorSliceMenu::selectNeighborsOfPoint(int hueVariance)
{
}
void ColorSliceMenu::checkAndUpdateOverlayState()
{
}
void ColorSliceMenu::generateBrushCursor()
{
QBitmap(ui->spinBox_Brush->value(), ui->spinBox_Brush->value());
}