Engauge Digitizer 2
Loading...
Searching...
No Matches
ViewSegmentFilter.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef VIEW_SEGMENT_FILTER_H
8#define VIEW_SEGMENT_FILTER_H
9
10#include "ColorFilterSettings.h"
11#include <QColor>
12#include <QLabel>
13
14class QPixmap;
15
18class ViewSegmentFilter : public QLabel
19{
20public:
23
25 virtual void paintEvent(QPaintEvent *event);
26
28 void setColorFilterSettings (const ColorFilterSettings &colorFilterSettings,
29 const QPixmap &pixmap);
30
32 void setEnabled (bool enabled);
33
36
37private:
38
39 QColor colorFromSetting (ColorFilterMode colorFilterMode,
40 int foreground,
41 int hue,
42 int intensity,
43 int saturation,
44 int value) const;
45 QColor colorHigh () const;
46 QColor colorLow () const;
47
48 ColorFilterSettings m_colorFilterSettings;
49 bool m_filterIsDefined;
50 QColor m_rgbBackground;
51
52 bool m_enabled;
53};
54
55#endif // VIEW_SEGMENT_FILTER_H
ColorFilterMode
const int INNER_RADIUS_MIN
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Class that displays the current Segment Filter in a MainWindow toolbar.
void unsetColorFilterSettings()
Apply no color filter.
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings, const QPixmap &pixmap)
Apply the color filter of the currently selected curve. The pixmap is included so the background colo...
void setEnabled(bool enabled)
Show the style with semi-transparency or full-transparency to indicate if associated Curve is active ...
virtual void paintEvent(QPaintEvent *event)
Paint with a horizontal linear gradient.
ViewSegmentFilter(QWidget *parent=0)
Single constructor.