Skip to content

Class QDoubleSpinBoxesWithColorPickersPopup

ClassList > QDoubleSpinBoxesWithColorPickersPopup

Custom widget combining QDoubleSpinBox and color picker popup buttons. More...

  • #include <widgets.h>

Inherits the following classes: QDoubleSpinBoxesPopup

Public Attributes inherited from QDoubleSpinBoxesPopup

See QDoubleSpinBoxesPopup

Type Name
QSpinBox * m_spinBox1
Pointer to the first spin box widget for setting and retrieving minimum integer values.
QSpinBox * m_spinBox2
Pointer to the second spin box widget for setting and retrieving maximum integer values.

Public Signals

Type Name
signal void leftColorChanged (const QColor & color)
Signal emitted when the left color is changed.
signal void rightColorChanged (const QColor & color)
Signal emitted when the right color is changed.

Public Signals inherited from QDoubleSpinBoxesPopup

See QDoubleSpinBoxesPopup

Type Name
signal void maxValueChanged (int value)
Signal emitted when the maximum value of the second spin box widget is changes.
signal void minValueChanged (int value)
Signal emitted when the minimum value in the first spin box widget is changed.

Public Functions

Type Name
QDoubleSpinBoxesWithColorPickersPopup (QWidget * parent=nullptr)
Popup widget that combines double spin boxes with color pickers.
QColor getLeftColor () const
Retrieves the color associated with the left color picker.
QColor getRightColor () const
Retrieves the color associated with the right color picker.
void setLeftColor (const QColor & color)
Sets the color associated with the left color picker.
void setRightColor (const QColor & color)
Sets the color associated with the right color picker.
void setToolTips (const QString & leftColorTooltip, const QString & rightColorTooltip, const QString & minValueTooltip, const QString & maxValueTooltip) const
Sets the tool tips for each component of the widget.

Public Functions inherited from QDoubleSpinBoxesPopup

See QDoubleSpinBoxesPopup

Type Name
QDoubleSpinBoxesPopup (QWidget * parent=nullptr)
Custom popup widget containing two spin box widgets.
int maxValue () const
Retrieves the maximum value set in the second spin box widget.
int minValue () const
Retrieves the minimum value set in the first spin box widget.
void setMaxValue (const int value) const
Sets the maximum value for the second spin box widget.
void setMinValue (const int value) const
Sets the minimum value for the first spin box widget.

Protected Attributes inherited from QDoubleSpinBoxesPopup

See QDoubleSpinBoxesPopup

Type Name
QHBoxLayout * m_backgroundFrameLayout
Layout used for the background frame where all components are placed.

Detailed Description

A specialized widget that incorporates both a QDoubleSpinBox for numerical input and a color picker popup for selecting colors. This widget is designed for scenarios where both numerical values and corresponding color selections are required within the same interface.

Public Signals Documentation

signal leftColorChanged

Signal emitted when the left color is changed.

void QDoubleSpinBoxesWithColorPickersPopup::leftColorChanged;

Parameters:

  • color The new QColor value for the left color picker.

signal rightColorChanged

Signal emitted when the right color is changed.

void QDoubleSpinBoxesWithColorPickersPopup::rightColorChanged;

Parameters:

  • color The new QColor value for the right color picker.

Public Functions Documentation

function QDoubleSpinBoxesWithColorPickersPopup

Popup widget that combines double spin boxes with color pickers.

explicit QDoubleSpinBoxesWithColorPickersPopup::QDoubleSpinBoxesWithColorPickersPopup (
    QWidget * parent=nullptr
) 

This widget extends the functionality of QDoubleSpinBoxesPopup by adding two color picker buttons to the layout. The color buttons allow users to select colors associated with the spin boxes. The buttons are styled and arranged alongside the spin boxes, providing an integrated user interface for numerical and color input.

Parameters:

  • parent The parent widget for this popup. If no parent is provided, the popup will not belong to any other widget.

function getLeftColor

Retrieves the color associated with the left color picker.

QColor QDoubleSpinBoxesWithColorPickersPopup::getLeftColor () const

Returns:

The current QColor value associated with the left color picker.


function getRightColor

Retrieves the color associated with the right color picker.

QColor QDoubleSpinBoxesWithColorPickersPopup::getRightColor () const

Returns:

The current QColor value associated with the right color picker.


function setLeftColor

Sets the color associated with the left color picker.

void QDoubleSpinBoxesWithColorPickersPopup::setLeftColor (
    const QColor & color
) 

Parameters:

  • color The new QColor to be set for the left color picker.

function setRightColor

Sets the color associated with the right color picker.

void QDoubleSpinBoxesWithColorPickersPopup::setRightColor (
    const QColor & color
) 

Parameters:

  • color The new QColor to be set for the right color picker.

function setToolTips

Sets the tool tips for each component of the widget.

void QDoubleSpinBoxesWithColorPickersPopup::setToolTips (
    const QString & leftColorTooltip,
    const QString & rightColorTooltip,
    const QString & minValueTooltip,
    const QString & maxValueTooltip
) const

Parameters:

  • leftColorTooltip left color button tool tip.
  • rightColorTooltip right color button tool tip.
  • minValueTooltip minimum value spin box tool tip.
  • maxValueTooltip maximum value spin box tool tip.


The documentation for this class was generated from the following file src/widgets.h