QtiPlot  0.9.8.2
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Attributes
ColorPickerItem Class Reference

List of all members.

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::null, QWidget *parent=0)
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)

Private Attributes

QColor c
bool sel
QString t

Constructor & Destructor Documentation

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

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

References t.

ColorPickerItem::~ColorPickerItem ( )

Destructs a ColorPickerItem.


Member Function Documentation

void ColorPickerItem::clicked ( )
signal
QColor ColorPickerItem::color ( ) const

Returns the item's color.

See also:
text()

References c.

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

bool ColorPickerItem::isSelected ( ) const

References sel.

void ColorPickerItem::mouseMoveEvent ( QMouseEvent *  e)
protected
void ColorPickerItem::mousePressEvent ( QMouseEvent *  e)
protected
void ColorPickerItem::mouseReleaseEvent ( QMouseEvent *  e)
protected

References sel, and selected().

void ColorPickerItem::paintEvent ( QPaintEvent *  e)
protected

References c, and sel.

void ColorPickerItem::selected ( )
signal

Referenced by mouseReleaseEvent(), and setSelected().

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

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

References c, color(), t, and text().

void ColorPickerItem::setSelected ( bool  selected)
QString ColorPickerItem::text ( ) const

Returns the item's text.

See also:
color()

References t.

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


Member Data Documentation

QColor ColorPickerItem::c
private

Referenced by color(), paintEvent(), and setColor().

bool ColorPickerItem::sel
private
QString ColorPickerItem::t
private

Referenced by ColorPickerItem(), setColor(), and text().


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