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

Class IPPropertyColorHSV

ImagePlay/include/PropertyWidgets/IPPropertyColorHSV.h:35–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "IPPropertyWidget.h"
34
35class IPPropertyColorHSV : public IPPropertyWidget
36{
37 Q_OBJECT
38public:
39 explicit IPPropertyColorHSV(IPLProcessPropertyColor* property, QWidget *parent) : IPPropertyWidget(property, parent)
40 {
41 _layout = new QGridLayout;
42 _layout->setMargin(0);
43 setLayout(_layout);
44
45 _dialog = NULL;
46
47
48 _property = property;
49
50 _sliderH = new QSlider(Qt::Horizontal);
51 _sliderS = new QSlider(Qt::Horizontal);
52 _sliderV = new QSlider(Qt::Horizontal);
53
54 _colorLabel = new QPushButton("");
55 _colorLabel->setMinimumHeight(20);
56 //_colorLabel->setStyle(QFrame::StyledPanel | QFrame::Sunken);
57 //_colorLabel->setAutoFillBackground(true);
58 //_colorLabel->setFlat(true);
59 //_colorLabel->setStyle(QFrame::StyledPanel | QFrame::Sunken);
60
61
62 QPalette paletteRed;
63 paletteRed.setColor(QPalette::Highlight, QColor(0, 0, 0));
64 _sliderH->setPalette(paletteRed);
65
66 QPalette paletteGreen;
67 paletteGreen.setColor(QPalette::Highlight, QColor(128, 128, 128));
68 _sliderS->setPalette(paletteGreen);
69
70 QPalette paletteBlue;
71 paletteBlue.setColor(QPalette::Highlight, QColor(255, 255, 255));
72 _sliderV->setPalette(paletteBlue);
73
74 _spinH = new QSpinBox;
75 _spinS = new QSpinBox;
76 _spinV = new QSpinBox;
77
78 _spinH->setMinimum(0);
79 _spinH->setMaximum(359);
80 _spinS->setMinimum(0);
81 _spinS->setMaximum(255);
82 _spinV->setMinimum(0);
83 _spinV->setMaximum(255);
84
85 _sliderH->setMinimum(0);
86 _sliderH->setMaximum(359);
87 _sliderS->setMinimum(0);
88 _sliderS->setMaximum(255);
89 _sliderV->setMinimum(0);
90 _sliderV->setMaximum(255);
91
92 // set up layout

Callers

nothing calls this directly

Calls 15

IPPropertyWidgetClass · 0.85
setMinimumFunction · 0.85
setMaximumFunction · 0.85
IPLColorClass · 0.85
initFunction · 0.85
updateValueFunction · 0.85
hueMethod · 0.80
saturationMethod · 0.80
redMethod · 0.80
greenMethod · 0.80
blueMethod · 0.80
valueFunction · 0.70

Tested by

no test coverage detected