Skip to content

Commit

Permalink
[ign to gz] Deduplicate QML files (#449)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Aug 2, 2022
1 parent 457e4d7 commit 17c7302
Show file tree
Hide file tree
Showing 29 changed files with 36 additions and 4,450 deletions.
2 changes: 2 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ release will remove the deprecated code.
* CMake `-config` files
* Paths that depend on the project name

* QML `import ignition.gui 1.0` is deprecated, use `import gz.gui 1.0` instead.

## Gazebo GUI 6.2 to 6.3

* New QML dependencies, only needed for the NavSatMap plugin: `qml-module-qtlocation`, `qml-module-qtpositioning`
Expand Down
2 changes: 1 addition & 1 deletion examples/config/plugin_params.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Properties passed directly to the QML card.
It includes:
* All Pane properties: https://doc.qt.io/qt-5/qml-qtquick-controls2-pane-members.html
* All custom properties within IgnCard.qml
* All custom properties within GzCard.qml
-->
<property type="bool" key="showDockButton">false</property>
<property type="double" key="x">350</property>
Expand Down
11 changes: 10 additions & 1 deletion examples/plugin/gz_components/GzComponents.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
import QtQuick 2.9
import QtQuick.Controls 2.0
import "qrc:/qml"
import gz.gui 1.0

Column {
anchors.fill: parent
Expand All @@ -40,4 +40,13 @@ Column {
value: 5.8
width: 300
}

// Deprecated spin box
IgnSpinBox {
minimumValue: -2
maximumValue: 19
decimals: 0
stepSize: 3
value: 5
}
}
5 changes: 5 additions & 0 deletions include/gz/gui/qml/qmldir
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module gz.gui

GzSnackBar 1.0 GzSnackBar.qml
GzSpinBox 1.0 GzSpinBox.qml

# Deprecated components, remove on tock
IgnSnackBar 1.0 GzSnackBar.qml
IgnSpinBox 1.0 GzSpinBox.qml
8 changes: 8 additions & 0 deletions include/gz/gui/qml/qmldir_deprecated
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Deprecated module, remove on tock
module ignition.gui

GzSnackBar 1.0 GzSnackBar.qml
GzSpinBox 1.0 GzSpinBox.qml

IgnSnackBar 1.0 GzSnackBar.qml
IgnSpinBox 1.0 GzSpinBox.qml
22 changes: 9 additions & 13 deletions include/gz/gui/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,21 @@
<file>qml/images/menu.png</file>
<file>qml/images/export_icon.png</file>
<file>qml/images/search.svg</file>

<file alias="qml/IgnCard.qml">qml/GzCard.qml</file>
<file alias="qml/IgnCardSettings.qml">qml/GzCardSettings.qml</file>
<file alias="qml/IgnHelpers.qml">qml/GzHelpers.qml</file>
<file alias="qml/IgnRulers.qml">qml/GzRulers.qml</file>
<file alias="qml/IgnSnackBar.qml">qml/GzSnackBar.qml</file>
<file alias="qml/IgnSortFilterModel.qml">qml/GzSortFilterModel.qml</file>
<file alias="qml/IgnSpinBox.qml">qml/GzSpinBox.qml</file>
<file alias="qml/IgnSplit.qml">qml/GzSplit.qml</file>
<file alias="IgnSnackBar.qml">qml/GzSnackBar.qml</file>
<file alias="IgnSpinBox.qml">qml/GzSpinBox.qml</file>
</qresource>

<qresource prefix="gz-gui-qml/gz/gui">
<!-- This qmldir file defines a QML module that can be imported -->
<file alias="qmldir">qml/qmldir</file>

<!-- Add any QML components referenced in the qmldir file here -->
<file alias="GzSnackBar.qml">qml/GzSnackBar.qml</file>
<file alias="GzSpinBox.qml">qml/GzSpinBox.qml</file>
<file alias="IgnSnackBar.qml">qml/GzSnackBar.qml</file>
<file alias="IgnSpinBox.qml">qml/GzSpinBox.qml</file>
</qresource>

<!-- Deprecated module - remove on tock -->
<qresource prefix="gz-gui-qml/ignition/gui">
<file alias="qmldir">qml/qmldir_deprecated</file>
<file alias="GzSnackBar.qml">qml/GzSnackBar.qml</file>
<file alias="GzSpinBox.qml">qml/GzSpinBox.qml</file>
</qresource>
</RCC>
Loading

0 comments on commit 17c7302

Please sign in to comment.