Class GuiBase

Inheritance Relationships

Base Type

  • public QObject

Derived Types

Class Documentation

class GuiBase : public QObject

Base class of all GUIs. This implements a common interface to all GUIs, e.g. init().

Subclassed by multisensor_calibration::CalibrationGuiBase, multisensor_calibration::MultiSensorCalibrationGui

Public Functions

GuiBase()
explicit GuiBase(const std::string &iAppTitle, const std::string &iGuiSubNamespace)

Default constructor.

Parameters:
  • iAppTitle[in] Application title.

  • iGuiSubNamespace[in] Sub namespace of the gui.

virtual ~GuiBase()

Destructor.

std::string getGuiNodeName() const

Get name of gui node.

rclcpp::Node *nodePtr() const

Pointer to node.

rclcpp::Node::SharedPtr nodeSharedPtr() const
rclcpp::Executor::SharedPtr executor() const
virtual bool init(const std::shared_ptr<rclcpp::Executor> &ipExec, const rclcpp::NodeOptions &iNodeOpts = rclcpp::NodeOptions())

Method to call the initialization routine. At the end of the routine the spin timer is started to start the ROS spin loop.

Parameters:
  • ipExec[in] Pointer to executor.

  • iNodeOpts[in] Options for ros node wihtin gui.

void spinOnce()

Method spinning ROS event loop once. This is connected to the spinTimer_.

Signals

void rosLoopTerminated()

Signal emitted when ROS event loop is terminated.

Protected Attributes

std::string appTitle_

Application title.

std::string guiNodeName_

Name of the GUI node.

bool isInitialized_

Flag indicating if node is initialized.

std::shared_ptr<rclcpp::Node> pNode_

Global node handler.

std::shared_ptr<rclcpp::Executor> pExecutor_

Pointer to node loader to load further nodes.

QTimer spinTimer_

QTimer object to trigger ros spins. This needs to be a QTimer, since the event loop runs inQt.