ParaView
Public Member Functions
pqScalarSetModel Class Reference

Qt model that stores a sorted collection of unique floating-point numbers. More...

#include <pqScalarSetModel.h>

List of all members.

Public Member Functions

 pqScalarSetModel ()
 ~pqScalarSetModel ()
void clear ()
 Clears the model contents.
QModelIndex insert (double value)
 Inserts a floating-point number into the model.
void erase (double value)
 Erases a floating-point number from the model.
void erase (int row)
 Erases a zero-based row from the model.
const QList< doublevalues ()
 Returns the sorted collection of numbers stored in the model.
void setFormat (char f, int precision=3)
 Controls formatting of displayed data, supports the 'e', 'E', 'f', 'F', 'g', and 'G' formats provided by printf()
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
void setPreserveOrder (bool)
 Get/Set if the order in which the values are inserted must be preserved.
bool preserveOrder () const

Detailed Description

Qt model that stores a sorted collection of unique floating-point numbers.

Definition at line 41 of file pqScalarSetModel.h.


Constructor & Destructor Documentation

pqScalarSetModel::pqScalarSetModel ( )
pqScalarSetModel::~pqScalarSetModel ( )

Member Function Documentation

void pqScalarSetModel::clear ( )

Clears the model contents.

QModelIndex pqScalarSetModel::insert ( double  value)

Inserts a floating-point number into the model.

void pqScalarSetModel::erase ( double  value)

Erases a floating-point number from the model.

void pqScalarSetModel::erase ( int  row)

Erases a zero-based row from the model.

const QList<double> pqScalarSetModel::values ( )

Returns the sorted collection of numbers stored in the model.

void pqScalarSetModel::setFormat ( char  f,
int  precision = 3 
)

Controls formatting of displayed data, supports the 'e', 'E', 'f', 'F', 'g', and 'G' formats provided by printf()

virtual QVariant pqScalarSetModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [virtual]
virtual Qt::ItemFlags pqScalarSetModel::flags ( const QModelIndex &  index) const [virtual]
virtual int pqScalarSetModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]
virtual bool pqScalarSetModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
) [virtual]
void pqScalarSetModel::setPreserveOrder ( bool  )

Get/Set if the order in which the values are inserted must be preserved.

Off by default i.e. values will be sorted. If set after inserting a few values, the order of values inserted until the flag was set is lost.

bool pqScalarSetModel::preserveOrder ( ) const

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