Namespaces | |
events | |
Namespace for all events. | |
plugins | |
Classes | |
class | Application |
An Ignition GUI application loads a QML engine and provides an API to load plugins and configuration files. The application supports either running a single main window or several plugins as standalone dialogs. More... | |
class | Dialog |
Gui plugin. More... | |
class | DragDropModel |
Customized item model so that we can pass along an URI query as MIME information during a drag-drop. More... | |
class | KeyPublisher |
Publish keyboard stokes to "keyboard/keypress" topic. More... | |
class | MainWindow |
The main window class creates a QQuickWindow and acts as an interface which provides properties and functions which can be called from Main.qml. More... | |
class | Plugin |
Base class for Ignition GUI plugins. More... | |
class | SearchModel |
Customize the proxy model to display search results. More... | |
struct | WindowConfig |
Holds configurations related to a MainWindow. More... | |
Enumerations | |
enum | DataRole { DISPLAY_NAME = Qt::UserRole + 100, URI_QUERY, TYPE, TO_EXPAND } |
Data roles. More... | |
enum | ExitAction { CLOSE_GUI, SHUTDOWN_SERVER } |
The action executed when GUI is closed without prompt. More... | |
enum | FileType { CSVFile, PDFFile } |
File types. More... | |
enum | NumberType { NONE, DOUBLE, INT, UINT } |
Number types. More... | |
enum | StringType { NONE, LINE, PLAIN_TEXT } |
String types. More... | |
enum | WindowType : int { kMainWindow = 0, kDialog = 1 } |
Type of window which the application will display. More... | |
Functions | |
Application * | App () |
Get current running application, this is a cast of qGuiApp. More... | |
msgs::Time | convert (const common::Time &_t) |
Convert an ignition::common::Time to an ignition::msgs::Time. More... | |
QColor | convert (const math::Color &_color) |
Return the equivalent qt color. More... | |
QPointF | convert (const math::Vector2d &_pt) |
Return the equivalent QPointF. More... | |
QVector3D | convert (const math::Vector3d &_vec) |
Return the equivalent qt vector 3d. More... | |
common::Time | convert (const msgs::Time &_t) |
Convert an ignition::msgs::Time to an ignition::common::Time. More... | |
math::Color | convert (const QColor &_color) |
Return the equivalent ignition color. More... | |
common::MouseEvent | convert (const QMouseEvent &_e) |
Return the equivalent ignition mouse event. More... | |
math::Vector2d | convert (const QPointF &_pt) |
Return the equivalent ignition vector. More... | |
math::Vector3d | convert (const QVector3D &_vec) |
Return the equivalent ignition vector 3d. More... | |
template<class T > | |
T | findFirstByProperty (const QList< T > _list, const char *_key, QVariant _value) |
Returns the first element on a QList which matches the given property. More... | |
std::string | humanReadable (const std::string &_key) |
Create a human readable key, capitalizing the first letter and removing characters like "_". More... | |
const QString | qmlQrcImportPath () |
Import path for ign-gui QML modules added to the Qt resource system. This helper function returns the QRC resource path where custom ignition QML modules can be imported from. To import an ignition QML module, add this path to the QML engine's import path list before attempting to load a QML file that imports ignition QML modules. More... | |
void | rangeFromKey (const std::string &_key, double &_min, double &_max) |
Returns the range for a given key. For example, the key "transparency" returns min == 0, max == 1. More... | |
StringType | stringTypeFromKey (const std::string &_key) |
Returns the string type for a given key. For example, the key "innerxml" has a PLAIN_TEXT type while "name" is a LINE. More... | |
std::string | uniqueFilePath (const std::string &_pathAndName, const std::string &_extension) |
Generates a path for a file which doesn't collide with existing files, by appending numbers to it (i.e. (0), (1), ...) More... | |
std::string | unitFromKey (const std::string &_key, const std::string &_type="") |
Returns the unit for a given key. For example, the key "mass" returns "kg". More... | |
QStringList | worldNames () |
The main window's "worldNames" property may be filled with a list of the names of all worlds currently loaded. This information can be used by plugins to choose which world to work with. This helper function provides a handy access to the world names list. More... | |
Enumeration Type Documentation
◆ DataRole
enum DataRole |
Data roles.
◆ ExitAction
|
strong |
◆ FileType
enum FileType |
◆ NumberType
|
strong |
◆ StringType
|
strong |
◆ WindowType
|
strong |
Function Documentation
◆ App()
Application* ignition::gui::App | ( | ) |
Get current running application, this is a cast of qGuiApp.
- Returns
- Pointer to running application, or nullptr if none is running.
◆ convert() [1/9]
msgs::Time ignition::gui::convert | ( | const common::Time & | _t | ) |
Convert an ignition::common::Time to an ignition::msgs::Time.
- Parameters
-
[in] _t The time to convert
- Returns
- An ignition::msgs::Time object
◆ convert() [2/9]
QColor ignition::gui::convert | ( | const math::Color & | _color | ) |
Return the equivalent qt color.
- Parameters
-
[in] _color Ignition color to convert
- Returns
- Qt color value
◆ convert() [3/9]
QPointF ignition::gui::convert | ( | const math::Vector2d & | _pt | ) |
◆ convert() [4/9]
QVector3D ignition::gui::convert | ( | const math::Vector3d & | _vec | ) |
Return the equivalent qt vector 3d.
- Parameters
-
[in] _vec Ignition vector 3d to convert.
- Returns
- Qt vector 3d value.
◆ convert() [5/9]
common::Time ignition::gui::convert | ( | const msgs::Time & | _t | ) |
Convert an ignition::msgs::Time to an ignition::common::Time.
- Parameters
-
[in] _t The time to convert
- Returns
- An ignition::common::Time object
◆ convert() [6/9]
math::Color ignition::gui::convert | ( | const QColor & | _color | ) |
Return the equivalent ignition color.
- Parameters
-
[in] _color Qt color to convert
- Returns
- Ignition color value
◆ convert() [7/9]
common::MouseEvent ignition::gui::convert | ( | const QMouseEvent & | _e | ) |
Return the equivalent ignition mouse event.
Note that there isn't a 1-1 mapping between these types, so fields such as common::MouseEvent::PressPos need to be set afterwards.
- Parameters
-
[in] _e Qt mouse event
- Returns
- Ignition mouse event
◆ convert() [8/9]
math::Vector2d ignition::gui::convert | ( | const QPointF & | _pt | ) |
Return the equivalent ignition vector.
- Parameters
-
[in] _pt QPointF to convert
- Returns
- Ignition Vector2d.
◆ convert() [9/9]
math::Vector3d ignition::gui::convert | ( | const QVector3D & | _vec | ) |
Return the equivalent ignition vector 3d.
- Parameters
-
[in] _vec Qt vector 3d to convert.
- Returns
- Ignition vector 3d value
◆ findFirstByProperty()
Returns the first element on a QList which matches the given property.
- Parameters
-
[in] _list The list to search through. [in] _key The property key value. [in] _value The property value.
- Returns
- The first matching element.
◆ humanReadable()
std::string ignition::gui::humanReadable | ( | const std::string & | _key | ) |
Create a human readable key, capitalizing the first letter and removing characters like "_".
- Parameters
-
[in] _key Non-human-readable key.
- Returns
- Human-readable key.
◆ qmlQrcImportPath()
const QString ignition::gui::qmlQrcImportPath | ( | ) |
Import path for ign-gui QML modules added to the Qt resource system. This helper function returns the QRC resource path where custom ignition QML modules can be imported from. To import an ignition QML module, add this path to the QML engine's import path list before attempting to load a QML file that imports ignition QML modules.
- Returns
- Resousrce path prefix as a string
◆ rangeFromKey()
void ignition::gui::rangeFromKey | ( | const std::string & | _key, |
double & | _min, | ||
double & | _max | ||
) |
Returns the range for a given key. For example, the key "transparency" returns min == 0, max == 1.
- Parameters
-
[in] _key The key. [out] _min The minimum value. [out] _max The maximum value.
◆ stringTypeFromKey()
StringType ignition::gui::stringTypeFromKey | ( | const std::string & | _key | ) |
Returns the string type for a given key. For example, the key "innerxml" has a PLAIN_TEXT type while "name" is a LINE.
- Parameters
-
[in] _key The key.
- Returns
- The string type.
◆ uniqueFilePath()
std::string ignition::gui::uniqueFilePath | ( | const std::string & | _pathAndName, |
const std::string & | _extension | ||
) |
Generates a path for a file which doesn't collide with existing files, by appending numbers to it (i.e. (0), (1), ...)
- Parameters
-
[in] _pathAndName Full absolute path and file name up to the file extension. [in] _extension File extension, such as "pdf".
- Returns
- Full path, with name and extension, which doesn't collide with existing files
◆ unitFromKey()
std::string ignition::gui::unitFromKey | ( | const std::string & | _key, |
const std::string & | _type = "" |
||
) |
Returns the unit for a given key. For example, the key "mass" returns "kg".
- Parameters
-
[in] _key The key. [in] _type In case the key may have more than one type, the type must be given too. For example, a prismatic joint will have different units from a revolute joint.
- Returns
- The unit.
◆ worldNames()
QStringList ignition::gui::worldNames | ( | ) |
The main window's "worldNames" property may be filled with a list of the names of all worlds currently loaded. This information can be used by plugins to choose which world to work with. This helper function provides a handy access to the world names list.
- Returns
- List of world names, as stored in the
MainWindow
's "worldNames" property.