Class BasePageObject
Defined in File base_page_object.hpp
Inheritance Relationships
Base Type
public QObject
Derived Type
public PageObjectWithWindow
(Class PageObjectWithWindow)
Class Documentation
-
class BasePageObject : public QObject
Subclassed by PageObjectWithWindow
Public Functions
-
BasePageObject(int display_category, QString display_name_)
Constructor of a BasePageObject. N.B: When deriving from this class, you need to specify a zero argument constructor setting the parameters in this constructor explicitly so that the “addDisplay” method in VisualTestVixture can work correctly.
- Parameters:
display_category – The display category of this display. This is the number of the folder in the “Add Display” dialog (0 for rviz_default_plugins)
display_name_ – The name of the display in the “Add Display” dialog
-
int getDisplayId() const
-
int getDisplayCategory() const
-
QString getDisplayName() const
-
void collapse()
Protected Functions
-
int findPropertyRowIndexByName(const QString &property_name, QModelIndex relative_display_index)
-
void setString(const QString &property_to_change, const QString &value_to_set, std::vector<QString> super_properties = {})
Set a String into a property in the displays panel
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
value_to_set – String to set for this property
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setComboBox(const QString &property_to_change, const QString &value_to_set, std::vector<QString> super_properties = {})
Set an item of a ComboBox property in the display panel
- Parameters:
main_property_name – Name of the Property in the left row of the displays panel
value_to_set – String representation of the value to set for this property
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setBool(const QString &property_to_change, bool value_to_set, std::vector<QString> super_properties = {})
Set a boolean property (represented by a checkbox in the display panel)
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
value_to_set – Boolean value to set for this property
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setInt(const QString &property_to_change, int value_to_set, std::vector<QString> super_properties = {})
Set an integer property in the display panel
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
value_to_set – Integer to set for this property
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setFloat(const QString &property_to_change, float value_to_set, std::initializer_list<QString> super_properties = {})
Set a float property in the display panel
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
value_to_set – Float to set for this property. Locales will be handled by the visual test
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setColorCode(const QString &property_to_change, int red, int green, int blue, std::vector<QString> super_properties = {})
Set a color property in the display panel
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
red, blue, green – Color values in rgb (between 0 and 255) to set for this property
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void setVector(const QString &property_to_change, float x, float y, float z, std::vector<QString> super_properties = {})
Set a vector property in the display panel
- Parameters:
property_to_change – Name of the Property in the left row of the displays panel
x, y, z – coordinates of the Vector to set into this property as float values
super_properties – Specifies all parent properties of property_to_change starting with the root property below the display’s property. Empty if the property is a top-level property.
-
void waitForFirstMessage()
-
BasePageObject(int display_category, QString display_name_)