3D Forest
Software for analysis of Lidar data from forest environment.
ColorSwitchWidget Class Reference

#include <ColorSwitchWidget.hpp>

Inherits QWidget.

Signals

void colorChanged ()
 

Public Member Functions

 ColorSwitchWidget (QWidget *parent=nullptr)
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
void setForegroundColor (const QColor &color)
 
void setBackgroundColor (const QColor &color)
 
QColor foregroundColor () const
 
QColor backgroundColor () const
 

Protected Member Functions

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

Private Member Functions

bool colorDialog (QColor &color)
 

Private Attributes

int defaultWidth_
 
int defaultHeight_
 
QColor foregroundColorDefault_
 
QColor backgroundColorDefault_
 
QColor foregroundColor_
 
QColor backgroundColor_
 

Constructor & Destructor Documentation

◆ ColorSwitchWidget()

ColorSwitchWidget::ColorSwitchWidget ( QWidget * parent = nullptr)

Member Function Documentation

◆ backgroundColor()

QColor ColorSwitchWidget::backgroundColor ( ) const

◆ colorChanged

void ColorSwitchWidget::colorChanged ( )
signal

Referenced by mousePressEvent().

◆ colorDialog()

bool ColorSwitchWidget::colorDialog ( QColor & color)
private

Referenced by mousePressEvent().

◆ foregroundColor()

QColor ColorSwitchWidget::foregroundColor ( ) const

◆ minimumSizeHint()

QSize ColorSwitchWidget::minimumSizeHint ( ) const
override

◆ mousePressEvent()

void ColorSwitchWidget::mousePressEvent ( QMouseEvent * event)
overrideprotected

◆ paintEvent()

void ColorSwitchWidget::paintEvent ( QPaintEvent * event)
overrideprotected

◆ setBackgroundColor()

void ColorSwitchWidget::setBackgroundColor ( const QColor & color)

◆ setForegroundColor()

void ColorSwitchWidget::setForegroundColor ( const QColor & color)

◆ sizeHint()

QSize ColorSwitchWidget::sizeHint ( ) const
override

Member Data Documentation

◆ backgroundColor_

QColor ColorSwitchWidget::backgroundColor_
private

◆ backgroundColorDefault_

QColor ColorSwitchWidget::backgroundColorDefault_
private

Referenced by mousePressEvent(), and paintEvent().

◆ defaultHeight_

int ColorSwitchWidget::defaultHeight_
private

◆ defaultWidth_

int ColorSwitchWidget::defaultWidth_
private

◆ foregroundColor_

QColor ColorSwitchWidget::foregroundColor_
private

◆ foregroundColorDefault_

QColor ColorSwitchWidget::foregroundColorDefault_
private

Referenced by mousePressEvent(), and paintEvent().


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