ColorPickerItem Class Reference

Public Slots

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

Signals

void clicked ()
 
void selected ()
 

Public Member Functions

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

Protected Member Functions

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

Constructor & Destructor Documentation

◆ ColorPickerItem()

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

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

◆ ~ColorPickerItem()

ColorPickerItem::~ColorPickerItem ( )

Destructs a ColorPickerItem.

Member Function Documentation

◆ clicked

void ColorPickerItem::clicked ( )
signal

◆ color()

◆ isSelected()

bool ColorPickerItem::isSelected ( ) const

◆ mouseMoveEvent()

void ColorPickerItem::mouseMoveEvent ( QMouseEvent *  e)
protected

◆ mousePressEvent()

void ColorPickerItem::mousePressEvent ( QMouseEvent *  e)
protected

◆ mouseReleaseEvent()

void ColorPickerItem::mouseReleaseEvent ( QMouseEvent *  e)
protected

References selected().

◆ paintEvent()

void ColorPickerItem::paintEvent ( QPaintEvent *  e)
protected

◆ selected

◆ setColor

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

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

References color(), and text().

◆ setSelected()

◆ text()


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