ParaView
|
#include <pqSpreadSheetViewModel.h>
Inherits QAbstractTableModel.
Classes | |
class | vtkIndex |
Public Slots | |
void | forceUpdate () |
resets the model. More... | |
void | setActiveRepresentation (pqDataRepresentation *) |
Sets the active representation. More... | |
void | setActiveRepresentationProxy (vtkSMProxy *) |
Sets the active representation. More... | |
Signals | |
void | selectionChanged (const QItemSelection &selection) |
Fired whenever the server side selection changes. More... | |
Public Member Functions | |
pqSpreadSheetViewModel (vtkSMProxy *viewProxy, QObject *parent=NULL) | |
~pqSpreadSheetViewModel () | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Returns the number of rows. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
Returns the number of columns. More... | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Returns the data storeed under the given role for the item referred by the index. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
Returns the data for the given role and section in the header with the specified orientation. More... | |
void | sortSection (int section, Qt::SortOrder order) |
Make a server request to sort based on a given column with a given order. More... | |
bool | isSortable (int section) |
Return true only if the given column is sortable. More... | |
bool | isVisible (int section) |
Return true only if the given column is visible. More... | |
void | setVisible (int section, bool visible) |
Set the visibility of a given column. More... | |
void | clearVisible () |
Clear visibility list, all column considered visible. More... | |
int | getFieldType () const |
Returns the field type for the data currently shown by this model. More... | |
QSet< vtkIndex > | getVTKIndices (const QModelIndexList &indexes) |
void | resetCompositeDataSetIndex () |
Resets the composite dataset index on the representation to point to the first non-empty block. More... | |
void | setDecimalPrecision (int) |
Set/Get the decimal precision for float and double type data. More... | |
int | getDecimalPrecision () |
void | setActiveRegion (int row_top, int row_bottom) |
set the region (in row indices) that is currently being shown in the view. More... | |
pqDataRepresentation * | activeRepresentation () const |
Returns the active representation. More... | |
vtkSMProxy * | activeRepresentationProxy () const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
Method needed for copy/past cell editor. More... | |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
Protected Member Functions | |
bool | isDataValid (const QModelIndex &idx) const |
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. More... | |
vtkSpreadSheetView * | GetView () const |
Definition at line 56 of file pqSpreadSheetViewModel.h.
pqSpreadSheetViewModel::pqSpreadSheetViewModel | ( | vtkSMProxy * | viewProxy, |
QObject * | parent = NULL |
||
) |
pqSpreadSheetViewModel::~pqSpreadSheetViewModel | ( | ) |
int pqSpreadSheetViewModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Returns the number of rows.
int pqSpreadSheetViewModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Returns the number of columns.
QVariant pqSpreadSheetViewModel::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const |
Returns the data storeed under the given role for the item referred by the index.
QVariant pqSpreadSheetViewModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const |
Returns the data for the given role and section in the header with the specified orientation.
void pqSpreadSheetViewModel::sortSection | ( | int | section, |
Qt::SortOrder | order | ||
) |
Make a server request to sort based on a given column with a given order.
bool pqSpreadSheetViewModel::isSortable | ( | int | section | ) |
Return true only if the given column is sortable.
bool pqSpreadSheetViewModel::isVisible | ( | int | section | ) |
Return true only if the given column is visible.
void pqSpreadSheetViewModel::setVisible | ( | int | section, |
bool | visible | ||
) |
Set the visibility of a given column.
void pqSpreadSheetViewModel::clearVisible | ( | ) |
Clear visibility list, all column considered visible.
int pqSpreadSheetViewModel::getFieldType | ( | ) | const |
Returns the field type for the data currently shown by this model.
QSet<vtkIndex> pqSpreadSheetViewModel::getVTKIndices | ( | const QModelIndexList & | indexes | ) |
void pqSpreadSheetViewModel::resetCompositeDataSetIndex | ( | ) |
Resets the composite dataset index on the representation to point to the first non-empty block.
void pqSpreadSheetViewModel::setDecimalPrecision | ( | int | ) |
Set/Get the decimal precision for float and double type data.
int pqSpreadSheetViewModel::getDecimalPrecision | ( | ) |
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).
pqDataRepresentation* pqSpreadSheetViewModel::activeRepresentation | ( | ) | const |
Returns the active representation.
Active representation is the representation being shown by the view.
vtkSMProxy* pqSpreadSheetViewModel::activeRepresentationProxy | ( | ) | const |
|
virtual |
Method needed for copy/past cell editor.
|
virtual |
|
slot |
resets the model.
|
slot |
Sets the active representation.
Active representation is the representation being shown by the view.
|
slot |
Sets the active representation.
When using this API instead of setActiveRepresentation(pqDataRepresentation*), some functionality won't be available.
|
signal |
Fired whenever the server side selection changes.
|
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.
|
protected |