qCC_db  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Slots | Public Member Functions | Protected Attributes | List of all members
ccProgressDialog Class Reference

Graphical progress indicator (thread-safe) More...

#include <ccProgressDialog.h>

Inheritance diagram for ccProgressDialog:
Inheritance graph
[legend]
Collaboration diagram for ccProgressDialog:
Collaboration graph
[legend]

Public Slots

void refresh ()
 Refreshes widget. More...
 

Public Member Functions

 ccProgressDialog (bool cancelButton=false, QWidget *parent=0, Qt::WindowFlags flags=Qt::SubWindow|Qt::Popup)
 Default constructor. More...
 
virtual ~ccProgressDialog ()
 Destructor (virtual)
 
virtual void reset ()
 
virtual void update (float percent)
 
virtual void setMethodTitle (const char *methodTitle)
 
virtual void setInfo (const char *infoStr)
 
virtual bool isCancelRequested ()
 
virtual void start ()
 
virtual void stop ()
 
void setMinRefreshInterval (int i)
 Sets base 'refresh' interval (in percents - strictly positive)
 

Protected Attributes

int m_currentValue
 Current progress value (percent)
 
int m_lastValue
 Last displayed progress value (percent)
 
QMutex m_mutex
 Mutex for concurrent access.
 
QTimer m_timer
 Timer for automatic update.
 
int m_refreshInterval
 Minimum refresh interval (in percents)
 

Detailed Description

Graphical progress indicator (thread-safe)

Implements the GenericProgressCallback interface, in order to be passed to the CCLib algorithms (check the CCLib documentation for more information about the inherited methods).

Constructor & Destructor Documentation

ccProgressDialog::ccProgressDialog ( bool  cancelButton = false,
QWidget *  parent = 0,
Qt::WindowFlags  flags = Qt::SubWindow | Qt::Popup 
)

Default constructor.

By default, a cancel button is always displayed on the progress interface. It is only possible to activate or deactivate this button. Sadly, the fact that this button is activated doesn't mean it will be possible to stop the ongoing process: it depends only on the client algorithm implementation.

Parameters
cancelButtonactivates or deactivates the cancel button
parentparent widget
flagswindow flags

Member Function Documentation

void ccProgressDialog::refresh ( )
slot

Refreshes widget.

Should only be called in the main Qt thread! –> Job automatically done by 'm_timer'


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