Loading...
Searching...
No Matches
Inheritance diagram for score::QGraphicsToggleGrid:
score::QGraphicsChannelMask

Detailed Description

Named toggles in rows, one per label. A click toggles a cell and a drag paints the same state over the others; the context menu sets all, none, inverts, and edits the set as text: the labels of the cells that are on, separated by commas.

The value is an ossia list of booleans, one per label, in their order.

Public Member Functions

 QGraphicsToggleGrid (QGraphicsItem *parent)
 
void setLabels (QStringList labels, int perRow)
 
const QStringList & labels () const noexcept
 
void setValue (const ossia::value &v)
 
ossia::value value () const
 
virtual QString toText () const
 
virtual bool setText (const QString &text)
 False, and the cells unchanged, when the text names no cell.
 
QRectF boundingRect () const override
 
void sliderMoved ()
 
void sliderReleased ()
 

Public Attributes

bool moving = false
 

Protected Member Functions

void set (std::vector< bool > on)
 Sets every cell and reports one edit.
 
const std::vector< bool > & cells () const noexcept
 
virtual QString editTitle () const
 
virtual QString editHint () const
 
virtual QString editError () const
 

Member Function Documentation

◆ setLabels()

void score::QGraphicsToggleGrid::setLabels ( QStringList  labels,
int  perRow 
)

One cell per label, perRow cells to a row, all as wide as the widest label. Every cell starts off.

◆ setText()

bool score::QGraphicsToggleGrid::setText ( const QString &  text)
virtual

False, and the cells unchanged, when the text names no cell.

Reimplemented in score::QGraphicsChannelMask.


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