diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2017-09-15 15:44:56 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2017-09-19 13:59:07 +0000 |
commit | afc0cd7bdf9c28b647e8fca53f52a25c8a2dee1c (patch) | |
tree | 347cf0f8351380560e4a2b04c5f40fa9ec0e5719 | |
parent | 4c87c28440375147d7bfdd5bd5cd6c514d56c802 (diff) |
Cleanup: reduce png sizes, Qt-ify source code, remove build warnings
Change-Id: Ia5e14e0e892cbc44c32e737545d6c9d27a7d53b7
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
116 files changed, 90 insertions, 521 deletions
diff --git a/copydata.pro b/copydata.pro new file mode 100644 index 0000000..51bf1a7 --- /dev/null +++ b/copydata.pro @@ -0,0 +1,7 @@ +TEMPLATE = aux + +# Copy all QML files during the build time +copydata.commands = $(COPY_DIR) $$PWD/apps $$PWD/imports $$PWD/sysui $$PWD/styles $$PWD/am-config.yaml $$PWD/Main.qml $$OUT_PWD + +first.depends = copydata +!equals(PWD, $$OUT_PWD):QMAKE_EXTRA_TARGETS += first copydata diff --git a/doc/src/neptune-build-run.qdoc b/doc/src/neptune-build-run.qdoc index 1a8f757..a761825 100644 --- a/doc/src/neptune-build-run.qdoc +++ b/doc/src/neptune-build-run.qdoc @@ -83,7 +83,7 @@ \li Build Neptune UI and install it by running the following command in a terminal: \badcode - qmake -r INSTALL_PREFIX=<choose a loation> neptuneui.pro + qmake -r INSTALL_PREFIX=<choose a loation> neptune-ui.pro make && make install \endcode diff --git a/examples/com.pelagicore.sheets/boards/ImageButtonBoard.qml b/examples/com.pelagicore.sheets/boards/ImageButtonBoard.qml deleted file mode 100644 index 9a301cf..0000000 --- a/examples/com.pelagicore.sheets/boards/ImageButtonBoard.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ - -import QtQuick 2.8 -import controls 1.0 -import utils 1.0 - -BaseBoard { - id: root - description: "The image button is a custom widget made as an example. It supports plain text plus and image on the left side." - - Column { - anchors.top: parent.top - anchors.topMargin: 150 - anchors.horizontalCenter: parent.horizontalCenter - spacing: 15 - Repeater { - model: 5 - delegate: ImageButton { - id: testButton - width: 220 - height: 80 - text: modelData - imageSource: Style.icon("widgets_spotify_logo") - onClicked: { - console.log('Button Nr: '+ text + ' is pressed'); - } - } - } - } -} diff --git a/imports/assets/drawable-ldpi/appstore_bottom_shadow.png b/imports/assets/drawable-ldpi/appstore_bottom_shadow.png Binary files differindex 85d6f52..7767785 100644 --- a/imports/assets/drawable-ldpi/appstore_bottom_shadow.png +++ b/imports/assets/drawable-ldpi/appstore_bottom_shadow.png diff --git a/imports/assets/drawable-ldpi/appstore_cloud_logo.png b/imports/assets/drawable-ldpi/appstore_cloud_logo.png Binary files differindex 2acb2f8..38bdce2 100644 --- a/imports/assets/drawable-ldpi/appstore_cloud_logo.png +++ b/imports/assets/drawable-ldpi/appstore_cloud_logo.png diff --git a/imports/assets/drawable-ldpi/appstore_flap.png b/imports/assets/drawable-ldpi/appstore_flap.png Binary files differindex 2143846..d14df62 100644 --- a/imports/assets/drawable-ldpi/appstore_flap.png +++ b/imports/assets/drawable-ldpi/appstore_flap.png diff --git a/imports/assets/drawable-ldpi/appstore_grid_cell_panel.png b/imports/assets/drawable-ldpi/appstore_grid_cell_panel.png Binary files differindex 82aaf95..ece2158 100644 --- a/imports/assets/drawable-ldpi/appstore_grid_cell_panel.png +++ b/imports/assets/drawable-ldpi/appstore_grid_cell_panel.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_audio.png b/imports/assets/drawable-ldpi/appstore_icon_audio.png Binary files differindex 900df57..97f23cd 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_audio.png +++ b/imports/assets/drawable-ldpi/appstore_icon_audio.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_google.png b/imports/assets/drawable-ldpi/appstore_icon_google.png Binary files differindex fac2dbf..012d316 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_google.png +++ b/imports/assets/drawable-ldpi/appstore_icon_google.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_navi.png b/imports/assets/drawable-ldpi/appstore_icon_navi.png Binary files differindex 5f24e24..c3754f9 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_navi.png +++ b/imports/assets/drawable-ldpi/appstore_icon_navi.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_phone.png b/imports/assets/drawable-ldpi/appstore_icon_phone.png Binary files differindex 28e74e6..de456d4 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_phone.png +++ b/imports/assets/drawable-ldpi/appstore_icon_phone.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_spotify.png b/imports/assets/drawable-ldpi/appstore_icon_spotify.png Binary files differindex 3c531cf..ad4e5a9 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_spotify.png +++ b/imports/assets/drawable-ldpi/appstore_icon_spotify.png diff --git a/imports/assets/drawable-ldpi/appstore_icon_video.png b/imports/assets/drawable-ldpi/appstore_icon_video.png Binary files differindex e483f39..b9d1919 100644 --- a/imports/assets/drawable-ldpi/appstore_icon_video.png +++ b/imports/assets/drawable-ldpi/appstore_icon_video.png diff --git a/imports/assets/drawable-ldpi/appstore_next_scren_indicator.png b/imports/assets/drawable-ldpi/appstore_next_scren_indicator.png Binary files differindex d15e6e6..0ad8073 100644 --- a/imports/assets/drawable-ldpi/appstore_next_scren_indicator.png +++ b/imports/assets/drawable-ldpi/appstore_next_scren_indicator.png diff --git a/imports/assets/drawable-ldpi/appstore_prev_screen_indicator.png b/imports/assets/drawable-ldpi/appstore_prev_screen_indicator.png Binary files differindex 05e17cb..1970c59 100644 --- a/imports/assets/drawable-ldpi/appstore_prev_screen_indicator.png +++ b/imports/assets/drawable-ldpi/appstore_prev_screen_indicator.png diff --git a/imports/assets/drawable-ldpi/background.png b/imports/assets/drawable-ldpi/background.png Binary files differindex a095540..9d9bb51 100644 --- a/imports/assets/drawable-ldpi/background.png +++ b/imports/assets/drawable-ldpi/background.png diff --git a/imports/assets/drawable-ldpi/climatebar_background.png b/imports/assets/drawable-ldpi/climatebar_background.png Binary files differindex a3ded8c..986900b 100644 --- a/imports/assets/drawable-ldpi/climatebar_background.png +++ b/imports/assets/drawable-ldpi/climatebar_background.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_airquality.png b/imports/assets/drawable-ldpi/climatebar_icon_airquality.png Binary files differindex 014eb09..3417ae8 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_airquality.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_airquality.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_front_heat.png b/imports/assets/drawable-ldpi/climatebar_icon_front_heat.png Binary files differindex 6ac0fa0..c1a719e 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_front_heat.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_front_heat.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_rear_heat.png b/imports/assets/drawable-ldpi/climatebar_icon_rear_heat.png Binary files differindex c03daf5..84c59e5 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_rear_heat.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_rear_heat.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_seat_left.png b/imports/assets/drawable-ldpi/climatebar_icon_seat_left.png Binary files differindex 0d6cf02..b797c30 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_seat_left.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_seat_left.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_seat_right.png b/imports/assets/drawable-ldpi/climatebar_icon_seat_right.png Binary files differindex 84b9b7a..1ca3365 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_seat_right.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_seat_right.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_seating_person.png b/imports/assets/drawable-ldpi/climatebar_icon_seating_person.png Binary files differindex da2b83e..ea935a7 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_seating_person.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_seating_person.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_steering_wheel_heat.png b/imports/assets/drawable-ldpi/climatebar_icon_steering_wheel_heat.png Binary files differindex e69d2a4..d20054d 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_steering_wheel_heat.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_steering_wheel_heat.png diff --git a/imports/assets/drawable-ldpi/climatebar_icon_ventilator.png b/imports/assets/drawable-ldpi/climatebar_icon_ventilator.png Binary files differindex e0bf083..e92f7b7 100644 --- a/imports/assets/drawable-ldpi/climatebar_icon_ventilator.png +++ b/imports/assets/drawable-ldpi/climatebar_icon_ventilator.png diff --git a/imports/assets/drawable-ldpi/cloud_arrow.png b/imports/assets/drawable-ldpi/cloud_arrow.png Binary files differindex fe0863b..76d1390 100644 --- a/imports/assets/drawable-ldpi/cloud_arrow.png +++ b/imports/assets/drawable-ldpi/cloud_arrow.png diff --git a/imports/assets/drawable-ldpi/cloud_bottom_shadow.png b/imports/assets/drawable-ldpi/cloud_bottom_shadow.png Binary files differindex 3265da8..7cd7ad7 100644 --- a/imports/assets/drawable-ldpi/cloud_bottom_shadow.png +++ b/imports/assets/drawable-ldpi/cloud_bottom_shadow.png diff --git a/imports/assets/drawable-ldpi/cloud_cloud_logo.png b/imports/assets/drawable-ldpi/cloud_cloud_logo.png Binary files differindex 31c4c36..671780f 100644 --- a/imports/assets/drawable-ldpi/cloud_cloud_logo.png +++ b/imports/assets/drawable-ldpi/cloud_cloud_logo.png diff --git a/imports/assets/drawable-ldpi/cloud_fees_symbol.png b/imports/assets/drawable-ldpi/cloud_fees_symbol.png Binary files differindex 9cc2ecf..10eeadd 100644 --- a/imports/assets/drawable-ldpi/cloud_fees_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_fees_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_flap.png b/imports/assets/drawable-ldpi/cloud_flap.png Binary files differindex c018d17..c1b1915 100644 --- a/imports/assets/drawable-ldpi/cloud_flap.png +++ b/imports/assets/drawable-ldpi/cloud_flap.png diff --git a/imports/assets/drawable-ldpi/cloud_hdiv.png b/imports/assets/drawable-ldpi/cloud_hdiv.png Binary files differindex 6d40bcf..f1872e2 100644 --- a/imports/assets/drawable-ldpi/cloud_hdiv.png +++ b/imports/assets/drawable-ldpi/cloud_hdiv.png diff --git a/imports/assets/drawable-ldpi/cloud_insurance_symbol.png b/imports/assets/drawable-ldpi/cloud_insurance_symbol.png Binary files differindex 45472d5..e1ca047 100644 --- a/imports/assets/drawable-ldpi/cloud_insurance_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_insurance_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_profile_symbol.png b/imports/assets/drawable-ldpi/cloud_profile_symbol.png Binary files differindex 7a48fcc..b4160e8 100644 --- a/imports/assets/drawable-ldpi/cloud_profile_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_profile_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_service_symbol.png b/imports/assets/drawable-ldpi/cloud_service_symbol.png Binary files differindex cb7a3c5..fceff10 100644 --- a/imports/assets/drawable-ldpi/cloud_service_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_service_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_switch_toggle_off.png b/imports/assets/drawable-ldpi/cloud_switch_toggle_off.png Binary files differindex c322dec..025b01f 100644 --- a/imports/assets/drawable-ldpi/cloud_switch_toggle_off.png +++ b/imports/assets/drawable-ldpi/cloud_switch_toggle_off.png diff --git a/imports/assets/drawable-ldpi/cloud_switch_toggle_on.png b/imports/assets/drawable-ldpi/cloud_switch_toggle_on.png Binary files differindex 1a01f3c..ed0a2b2 100644 --- a/imports/assets/drawable-ldpi/cloud_switch_toggle_on.png +++ b/imports/assets/drawable-ldpi/cloud_switch_toggle_on.png diff --git a/imports/assets/drawable-ldpi/cloud_toll_symbol.png b/imports/assets/drawable-ldpi/cloud_toll_symbol.png Binary files differindex 6d403cf..334dee2 100644 --- a/imports/assets/drawable-ldpi/cloud_toll_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_toll_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_traffic_symbol.png b/imports/assets/drawable-ldpi/cloud_traffic_symbol.png Binary files differindex 1576727..15d6e88 100644 --- a/imports/assets/drawable-ldpi/cloud_traffic_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_traffic_symbol.png diff --git a/imports/assets/drawable-ldpi/cloud_updates_symbol.png b/imports/assets/drawable-ldpi/cloud_updates_symbol.png Binary files differindex 4840eb7..758b465 100644 --- a/imports/assets/drawable-ldpi/cloud_updates_symbol.png +++ b/imports/assets/drawable-ldpi/cloud_updates_symbol.png diff --git a/imports/assets/drawable-ldpi/cluster/P-R-N-D.png b/imports/assets/drawable-ldpi/cluster/P-R-N-D.png Binary files differindex b87dcd3..6801f73 100644 --- a/imports/assets/drawable-ldpi/cluster/P-R-N-D.png +++ b/imports/assets/drawable-ldpi/cluster/P-R-N-D.png diff --git a/imports/assets/drawable-ldpi/cluster/background.png b/imports/assets/drawable-ldpi/cluster/background.png Binary files differindex 2d8ef87..71738c2 100644 --- a/imports/assets/drawable-ldpi/cluster/background.png +++ b/imports/assets/drawable-ldpi/cluster/background.png diff --git a/imports/assets/drawable-ldpi/cluster/cursor-blue.png b/imports/assets/drawable-ldpi/cluster/cursor-blue.png Binary files differindex 1a2c600..5033c70 100644 --- a/imports/assets/drawable-ldpi/cluster/cursor-blue.png +++ b/imports/assets/drawable-ldpi/cluster/cursor-blue.png diff --git a/imports/assets/drawable-ldpi/cluster/cursor.png b/imports/assets/drawable-ldpi/cluster/cursor.png Binary files differindex 52d2a85..f510511 100644 --- a/imports/assets/drawable-ldpi/cluster/cursor.png +++ b/imports/assets/drawable-ldpi/cluster/cursor.png diff --git a/imports/assets/drawable-ldpi/cluster/dial_cursor.png b/imports/assets/drawable-ldpi/cluster/dial_cursor.png Binary files differindex 633e09d..79d5b0e 100644 --- a/imports/assets/drawable-ldpi/cluster/dial_cursor.png +++ b/imports/assets/drawable-ldpi/cluster/dial_cursor.png diff --git a/imports/assets/drawable-ldpi/cluster/dial_cursor_right.png b/imports/assets/drawable-ldpi/cluster/dial_cursor_right.png Binary files differindex a406a95..93e4567 100644 --- a/imports/assets/drawable-ldpi/cluster/dial_cursor_right.png +++ b/imports/assets/drawable-ldpi/cluster/dial_cursor_right.png diff --git a/imports/assets/drawable-ldpi/cluster/dial_fill_color.png b/imports/assets/drawable-ldpi/cluster/dial_fill_color.png Binary files differindex e263124..2be4959 100644 --- a/imports/assets/drawable-ldpi/cluster/dial_fill_color.png +++ b/imports/assets/drawable-ldpi/cluster/dial_fill_color.png diff --git a/imports/assets/drawable-ldpi/cluster/dial_fill_color_left.png b/imports/assets/drawable-ldpi/cluster/dial_fill_color_left.png Binary files differindex 80813ac..bc2899c 100644 --- a/imports/assets/drawable-ldpi/cluster/dial_fill_color_left.png +++ b/imports/assets/drawable-ldpi/cluster/dial_fill_color_left.png diff --git a/imports/assets/drawable-ldpi/cluster/dial_pattern.png b/imports/assets/drawable-ldpi/cluster/dial_pattern.png Binary files differindex 2eaaffb..e44b202 100644 --- a/imports/assets/drawable-ldpi/cluster/dial_pattern.png +++ b/imports/assets/drawable-ldpi/cluster/dial_pattern.png diff --git a/imports/assets/drawable-ldpi/cluster/fuel.png b/imports/assets/drawable-ldpi/cluster/fuel.png Binary files differindex 6115d5c..422f16f 100644 --- a/imports/assets/drawable-ldpi/cluster/fuel.png +++ b/imports/assets/drawable-ldpi/cluster/fuel.png diff --git a/imports/assets/drawable-ldpi/cluster/fuel_level.png b/imports/assets/drawable-ldpi/cluster/fuel_level.png Binary files differindex 8d63990..cd042aa 100644 --- a/imports/assets/drawable-ldpi/cluster/fuel_level.png +++ b/imports/assets/drawable-ldpi/cluster/fuel_level.png diff --git a/imports/assets/drawable-ldpi/cluster/fuelsymbol.png b/imports/assets/drawable-ldpi/cluster/fuelsymbol.png Binary files differindex 5d2301d..c841ead 100644 --- a/imports/assets/drawable-ldpi/cluster/fuelsymbol.png +++ b/imports/assets/drawable-ldpi/cluster/fuelsymbol.png diff --git a/imports/assets/drawable-ldpi/cluster/fuelsymbol_orange.png b/imports/assets/drawable-ldpi/cluster/fuelsymbol_orange.png Binary files differindex a1c0b87..8518dbb 100644 --- a/imports/assets/drawable-ldpi/cluster/fuelsymbol_orange.png +++ b/imports/assets/drawable-ldpi/cluster/fuelsymbol_orange.png diff --git a/imports/assets/drawable-ldpi/cluster/km_h.png b/imports/assets/drawable-ldpi/cluster/km_h.png Binary files differindex 145d0c5..3481b03 100644 --- a/imports/assets/drawable-ldpi/cluster/km_h.png +++ b/imports/assets/drawable-ldpi/cluster/km_h.png diff --git a/imports/assets/drawable-ldpi/cluster/left_dial.png b/imports/assets/drawable-ldpi/cluster/left_dial.png Binary files differindex 9bc7fae..7560b74 100644 --- a/imports/assets/drawable-ldpi/cluster/left_dial.png +++ b/imports/assets/drawable-ldpi/cluster/left_dial.png diff --git a/imports/assets/drawable-ldpi/cluster/left_dial_background.png b/imports/assets/drawable-ldpi/cluster/left_dial_background.png Binary files differindex 29ab367..ccc6bd3 100644 --- a/imports/assets/drawable-ldpi/cluster/left_dial_background.png +++ b/imports/assets/drawable-ldpi/cluster/left_dial_background.png diff --git a/imports/assets/drawable-ldpi/cluster/left_dial_overlay.png b/imports/assets/drawable-ldpi/cluster/left_dial_overlay.png Binary files differindex 32d6656..06608b2 100644 --- a/imports/assets/drawable-ldpi/cluster/left_dial_overlay.png +++ b/imports/assets/drawable-ldpi/cluster/left_dial_overlay.png diff --git a/imports/assets/drawable-ldpi/cluster/left_mask.png b/imports/assets/drawable-ldpi/cluster/left_mask.png Binary files differindex a6ba3e3..9288d74 100644 --- a/imports/assets/drawable-ldpi/cluster/left_mask.png +++ b/imports/assets/drawable-ldpi/cluster/left_mask.png diff --git a/imports/assets/drawable-ldpi/cluster/map_mockup.png b/imports/assets/drawable-ldpi/cluster/map_mockup.png Binary files differindex 3c914b1..6ed502f 100644 --- a/imports/assets/drawable-ldpi/cluster/map_mockup.png +++ b/imports/assets/drawable-ldpi/cluster/map_mockup.png diff --git a/imports/assets/drawable-ldpi/cluster/mask_overlay.png b/imports/assets/drawable-ldpi/cluster/mask_overlay.png Binary files differindex d179e02..fe656fa 100644 --- a/imports/assets/drawable-ldpi/cluster/mask_overlay.png +++ b/imports/assets/drawable-ldpi/cluster/mask_overlay.png diff --git a/imports/assets/drawable-ldpi/cluster/middle-bkg.png b/imports/assets/drawable-ldpi/cluster/middle-bkg.png Binary files differindex ca59c1f..e7da650 100644 --- a/imports/assets/drawable-ldpi/cluster/middle-bkg.png +++ b/imports/assets/drawable-ldpi/cluster/middle-bkg.png diff --git a/imports/assets/drawable-ldpi/cluster/middle-circle.png b/imports/assets/drawable-ldpi/cluster/middle-circle.png Binary files differindex 8a42cae..b1af2b8 100644 --- a/imports/assets/drawable-ldpi/cluster/middle-circle.png +++ b/imports/assets/drawable-ldpi/cluster/middle-circle.png diff --git a/imports/assets/drawable-ldpi/cluster/my_position.png b/imports/assets/drawable-ldpi/cluster/my_position.png Binary files differindex 9490fa5..02776bf 100644 --- a/imports/assets/drawable-ldpi/cluster/my_position.png +++ b/imports/assets/drawable-ldpi/cluster/my_position.png diff --git a/imports/assets/drawable-ldpi/cluster/nav_arrow.png b/imports/assets/drawable-ldpi/cluster/nav_arrow.png Binary files differindex b6ff905..a372545 100644 --- a/imports/assets/drawable-ldpi/cluster/nav_arrow.png +++ b/imports/assets/drawable-ldpi/cluster/nav_arrow.png diff --git a/imports/assets/drawable-ldpi/cluster/nav_arrow_small.png b/imports/assets/drawable-ldpi/cluster/nav_arrow_small.png Binary files differindex 426b8b6..a9d2cb1 100644 --- a/imports/assets/drawable-ldpi/cluster/nav_arrow_small.png +++ b/imports/assets/drawable-ldpi/cluster/nav_arrow_small.png diff --git a/imports/assets/drawable-ldpi/cluster/navigation_overlay.png b/imports/assets/drawable-ldpi/cluster/navigation_overlay.png Binary files differindex 3e15cf3..59b43e3 100644 --- a/imports/assets/drawable-ldpi/cluster/navigation_overlay.png +++ b/imports/assets/drawable-ldpi/cluster/navigation_overlay.png diff --git a/imports/assets/drawable-ldpi/cluster/petrol_cluster-02.png b/imports/assets/drawable-ldpi/cluster/petrol_cluster-02.png Binary files differindex d6c6b13..7540c98 100644 --- a/imports/assets/drawable-ldpi/cluster/petrol_cluster-02.png +++ b/imports/assets/drawable-ldpi/cluster/petrol_cluster-02.png diff --git a/imports/assets/drawable-ldpi/cluster/right_dial.png b/imports/assets/drawable-ldpi/cluster/right_dial.png Binary files differindex 1df7424..f798e64 100644 --- a/imports/assets/drawable-ldpi/cluster/right_dial.png +++ b/imports/assets/drawable-ldpi/cluster/right_dial.png diff --git a/imports/assets/drawable-ldpi/cluster/right_dial_background.png b/imports/assets/drawable-ldpi/cluster/right_dial_background.png Binary files differindex 4aaf46d..2a46836 100644 --- a/imports/assets/drawable-ldpi/cluster/right_dial_background.png +++ b/imports/assets/drawable-ldpi/cluster/right_dial_background.png diff --git a/imports/assets/drawable-ldpi/cluster/right_mask.png b/imports/assets/drawable-ldpi/cluster/right_mask.png Binary files differindex 954cf17..f73e71b 100644 --- a/imports/assets/drawable-ldpi/cluster/right_mask.png +++ b/imports/assets/drawable-ldpi/cluster/right_mask.png diff --git a/imports/assets/drawable-ldpi/cluster/top_bar.png b/imports/assets/drawable-ldpi/cluster/top_bar.png Binary files differindex 81be41b..e0c41a5 100644 --- a/imports/assets/drawable-ldpi/cluster/top_bar.png +++ b/imports/assets/drawable-ldpi/cluster/top_bar.png diff --git a/imports/assets/drawable-ldpi/icon_bluetooth.png b/imports/assets/drawable-ldpi/icon_bluetooth.png Binary files differindex 3afd675..35c8f8d 100644 --- a/imports/assets/drawable-ldpi/icon_bluetooth.png +++ b/imports/assets/drawable-ldpi/icon_bluetooth.png diff --git a/imports/assets/drawable-ldpi/repeat.png b/imports/assets/drawable-ldpi/repeat.png Binary files differindex 654b0b3..7f1016b 100644 --- a/imports/assets/drawable-ldpi/repeat.png +++ b/imports/assets/drawable-ldpi/repeat.png diff --git a/imports/assets/drawable-ldpi/shadow_left.png b/imports/assets/drawable-ldpi/shadow_left.png Binary files differindex a7ec81c..2496368 100644 --- a/imports/assets/drawable-ldpi/shadow_left.png +++ b/imports/assets/drawable-ldpi/shadow_left.png diff --git a/imports/assets/drawable-ldpi/shadow_right.png b/imports/assets/drawable-ldpi/shadow_right.png Binary files differindex b2b739d..c7d7606 100644 --- a/imports/assets/drawable-ldpi/shadow_right.png +++ b/imports/assets/drawable-ldpi/shadow_right.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_battery.png b/imports/assets/drawable-ldpi/topbar_icon_battery.png Binary files differindex 082063a..5f6835f 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_battery.png +++ b/imports/assets/drawable-ldpi/topbar_icon_battery.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_break.png b/imports/assets/drawable-ldpi/topbar_icon_break.png Binary files differindex 8d340f7..a6e6372 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_break.png +++ b/imports/assets/drawable-ldpi/topbar_icon_break.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_home.png b/imports/assets/drawable-ldpi/topbar_icon_home.png Binary files differindex 67e881a..8e0cb1f 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_home.png +++ b/imports/assets/drawable-ldpi/topbar_icon_home.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_rain.png b/imports/assets/drawable-ldpi/topbar_icon_rain.png Binary files differindex 354bf10..5bf3aa4 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_rain.png +++ b/imports/assets/drawable-ldpi/topbar_icon_rain.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_sun.png b/imports/assets/drawable-ldpi/topbar_icon_sun.png Binary files differindex 884b7ad..77d2233 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_sun.png +++ b/imports/assets/drawable-ldpi/topbar_icon_sun.png diff --git a/imports/assets/drawable-ldpi/topbar_icon_wifi.png b/imports/assets/drawable-ldpi/topbar_icon_wifi.png Binary files differindex c6b4b4f..2f9b55f 100644 --- a/imports/assets/drawable-ldpi/topbar_icon_wifi.png +++ b/imports/assets/drawable-ldpi/topbar_icon_wifi.png diff --git a/imports/assets/drawable-ldpi/topbar_panel.png b/imports/assets/drawable-ldpi/topbar_panel.png Binary files differindex 608a6b8..c34b93e 100644 --- a/imports/assets/drawable-ldpi/topbar_panel.png +++ b/imports/assets/drawable-ldpi/topbar_panel.png diff --git a/imports/assets/drawable-ldpi/volume_slider_overlay.png b/imports/assets/drawable-ldpi/volume_slider_overlay.png Binary files differindex 556ca52..8afe4f7 100644 --- a/imports/assets/drawable-ldpi/volume_slider_overlay.png +++ b/imports/assets/drawable-ldpi/volume_slider_overlay.png diff --git a/imports/assets/drawable-ldpi/widgets_hdiv.png b/imports/assets/drawable-ldpi/widgets_hdiv.png Binary files differindex 4bb4b13..d63224e 100644 --- a/imports/assets/drawable-ldpi/widgets_hdiv.png +++ b/imports/assets/drawable-ldpi/widgets_hdiv.png diff --git a/imports/assets/drawable-ldpi/widgets_nav_map.png b/imports/assets/drawable-ldpi/widgets_nav_map.png Binary files differindex f426ea5..b8a69ef 100644 --- a/imports/assets/drawable-ldpi/widgets_nav_map.png +++ b/imports/assets/drawable-ldpi/widgets_nav_map.png diff --git a/imports/assets/drawable-ldpi/widgets_next_track.png b/imports/assets/drawable-ldpi/widgets_next_track.png Binary files differindex a99d068..f1c1e46 100644 --- a/imports/assets/drawable-ldpi/widgets_next_track.png +++ b/imports/assets/drawable-ldpi/widgets_next_track.png diff --git a/imports/assets/drawable-ldpi/widgets_pause_track.png b/imports/assets/drawable-ldpi/widgets_pause_track.png Binary files differindex 8af2cab..b948090 100644 --- a/imports/assets/drawable-ldpi/widgets_pause_track.png +++ b/imports/assets/drawable-ldpi/widgets_pause_track.png diff --git a/imports/assets/drawable-ldpi/widgets_phone.png b/imports/assets/drawable-ldpi/widgets_phone.png Binary files differindex 193226d..5ae4361 100644 --- a/imports/assets/drawable-ldpi/widgets_phone.png +++ b/imports/assets/drawable-ldpi/widgets_phone.png diff --git a/imports/assets/drawable-ldpi/widgets_play_track.png b/imports/assets/drawable-ldpi/widgets_play_track.png Binary files differindex 2899fbd..6fcc6ae 100644 --- a/imports/assets/drawable-ldpi/widgets_play_track.png +++ b/imports/assets/drawable-ldpi/widgets_play_track.png diff --git a/imports/assets/drawable-ldpi/widgets_prev_track.png b/imports/assets/drawable-ldpi/widgets_prev_track.png Binary files differindex 474bf05..e79789c 100644 --- a/imports/assets/drawable-ldpi/widgets_prev_track.png +++ b/imports/assets/drawable-ldpi/widgets_prev_track.png diff --git a/imports/assets/drawable-ldpi/widgets_spotify_logo.png b/imports/assets/drawable-ldpi/widgets_spotify_logo.png Binary files differindex 9e16317..8c79053 100644 --- a/imports/assets/drawable-ldpi/widgets_spotify_logo.png +++ b/imports/assets/drawable-ldpi/widgets_spotify_logo.png diff --git a/imports/assets/drawable-ldpi/widgets_vdiv.png b/imports/assets/drawable-ldpi/widgets_vdiv.png Binary files differindex 5b5090a..c3362a3 100644 --- a/imports/assets/drawable-ldpi/widgets_vdiv.png +++ b/imports/assets/drawable-ldpi/widgets_vdiv.png diff --git a/imports/assets/drawable-ldpi/worldmap.png b/imports/assets/drawable-ldpi/worldmap.png Binary files differindex 7192753..6ae97a1 100644 --- a/imports/assets/drawable-ldpi/worldmap.png +++ b/imports/assets/drawable-ldpi/worldmap.png diff --git a/imports/shared/controls/ImageButton.qml b/imports/shared/controls/ImageButton.qml deleted file mode 100644 index cd7a3f4..0000000 --- a/imports/shared/controls/ImageButton.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ - -import QtQuick 2.5 -import com.pelagicore.widgets 1.0 -import controls 1.0 -import utils 1.0 -import QtQuick.Controls 2.0 - -ImageButton { - id: root - - /*! This signal is emitted when the button is clicked. */ - signal clicked() - - background: Rectangle { - anchors.fill: parent - color: Style.colorGrey - } - - Label { - width: parent.width - anchors.left: parent.left - anchors.leftMargin: 10 - anchors.verticalCenter: parent.verticalCenter - verticalAlignment: Text.AlignVCenter - text: root.text - font.pixelSize: Style.fontSizeM - font.bold: true - } - - Image { - anchors.right: parent.right - anchors.rightMargin: 5 - anchors.verticalCenter: parent.verticalCenter - source: root.imageSource - } - - MouseArea { - id: imageButtonMouseArea - anchors.fill: parent - onClicked: { - root.clicked(); - } - } -} diff --git a/imports/shared/controls/controls.pro b/imports/shared/controls/controls.pro deleted file mode 100644 index 9593051..0000000 --- a/imports/shared/controls/controls.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - src diff --git a/imports/shared/controls/src/imagebutton.cpp b/imports/shared/controls/src/imagebutton.cpp deleted file mode 100644 index 79d0617..0000000 --- a/imports/shared/controls/src/imagebutton.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ - -#include "imagebutton.h" - -/*! - \qmltype ImageButton - \inherits Item - \inqmlmodule com.pelagicore.widgets - \brief ImageButton base type provides functionality common to buttons with images. - - ImageButton is the control for a button which requires text and image. -*/ - -ImageButton::~ImageButton() -{ - -} -/*! - \qmlproperty string ImageButton::text - - This property holds a textual description of the button. -*/ -QString ImageButton::text() const -{ - return m_text; -} - -void ImageButton::setText(const QString &text) -{ - if (m_text != text) { - m_text = text; - emit textChanged(); - } -} -/*! - \qmlproperty string ImageButton::imageSource - - This property holds the path to an image in addition to the text. -*/ -QString ImageButton::imageSource() const -{ - return m_imageSource; -} - -void ImageButton::setImageSource(const QString &imageSource) -{ - if (m_imageSource != imageSource) { - m_imageSource = imageSource; - emit imageSourceChanged(); - } -} -/*! - \qmlproperty Item ImageButton::background - - This property holds the background item. - - \code - ImageButton { - id: control - text: qsTr("Button") - imageSource: "path/to/image" - background: Rectangle { - anchors.fill: parent - color: "black" - } - } - \endcode -*/ -QQuickItem *ImageButton::background() -{ - return m_background; -} - -void ImageButton::setBackground(QQuickItem *background) -{ - if (m_background != background) { - m_background = background; - m_background->setParentItem(this); - m_background->setZ(-1); - m_background->setWidth(width()); - m_background->setHeight(height()); - emit backgroundChanged(); - } -} diff --git a/imports/shared/controls/src/imagebutton.h b/imports/shared/controls/src/imagebutton.h deleted file mode 100644 index d5bbbef..0000000 --- a/imports/shared/controls/src/imagebutton.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ - -#ifndef IMAGEBUTTON_H -#define IMAGEBUTTON_H - -#include <QQuickItem> - -class ImageButton : public QQuickItem -{ - Q_OBJECT - Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) - Q_PROPERTY(QString imageSource READ imageSource WRITE setImageSource NOTIFY imageSourceChanged FINAL) - Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) - -public: - virtual ~ImageButton(); - - QString text() const; - void setText(const QString &text); - - QString imageSource() const; - void setImageSource(const QString &imageSource); - - QQuickItem *background(); - void setBackground(QQuickItem *background); - -Q_SIGNALS : - void textChanged(); - void imageSourceChanged(); - void backgroundChanged(); - -private: - QString m_text; - QString m_imageSource; - QQuickItem *m_background; -}; - -QML_DECLARE_TYPE(ImageButton) - -#endif // IMAGEBUTTON_H - diff --git a/imports/shared/controls/src/plugin.cpp b/imports/shared/controls/src/plugin.cpp deleted file mode 100644 index 60b0bfb..0000000 --- a/imports/shared/controls/src/plugin.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ -#include <QtQml> - -#include "plugin.h" -#include "imagebutton.h" - -void Plugin::registerTypes(const char *uri) -{ - // @uri com.pelagicore.widgets - qDebug() << "Registering widget types: " << uri; - qmlRegisterType<ImageButton>(uri, 1, 0, "ImageButton"); -} - diff --git a/imports/shared/controls/src/plugin.h b/imports/shared/controls/src/plugin.h deleted file mode 100644 index 00dcddc..0000000 --- a/imports/shared/controls/src/plugin.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Neptune IVI UI. -** -** $QT_BEGIN_LICENSE:GPL-QTAS$ -** Commercial License Usage -** Licensees holding valid commercial Qt Automotive Suite licenses may use -** this file in accordance with the commercial license agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and The Qt Company. For -** licensing terms and conditions see https://www.qt.io/terms-conditions. -** For further information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -** SPDX-License-Identifier: GPL-3.0 -** -****************************************************************************/ - -#ifndef PLUGIN_H -#define PLUGIN_H - -#include <QQmlExtensionPlugin> - -class Plugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void registerTypes(const char *uri); -}; - -#endif // PLUGIN_H diff --git a/imports/shared/controls/src/qmldir b/imports/shared/controls/src/qmldir deleted file mode 100644 index 9f2c02d..0000000 --- a/imports/shared/controls/src/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module com.pelagicore.widgets -plugin qmlwidgets diff --git a/imports/shared/controls/src/src.pro b/imports/shared/controls/src/src.pro deleted file mode 100644 index 04db173..0000000 --- a/imports/shared/controls/src/src.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = lib -TARGET = qmlwidgets -QT += qml quick -CONFIG += qt plugin - -uri = com.pelagicore.widgets -load(qmlplugin) - -# Input -SOURCES += \ - plugin.cpp \ - imagebutton.cpp - -HEADERS += \ - plugin.h \ - imagebutton.h diff --git a/neptuneui.pro b/neptune-ui.pro index 3682dd7..eaefad1 100644 --- a/neptuneui.pro +++ b/neptune-ui.pro @@ -6,23 +6,21 @@ include(config.pri) SUBDIRS += plugins SUBDIRS += doc -SUBDIRS += imports/shared/controls + +copydata.file = copydata.pro +copydata.depends = plugins # HACK: CI does not have appman in dependency list, which is why # we are not building the executable to avoid failing integration tests. qtHaveModule(appman_main-private) { message("Module appman_main-private found.") SUBDIRS += src + copydata.depends += src } else { message("Module appman_main-private not found. Custom executable won't be build.") } -# Copy all QML files during the build time -copydata.commands = $(COPY_DIR) $$PWD/apps $$PWD/imports $$PWD/sysui $$PWD/styles $$PWD/am-config.yaml $$PWD/Main.qml $$OUT_PWD -first.depends = $(first) copydata -export(first.depends) -export(copydata.commands) -!equals(PWD, $$OUT_PWD): QMAKE_EXTRA_TARGETS += first copydata +SUBDIRS += copydata # Install all required files qml.files = apps imports sysui examples styles am-config.yaml Main.qml diff --git a/plugins/comtqci18ndemo/comtqci18ndemo.cpp b/plugins/comtqci18ndemo/comtqci18ndemo.cpp index 90b7226..33e00f1 100644 --- a/plugins/comtqci18ndemo/comtqci18ndemo.cpp +++ b/plugins/comtqci18ndemo/comtqci18ndemo.cpp @@ -34,28 +34,25 @@ #include <QDebug> ComTQCi18nDemo::ComTQCi18nDemo(QObject *parent) - : QObject(parent), - m_languageLocale(""), - m_languageFilePath(""), - m_languageFilePrefix("") + : QObject(parent) { } -void ComTQCi18nDemo::setPrefix(QString languageFilePrefix) +void ComTQCi18nDemo::setPrefix(const QString &languageFilePrefix) { qDebug() << "File prefix: " << languageFilePrefix; m_languageFilePrefix = languageFilePrefix; } -void ComTQCi18nDemo::setPath(QUrl languageFilePath) +void ComTQCi18nDemo::setPath(const QUrl &languageFilePath) { qDebug() << "File path: " << languageFilePath.toLocalFile(); m_languageFilePath = languageFilePath.toLocalFile(); } -void ComTQCi18nDemo::setLanguageLocale(QString languageLocale) +void ComTQCi18nDemo::setLanguageLocale(const QString &languageLocale) { qDebug() << "Locale: " << languageLocale; @@ -76,13 +73,13 @@ QString ComTQCi18nDemo::languageLocale() const QString ComTQCi18nDemo::emptyString() const { - return ""; + return QString(); } -bool ComTQCi18nDemo::loadTranslationFile(QString &langLocale) +bool ComTQCi18nDemo::loadTranslationFile(const QString &langLocale) { - QString fileToLoad(m_languageFilePath + m_languageFilePrefix + "_"); - fileToLoad += langLocale + ".qm"; + QString fileToLoad(m_languageFilePath + m_languageFilePrefix + QLatin1Char('_')); + fileToLoad += langLocale + QStringLiteral(".qm"); qDebug() << "File to load: " << fileToLoad; diff --git a/plugins/comtqci18ndemo/comtqci18ndemo.h b/plugins/comtqci18ndemo/comtqci18ndemo.h index ddb4320..390e9d6 100644 --- a/plugins/comtqci18ndemo/comtqci18ndemo.h +++ b/plugins/comtqci18ndemo/comtqci18ndemo.h @@ -33,8 +33,8 @@ #define COMTQCI18NDEMO_H #include <QtCore/QObject> -#include <QTranslator> -#include <QUrl> +#include <QtCore/QTranslator> +#include <QtCore/QUrl> class ComTQCi18nDemo : public QObject { @@ -44,12 +44,12 @@ class ComTQCi18nDemo : public QObject Q_PROPERTY(QString emptyString READ emptyString NOTIFY languageChanged) public: - explicit ComTQCi18nDemo(QObject *parent = 0); + explicit ComTQCi18nDemo(QObject *parent = nullptr); - Q_INVOKABLE void setPrefix(QString languageFilePrefix); - Q_INVOKABLE void setPath(QUrl languageFilePath); + Q_INVOKABLE void setPrefix(const QString &languageFilePrefix); + Q_INVOKABLE void setPath(const QUrl &languageFilePath); - Q_INVOKABLE void setLanguageLocale(QString languageLocale); + Q_INVOKABLE void setLanguageLocale(const QString &languageLocale); QString languageLocale() const; // Helper method to notify string change @@ -60,7 +60,7 @@ signals: void languageChanged(); protected: - bool loadTranslationFile(QString &langLocale); + bool loadTranslationFile(const QString &langLocale); QString m_languageLocale; QString m_languageFilePath; diff --git a/plugins/datasource/sqlquerydatasource.cpp b/plugins/datasource/sqlquerydatasource.cpp index c90283b..8473373 100644 --- a/plugins/datasource/sqlquerydatasource.cpp +++ b/plugins/datasource/sqlquerydatasource.cpp @@ -29,6 +29,10 @@ ** ****************************************************************************/ +#include <QtCore/QDir> +#include <QtCore/QDebug> +#include <QtSql/QSqlError> + #include "sqlquerydatasource.h" #include "sqlquerymodel.h" @@ -46,8 +50,7 @@ SqlQueryDataSource::SqlQueryDataSource(QObject *parent) QVariantMap SqlQueryDataSource::get(int index) const { - if (!m_model) { return QVariantMap(); } - return m_model->get(index); + return m_model ? m_model->get(index) : QVariantMap(); } QString SqlQueryDataSource::database() const @@ -60,22 +63,19 @@ SqlQueryDataSource::Status SqlQueryDataSource::status() const return m_status; } - int SqlQueryDataSource::count() const { - if (!m_model) { return 0; } - return m_model->rowCount(); + return m_model ? m_model->rowCount() : 0; } QString SqlQueryDataSource::query() const { - if (!m_query.isValid()) { + if (!m_query.isValid()) return QString(); - } return m_query.lastQuery(); } -void SqlQueryDataSource::setQuery(QString queryString) +void SqlQueryDataSource::setQuery(const QString &queryString) { qDebug() << "SqlQueryDataSource::setQuery() " << queryString; if (m_queryString != queryString) { @@ -85,7 +85,7 @@ void SqlQueryDataSource::setQuery(QString queryString) } } -void SqlQueryDataSource::setDatabase(QString databaseName) +void SqlQueryDataSource::setDatabase(const QString &databaseName) { if (m_databaseName != databaseName) { m_databaseName = databaseName; @@ -109,9 +109,8 @@ void SqlQueryDataSource::updateModel() m_database.setDatabaseName(databasePath); qDebug() << "database path: " << databasePath; } - if (!m_database.isOpen()) { + if (!m_database.isOpen()) m_database.open(); - } } if (m_database.isValid() && !m_queryString.isEmpty()) { setStatus(Loading); @@ -148,8 +147,7 @@ QString SqlQueryDataSource::storageLocation() const return m_storageLocation; } -void SqlQueryDataSource::setStorageLocation(QString path) +void SqlQueryDataSource::setStorageLocation(const QString &path) { m_storageLocation = QDir(path).absolutePath(); } - diff --git a/plugins/datasource/sqlquerydatasource.h b/plugins/datasource/sqlquerydatasource.h index 8a5ebd4..4b077a8 100644 --- a/plugins/datasource/sqlquerydatasource.h +++ b/plugins/datasource/sqlquerydatasource.h @@ -32,8 +32,10 @@ #ifndef SQLQUERYDATASOURCE_H #define SQLQUERYDATASOURCE_H -#include <QtCore> -#include <QtSql> +#include <QtCore/QObject> +#include <QtCore/QVariantMap> +#include <QtSql/QSqlDatabase> +#include <QtSql/QSqlQuery> class SqlQueryModel; @@ -50,13 +52,13 @@ class SqlQueryDataSource : public QObject public: enum Status { Null, Loading, Ready, Error }; - explicit SqlQueryDataSource(QObject *parent = 0); + explicit SqlQueryDataSource(QObject *parent = nullptr); - void setQuery(QString queryString); + void setQuery(const QString &queryString); QString query() const; QString database() const; - void setDatabase(QString databaseName); + void setDatabase(const QString &databaseName); int count() const; Q_INVOKABLE QVariantMap get(int index) const; @@ -66,7 +68,7 @@ public: Status status() const; QString storageLocation() const; - void setStorageLocation(QString path); + void setStorageLocation(const QString &path); private: void updateModel(); void setStatus(Status arg); @@ -74,12 +76,12 @@ private: signals: void countChanged(); - void queryChanged(QString query); + void queryChanged(const QString &query); - void databaseChanged(QString arg); + void databaseChanged(const QString &arg); void statusChanged(Status arg); - void modelChanged(QObject* model); + void modelChanged(QObject *model); void storageLocationChanged(); private: diff --git a/plugins/datasource/sqlquerymodel.cpp b/plugins/datasource/sqlquerymodel.cpp index 2cc2684..0bb4f15 100644 --- a/plugins/datasource/sqlquerymodel.cpp +++ b/plugins/datasource/sqlquerymodel.cpp @@ -39,9 +39,8 @@ SqlQueryModel::SqlQueryModel(QObject *parent) : void SqlQueryModel::updateRoleNames() { m_roleNames.clear(); - for (int i = 0; i < record().count(); i++) { + for (int i = 0; i < record().count(); i++) m_roleNames[Qt::UserRole + i + 1] = record().fieldName(i).toLatin1(); - } } QHash<int, QByteArray> SqlQueryModel::roleNames() const @@ -53,9 +52,8 @@ QVariantMap SqlQueryModel::get(int row) const { QVariantMap map; QModelIndex index = createIndex(row, 0); - foreach (int role, m_roleNames.keys()) { + foreach (int role, m_roleNames.keys()) map.insert(m_roleNames.value(role), data(index, role)); - } return map; } diff --git a/plugins/datasource/sqlquerymodel.h b/plugins/datasource/sqlquerymodel.h index f20c680..30d0266 100644 --- a/plugins/datasource/sqlquerymodel.h +++ b/plugins/datasource/sqlquerymodel.h @@ -39,7 +39,7 @@ class SqlQueryModel : public QSqlQueryModel { Q_OBJECT public: - explicit SqlQueryModel(QObject *parent = 0); + explicit SqlQueryModel(QObject *parent = nullptr); void updateRoleNames(); QHash<int, QByteArray> roleNames() const; QVariantMap get(int row) const; diff --git a/plugins/datasource/sqltabledatasource.cpp b/plugins/datasource/sqltabledatasource.cpp index 2fc355a..c31afd7 100644 --- a/plugins/datasource/sqltabledatasource.cpp +++ b/plugins/datasource/sqltabledatasource.cpp @@ -40,7 +40,7 @@ SqlTableDataSource::SqlTableDataSource(QObject *parent) : QObject(parent) - , m_model(0) + , m_model(nullptr) , m_status(Null) , m_componentCompleted(false) { @@ -63,8 +63,7 @@ QAbstractItemModel *SqlTableDataSource::model() const int SqlTableDataSource::count() const { - if (!m_model) { return 0; } - return m_model->rowCount(); + return m_model ? m_model->rowCount() : 0; } SqlTableDataSource::Status SqlTableDataSource::status() const @@ -82,13 +81,12 @@ void SqlTableDataSource::setStatus(SqlTableDataSource::Status status) QString SqlTableDataSource::filter() const { - return m_model->filter(); + return m_model ? m_model->filter() : QString(); } QVariantMap SqlTableDataSource::get(int index) const { - if (!m_model) { return QVariantMap(); } - return m_model->get(index); + return m_model ? m_model->get(index) : QVariantMap(); } void SqlTableDataSource::classBegin() @@ -107,17 +105,17 @@ QString SqlTableDataSource::storageLocation() const return QDir::homePath(); } -void SqlTableDataSource::setFilter(QString filter) +void SqlTableDataSource::setFilter(const QString &filter) { qDebug() << "SqlTableDataSource::setFilter(): " << filter; - if (m_model->filter() != filter) { + if (m_model && (m_model->filter() != filter)) { m_model->setFilter(filter); m_model->select(); emit filterChanged(filter); } } -void SqlTableDataSource::setTable(QString tableName) +void SqlTableDataSource::setTable(const QString &tableName) { if (m_tableName != tableName) { m_tableName = tableName; @@ -126,7 +124,7 @@ void SqlTableDataSource::setTable(QString tableName) } } -void SqlTableDataSource::setDatabase(QString databaseName) +void SqlTableDataSource::setDatabase(const QString &databaseName) { if (m_databaseName != databaseName) { m_databaseName = databaseName; @@ -138,7 +136,8 @@ void SqlTableDataSource::setDatabase(QString databaseName) void SqlTableDataSource::updateModel() { - if (!m_componentCompleted) { return; } + if (!m_componentCompleted) + return; qDebug() << "SqlTableDataSource::updateModel()"; if (m_databaseName.isEmpty() || m_tableName.isEmpty()) { setStatus(Null); @@ -163,10 +162,10 @@ void SqlTableDataSource::updateModel() } } if (m_database.isValid() && !m_tableName.isEmpty()) { - if (!m_model || m_model->tableName() != m_tableName) { + if (!m_model || (m_model->tableName() != m_tableName)) { if (m_model) { delete m_model; - m_model = 0; + m_model = nullptr; emit modelChanged(m_model); } m_model = new SqlTableModel(this, m_database); @@ -178,12 +177,10 @@ void SqlTableDataSource::updateModel() qDebug() << " update role names"; m_model->updateRoleNames(); qDebug() << " select data"; - if (!m_model->select()) { + if (!m_model->select()) qDebug() << " error: select data from model"; - } - while (m_model->canFetchMore()) { + while (m_model->canFetchMore()) m_model->fetchMore(QModelIndex()); - } qDebug() << " finish select data"; if (m_model->lastError().isValid()) { qDebug() << " error: " << m_model->lastError().text(); diff --git a/plugins/datasource/sqltabledatasource.h b/plugins/datasource/sqltabledatasource.h index 1030a76..a8f988e 100644 --- a/plugins/datasource/sqltabledatasource.h +++ b/plugins/datasource/sqltabledatasource.h @@ -45,7 +45,7 @@ class SqlTableDataSource : public QObject, public QQmlParserStatus Q_PROPERTY(QString database READ database WRITE setDatabase NOTIFY databaseChanged) Q_PROPERTY(QString table READ table WRITE setTable NOTIFY tableChanged) Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged) - Q_PROPERTY(QObject* model READ model NOTIFY modelChanged) + Q_PROPERTY(QObject *model READ model NOTIFY modelChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QString storageLocation READ storageLocation CONSTANT) Q_PROPERTY(Status status READ status NOTIFY statusChanged) @@ -53,15 +53,15 @@ class SqlTableDataSource : public QObject, public QQmlParserStatus public: enum Status { Null, Loading, Ready, Error }; - explicit SqlTableDataSource(QObject *parent = 0); + explicit SqlTableDataSource(QObject *parent = nullptr); QString table() const; - void setTable(QString tableName); + void setTable(const QString &tableName); QString database() const; - void setDatabase(QString databaseName); + void setDatabase(const QString &databaseName); - QAbstractItemModel* model() const; + QAbstractItemModel *model() const; int count() const; Status status() const; void setStatus(Status status); @@ -75,15 +75,15 @@ public: QString storageLocation() const; public slots: - void setFilter(QString filter); + void setFilter(const QString &filter); signals: - void tableChanged(QString table); - void databaseChanged(QString database); + void tableChanged(const QString &table); + void databaseChanged(const QString &database); void countChanged(int count); void statusChanged(Status status); - void modelChanged(QObject* model); - void filterChanged(QString arg); + void modelChanged(QObject *model); + void filterChanged(const QString &arg); private: void updateModel(); @@ -91,7 +91,7 @@ private: QString m_tableName; QString m_databaseName; QSqlDatabase m_database; - SqlTableModel* m_model; + SqlTableModel *m_model; Status m_status; QString m_filter; bool m_componentCompleted; diff --git a/plugins/datasource/sqltablemodel.cpp b/plugins/datasource/sqltablemodel.cpp index 33097d0..1d1423b 100644 --- a/plugins/datasource/sqltablemodel.cpp +++ b/plugins/datasource/sqltablemodel.cpp @@ -46,9 +46,8 @@ void SqlTableModel::updateRoleNames() { qDebug() << "SqlTableModel::updateRoleNames()"; m_roleNames.clear(); - for (int i = 0; i < record().count(); i++) { + for (int i = 0; i < record().count(); i++) m_roleNames[Qt::UserRole + i + 1] = record().fieldName(i).toLatin1(); - } qDebug() << " role names: " << m_roleNames.values(); } @@ -63,9 +62,8 @@ QVariantMap SqlTableModel::get(int row) const { QVariantMap map; QModelIndex index = createIndex(row, 0); - foreach (int role, m_roleNames.keys()) { + foreach (int role, m_roleNames.keys()) map.insert(m_roleNames.value(role), data(index, role)); - } return map; } @@ -91,4 +89,3 @@ void SqlTableModel::notifyCount() { emit countChanged(rowCount()); } - diff --git a/plugins/datasource/sqltablemodel.h b/plugins/datasource/sqltablemodel.h index 863d913..b92de5c 100644 --- a/plugins/datasource/sqltablemodel.h +++ b/plugins/datasource/sqltablemodel.h @@ -39,7 +39,7 @@ class SqlTableModel : public QSqlTableModel Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) public: - explicit SqlTableModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase()); + explicit SqlTableModel(QObject *parent = nullptr, QSqlDatabase db = QSqlDatabase()); void updateRoleNames(); QHash<int, QByteArray> roleNames() const; diff --git a/plugins/screenmanager/screenmanager.cpp b/plugins/screenmanager/screenmanager.cpp index 85e4c5f..a3fc43f 100644 --- a/plugins/screenmanager/screenmanager.cpp +++ b/plugins/screenmanager/screenmanager.cpp @@ -48,11 +48,10 @@ int ScreenManager::screenCount() const void ScreenManager::setScreen(QWindow *window, int screen) { - if (screen >= 0 && screen < QGuiApplication::screens().count()) { + if (screen >= 0 && screen < QGuiApplication::screens().count()) window->setScreen(QGuiApplication::screens().at(screen)); - } else { + else qWarning() << "invalid Screen"; - } } QList<QObject *> ScreenManager::availableScreens() const diff --git a/plugins/screenmanager/screenmanager.h b/plugins/screenmanager/screenmanager.h index b5d3e33..bdafb2d 100644 --- a/plugins/screenmanager/screenmanager.h +++ b/plugins/screenmanager/screenmanager.h @@ -42,7 +42,7 @@ class ScreenManager : public QObject Q_PROPERTY(QList<QObject*> availableScreens READ availableScreens NOTIFY availableScreensChanged) public: - explicit ScreenManager(QObject *parent = 0); + explicit ScreenManager(QObject *parent = nullptr); Q_INVOKABLE int screenCount() const; Q_INVOKABLE void setScreen(QWindow * window, int screen); diff --git a/plugins/styles/neptune/neptunestyle.cpp b/plugins/styles/neptune/neptunestyle.cpp index d838f5b..e3352ed 100644 --- a/plugins/styles/neptune/neptunestyle.cpp +++ b/plugins/styles/neptune/neptunestyle.cpp @@ -34,6 +34,7 @@ #include <QtQuick/QQuickItem> #include <QtQuick/QQuickWindow> #include <QtGui/QGuiApplication> +#include <QtCore/QSettings> #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) #include <QtQuickControls2/private/qquickstyle_p.h> diff --git a/plugins/styles/neptune/neptunestyle.h b/plugins/styles/neptune/neptunestyle.h index 9266280..2820d1d 100644 --- a/plugins/styles/neptune/neptunestyle.h +++ b/plugins/styles/neptune/neptunestyle.h @@ -33,10 +33,10 @@ #define NEPTUNESTYLE_H #include <QtGui/QColor> -#include <QtGui/QFont> -#include <QtGui/QGuiApplication> +#include <QtCore/QSharedPointer> +#include <QtCore/QScopedPointer> -#include <QtQml> +QT_FORWARD_DECLARE_CLASS(QSettings) class StyleData; diff --git a/plugins/styles/neptune/neptunestyleplugin.h b/plugins/styles/neptune/neptunestyleplugin.h index f71007d..18e9142 100644 --- a/plugins/styles/neptune/neptunestyleplugin.h +++ b/plugins/styles/neptune/neptunestyleplugin.h @@ -32,9 +32,10 @@ #ifndef NEPTUNESTYLEPLUGIN_H #define NEPTUNESTYLEPLUGIN_H -#include <QtQml> #include <QtQuickControls2/private/qquickstyleplugin_p.h> +QT_FORWARD_DECLARE_CLASS(QQmlEngine) + class NeptuneStylePlugin : public QQuickStylePlugin { Q_OBJECT |