Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero committed Jul 10, 2024
1 parent 0214391 commit bcf1e09
Show file tree
Hide file tree
Showing 34 changed files with 133 additions and 125 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ set(GZ_TOOLS_VER 2)
#--------------------------------------
# Find QT
set(QT_MAJOR_VERSION 6)
set(QT_MINOR_VERSION 0)
set(QT_MINOR_VERSION 4)
gz_find_package (Qt${QT_MAJOR_VERSION}
VERSION ${QT_MAJOR_VERSION}.${QT_MINOR_VERSION}
COMPONENTS
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/custom_context_menu/CustomContext.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*
*/
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick
import QtQuick.Controls

Rectangle {
id: customContext
Expand Down
8 changes: 4 additions & 4 deletions examples/plugin/dialog_from_plugin/DialogFromPlugin.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Dialogs 1.0
import QtQuick.Window 2.2
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Window

Rectangle {
id: customPlugin
Expand Down
6 changes: 3 additions & 3 deletions examples/plugin/gz_components/GzComponents.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.0
import gz.gui 1.0
import QtQuick
import QtQuick.Controls
import gz.gui

Column {
anchors.fill: parent
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/hello_plugin/HelloPlugin.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*
*/
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick
import QtQuick.Controls
Rectangle {
color: "transparent"
anchors.fill: parent
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/multiple_qml/MultipleQml.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*
*/
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick
import QtQuick.Controls
import "qrc:/MultipleQml_qml"

Column {
Expand Down
6 changes: 3 additions & 3 deletions examples/standalone/custom_drawer/CustomDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material

/**
* Custom drawer
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/start_dialog/start_dialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*
*/
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick
import QtQuick.Controls
Rectangle {
color: "green"
anchors.fill: parent
Expand Down
13 changes: 12 additions & 1 deletion include/gz/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,20 @@ if (QT_MAJOR_VERSION EQUAL 6)
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/gz/gui9>
)

install(
TARGETS ${PROJECT_LIBRARY_TARGET_NAME}
EXPORT ${PROJECT_LIBRARY_TARGET_NAME}
LIBRARY DESTINATION ${GZ_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${GZ_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${GZ_BIN_INSTALL_DIR}
COMPONENT libraries)

_gz_create_cmake_package()
_gz_create_pkgconfig()

else()
set (resources resources.qrc)
qt_wrap_cpp(headers_MOC ${qt_headers})
Expand Down
14 changes: 6 additions & 8 deletions include/gz/gui/qml/GzPose.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*
*/
import QtQuick
import QtQuick.Control
import QtQuick.Layout
import QtQuick.Controls.Styles
import QtQuick.Layouts

/**
* Item displaying 3D pose information.
Expand Down Expand Up @@ -80,7 +78,7 @@ Item {
signal gzPoseSet(double _x, double _y, double _z, double _roll, double _pitch, double _yaw)

// Maximum spinbox value
property double spinMax: Number.MAX_VALUE
property int spinMax: Number.MAX_VALUE

// Expand/Collapse of this widget
property bool expand: true
Expand Down Expand Up @@ -121,10 +119,10 @@ Item {
GzSpinBox {
id: writableSpin
value: numberValue
minimumValue: -spinMax
maximumValue: spinMax
decimals: gzHelper.getDecimals(writableSpin.width)
onEditingFinished: {
from: -spinMax
to: spinMax
//decimals: gzHelper.getDecimals(writableSpin.width)
onValueChanged: {
gzPoseRoot.gzPoseSet(xItem.value, yItem.value, zItem.value,
rollItem.value, pitchItem.value, yawItem.value)
}
Expand Down
2 changes: 1 addition & 1 deletion include/gz/gui/qml/PlottingInterface.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import QtQuick.Controls.Styles
import QtQuick.Controls.Material
import QtQuick.Layouts
import Qt.labs.platform
import "qrc:/qml"
import "qrc:/gz/gui/qml"

Rectangle
{
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/CameraFps/CameraFps.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Rectangle {
id: cameraFps
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/CameraTracking/CameraTracking.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ColumnLayout {
Layout.minimumWidth: 350
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/GridConfig/GridConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
import QtQuick.Dialogs 1.0
import QtQuick.Layouts 1.3
import "qrc:/qml"
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Dialogs
import QtQuick.Layouts
import "qrc:/gz/gui/qml"

GridLayout {
columns: 4
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/ImageDisplay/ImageDisplay.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts

Rectangle {
id: "imageDisplay"
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/InteractiveViewControl/InteractiveViewControl.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ColumnLayout {
Layout.minimumWidth: 350
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/KeyPublisher/KeyPublisher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

GridLayout {
columns: 1
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/MarkerManager/MarkerManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ColumnLayout {
Layout.minimumWidth: 350
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/NavsatMap/NavSatMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.1
import QtLocation 5.6
import QtPositioning 5.6
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtLocation
import QtPositioning

Item {
id: navSatMap
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/Plotting/TransportPlotting.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*
*/
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

import "qrc:/qml"
import "qrc:/gz/gui/qml"

PlottingInterface {
Layout.minimumWidth: 600
Expand Down
14 changes: 7 additions & 7 deletions src/plugins/PointCloud/PointCloud.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*
*/

import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Dialogs 1.0
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.3
import gz.gui 1.0
import "qrc:/qml"
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Controls.Material
import QtQuick.Layouts
import gz.gui
import "qrc:/gz/gui/qml"

ColumnLayout {
spacing: 10
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/Publisher/Publisher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Rectangle {
id: publisher
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/Screenshot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ gz_gui_add_plugin(Screenshot
Screenshot.cc
QT_HEADERS
Screenshot.hh
QML_SOURCES
Screenshot.qml
PUBLIC_LINK_LIBS
gz-rendering${GZ_RENDERING_VER}::gz-rendering${GZ_RENDERING_VER}
TEST_SOURCES
Expand Down
25 changes: 11 additions & 14 deletions src/plugins/Screenshot/Screenshot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.2
import QtQuick.Controls.Material.impl 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import QtQuick.Layouts
import QtQuick.Dialogs

ToolBar {
Layout.minimumWidth: 200
Expand Down Expand Up @@ -65,18 +64,16 @@ ToolBar {
sourceSize.height: 40
}
onClicked: {
fileDialog.open()
folderDialog.open()
}
}

FileDialog {
id: fileDialog
FolderDialog {
id: folderDialog
title: "Save screenshots"
folder: Screenshot.directory
selectExisting: false
selectFolder: true
currentFolder: Screenshot.directory
onAccepted: {
Screenshot.SetDirectory(fileDialog.folder)
Screenshot.SetDirectory(folderDialog.folder)
close()
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/ShutdownButton/ShutdownButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.3
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts

RowLayout {
id: shutdownButton
Expand Down
Loading

0 comments on commit bcf1e09

Please sign in to comment.