]> Creatis software - clitk.git/blob - vv/vvProgressDialog.h
added the new headers
[clitk.git] / vv / vvProgressDialog.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef vvProgressDialog_h
19 #define vvProgressDialog_h
20 #include "ui_vvProgressDialog.h"
21 #include <string>
22
23 class vvProgressDialog : public QDialog, private Ui::vvProgressDialog
24 {
25     Q_OBJECT
26
27 public:
28     vvProgressDialog(std::string message,bool show_progress=false) {
29         setupUi(this);
30         textLabel->setText(message.c_str());
31         if (show_progress) 
32             progressBar->show();
33         else 
34             progressBar->hide();
35         this->show();
36     }
37     void Update(std::string message)
38     {
39         textLabel->setText(message.c_str());
40     }
41     void SetProgress(unsigned int current,unsigned int max)
42     {
43         progressBar->setMaximum(max);
44         progressBar->setValue(current);
45     }
46     ~vvProgressDialog() {}
47
48 public slots:
49
50 };
51
52 #endif