1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
20 #include "vvProgressDialog.h"
22 //------------------------------------------------------------------------------
23 vvProgressDialog::vvProgressDialog(std::string message, bool show_progress)
26 connect(mCancelButton, SIGNAL(rejected()), this, SLOT(reject()));
27 textLabel->setText(message.c_str());
34 //------------------------------------------------------------------------------
37 //------------------------------------------------------------------------------
38 void vvProgressDialog::SetText(std::string message)
40 textLabel->setText(message.c_str());
42 //------------------------------------------------------------------------------
45 //------------------------------------------------------------------------------
46 void vvProgressDialog::AddToText(std::string message)
48 textLabel->setText(QString("%1\n%2").arg(textLabel->text()).arg(message.c_str()));
50 //------------------------------------------------------------------------------
53 //------------------------------------------------------------------------------
54 void vvProgressDialog::SetProgress(unsigned int current,unsigned int max)
56 progressBar->setMaximum(max);
57 progressBar->setValue(current);
59 //------------------------------------------------------------------------------