tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Member Functions | Protected Member Functions | Properties | List of all members
Gradient_Slider Class Reference

A slider that mover on top of a gradient. More...

#include <gradient_slider.hpp>

Inheritance diagram for Gradient_Slider:
Hue_Slider

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
 

Detailed Description

A slider that mover on top of a gradient.

Author
Mattia Basaglia

License

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/>.

Constructor & Destructor Documentation

Gradient_Slider::Gradient_Slider ( QWidget *  parent = 0)
explicit
Gradient_Slider::Gradient_Slider ( Qt::Orientation  orientation,
QWidget *  parent = 0 
)
explicit
Gradient_Slider::~Gradient_Slider ( )

Member Function Documentation

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

void Gradient_Slider::paintEvent ( QPaintEvent *  ev)
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

Property Documentation

QBrush Gradient_Slider::background
readwrite
QGradientStops Gradient_Slider::colors
readwrite
QColor Gradient_Slider::firstColor
readwrite
QLinearGradient Gradient_Slider::gradient
readwrite
QColor Gradient_Slider::lastColor
readwrite

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