32 #ifndef pqAnnotationsModel_h 33 #define pqAnnotationsModel_h 36 #include <QAbstractTableModel> 54 typedef QAbstractTableModel Superclass;
68 COLOR_DATA = NUMBER_OF_COLUMNS,
76 Qt::ItemFlags flags(
const QModelIndex& idx)
const override;
77 int rowCount(
const QModelIndex& prnt = QModelIndex())
const override;
78 int columnCount(
const QModelIndex& )
const override;
79 bool setData(
const QModelIndex& idx,
const QVariant& value,
int role = Qt::EditRole)
override;
80 QVariant
data(
const QModelIndex& idx,
int role = Qt::DisplayRole)
const override;
82 int section, Qt::Orientation orientation,
const QVariant& value,
int role)
override;
83 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
84 Qt::DropActions supportedDropActions()
const override;
85 QStringList mimeTypes()
const override;
86 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
87 bool dropMimeData(
const QMimeData* mime_data, Qt::DropAction action,
int row,
int column,
88 const QModelIndex& parentIdx)
override;
102 QModelIndex addAnnotation(
const QModelIndex& after = QModelIndex());
103 QModelIndex removeAnnotations(
const QModelIndexList& toRemove = QModelIndexList());
104 void removeAllAnnotations();
111 void setAnnotations(
const std::vector<std::pair<QString, QString> >& newAnnotations);
112 std::vector<std::pair<QString, QString> > annotations()
const;
119 void setVisibilities(
const std::vector<std::pair<QString, int> >& newVisibilities);
120 std::vector<std::pair<QString, int> > visibilities()
const;
127 void setIndexedColors(
const std::vector<QColor>& newColors);
128 std::vector<QColor> indexedColors()
const;
131 bool hasColors()
const;
137 void setIndexedOpacities(
const std::vector<double>& newOpacities);
138 std::vector<double> indexedOpacities()
const;
145 void setGlobalOpacity(
double opacity);
149 void setSelectedOpacity(QList<int> rows,
double opacity);
155 void setSupportsReorder(
bool reorder);
156 bool supportsReorder()
const;
162 void reorder(std::vector<int> newOrder);
174 pqInternals* Internals;
vtkSmartPointer< vtkSMStringListDomain > VisibilityDomain
#define PQAPPLICATIONCOMPONENTS_EXPORT
int columnCount() const
Return the number of columns.
double globalOpacity() const
Set/Get Global opacity.