4 #ifndef pqAnnotationsModel_h 5 #define pqAnnotationsModel_h 12 #include <QAbstractTableModel> 28 typedef QAbstractTableModel Superclass;
42 COLOR_DATA = NUMBER_OF_COLUMNS,
50 Qt::ItemFlags flags(
const QModelIndex& idx)
const override;
51 int rowCount(
const QModelIndex& prnt = QModelIndex())
const override;
52 int columnCount(
const QModelIndex& )
const override;
53 bool setData(
const QModelIndex& idx,
const QVariant& value,
int role = Qt::EditRole)
override;
54 QVariant
data(
const QModelIndex& idx,
int role = Qt::DisplayRole)
const override;
56 int section, Qt::Orientation orientation,
const QVariant& value,
int role)
override;
57 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
58 Qt::DropActions supportedDropActions()
const override;
59 QStringList mimeTypes()
const override;
60 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
61 bool dropMimeData(
const QMimeData* mime_data, Qt::DropAction action,
int row,
int column,
62 const QModelIndex& parentIdx)
override;
76 QModelIndex addAnnotation(
const QModelIndex& after = QModelIndex());
77 QModelIndex removeAnnotations(
const QModelIndexList& toRemove = QModelIndexList());
78 void removeAllAnnotations();
87 const std::vector<std::pair<QString, QString>>& newAnnotations,
bool quiet =
false);
88 std::vector<std::pair<QString, QString>> annotations()
const;
95 void setVisibilities(
const std::vector<std::pair<QString, int>>& newVisibilities);
96 std::vector<std::pair<QString, int>> visibilities()
const;
103 void setIndexedColors(
const std::vector<QColor>& newColors);
104 std::vector<QColor> indexedColors()
const;
107 bool hasColors()
const;
113 void setIndexedOpacities(
const std::vector<double>& newOpacities);
114 std::vector<double> indexedOpacities()
const;
133 void setSelectedOpacity(QList<int> rows,
double opacity);
140 void setSupportsReorder(
bool reorder);
141 bool supportsReorder()
const;
147 void reorder(std::vector<int> newOrder);
151 QIcon MissingColorIcon;
152 double GlobalOpacity = 1.0;
154 bool SupportsReorder = false;
160 pqInternals* Internals;
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
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.