A widget drawing a palette.
More...
#include <swatch.hpp>
A widget drawing a palette.
Definition at line 34 of file swatch.hpp.
Enumerator |
---|
Hint |
The size is just a hint.
|
Minimum |
Can expand but not contract.
|
Fixed |
Must be exactly as specified.
|
Definition at line 91 of file swatch.hpp.
color_widgets::Swatch::Swatch |
( |
QWidget * |
parent = 0 | ) |
|
color_widgets::Swatch::~Swatch |
( |
| ) |
|
QPen color_widgets::Swatch::border |
( |
| ) |
const |
void color_widgets::Swatch::borderChanged |
( |
const QPen & |
border | ) |
|
|
signal |
void color_widgets::Swatch::clearSelection |
( |
| ) |
|
|
slot |
QColor color_widgets::Swatch::colorAt |
( |
const QPoint & |
p | ) |
|
Color at the given position within the widget.
- Parameters
-
p | Point in local coordinates |
Definition at line 294 of file swatch.cpp.
void color_widgets::Swatch::colorSelected |
( |
const QColor & |
color | ) |
|
|
signal |
QSize color_widgets::Swatch::colorSize |
( |
| ) |
const |
void color_widgets::Swatch::colorSizeChanged |
( |
const QSize & |
colorSize | ) |
|
|
signal |
void color_widgets::Swatch::colorSizePolicyChanged |
( |
ColorSizePolicy |
colorSizePolicy | ) |
|
|
signal |
void color_widgets::Swatch::doubleClicked |
( |
int |
index | ) |
|
|
signal |
void color_widgets::Swatch::dragEnterEvent |
( |
QDragEnterEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::dragLeaveEvent |
( |
QDragLeaveEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
protected |
bool color_widgets::Swatch::event |
( |
QEvent * |
event | ) |
|
|
protected |
int color_widgets::Swatch::forcedColumns |
( |
| ) |
const |
void color_widgets::Swatch::forcedColumnsChanged |
( |
int |
forcedColumns | ) |
|
|
signal |
int color_widgets::Swatch::forcedRows |
( |
| ) |
const |
void color_widgets::Swatch::forcedRowsChanged |
( |
int |
forcedRows | ) |
|
|
signal |
int color_widgets::Swatch::indexAt |
( |
const QPoint & |
p | ) |
|
Color index at the given position within the widget.
- Parameters
-
p | Point in local coordinates |
- Returns
- -1 if the position doesn't represent any color
Definition at line 275 of file swatch.cpp.
void color_widgets::Swatch::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
protected |
QSize color_widgets::Swatch::minimumSizeHint |
( |
| ) |
const |
void color_widgets::Swatch::mouseDoubleClickEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
void color_widgets::Swatch::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protected |
const ColorPalette& color_widgets::Swatch::palette |
( |
| ) |
const |
void color_widgets::Swatch::paletteChanged |
( |
const ColorPalette & |
palette | ) |
|
|
signal |
void color_widgets::Swatch::paletteModified |
( |
| ) |
|
|
protectedslot |
Connected to the internal palette object to keep eveything consistent.
Definition at line 652 of file swatch.cpp.
bool color_widgets::Swatch::readOnly |
( |
| ) |
const |
void color_widgets::Swatch::readOnlyChanged |
( |
bool |
readOnly | ) |
|
|
signal |
void color_widgets::Swatch::removeSelected |
( |
| ) |
|
|
slot |
Remove the currently seleceted color.
Definition at line 494 of file swatch.cpp.
void color_widgets::Swatch::rightClicked |
( |
int |
index | ) |
|
|
signal |
int color_widgets::Swatch::selected |
( |
| ) |
const |
void color_widgets::Swatch::selectedChanged |
( |
int |
selected | ) |
|
|
signal |
QColor color_widgets::Swatch::selectedColor |
( |
| ) |
const |
Color at the currently selected index.
Definition at line 270 of file swatch.cpp.
void color_widgets::Swatch::setBorder |
( |
const QPen & |
border | ) |
|
|
slot |
void color_widgets::Swatch::setColorSize |
( |
const QSize & |
colorSize | ) |
|
|
slot |
void color_widgets::Swatch::setColorSizePolicy |
( |
ColorSizePolicy |
colorSizePolicy | ) |
|
|
slot |
void color_widgets::Swatch::setForcedColumns |
( |
int |
forcedColumns | ) |
|
|
slot |
void color_widgets::Swatch::setForcedRows |
( |
int |
forcedRows | ) |
|
|
slot |
void color_widgets::Swatch::setPalette |
( |
const ColorPalette & |
palette | ) |
|
|
slot |
void color_widgets::Swatch::setReadOnly |
( |
bool |
readOnly | ) |
|
|
slot |
void color_widgets::Swatch::setSelected |
( |
int |
selected | ) |
|
|
slot |
QSize color_widgets::Swatch::sizeHint |
( |
| ) |
const |
void color_widgets::Swatch::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
protected |
QPen color_widgets::Swatch::border |
|
readwrite |
Border around the colors.
Definition at line 57 of file swatch.hpp.
QSize color_widgets::Swatch::colorSize |
|
readwrite |
Preferred size for a color square.
Definition at line 50 of file swatch.hpp.
int color_widgets::Swatch::forcedColumns |
|
readwrite |
Forces the Swatch to display that many columns of colors.
If there are too few elements, the widget will display less than this many columns.
A value of 0 means that the number of columns is automatic.
- Note
- Conflicts with forcedRows
Definition at line 81 of file swatch.hpp.
int color_widgets::Swatch::forcedRows |
|
readwrite |
Forces the Swatch to display that many rows of colors.
If there are too few elements, the widget will display less than this many rows.
A value of0 means that the number of rows is automatic.
- Note
- Conflicts with forcedColumns
Definition at line 69 of file swatch.hpp.
Palette shown by the widget.
Definition at line 41 of file swatch.hpp.
bool color_widgets::Swatch::readOnly |
|
readwrite |
Whether the palette can be modified via user interaction.
- Note
- Even when this is false, it can still be altered programmatically
Definition at line 87 of file swatch.hpp.
int color_widgets::Swatch::selected |
|
readwrite |
Currently selected color (-1 if no color is selected)
Definition at line 45 of file swatch.hpp.
The documentation for this class was generated from the following files: