Go to the documentation of this file.00001 #include <ros/ros.h>
00002 #include <benchmark_processing_thread.h>
00003
00004 BenchmarkProcessingThread::BenchmarkProcessingThread(const moveit_benchmarks::BenchmarkExecution &be, const moveit_benchmarks::BenchmarkType &bt, QObject *parent)
00005 : QThread(parent), be_(be), bt_(bt)
00006 {
00007 setTerminationEnabled();
00008 }
00009
00010 BenchmarkProcessingThread::~BenchmarkProcessingThread()
00011 {
00012 }
00013
00014 void BenchmarkProcessingThread::startAndShow()
00015 {
00016 this->start();
00017
00018 progress_dialog_.reset(new QProgressDialog("Running benchmark","Cancel",0,0));
00019 connect( this, SIGNAL( finished() ), progress_dialog_.get(), SLOT( cancel() ));
00020 progress_dialog_->setMinimum(0);
00021 progress_dialog_->setMaximum(0);
00022 progress_dialog_->exec();
00023 }
00024
00025 void BenchmarkProcessingThread::run()
00026 {
00027 ROS_INFO("Thread running");
00028 be_.runAllBenchmarks(bt_);
00029 }