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 to gz] Deduplicate QML files #449

Merged
merged 3 commits into from
Aug 2, 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
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