#include <pqAnnotationsModel.h>
Inherits QAbstractTableModel.
Public Types | |
enum | ColumnRoles { VISIBILITY = 0, COLOR, OPACITY, VALUE, LABEL, NUMBER_OF_COLUMNS, COLOR_DATA = NUMBER_OF_COLUMNS, OPACITY_DATA } |
Public Member Functions | |
pqAnnotationsModel (QObject *parentObject=nullptr) | |
~pqAnnotationsModel () override | |
int | columnCount () const |
Return the number of columns. More... | |
void | setVisibilityDomain (vtkSMStringListDomain *domain) |
bool | hasColors () const |
void | reorder (std::vector< int > newOrder) |
Reorders the list of annotations, following the indexes given by newOrder. More... | |
Qt::ItemFlags | flags (const QModelIndex &idx) const override |
Reimplements QAbstractTableModel. More... | |
int | rowCount (const QModelIndex &prnt=QModelIndex()) const override |
Reimplements QAbstractTableModel. More... | |
int | columnCount (const QModelIndex &) const override |
Reimplements QAbstractTableModel. More... | |
bool | setData (const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole) override |
Reimplements QAbstractTableModel. More... | |
QVariant | data (const QModelIndex &idx, int role=Qt::DisplayRole) const override |
Reimplements QAbstractTableModel. More... | |
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override |
Reimplements QAbstractTableModel. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
Reimplements QAbstractTableModel. More... | |
Qt::DropActions | supportedDropActions () const override |
Reimplements QAbstractTableModel. More... | |
QStringList | mimeTypes () const override |
Reimplements QAbstractTableModel. More... | |
QMimeData * | mimeData (const QModelIndexList &indexes) const override |
Reimplements QAbstractTableModel. More... | |
bool | dropMimeData (const QMimeData *mime_data, Qt::DropAction action, int row, int column, const QModelIndex &parentIdx) override |
Reimplements QAbstractTableModel. More... | |
QModelIndex | addAnnotation (const QModelIndex &after=QModelIndex()) |
Add/remove annotations. More... | |
QModelIndex | removeAnnotations (const QModelIndexList &toRemove=QModelIndexList()) |
Add/remove annotations. More... | |
void | removeAllAnnotations () |
Add/remove annotations. More... | |
void | setAnnotations (const std::vector< std::pair< QString, QString >> &newAnnotations, bool quiet=false) |
Set/Get the value-annotation pairs. More... | |
std::vector< std::pair< QString, QString > > | annotations () const |
Set/Get the value-annotation pairs. More... | |
void | setVisibilities (const std::vector< std::pair< QString, int >> &newVisibilities) |
Set/Get the visibilities. More... | |
std::vector< std::pair< QString, int > > | visibilities () const |
Set/Get the visibilities. More... | |
void | setIndexedColors (const std::vector< QColor > &newColors) |
Set/Get the colors. More... | |
std::vector< QColor > | indexedColors () const |
Set/Get the colors. More... | |
void | setIndexedOpacities (const std::vector< double > &newOpacities) |
Set/Get IndexedOpacities. More... | |
std::vector< double > | indexedOpacities () const |
Set/Get IndexedOpacities. More... | |
void | setGlobalOpacity (double opacity) |
Set/Get the global opacity value. More... | |
double | globalOpacity () const |
Set/Get the global opacity value. More... | |
void | setSelectedOpacity (QList< int > rows, double opacity) |
Set the opacity for the given rows. More... | |
void | setSupportsReorder (bool reorder) |
Set/Get SupportsReorder. More... | |
bool | supportsReorder () const |
Set/Get SupportsReorder. More... | |
Protected Attributes | |
double | GlobalOpacity = 1.0 |
vtkSmartPointer< vtkSMStringListDomain > | VisibilityDomain |
bool | SupportsReorder = false |
Definition at line 24 of file pqAnnotationsModel.h.
Enumerator | |
---|---|
VISIBILITY | |
COLOR | |
OPACITY | |
VALUE | |
LABEL | |
NUMBER_OF_COLUMNS | |
COLOR_DATA | |
OPACITY_DATA |
Definition at line 33 of file pqAnnotationsModel.h.
pqAnnotationsModel::pqAnnotationsModel | ( | QObject * | parentObject = nullptr | ) |
|
override |
|
override |
Reimplements QAbstractTableModel.
Reimplements QAbstractTableModel.
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
override |
Reimplements QAbstractTableModel.
|
inline |
Return the number of columns.
Definition at line 67 of file pqAnnotationsModel.h.
void pqAnnotationsModel::setVisibilityDomain | ( | vtkSMStringListDomain * | domain | ) |
QModelIndex pqAnnotationsModel::addAnnotation | ( | const QModelIndex & | after = QModelIndex() | ) |
Add/remove annotations.
QModelIndex pqAnnotationsModel::removeAnnotations | ( | const QModelIndexList & | toRemove = QModelIndexList() | ) |
Add/remove annotations.
void pqAnnotationsModel::removeAllAnnotations | ( | ) |
Add/remove annotations.
void pqAnnotationsModel::setAnnotations | ( | const std::vector< std::pair< QString, QString >> & | newAnnotations, |
bool | quiet = false |
||
) |
Set/Get the value-annotation pairs.
Emit dataChanged signal, unless quiet is true.
std::vector<std::pair<QString, QString> > pqAnnotationsModel::annotations | ( | ) | const |
Set/Get the value-annotation pairs.
Emit dataChanged signal, unless quiet is true.
void pqAnnotationsModel::setVisibilities | ( | const std::vector< std::pair< QString, int >> & | newVisibilities | ) |
Set/Get the visibilities.
std::vector<std::pair<QString, int> > pqAnnotationsModel::visibilities | ( | ) | const |
Set/Get the visibilities.
void pqAnnotationsModel::setIndexedColors | ( | const std::vector< QColor > & | newColors | ) |
Set/Get the colors.
std::vector<QColor> pqAnnotationsModel::indexedColors | ( | ) | const |
Set/Get the colors.
bool pqAnnotationsModel::hasColors | ( | ) | const |
void pqAnnotationsModel::setIndexedOpacities | ( | const std::vector< double > & | newOpacities | ) |
Set/Get IndexedOpacities.
std::vector<double> pqAnnotationsModel::indexedOpacities | ( | ) | const |
Set/Get IndexedOpacities.
|
inline |
Set/Get the global opacity value.
Default is 1.0. GlobalOpacity corresponds to a cached value only used to draw the global opacity swatch. The opacity value of each items is modified using the setHeaderData method. Note that setHeaderData can also modify the GlobalOpacity value.
Definition at line 124 of file pqAnnotationsModel.h.
|
inline |
Set/Get the global opacity value.
Default is 1.0. GlobalOpacity corresponds to a cached value only used to draw the global opacity swatch. The opacity value of each items is modified using the setHeaderData method. Note that setHeaderData can also modify the GlobalOpacity value.
Definition at line 125 of file pqAnnotationsModel.h.
Set the opacity for the given rows.
void pqAnnotationsModel::setSupportsReorder | ( | bool | reorder | ) |
Set/Get SupportsReorder.
Default is false.
bool pqAnnotationsModel::supportsReorder | ( | ) | const |
Set/Get SupportsReorder.
Default is false.
void pqAnnotationsModel::reorder | ( | std::vector< int > | newOrder | ) |
Reorders the list of annotations, following the indexes given by newOrder.
|
protected |
Definition at line 149 of file pqAnnotationsModel.h.
|
protected |
Definition at line 150 of file pqAnnotationsModel.h.
|
protected |
Definition at line 151 of file pqAnnotationsModel.h.