copasi API  0.1
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
CopasiTableWidget Class Reference

#include <CopasiTableWidget.h>

Inheritance diagram for CopasiTableWidget:
CopasiWidget CQLayoutsWidget

List of all members.

Public Slots

virtual void slotBtnOKClicked ()
virtual void slotBtnCancelClicked ()
virtual void slotBtnDeleteClicked ()
virtual void slotBtnNewClicked ()
virtual void slotBtnClearClicked ()
virtual void slotDoubleClicked (int, int, int, const QPoint &)
virtual void slotValueChanged (int, int)

Signals

void setEnableOKAndCancel (bool e)
void delKeyPressed ()

Public Member Functions

 CopasiTableWidget (QWidget *parent, bool ro, const char *name=0, Qt::WFlags f=0, bool showButtons=true)
virtual bool update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
virtual bool leave ()
bool isTableInFocus ()
bool isChanged ()
virtual void saveTable ()
virtual QSize sizeHint () const

Protected Slots

virtual void slotTableSelectionChanged ()
virtual void slotCurrentChanged (int, int)
virtual void slotTableDelKey ()

Protected Member Functions

virtual bool enterProtected ()
void fillTable ()
void updateRow (const C_INT32 row)
void handleSBMLId (const CCopasiObject *obj, unsigned C_INT32 row)
QString createNewName (const QString name)
void resizeTable (const unsigned C_INT32 numRows)
bool isTableChanged ()
virtual void init ()=0
virtual void updateHeaderUnits ()
virtual std::vector< const
CCopasiObject * > 
getObjects () const =0
virtual void tableLineFromObject (const CCopasiObject *obj, unsigned C_INT32 row)=0
virtual void tableLineToObject (unsigned C_INT32 row, CCopasiObject *obj)=0
virtual CCopasiObjectcreateNewObject (const std::string &name)=0
virtual void deleteObjects (const std::vector< std::string > &keys)=0
virtual void defaultTableLineContent (unsigned C_INT32 row, unsigned C_INT32 exc)=0
virtual QString defaultObjectName () const =0
virtual void valueChanged (unsigned C_INT32, unsigned C_INT32)
virtual void keyPressEvent (QKeyEvent *e)

Protected Attributes

Q3Table * table
QPushButton * btnOK
QPushButton * btnCancel
QPushButton * btnDelete
QPushButton * btnNew
QPushButton * btnClear
std::vector< std::string > mKeys
C_INT32 numCols
std::vector< bool > mFlagChanged
std::vector< bool > mFlagDelete
std::vector< bool > mFlagNew
std::vector< bool > mFlagRenamed
std::vector< bool > mFlagRO
bool mChanged
bool mRO
bool mShowButtons
ListViews::ObjectType mOT
bool flagtoAdjust
bool mShowNewObjectWarning
bool mSaveOnLeave

Constructor & Destructor Documentation

CopasiTableWidget::CopasiTableWidget ( QWidget *  parent,
bool  ro,
const char *  name = 0,
Qt::WFlags  f = 0,
bool  showButtons = true 
)

The connect with slotTableDelKey has been replaced by the scheme where CopasiTableWidget catches delKeyEvent itself (overriding keyPressEvent). This, along with removal of MyTable, is being done because CopasiTableWidget was the class which connected a slot to delKeyEvent


Member Function Documentation

QString CopasiTableWidget::createNewName ( const QString  name) [protected]
virtual CCopasiObject* CopasiTableWidget::createNewObject ( const std::string &  name) [protected, pure virtual]

creates a new object

Implemented in CQLayoutsWidget.

virtual QString CopasiTableWidget::defaultObjectName ( ) const [protected, pure virtual]

the prefix that is used to construct new object names

Implemented in CQLayoutsWidget.

virtual void CopasiTableWidget::defaultTableLineContent ( unsigned C_INT32  row,
unsigned C_INT32  exc 
) [protected, pure virtual]

this is used to fill a row of the table when a new object is added to the table. it fills only the data columns, not the name. It should not fill column exc.

Implemented in CQLayoutsWidget.

virtual void CopasiTableWidget::deleteObjects ( const std::vector< std::string > &  keys) [protected, pure virtual]

deletes objects. Performs all additional tasks, like asking the user, ...

Implemented in CQLayoutsWidget.

void CopasiTableWidget::delKeyPressed ( ) [signal]
bool CopasiTableWidget::enterProtected ( ) [protected, virtual]

Reimplemented from CopasiWidget.

void CopasiTableWidget::fillTable ( ) [protected]
virtual std::vector<const CCopasiObject*> CopasiTableWidget::getObjects ( ) const [protected, pure virtual]

returns a list of objects that should be displayed

Implemented in CQLayoutsWidget.

void CopasiTableWidget::handleSBMLId ( const CCopasiObject obj,
unsigned C_INT32  row 
) [protected]
virtual void CopasiTableWidget::init ( ) [protected, pure virtual]

This initializes the widget

Implemented in CQLayoutsWidget.

bool CopasiTableWidget::isChanged ( )
bool CopasiTableWidget::isTableChanged ( ) [protected]
bool CopasiTableWidget::isTableInFocus ( )
void CopasiTableWidget::keyPressEvent ( QKeyEvent *  e) [protected, virtual]

to catch the delKeyEvent

bool CopasiTableWidget::leave ( ) [virtual]

Reimplemented from CopasiWidget.

void CopasiTableWidget::resizeTable ( const unsigned C_INT32  numRows) [protected]
void CopasiTableWidget::saveTable ( ) [virtual]
void CopasiTableWidget::setEnableOKAndCancel ( bool  e) [signal]
QSize CopasiTableWidget::sizeHint ( ) const [virtual]
void CopasiTableWidget::slotBtnCancelClicked ( ) [virtual, slot]
void CopasiTableWidget::slotBtnClearClicked ( ) [virtual, slot]
void CopasiTableWidget::slotBtnDeleteClicked ( ) [virtual, slot]
void CopasiTableWidget::slotBtnNewClicked ( ) [virtual, slot]
void CopasiTableWidget::slotBtnOKClicked ( ) [virtual, slot]
void CopasiTableWidget::slotCurrentChanged ( int   ,
int   
) [protected, virtual, slot]
virtual void CopasiTableWidget::slotDoubleClicked ( int  ,
int  ,
int  ,
const QPoint &   
) [virtual, slot]

Reimplemented in CQLayoutsWidget.

void CopasiTableWidget::slotTableDelKey ( ) [protected, virtual, slot]
void CopasiTableWidget::slotTableSelectionChanged ( ) [protected, virtual, slot]
void CopasiTableWidget::slotValueChanged ( int  row,
int  col 
) [virtual, slot]
virtual void CopasiTableWidget::tableLineFromObject ( const CCopasiObject obj,
unsigned C_INT32  row 
) [protected, pure virtual]

fills one table row with the data from one object

Implemented in CQLayoutsWidget.

virtual void CopasiTableWidget::tableLineToObject ( unsigned C_INT32  row,
CCopasiObject obj 
) [protected, pure virtual]

reads the contents of one row of the table and writes it to the object

Implemented in CQLayoutsWidget.

virtual bool CopasiTableWidget::update ( ListViews::ObjectType  objectType,
ListViews::Action  action,
const std::string &  key 
) [virtual]

Reimplemented from CopasiWidget.

void CopasiTableWidget::updateHeaderUnits ( ) [protected, virtual]

Update the units in column headers

Reimplemented in CQLayoutsWidget.

void CopasiTableWidget::updateRow ( const C_INT32  row) [protected]
virtual void CopasiTableWidget::valueChanged ( unsigned C_INT32  ,
unsigned C_INT32   
) [inline, protected, virtual]

This method provides a hook for derived classes to act on changes in the table.

Parameters:
unsignedC_INT32 row
unsignedC_INT32 col

Reimplemented in CQLayoutsWidget.


Member Data Documentation

QPushButton* CopasiTableWidget::btnCancel [protected]
QPushButton* CopasiTableWidget::btnClear [protected]
QPushButton* CopasiTableWidget::btnDelete [protected]
QPushButton* CopasiTableWidget::btnNew [protected]
QPushButton* CopasiTableWidget::btnOK [protected]

The flag to be set if columns in the table need to be justified

bool CopasiTableWidget::mChanged [protected]
std::vector<bool> CopasiTableWidget::mFlagChanged [protected]
std::vector<bool> CopasiTableWidget::mFlagDelete [protected]
std::vector<bool> CopasiTableWidget::mFlagNew [protected]
std::vector<bool> CopasiTableWidget::mFlagRenamed [protected]
std::vector<bool> CopasiTableWidget::mFlagRO [protected]
std::vector<std::string> CopasiTableWidget::mKeys [protected]
bool CopasiTableWidget::mRO [protected]
C_INT32 CopasiTableWidget::numCols [protected]
Q3Table* CopasiTableWidget::table [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines