Workspace 6.21.5
|
A widget showing a color spectrum. More...
#include <DataAnalysis/Color/colorspectrumwidget.h>
Inherits QFrame.
Public Slots | |
void | setOrientation (Qt::Orientation orientation) |
void | setSpectrum (const ColorSpectrum &spectrum) |
Signals | |
void | orientationChanged (Qt::Orientation orientation) |
Public Member Functions | |
ColorSpectrumWidget (QWidget *parent=nullptr) | |
Qt::Orientation | getOrientation () const |
const ColorSpectrum & | getSpectrum () const |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *event) override |
Properties | |
Qt::Orientation | orientation |
Color spectrums show colors corresponding to values between zero and one. The ColorScale class adds the ability to use different minimum and maximum values for the spectrum (ie it essentially just scales and translates the spectrum). A spectrum also has a vertical or horizontal orientation, with horizontal being the default.
ColorSpectrumWidget | ( | QWidget * | parent = nullptr | ) |
Constructs a widget with a default orientation of Qt::Horizontal and no points in the spectrum. Clients would normally need to set the spectrum after construction, since an empty spectrum serves no useful purpose for this widget (ie it will simply show solid black).
Qt::Orientation getOrientation | ( | ) | const |
const ColorSpectrum & getSpectrum | ( | ) | const |
|
signal |
|
overrideprotected |
|
slot |
orientation | The new orientation of the widget. |
If orientation is different to the current orientation, the orientationChanged() signal will be emitted and the widget will be updated.
|
slot |
spectrum | The new color spectrum this widget should show. |
Calling this function will update the widget.
|
readwrite |