From 8f4f95f8d148715dcc38b1f4ef89fa71f87b3c17 Mon Sep 17 00:00:00 2001 From: Jenn Nguyen Date: Mon, 29 Mar 2021 14:56:51 -0700 Subject: [PATCH 1/2] edifice tutorial updates Signed-off-by: Jenn Nguyen --- README.md | 20 ++++---------------- tutorials/03_plugins.md | 6 +++--- tutorials/04_layout.md | 8 ++++---- tutorials/05_style.md | 6 +++--- tutorials/07_config.md | 9 ++++----- 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 7f382a464..33372aa85 100644 --- a/README.md +++ b/README.md @@ -70,23 +70,11 @@ where the YAML file for the package is found, such as export IGN_CONFIG_PATH=/usr/local/share/ignition ``` -However, that environment variable only takes a single path, which means if the -installations from source are in different locations, only one can be specified. - -Another workaround for working with multiple Ignition libraries on the command -line is using symbolic links to each library's YAML file. +Multiple paths can be specified using the `:` delimiter. For example, ``` -mkdir ~/.ignition/tools/configs -p -cd ~/.ignition/tools/configs/ -ln -s /usr/local/share/ignition/fuel6.yaml . -ln -s /usr/local/share/ignition/transport10.yaml . -ln -s /usr/local/share/ignition/transportlog10.yaml . -... -export IGN_CONFIG_PATH=$HOME/.ignition/tools/configs +export IGN_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location ``` -This issue is tracked [here](https://github.com/ignitionrobotics/ign-tools/issues/8). - # Folder Structure * `include/ignition/gui`: Contains all the files which will be installed, such as @@ -107,9 +95,9 @@ This issue is tracked [here](https://github.com/ignitionrobotics/ign-tools/issue `ign gui -c ` * `examples/plugin`: Example plugins which can be compiled and loaded as explained - in [this tutorial](https://ignitionrobotics.org/api/gui/1.0/plugins.html). + in [this tutorial](https://ignitionrobotics.org/api/gui/5.0/plugins.html). -* `tutorials`: Markdown files for the [tutorials](https://ignitionrobotics.org/api/gui/1.0/tutorials.html). +* `tutorials`: Markdown files for the [tutorials](https://ignitionrobotics.org/api/gui/5.0/tutorials.html). * `conf`: Files needed by [ign-tools](https://github.com/ignitionrobotics/ign-tools). diff --git a/tutorials/03_plugins.md b/tutorials/03_plugins.md index 15a4df333..0f3f61614 100644 --- a/tutorials/03_plugins.md +++ b/tutorials/03_plugins.md @@ -8,9 +8,9 @@ Previous Tutorial: \ref commandline An Ignition GUI plugin is a shared library that defines a widget. The plugin contains [QML](https://doc.qt.io/qt-5/qtqml-index.html) code that specifies what the widget looks like, as well as C++ code -that defines the plugin's behaviour and ties it to other libraries. +that defines the plugin's behavior and ties it to other libraries. -See [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui3/examples/plugin/hello_plugin/) +See [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui5/examples/plugin/hello_plugin/) for an example. ## Finding plugins @@ -20,7 +20,7 @@ Ignition GUI will look for plugins on the following paths, in this order: 1. All paths set on the `IGN_GUI_PLUGIN_PATH` environment variable 2. All paths added by calling `ignition::gui::addPluginPath` 3. `~/.ignition/gui/plugins` -4. [Plugins which are installed with Ignition GUI](https://ignitionrobotics.org/api/gui/3.3/namespaceignition_1_1gui_1_1plugins.html) +4. [Plugins which are installed with Ignition GUI](https://ignitionrobotics.org/api/gui/5.0/namespaceignition_1_1gui_1_1plugins.html) ## Configuring plugins diff --git a/tutorials/04_layout.md b/tutorials/04_layout.md index 6d04697e1..5e642955f 100644 --- a/tutorials/04_layout.md +++ b/tutorials/04_layout.md @@ -8,14 +8,14 @@ Previous Tutorial: \ref plugins It's possible to define the layout of various plugins loaded to the main window by adding a `` element to the config file. The child elements are: -* ``: **v0** Horizontal position of window's top-left corner in pixels. -* ``: **v0** Vertical position of window's top-left corner in pixels. +* ``: Horizontal position of window's top-left corner in pixels. +* ``: Vertical position of window's top-left corner in pixels. * ``: Window's width in pixels * ``: Window's height in pixels -* ``: **v0** The state of the widow's docks and tabs, described as a Base64 +* ``: The state of the window's docks and tabs, described as a Base64 encoded `QByteArray`. More information [here](http://doc.qt.io/qt-5/qmainwindow.html#saveState). -* ``: **v0** Configure menu options +* ``: Configure menu options * ``: Side drawer configuration. * `visible`: Set to false to hide the drawer and the button to trigger it. * ``: Plugins menu configuration. diff --git a/tutorials/05_style.md b/tutorials/05_style.md index 01c4b48cc..4995814f2 100644 --- a/tutorials/05_style.md +++ b/tutorials/05_style.md @@ -12,7 +12,7 @@ but it is also possible to use others such as Default and Universal. This tutori focuses on customizing the Material style. The default style is hardcoded into the -[qtquickcontrols2.conf](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui4/include/ignition/gui/qtquickcontrols2.conf) +[qtquickcontrols2.conf](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui5/include/ignition/gui/qtquickcontrols2.conf) file. There are a few ways to override the default style: @@ -21,7 +21,7 @@ There are a few ways to override the default style: * Setting environment variables (env) * Through Ignition GUI config files (config) -If styles are set from multiple sources, this is the order in which they take precendence: +If styles are set from multiple sources, this is the order in which they take precedence: **GUI > config > env** @@ -45,7 +45,7 @@ On top of those, Ignition GUI also offers a few variables specific to customizin the top toolbar. By default, the top toolbar will use the primary color, while the plugin toolbars will -use the accent color, according to the current theme. Users can override this behaviour +use the accent color, according to the current theme. Users can override this behavior and decouple the toolbar colors from the rest of the controls with the following variables: diff --git a/tutorials/07_config.md b/tutorials/07_config.md index 240ac6786..04524fde6 100644 --- a/tutorials/07_config.md +++ b/tutorials/07_config.md @@ -20,7 +20,7 @@ From the command line, use the `--config` / `-c` option, for example: `ign gui -c path/to/example.config` From the C++ API, pass the file path to -[Application::LoadConfig](https://ignitionrobotics.org/api/gui/3.0/classignition_1_1gui_1_1Application.html#a03c4c3a1b1e58cc4bff05658f21fff17). +[Application::LoadConfig](https://ignitionrobotics.org/api/gui/5.0/classignition_1_1gui_1_1Application.html#a03c4c3a1b1e58cc4bff05658f21fff17). ### File structure @@ -32,12 +32,12 @@ Ignition GUI accepts the following top-level elements on a config file: * `filename`: This attribute specifies the plugin library to be loaded. * ``: Ignition GUI processes this block before passing the config to the plugin. See - [plugin_params.config](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui2/examples/config/plugin_params.config) + [plugin_params.config](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui5/examples/config/plugin_params.config) for an example. * custom elements: Developers can read custom plugin configurations overriding the - [Plugin::LoadConfig](https://ignitionrobotics.org/api/gui/3.0/classignition_1_1gui_1_1Plugin.html#a72064530af4cd247b994b905559fd4ee) + [Plugin::LoadConfig](https://ignitionrobotics.org/api/gui/5.0/classignition_1_1gui_1_1Plugin.html#a72064530af4cd247b994b905559fd4ee) function, see the - [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui2/examples/plugin/hello_plugin/HelloPlugin.cc) + [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/ign-gui5/examples/plugin/hello_plugin/HelloPlugin.cc) example. See the example plugin block below: @@ -52,4 +52,3 @@ See the example plugin block below: This will load the `libImageDisplay.so` plugin, Ignition GUI will set its `height` to `120` pixels, and the plugin-specific `` parameter will be handled within `ImageDisplay::LoadConfig`. - From 80cc15dce6fab705aef5e61124f7901caa134cfa Mon Sep 17 00:00:00 2001 From: Jenn Nguyen Date: Mon, 29 Mar 2021 15:20:41 -0700 Subject: [PATCH 2/2] removed elements that don't work Signed-off-by: Jenn Nguyen --- examples/config/layout.config | 2 -- examples/config/scene3d.config | 2 -- tutorials/04_layout.md | 5 ----- 3 files changed, 9 deletions(-) diff --git a/examples/config/layout.config b/examples/config/layout.config index 5d278f79e..26f6f5e60 100644 --- a/examples/config/layout.config +++ b/examples/config/layout.config @@ -1,8 +1,6 @@ - 873 - 230 550 551 diff --git a/examples/config/scene3d.config b/examples/config/scene3d.config index 54c3cdd3d..08e5e3e75 100644 --- a/examples/config/scene3d.config +++ b/examples/config/scene3d.config @@ -1,8 +1,6 @@ - 815 - 341 1216 894 diff --git a/tutorials/04_layout.md b/tutorials/04_layout.md index 5e642955f..2677bea4f 100644 --- a/tutorials/04_layout.md +++ b/tutorials/04_layout.md @@ -8,13 +8,8 @@ Previous Tutorial: \ref plugins It's possible to define the layout of various plugins loaded to the main window by adding a `` element to the config file. The child elements are: -* ``: Horizontal position of window's top-left corner in pixels. -* ``: Vertical position of window's top-left corner in pixels. * ``: Window's width in pixels * ``: Window's height in pixels -* ``: The state of the window's docks and tabs, described as a Base64 - encoded `QByteArray`. More information - [here](http://doc.qt.io/qt-5/qmainwindow.html#saveState). * ``: Configure menu options * ``: Side drawer configuration. * `visible`: Set to false to hide the drawer and the button to trigger it.