ProgressBar.cpp 655 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @file ProgressBar.cpp
  3. * @brief Show a Progress-Bar with time estimation - threaded
  4. * @author Michael Koch
  5. * @date 25/03/2010
  6. */
  7. #include "core/image/ImageT.h"
  8. #include "core/vector/VectorT.h"
  9. #include "core/vector/MatrixT.h"
  10. #include <core/imagedisplay/ImageDisplay.h>
  11. #include <iostream>
  12. #include <sys/time.h>
  13. #include "vislearning/baselib/ProgressBar.h"
  14. using namespace OBJREC;
  15. using namespace std;
  16. using namespace NICE;
  17. ProgressBar::ProgressBar ( std::string a ) : ProgressBarQt ( a, true )
  18. {
  19. start();
  20. }
  21. ProgressBar::~ProgressBar()
  22. {
  23. terminate();
  24. wait();
  25. }
  26. void ProgressBar::run()
  27. {
  28. if ( working )
  29. {
  30. sleep ( 1 );
  31. }
  32. }