Loading...
Searching...
No Matches

A modifier drag over a row of bars, each the value of a step. More...

Detailed Description

A modifier drag over a row of bars, each the value of a step.

Offset (Shift) moves every bar by the same amount, as far as the mouse went up or down. Random (Alt) blends each bar towards a random target, the more the further the mouse goes from where it pressed, whatever the direction. Either acts on steps only; the other bars keep their values.

bottom is the value at the bottom of the bars and top the one at the top: a row drawn upside down passes them the other way round.

Public Types

enum class  Kind { None , Offset , Random }
 

Public Member Functions

 operator bool () const noexcept
 
void start (Kind k, QPointF pos, std::vector< float > values, std::vector< float > targets, std::vector< int > affected)
 
void stop () noexcept
 
std::vector< float > values (QPointF pos, double height, float bottom, float top) const
 The values with the mouse at pos, over bars height high.
 

Public Attributes

Kind kind {Kind::None}
 
QPointF origin
 
std::vector< float > base
 
std::vector< float > target
 For Random: where each bar ends up when dragged all the way.
 
std::vector< int > steps
 

The documentation for this struct was generated from the following file: