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

#include <CProgressBar.h>

Inheritance diagram for CProgressBar:
CQProgressDialog CProcessReport

List of all members.

Signals

void signalAddItem (const unsigned int handle)
void signalSetName (QString name)
void signalProgressAll ()
void signalFinishItem (const unsigned int handle)

Public Member Functions

 CProgressBar (QWidget *parent=0, const char *name=0, bool modal=false, Qt::WFlags fl=0)
virtual ~CProgressBar ()
virtual unsigned C_INT32 addItem (const std::string &name, const CCopasiParameter::Type &type, const void *pValue, const void *pEndValue=NULL)
virtual bool progressItem (const unsigned C_INT32 &handle)
virtual bool proceed ()
virtual bool resetItem (const unsigned C_INT32 &handle)
virtual bool finish ()
virtual bool finishItem (const unsigned C_INT32 &handle)
virtual bool setName (const std::string &name)

Protected Slots

virtual void slotAddItem (const unsigned int handle)
virtual void slotSetName (QString name)
virtual void slotProgressAll ()
virtual void slotFinishItem (const unsigned int handle)
virtual void btnStopPressed ()
virtual void btnContinuePressed ()

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)

Protected Attributes

bool mSlotFinished
QMutex mMutex
QWaitCondition mWaitSlot
QWaitCondition mWaitPause
unsigned C_INT32 mLastHItem

Detailed Description

This is used to call the progress bar code We do not want to call GUI stuff directly from the CModel.


Constructor & Destructor Documentation

CProgressBar::CProgressBar ( QWidget *  parent = 0,
const char *  name = 0,
bool  modal = false,
Qt::WFlags  fl = 0 
)
CProgressBar::~CProgressBar ( ) [virtual]

Member Function Documentation

unsigned C_INT32 CProgressBar::addItem ( const std::string &  name,
const CCopasiParameter::Type type,
const void *  pValue,
const void *  pEndValue = NULL 
) [virtual]

Add a process report item to to the list of reporting items. The return value is the handle of the item and can be used to indicate process, finish, or reset the item. If the method fails C_INVALID_INDEX is returned.

Parameters:
conststd::string & name
constCCopasiParameter::Type & type
constvoid * pValue
constvoid * pEndValue = NULL
Returns:
unsigned C_INT32 handle

Reimplemented from CProcessReport.

void CProgressBar::btnContinuePressed ( ) [protected, virtual, slot]

Reimplemented from CQProgressDialog.

void CProgressBar::btnStopPressed ( ) [protected, virtual, slot]

Reimplemented from CQProgressDialog.

void CProgressBar::closeEvent ( QCloseEvent *  e) [protected, virtual]
bool CProgressBar::finish ( ) [virtual]

Indicate that all items are finished reporting. All item handles loose their validity. If the return value is false the calling process must halt execution and return.

Parameters:
boolcontinue

Reimplemented from CProcessReport.

bool CProgressBar::finishItem ( const unsigned C_INT32 &  handle) [virtual]

Indicate that item handle is finished reporting. The handle of that item is no longer valid after the call. If the return value is false the calling process must halt execution and return.

Parameters:
constunsigned C_INT32 & handle
boolcontinue

Reimplemented from CProcessReport.

bool CProgressBar::proceed ( ) [virtual]

Check whether processing shall proceed. If the return value is false the calling process must halt execution and return. This method is provided so that lengthy processing without advances in any of the reporting items can check whether continuation is requested.

Parameters:
boolcontinue

Reimplemented from CProcessReport.

bool CProgressBar::progressItem ( const unsigned C_INT32 &  handle) [virtual]

Report process on item handle. If the return value is false the calling process must halt execution and return.

Parameters:
constunsigned C_INT32 & handle
boolcontinue

Reimplemented from CProcessReport.

bool CProgressBar::resetItem ( const unsigned C_INT32 &  handle) [virtual]

Reset item handle. This means that the value of the item has changed but not as part of a continuous process. If you run multiple processes call reset between them. If the return value is false the calling process must halt execution and return.

Parameters:
constunsigned C_INT32 & handle
boolcontinue

Reimplemented from CProcessReport.

bool CProgressBar::setName ( const std::string &  name) [virtual]

Set the name of the process.

Parameters:
conststd::string & name
Returns:
success

Reimplemented from CProcessReport.

void CProgressBar::signalAddItem ( const unsigned int  handle) [signal]
void CProgressBar::signalFinishItem ( const unsigned int  handle) [signal]
void CProgressBar::signalProgressAll ( ) [signal]
void CProgressBar::signalSetName ( QString  name) [signal]
void CProgressBar::slotAddItem ( const unsigned int  handle) [protected, virtual, slot]
void CProgressBar::slotFinishItem ( const unsigned int  handle) [protected, virtual, slot]
void CProgressBar::slotProgressAll ( ) [protected, virtual, slot]
void CProgressBar::slotSetName ( QString  name) [protected, virtual, slot]

Member Data Documentation

unsigned C_INT32 CProgressBar::mLastHItem [protected]
QMutex CProgressBar::mMutex [protected]
bool CProgressBar::mSlotFinished [protected]
QWaitCondition CProgressBar::mWaitPause [protected]
QWaitCondition CProgressBar::mWaitSlot [protected]

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