4 #ifndef pqAnnotationsModel_h 5 #define pqAnnotationsModel_h 11 #include <QAbstractTableModel> 27 typedef QAbstractTableModel Superclass;
41 COLOR_DATA = NUMBER_OF_COLUMNS,
49 Qt::ItemFlags flags(
const QModelIndex& idx)
const override;
50 int rowCount(
const QModelIndex& prnt = QModelIndex())
const override;
51 int columnCount(
const QModelIndex& )
const override;
52 bool setData(
const QModelIndex& idx,
const QVariant& value,
int role = Qt::EditRole)
override;
53 QVariant
data(
const QModelIndex& idx,
int role = Qt::DisplayRole)
const override;
55 int section, Qt::Orientation orientation,
const QVariant& value,
int role)
override;
56 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
57 Qt::DropActions supportedDropActions()
const override;
58 QStringList mimeTypes()
const override;
59 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
60 bool dropMimeData(
const QMimeData* mime_data, Qt::DropAction action,
int row,
int column,
61 const QModelIndex& parentIdx)
override;
75 QModelIndex addAnnotation(
const QModelIndex& after = QModelIndex());
76 QModelIndex removeAnnotations(
const QModelIndexList& toRemove = QModelIndexList());
77 void removeAllAnnotations();
86 const std::vector<std::pair<QString, QString>>& newAnnotations,
bool quiet =
false);
87 std::vector<std::pair<QString, QString>> annotations()
const;
94 void setVisibilities(
const std::vector<std::pair<QString, int>>& newVisibilities);
95 std::vector<std::pair<QString, int>> visibilities()
const;
102 void setIndexedColors(
const std::vector<QColor>& newColors);
103 std::vector<QColor> indexedColors()
const;
106 bool hasColors()
const;
112 void setIndexedOpacities(
const std::vector<double>& newOpacities);
113 std::vector<double> indexedOpacities()
const;
132 void setSelectedOpacity(QList<int> rows,
double opacity);
139 void setSupportsReorder(
bool reorder);
140 bool supportsReorder()
const;
146 void reorder(std::vector<int> newOrder);
149 double GlobalOpacity = 1.0;
151 bool SupportsReorder =
false;
157 pqInternals* Internals;
vtkSmartPointer< vtkSMStringListDomain > VisibilityDomain
int columnCount() const
Return the number of columns.
double globalOpacity() const
Set/Get the global opacity value.
void setGlobalOpacity(double opacity)
Set/Get the global opacity value.