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 Ignition Headers : gz-gui #466

Merged
merged 8 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ find_package(ignition-cmake2 2.14 REQUIRED)
#============================================================================
# Configure the project
#============================================================================
ign_configure_project()
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/gui
)

#============================================================================
# Set project-specific options
Expand Down
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
1. Common widget GzColor
* [Pull request #410](https://github.com/gazebosim/gz-gui/pull/410)

1. Fix ign_TEST
1. Fix gz_TEST
* [Pull request #420](https://github.com/gazebosim/gz-gui/pull/420)

1. Make display tests more robust
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/custom_context_menu/CustomContext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/

#include <iostream>
#include <ignition/plugin/Register.hh>
#include <gz/plugin/Register.hh>

#include "CustomContext.hh"

using namespace ignition;
using namespace gz;
using namespace gui;

/////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions examples/plugin/custom_context_menu/CustomContext.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*
*/

#ifndef IGNITION_GUI_CUSTOMCONTEXTPLUGIN_HH_
#define IGNITION_GUI_CUSTOMCONTEXTPLUGIN_HH_
#ifndef GZ_GUI_CUSTOMCONTEXTPLUGIN_HH_
#define GZ_GUI_CUSTOMCONTEXTPLUGIN_HH_

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Plugin.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Plugin.hh>
#endif

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/dialog_from_plugin/DialogFromPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/

#include <iostream>
#include <ignition/plugin/Register.hh>
#include <gz/plugin/Register.hh>

#include "DialogFromPlugin.hh"

using namespace ignition;
using namespace gz;
using namespace gui;

/////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions examples/plugin/dialog_from_plugin/DialogFromPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*
*/

#ifndef IGNITION_GUI_DIALOGFROMPLUGIN_HH_
#define IGNITION_GUI_DIALOGFROMPLUGIN_HH_
#ifndef GZ_GUI_DIALOGFROMPLUGIN_HH_
#define GZ_GUI_DIALOGFROMPLUGIN_HH_

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Plugin.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Plugin.hh>
#endif

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/hello_plugin/HelloPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/

#include <iostream>
#include <ignition/plugin/Register.hh>
#include <gz/plugin/Register.hh>

#include "HelloPlugin.hh"

using namespace ignition;
using namespace gz;
using namespace gui;

/////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions examples/plugin/hello_plugin/HelloPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*
*/

#ifndef IGNITION_GUI_HELLOPLUGIN_HH_
#define IGNITION_GUI_HELLOPLUGIN_HH_
#ifndef GZ_GUI_HELLOPLUGIN_HH_
#define GZ_GUI_HELLOPLUGIN_HH_

#include <string>

#include <ignition/gui/qt.h>
#include <ignition/gui/Plugin.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Plugin.hh>

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
6 changes: 3 additions & 3 deletions examples/plugin/ign_components/IgnComponents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

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

// Register this plugin
IGNITION_ADD_PLUGIN(ignition::gui::IgnComponents,
ignition::gui::Plugin);
IGNITION_ADD_PLUGIN(gz::gui::IgnComponents,
gz::gui::Plugin);
8 changes: 4 additions & 4 deletions examples/plugin/ign_components/IgnComponents.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*
*/

#ifndef IGNITION_GUI_EXAMPLES_PLUGIN_IGNCOMPONENTS_HH_
#define IGNITION_GUI_EXAMPLES_PLUGIN_IGNCOMPONENTS_HH_
#ifndef GZ_GUI_EXAMPLES_PLUGIN_IGNCOMPONENTS_HH_
#define GZ_GUI_EXAMPLES_PLUGIN_IGNCOMPONENTS_HH_

#include <ignition/gui/Plugin.hh>
#include <gz/gui/Plugin.hh>

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/multiple_qml/MultipleQml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/

#include <iostream>
#include <ignition/plugin/Register.hh>
#include <gz/plugin/Register.hh>

#include "MultipleQml.hh"

using namespace ignition;
using namespace gz;
using namespace gui;

/////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions examples/plugin/multiple_qml/MultipleQml.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*
*/

#ifndef IGNITION_GUI_EXAMPLES_PLUGINS_MULTIPLEQML_HH_
#define IGNITION_GUI_EXAMPLES_PLUGINS_MULTIPLEQML_HH_
#ifndef GZ_GUI_EXAMPLES_PLUGINS_MULTIPLEQML_HH_
#define GZ_GUI_EXAMPLES_PLUGINS_MULTIPLEQML_HH_

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Plugin.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Plugin.hh>
#endif

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
16 changes: 8 additions & 8 deletions examples/standalone/custom_drawer/custom_drawer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@
*
*/

#include <ignition/common/Console.hh>
#include <gz/common/Console.hh>

#ifndef Q_MOC_RUN
#include <ignition/gui/Application.hh>
#include <ignition/gui/MainWindow.hh>
#include <ignition/gui/qt.h>
#include <gz/gui/Application.hh>
#include <gz/gui/MainWindow.hh>
#include <gz/gui/qt.h>
#include "custom_drawer.hh"
#endif

//////////////////////////////////////////////////
int main(int _argc, char **_argv)
{
// Increase verboosity so we see all messages
ignition::common::Console::SetVerbosity(4);
gz::common::Console::SetVerbosity(4);

// Initialize app
ignition::gui::Application app(_argc, _argv);
gz::gui::Application app(_argc, _argv);

// Hide original panel
app.LoadConfig("../custom_drawer.config");

// Let QML files use CustomActions' functions and properties
ignition::gui::CustomActions actions;
gz::gui::CustomActions actions;
auto context = new QQmlContext(app.Engine()->rootContext());
context->setContextProperty("CustomActions", &actions);

Expand All @@ -54,7 +54,7 @@ int main(int _argc, char **_argv)
QQmlEngine::setObjectOwnership(item, QQmlEngine::CppOwnership);

// Add to main window
auto win = app.findChild<ignition::gui::MainWindow *>()->QuickWindow();
auto win = app.findChild<gz::gui::MainWindow *>()->QuickWindow();
auto drawerItem = win->findChild<QQuickItem *>("sideDrawer");

item->setParentItem(drawerItem);
Expand Down
8 changes: 4 additions & 4 deletions examples/standalone/custom_drawer/custom_drawer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
*
*/

#ifndef IGNITION_GUI_EXAMPLES_STANDALONE_CUSTOMDRAWER_HH_
#define IGNITION_GUI_EXAMPLES_STANDALONE_CUSTOMDRAWER_HH_
#ifndef GZ_GUI_EXAMPLES_STANDALONE_CUSTOMDRAWER_HH_
#define GZ_GUI_EXAMPLES_STANDALONE_CUSTOMDRAWER_HH_

#include <iostream>

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <gz/gui/qt.h>
#endif

namespace ignition
namespace gz
{
namespace gui
{
Expand Down
14 changes: 7 additions & 7 deletions examples/standalone/dialogs/dialogs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

#include <iostream>

#include <ignition/common/Console.hh>
#include <gz/common/Console.hh>

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Application.hh>
#include <ignition/gui/Dialog.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#include <gz/gui/Dialog.hh>
#endif

//////////////////////////////////////////////////
Expand All @@ -31,11 +31,11 @@ int main(int _argc, char **_argv)
std::cout << "Hello, GUI!" << std::endl;

// Increase verboosity so we see all messages
ignition::common::Console::SetVerbosity(4);
gz::common::Console::SetVerbosity(4);

// Initialize app
ignition::gui::Application app(_argc, _argv,
ignition::gui::WindowType::kDialog);
gz::gui::Application app(_argc, _argv,
gz::gui::WindowType::kDialog);

// Load plugins / config
app.LoadPlugin("Publisher");
Expand Down
16 changes: 8 additions & 8 deletions examples/standalone/start_dialog/start_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@

#include <iostream>

#include <ignition/gui/qt.h>
#include <ignition/gui/Application.hh>
#include <ignition/gui/Dialog.hh>
#include <ignition/gui/MainWindow.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#include <gz/gui/Dialog.hh>
#include <gz/gui/MainWindow.hh>

//////////////////////////////////////////////////
int main(int _argc, char **_argv)
{
// Increase verboosity so we see all messages
ignition::common::Console::SetVerbosity(4);
gz::common::Console::SetVerbosity(4);

// Create app
ignition::gui::Application app(_argc, _argv, ignition::gui::WindowType::kDialog);
gz::gui::Application app(_argc, _argv, gz::gui::WindowType::kDialog);

igndbg << "Open dialog" << std::endl;

// Add and display a dialog
auto dialog = new ignition::gui::Dialog();
auto dialog = new gz::gui::Dialog();
dialog->QuickWindow();

std::string qmlFile(":start_dialog/start_dialog.qml");
Expand All @@ -45,7 +45,7 @@ int main(int _argc, char **_argv)
return -1;
}

QQmlComponent dialogComponent(ignition::gui::App()->Engine(),
QQmlComponent dialogComponent(gz::gui::App()->Engine(),
QString(QString::fromStdString(qmlFile)));
if (dialogComponent.isError())
{
Expand Down
12 changes: 6 additions & 6 deletions examples/standalone/window/window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <iostream>

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Application.hh>
#include <ignition/gui/MainWindow.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#include <gz/gui/MainWindow.hh>
#endif

//////////////////////////////////////////////////
Expand All @@ -29,10 +29,10 @@ int main(int _argc, char **_argv)
std::cout << "Hello, GUI!" << std::endl;

// Increase verboosity so we see all messages
ignition::common::Console::SetVerbosity(4);
gz::common::Console::SetVerbosity(4);

// Create app
ignition::gui::Application app(_argc, _argv);
gz::gui::Application app(_argc, _argv);

// Load plugins / config
if (!app.LoadPlugin("Publisher"))
Expand All @@ -41,7 +41,7 @@ int main(int _argc, char **_argv)
}

// Customize main window
auto win = app.findChild<ignition::gui::MainWindow *>()->QuickWindow();
auto win = app.findChild<gz::gui::MainWindow *>()->QuickWindow();
win->setProperty("title", "Hello Window!");

// Run window
Expand Down
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(ignition)
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
File renamed without changes.
Loading