diff --git a/CMakeLists.txt b/CMakeLists.txt index d330c3b..c6b5fc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(appnooLight - main.cpp - qml.qrc + src/main.cpp + resources/resources.qrc ) if (ANDROID) diff --git a/nooLight.pro b/nooLight.pro deleted file mode 100644 index 97ec091..0000000 --- a/nooLight.pro +++ /dev/null @@ -1,44 +0,0 @@ -QT += quick -CONFIG += c++11 - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target - -DISTFILES += \ - android/AndroidManifest.xml \ - android/gradle/wrapper/gradle-wrapper.jar \ - android/gradlew \ - android/res/values/libs.xml \ - android/build.gradle \ - android/gradle/wrapper/gradle-wrapper.properties \ - android/gradlew.bat - -ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android - -ANDROID_EXTRA_LIBS += $$ANDROID_SDK_ROOT/android_openssl/latest/arm/libssl_1_1.so \ - $$ANDROID_SDK_ROOT/android_openssl/latest/arm/libcrypto_1_1.so - -ANDROID_ABIS = armeabi-v7a diff --git a/qml.qrc b/qml.qrc deleted file mode 100644 index 4ce6009..0000000 --- a/qml.qrc +++ /dev/null @@ -1,16 +0,0 @@ - - - main.qml - qtquickcontrols2.conf - HomeForm.qml - SettingsForm.qml - SubtitledItemDelegate.qml - LightsModel.qml - LightGroup.qml - GradientButton.qml - lamp.png - Off.png - NooLiteClient.qml - ServiceForm.qml - - diff --git a/lamp.png b/resources/images/lamp.png similarity index 100% rename from lamp.png rename to resources/images/lamp.png diff --git a/Off.png b/resources/images/off.png similarity index 100% rename from Off.png rename to resources/images/off.png diff --git a/GradientButton.qml b/resources/qml/GradientButton.qml similarity index 100% rename from GradientButton.qml rename to resources/qml/GradientButton.qml diff --git a/HomeForm.qml b/resources/qml/HomeForm.qml similarity index 100% rename from HomeForm.qml rename to resources/qml/HomeForm.qml diff --git a/LightGroup.qml b/resources/qml/LightGroup.qml similarity index 95% rename from LightGroup.qml rename to resources/qml/LightGroup.qml index 3bd563b..382f5db 100644 --- a/LightGroup.qml +++ b/resources/qml/LightGroup.qml @@ -33,7 +33,7 @@ Item { anchors.margins: 5 width: height - source: "Off.png" + source: "/images/off.png" } } @@ -64,7 +64,7 @@ Item { height: button.height * 0.5 width: height anchors.horizontalCenter: parent.horizontalCenter - source: "lamp.png" + source: "/images/lamp.png" } Label { diff --git a/LightsModel.qml b/resources/qml/LightsModel.qml similarity index 100% rename from LightsModel.qml rename to resources/qml/LightsModel.qml diff --git a/NooLiteClient.qml b/resources/qml/NooLiteClient.qml similarity index 100% rename from NooLiteClient.qml rename to resources/qml/NooLiteClient.qml diff --git a/ServiceForm.qml b/resources/qml/ServiceForm.qml similarity index 100% rename from ServiceForm.qml rename to resources/qml/ServiceForm.qml diff --git a/SettingsForm.qml b/resources/qml/SettingsForm.qml similarity index 100% rename from SettingsForm.qml rename to resources/qml/SettingsForm.qml diff --git a/SubtitledItemDelegate.qml b/resources/qml/SubtitledItemDelegate.qml similarity index 100% rename from SubtitledItemDelegate.qml rename to resources/qml/SubtitledItemDelegate.qml diff --git a/main.qml b/resources/qml/main.qml similarity index 98% rename from main.qml rename to resources/qml/main.qml index 90965b0..28098f0 100644 --- a/main.qml +++ b/resources/qml/main.qml @@ -62,7 +62,7 @@ ApplicationWindow { "quit": () => { Qt.quit() } } - logo: "qrc:/lamp.png" + logo: "/images/lamp.png" appName: qsTr("nooLight v1.0") model: ListModel { diff --git a/qtquickcontrols2.conf b/resources/qtquickcontrols2.conf similarity index 100% rename from qtquickcontrols2.conf rename to resources/qtquickcontrols2.conf diff --git a/resources/resources.qrc b/resources/resources.qrc new file mode 100644 index 0000000..c11ceba --- /dev/null +++ b/resources/resources.qrc @@ -0,0 +1,16 @@ + + + qml/main.qml + qtquickcontrols2.conf + qml/HomeForm.qml + qml/SettingsForm.qml + qml/SubtitledItemDelegate.qml + qml/LightsModel.qml + qml/LightGroup.qml + qml/GradientButton.qml + images/lamp.png + images/off.png + qml/NooLiteClient.qml + qml/ServiceForm.qml + + diff --git a/main.cpp b/src/main.cpp similarity index 84% rename from main.cpp rename to src/main.cpp index eeefb81..bf0a044 100644 --- a/main.cpp +++ b/src/main.cpp @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) app.setOrganizationDomain("inc"); QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); if (engine.rootObjects().isEmpty()) { return -1; }