Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqProgressDialog Class Reference

A Qt wdiget which inherits from QProgressDialog to add consistent initialization and setting of the progress. More...

#include <TxqProgressDialog.h>

Inheritance diagram for TxqProgressDialog::

QProgressDialog List of all members.

Public Slots

void setProgress (int progress)
 Base class public slot. More...


Public Methods

 TxqProgressDialog (const QString &labelText, const QString &cancelButtonText, int totalSteps, QWidget *creator=0, const char *name=0, bool modal=FALSE, WFlags f=0)
 Constructs a progress dialog. More...

virtual ~TxqProgressDialog ()
 The TxqProgressDialog destructor. More...

void setProgress (int p, QString c)
 Set the progress with a message. More...

void hideBar ()
 Hide the progress bar. More...


Private Attributes

QProgressBar* progressBar
 The internal QProgressBar. More...


Detailed Description

A Qt wdiget which inherits from QProgressDialog to add consistent initialization and setting of the progress.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
TxqProgressDialog.h,v 1.3 2002/04/08 17:07:35 kgl Exp

Definition at line 37 of file TxqProgressDialog.h.


Constructor & Destructor Documentation

TxqProgressDialog::TxqProgressDialog ( const QString & labelText,
const QString & cancelButtonText,
int totalSteps,
QWidget * creator = 0,
const char * name = 0,
bool modal = FALSE,
WFlags f = 0 )
 

Constructs a progress dialog.

The labelText is text used to remind the user what is progressing.

The cancelButtonText is the text to display on the cancel button, or 0 if no cancel button is to be shown.

The totalSteps is the total number of steps in the operation of which this progress dialog shows the progress. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0). As each file is processed call setProgress(1), setProgress(2), etc., finally calling setProgress(50) after examining the last file.

The name, modal, and widget flags, f, are passed to the QDialog::QDialog() constructor. Note that if modal is FALSE (the default), you will need to have an event loop proceeding for any redrawing of the dialog to occur. If modal is TRUE, the dialog ensures that events are processed when needed.

The creator argument is the widget to use as the dialog's parent. If creator is not a top level widget the argument passed on to the QDialog constructor will be 0.

TxqProgressDialog::~TxqProgressDialog ( ) [virtual]
 

The TxqProgressDialog destructor.


Member Function Documentation

void TxqProgressDialog::hideBar ( )
 

Hide the progress bar.

void TxqProgressDialog::setProgress ( int progress ) [inline, slot]
 

Base class public slot.

Definition at line 93 of file TxqProgressDialog.h.

void TxqProgressDialog::setProgress ( int p,
QString c )
 

Set the progress with a message.

Parameters:
the   progress number
the   message to set


Member Data Documentation

QProgressBar * TxqProgressDialog::progressBar [private]
 

The internal QProgressBar.

Definition at line 101 of file TxqProgressDialog.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.