41 const QString& default_value,
42 const QString& description,
45 bool include_fixed_frame_string,
46 const char* changed_slot,
49 , frame_manager_(nullptr)
50 , include_fixed_frame_string_(include_fixed_frame_string)
59 QString new_string = new_value.toString();
60 if (new_string.size() > 0 && new_string[0] ==
'/')
62 new_string = new_string.right(new_string.size() - 1);
84 std::vector<std::string> std_frames;
87 #pragma GCC diagnostic push 88 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 94 #pragma GCC diagnostic pop 96 std::sort(std_frames.begin(), std_frames.end());
103 for (
size_t i = 0; i < std_frames.size(); i++)
111 QString frame =
getValue().toString();
std::string getFrameStd() const
void changed()
Emitted by setValue() just after the value has changed.
virtual void clearOptions()
virtual bool setValue(const QVariant &new_value)
Set the new value for this property. Returns true if the new value is different from the old value...
A single element of a property tree, with a name, value, description, and possibly children...
virtual void addOption(const QString &option)
bool include_fixed_frame_string_
TfFrameProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr, FrameManager *frame_manager=nullptr, bool include_fixed_frame_string=false, const char *changed_slot=nullptr, QObject *receiver=nullptr)
void addOptionStd(const std::string &option)
bool setValue(const QVariant &new_value) override
Override from Property to resolve the frame name on the way in.
void handleFixedFrameChange()
If this property is currently set to FIXED_FRAME_STRING, this emits changed() to let users know that ...
Helper class for transforming data into Ogre's world frame (the fixed frame).
tf::TransformListener * getTFClient()
Return the tf::TransformListener used to receive transform data.
void requestOptions(EditableEnumProperty *property_in_need_of_options)
requestOptions() is emitted each time createEditor() is called.
const std::string & getFixedFrame()
Return the current fixed frame name.
static const QString FIXED_FRAME_STRING
void setFrameManager(FrameManager *frame_manager)
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
FrameManager * frame_manager_