Loading...
Searching...
No Matches
Inheritance diagram for score::QGraphicsGridChooser:

Public Types

enum  Unit : int8_t {
  Parent = -1 , Free = 0 , Note = 1 , Bars = 2 ,
  Period = 3
}
 
using Feel = note_values::Feel
 

Public Member Functions

 QGraphicsGridChooser (QGraphicsItem *parent)
 
void setUnits (uint32_t units)
 The units the menu offers, or-ed flag()s.
 
uint32_t units () const noexcept
 
void setMaxBars (int bars)
 
int maxBars () const noexcept
 
void setPeriodName (const QString &name)
 Lower case, as in "2x loop".
 
const QString & periodName () const noexcept
 
void setMaxSeconds (double seconds)
 
void setRect (const QRectF &r)
 
void setValue (ossia::vec2f v)
 
ossia::vec2f value () const noexcept
 
void setExecutionValue (ossia::vec2f v)
 
void resetExecution ()
 
Unit unit () const noexcept
 
Feel feel () const noexcept
 
void chooseUnit (Unit u)
 Switches to that unit, back to the value it was left at: an edit.
 
void chooseFeel (Feel f)
 The same note value, dotted or triplet: an edit. Note values only.
 
QString text () const
 What the readout shows.
 
QMenu * makeUnitMenu ()
 The menu a click on the readout opens, owned by the caller.
 
QRectF boundingRect () const override
 
void sliderMoved ()
 
void sliderReleased ()
 

Static Public Member Functions

static constexpr uint32_t flag (Unit u) noexcept
 The bit of a unit in a set of allowed units, as halp::grid_units.
 
static QString label (ossia::vec2f v, const QString &periodName=QStringLiteral("loop"))
 The readout of a value: "None", "250 ms", "1/8T", "3 bars", "2x loop".
 
static QString unitName (Unit u, const QString &periodName=QStringLiteral("loop"))
 A unit, as the menu lists it.
 

Public Attributes

double min {0.}
 
double max {8.}
 
ossia::vec2f init {0.25f, float(Note)}
 What a double-click goes back to.
 
bool moving {}
 

Static Public Attributes

static constexpr std::array< float, 7 > periodDetents
 The periods the knob steps through, in periods.
 

Friends

struct DefaultControlImpl
 
struct DefaultGraphicsKnobImpl
 

Member Data Documentation

◆ min

double score::QGraphicsGridChooser::min {0.}

Free times: 0 to max seconds, the cube of the knob's travel (as the time chooser), so that short times get most of it.

◆ periodDetents

constexpr std::array<float, 7> score::QGraphicsGridChooser::periodDetents
staticconstexpr
Initial value:
{0.25f, 0.5f, 1.f, 2.f,
3.f, 4.f, 8.f}

The periods the knob steps through, in periods.


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