| OpenMS 2.5.0

Public Slots | Public Member Functions | Protected Attributes | List of all members
MultiGradientSelector Class Reference
Visual

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

`#include <OpenMS/VISUAL/MultiGradientSelector.h>`

Inheritance diagram for MultiGradientSelector:

## 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 MultiGradient & | gradient () const
| returns a const reference to the gradient More...
MultiGradient & | gradient ()
| 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...

## Protected Member Functions

re-implemented Qt events
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

## Protected Attributes

MultiGradient | gradient_
Int | margin_
Int | gradient_area_width_
Int | lever_area_height_
Int | selected_
QColor | selected_color_
bool | left_button_pressed_

## 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 | ) |

override protected

## ◆ getInterpolationMode()

MultiGradient::InterpolationMode getInterpolationMode | ( |  | ) | const

returns the interpolation mode

## ◆ gradient() [1/2]

const MultiGradient& gradient | ( |  | ) | const

returns a const reference to the gradient

## ◆ gradient() [2/2]

MultiGradient& gradient | ( |  | ) |

returns a mutable reference to the gradient

## ◆ keyPressEvent()

void keyPressEvent | ( | QKeyEvent * | e | ) |

override protected

## ◆ mouseDoubleClickEvent()

void mouseDoubleClickEvent | ( | QMouseEvent * | e | ) |

override protected

## ◆ mouseMoveEvent()

void mouseMoveEvent | ( | QMouseEvent * | e | ) |

override protected

## ◆ mousePressEvent()

void mousePressEvent | ( | QMouseEvent * | e | ) |

override protected

## ◆ mouseReleaseEvent()

void mouseReleaseEvent | ( | QMouseEvent * | e | ) |

override protected

## ◆ paintEvent()

void paintEvent | ( | QPaintEvent * | e | ) |

override protected

## ◆ 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