ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ColorBarWidget Class Reference

Color bar widget. More...

#include <ecvColorScaleEditorWidget.h>

Inheritance diagram for ColorBarWidget:
Collaboration diagram for ColorBarWidget:

Signals

void pointClicked (double relativePos)
 Signal emitted when the mouse (left) button is clicked. More...
 

Public Member Functions

 ColorBarWidget (SharedColorScaleElementSliders sliders, QWidget *parent=nullptr, Qt::Orientation orientation=Qt::Horizontal)
 Default constructor. More...
 
- Public Member Functions inherited from ColorScaleEditorBaseWidget
 ColorScaleEditorBaseWidget (SharedColorScaleElementSliders sliders, Qt::Orientation orientation, int margin, QWidget *parent=nullptr)
 Defautl constructor. More...
 
int length () const
 Returns useful length. More...
 
virtual void setSliders (SharedColorScaleElementSliders sliders)
 Sets associated sliders set. More...
 
Qt::Orientation getOrientation () const
 Returns orientation. More...
 
int getMargin () const
 Returns margin. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 

Additional Inherited Members

- Protected Attributes inherited from ColorScaleEditorBaseWidget
SharedColorScaleElementSliders m_sliders
 Associated sliders. More...
 
Qt::Orientation m_orientation
 Orientation. More...
 
int m_margin
 Margin. More...
 

Detailed Description

Color bar widget.

Definition at line 132 of file ecvColorScaleEditorWidget.h.

Constructor & Destructor Documentation

◆ ColorBarWidget()

ColorBarWidget::ColorBarWidget ( SharedColorScaleElementSliders  sliders,
QWidget *  parent = nullptr,
Qt::Orientation  orientation = Qt::Horizontal 
)

Default constructor.

Definition at line 132 of file ecvColorScaleEditorWidget.cpp.

References DEFAULT_MARGIN.

Member Function Documentation

◆ mousePressEvent()

void ColorBarWidget::mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ paintEvent()

void ColorBarWidget::paintEvent ( QPaintEvent *  e)
overrideprotected

◆ pointClicked

void ColorBarWidget::pointClicked ( double  relativePos)
signal

Signal emitted when the mouse (left) button is clicked.

Parameters
relativePosrelative click position (between 0 and 1)

Referenced by mousePressEvent().


The documentation for this class was generated from the following files: