Skip to content

Commit

Permalink
Migrate examples
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed May 25, 2022
1 parent 9b65b81 commit bc90810
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ find_package(ignition-common5 REQUIRED)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC IgnComponents.qrc)
QT5_ADD_RESOURCES(resources_RCC GzComponents.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
Expand All @@ -34,11 +34,11 @@ link_directories(
)

# Generate examples
add_library(IgnComponents SHARED ${headers_MOC}
IgnComponents.cc
add_library(GzComponents SHARED ${headers_MOC}
GzComponents.cc
${resources_RCC}
)
target_link_libraries(IgnComponents
target_link_libraries(GzComponents
${IGNITION-GUI_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

#include <gz/plugin/Register.hh>
#include "IgnComponents.hh"
#include "GzComponents.hh"

// Register this plugin
IGNITION_ADD_PLUGIN(ignition::gui::IgnComponents,
IGNITION_ADD_PLUGIN(ignition::gui::GzComponents,
ignition::gui::Plugin);
2 changes: 2 additions & 0 deletions examples/plugin/gz_components/GzComponents.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<plugin filename="GzComponents">
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ namespace ignition
{
namespace gui
{
class IgnComponents : public Plugin
class GzComponents : public Plugin
{
Q_OBJECT

/// \brief Constructor
public: IgnComponents() = default;
public: GzComponents() = default;
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Column {
spacing: 2

// Integer spin box
IgnSpinBox {
GzSpinBox {
minimumValue: -2
maximumValue: 19
decimals: 0
Expand All @@ -32,7 +32,7 @@ Column {
}

// Double spin box
IgnSpinBox {
GzSpinBox {
minimumValue: -2.5
maximumValue: 19.3
decimals: 4
Expand Down
5 changes: 5 additions & 0 deletions examples/plugin/gz_components/GzComponents.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="GzComponents/">
<file>GzComponents.qml</file>
</qresource>
</RCC>
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ useful for downstream developers.
Standalone:

cd build
export GZ_GUI_PLUGIN_PATH=`pwd`; ign gui -s IgnComponents
export GZ_GUI_PLUGIN_PATH=`pwd`; ign gui -s GzComponents

Within a window where other plugins can also be inserted, using a custom
configuration:

cd build
export GZ_GUI_PLUGIN_PATH=`pwd`; ign gui -c ../IgnComponents.config

export GZ_GUI_PLUGIN_PATH=`pwd`; ign gui -c ../GzComponents.config
2 changes: 0 additions & 2 deletions examples/plugin/ign_components/IgnComponents.config

This file was deleted.

5 changes: 0 additions & 5 deletions examples/plugin/ign_components/IgnComponents.qrc

This file was deleted.

0 comments on commit bc90810

Please sign in to comment.