configs.h
Go to the documentation of this file.
00001 #ifndef _RQT_MRTA_CONFIG_CONFIGS_H_
00002 #define _RQT_MRTA_CONFIG_CONFIGS_H_
00003 
00004 #include <QVector>
00005 #include "utilities/abstract_config.h"
00006 #include "rqt_mrta/config/config.h"
00007 
00008 namespace rqt_mrta
00009 {
00010 namespace config
00011 {
00012 namespace application
00013 {
00014 class Robots;
00015 }
00016 class Configs : public utilities::AbstractConfig
00017 {
00018   Q_OBJECT
00019 public:
00020   Configs(QObject* parent = NULL);
00021   virtual ~Configs();
00022   Config* getConfig(size_t index) const;
00023   Config* getConfig(const QString& id) const;
00024   Config* addConfig();
00025   void removeConfig(Config* config);
00026   void removeConfig(size_t index);
00027   void clearConfigs();
00028   bool contains(const QString& id) const;
00029   size_t count() const;
00030   bool isEmpty() const;
00031   QString validate() const;
00032   void save(QSettings& settings) const;
00033   void load(QSettings& settings);
00034   void reset();
00035   void write(QDataStream& stream) const;
00036   void read(QDataStream& stream);
00037   Configs& operator=(const Configs& config);
00038   void setConfigs(const Configs& configs, const application::Robots& robots,
00039                   const QString& robots_config_id);
00040   QStringList willBeGenerated() const;
00041   void saveAsYaml(const QString& package_url) const;
00042 
00043 signals:
00044   void added(size_t index);
00045   void removed(const QString& config_id);
00046   void cleared();
00047   void configChanged(size_t index);
00048   void configIdChanged(size_t index, const QString& config_id);
00049   void configAdded(size_t index, const QString& full_name);
00050   void configRemoved(size_t index, const QString& full_name);
00051   void configCleared(size_t index, const QString& full_name);
00052   void configNameChanged(size_t index, const QString& previous_name,
00053                          const QString& name);
00054   void configTypeChanged(size_t index, const QString& name,
00055                          const QMetaType::Type& type);
00056   void configValueChanged(size_t index, const QString& name,
00057                           const QVariant& value);
00058   void configDefaultValueChanged(size_t index, const QString& name,
00059                                  const QVariant& default_value);
00060   void configToolTipChanged(size_t index, const QString& name,
00061                             const QString& tool_tip);
00062 
00063 private:
00064   QVector<Config*> configs_;
00065 
00066 private slots:
00067   void configChanged();
00068   void configIdChanged(const QString& config_id);
00069   void configAdded(const QString& full_name);
00070   void configRemoved(const QString& full_name);
00071   void configCleared(const QString& full_name);
00072   void configNameChanged(const QString& previous_name, const QString& name);
00073   void configTypeChanged(const QString& name, const QMetaType::Type& type);
00074   void configValueChanged(const QString& name, const QVariant& value);
00075   void configDefaultValueChanged(const QString& name,
00076                                  const QVariant& default_value);
00077   void configToolTipChanged(const QString& name, const QString& tool_tip);
00078   void configDestroyed();
00079 };
00080 }
00081 }
00082 
00083 #endif // _RQT_MRTA_CONFIG_CONFIGS_H_


rqt_mrta
Author(s): Adriano Henrique Rossette Leite
autogenerated on Thu Jun 6 2019 18:50:52