|
AvogadroLibs 2.1.0-20261111
|
UI for the layer dock.
#include <avogadro/qtgui/layermodel.h>
Public Types | |
| enum | ColumnType { Name = 0 , Menu = 1 , Visible = 2 , Lock = 3 , Remove = 5 } |
Public Slots | |
| void | updateRows () |
Public Member Functions | |
| LayerModel (QObject *p=nullptr) | |
| void | loadIcons (bool darkMode) |
| QModelIndex | parent (const QModelIndex &child) const override |
| int | rowCount (const QModelIndex &parent) const override |
| int | columnCount (const QModelIndex &parent) const override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| QVariant | data (const QModelIndex &index, int role) const override |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
| void | addItem () |
| void | addLayer (RWMolecule *rwmolecule) |
| void | addMolecule (const Molecule *mol) |
| void | setActiveLayer (int index, RWMolecule *rwmolecule) |
| void | removeItem (int row, RWMolecule *rwmolecule) |
| size_t | items () const |
| void | flipVisible (size_t row) |
| void | flipLocked (size_t row) |
| size_t | layerCount () const |
| size_t | layerForRow (int row) const |
| bool | layerVisible (size_t layer) const |
| bool | layerLocked (size_t layer) const |
| void | setLayerVisible (size_t layer, bool visible) |
| void | setLayerLocked (size_t layer, bool locked) |
| void | setActiveLayerId (size_t layer, RWMolecule *rwmolecule) |
| void | removeLayerId (size_t layer, RWMolecule *rwmolecule) |
| Public Member Functions inherited from RWLayerManager | |
| void | removeLayer (size_t layer, RWMolecule *rwmolecule) |
| void | addLayer (RWMolecule *rwmolecule) |
| void | setActiveLayer (size_t layer, RWMolecule *rwmolecule) |
| bool | visible (size_t layer) const |
Additional Inherited Members | |
| Protected Member Functions inherited from RWLayerManager | |
| bool | locked (size_t layer) const |
| void | flipVisible (size_t layer) |
| void | flipLocked (size_t layer) |
| void | addMolecule (const Core::Molecule *mol) |
| Core::Array< std::pair< size_t, std::string > > | activeMoleculeNames () const |
| Static Protected Member Functions inherited from LayerManager | |
| static std::shared_ptr< MoleculeInfo > | activeMoleculeInfo () |
| static std::shared_ptr< MoleculeInfo > | findMoleculeInfo (const Molecule *mol) |
| static void | setActiveMolecule (const Molecule *mol) |
| static Layer & | getMoleculeLayer () |
| static Layer & | getMoleculeLayer (const Molecule *mol) |
| static std::shared_ptr< MoleculeInfo > | getMoleculeInfo () |
| static std::shared_ptr< MoleculeInfo > | getMoleculeInfo (const Molecule *mol) |
| static size_t | layerCount () |
| Static Protected Attributes inherited from LayerManager | |
| static std::weak_ptr< MoleculeInfo > | m_activeInfo |
| size_t layerForRow | ( | int | row | ) | const |
Translate a Layers dock row – as this model lays them out: one header row per layer, followed by a row for each scene plugin enabled only in that layer, so a row and its layer id can diverge – to the layer id it belongs to.
row does not name a layer (negative, the synthetic "+" row, or past it). | bool layerVisible | ( | size_t | layer | ) | const |
layer is visible. Out-of-range is harmless: it reads back the same default a fresh layer starts with. | bool layerLocked | ( | size_t | layer | ) | const |
layer is locked. Out-of-range is harmless: it reads back the same default a fresh layer starts with. | void setLayerVisible | ( | size_t | layer, |
| bool | visible ) |
Show or hide layer. A no-op if it already matches visible, or if layer is out of range.
| void setLayerLocked | ( | size_t | layer, |
| bool | locked ) |
Lock or unlock layer against edits. A no-op if it already matches locked, or if layer is out of range.
| void setActiveLayerId | ( | size_t | layer, |
| RWMolecule * | rwmolecule ) |
Make layer the active layer. A no-op if layer is out of range.
| void removeLayerId | ( | size_t | layer, |
| RWMolecule * | rwmolecule ) |
Remove layer. A no-op if layer is out of range.