00001 /*************************************************************************** 00002 odindialog_progress.h - description 00003 ------------------- 00004 begin : Sun Oct 2 21:30:11 CEST 2005 00005 copyright : (C) 2003 by Thies H. Jochimsen 00006 email : jochimse@cns.mpg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef ODINDIALOG_PROGRESS_H 00019 #define ODINDIALOG_PROGRESS_H 00020 00021 #include <odinqt/odinqt.h> 00022 00023 #include <tjutils/tjfeedback.h> 00024 00025 00026 struct OdinCancel {}; // exception 00027 00029 00030 class ProgressDisplayDialog : public GuiProgressDialog, public virtual ProgressDisplayDriver { 00031 00032 public: 00033 ProgressDisplayDialog(QWidget *parent, bool modal = true); 00034 00035 void finish(); 00036 00037 private: 00038 // Implementing virtual functions of ProgressDisplayDriver 00039 void init(unsigned int nsteps, const char* txt); 00040 void increase(const char*); 00041 bool refresh(); 00042 00043 int counter; // Getting current progress from GuiProgressDialog does not work in non-percent mode, so we need an extra counter 00044 }; 00045 00046 00047 #endif
1.5.6