ProgressBar.cpp 640 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifdef NOVISUAL
  8. #include <vislearning/nice_nonvis.h>
  9. #else
  10. #include <vislearning/nice.h>
  11. #include <core/imagedisplay/QtFramework.h>
  12. #endif
  13. #include <iostream>
  14. #include <sys/time.h>
  15. #include "vislearning/baselib/ProgressBar.h"
  16. using namespace OBJREC;
  17. using namespace std;
  18. using namespace NICE;
  19. ProgressBar::ProgressBar( std::string a ) : ProgressBarQt(a, true)
  20. {
  21. start();
  22. }
  23. ProgressBar::~ProgressBar()
  24. {
  25. terminate();
  26. wait();
  27. }
  28. void ProgressBar::run()
  29. {
  30. if(working)
  31. {
  32. sleep(1);
  33. }
  34. }