Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Private Slots | Private Member Functions | Private Attributes | List of all members
color_widgets::ColorDialog Class Reference

#include <color_dialog.hpp>

Inheritance diagram for color_widgets::ColorDialog:
Inheritance graph
[legend]

Public Types

enum  ButtonMode { OkCancel, OkApplyCancel, Close }
 

Public Slots

void setColor (const QColor &c)
 
void setWheelFlags (ColorWheel::DisplayFlags flags)
 
void showColor (const QColor &oldcolor)
 

Signals

void alphaEnabledChanged (bool alphaEnabled)
 
void colorChanged (QColor)
 
void colorSelected (QColor)
 
void wheelFlagsChanged (ColorWheel::DisplayFlags flags)
 

Public Member Functions

bool alphaEnabled () const
 
ButtonMode buttonMode () const
 
QColor color () const
 
 ColorDialog (QWidget *parent=0, Qt::WindowFlags f=0)
 
ColorPreview::DisplayMode previewDisplayMode () const
 
void setButtonMode (ButtonMode mode)
 
void setPreviewDisplayMode (ColorPreview::DisplayMode mode)
 
QSize sizeHint () const
 
ColorWheel::DisplayFlags wheelFlags () const
 

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *event)
 
void dropEvent (QDropEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 

Properties

QColor color
 
ColorWheel::DisplayFlags wheelFlags
 

Private Slots

void on_buttonBox_clicked (QAbstractButton *)
 
void set_hsv ()
 Update from HSV sliders. More...
 
void set_rgb ()
 Update from RGB sliders. More...
 
void update_widgets ()
 Update all the Ui elements to match the selected color. More...
 

Private Member Functions

void setColorInternal (const QColor &color)
 

Private Attributes

Private *const p
 

Detailed Description

Definition at line 35 of file color_dialog.hpp.

Member Enumeration Documentation

Enumerator
OkCancel 
OkApplyCancel 
Close 

Definition at line 44 of file color_dialog.hpp.

Constructor & Destructor Documentation

color_widgets::ColorDialog::ColorDialog ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
explicit

Member Function Documentation

bool color_widgets::ColorDialog::alphaEnabled ( ) const
void color_widgets::ColorDialog::alphaEnabledChanged ( bool  alphaEnabled)
signal
ButtonMode color_widgets::ColorDialog::buttonMode ( ) const
QColor color_widgets::ColorDialog::color ( ) const

Get currently selected color

void color_widgets::ColorDialog::colorChanged ( QColor  )
signal

The current color was changed

void color_widgets::ColorDialog::colorSelected ( QColor  )
signal

The user selected the new color by pressing Ok/Apply

void color_widgets::ColorDialog::dragEnterEvent ( QDragEnterEvent *  event)
protected
void color_widgets::ColorDialog::dropEvent ( QDropEvent *  event)
protected
void color_widgets::ColorDialog::mouseMoveEvent ( QMouseEvent *  event)
protected
void color_widgets::ColorDialog::mouseReleaseEvent ( QMouseEvent *  event)
protected
void color_widgets::ColorDialog::on_buttonBox_clicked ( QAbstractButton *  )
privateslot
ColorPreview::DisplayMode color_widgets::ColorDialog::previewDisplayMode ( ) const

Get the color preview diplay mode

void color_widgets::ColorDialog::set_hsv ( )
privateslot

Update from HSV sliders.

void color_widgets::ColorDialog::set_rgb ( )
privateslot

Update from RGB sliders.

void color_widgets::ColorDialog::setButtonMode ( ButtonMode  mode)

Select which dialog buttons to show

There are three predefined modes: OkCancel - this is useful when the dialog is modal and we just want to return a color OkCancelApply - this is for non-modal dialogs Close - for non-modal dialogs with direct color updates via colorChanged signal

void color_widgets::ColorDialog::setColor ( const QColor &  c)
slot

Change color

void color_widgets::ColorDialog::setColorInternal ( const QColor &  color)
private
void color_widgets::ColorDialog::setPreviewDisplayMode ( ColorPreview::DisplayMode  mode)

Set the display mode for the color preview

void color_widgets::ColorDialog::setWheelFlags ( ColorWheel::DisplayFlags  flags)
slot
void color_widgets::ColorDialog::showColor ( const QColor &  oldcolor)
slot

Set the current color and show the dialog

QSize color_widgets::ColorDialog::sizeHint ( ) const
void color_widgets::ColorDialog::update_widgets ( )
privateslot

Update all the Ui elements to match the selected color.

ColorWheel::DisplayFlags color_widgets::ColorDialog::wheelFlags ( ) const
void color_widgets::ColorDialog::wheelFlagsChanged ( ColorWheel::DisplayFlags  flags)
signal

Member Data Documentation

Private* const color_widgets::ColorDialog::p
private

Definition at line 133 of file color_dialog.hpp.

Property Documentation

QColor color_widgets::ColorDialog::color
readwrite

Definition at line 39 of file color_dialog.hpp.

ColorWheel::DisplayFlags color_widgets::ColorDialog::wheelFlags
readwrite

Definition at line 40 of file color_dialog.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:51