#include <SalomeApp_NoteBook.h>
Public Slots | |
void | onItemChanged (QTableWidgetItem *theItem) |
Public Member Functions | |
NoteBook_Table (QWidget *parent=0) | |
virtual | ~NoteBook_Table () |
void | Init (_PTR(Study) theStudy) |
bool | IsValid () const |
void | AddRow (const QString &theName=QString::null, const QString &theValue=QString::null) |
void | AddEmptyRow () |
NoteBook_TableRow * | GetRowByItem (const QTableWidgetItem *theItem) const |
bool | IsLastRow (const NoteBook_TableRow *aRow) const |
void | RemoveSelected () |
void | SetProcessItemChangedSignalFlag (const bool enable) |
bool | GetProcessItemChangedSignalFlag () const |
bool | IsUniqueName (const NoteBook_TableRow *theRow) const |
QList< NoteBook_TableRow * > | GetRows () const |
const bool | IsModified () const |
const QList< int > & | GetRemovedRows () const |
const VariableMap & | GetVariableMap () const |
const VariableMap & | GetVariableMapRef () const |
void | RenumberRowItems () |
void | ResetMaps () |
Static Public Member Functions | |
static QString | Variable2String (const std::string &theVarName, _PTR(Study) theStudy) |
Public Attributes | |
QList< NoteBook_TableRow * > | myRows |
Private Member Functions | |
int | getUniqueIndex () const |
_PTR (Study) myStudy | |
Private Attributes | |
bool | isProcessItemChangedSignal |
bool | myIsModified |
QList< int > | myRemovedRows |
VariableMap | myVariableMapRef |
VariableMap | myVariableMap |
NoteBook_Table::NoteBook_Table | ( | QWidget * | parent = 0 | ) |
Function : NoteBook_Table Purpose : Constructor
References COLUMN_SIZE, and onItemChanged().
|
virtual |
Function : ~NoteBook_Table Purpose : Destructor
|
private |
void NoteBook_Table::AddEmptyRow | ( | ) |
Function : AddEmptyRow Purpose : Add an empty row into the end of the table
References AddRow(), and isProcessItemChangedSignal.
void NoteBook_Table::AddRow | ( | const QString & | theName = QString::null , |
const QString & | theValue = QString::null |
||
) |
Function : AddRow Purpose : Add a row into the table
References NoteBook_TableRow::AddToTable(), getUniqueIndex(), myRows, myVariableMap, NoteBook_TableRow::SetName(), and NoteBook_TableRow::SetValue().
bool NoteBook_Table::GetProcessItemChangedSignalFlag | ( | ) | const |
Function : GetProcessItemChangedSignalFlag Purpose :
References isProcessItemChangedSignal.
NoteBook_TableRow * NoteBook_Table::GetRowByItem | ( | const QTableWidgetItem * | theItem | ) | const |
Function : GetRowByItem Purpose :
References myRows.
QList< NoteBook_TableRow * > NoteBook_Table::GetRows | ( | ) | const |
Function : GetRows Purpose :
References myRows.
|
private |
Function : getUniqueIndex Purpose : Get a unique index for the new row
References myRemovedRows, and myRows.
|
inline |
|
inline |
void NoteBook_Table::Init | ( | _PTR(Study) | theStudy | ) |
Function : Init Purpose : Add variables in the table from theStudy
References AddEmptyRow(), AddRow(), isProcessItemChangedSignal, myRemovedRows, myRows, myVariableMap, myVariableMapRef, ResetMaps(), and Variable2String().
bool NoteBook_Table::IsLastRow | ( | const NoteBook_TableRow * | theRow | ) | const |
Function : IsLastRow Purpose : Return true if theRow is last row in the table
References myRows.
|
inline |
bool NoteBook_Table::IsUniqueName | ( | const NoteBook_TableRow * | theRow | ) | const |
Function : IsUniqueName Purpose : Return true if theName is unique name of the Variable
References GetName(), NoteBook_TableRow::GetName(), and myRows.
bool NoteBook_Table::IsValid | ( | ) | const |
Function : IsValid Purpose : Check validity of the table data
References SUIT_Session::activeApplication(), app, LightApp_Application::getPyInterp(), IsUniqueName(), myRows, LightApp_Application::pythonConsole(), and SUIT_Session::session().
|
slot |
Function : onItemChanged Purpose : [slot] called when table item changed
References AddEmptyRow(), NoteBook_TableRow::CheckName(), NoteBook_TableRow::CheckValue(), NoteBook_TableRow::GetIndex(), NoteBook_TableRow::GetName(), GetRowByItem(), NoteBook_TableRow::GetValue(), IsLastRow(), isProcessItemChangedSignal, IsUniqueName(), myIsModified, myVariableMap, NoteBoox_Variable::Name, NAME_COLUMN, NoteBook_TableRow::SetName(), NoteBoox_Variable::Value, VALUE_COLUMN, and SUIT_MessageBox::warning().
void NoteBook_Table::RemoveSelected | ( | ) |
Function : RemoveSelected Purpose : Remove selected rows in the table
References NoteBook_TableRow::GetIndex(), NoteBook_TableRow::GetName(), GetRowByItem(), IsLastRow(), isProcessItemChangedSignal, myIsModified, myRemovedRows, myRows, myVariableMap, RenumberRowItems(), NoteBook_TableRow::SetName(), and NoteBook_TableRow::SetValue().
void NoteBook_Table::RenumberRowItems | ( | ) |
Function : RenumberRowItems Purpose : renumber row items
References myRows.
void NoteBook_Table::ResetMaps | ( | ) |
Function : ResetMaps Purpose : Reset variable maps
References myIsModified, myRemovedRows, myVariableMap, and myVariableMapRef.
void NoteBook_Table::SetProcessItemChangedSignalFlag | ( | const bool | enable | ) |
Function : SetProcessItemChangedSignalFlag Purpose :
References isProcessItemChangedSignal.
|
static |
Function : Variable2String Purpose : Convert variable values to QString
|
private |
|
private |
|
private |
QList<NoteBook_TableRow*> NoteBook_Table::myRows |
|
private |
|
private |