libyui-qt  2.47.1.1
YQMultiProgressMeter Class Reference
Inheritance diagram for YQMultiProgressMeter:
Collaboration diagram for YQMultiProgressMeter:

Public Member Functions

 YQMultiProgressMeter (YWidget *parent, YUIDimension dim, const vector< float > &maxValues)
 Constructor.
 
virtual ~YQMultiProgressMeter ()
 Destructor.
 
int thickness ()
 Overall thickness (in pixels) of the MultiProgressMeter.
 
int length ()
 Overall length (in pixels) of the MultiProgressMeter.
 
int margin () const
 Returns the margin around the widget contents.
 
void setMargin (int value)
 Sets the margin around the widget contents. More...
 
int spacing () const
 Returns the spacing between segments in pixels.
 
void setSpacing (int value)
 Sets the spacing between segments in pixels. More...
 
int segmentMinLength () const
 Returns the minimal length of a segment in pixels.
 
void setSegmentMinLength (int val)
 Set the minimal length of a segment in pixels.
 
int triThickness () const
 Returns the thickness (base to point) of the small triangles next to the spacing between individual segments. More...
 
void setTriThickness (int value)
 Set the thickness (base to point) of the small triangles next to the spacing between individual segments. More...
 
int triSpacing () const
 Returns the spacing between the segment indicators and the small triangles next to the spacing between segments.
 
void setTriSpacing (int value)
 Sets the spacing between the segment indicators and the small triangles next to the spacing between segments.
 
virtual void setEnabled (bool enabled)
 Set enabled/disabled state. More...
 
virtual int preferredWidth ()
 Preferred width of the widget. More...
 
virtual int preferredHeight ()
 Preferred height of the widget. More...
 
virtual void setSize (int newWidth, int newHeight)
 Set the new size of the widget. More...
 

Protected Member Functions

void init ()
 Common initialization.
 
virtual void doUpdate ()
 Perform a visual update on the screen. More...
 
virtual void paintEvent (QPaintEvent *)
 Paint the widget's contents. More...
 
void drawSegment (int segment, QPainter &painter, int offset, int length, int thickness)
 Draw segment number 'segment' with pixel length 'length' from pixel coordinate 'offset' on and fill it according to that segment's current value. More...
 
void drawMarkers (QPainter &painter, int offset, int thickness)
 Draw markers between segments (or beside that spacing).
 

Detailed Description

Definition at line 42 of file YQMultiProgressMeter.h.

Member Function Documentation

void YQMultiProgressMeter::doUpdate ( )
protectedvirtual

Perform a visual update on the screen.

Reimplemented from YMultiProgressMeter.

Definition at line 66 of file YQMultiProgressMeter.cc.

void YQMultiProgressMeter::drawSegment ( int  segment,
QPainter &  painter,
int  offset,
int  length,
int  thickness 
)
protected

Draw segment number 'segment' with pixel length 'length' from pixel coordinate 'offset' on and fill it according to that segment's current value.

'painter' is set up previously to take rotating into account (horizontal / vertical).

Definition at line 186 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

void YQMultiProgressMeter::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint the widget's contents.

Reimplemented from QWidget.

Definition at line 72 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

int YQMultiProgressMeter::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 329 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

int YQMultiProgressMeter::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 323 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

void YQMultiProgressMeter::setEnabled ( bool  enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

Definition at line 315 of file YQMultiProgressMeter.cc.

void YQMultiProgressMeter::setMargin ( int  value)
inline

Sets the margin around the widget contents.

Does not trigger an update.

Definition at line 78 of file YQMultiProgressMeter.h.

void YQMultiProgressMeter::setSize ( int  newWidth,
int  newHeight 
)
virtual

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 335 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

void YQMultiProgressMeter::setSpacing ( int  value)
inline

Sets the spacing between segments in pixels.

Does not trigger an update.

Definition at line 89 of file YQMultiProgressMeter.h.

void YQMultiProgressMeter::setTriThickness ( int  value)

Set the thickness (base to point) of the small triangles next to the spacing between individual segments.

The base length of those small triangles is double this value minus one.

Use -1 to switch off those triangles - in which case triSpacing (see below) will be set to 0.

This call does not trigger a screen update.

Definition at line 306 of file YQMultiProgressMeter.cc.

Here is the call graph for this function:

int YQMultiProgressMeter::triThickness ( ) const
inline

Returns the thickness (base to point) of the small triangles next to the spacing between individual segments.

The base length of those small triangles is double this value minus one. A value <1 indicates no such triangles will be drawn.

Definition at line 107 of file YQMultiProgressMeter.h.

Here is the call graph for this function:


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