diff --git a/CMakeLists.txt b/CMakeLists.txt index 2377e7a..c6ea175 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,152 +1,19 @@ -cmake_minimum_required(VERSION 3.16) +set( RONIA_KIT_LIB "RoniaKit" CACHE INTERNAL "RoniaKit") +set( QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ) -#The Library name -project(RoniaKit VERSION 1.0 LANGUAGES CXX) +file( GLOB_RECURSE RONIA_KIT_QML_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "qml/*.qml" ) -# ################################################################################################## -# Project Settings -# ################################################################################################## +qt_add_library( ${RONIA_KIT_LIB} STATIC ) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set (QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - - -#message(${QML_IMPORT_PATH}) -#Turns on default settings for development of RoniaKit -set(DEVELOPER_DEFAULTS ON) - -option(BUILD_TESTING "Build tests" ${DEVELOPER_DEFAULTS}) -option(BUILD_EXAMPLES "Build Examples" ${DEVELOPER_DEFAULTS}) -option(BUILD_SHARED_LIBS "Build as shared library" ON) -option(BUILD_DEBUG_POSTFIX_D "Append d suffix to debug libraries" OFF) - -# ################################################################################################## -# Dependencies -# ################################################################################################## -# Find the Qt libraries -find_package(Qt6 REQUIRED COMPONENTS Quick Core5Compat) - -if (NOT (Qt6_FOUND OR Qt5_FOUND)) - message(FATAL_ERRROR "Qt libraries were not found.") -endif() - - -if (Qt6_FOUND) - set(Qt Qt) -else() - set(Qt Qt5) -endif() - - -# ################################################################################################## -# Project Files -# ################################################################################################## -set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) - -# Library Definition -qt_add_library(RoniaKit STATIC) - -# Extra QML File properties -set_source_files_properties( - PROPERTIES - QT_QML_SINGLETON_TYPE True -) - -qt_add_qml_module(RoniaKit - URI "RoniaKit" - VERSION 1.0 - - QML_FILES - resources/Components/Gauges/HalfDial.qml - resources/Components/Gauges/Thermometer.qml - resources/Components/Gauges/RoniaControl.qml - resources/Components/Gauges/CircularGauge.qml - resources/Components/Gauges/RangeControl.qml - resources/Components/Gauges/FuelGauge.qml - resources/Components/Gauges/LevelGauge.qml - resources/Components/Gauges/CircularBasicGauge.qml - resources/Components/Gauges/Style/CircularGaugeStyle.qml - resources/Components/Gauges/Style/RoniaControlStyle.qml - resources/Components/Gauges/Style/FuelGaugeStyle.qml - resources/Components/Gauges/Style/LevelGaugeStyle.qml - resources/Components/Gauges/Style/CircularBasicGaugeStyle.qml - resources/Components/Gauges/Extra/CircularModernGauge1.qml - resources/Components/Gauges/Extra/Style/CircularModernGauge1Style.qml - resources/Components/Gauges/Extra/CircularSpeedGauge.qml - resources/Components/Gauges/Extra/Style/CircularSpeedGaugeStyle.qml - resources/Components/Gauges/Extra/CircularAnalogGauge.qml - resources/Components/Gauges/Extra/Style/CircularAnalogGaugeStyle.qml - resources/Components/Gauges/Extra/CircularModernGauge2.qml - resources/Components/Gauges/Extra/Style/CircularModernGauge2Style.qml - - SOURCES - +qt_add_qml_module( ${RONIA_KIT_LIB} + URI RoniaKit + RESOURCE_PREFIX / + QML_FILES ${RONIA_KIT_QML_FILES} RESOURCES - resources/Fonts/Font\ Awesome\ 6\ Pro-Regular-400.otf - resources/Fonts/Font\ Awesome\ 6\ Pro-Solid-900.otf - resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf - resources/Images/gauge/Modern/back.png - resources/Images/gauge/Modern/knob.png - resources/Images/gauge/needle.png - resources/Images/gauge/knob.png - resources/Images/gauge/Speed/backOn.png - resources/Images/gauge/Speed/backOff.png - resources/Images/gauge/Speed/needle-on.png - resources/Images/gauge/AnalougeGauge/backScreen.svg - resources/Images/gauge/AnalougeGauge/innerRing.svg - resources/Images/gauge/AnalougeGauge/middleRing.svg - resources/Images/gauge/AnalougeGauge/outerRing.svg - resources/Images/gauge/AnalougeGauge/topScreen.svg - resources/Images/gauge/Modern/blueLight.png - resources/Images/gauge/Modern/blueNeedle.png - resources/Images/gauge/redNeedle2.png - resources/Images/gauge/redNeedle3.png - resources/Images/gauge/Fuel/back.png - resources/Images/gauge/Fuel/fuel-station-red.png - resources/Images/gauge/Fuel/fuel-station-yellow.png - resources/Images/gauge/Fuel/fuel-station-green.png + assets/fonts/fontAwesome6-Pro-Regular-400.otf + assets/fonts/fontAwesome6-Pro-Solid-900.otf + assets/fonts/fontsFree-Net-DS-DIGI-1.ttf + NO_PLUGIN ) - -#Add a library to the project using the specified source file -#add_library(RoniaKit::RoniaKit ALIAS RoniaKit) - -target_include_directories(RoniaKit - PUBLIC - $ - $ - $ - PRIVATE - $ - $ -) - -#Definitions of preprocessor macros -target_compile_definitions(RoniaKit - PRIVATE $<$,$>:QT_QML_DEBUG>) - -target_link_libraries(RoniaKit PRIVATE Qt6::Quick Qt6::Core5Compat) - -set_target_properties(RoniaKit PROPERTIES - MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com - MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} - MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} - MACOSX_BUNDLE TRUE - WIN32_EXECUTABLE TRUE -) - -install(TARGETS RoniaKit - BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "QtCreator QML Modules Lookup") - -if(${BUILD_EXAMPLES}) - add_subdirectory(examples) -endif() -if(BUILD_TESTING) -# add_subdirectory(test) -endif() +add_subdirectory(modules/Gauges) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..94f9dfd --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,49 @@ +# Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy toward other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery, and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, both physical and online, and it also applies when an individual is officially representing the community in public spaces. + +Examples of representing a community include using an official community email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the community leaders at [admin@roniasoft.se](mailto:admin@roniasoft.se). All complaints will be reviewed and investigated promptly and in confidence. + +In cases where inappropriate behavior has occurred, the community leaders will work with the individuals involved to resolve the situation in a constructive and respectful manner. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at [http://contributor-covenant.org/version/2/0/](http://contributor-covenant.org/version/2/0/). + +For answers to common questions about this code of conduct, see [Contributor Covenant FAQ](http://contributor-covenant.org/faq/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9d59807 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,147 @@ +# Contributing to RoniaKit + +Thank you for your interest in contributing to RoniaKit! 🎉 +This document provides guidelines to help ensure a smooth contribution process. + +--- + +## 🚀 Getting Started + +### 1️⃣ Fork & Clone the Repository +1. Fork the repository on GitHub. +2. Clone your fork to your local machine: + ```sh + git clone https://github.com/your-username/RoniaKit.git + cd RoniaKit + ``` +3. Add the upstream repository: + ```sh + git remote add upstream https://github.com/Roniasoft/RoniaKit.git + ``` +4. Fetch the latest changes: + ```sh + git pull upstream main + ``` + +### 2️⃣ Setting Up the Development Environment + +#### Prerequisites +- **Qt**: Install the latest stable version from [Qt official site](https://www.qt.io/download). +- **C++ Compiler**: Ensure you have a modern compiler (GCC, Clang, MSVC). +- **CMake**: Required for building the project (`sudo apt install cmake` or use the official installer). +- **Qt Creator (Optional)**: Recommended for development. + +#### Build Instructions +1. Navigate to the project folder and create a build directory: + ```sh + mkdir build && cd build + ``` +2. Configure the project: + ```sh + cmake .. -DCMAKE_BUILD_TYPE=Debug + ``` +3. Build the project: + ```sh + cmake --build . + ``` + +--- + +## 🖥️ Code Conventions + +### 📝 C++ Guidelines +- **Follow C++17 or later.** +- Use **4 spaces** for indentation (no tabs). +- Class names: `PascalCase` (e.g., `MainWindow`). +- Member variables: `m_camelCase` (e.g., `m_userName`). +- Constants: `UPPER_CASE_WITH_UNDERSCORES`. +- Header guards or `#pragma once` to prevent multiple inclusions. + +### 📜 QML Guidelines +- Use **camelCase** for variables and `PascalCase` for components. +- Bindings should be concise and efficient. +- Prefer **property aliases** over directly exposing child components. +- Organize QML files into folders (e.g., `Controls/`, `Pages/`, `Components/`). + +### 🎨 Qt & UI Guidelines +- Use **Qt’s signal/slot mechanism** for event handling. +- Keep UI logic separate from backend logic. +- Use `Q_PROPERTY` and `Q_INVOKABLE` for exposing C++ to QML. +- Place UI-related `.qml` files inside a `qml/` directory. + +--- + +## 📦 Git Commit & Branching Strategy + +### ✅ Commit Message Format +Follow this convention: +``` +[type]: Short description (max 50 chars) + +[Optional: Detailed description] +``` +#### **Commit Types** +- `feat:` New feature. +- `fix:` Bug fix. +- `docs:` Documentation updates. +- `style:` Code style changes (no functional changes). +- `refactor:` Code restructuring (no feature changes). +- `test:` Adding/modifying tests. + +**Example Commit:** +```sh +git commit -m "feat: add CircularGauge QML component" +``` + +### 🌱 Branching Strategy +- **`main`** → Production-ready code. +- **`develop`** → Ongoing development. +- **Feature branches:** `feature/your-feature` +- **Bugfix branches:** `fix/issue-number` + +--- + +## 🐛 Reporting Issues + +If you find a bug: +1. Check the [issue tracker](https://github.com/Roniasoft/RoniaKit/issues) to avoid duplicates. +2. Create a new issue with: + - **Environment**: Qt version, OS, compiler. + - **Steps to reproduce**. + - **Expected vs. actual behavior**. + - **Screenshots (if applicable)**. + +--- + +## 🔥 Submitting a Pull Request + +### ✅ Steps to Submit a PR +1. Create a new branch: + ```sh + git checkout -b feature/new-feature + ``` +2. Implement changes and commit with proper messages. +3. Push to your fork: + ```sh + git push origin feature/new-feature + ``` +4. Create a pull request (PR) on GitHub. +5. Wait for review and approval. + +### 🔹 PR Requirements +- The code must follow **coding conventions**. +- PR title should be **clear & concise**. +- Include a description of changes. +- Link the issue (if applicable): `Closes #123` +- At least **one reviewer must approve** before merging. + +--- + +## ❤️ Code of Conduct +By contributing, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md). + +--- + +## 🎉 Thank You! +Your contributions help improve RoniaKit. We appreciate your support! 🚀 + diff --git a/README.md b/README.md index f153637..3382834 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,52 @@ # RoniaKit -Introduction -============ -The Ronia Kit is a collection of custom gauge components for Qt Quick applications. This library includes a variety of gauges, such as circular gauges, level gauges, thermometers, and speed gauges, that can be easily integrated into your QML projects. +![GitHub license](https://img.shields.io/github/license/Roniasoft/RoniaKit) +![GitHub stars](https://img.shields.io/github/stars/Roniasoft/RoniaKit?style=social) +![GitHub forks](https://img.shields.io/github/forks/Roniasoft/RoniaKit?style=social) +![GitHub issues](https://img.shields.io/github/issues/Roniasoft/RoniaKit) +![GitHub pull requests](https://img.shields.io/github/issues-pr/Roniasoft/RoniaKit) +![GitHub contributors](https://img.shields.io/github/contributors/Roniasoft/RoniaKit) + +## Introduction +RoniaKit is a versatile collection of reusable QML components designed for Qt Quick applications. It includes a variety of UI elements, such as gauges, meters, and other interactive components, that can be easily integrated into your projects. + +With RoniaKit, you can create visually engaging and highly customizable interfaces, allowing you to adapt the appearance, colors, and behavior of each component to suit your application's design and functionality. + +## Features +- **Customizable Components** – Easily modify appearance, colors, and behavior. +- **Lightweight & Efficient** – Optimized for performance in Qt Quick applications. +- **Modular Design** – Use only the components you need. +- **Cross-Platform Support** – Works on Linux, macOS, and Windows. + +## How to Use +To add RoniaKit to your project, you can use it as a Git submodule and include it in your CMake configuration. + +### Adding as a Git Submodule +```sh +git submodule add https://github.com/Roniasoft/RoniaKit.git external/RoniaKit +git submodule update --init --recursive +``` + +### Integrating with CMake +Modify your `CMakeLists.txt` to include RoniaKit: + +```cmake +cmake_minimum_required(VERSION 3.8) +project(MyProject) + +set(CMAKE_CXX_STANDARD 17) -With this library, you can create beautiful and informative gauges to display data in a visually appealing way. The gauges are highly customizable, allowing you to adjust the appearance, colors, and behavior of each gauge to suit your needs. +add_subdirectory(external/RoniaKit) # <- +target_link_libraries(appTarget PRIVATE RoniaKit RoniaKitGauges) # <- +``` -Usage -============= -To use a gauge component, simply add it to your QML file and set its properties as desired: +## Usage +To use a gauge component, simply import the library in your QML file and set its properties as needed: ```qml import QtQuick 2.0 -import RoniaKit +import RoniaKit.Gauges CircularGauge { width: 200 @@ -25,132 +58,44 @@ CircularGauge { } ``` -License -============= -This library is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). See the [LICENSE](LICENSE) file for details. - -Platforms ---------- - -* Linux (x64, gcc-7.0, clang-7) -* OSX (Apple Clang - LLVM 3.6) -* Windows (Win32, x64, msvc2017, MinGW 5.3) - -Dependencies ------------- - -* Qt > 6.4.0 (Will test on lower version soon) -* CMake 3.8 - -Current State (v1.0.0 alpha) -================== - -Added Components: -* CircularBasicGauge -* CircularGauge -* LevelGauge -* CircularGauge/ModernGauge1 -* CircularGauge/ModernGauge2 -* CircularGauge/SpeedGauge -* CircularGauge/AnalogGauge - -Added Themes: -* Minimal Dark -* Minimal Light - - -Future Components: -* Half-Dial Gauge -* Speed Gauge -* Fuel Gauge -* Ammeter -* Voltmeter -* Flowmeter -* Thermometer -* MartineDecker Gauge -* Spectrom -* Numeric Gauge -* Battery Level -* Compass - -Future Themes: -* Sport Theme -* 3D -* More custom themes - +## Example Usage +For a full example of how to use RoniaKit components, check out [RoniaKitGallery](https://github.com/Roniasoft/RoniaKitGallery.git), which showcases various elements in action. -Building -======== +## Contribution Guidelines -Linux ------ +We welcome contributions! Please read our detailed guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) before submitting issues or pull requests. -- git clone git@github.com:Roniasoft/RoniaKit.git -- cd RoniaKit -- mkdir build -- cd build -- cmake .. -- make -j && make install -- make -j && make install +### Quick Overview +- **Reporting Bugs:** Provide Qt version, OS, and clear reproduction steps. +- **Feature Requests:** Describe your idea and its use cases. +- **Pull Requests:** Follow our coding conventions, ensure your code builds, and write meaningful commit messages. +- **Code of Conduct:** Be respectful and collaborative ([Code of Conduct](CODE_OF_CONDUCT.md)). -Qt Creator ----------- +For more details, see [CONTRIBUTING.md](CONTRIBUTING.md). 🚀 -1. Open `CMakeLists.txt` as project. -2. `Build -> Run CMake` -3. `Build -> Build All` -4. Click the button `Run` +## Showcase +### RoniaKit Example (Light Theme) +![Light Theme](https://user-images.githubusercontent.com/53909162/233635754-87d08df4-5b11-4010-bf6a-479cbb1c0a8f.png) -Help Needed -=========== +### RoniaKit Example (Dark Theme) +![Dark Theme](https://user-images.githubusercontent.com/53909162/233635891-a4e3a6ce-2577-4e82-98ab-ed94d9fa9fbb.png) -Any suggestions are welcome! - -Contribution -============ - -#. Be polite, respectful and collaborative. -#. For submitting a bug: - - #. Describe your environment (Qt version, compiler, OS etc) - #. Describe steps to reproduce the issue - -#. For submitting a pull request: - - #. Create a proposal task first. We can come up with a better design together. - #. Create a pull-request. If applicable, create a simple example for your - problem, describe the changes in details, provide use cases. - -#. For submitting a development request: - - #. Describe your issue in details - #. Provide some use cases. - -Citing -====== - -RONIA AB, RoniaKit, (2023), GitHub repository, https://github.com/Roniasoft/RoniaKit - -BibTeX:: - - @misc{RONIA AB, - author = {RONIA AB}, - title = {RoniaKit. QML Control Library}, - year = {2023}, - publisher = {GitHub}, - journal = {GitHub repository}, - howpublished = {\url{https://github.com/Roniasoft/RoniaKit}}, - commit = {6ba9c66cdbc8e6d00fd4a8c6b3bde05c616cfa6a} - } - - -Showcase -======== -RONIA Kit Example (Light Theme): -![image](https://user-images.githubusercontent.com/53909162/233635754-87d08df4-5b11-4010-bf6a-479cbb1c0a8f.png) - -RONIA Kit Example (Dark Theme): -![image](https://user-images.githubusercontent.com/53909162/233635891-a4e3a6ce-2577-4e82-98ab-ed94d9fa9fbb.png) +## Citing RoniaKit +If you use RoniaKit in your project, please cite it as follows: +```bibtex +@misc{RONIA AB, + author = {RONIA AB}, + title = {RoniaKit: QML Control Library}, + year = {2023}, + publisher = {GitHub}, + journal = {GitHub repository}, + howpublished = {\url{https://github.com/Roniasoft/RoniaKit}}, + commit = {6ba9c66cdbc8e6d00fd4a8c6b3bde05c616cfa6a} +} +``` +## Contributors +Thanks to all our contributors! 💖 +[![Contributors](https://contrib.rocks/image?repo=Roniasoft/RoniaKit)](https://github.com/Roniasoft/RoniaKit/graphs/contributors) diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..f9c1dac --- /dev/null +++ b/VERSION @@ -0,0 +1,4 @@ +# RoniaKit Version Information + +Version: 1.0.0 +Release Date: 2025-02-06 \ No newline at end of file diff --git a/resources/Fonts/Font Awesome 6 Pro-Light-300.otf b/assets/fonts/fontAwesome6-Pro-Light-300.otf similarity index 100% rename from resources/Fonts/Font Awesome 6 Pro-Light-300.otf rename to assets/fonts/fontAwesome6-Pro-Light-300.otf diff --git a/resources/Fonts/Font Awesome 6 Pro-Regular-400.otf b/assets/fonts/fontAwesome6-Pro-Regular-400.otf similarity index 100% rename from resources/Fonts/Font Awesome 6 Pro-Regular-400.otf rename to assets/fonts/fontAwesome6-Pro-Regular-400.otf diff --git a/resources/Fonts/Font Awesome 6 Pro-Solid-900.otf b/assets/fonts/fontAwesome6-Pro-Solid-900.otf similarity index 100% rename from resources/Fonts/Font Awesome 6 Pro-Solid-900.otf rename to assets/fonts/fontAwesome6-Pro-Solid-900.otf diff --git a/resources/Fonts/Font Awesome 6 Pro-Thin-100.otf b/assets/fonts/fontAwesome6-Pro-Thin-100.otf similarity index 100% rename from resources/Fonts/Font Awesome 6 Pro-Thin-100.otf rename to assets/fonts/fontAwesome6-Pro-Thin-100.otf diff --git a/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf b/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf similarity index 100% rename from resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf rename to assets/fonts/fontsFree-Net-DS-DIGI-1.ttf diff --git a/Docs/.gitkeep b/docs/.gitkeep similarity index 100% rename from Docs/.gitkeep rename to docs/.gitkeep diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt deleted file mode 100644 index 7cafcef..0000000 --- a/examples/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(simple) - diff --git a/examples/simple/CMakeLists.txt b/examples/simple/CMakeLists.txt deleted file mode 100644 index ec2799c..0000000 --- a/examples/simple/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_minimum_required(VERSION 3.1.0) - -# Require C++14 -set(CMAKE_AUTOMOC ON) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - - -# Configure Qt -find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui QuickControls2 REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui QuickControls2 REQUIRED) -message(${CMAKE_BINARY_DIR}/qml/NodeLink/resources/View) -set (QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/qml/NodeLink/resources/View) -set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) - -# Creates and finalizes an application target of a platform-specific type -qt_add_executable(simple main.cpp) - -# This command defines a QML module that can consist of C++ sources, .qml files, or both. -qt_add_qml_module(simple - URI "simple" - VERSION 1.0 - - QML_FILES - main.qml - CentralWidget.qml - - # Model files - Model/ViewModel.qml - Model/GaugeFactory.qml - - # View files - View/SettingsWidget.qml - View/SettingsControl.qml - View/GaugesPreview.qml - - SOURCES - -) - -target_include_directories(simple PUBLIC - Qt${QT_VERSION_MAJOR}::QuickControls2) - -target_compile_definitions(simple - PRIVATE $<$,$>:QT_QML_DEBUG>) - -target_link_libraries(simple PRIVATE - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::QuickControls2 - RoniaKitplugin -) - - -#set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "QtCreator QML Modules Lookup") diff --git a/examples/simple/CentralWidget.qml b/examples/simple/CentralWidget.qml deleted file mode 100644 index 407f911..0000000 --- a/examples/simple/CentralWidget.qml +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import RoniaKit -import QtQuick.Controls -import QtQuick.Controls.Material -import QtQuick.Layouts - -/*! *********************************************************************************************** - * Central widget (Display selected gauge) - * - * ************************************************************************************************/ -Item { - id: centralWidget - - /* Property Declarations - * ****************************************************************************************/ - property ViewModel viewModel - - property RoniaControl centerObject : null - - /* Children - * ****************************************************************************************/ - Connections { - target: viewModel - function onSelectedGaugeChanged() { - if (centralWidget.centerObject) { - centralWidget.centerObject.destroy(); - } - - centralWidget.centerObject = gaugeFactory.createGauge(viewModel.selectedGauge, centralWidget); - centralWidget.centerObject.anchors.fill = centralWidget - centralWidget.centerObject.anchors.margins = 50 - } - } -} diff --git a/examples/simple/Model/GaugeFactory.qml b/examples/simple/Model/GaugeFactory.qml deleted file mode 100644 index e71adae..0000000 --- a/examples/simple/Model/GaugeFactory.qml +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.Material -import QtQuick.Layouts -import RoniaKit -import simple - -/*! *********************************************************************************************** - * Factory class to create object dynamically - * - * ************************************************************************************************/ -QtObject { - - /* Property Declarations - * ****************************************************************************************/ - property ViewModel viewModel - - - /* Children - * ****************************************************************************************/ - function createGauge(gaugeType: int, parentObj) { - var component = null; - switch (gaugeType) { - case RoniaControl.GaugeType.CircularBasic: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/CircularBasicGauge.qml"); - } break; - case RoniaControl.GaugeType.Circular: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/CircularGauge.qml"); - } break; - case RoniaControl.GaugeType.Level: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/LevelGauge.qml"); - } break; - case RoniaControl.GaugeType.Fuel: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/FuelGauge.qml"); - } break; - case RoniaControl.GaugeType.CircularAnalog: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/Extra/CircularAnalogGauge.qml"); - } break; - case RoniaControl.GaugeType.CircularModern1: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/Extra/CircularModernGauge1.qml"); - } break; - case RoniaControl.GaugeType.CircularModern2: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/Extra/CircularModernGauge2.qml"); - } break; - case RoniaControl.GaugeType.CircularSpeed: { - component = Qt.createComponent("qrc:/RoniaKit/resources/Components/Gauges/Extra/CircularSpeedGauge.qml"); - } break; - } - - var obj = null; - if (component.status === Component.Ready) { - obj = component.createObject(parentObj); - - obj.value = Qt.binding(function() { return viewModel.value }) - obj.theme = Qt.binding(function() { return viewModel.theme }) - obj.rangeControl.majorTickCount = Qt.binding(function() { return viewModel.majorTickCount }) - obj.rangeControl.minorTickCount = Qt.binding(function() { return viewModel.minorTickCount }) - obj.rangeControl.tickmarkInset = Qt.binding(function() { return viewModel.majorInset }) - obj.rangeControl.minorTickmarkInset = Qt.binding(function() { return viewModel.minorInset }) - obj.rangeControl.labelInset = Qt.binding(function() { return viewModel.labelInset }) - obj.rangeControl.startAngle = Qt.binding(function() { return viewModel.startAngle }) - obj.rangeControl.endAngle = Qt.binding(function() { return viewModel.endAngle }) - obj.rangeControl.minimumValue = Qt.binding(function() { return viewModel.minimumValue }) - obj.rangeControl.maximumValue = Qt.binding(function() { return viewModel.maximumValue }) - } - - else if(component.status === Component.Error) - console.log("$$$$$$ " + component.errorString() + " $$$$$$") - - return obj; - } -} diff --git a/examples/simple/Model/ViewModel.qml b/examples/simple/Model/ViewModel.qml deleted file mode 100644 index 49e8b49..0000000 --- a/examples/simple/Model/ViewModel.qml +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import RoniaKit - -/*! *********************************************************************************************** - * A view model for the UI - * - * ************************************************************************************************/ -QtObject { - - property int selectedGauge: RoniaControl.GaugeType.UNDEFINED - - //! The current value - property double value: 0.0 - - //! Major tick count - property int majorTickCount: 7 - - //! Minor tick count - property int minorTickCount: 4 - - //! Major inset (the outer margins for the major ticks) - property int majorInset: 20 - - //! Minor inset (the outer margins for the minor ticks) - property int minorInset: 20 - - //! Label inset - property int labelInset: 30 - - //! Start angle (for circular gauges) - property int startAngle: -135 - - //! End angle (for circular gauges) - property int endAngle: 135 - - //! Theme (light, dark) - property int theme: RoniaControl.Theme.Light - - //! Minimum value of the gauge - property double minimumValue: 0.0 - - //! Maximum value of the gauge - property double maximumValue: 100.0 -} diff --git a/examples/simple/View/GaugesPreview.qml b/examples/simple/View/GaugesPreview.qml deleted file mode 100644 index 82ddfb7..0000000 --- a/examples/simple/View/GaugesPreview.qml +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.Material -import QtQuick.Layouts -import RoniaKit -import simple - -/*! *********************************************************************************************** - * A list view to display all gauges preview - * - * ************************************************************************************************/ -Rectangle { - id: root - - /* Property Declarations - * ****************************************************************************************/ - property var gauges: [] - - property ViewModel viewModel - - /* Object Properties - * ****************************************************************************************/ - color: Qt.darker(Material.background, 1.2) // use the default background color - - - /* Children - * ****************************************************************************************/ - ListView { - model: root.gauges - anchors.fill: parent - orientation: ListView.Horizontal - spacing: 10 - clip: true - delegate: Rectangle { - id: rect - - property RoniaControl gauge - - color: "transparent" - height: ListView.view.height - width: height - scale: mouseArea.containsMouse ? 1.05 : 1.0 - - Behavior on scale {NumberAnimation{duration: 100}} - Component.onCompleted: { - gauge = modelData; - gauge.parent = rect; - gauge.anchors.fill = rect - gauge.anchors.margins = 10 - } - - MouseArea { - id: mouseArea - hoverEnabled: true - anchors.fill: parent - onClicked: viewModel.selectedGauge = gauge.type; - } - } - } -} diff --git a/examples/simple/View/SettingsControl.qml b/examples/simple/View/SettingsControl.qml deleted file mode 100644 index 6ea6c1d..0000000 --- a/examples/simple/View/SettingsControl.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls - -/*! *********************************************************************************************** - * SettingsControl (slider column component) - * - * ************************************************************************************************/ -ColumnLayout { - id: root - - /* Property Declarations - * ****************************************************************************************/ - property alias slider: slider - - property string text: "name: " - - /* Children - * ****************************************************************************************/ - Text { - color: "#A9A9A9" - text: root.text - Layout.fillHeight: true - Layout.fillWidth: true - } - Slider { - id: slider - from: 0 - to: 300 - Layout.fillHeight: true - Layout.fillWidth: true - } -} diff --git a/examples/simple/View/SettingsWidget.qml b/examples/simple/View/SettingsWidget.qml deleted file mode 100644 index 0698d4b..0000000 --- a/examples/simple/View/SettingsWidget.qml +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import QtQuick -import QtQuick.Controls -import QtQuick.Controls.Material -import QtQuick.Layouts -import simple - -/*! *********************************************************************************************** - * Settings widget for the ui - * - * ************************************************************************************************/ -Flickable { - - /* Property Declarations - * ****************************************************************************************/ - property ViewModel viewModel - - /* Object Properties - * ****************************************************************************************/ - - - /* Children - * ****************************************************************************************/ - Column { - anchors.fill: parent - spacing: 20 - - //! Value - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - text: "Value:" - slider.from: 0 - slider.to: 100 - slider.value: viewModel.value - slider.onValueChanged: viewModel.value = slider.value - } - - //! Major Tick Count - SettingsControl { - width: parent.width - height: 30 - slider.from: 0 - slider.to: 10 - spacing: 15 - text: "Major Tick Count:" - slider.value: viewModel.majorTickCount - slider.onValueChanged: viewModel.majorTickCount = slider.value - } - - - //! Minor Tick Count - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - slider.from: 0 - slider.to: 10 - text: "Minor Tick Count:" - slider.value: viewModel.minorTickCount - slider.onValueChanged: viewModel.minorTickCount = slider.value - } - - - //! Minor Inset - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - slider.from: 0 - slider.to: 50 - text: "Minor Inset:" - slider.value: viewModel.minorInset - slider.onValueChanged: viewModel.minorInset = slider.value - } - - //! Major Inset - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - slider.from: 0 - slider.to: 50 - text: "Major Inset:" - slider.value: viewModel.majorInset - slider.onValueChanged: viewModel.majorInset = slider.value - } - - //! Label Inset - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - slider.from: 0 - slider.to: 50 - text: "Label Inset:" - slider.value: viewModel.labelInset - slider.onValueChanged: viewModel.labelInset = slider.value - } - - //! Start Angle - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - text: "Start Angle:" - slider.from: -180 - slider.to: 0 - slider.value: viewModel.startAngle - slider.onValueChanged: viewModel.startAngle = slider.value - } - - //! End Angle - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - text: "End Angle:" - slider.from: 0 - slider.to: 180 - slider.value: viewModel.endAngle - slider.onValueChanged: viewModel.endAngle = slider.value - } - - //! Minimum - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - text: "Minimum:" - slider.from: 0 - slider.to: 100 - slider.value: viewModel.minimumValue - slider.onValueChanged: viewModel.minimumValue = slider.value - } - - //! Maximum - SettingsControl { - width: parent.width - height: 30 - spacing: 15 - text: "Maximum:" - slider.from: 0 - slider.to: 100 - slider.value: viewModel.maximumValue - slider.onValueChanged: viewModel.maximumValue = slider.value - } - - //! Theme - ColumnLayout { - width: parent.width - spacing: 15 - Text { - color: "#A9A9A9" - text: "Theme" - Layout.fillHeight: true - Layout.fillWidth: true - } - ComboBox { - id: comboTheme - Layout.fillHeight: true - Layout.fillWidth: true - model: ["Light", "Dark"] - currentIndex: viewModel.theme - onCurrentIndexChanged: viewModel.theme = currentIndex - } - } - } -} diff --git a/examples/simple/main.cpp b/examples/simple/main.cpp deleted file mode 100644 index ab2413e..0000000 --- a/examples/simple/main.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include - -int main(int argc, char* argv[]) -{ - QGuiApplication app(argc, argv); - QQuickStyle::setStyle("Material"); - QQmlApplicationEngine engine; - engine.addImportPath(":/"); - const QUrl url(u"qrc:/simple/main.qml"_qs); - QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, - &app, [url](QObject *obj, const QUrl &objUrl) { - if (!obj && url == objUrl) - QCoreApplication::exit(-1); - }, Qt::QueuedConnection); - engine.load(url); - - return app.exec(); -} - diff --git a/examples/simple/main.qml b/examples/simple/main.qml deleted file mode 100644 index 38428f6..0000000 --- a/examples/simple/main.qml +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Project: RoniaKit - * Version: 1.0.0 - * License: Apache 2.0 - * - * Copyright (c) 2023 Ronia AB - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick -import RoniaKit -import QtQuick.Controls -import QtQuick.Controls.Material -import QtQuick.Layouts -import simple - -ApplicationWindow { - id: window - - /* Property Declarations - * ****************************************************************************************/ - //! View model - property ViewModel viewModel: ViewModel {} - - //! Gauges factory - property GaugeFactory gaugeFactory: GaugeFactory { - viewModel: window.viewModel - } - - //! Preview gauges - property var gauges: [] - - - /* Object Properties - * ****************************************************************************************/ - width: 1680 - height: 960 - visible: true - title: qsTr("Simple RoniaKit Example") - - Material.theme: viewModel.theme === RoniaControl.Theme.Light ? Material.Light : Material.Dark - Material.accent: Material.BlueGrey - - - /* Constructor - * ****************************************************************************************/ - Component.onCompleted: { - var gauge1 = gaugeFactory.createGauge(RoniaControl.GaugeType.CircularBasic, null); - var gauge2 = gaugeFactory.createGauge(RoniaControl.GaugeType.Circular, null); - var gauge3 = gaugeFactory.createGauge(RoniaControl.GaugeType.Level, null); - var gauge4 = gaugeFactory.createGauge(RoniaControl.GaugeType.Fuel, null); - var gauge5 = gaugeFactory.createGauge(RoniaControl.GaugeType.CircularAnalog, null); - var gauge6 = gaugeFactory.createGauge(RoniaControl.GaugeType.CircularModern1, null); - var gauge7 = gaugeFactory.createGauge(RoniaControl.GaugeType.CircularModern2, null); - var gauge8 = gaugeFactory.createGauge(RoniaControl.GaugeType.CircularSpeed, null); - - gauges.push(gauge1); - gauges.push(gauge2); - gauges.push(gauge3); - gauges.push(gauge4); - gauges.push(gauge5); - gauges.push(gauge6); - gauges.push(gauge7); - gauges.push(gauge8); - - gaugesChanged(); - } - - /* Children - * ****************************************************************************************/ - //! Central Widget - CentralWidget { - viewModel: window.viewModel - anchors.top: parent.top - anchors.left: parent.left - anchors.bottom: gaugePreview.top - anchors.right: settings.left - } - - //! Settings Widget - Rectangle { - id: settings - color: Qt.darker(Material.background, 1.05) - anchors.right: parent.right - anchors.top: parent.top - width: parent.width / 6 - height: parent.height - - SettingsWidget { - viewModel: window.viewModel - anchors.fill: parent - anchors.margins: 10 - } - } - - //! Gauges Preview - GaugesPreview { - id: gaugePreview - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.right: settings.left - height: parent.height / 4 - viewModel: window.viewModel - gauges: window.gauges - } -} diff --git a/examples/simple/simple.qrc b/examples/simple/simple.qrc deleted file mode 100644 index 7366752..0000000 --- a/examples/simple/simple.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - main.qml - - diff --git a/include/RoniaGauges/View/.gitkeep b/include/RoniaGauges/View/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Core/.gitkeep b/include/RoniaKit/.gitkeep similarity index 100% rename from Source/Core/.gitkeep rename to include/RoniaKit/.gitkeep diff --git a/modules/Gauges/CMakeLists.txt b/modules/Gauges/CMakeLists.txt new file mode 100644 index 0000000..96675dd --- /dev/null +++ b/modules/Gauges/CMakeLists.txt @@ -0,0 +1,37 @@ +set( RONIA_KIT_GAUGES_LIB "RoniaKitGauges" CACHE INTERNAL "RoniaKitGauges") +set( QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ) + +qt_add_library( ${RONIA_KIT_GAUGES_LIB} STATIC ) + +# Find all QML files in the Gauges module +file(GLOB_RECURSE Gauges_QML_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "qml/*.qml") + +# Define the QML module for Gauges +qt_add_qml_module(${RONIA_KIT_GAUGES_LIB} + URI RoniaKit.Gauges + VERSION 1.0 + RESOURCE_PREFIX / + QML_FILES ${Gauges_QML_FILES} + RESOURCES + assets/images/analougeGauge/backScreen.svg + assets/images/analougeGauge/innerRing.svg + assets/images/analougeGauge/middleRing.svg + assets/images/analougeGauge/outerRing.svg + assets/images/analougeGauge/topScreen.svg + assets/images/fuel/back.png + assets/images/fuel/fuel-station-green.png + assets/images/fuel/fuel-station-red.png + assets/images/fuel/fuel-station-yellow.png + assets/images/modern/back.png + assets/images/modern/blueLight.png + assets/images/modern/blueNeedle.png + assets/images/modern/knob.png + assets/images/speed/backOff.png + assets/images/speed/backOn.png + assets/images/speed/needle-on.png + assets/images/knob.png + assets/images/needle.png + assets/images/redNeedle2.png + assets/images/redNeedle3.png + NO_PLUGIN +) diff --git a/resources/Images/gauge/AnalougeGauge/VoltageGauge.rar b/modules/Gauges/assets/images/analougeGauge/VoltageGauge.rar similarity index 100% rename from resources/Images/gauge/AnalougeGauge/VoltageGauge.rar rename to modules/Gauges/assets/images/analougeGauge/VoltageGauge.rar diff --git a/resources/Images/gauge/AnalougeGauge/backScreen.svg b/modules/Gauges/assets/images/analougeGauge/backScreen.svg similarity index 100% rename from resources/Images/gauge/AnalougeGauge/backScreen.svg rename to modules/Gauges/assets/images/analougeGauge/backScreen.svg diff --git a/resources/Images/gauge/AnalougeGauge/innerRing.svg b/modules/Gauges/assets/images/analougeGauge/innerRing.svg similarity index 100% rename from resources/Images/gauge/AnalougeGauge/innerRing.svg rename to modules/Gauges/assets/images/analougeGauge/innerRing.svg diff --git a/resources/Images/gauge/AnalougeGauge/middleRing.svg b/modules/Gauges/assets/images/analougeGauge/middleRing.svg similarity index 100% rename from resources/Images/gauge/AnalougeGauge/middleRing.svg rename to modules/Gauges/assets/images/analougeGauge/middleRing.svg diff --git a/resources/Images/gauge/AnalougeGauge/outerRing.svg b/modules/Gauges/assets/images/analougeGauge/outerRing.svg similarity index 100% rename from resources/Images/gauge/AnalougeGauge/outerRing.svg rename to modules/Gauges/assets/images/analougeGauge/outerRing.svg diff --git a/resources/Images/gauge/AnalougeGauge/preview.png b/modules/Gauges/assets/images/analougeGauge/preview.png similarity index 100% rename from resources/Images/gauge/AnalougeGauge/preview.png rename to modules/Gauges/assets/images/analougeGauge/preview.png diff --git a/resources/Images/gauge/AnalougeGauge/topScreen.svg b/modules/Gauges/assets/images/analougeGauge/topScreen.svg similarity index 100% rename from resources/Images/gauge/AnalougeGauge/topScreen.svg rename to modules/Gauges/assets/images/analougeGauge/topScreen.svg diff --git a/resources/Images/gauge/Fuel/back.png b/modules/Gauges/assets/images/fuel/back.png similarity index 100% rename from resources/Images/gauge/Fuel/back.png rename to modules/Gauges/assets/images/fuel/back.png diff --git a/resources/Images/gauge/Fuel/fuel-station-green.png b/modules/Gauges/assets/images/fuel/fuel-station-green.png similarity index 100% rename from resources/Images/gauge/Fuel/fuel-station-green.png rename to modules/Gauges/assets/images/fuel/fuel-station-green.png diff --git a/resources/Images/gauge/Fuel/fuel-station-red.png b/modules/Gauges/assets/images/fuel/fuel-station-red.png similarity index 100% rename from resources/Images/gauge/Fuel/fuel-station-red.png rename to modules/Gauges/assets/images/fuel/fuel-station-red.png diff --git a/resources/Images/gauge/Fuel/fuel-station-yellow.png b/modules/Gauges/assets/images/fuel/fuel-station-yellow.png similarity index 100% rename from resources/Images/gauge/Fuel/fuel-station-yellow.png rename to modules/Gauges/assets/images/fuel/fuel-station-yellow.png diff --git a/resources/Images/gauge/glass.png b/modules/Gauges/assets/images/glass.png similarity index 100% rename from resources/Images/gauge/glass.png rename to modules/Gauges/assets/images/glass.png diff --git a/resources/Images/gauge/knob.png b/modules/Gauges/assets/images/knob.png similarity index 100% rename from resources/Images/gauge/knob.png rename to modules/Gauges/assets/images/knob.png diff --git a/resources/Images/gauge/Modern/back.png b/modules/Gauges/assets/images/modern/back.png similarity index 100% rename from resources/Images/gauge/Modern/back.png rename to modules/Gauges/assets/images/modern/back.png diff --git a/resources/Images/gauge/Modern/blueLight.png b/modules/Gauges/assets/images/modern/blueLight.png similarity index 100% rename from resources/Images/gauge/Modern/blueLight.png rename to modules/Gauges/assets/images/modern/blueLight.png diff --git a/resources/Images/gauge/Modern/blueNeedle.png b/modules/Gauges/assets/images/modern/blueNeedle.png similarity index 100% rename from resources/Images/gauge/Modern/blueNeedle.png rename to modules/Gauges/assets/images/modern/blueNeedle.png diff --git a/resources/Images/gauge/Modern/knob.png b/modules/Gauges/assets/images/modern/knob.png similarity index 100% rename from resources/Images/gauge/Modern/knob.png rename to modules/Gauges/assets/images/modern/knob.png diff --git a/resources/Images/gauge/Modern/redLight.png b/modules/Gauges/assets/images/modern/redLight.png similarity index 100% rename from resources/Images/gauge/Modern/redLight.png rename to modules/Gauges/assets/images/modern/redLight.png diff --git a/resources/Images/gauge/Modern/redNeedle.png b/modules/Gauges/assets/images/modern/redNeedle.png similarity index 100% rename from resources/Images/gauge/Modern/redNeedle.png rename to modules/Gauges/assets/images/modern/redNeedle.png diff --git a/resources/Images/gauge/Modern/yellowLight.png b/modules/Gauges/assets/images/modern/yellowLight.png similarity index 100% rename from resources/Images/gauge/Modern/yellowLight.png rename to modules/Gauges/assets/images/modern/yellowLight.png diff --git a/resources/Images/gauge/Modern/yellowNeedle.png b/modules/Gauges/assets/images/modern/yellowNeedle.png similarity index 100% rename from resources/Images/gauge/Modern/yellowNeedle.png rename to modules/Gauges/assets/images/modern/yellowNeedle.png diff --git a/resources/Images/gauge/needle-light.png b/modules/Gauges/assets/images/needle-light.png similarity index 100% rename from resources/Images/gauge/needle-light.png rename to modules/Gauges/assets/images/needle-light.png diff --git a/resources/Images/gauge/needle-top.png b/modules/Gauges/assets/images/needle-top.png similarity index 100% rename from resources/Images/gauge/needle-top.png rename to modules/Gauges/assets/images/needle-top.png diff --git a/resources/Images/gauge/needle.png b/modules/Gauges/assets/images/needle.png similarity index 100% rename from resources/Images/gauge/needle.png rename to modules/Gauges/assets/images/needle.png diff --git a/resources/Images/gauge/numbers-Layer1.png b/modules/Gauges/assets/images/numbers-Layer1.png similarity index 100% rename from resources/Images/gauge/numbers-Layer1.png rename to modules/Gauges/assets/images/numbers-Layer1.png diff --git a/resources/Images/gauge/redNeedle2.png b/modules/Gauges/assets/images/redNeedle2.png similarity index 100% rename from resources/Images/gauge/redNeedle2.png rename to modules/Gauges/assets/images/redNeedle2.png diff --git a/resources/Images/gauge/redNeedle3.png b/modules/Gauges/assets/images/redNeedle3.png similarity index 100% rename from resources/Images/gauge/redNeedle3.png rename to modules/Gauges/assets/images/redNeedle3.png diff --git a/resources/Images/gauge/Speed/backOff.png b/modules/Gauges/assets/images/speed/backOff.png similarity index 100% rename from resources/Images/gauge/Speed/backOff.png rename to modules/Gauges/assets/images/speed/backOff.png diff --git a/resources/Images/gauge/Speed/backOn.png b/modules/Gauges/assets/images/speed/backOn.png similarity index 100% rename from resources/Images/gauge/Speed/backOn.png rename to modules/Gauges/assets/images/speed/backOn.png diff --git a/resources/Images/gauge/Speed/needle-off.png b/modules/Gauges/assets/images/speed/needle-off.png similarity index 100% rename from resources/Images/gauge/Speed/needle-off.png rename to modules/Gauges/assets/images/speed/needle-off.png diff --git a/resources/Images/gauge/Speed/needle-on.png b/modules/Gauges/assets/images/speed/needle-on.png similarity index 100% rename from resources/Images/gauge/Speed/needle-on.png rename to modules/Gauges/assets/images/speed/needle-on.png diff --git a/resources/Components/Gauges/CircularBasicGauge.qml b/modules/Gauges/qml/CircularBasicGauge.qml similarity index 98% rename from resources/Components/Gauges/CircularBasicGauge.qml rename to modules/Gauges/qml/CircularBasicGauge.qml index db1aca4..2e1b451 100644 --- a/resources/Components/Gauges/CircularBasicGauge.qml +++ b/modules/Gauges/qml/CircularBasicGauge.qml @@ -19,7 +19,7 @@ import QtQuick import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Basic Gauge diff --git a/resources/Components/Gauges/CircularGauge.qml b/modules/Gauges/qml/CircularGauge.qml similarity index 98% rename from resources/Components/Gauges/CircularGauge.qml rename to modules/Gauges/qml/CircularGauge.qml index 33a24f5..b3c7b68 100644 --- a/resources/Components/Gauges/CircularGauge.qml +++ b/modules/Gauges/qml/CircularGauge.qml @@ -19,7 +19,7 @@ import QtQuick import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Gauge diff --git a/resources/Components/Gauges/Extra/CircularAnalogGauge.qml b/modules/Gauges/qml/Extra/CircularAnalogGauge.qml similarity index 98% rename from resources/Components/Gauges/Extra/CircularAnalogGauge.qml rename to modules/Gauges/qml/Extra/CircularAnalogGauge.qml index 0870a3a..e3ad92a 100644 --- a/resources/Components/Gauges/Extra/CircularAnalogGauge.qml +++ b/modules/Gauges/qml/Extra/CircularAnalogGauge.qml @@ -19,7 +19,7 @@ import QtQuick import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Analog Gauge diff --git a/resources/Components/Gauges/Extra/CircularModernGauge1.qml b/modules/Gauges/qml/Extra/CircularModernGauge1.qml similarity index 98% rename from resources/Components/Gauges/Extra/CircularModernGauge1.qml rename to modules/Gauges/qml/Extra/CircularModernGauge1.qml index 3c0296f..1753c4b 100644 --- a/resources/Components/Gauges/Extra/CircularModernGauge1.qml +++ b/modules/Gauges/qml/Extra/CircularModernGauge1.qml @@ -18,7 +18,7 @@ */ import QtQuick -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Modern Circular Gauge diff --git a/resources/Components/Gauges/Extra/CircularModernGauge2.qml b/modules/Gauges/qml/Extra/CircularModernGauge2.qml similarity index 98% rename from resources/Components/Gauges/Extra/CircularModernGauge2.qml rename to modules/Gauges/qml/Extra/CircularModernGauge2.qml index c7db828..a83133a 100644 --- a/resources/Components/Gauges/Extra/CircularModernGauge2.qml +++ b/modules/Gauges/qml/Extra/CircularModernGauge2.qml @@ -18,7 +18,7 @@ */ import QtQuick -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Modern Circular Gauge diff --git a/resources/Components/Gauges/Extra/CircularSpeedGauge.qml b/modules/Gauges/qml/Extra/CircularSpeedGauge.qml similarity index 98% rename from resources/Components/Gauges/Extra/CircularSpeedGauge.qml rename to modules/Gauges/qml/Extra/CircularSpeedGauge.qml index be0cb94..854cf8c 100644 --- a/resources/Components/Gauges/Extra/CircularSpeedGauge.qml +++ b/modules/Gauges/qml/Extra/CircularSpeedGauge.qml @@ -18,7 +18,7 @@ */ import QtQuick -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Speed Gauge diff --git a/resources/Components/Gauges/Extra/Style/CircularAnalogGaugeStyle.qml b/modules/Gauges/qml/Extra/Style/CircularAnalogGaugeStyle.qml similarity index 89% rename from resources/Components/Gauges/Extra/Style/CircularAnalogGaugeStyle.qml rename to modules/Gauges/qml/Extra/Style/CircularAnalogGaugeStyle.qml index 1f572b0..51b1c0b 100644 --- a/resources/Components/Gauges/Extra/Style/CircularAnalogGaugeStyle.qml +++ b/modules/Gauges/qml/Extra/Style/CircularAnalogGaugeStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Analog Gauge Style @@ -29,7 +29,7 @@ CircularGaugeStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } Component.onCompleted: { rangeControl.minorTickVisible = false @@ -54,7 +54,7 @@ CircularGaugeStyle { radius: 360 Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/AnalougeGauge/backScreen.svg"; + source: "qrc:/RoniaKit/Gauges/assets/images/analougeGauge/backScreen.svg"; asynchronous: true smooth: true; antialiasing: true; @@ -64,21 +64,21 @@ CircularGaugeStyle { } Image { id: outerRingImg; - source: "qrc:/RoniaKit/resources/Images/gauge/AnalougeGauge/outerRing.svg"; + source: "qrc:/RoniaKit/Gauges/assets/images/analougeGauge/outerRing.svg"; anchors.centerIn: parent antialiasing: true anchors.fill: parent; } Image { id: middleRingImg; - source: "qrc:/RoniaKit/resources/Images/gauge/AnalougeGauge/middleRing.svg"; + source: "qrc:/RoniaKit/Gauges/assets/images/analougeGauge/middleRing.svg"; anchors.centerIn: parent antialiasing: true anchors.fill: parent; } Image { id: innerRingImg; - source: "qrc:/RoniaKit/resources/Images/gauge/AnalougeGauge/innerRing.svg"; + source: "qrc:/RoniaKit/Gauges/assets/images/analougeGauge/innerRing.svg"; anchors.centerIn: parent antialiasing: true anchors.fill: parent; @@ -113,7 +113,7 @@ CircularGaugeStyle { id: foregroundItem1; Image { id: needleCntr; - source: "qrc:/RoniaKit/resources/Images/gauge/AnalougeGauge/topScreen.svg"; + source: "qrc:/RoniaKit/Gauges/assets/images/analougeGauge/topScreen.svg"; anchors.fill: parent; antialiasing: true } diff --git a/resources/Components/Gauges/Extra/Style/CircularModernGauge1Style.qml b/modules/Gauges/qml/Extra/Style/CircularModernGauge1Style.qml similarity index 92% rename from resources/Components/Gauges/Extra/Style/CircularModernGauge1Style.qml rename to modules/Gauges/qml/Extra/Style/CircularModernGauge1Style.qml index 19c829d..f01649f 100644 --- a/resources/Components/Gauges/Extra/Style/CircularModernGauge1Style.qml +++ b/modules/Gauges/qml/Extra/Style/CircularModernGauge1Style.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Modern Gauge 1 Style @@ -37,7 +37,7 @@ CircularGaugeStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } /* Children * ****************************************************************************************/ @@ -50,7 +50,7 @@ CircularGaugeStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/Modern/back.png" + source: "qrc:/RoniaKit/Gauges/assets/images/modern/back.png" asynchronous: true sourceSize { width: width diff --git a/resources/Components/Gauges/Extra/Style/CircularModernGauge2Style.qml b/modules/Gauges/qml/Extra/Style/CircularModernGauge2Style.qml similarity index 92% rename from resources/Components/Gauges/Extra/Style/CircularModernGauge2Style.qml rename to modules/Gauges/qml/Extra/Style/CircularModernGauge2Style.qml index 650ec57..49496a8 100644 --- a/resources/Components/Gauges/Extra/Style/CircularModernGauge2Style.qml +++ b/modules/Gauges/qml/Extra/Style/CircularModernGauge2Style.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Modern Gauge 2 Style @@ -35,7 +35,7 @@ CircularGaugeStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } /* Children @@ -49,7 +49,7 @@ CircularGaugeStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/Modern/back.png" + source: "qrc:/RoniaKit/Gauges/assets/images/modern/back.png" asynchronous: true sourceSize { width: width @@ -58,7 +58,7 @@ CircularGaugeStyle { Image { id: glowingCircle; - source: "qrc:/RoniaKit/resources/Images/gauge/Modern/blueLight.png"; + source: "qrc:/RoniaKit/Gauges/assets/images/modern/blueLight.png"; anchors.centerIn: parent antialiasing: true anchors.fill: parent; @@ -97,7 +97,7 @@ CircularGaugeStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/Modern/blueNeedle.png" + source: "qrc:/RoniaKit/Gauges/assets/images/modern/blueNeedle.png" } } diff --git a/resources/Components/Gauges/Extra/Style/CircularSpeedGaugeStyle.qml b/modules/Gauges/qml/Extra/Style/CircularSpeedGaugeStyle.qml similarity index 90% rename from resources/Components/Gauges/Extra/Style/CircularSpeedGaugeStyle.qml rename to modules/Gauges/qml/Extra/Style/CircularSpeedGaugeStyle.qml index 2dbb408..4fca873 100644 --- a/resources/Components/Gauges/Extra/Style/CircularSpeedGaugeStyle.qml +++ b/modules/Gauges/qml/Extra/Style/CircularSpeedGaugeStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Speed Gauge Style @@ -36,7 +36,7 @@ CircularGaugeStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } Component.onCompleted: { rangeControl.minorTickVisible = false @@ -56,7 +56,7 @@ CircularGaugeStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/Speed/backOn.png" + source: "qrc:/RoniaKit/Gauges/assets/images/speed/backOn.png" asynchronous: true sourceSize { width: width @@ -82,7 +82,7 @@ CircularGaugeStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/Speed/needle-on.png" + source: "qrc:/RoniaKit/Gauges/assets/images/speed/needle-on.png" } } diff --git a/resources/Components/Gauges/FuelGauge.qml b/modules/Gauges/qml/FuelGauge.qml similarity index 98% rename from resources/Components/Gauges/FuelGauge.qml rename to modules/Gauges/qml/FuelGauge.qml index 8abfec0..11f52d2 100644 --- a/resources/Components/Gauges/FuelGauge.qml +++ b/modules/Gauges/qml/FuelGauge.qml @@ -19,7 +19,7 @@ import QtQuick import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Fuel Gauge diff --git a/resources/Components/Gauges/HalfDial.qml b/modules/Gauges/qml/HalfDial.qml similarity index 100% rename from resources/Components/Gauges/HalfDial.qml rename to modules/Gauges/qml/HalfDial.qml diff --git a/resources/Components/Gauges/LevelGauge.qml b/modules/Gauges/qml/LevelGauge.qml similarity index 98% rename from resources/Components/Gauges/LevelGauge.qml rename to modules/Gauges/qml/LevelGauge.qml index 9b834fc..88c8c9a 100644 --- a/resources/Components/Gauges/LevelGauge.qml +++ b/modules/Gauges/qml/LevelGauge.qml @@ -20,7 +20,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Shapes -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Level Gauge diff --git a/resources/Components/Gauges/RangeControl.qml b/modules/Gauges/qml/RangeControl.qml similarity index 100% rename from resources/Components/Gauges/RangeControl.qml rename to modules/Gauges/qml/RangeControl.qml diff --git a/resources/Components/Gauges/RoniaControl.qml b/modules/Gauges/qml/RoniaControl.qml similarity index 99% rename from resources/Components/Gauges/RoniaControl.qml rename to modules/Gauges/qml/RoniaControl.qml index 5cd39bc..213d194 100644 --- a/resources/Components/Gauges/RoniaControl.qml +++ b/modules/Gauges/qml/RoniaControl.qml @@ -18,7 +18,7 @@ */ import QtQuick -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * This is the abstract type of all gauges definitions diff --git a/resources/Components/Gauges/Style/CircularBasicGaugeStyle.qml b/modules/Gauges/qml/Style/CircularBasicGaugeStyle.qml similarity index 97% rename from resources/Components/Gauges/Style/CircularBasicGaugeStyle.qml rename to modules/Gauges/qml/Style/CircularBasicGaugeStyle.qml index 97aa7fb..5ce3968 100644 --- a/resources/Components/Gauges/Style/CircularBasicGaugeStyle.qml +++ b/modules/Gauges/qml/Style/CircularBasicGaugeStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular basic Gauge Style @@ -53,7 +53,7 @@ RoniaControlStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } Component.onCompleted: { backgroundMap[RoniaControl.Theme.Light] = "#ffffff" @@ -64,8 +64,8 @@ RoniaControlStyle { majorTickmarkMap[RoniaControl.Theme.Light] = "#c8d0d0" minorTickmarkMap[RoniaControl.Theme.Dark] = "#e5e5e5" minorTickmarkMap[RoniaControl.Theme.Light] = "#c8d0d0" - needleMap[RoniaControl.Theme.Dark] = "qrc:/RoniaKit/resources/Images/gauge/redNeedle2.png" - needleMap[RoniaControl.Theme.Light] = "qrc:/RoniaKit/resources/Images/gauge/redNeedle3.png" + needleMap[RoniaControl.Theme.Dark] = "qrc:/RoniaKit/Gauges/assets/images/redNeedle2.png" + needleMap[RoniaControl.Theme.Light] = "qrc:/RoniaKit/Gauges/assets/images/redNeedle3.png" needleKnobMap[RoniaControl.Theme.Dark] = "#ff2c2c" needleKnobMap[RoniaControl.Theme.Light] = "#ff6861" backgroundMapChanged(); diff --git a/resources/Components/Gauges/Style/CircularGaugeStyle.qml b/modules/Gauges/qml/Style/CircularGaugeStyle.qml similarity index 97% rename from resources/Components/Gauges/Style/CircularGaugeStyle.qml rename to modules/Gauges/qml/Style/CircularGaugeStyle.qml index 9d53a92..52d3bc7 100644 --- a/resources/Components/Gauges/Style/CircularGaugeStyle.qml +++ b/modules/Gauges/qml/Style/CircularGaugeStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Circular Gauge Style @@ -48,7 +48,7 @@ RoniaControlStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } /* Object Properties * ****************************************************************************************/ @@ -110,7 +110,7 @@ RoniaControlStyle { Image { anchors.fill: parent - source: "qrc:/RoniaKit/resources/Images/gauge/needle.png" + source: "qrc:/RoniaKit/Gauges/assets/images/needle.png" } } @@ -118,7 +118,7 @@ RoniaControlStyle { implicitWidth: 0.05 * outerRadius implicitHeight: 0.05 * outerRadius Image { - source: "qrc:/RoniaKit/resources/Images/gauge/knob.png" + source: "qrc:/RoniaKit/Gauges/assets/images/knob.png" anchors.centerIn: parent } } diff --git a/resources/Components/Gauges/Style/FuelGaugeStyle.qml b/modules/Gauges/qml/Style/FuelGaugeStyle.qml similarity index 96% rename from resources/Components/Gauges/Style/FuelGaugeStyle.qml rename to modules/Gauges/qml/Style/FuelGaugeStyle.qml index c1ecfb8..99f7330 100644 --- a/resources/Components/Gauges/Style/FuelGaugeStyle.qml +++ b/modules/Gauges/qml/Style/FuelGaugeStyle.qml @@ -17,7 +17,7 @@ * limitations under the License. */ -import RoniaKit +import RoniaKit.Gauges import QtQuick 2.15 import QtQuick.Controls @@ -66,7 +66,7 @@ RoniaControlStyle { Image { - source: "qrc:/RoniaKit/resources/Images/gauge/Fuel/back.png"; + source: "qrc:/RoniaKit/Gauges/assets/images/fuel/back.png"; anchors.fill: parent; antialiasing: true smooth: true @@ -286,16 +286,16 @@ RoniaControlStyle if(control.value >=0 && control.value <= (control.rangeControl.maximumValue - control.rangeControl.minimumValue) * 1.0 /6) { station.blinking = true; - return "qrc:/RoniaKit/resources/Images/gauge/Fuel/fuel-station-red.png"; + return "qrc:/RoniaKit/Gauges/assets/images/fuel/fuel-station-red.png"; } else station.blinking = false; if(control.value < (control.rangeControl.maximumValue - control.rangeControl.minimumValue) * 7.0 / 24) - return "qrc:/RoniaKit/resources/Images/gauge/Fuel/fuel-station-yellow.png"; + return "qrc:/RoniaKit/Gauges/assets/images/fuel/fuel-station-yellow.png"; - return "qrc:/RoniaKit/resources/Images/gauge/Fuel/fuel-station-green.png"; + return "qrc:/RoniaKit/Gauges/assets/images/fuel/fuel-station-green.png"; } } diff --git a/resources/Components/Gauges/Style/LevelGaugeStyle.qml b/modules/Gauges/qml/Style/LevelGaugeStyle.qml similarity index 98% rename from resources/Components/Gauges/Style/LevelGaugeStyle.qml rename to modules/Gauges/qml/Style/LevelGaugeStyle.qml index 3c53ee4..1f38f53 100644 --- a/resources/Components/Gauges/Style/LevelGaugeStyle.qml +++ b/modules/Gauges/qml/Style/LevelGaugeStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Level Gauge Style @@ -37,7 +37,7 @@ RoniaControlStyle { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } Component.onCompleted: { backgroundMap[RoniaControl.Theme.Light] = "#dce2e2" diff --git a/resources/Components/Gauges/Style/RoniaControlStyle.qml b/modules/Gauges/qml/Style/RoniaControlStyle.qml similarity index 96% rename from resources/Components/Gauges/Style/RoniaControlStyle.qml rename to modules/Gauges/qml/Style/RoniaControlStyle.qml index 1cbff3c..416cc5d 100644 --- a/resources/Components/Gauges/Style/RoniaControlStyle.qml +++ b/modules/Gauges/qml/Style/RoniaControlStyle.qml @@ -19,7 +19,7 @@ import QtQuick 2.15 import QtQuick.Controls -import RoniaKit +import RoniaKit.Gauges /*! *********************************************************************************************** * Ronia Control Style @@ -51,7 +51,7 @@ Item { /* Font Loader * ****************************************************************************************/ - FontLoader {id: webFont; source: "qrc:/RoniaKit/resources/Fonts/FontsFree-Net-DS-DIGI-1.ttf" } + FontLoader {id: webFont; source: "qrc:/RoniaKit/assets/fonts/fontsFree-Net-DS-DIGI-1.ttf" } /* Children diff --git a/resources/Components/Gauges/Thermometer.qml b/modules/Gauges/qml/Thermometer.qml similarity index 100% rename from resources/Components/Gauges/Thermometer.qml rename to modules/Gauges/qml/Thermometer.qml diff --git a/Source/View/.gitkeep b/qml/.gitkeep similarity index 100% rename from Source/View/.gitkeep rename to qml/.gitkeep diff --git a/resources/.gitkeep b/resources/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/include/RoniaGauges/Core/.gitkeep b/src/.gitkeep similarity index 100% rename from include/RoniaGauges/Core/.gitkeep rename to src/.gitkeep