|
tilde~
Puredata Qt-based GUI
|
A slider that mover on top of a gradient. More...
#include <gradient_slider.hpp>
Classes | |
| class | Private |
Public Member Functions | |
| Gradient_Slider (QWidget *parent=0) | |
| Gradient_Slider (Qt::Orientation orientation, QWidget *parent=0) | |
| ~Gradient_Slider () | |
| QBrush | background () const |
| Get the background, it's visible for transparent gradient stops. More... | |
| void | setBackground (const QBrush &bg) |
| Set the background, it's visible for transparent gradient stops. More... | |
| QGradientStops | colors () const |
| Get the colors that make up the gradient. More... | |
| void | setColors (const QGradientStops &colors) |
| Set the colors that make up the gradient. More... | |
| QLinearGradient | gradient () const |
| Get the gradient. More... | |
| void | setGradient (const QLinearGradient &gradient) |
| Set the gradient. More... | |
| void | setColors (const QVector< QColor > &colors) |
| void | setFirstColor (const QColor &c) |
| void | setLastColor (const QColor &c) |
| QColor | firstColor () const |
| QColor | lastColor () const |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *ev) |
Properties | |
| QBrush | background |
| QGradientStops | colors |
| QColor | firstColor |
| QColor | lastColor |
| QLinearGradient | gradient |
A slider that mover on top of a gradient.
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/>.
|
explicit |
|
explicit |
| Gradient_Slider::~Gradient_Slider | ( | ) |
| QBrush Gradient_Slider::background | ( | ) | const |
Get the background, it's visible for transparent gradient stops.
| QGradientStops Gradient_Slider::colors | ( | ) | const |
Get the colors that make up the gradient.
| QColor Gradient_Slider::firstColor | ( | ) | const |
Get the first color
Returns QColor() con empty gradient
| QLinearGradient Gradient_Slider::gradient | ( | ) | const |
Get the gradient.
| QColor Gradient_Slider::lastColor | ( | ) | const |
Get the last color
Returns QColor() con empty gradient
|
protected |
| void Gradient_Slider::setBackground | ( | const QBrush & | bg | ) |
Set the background, it's visible for transparent gradient stops.
| void Gradient_Slider::setColors | ( | const QGradientStops & | colors | ) |
Set the colors that make up the gradient.
| void Gradient_Slider::setColors | ( | const QVector< QColor > & | colors | ) |
Overload: create an evenly distributed gradient of the given colors
| void Gradient_Slider::setFirstColor | ( | const QColor & | c | ) |
Set the first color of the gradient
If the gradient is currently empty it will create a stop with the given color
| void Gradient_Slider::setGradient | ( | const QLinearGradient & | gradient | ) |
Set the gradient.
| void Gradient_Slider::setLastColor | ( | const QColor & | c | ) |
Set the last color of the gradient
If the gradient is has less than two colors, it will create a stop with the given color
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
1.8.6