#include <pqSpreadSheetViewModel.h>
Inherits QAbstractTableModel.
Definition at line 29 of file pqSpreadSheetViewModel.h.
◆ anonymous enum
◆ pqSpreadSheetViewModel()
pqSpreadSheetViewModel::pqSpreadSheetViewModel |
( |
vtkSMProxy * |
viewProxy, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
◆ ~pqSpreadSheetViewModel()
pqSpreadSheetViewModel::~pqSpreadSheetViewModel |
( |
| ) |
|
|
override |
◆ rowCount()
int pqSpreadSheetViewModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Returns the number of rows.
◆ columnCount()
int pqSpreadSheetViewModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Returns the number of columns.
◆ data()
QVariant pqSpreadSheetViewModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
Returns the data storeed under the given role for the item referred by the index.
◆ headerData()
QVariant pqSpreadSheetViewModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
Returns the data for the given role and section in the header with the specified orientation.
When orientation is Qt::Horizontal, pqSpreadSheetViewModel adds support for two new roles: pqSpreadSheetViewModel::SectionVisible
, and pqSpreadSheetViewModel::SectionInternal
. SectionVisible
can be used to determine if the column (or horizontal section) is visible or hidden. SectionInternal
is used to determine if the section is internal. An internal section is also hidden. When data associated with these two roles changes, the model will fire headerDataChanged
signal.
◆ sortSection()
void pqSpreadSheetViewModel::sortSection |
( |
int |
section, |
|
|
Qt::SortOrder |
order |
|
) |
| |
Make a server request to sort based on a given column with a given order.
◆ isSortable()
bool pqSpreadSheetViewModel::isSortable |
( |
int |
section | ) |
|
Return true only if the given column is sortable.
◆ getFieldType()
int pqSpreadSheetViewModel::getFieldType |
( |
| ) |
const |
Returns the field type for the data currently shown by this model.
◆ getVTKIndices()
QSet<vtkIndex> pqSpreadSheetViewModel::getVTKIndices |
( |
const QModelIndexList & |
indexes | ) |
|
◆ setDecimalPrecision()
void pqSpreadSheetViewModel::setDecimalPrecision |
( |
int |
| ) |
|
Set/Get the decimal precision for float and double type data.
◆ getDecimalPrecision()
int pqSpreadSheetViewModel::getDecimalPrecision |
( |
| ) |
|
◆ setFixedRepresentation()
void pqSpreadSheetViewModel::setFixedRepresentation |
( |
bool |
| ) |
|
Set/Get whether the decimal representation is fixed or scientific.
True is fixed and False is scientific
◆ getFixedRepresentation()
bool pqSpreadSheetViewModel::getFixedRepresentation |
( |
| ) |
|
◆ setActiveRegion()
void pqSpreadSheetViewModel::setActiveRegion |
( |
int |
row_top, |
|
|
int |
row_bottom |
|
) |
| |
set the region (in row indices) that is currently being shown in the view.
the model will provide data-values only for the active-region. For any other region it will simply return a "..." text for display (in QAbstractTableModel::data(..) callback).
◆ activeRepresentation()
Returns the active representation.
Active representation is the representation being shown by the view.
◆ activeRepresentationProxy()
vtkSMProxy* pqSpreadSheetViewModel::activeRepresentationProxy |
( |
| ) |
const |
◆ flags()
Qt::ItemFlags pqSpreadSheetViewModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Method needed for copy/past cell editor.
◆ setData()
bool pqSpreadSheetViewModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
◆ GetRowsAsString()
QString pqSpreadSheetViewModel::GetRowsAsString |
( |
| ) |
const |
Returns the current rows as a CSV-formatted string, including header with column names.
Uses the vtkCSVExporter.
◆ forceUpdate
void pqSpreadSheetViewModel::forceUpdate |
( |
| ) |
|
|
slot |
◆ setActiveRepresentation
Sets the active representation.
Active representation is the representation being shown by the view.
◆ setActiveRepresentationProxy
void pqSpreadSheetViewModel::setActiveRepresentationProxy |
( |
vtkSMProxy * |
| ) |
|
|
slot |
◆ selectionChanged
void pqSpreadSheetViewModel::selectionChanged |
( |
const QItemSelection & |
selection | ) |
|
|
signal |
Fired whenever the server side selection changes.
◆ isDataValid()
bool pqSpreadSheetViewModel::isDataValid |
( |
const QModelIndex & |
idx | ) |
const |
|
protected |
Given an index into the model, check to see that its row number is less than the length of the data array associated with its column.
◆ GetView()
The documentation for this class was generated from the following file: