SMESHGUI_tableParameter Class Reference

This class represents parameter which can have two-dimensional array of values.

#include <SMESHGUI_aParameter.h>

Inheritance diagram for SMESHGUI_tableParameter:

Inheritance graph

Public Types

typedef bool(* VALIDATION_FUNC )(SMESHGUI_aParameter *)
enum  Type {
  INT, DOUBLE, STRING, ENUM,
  BOOL, TABLE
}

Public Member Functions

 SMESHGUI_tableParameter (const double init=0.0, const QString &label=QString::null, const bool preview=false)
 Creates table parameter with default value 'init' and title 'label'. The default value means that by default the table is filled with default value and if new column or row is added then it is filled with default value.
virtual ~SMESHGUI_tableParameter ()
virtual Type GetType () const
virtual bool GetNewInt (int &) const
virtual bool GetNewDouble (double &) const
virtual bool GetNewText (QString &) const
virtual QWidget * CreateWidget (QWidget *) const
virtual void InitializeWidget (QWidget *) const
virtual void TakeValue (QWidget *)
void update (QWidget *) const
 Updates look of widget in accordance with all parameters of this object.
void data (SMESH::double_array &) const
 Returns data taken from widget. Please don't forget to call TakeValue before.
void setData (const SMESH::double_array &)
 Sets data. The InitializeWidget must be called in order to change values in widget.
void setColCount (const int, QWidget *=0)
 Sets count of columns and updates widget.
void setRowCount (const int, QWidget *=0)
 Sets count of rows and updates widget.
void setColCount (const SMESHGUI_aParameterPtr, QWidget *=0)
 Binds count of columns to some parameter and updates widget. Take into account that if this parameter is changed, the update() must be called to resize table.
void setRowCount (const SMESHGUI_aParameterPtr, QWidget *=0)
 Binds count of rows to some parameter and updates widget. Take into account that if this parameter is changed, the update() must be called to resize table.
void setEditCols (const bool)
 Enables or disables to change count of columns by buttons.
void setEditRows (const bool)
 Enables or disables to change count of rows by buttons.
virtual QString sigValueChanged () const
 Returns string representation of signal emitted when value in corrsponding widget is changed.
void setValidator (const int col, const double, const double, const int)
void validator (const int col, double &, double &, int &) const
void setColName (const int, const QString &)
 These methods allow to read and change name of column.
QString colName (const int) const
bool needPreview () const
QString & Label ()

Static Public Member Functions

static void sortData (SMESH::double_array &)

Protected Attributes

QString _label
bool _needPreview

Private Types

typedef QMap< int, ValidatorInfoValidatorsMap

Private Slots

void onEdit (SMESHGUI_TableFrame::Button, int)
void onEdit (SMESHGUI_Table *, SMESHGUI_TableFrame::Button, int)

Private Member Functions

void setItems (QWidget *, int=-1, int=-1, int=-1, int=-1) const

Private Attributes

int myColsInt
int myRowsInt
SMESHGUI_aParameterPtr myCols
SMESHGUI_aParameterPtr myRows
double myInitValue
SMESH::double_array myData
ValidatorsMap myValidators
bool myEditCols
bool myEditRows
QMap< int, QString > myColNames

Friends

class SMESHGUI_Table

Data Structures

struct  ValidatorInfo

Member Typedef Documentation

typedef QMap<int, ValidatorInfo> SMESHGUI_tableParameter.ValidatorsMap [private]
 

typedef bool(* SMESHGUI_aParameter.VALIDATION_FUNC)(SMESHGUI_aParameter *) [inherited]
 


Member Enumeration Documentation

enum SMESHGUI_aParameter::Type [inherited]
 

Enumerator:
INT 
DOUBLE 
STRING 
ENUM 
BOOL 
TABLE 


Constructor & Destructor Documentation

SMESHGUI_tableParameter.SMESHGUI_tableParameter const double  init = 0.0,
const QString &  label = QString::null,
const bool  preview = false
 

virtual SMESHGUI_tableParameter.~SMESHGUI_tableParameter  )  [virtual]
 


Member Function Documentation

virtual Type SMESHGUI_tableParameter.GetType  )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual bool SMESHGUI_tableParameter.GetNewInt int  )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual bool SMESHGUI_tableParameter.GetNewDouble double &   )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual bool SMESHGUI_tableParameter.GetNewText QString &   )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual QWidget* SMESHGUI_tableParameter.CreateWidget QWidget *   )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual void SMESHGUI_tableParameter.InitializeWidget QWidget *   )  const [virtual]
 

Implements SMESHGUI_aParameter.

virtual void SMESHGUI_tableParameter.TakeValue QWidget *   )  [virtual]
 

Implements SMESHGUI_aParameter.

static void SMESHGUI_tableParameter.sortData SMESH::double_array  )  [static]
 

void SMESHGUI_tableParameter.update QWidget *   )  const
 

void SMESHGUI_tableParameter.data SMESH::double_array  )  const
 

void SMESHGUI_tableParameter.setData const SMESH::double_array  ) 
 

void SMESHGUI_tableParameter.setColCount const   int,
QWidget *  = 0
 

void SMESHGUI_tableParameter.setRowCount const   int,
QWidget *  = 0
 

void SMESHGUI_tableParameter.setColCount const   SMESHGUI_aParameterPtr,
QWidget *  = 0
 

void SMESHGUI_tableParameter.setRowCount const   SMESHGUI_aParameterPtr,
QWidget *  = 0
 

void SMESHGUI_tableParameter.setEditCols const   bool  ) 
 

void SMESHGUI_tableParameter.setEditRows const   bool  ) 
 

virtual QString SMESHGUI_tableParameter.sigValueChanged  )  const [virtual]
 

Reimplemented from SMESHGUI_aParameter.

void SMESHGUI_tableParameter.setValidator const int  col,
const   double,
const   double,
const   int
 

void SMESHGUI_tableParameter.validator const int  col,
double &  ,
double &  ,
int
const
 

void SMESHGUI_tableParameter.setColName const   int,
const QString & 
 

QString SMESHGUI_tableParameter.colName const   int  )  const
 

void SMESHGUI_tableParameter.onEdit SMESHGUI_TableFrame::Button  ,
int 
[private, slot]
 

void SMESHGUI_tableParameter.onEdit SMESHGUI_Table ,
SMESHGUI_TableFrame::Button  ,
int 
[private, slot]
 

void SMESHGUI_tableParameter.setItems QWidget *  ,
int  = -1,
int  = -1,
int  = -1,
int  = -1
const [private]
 

bool SMESHGUI_aParameter.needPreview  )  const [inherited]
 

QString& SMESHGUI_aParameter.Label  )  [inherited]
 


Friends And Related Function Documentation

friend class SMESHGUI_Table [friend]
 


Field Documentation

int SMESHGUI_tableParameter.myColsInt [private]
 

int SMESHGUI_tableParameter.myRowsInt [private]
 

SMESHGUI_aParameterPtr SMESHGUI_tableParameter.myCols [private]
 

SMESHGUI_aParameterPtr SMESHGUI_tableParameter.myRows [private]
 

double SMESHGUI_tableParameter.myInitValue [private]
 

SMESH::double_array SMESHGUI_tableParameter.myData [private]
 

ValidatorsMap SMESHGUI_tableParameter.myValidators [private]
 

bool SMESHGUI_tableParameter.myEditCols [private]
 

bool SMESHGUI_tableParameter.myEditRows [private]
 

QMap< int, QString > SMESHGUI_tableParameter.myColNames [private]
 

QString SMESHGUI_aParameter._label [protected, inherited]
 

bool SMESHGUI_aParameter._needPreview [protected, inherited]