OpenMS  2.8.0
Public Slots | Public Member Functions | List of all members
MultiGradientSelector Class Reference

A widget witch allows constructing gradients of multiple colors. More...

#include <OpenMS/VISUAL/MultiGradientSelector.h>

Inheritance diagram for MultiGradientSelector:
[legend]
Collaboration diagram for MultiGradientSelector:
[legend]

Public Slots

void stairsInterpolation (bool state)
 sets what interpolation mode is used More...
 

Public Member Functions

 MultiGradientSelector (QWidget *parent=nullptr)
 Constructor. More...
 
 ~MultiGradientSelector () override
 Destructor. More...
 
const MultiGradientgradient () const
 returns a const reference to the gradient More...
 
MultiGradientgradient ()
 returns a mutable reference to the gradient More...
 
void setInterpolationMode (MultiGradient::InterpolationMode mode)
 sets the interpolation mode More...
 
MultiGradient::InterpolationMode getInterpolationMode () const
 returns the interpolation mode More...
 

re-implemented Qt events

MultiGradient gradient_
 
Int margin_
 
Int gradient_area_width_
 
Int lever_area_height_
 
Int selected_
 
QColor selected_color_
 
bool left_button_pressed_
 
void paintEvent (QPaintEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void mouseDoubleClickEvent (QMouseEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 
void contextMenuEvent (QContextMenuEvent *e) override
 

Detailed Description

A widget witch allows constructing gradients of multiple colors.

The above example image shows a MultiGradientSelector.

Constructor & Destructor Documentation

◆ MultiGradientSelector()

MultiGradientSelector ( QWidget parent = nullptr)

Constructor.

◆ ~MultiGradientSelector()

~MultiGradientSelector ( )
override

Destructor.

Member Function Documentation

◆ contextMenuEvent()

void contextMenuEvent ( QContextMenuEvent *  e)
overrideprotected

◆ getInterpolationMode()

MultiGradient::InterpolationMode getInterpolationMode ( ) const

returns the interpolation mode

◆ gradient() [1/2]

MultiGradient& gradient ( )

returns a mutable reference to the gradient

◆ gradient() [2/2]

const MultiGradient& gradient ( ) const

returns a const reference to the gradient

◆ keyPressEvent()

void keyPressEvent ( QKeyEvent *  e)
overrideprotected

◆ mouseDoubleClickEvent()

void mouseDoubleClickEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseMoveEvent()

void mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

◆ paintEvent()

void paintEvent ( QPaintEvent *  e)
overrideprotected

◆ setInterpolationMode()

void setInterpolationMode ( MultiGradient::InterpolationMode  mode)

sets the interpolation mode

◆ stairsInterpolation

void stairsInterpolation ( bool  state)
slot

sets what interpolation mode is used

Member Data Documentation

◆ gradient_

MultiGradient gradient_
protected

◆ gradient_area_width_

Int gradient_area_width_
protected

◆ left_button_pressed_

bool left_button_pressed_
protected

◆ lever_area_height_

Int lever_area_height_
protected

◆ margin_

Int margin_
protected

◆ selected_

Int selected_
protected

◆ selected_color_

QColor selected_color_
protected