ParaView
Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
pqSpreadSheetViewModel Class Reference

#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< vtkIndexgetVTKIndices (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...
 
pqDataRepresentationactiveRepresentation () const
 Returns the active representation. More...
 
vtkSMProxyactiveRepresentationProxy () 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...
 
vtkSpreadSheetViewGetView () const
 

Detailed Description

Definition at line 56 of file pqSpreadSheetViewModel.h.

Constructor & Destructor Documentation

◆ pqSpreadSheetViewModel()

pqSpreadSheetViewModel::pqSpreadSheetViewModel ( vtkSMProxy viewProxy,
QObject *  parent = NULL 
)

◆ ~pqSpreadSheetViewModel()

pqSpreadSheetViewModel::~pqSpreadSheetViewModel ( )

Member Function Documentation

◆ rowCount()

int pqSpreadSheetViewModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of rows.

◆ columnCount()

int pqSpreadSheetViewModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of columns.

◆ data()

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.

◆ headerData()

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.

◆ 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.

◆ isVisible()

bool pqSpreadSheetViewModel::isVisible ( int  section)

Return true only if the given column is visible.

◆ setVisible()

void pqSpreadSheetViewModel::setVisible ( int  section,
bool  visible 
)

Set the visibility of a given column.

◆ clearVisible()

void pqSpreadSheetViewModel::clearVisible ( )

Clear visibility list, all column considered visible.

◆ 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)

◆ resetCompositeDataSetIndex()

void pqSpreadSheetViewModel::resetCompositeDataSetIndex ( )

Resets the composite dataset index on the representation to point to the first non-empty block.

◆ setDecimalPrecision()

void pqSpreadSheetViewModel::setDecimalPrecision ( int  )

Set/Get the decimal precision for float and double type data.

◆ getDecimalPrecision()

int pqSpreadSheetViewModel::getDecimalPrecision ( )

◆ 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()

pqDataRepresentation* pqSpreadSheetViewModel::activeRepresentation ( ) const

Returns the active representation.

Active representation is the representation being shown by the view.

◆ activeRepresentationProxy()

vtkSMProxy* pqSpreadSheetViewModel::activeRepresentationProxy ( ) const

◆ flags()

virtual Qt::ItemFlags pqSpreadSheetViewModel::flags ( const QModelIndex &  index) const
virtual

Method needed for copy/past cell editor.

◆ setData()

virtual bool pqSpreadSheetViewModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

◆ forceUpdate

void pqSpreadSheetViewModel::forceUpdate ( )
slot

resets the model.

◆ setActiveRepresentation

void pqSpreadSheetViewModel::setActiveRepresentation ( pqDataRepresentation )
slot

Sets the active representation.

Active representation is the representation being shown by the view.

◆ setActiveRepresentationProxy

void pqSpreadSheetViewModel::setActiveRepresentationProxy ( vtkSMProxy )
slot

Sets the active representation.

When using this API instead of setActiveRepresentation(pqDataRepresentation*), some functionality won't be available.

◆ 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()

vtkSpreadSheetView* pqSpreadSheetViewModel::GetView ( ) const
protected

The documentation for this class was generated from the following file: