![]() |
MuseScore
3.4
Music composition and notation
|
#include <palettemodel.h>


Public Types | |
| enum | PaletteTreeModelRoles { PaletteCellRole = Qt::UserRole, VisibleRole, CustomRole, EditableRole, MimeDataRole, GridSizeRole, DrawGridRole, PaletteExpandedRole, PaletteTypeRole, PaletteContentTypeRole, CellActiveRole } |
Public Slots | |
| void | itemDataChanged (const QModelIndex &idx) |
| void | setTreeChanged () |
| void | setTreeUnchanged () |
Signals | |
| void | treeChanged () |
Public Member Functions | |
| PaletteTreeModel (std::unique_ptr< PaletteTree > tree, QObject *parent=nullptr) | |
| PaletteTreeModel (PaletteTree *tree, QObject *parent=nullptr) | |
| bool | blockTreeChanged (bool block) |
| void | setPaletteTree (std::unique_ptr< PaletteTree > tree) |
| const PaletteTree * | paletteTree () const |
| bool | paletteTreeChanged () const |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
| QModelIndex | parent (const QModelIndex &index) const override |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role) const override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| QHash< int, QByteArray > | roleNames () const override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Qt::DropActions | supportedDropActions () const override |
| QMimeData * | mimeData (const QModelIndexList &indexes) const override |
| QStringList | mimeTypes () const override |
| bool | canDropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const |
| bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
| QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const override |
| Currently only searching for a given palette cell is implemented, for anything else the corresponding member function of QAbstractItemModel is used. More... | |
| QModelIndex | findPaletteCell (const PaletteCell &cell, const QModelIndex &parent) const |
| PaletteCellFilter * | getFilter (const QModelIndex &) const |
| The ownership of the returned filter is passed to a caller. More... | |
| bool | moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| const PalettePanel * | findPalettePanel (const QModelIndex &) const |
| PalettePanel * | findPalettePanel (const QModelIndex &index) |
| PaletteCellConstPtr | findCell (const QModelIndex &) const |
| PaletteCellPtr | findCell (const QModelIndex &index) |
| bool | insertPalettePanel (std::unique_ptr< PalettePanel > pp, int row, const QModelIndex &parent=QModelIndex()) |
| void | updateCellsState (const Selection &) |
| void | retranslate () |
Private Slots | |
| void | onDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles) |
Private Member Functions | |
| std::vector< std::unique_ptr< PalettePanel > > & | palettes () |
| const std::vector< std::unique_ptr< PalettePanel > > & | palettes () const |
| PalettePanel * | iptrToPalettePanel (void *iptr, int *idx=nullptr) |
| const PalettePanel * | iptrToPalettePanel (void *iptr, int *idx=nullptr) const |
Private Attributes | |
| std::unique_ptr< PaletteTree > | _paletteTree |
| bool | _treeChanged = false |
| bool | _treeChangedSignalBlocked = false |
|
explicit |
|
inlineexplicit |
| bool Ms::PaletteTreeModel::blockTreeChanged | ( | bool | block | ) |
| bool Ms::PaletteTreeModel::canDropMimeData | ( | const QMimeData * | data, |
| Qt::DropAction | action, | ||
| int | row, | ||
| int | column, | ||
| const QModelIndex & | parent | ||
| ) | const |
|
override |
|
override |
| bool Ms::PaletteTreeModel::dropMimeData | ( | const QMimeData * | data, |
| Qt::DropAction | action, | ||
| int | row, | ||
| int | column, | ||
| const QModelIndex & | parent | ||
| ) |
| PaletteCellConstPtr Ms::PaletteTreeModel::findCell | ( | const QModelIndex & | index | ) | const |
| PaletteCellPtr Ms::PaletteTreeModel::findCell | ( | const QModelIndex & | index | ) |
| QModelIndex Ms::PaletteTreeModel::findPaletteCell | ( | const PaletteCell & | cell, |
| const QModelIndex & | parent | ||
| ) | const |
| const PalettePanel * Ms::PaletteTreeModel::findPalettePanel | ( | const QModelIndex & | index | ) | const |
| PalettePanel * Ms::PaletteTreeModel::findPalettePanel | ( | const QModelIndex & | index | ) |
|
override |
| PaletteCellFilter * Ms::PaletteTreeModel::getFilter | ( | const QModelIndex & | index | ) | const |
The ownership of the returned filter is passed to a caller.
|
override |
| bool Ms::PaletteTreeModel::insertPalettePanel | ( | std::unique_ptr< PalettePanel > | pp, |
| int | row, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
|
override |
|
private |
|
inlineprivate |
|
slot |
|
override |
Currently only searching for a given palette cell is implemented, for anything else the corresponding member function of QAbstractItemModel is used.
|
override |
|
override |
|
override |
|
privateslot |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
override |
|
override |
| void Ms::PaletteTreeModel::retranslate | ( | ) |
|
override |
|
override |
|
override |
| void Ms::PaletteTreeModel::setPaletteTree | ( | std::unique_ptr< PaletteTree > | tree | ) |
|
slot |
|
inlineslot |
|
override |
|
signal |
| void Ms::PaletteTreeModel::updateCellsState | ( | const Selection & | sel | ) |
|
private |
|
private |
|
private |
1.8.13