ODIN
odindialog_progress.h
1 /***************************************************************************
2  odindialog_progress.h - description
3  -------------------
4  begin : Sun Oct 2 21:30:11 CEST 2005
5  copyright : (C) 2000-2021 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef ODINDIALOG_PROGRESS_H
19 #define ODINDIALOG_PROGRESS_H
20 
21 #include <odinqt/odinqt.h>
22 
23 #include <tjutils/tjfeedback.h>
24 
25 
26 struct OdinCancel {}; // exception
27 
29 
30 class ProgressDisplayDialog : public GuiProgressDialog, public virtual ProgressDisplayDriver {
31 
32  public:
33  ProgressDisplayDialog(QWidget *parent, bool modal = true);
34 
35  void finish();
36 
37  private:
38  // Implementing virtual functions of ProgressDisplayDriver
39  void init(unsigned int nsteps, const char* txt);
40  void increase(const char*);
41  bool refresh();
42 
43  int counter; // Getting current progress from GuiProgressDialog does not work in non-percent mode, so we need an extra counter
44 };
45 
46 
47 #endif
virtual void increase(const char *subj)=0
virtual bool refresh()=0
virtual void init(unsigned int nsteps, const char *txt)=0