00001 //============================================== 00002 // copyright : (C) 2003 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // As a special exception, Will Stokes gives permission to 00011 // link this program with Qt non-commercial edition, and 00012 // distribute the resulting executable, without including the 00013 // source code for the Qt non-commercial edition in the 00014 // source distribution. 00015 //============================================== 00016 00017 #ifndef GUI_STATUSWIDGET_H 00018 #define GUI_STATUSWIDGET_H 00019 00020 //-------------------- 00021 //forward declarations 00022 class QGridLayout; 00023 class QLabel; 00024 class QFrame; 00025 class QProgressBar; 00026 //-------------------- 00027 00028 #include <qwidget.h> 00029 00030 //===================================== 00031 class StatusWidget : public QWidget 00032 { 00033 Q_OBJECT 00034 //---------------------- 00035 public: 00037 StatusWidget(QWidget *parent=0, const char* name=0); 00038 00040 ~StatusWidget(); 00041 00043 void showProgressBar(QString message, int numSteps); 00044 00046 void updateProgress(int progress); 00047 00049 void incrementProgress(); 00050 00052 void setStatus( QString message ); 00053 00055 void clearAll(); 00056 //---------------------- 00057 private: 00059 QGridLayout* grid; 00060 00061 QLabel* statusMessage; 00062 00063 QGridLayout* progressGrid; 00064 QFrame* progressFrame; 00065 QLabel* progressMessage; 00066 QProgressBar* progressBar; 00067 int curStep; 00068 //---------------------- 00069 }; 00070 //====================== 00071 00072 #endif //GUI_STATUSWIDGET_H
1.3.4