COPASI API
4.16.103
|
#include <CProgressBar.h>
Signals | |
void | signalAddItem (const int handle) |
void | signalFinishItem (const int handle) |
void | signalProgressAll () |
void | signalSetName (QString name) |
Public Member Functions | |
virtual bool | finish () |
virtual bool | finishItem (const size_t &handle) |
virtual bool | proceed () |
virtual bool | progressItem (const size_t &handle) |
virtual bool | resetItem (const size_t &handle) |
virtual bool | setName (const std::string &name) |
virtual | ~CProgressBar () |
![]() | |
CQProgressDialog (QWidget *parent=0, const char *name=0, Qt::WindowModality windowModality=Qt::WindowModal, Qt::WindowFlags fl=0) | |
bool | insertProgressItem (CQProgressItem *pItem) |
bool | removeProgressItem (CQProgressItem *pItem) |
~CQProgressDialog () | |
![]() | |
size_t | addItem (const std::string &name, const std::string &value, const std::string *pEndValue=NULL) |
size_t | addItem (const std::string &name, const C_INT32 &value, const C_INT32 *pEndValue=NULL) |
size_t | addItem (const std::string &name, const unsigned C_INT32 &value, const unsigned C_INT32 *pEndValue=NULL) |
size_t | addItem (const std::string &name, const C_FLOAT64 &value, const C_FLOAT64 *pEndValue=NULL) |
CProcessReport (const unsigned int &maxTime=0) | |
virtual bool | isValidHandle (const size_t handle) const |
virtual bool | progress () |
virtual bool | reset () |
virtual | ~CProcessReport () |
Static Public Member Functions | |
static CProgressBar * | create (QWidget *parent=0, const char *name=0, Qt::WindowModality windowModality=Qt::WindowModal) |
Protected Slots | |
virtual void | btnContinuePressed () |
virtual void | btnStopPressed () |
virtual void | slotAddItem (const int handle) |
virtual void | slotFinishItem (const int handle) |
virtual void | slotProgressAll () |
virtual void | slotSetName (QString name) |
![]() | |
virtual void | accept () |
virtual void | btnContinuePressed () |
virtual void | btnPausePressed () |
virtual void | btnStopPressed () |
virtual void | done (int) |
virtual void | reject () |
void | timerShow () |
Protected Member Functions | |
virtual size_t | addItem (const std::string &name, const CCopasiParameter::Type &type, const void *pValue, const void *pEndValue=NULL) |
virtual void | closeEvent (QCloseEvent *e) |
Protected Attributes | |
size_t | mLastHItem |
QMutex | mMutex |
bool | mSlotFinished |
QWaitCondition | mWaitPause |
QWaitCondition | mWaitSlot |
![]() | |
bool | mPause |
bool | mProceed |
![]() | |
std::string | mName |
CCopasiTimeVariable * | mpEndTime |
CVector< CProcessReportItem * > | mProcessReportItemList |
Private Member Functions | |
CProgressBar (QWidget *parent, const char *name, Qt::WindowModality windowModality) | |
Private Attributes | |
QDateTime | mNextEventProcessing |
QWidget * | mpMainWidget |
CVector< CQProgressItem * > | mProgressItemList |
This is used to call the progress bar code We do not want to call GUI stuff directly from the CModel.
Definition at line 41 of file CProgressBar.h.
|
private |
Definition at line 56 of file CProgressBar.cpp.
References CopasiUI3Window::disableSliders(), CopasiUI3Window::getMainWindow(), mProgressItemList, signalAddItem(), signalFinishItem(), signalProgressAll(), signalSetName(), slotAddItem(), slotFinishItem(), slotProgressAll(), and slotSetName().
Referenced by create().
|
virtual |
Definition at line 80 of file CProgressBar.cpp.
References finish(), mProgressItemList, pdelete, and CVectorCore< CType >::size().
|
protectedvirtual |
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.
const | std::string & name |
const | CCopasiParameter::Type & type |
const | void * pValue |
const | void * pEndValue = NULL |
Reimplemented from CProcessReport.
Definition at line 90 of file CProgressBar.cpp.
References CProcessReport::addItem(), CopasiUI3Window::isMainThread(), mMutex, mSlotFinished, mWaitSlot, signalAddItem(), and slotAddItem().
|
protectedvirtualslot |
Definition at line 346 of file CProgressBar.cpp.
References CQProgressDialog::btnContinuePressed(), and mWaitPause.
|
protectedvirtualslot |
Definition at line 339 of file CProgressBar.cpp.
References CQProgressDialog::btnStopPressed(), and mWaitPause.
|
protectedvirtual |
Definition at line 330 of file CProgressBar.cpp.
References CQMessageBox::information().
|
static |
Definition at line 37 of file CProgressBar.cpp.
References CProgressBar(), CopasiUI3Window::getMainWindow(), and CopasiUI3Window::isMainThread().
Referenced by TaskWidget::commonBeforeRunTask(), DataModelGUI::exportMathModel(), DataModelGUI::exportSBML(), DataModelGUI::exportSBMLToString(), DataModelGUI::importSBML(), DataModelGUI::importSBMLFromString(), DataModelGUI::loadModel(), DataModelGUI::saveModel(), and DataModelGUI::updateMIRIAM().
|
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.
bool | continue |
Reimplemented from CProcessReport.
Definition at line 208 of file CProgressBar.cpp.
References CVectorCore< CType >::array(), CopasiUI3Window::disableSliders(), CQProgressDialog::done(), CProcessReport::finish(), CopasiUI3Window::getMainWindow(), CopasiUI3Window::isMainThread(), CQProgressDialog::mProceed, CProcessReport::mProcessReportItemList, mProgressItemList, CQProgressDialog::removeProgressItem(), and CVectorCore< CType >::size().
Referenced by TaskWidget::commonAfterRunTask(), TaskWidget::commonRunTask(), TaskWidget::finishTask(), DataModelGUI::threadFinished(), and ~CProgressBar().
|
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.
const | size_t & handle |
bool | continue |
Reimplemented from CProcessReport.
Definition at line 243 of file CProgressBar.cpp.
References CopasiUI3Window::isMainThread(), CProcessReport::isValidHandle(), mMutex, CQProgressDialog::mProceed, mProgressItemList, mSlotFinished, mWaitSlot, signalFinishItem(), and slotFinishItem().
|
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.
bool | continue |
Reimplemented from CProcessReport.
Definition at line 291 of file CProgressBar.cpp.
References CQProgressDialog::mProceed.
|
virtual |
Report process on item handle. If the return value is false the calling process must halt execution and return.
const | size_t & handle |
bool | continue |
Reimplemented from CProcessReport.
Definition at line 158 of file CProgressBar.cpp.
References CopasiUI3Window::isMainThread(), CProcessReport::isValidHandle(), mMutex, mNextEventProcessing, CQProgressDialog::mPause, CQProgressDialog::mProceed, mProgressItemList, mSlotFinished, mWaitPause, signalProgressAll(), and slotProgressAll().
Referenced by DataModelGUI::miriamDownloadFinished(), and DataModelGUI::miriamDownloadProgress().
|
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.
const | size_t & handle |
bool | continue |
Reimplemented from CProcessReport.
Definition at line 151 of file CProgressBar.cpp.
References CProcessReport::isValidHandle(), CQProgressDialog::mProceed, mProgressItemList, and CProcessReport::reset().
|
virtual |
Set the name of the process.
const | std::string & name |
Reimplemented from CProcessReport.
Definition at line 297 of file CProgressBar.cpp.
References FROM_UTF8, CopasiUI3Window::isMainThread(), mMutex, mSlotFinished, mWaitSlot, signalSetName(), and slotSetName().
Referenced by DataModelGUI::updateMIRIAM().
|
signal |
Referenced by addItem(), and CProgressBar().
|
signal |
Referenced by CProgressBar(), and finishItem().
|
signal |
Referenced by CProgressBar(), and progressItem().
|
signal |
Referenced by CProgressBar(), and setName().
|
protectedvirtualslot |
Definition at line 119 of file CProgressBar.cpp.
References C_INVALID_INDEX, CQProgressDialog::insertProgressItem(), mMutex, CProcessReport::mProcessReportItemList, mProgressItemList, mSlotFinished, mWaitSlot, CVector< CType >::resize(), and CVectorCore< CType >::size().
Referenced by addItem(), and CProgressBar().
|
protectedvirtualslot |
Definition at line 268 of file CProgressBar.cpp.
References CProcessReport::isValidHandle(), mMutex, CProcessReport::mProcessReportItemList, mProgressItemList, mSlotFinished, mWaitSlot, and CQProgressDialog::removeProgressItem().
Referenced by CProgressBar(), and finishItem().
|
protectedvirtualslot |
Definition at line 193 of file CProgressBar.cpp.
References mMutex, CQProgressDialog::mProceed, mProgressItemList, mSlotFinished, and CVectorCore< CType >::size().
Referenced by CProgressBar(), and progressItem().
|
protectedvirtualslot |
Definition at line 319 of file CProgressBar.cpp.
References mMutex, mSlotFinished, mWaitSlot, CProcessReport::setName(), and TO_UTF8.
Referenced by CProgressBar(), and setName().
|
protected |
Definition at line 132 of file CProgressBar.h.
|
protected |
Definition at line 128 of file CProgressBar.h.
Referenced by addItem(), finishItem(), progressItem(), setName(), slotAddItem(), slotFinishItem(), slotProgressAll(), and slotSetName().
|
private |
Definition at line 137 of file CProgressBar.h.
Referenced by progressItem().
|
private |
Definition at line 139 of file CProgressBar.h.
|
private |
Definition at line 135 of file CProgressBar.h.
Referenced by CProgressBar(), finish(), finishItem(), progressItem(), resetItem(), slotAddItem(), slotFinishItem(), slotProgressAll(), and ~CProgressBar().
|
protected |
Definition at line 126 of file CProgressBar.h.
Referenced by addItem(), finishItem(), progressItem(), setName(), slotAddItem(), slotFinishItem(), slotProgressAll(), and slotSetName().
|
protected |
Definition at line 130 of file CProgressBar.h.
Referenced by btnContinuePressed(), btnStopPressed(), and progressItem().
|
protected |
Definition at line 129 of file CProgressBar.h.
Referenced by addItem(), finishItem(), setName(), slotAddItem(), slotFinishItem(), and slotSetName().