00001 #include "rqt_mrta/config/architecture/busy_robots.h" 00002 00003 namespace rqt_mrta 00004 { 00005 namespace config 00006 { 00007 namespace architecture 00008 { 00009 BusyRobots::BusyRobots(QObject* parent) 00010 : AbstractConfig(parent), topic_(new Topic(this)) 00011 { 00012 connect(topic_, SIGNAL(changed()), this, 00013 SLOT(topicChanged())); 00014 } 00015 00016 BusyRobots::~BusyRobots() 00017 { 00018 if (topic_) 00019 { 00020 delete topic_; 00021 topic_ = NULL; 00022 } 00023 } 00024 00025 Topic* BusyRobots::getTopic() const 00026 { 00027 return topic_; 00028 } 00029 00030 void BusyRobots::save(QSettings& settings) const 00031 { 00032 settings.beginGroup("busy_robots"); 00033 topic_->save(settings); 00034 settings.endGroup(); 00035 } 00036 00037 void BusyRobots::load(QSettings& settings) 00038 { 00039 settings.beginGroup("busy_robots"); 00040 topic_->load(settings); 00041 settings.endGroup(); 00042 } 00043 00044 void BusyRobots::reset() 00045 { 00046 topic_->reset(); 00047 } 00048 00049 void BusyRobots::write(QDataStream& stream) const 00050 { 00051 topic_->write(stream); 00052 } 00053 00054 void BusyRobots::read(QDataStream& stream) 00055 { 00056 topic_->read(stream); 00057 } 00058 00059 BusyRobots& BusyRobots::operator=(const BusyRobots& config) 00060 { 00061 *topic_ = *config.topic_; 00062 return *this; 00063 } 00064 00065 void BusyRobots::topicChanged() { emit changed(); } 00066 } 00067 } 00068 }