MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / IPPropertyColorRGB

Class IPPropertyColorRGB

ImagePlay/include/PropertyWidgets/IPPropertyColorRGB.h:36–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "IPPropertyWidget.h"
35
36class IPPropertyColorRGB : public IPPropertyWidget, public IPLColorPickHandler
37{
38 Q_OBJECT
39public:
40 explicit IPPropertyColorRGB(IPLProcessPropertyColor* property, QWidget *parent, IPLColorPickProvider* provider) : IPPropertyWidget(property, parent)
41 {
42 _layout = new QGridLayout;
43 _layout->setMargin(0);
44 setLayout(_layout);
45
46 _dialog = NULL;
47
48 _property = property;
49 _colorProvider = provider;
50
51 _colorPickCursor = new QCursor(QPixmap(":/colorpicker_cursor.png"), 9, 21);
52
53 _sliderR = new QSlider(Qt::Horizontal);
54 _sliderG = new QSlider(Qt::Horizontal);
55 _sliderB = new QSlider(Qt::Horizontal);
56
57 _colorLabel = new QPushButton("");
58 _colorLabel->setMinimumHeight(20);
59 //_colorLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
60
61
62 QPalette paletteRed;
63 paletteRed.setColor(QPalette::Highlight, QColor(255, 0, 0));
64 _sliderR->setPalette(paletteRed);
65
66 QPalette paletteGreen;
67 paletteGreen.setColor(QPalette::Highlight, QColor(0, 255, 0));
68 _sliderG->setPalette(paletteGreen);
69
70 QPalette paletteBlue;
71 paletteBlue.setColor(QPalette::Highlight, QColor(0, 0, 255));
72 _sliderB->setPalette(paletteBlue);
73
74 _spinR = new QSpinBox;
75 _spinG = new QSpinBox;
76 _spinB = new QSpinBox;
77
78 _spinR->setMinimum(0);
79 _spinR->setMaximum(255);
80 _spinG->setMinimum(0);
81 _spinG->setMaximum(255);
82 _spinB->setMinimum(0);
83 _spinB->setMaximum(255);
84
85 _sliderR->setMinimum(0);
86 _sliderR->setMaximum(255);
87 _sliderG->setMinimum(0);
88 _sliderG->setMaximum(255);
89 _sliderB->setMinimum(0);
90 _sliderB->setMaximum(255);
91
92 _btnColorPicker = new QPushButton(this);
93 _btnColorPicker->setCheckable(true);

Callers

nothing calls this directly

Calls 12

IPPropertyWidgetClass · 0.85
IPLColorClass · 0.85
initFunction · 0.85
redMethod · 0.80
greenMethod · 0.80
blueMethod · 0.80
valueFunction · 0.70
saveValueFunction · 0.70
resetValueFunction · 0.70
valueMethod · 0.45
setValueMethod · 0.45
resetValueMethod · 0.45

Tested by

no test coverage detected