Version: 8.3.0
VectBoolModel Class Reference

#include <VectBoolSpreadSheet.h>

Inheritance diagram for VectBoolModel:
Inheritance graph

Signals

void nbOfTimeStepsOnChanged (int newNbOfTimeStepsOn, int totalNbOfTS)
 

Public Member Functions

 VectBoolModel (int maxSize, int nbRows)
 
std::size_t getSize () const
 
bool getStatusAt (int pos) const
 
void setStatusAt (int pos, bool val)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
QVariant data (const QModelIndex &index, int role) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
bool setCurrentItems (const QStringList &dts, const QStringList &its, const QStringList &tts)
 
int getNbOfActivatedTimeSteps () const
 
void setNumberOfRows (int newNbOfRows)
 
void selectUnselectAll ()
 

Private Member Functions

void setCurSize (int sz)
 
int curSize () const
 

Private Attributes

std::vector< bool > _activated
 
QStringList _dts
 
QStringList _its
 
QStringList _tts
 
int _cur_size
 
int _nb_rows
 

Constructor & Destructor Documentation

VectBoolModel::VectBoolModel ( int  maxSize,
int  nbRows 
)

References setCurSize().

Member Function Documentation

std::size_t VectBoolModel::getSize ( ) const

References _activated.

bool VectBoolModel::getStatusAt ( int  pos) const

References _activated.

void VectBoolModel::setStatusAt ( int  pos,
bool  val 
)

References _activated.

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

References _nb_rows.

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

References _nb_rows, and curSize().

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

References _activated, _dts, _its, _nb_rows, _tts, and curSize().

QVariant VectBoolModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
bool VectBoolModel::setCurrentItems ( const QStringList &  dts,
const QStringList &  its,
const QStringList &  tts 
)

References _dts, _its, _tts, and curSize().

int VectBoolModel::getNbOfActivatedTimeSteps ( ) const

References _activated, and curSize().

void VectBoolModel::setNumberOfRows ( int  newNbOfRows)

References _nb_rows.

void VectBoolModel::selectUnselectAll ( )
void VectBoolModel::nbOfTimeStepsOnChanged ( int  newNbOfTimeStepsOn,
int  totalNbOfTS 
)
signal
void VectBoolModel::setCurSize ( int  sz)
private

References _dts, _its, and _tts.

int VectBoolModel::curSize ( ) const
private

References _dts.

Field Documentation

std::vector<bool> VectBoolModel::_activated
private
QStringList VectBoolModel::_dts
private
QStringList VectBoolModel::_its
private
QStringList VectBoolModel::_tts
private
int VectBoolModel::_cur_size
private
int VectBoolModel::_nb_rows
private