Commit Graph

18 Commits

Author SHA1 Message Date
Olivier De Cannière 447db272f1 Thermostat: Use strict comparison operators
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I3a40b23c7b7ec82ba3809df5af2ea459819c1053
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 11:10:36 +02:00
Olivier De Cannière d20caffc81 Thermostat: Remove unused imports
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I9a4b108d1655006f0bd0dd2bb69142b86442b7c8
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 11:10:34 +02:00
Olivier De Cannière 94c88d46c5 Thermostat: Adapt to new model and general cleanup
The RoomsModel has changed in shape in the previous commit. This commit
adapts the rest of the app to it and performs general cleanup and
warning fixing.

-Remove dead code
-Qualify lookups
-Declare all properties injected into delegates as required and give
 them a proper type such as Room or list<Room> instead of var
-General dataflow and depencies fixing. Change aliases to required
 properties where required
-Make the min/max/avg temperature values in the stats view update
 dynamically
-Simplify logic for processing temperature, humidity, and energy
 statistics

Change-Id: I21d962e9d692578f00c4e2466aae8a40d12a7dcc
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2025-08-07 11:10:32 +02:00
Olivier De Cannière 093cf9cbf4 Thermostat: Set ComponentBehavior to Bound where necessary
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I9997ebf3e6ca8336b3fefc34a51d53237a401c5f
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 11:10:28 +02:00
Olivier De Cannière 97b4a68494 Thermostat: Wrap signal handlers in Connections
Raw functions and function calls are not allowed in .ui.qml files.

Most .qml files in the proejct are empty. Respect the trend by sometimes
moving functions inside the .ui.qml files.

Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I95db0ba473189183fa46ddba3b7eb1ce938e5326
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2025-08-07 11:10:23 +02:00
Olivier De Cannière 913aca0b95 Thermostat: Use preferred{With,Height} inside Layouts
Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: Ifff8fab0d60211390570726c648d17f4c2a58bed
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 09:07:19 +02:00
Olivier De Cannière 4e73f07849 Thermostat: Declare dependencies of the ThermostatContent module
This helps resolve ApplicationSettings and Constants which are used all
over.

Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I6b0beaba914f8400336ab3def8542f8520a46535
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 09:07:17 +02:00
Olivier De Cannière 30dc679c9a Thermostat: Use QtQuickControls.Basic
The example uses custom controls for its UI so we can safely use a
a style that the compiler can deal with.

Task-number: QTBUG-138188
Pick-to: 6.10
Change-Id: I66bcad7a78e06ab9d3e28b4ba238fec42dd9c81b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 09:07:14 +02:00
Mikko Gronoff 1e1f20747d thermostat: update energy consumption unit
kWh instead of KM/H.

Pick-to: 6.7
Change-Id: I97d8f73af902b11315f58ee190144bedb002b913
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-28 09:13:26 +03:00
Chris Lerner 44c9b5162f Correct a typo in Thermostat example
Pick-to: 6.7 6.6 6.5
Change-Id: Ifcfb7005fb95ad7851e701fd7cbb287f4341f086
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 10:06:30 +00:00
Wladimir Leuschner 0bb20e154c Decrease rounding radius/transparency in Thermostat Example SmallLayout
Fixes: QTBUG-119290
Pick-to: 6.6 6.5
Change-Id: I9fcad3e6c234e82993e68688828383ba4a1a9ed6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 20:18:41 +00:00
Wladimir Leuschner acf8f0a418 Hide Settings Tab for SmallLayout/Portrait in Thermostat Example
Settings Tab and Theme Change Icon have the same functionality.
This patch removes the Settings Tab, when the Theme Change
Button is visible on the top right.

Fixes: QTBUG-119294
Pick-to: 6.6 6.5
Change-Id: I079d2c7a597111716391e21ebb46dbd1d908abc3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner 26742b74aa Fix Thermostat Swipe Rooms View in Thermostat example
Thermostat room view is going to the first item, when end of rooms list
is reached and the user wants to go to the next room. Analogous, the
user is sent to the last room when selecting the previous room while
being in the first room.

Fixes: QTBUG-119320
Pick-to: 6.6 6.5
Change-Id: If8c18c40ba903ba1b670f122676da6e0eff6c08e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner 88a884904c Fix room icon binding in Thermostat Control page in Thermostat example
Fixes: QTBUG-119297
Pick-to: 6.6 6.5
Change-Id: Ibdc9edfa237decc2754379d4f4b7d6acc34941af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Wladimir Leuschner abc8baa05f Fix typos in Thermostat example
Fixes: QTBUG-119286
Pick-to: 6.6 6.5
Change-Id: I6af6fc849aa40e025b059f601cc833625bca4212
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-23 21:18:41 +01:00
Kai Köhne 0183fa1a97 Build FX_Material_Showroom example again
Revert removal of the example from the default built that was done in
3f9c25bdb7 8941da8b40. Use different names for the clashing CMake
targets.

Pick-to: 6.5 6.6
Change-Id: Ife9b796fa416091505acfd9b5f59cc4ea6ab93f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-22 12:27:35 +02:00
Kamil Hajdukiewicz 8ce518b898 Rename CustomControls module in thermostat example
The name of the module is changed from CustomControls to
ThermostatCustomControls due build errors.

Fixes: QTBUG-114759
Pick-to: 6.5.2 6.5 6.6
Change-Id: I86cf9830700b867a4a690d0f41841417bfa1efc1
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-21 12:02:47 +02:00
Kamil Hajdukiewicz 3f9c25bdb7 Revamp Thermostat example 2
The new responsive design of Thermostat Example is implemented.
The application is prepared to look good on desktop, mobile and small displays.

In the current state only part of the application is prepared.
Schedule View is not ready.

What is done:
1. Rooms View
2. Thermostat Control View
3. Statistics View
4. Dark/Light mode

Pick-to: 6.5.2 6.5 6.6
Change-Id: I52d07b7001b1f78025d74ab827e58b5d23b2dedb
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-06-20 12:48:37 +02:00