#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 | setSelectedOpacity (QList< int > rows, double opacity) |
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) |
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 Global opacity. More... | |
double | globalOpacity () const |
Set/Get Global opacity. More... | |
void | setSupportsReorder (bool reorder) |
Set/Get SupportsReorder. More... | |
bool | supportsReorder () const |
Set/Get SupportsReorder. More... | |
Protected Attributes | |
QIcon | MissingColorIcon |
double | GlobalOpacity |
vtkSmartPointer< vtkSMStringListDomain > | VisibilityDomain |
bool | SupportsReorder |
Definition at line 52 of file pqAnnotationsModel.h.
Enumerator | |
---|---|
VISIBILITY | |
COLOR | |
OPACITY | |
VALUE | |
LABEL | |
NUMBER_OF_COLUMNS | |
COLOR_DATA | |
OPACITY_DATA |
Definition at line 60 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 94 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 | ) |
Set/Get the value-annotation pairs.
std::vector<std::pair<QString, QString> > pqAnnotationsModel::annotations | ( | ) | const |
Set/Get the value-annotation pairs.
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.
void pqAnnotationsModel::setGlobalOpacity | ( | double | opacity | ) |
Set/Get Global opacity.
|
inline |
Set/Get Global opacity.
Definition at line 146 of file pqAnnotationsModel.h.
void pqAnnotationsModel::setSupportsReorder | ( | bool | reorder | ) |
Set/Get SupportsReorder.
bool pqAnnotationsModel::supportsReorder | ( | ) | const |
Set/Get SupportsReorder.
void pqAnnotationsModel::reorder | ( | std::vector< int > | newOrder | ) |
Reorders the list of annotations, following the indexes given by newOrder.
|
protected |
Definition at line 165 of file pqAnnotationsModel.h.
|
protected |
Definition at line 166 of file pqAnnotationsModel.h.
|
protected |
Definition at line 167 of file pqAnnotationsModel.h.
|
protected |
Definition at line 168 of file pqAnnotationsModel.h.