QtPass  1.2.0-pre
Multi-platform GUI for pass, the standard unix password manager.
Public Slots | Public Member Functions | Protected Member Functions | Properties | List of all members
QProgressIndicator Class Reference

The QProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way. More...

#include <qprogressindicator.h>

+ Inheritance diagram for QProgressIndicator:
+ Collaboration diagram for QProgressIndicator:

Public Slots

void startAnimation ()
 Starts the spin animation. More...
 
void stopAnimation ()
 Stops the spin animation. More...
 
void setAnimationDelay (int delay)
 Sets the delay between animation steps. More...
 
void setDisplayedWhenStopped (bool state)
 Sets whether the component hides itself when it is not animating. More...
 
void setColor (const QColor &color)
 Sets the color of the components to the given color. More...
 

Public Member Functions

 QProgressIndicator (QWidget *parent=0)
 QProgressIndicator::QProgressIndicator constructor. More...
 
int animationDelay () const
 Returns the delay between animation steps. More...
 
bool isAnimated () const
 Returns a Boolean value indicating whether the component is currently animated. More...
 
bool isDisplayedWhenStopped () const
 Returns a Boolean value indicating whether the receiver shows itself even when it is not animating. More...
 
const QColor & color () const
 Returns the color of the component. More...
 
virtual QSize sizeHint () const
 QProgressIndicator::sizeHint default minimum size. More...
 
int heightForWidth (int w) const
 QProgressIndicator::heightForWidth square ratio. More...
 

Protected Member Functions

virtual void timerEvent (QTimerEvent *event)
 QProgressIndicator::timerEvent do the actual animation. More...
 
virtual void paintEvent (QPaintEvent *event)
 QProgressIndicator::paintEvent draw the spinner. More...
 

Properties

int delay
 QProgressIndicator::delay in miliseconds. More...
 
bool displayedWhenStopped
 QProgressIndicator::displayedWhenStopped render when not spinning. More...
 
QColor color
 QProgressIndicator::color of the component.. More...
 

Detailed Description

The QProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way.

Progress indicators are indeterminate and do nothing more than spin to show that the application is busy.

See also
QProgressBar

Definition at line 16 of file qprogressindicator.h.

Constructor & Destructor Documentation

◆ QProgressIndicator()

QProgressIndicator::QProgressIndicator ( QWidget *  parent = 0)
explicit

QProgressIndicator::QProgressIndicator constructor.

Parameters
parentwidget the indicator is placed in.

Definition at line 8 of file qprogressindicator.cpp.

Member Function Documentation

◆ animationDelay()

int QProgressIndicator::animationDelay ( ) const
inline

Returns the delay between animation steps.

Returns
The number of milliseconds between animation steps. By default, the animation delay is set to 40 milliseconds.
See also
setAnimationDelay

Definition at line 40 of file qprogressindicator.h.

+ Here is the call graph for this function:

◆ color()

const QColor& QProgressIndicator::color ( ) const
inline

Returns the color of the component.

See also
setColor

Definition at line 60 of file qprogressindicator.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ heightForWidth()

int QProgressIndicator::heightForWidth ( int  w) const

QProgressIndicator::heightForWidth square ratio.

Parameters
wrequested width
Returns
w returned height

Definition at line 70 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ isAnimated()

bool QProgressIndicator::isAnimated ( ) const

Returns a Boolean value indicating whether the component is currently animated.

Returns
Animation state.
See also
startAnimation stopAnimation

Definition at line 15 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ isDisplayedWhenStopped()

bool QProgressIndicator::isDisplayedWhenStopped ( ) const

Returns a Boolean value indicating whether the receiver shows itself even when it is not animating.

Returns
Return true if the progress indicator shows itself even when it is not animating. By default, it returns false.
See also
setDisplayedWhenStopped

Definition at line 23 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ paintEvent()

void QProgressIndicator::paintEvent ( QPaintEvent *  event)
protectedvirtual

QProgressIndicator::paintEvent draw the spinner.

Definition at line 84 of file qprogressindicator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAnimationDelay

void QProgressIndicator::setAnimationDelay ( int  delay)
slot

Sets the delay between animation steps.

Setting the delay to a value larger than 40 slows the animation, while setting the delay to a smaller value speeds it up.

Parameters
delayThe delay, in milliseconds.
See also
animationDelay

Definition at line 43 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ setColor

void QProgressIndicator::setColor ( const QColor &  color)
slot

Sets the color of the components to the given color.

See also
color

Definition at line 53 of file qprogressindicator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDisplayedWhenStopped

void QProgressIndicator::setDisplayedWhenStopped ( bool  state)
slot

Sets whether the component hides itself when it is not animating.

Parameters
stateThe animation state. Set false to hide the progress indicator when it is not animating; otherwise true.
See also
isDisplayedWhenStopped

Definition at line 17 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ sizeHint()

QSize QProgressIndicator::sizeHint ( ) const
virtual

QProgressIndicator::sizeHint default minimum size.

Returns
QSize(20, 20)

Definition at line 63 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ startAnimation

void QProgressIndicator::startAnimation ( )
slot

Starts the spin animation.

See also
stopAnimation isAnimated

Definition at line 27 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ stopAnimation

void QProgressIndicator::stopAnimation ( )
slot

Stops the spin animation.

See also
startAnimation isAnimated

Definition at line 34 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

◆ timerEvent()

void QProgressIndicator::timerEvent ( QTimerEvent *  event)
protectedvirtual

QProgressIndicator::timerEvent do the actual animation.

Definition at line 75 of file qprogressindicator.cpp.

+ Here is the caller graph for this function:

Property Documentation

◆ color

QColor QProgressIndicator::color
readwrite

QProgressIndicator::color of the component..

Definition at line 30 of file qprogressindicator.h.

◆ delay

int QProgressIndicator::delay
readwrite

QProgressIndicator::delay in miliseconds.

Definition at line 21 of file qprogressindicator.h.

◆ displayedWhenStopped

bool QProgressIndicator::displayedWhenStopped
readwrite

QProgressIndicator::displayedWhenStopped render when not spinning.

Definition at line 26 of file qprogressindicator.h.


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