Class SelectFrameDialog

Inheritance Relationships

Base Type

  • public QDialog

Class Documentation

class SelectFrameDialog : public QDialog

Provides a dialog for the user to select one or more TF frames. Several static functions are provided that can be used instead of instantiating the class directly.

Public Functions

explicit SelectFrameDialog(std::shared_ptr<tf2_ros::Buffer> tf_buffer, QWidget *parent = nullptr)

Constructor for the SelectFrameDialog.

void allowMultipleFrames(bool allow)

Choose whether the user can select one (allow=false) or multiple (allow=true) frames. The default is false.

std::string selectedFrame() const

Returns the currently selected frame. If multiple frames are allowed, this will only return the first selected element. If there is no selection, the returned info will have an empty frame name and datatype.

std::vector<std::string> selectedFrames() const

Returns the currently selected frames. If there is no selection, the returned vector will be empty.

Public Static Functions

static std::string selectFrame(std::shared_ptr<tf2_ros::Buffer> tf_buffer, QWidget *parent = nullptr)

Present the user with a dialog to select a single frame.

If the user cancels the selection or doesn’t make a valid selection, the returned string be empty.

static std::vector<std::string> selectFrames(std::shared_ptr<tf2_ros::Buffer> tf_buffer, QWidget *parent = nullptr)

Present the user with a dialog to select a multiple TF frames.

If the user cancels the selection or doesn’t make a valid selection, the returned vector will be empty.