Classes | Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Private Attributes
color_widgets::ColorPreview Class Reference

#include <color_preview.hpp>

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

List of all members.

Classes

class  Private

Public Types

enum  DisplayMode { NoAlpha, AllAlpha, SplitAlpha, SplitColor }

Public Slots

void setColor (const QColor &c)
 Set current color.
void setComparisonColor (const QColor &c)
 Set the comparison color.

Signals

void clicked ()
 Emitted when the user clicks on the widget.
void colorChanged (QColor)
 Emitted on setColor.

Public Member Functions

QBrush background () const
 Get the background visible under transparent colors.
QColor color () const
 Get current color.
 ColorPreview (QWidget *parent=0)
QColor comparisonColor () const
 Get the comparison color.
DisplayMode displayMode () const
 Get color display mode.
void paint (QPainter &painter, QRect rect) const
void setBackground (const QBrush &bk)
 Change the background visible under transparent colors.
void setDisplayMode (DisplayMode dm)
 Set how transparent colors are handled.
QSize sizeHint () const
 ~ColorPreview ()

Protected Member Functions

void mouseMoveEvent (QMouseEvent *ev)
void mouseReleaseEvent (QMouseEvent *ev)
void paintEvent (QPaintEvent *)
void resizeEvent (QResizeEvent *)

Properties

QBrush background
QColor color
QColor comparisonColor
DisplayMode display_mode

Private Attributes

Private *const p

Detailed Description

Simple widget that shows a preview of a color

Definition at line 33 of file color_preview.hpp.


Member Enumeration Documentation

Enumerator:
NoAlpha 

Show current color with no transparency.

AllAlpha 

show current color with transparency

SplitAlpha 

Show both solid and transparent side by side.

SplitColor 

Show current and comparison colors side by side.

Definition at line 42 of file color_preview.hpp.


Constructor & Destructor Documentation

color_widgets::ColorPreview::ColorPreview ( QWidget *  parent = 0) [explicit]

Definition at line 45 of file color_preview.cpp.

Definition at line 51 of file color_preview.cpp.


Member Function Documentation

Get the background visible under transparent colors.

Emitted when the user clicks on the widget.

Get current color.

void color_widgets::ColorPreview::colorChanged ( QColor  ) [signal]

Emitted on setColor.

Get the comparison color.

Get color display mode.

Definition at line 67 of file color_preview.cpp.

void color_widgets::ColorPreview::mouseMoveEvent ( QMouseEvent *  ev) [protected]

Definition at line 162 of file color_preview.cpp.

void color_widgets::ColorPreview::mouseReleaseEvent ( QMouseEvent *  ev) [protected]

Definition at line 156 of file color_preview.cpp.

void color_widgets::ColorPreview::paint ( QPainter &  painter,
QRect  rect 
) const

Definition at line 93 of file color_preview.cpp.

void color_widgets::ColorPreview::paintEvent ( QPaintEvent *  ) [protected]

Definition at line 144 of file color_preview.cpp.

void color_widgets::ColorPreview::resizeEvent ( QResizeEvent *  ) [protected]

Definition at line 151 of file color_preview.cpp.

void color_widgets::ColorPreview::setBackground ( const QBrush &  bk)

Change the background visible under transparent colors.

Definition at line 56 of file color_preview.cpp.

void color_widgets::ColorPreview::setColor ( const QColor &  c) [slot]

Set current color.

Definition at line 131 of file color_preview.cpp.

void color_widgets::ColorPreview::setComparisonColor ( const QColor &  c) [slot]

Set the comparison color.

Definition at line 138 of file color_preview.cpp.

Set how transparent colors are handled.

Definition at line 72 of file color_preview.cpp.

Definition at line 88 of file color_preview.cpp.


Member Data Documentation

Reimplemented in color_widgets::ColorSelector.

Definition at line 96 of file color_preview.hpp.


Property Documentation

Definition at line 39 of file color_preview.hpp.

QColor color_widgets::ColorPreview::color [read, write]

Definition at line 36 of file color_preview.hpp.

Definition at line 37 of file color_preview.hpp.

Definition at line 38 of file color_preview.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:58