Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

VBoxProgressDialog Class Reference

#include <VBoxProgressDialog.h>

Inheritance diagram for VBoxProgressDialog:

List of all members.

Detailed Description

A QProgressDialog enhancement that allows to:

1) prevent closing the dialog when it has no cancel button; 2) effectively track the IProgress object completion (w/o using IProgress::waitForCompletion() and w/o blocking the UI thread in any other way for too long).

The CProgress instance is passed as a non-const reference to the constructor (to memorize COM errors if they happen), and therefore must not be destroyed before the created VBoxProgressDialog instance is destroyed.

Definition at line 50 of file VBoxProgressDialog.h.

Public Member Functions

bool cancelEnabled () const
int run (int aRefreshInterval)
 VBoxProgressDialog (CProgress &aProgress, const QString &aTitle, int aMinDuration=2000, QWidget *aParent=0)

Protected Member Functions

virtual void closeEvent (QCloseEvent *aEvent)
virtual void reject ()
virtual void retranslateUi ()
void showEvent (QShowEvent *aEvent)
virtual void timerEvent (QTimerEvent *aEvent)

Protected Attributes

bool mPolished

Private Slots

void cancelOperation ()
void showDialog ()

Private Attributes

bool mCancelEnabled
ulong mCurOp
bool mEnded
QILabel * mETA
QString mETAText
QEventLoop * mEventLoop
QILabel * mLabel
const ulong mOpCount
CProgress & mProgress
QProgressBar * mProgressBar

Static Private Attributes

static const char * sOpDescTpl = "%1... (%2/%3)"

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index