|
tilde~
Puredata Qt-based GUI
|
#include <color_preview.hpp>
Classes | |
| class | Private |
Public Types | |
| enum | Display_Mode { NoAlpha, AllAlpha, SplitAlpha, SplitColor } |
Public Slots | |
| void | setColor (const QColor &c) |
| Set current color. More... | |
| void | setComparisonColor (const QColor &c) |
| Set the comparison color. More... | |
Signals | |
| void | clicked () |
| Emitted when the user clicks on the widget. More... | |
| void | colorChanged (QColor) |
| Emitted on setColor. More... | |
Public Member Functions | |
| Color_Preview (QWidget *parent=0) | |
| ~Color_Preview () | |
| QBrush | background () const |
| Get the background visible under transparent colors. More... | |
| void | setBackground (const QBrush &bk) |
| Change the background visible under transparent colors. More... | |
| Display_Mode | displayMode () const |
| Get color display mode. More... | |
| void | setDisplayMode (Display_Mode dm) |
| Set how transparent colors are handled. More... | |
| QColor | color () const |
| Get current color. More... | |
| QColor | comparisonColor () const |
| Get the comparison color. More... | |
| QSize | sizeHint () const |
| void | paint (QPainter &painter, QRect rect) const |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *) |
| void | resizeEvent (QResizeEvent *) |
| void | mouseReleaseEvent (QMouseEvent *ev) |
| void | mouseMoveEvent (QMouseEvent *ev) |
Properties | |
| QColor | color |
| QColor | comparisonColor |
| Display_Mode | display_mode |
| QBrush | background |
Copyright (C) 2013-2015 Mattia Basaglia Copyright (C) 2014 Calle Laakkonen This software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Color Widgets. If not, see <http://www.gnu.org/licenses/>.
Simple widget that shows a preview of a color
|
explicit |
| Color_Preview::~Color_Preview | ( | ) |
| QBrush Color_Preview::background | ( | ) | const |
Get the background visible under transparent colors.
|
signal |
Emitted when the user clicks on the widget.
| QColor Color_Preview::color | ( | ) | const |
Get current color.
|
signal |
Emitted on setColor.
| QColor Color_Preview::comparisonColor | ( | ) | const |
Get the comparison color.
| Color_Preview::Display_Mode Color_Preview::displayMode | ( | ) | const |
Get color display mode.
|
protected |
|
protected |
| void Color_Preview::paint | ( | QPainter & | painter, |
| QRect | rect | ||
| ) | const |
|
protected |
|
protected |
| void Color_Preview::setBackground | ( | const QBrush & | bk | ) |
Change the background visible under transparent colors.
|
slot |
Set current color.
|
slot |
Set the comparison color.
| void Color_Preview::setDisplayMode | ( | Display_Mode | dm | ) |
Set how transparent colors are handled.
| QSize Color_Preview::sizeHint | ( | ) | const |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
1.8.6