ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Widgets::ColorPickerItem Class Reference
Inheritance diagram for Widgets::ColorPickerItem:
Collaboration diagram for Widgets::ColorPickerItem:

Public Slots

void setColor (const QColor &color, const QString &text=QString())
 

Signals

void clicked ()
 
void selected ()
 
void clicked (const QColor &clr)
 

Public Member Functions

 ColorPickerItem (const QColor &color=Qt::white, const QString &text=QString(), QWidget *parent=0)
 
 ~ColorPickerItem ()
 
QColor color () const
 
QString text () const
 
void setSelected (bool)
 
bool isSelected () const
 

Protected Member Functions

void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 
void mouseMoveEvent (QMouseEvent *e)
 
void paintEvent (QPaintEvent *e)
 

Detailed Description

Definition at line 134 of file qtcolorpicker.cpp.

Constructor & Destructor Documentation

◆ ColorPickerItem()

Widgets::ColorPickerItem::ColorPickerItem ( const QColor &  color = Qt::white,
const QString &  text = QString(),
QWidget *  parent = 0 
)

Constructs a ColorPickerItem whose color is set to color, and whose name is set to text.

Definition at line 843 of file qtcolorpicker.cpp.

◆ ~ColorPickerItem()

Widgets::ColorPickerItem::~ColorPickerItem ( )

Destructs a ColorPickerItem.

Definition at line 855 of file qtcolorpicker.cpp.

Member Function Documentation

◆ clicked [1/2]

void Widgets::ColorPickerItem::clicked ( )
signal

Referenced by mousePressEvent().

◆ clicked [2/2]

void Widgets::ColorPickerItem::clicked ( const QColor &  clr)
signal

◆ color()

QColor Widgets::ColorPickerItem::color ( ) const

Returns the item's color.

See also
text()

Definition at line 862 of file qtcolorpicker.cpp.

Referenced by Widgets::ColorPickerPopup::keyPressEvent(), setColor(), and Widgets::ColorPickerPopup::updateSelected().

◆ isSelected()

bool Widgets::ColorPickerItem::isSelected ( ) const

Definition at line 874 of file qtcolorpicker.cpp.

◆ mouseMoveEvent()

void Widgets::ColorPickerItem::mouseMoveEvent ( QMouseEvent *  e)
protected

Definition at line 897 of file qtcolorpicker.cpp.

◆ mousePressEvent()

void Widgets::ColorPickerItem::mousePressEvent ( QMouseEvent *  e)
protected

Definition at line 913 of file qtcolorpicker.cpp.

References clicked().

◆ mouseReleaseEvent()

void Widgets::ColorPickerItem::mouseReleaseEvent ( QMouseEvent *  e)
protected

Definition at line 905 of file qtcolorpicker.cpp.

References selected().

◆ paintEvent()

void Widgets::ColorPickerItem::paintEvent ( QPaintEvent *  e)
protected

Definition at line 922 of file qtcolorpicker.cpp.

References ecvColor::black(), height, and width.

◆ selected

void Widgets::ColorPickerItem::selected ( )
signal

Referenced by mouseReleaseEvent(), and setSelected().

◆ setColor

void Widgets::ColorPickerItem::setColor ( const QColor &  color,
const QString &  text = QString() 
)
slot

Sets the item's color to color, and its name to text.

Definition at line 887 of file qtcolorpicker.cpp.

References color(), and text().

◆ setSelected()

void Widgets::ColorPickerItem::setSelected ( bool  selected)

◆ text()

QString Widgets::ColorPickerItem::text ( ) const

Returns the item's text.

See also
color()

Definition at line 869 of file qtcolorpicker.cpp.

Referenced by setColor(), and Widgets::QtColorPicker::setCurrentColor().


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