Public Types | Public Member Functions | Protected Attributes | List of all members
pqAnnotationsModel Class Reference

#include <pqAnnotationsModel.h>

Inherits QAbstractTableModel.

Collaboration diagram for pqAnnotationsModel:
Collaboration graph
[legend]

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< doubleindexedOpacities () 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< vtkSMStringListDomainVisibilityDomain
 
bool SupportsReorder
 

Detailed Description

Definition at line 52 of file pqAnnotationsModel.h.

Member Enumeration Documentation

◆ ColumnRoles

Enumerator
VISIBILITY 
COLOR 
OPACITY 
VALUE 
LABEL 
NUMBER_OF_COLUMNS 
COLOR_DATA 
OPACITY_DATA 

Definition at line 60 of file pqAnnotationsModel.h.

Constructor & Destructor Documentation

◆ pqAnnotationsModel()

pqAnnotationsModel::pqAnnotationsModel ( QObject *  parentObject = nullptr)

◆ ~pqAnnotationsModel()

pqAnnotationsModel::~pqAnnotationsModel ( )
override

Member Function Documentation

◆ flags()

Qt::ItemFlags pqAnnotationsModel::flags ( const QModelIndex &  idx) const
override

Reimplements QAbstractTableModel.

◆ rowCount()

int pqAnnotationsModel::rowCount ( const QModelIndex &  prnt = QModelIndex()) const
override

Reimplements QAbstractTableModel.

◆ columnCount() [1/2]

int pqAnnotationsModel::columnCount ( const QModelIndex &  ) const
override

Reimplements QAbstractTableModel.

◆ setData()

bool pqAnnotationsModel::setData ( const QModelIndex &  idx,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

Reimplements QAbstractTableModel.

◆ data()

QVariant pqAnnotationsModel::data ( const QModelIndex &  idx,
int  role = Qt::DisplayRole 
) const
override

Reimplements QAbstractTableModel.

◆ setHeaderData()

bool pqAnnotationsModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role 
)
override

Reimplements QAbstractTableModel.

◆ headerData()

QVariant pqAnnotationsModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Reimplements QAbstractTableModel.

◆ supportedDropActions()

Qt::DropActions pqAnnotationsModel::supportedDropActions ( ) const
override

Reimplements QAbstractTableModel.

◆ mimeTypes()

QStringList pqAnnotationsModel::mimeTypes ( ) const
override

Reimplements QAbstractTableModel.

◆ mimeData()

QMimeData* pqAnnotationsModel::mimeData ( const QModelIndexList &  indexes) const
override

Reimplements QAbstractTableModel.

◆ dropMimeData()

bool pqAnnotationsModel::dropMimeData ( const QMimeData *  mime_data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parentIdx 
)
override

Reimplements QAbstractTableModel.

◆ columnCount() [2/2]

int pqAnnotationsModel::columnCount ( ) const
inline

Return the number of columns.

Definition at line 94 of file pqAnnotationsModel.h.

◆ setVisibilityDomain()

void pqAnnotationsModel::setVisibilityDomain ( vtkSMStringListDomain domain)

◆ addAnnotation()

QModelIndex pqAnnotationsModel::addAnnotation ( const QModelIndex &  after = QModelIndex())

Add/remove annotations.

◆ removeAnnotations()

QModelIndex pqAnnotationsModel::removeAnnotations ( const QModelIndexList &  toRemove = QModelIndexList())

Add/remove annotations.

◆ removeAllAnnotations()

void pqAnnotationsModel::removeAllAnnotations ( )

Add/remove annotations.

◆ setAnnotations()

void pqAnnotationsModel::setAnnotations ( const std::vector< std::pair< QString, QString > > &  newAnnotations)

Set/Get the value-annotation pairs.

◆ annotations()

std::vector<std::pair<QString, QString> > pqAnnotationsModel::annotations ( ) const

Set/Get the value-annotation pairs.

◆ setVisibilities()

void pqAnnotationsModel::setVisibilities ( const std::vector< std::pair< QString, int > > &  newVisibilities)

Set/Get the visibilities.

◆ visibilities()

std::vector<std::pair<QString, int> > pqAnnotationsModel::visibilities ( ) const

Set/Get the visibilities.

◆ setIndexedColors()

void pqAnnotationsModel::setIndexedColors ( const std::vector< QColor > &  newColors)

Set/Get the colors.

◆ indexedColors()

std::vector<QColor> pqAnnotationsModel::indexedColors ( ) const

Set/Get the colors.

◆ hasColors()

bool pqAnnotationsModel::hasColors ( ) const

◆ setIndexedOpacities()

void pqAnnotationsModel::setIndexedOpacities ( const std::vector< double > &  newOpacities)

Set/Get IndexedOpacities.

◆ indexedOpacities()

std::vector<double> pqAnnotationsModel::indexedOpacities ( ) const

Set/Get IndexedOpacities.

◆ setGlobalOpacity()

void pqAnnotationsModel::setGlobalOpacity ( double  opacity)

Set/Get Global opacity.

◆ globalOpacity()

double pqAnnotationsModel::globalOpacity ( ) const
inline

Set/Get Global opacity.

Definition at line 146 of file pqAnnotationsModel.h.

◆ setSelectedOpacity()

void pqAnnotationsModel::setSelectedOpacity ( QList< int rows,
double  opacity 
)

◆ setSupportsReorder()

void pqAnnotationsModel::setSupportsReorder ( bool  reorder)

Set/Get SupportsReorder.

◆ supportsReorder()

bool pqAnnotationsModel::supportsReorder ( ) const

Set/Get SupportsReorder.

◆ reorder()

void pqAnnotationsModel::reorder ( std::vector< int newOrder)

Reorders the list of annotations, following the indexes given by newOrder.

Member Data Documentation

◆ MissingColorIcon

QIcon pqAnnotationsModel::MissingColorIcon
protected

Definition at line 165 of file pqAnnotationsModel.h.

◆ GlobalOpacity

double pqAnnotationsModel::GlobalOpacity
protected

Definition at line 166 of file pqAnnotationsModel.h.

◆ VisibilityDomain

vtkSmartPointer<vtkSMStringListDomain> pqAnnotationsModel::VisibilityDomain
protected

Definition at line 167 of file pqAnnotationsModel.h.

◆ SupportsReorder

bool pqAnnotationsModel::SupportsReorder
protected

Definition at line 168 of file pqAnnotationsModel.h.


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