Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz Migrate Examples : gz-gui #406

Merged
merged 1 commit into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.