From 1391405ab4938bf5607abc340668724ffceeff6e Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 31 Oct 2024 06:30:32 +0100 Subject: [PATCH] chore: remove old per-project example We will make a new one as soon as Fluid 2 is stable. --- .../perproject/minimalcmake/CMakeLists.txt | 37 --------------- examples/perproject/minimalcmake/README.md | 47 ------------------- .../minimalcmake/src/CMakeLists.txt | 12 ----- .../perproject/minimalcmake/src/Page1.qml | 7 --- .../minimalcmake/src/Page1Form.ui.qml | 24 ---------- examples/perproject/minimalcmake/src/main.cpp | 17 ------- examples/perproject/minimalcmake/src/main.qml | 41 ---------------- examples/perproject/minimalcmake/src/qml.qrc | 8 ---- .../minimalcmake/src/qtquickcontrols2.conf | 15 ------ 9 files changed, 208 deletions(-) delete mode 100644 examples/perproject/minimalcmake/CMakeLists.txt delete mode 100644 examples/perproject/minimalcmake/README.md delete mode 100644 examples/perproject/minimalcmake/src/CMakeLists.txt delete mode 100644 examples/perproject/minimalcmake/src/Page1.qml delete mode 100644 examples/perproject/minimalcmake/src/Page1Form.ui.qml delete mode 100644 examples/perproject/minimalcmake/src/main.cpp delete mode 100644 examples/perproject/minimalcmake/src/main.qml delete mode 100644 examples/perproject/minimalcmake/src/qml.qrc delete mode 100644 examples/perproject/minimalcmake/src/qtquickcontrols2.conf diff --git a/examples/perproject/minimalcmake/CMakeLists.txt b/examples/perproject/minimalcmake/CMakeLists.txt deleted file mode 100644 index 04b9e9cc..00000000 --- a/examples/perproject/minimalcmake/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -cmake_minimum_required(VERSION 3.10.0) - -project("MinimalCMake" - VERSION "1.0.0" - DESCRIPTION "Sample project using Fluid with CMake" - LANGUAGES CXX C -) - -## Shared macros and functions: -set(LIRI_LOCAL_ECM TRUE) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/fluid/cmake/shared/modules") - -## Configure Fluid: -option(FLUID_WITH_DOCUMENTATION "" OFF) -option(FLUID_WITH_DEMO "" OFF) - -## Set minimum versions required: -set(QT_MIN_VERSION "5.10.0") - -## Liri specific setup common for all modules: -include(LiriSetup) - -## Find Qt 5: -find_package(Qt5 "${QT_MIN_VERSION}" - CONFIG REQUIRED - COMPONENTS - Core - Gui - Svg - Qml - Quick - QuickControls2 -) - -## Add subdirectories: -add_subdirectory(fluid) -add_subdirectory(src) diff --git a/examples/perproject/minimalcmake/README.md b/examples/perproject/minimalcmake/README.md deleted file mode 100644 index 32683cdd..00000000 --- a/examples/perproject/minimalcmake/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Per-project installation with CMake - -Fetch Fluid sources from the root directory of your project: - -```sh -git clone https://github.com/lirios/fluid.git -``` - -Now create your `CMakeLists.txt` that includes both `fluid` -and the actual code of your app (inside the `src` sub-directory). - -Make sure you pass the installation prefix to `cmake` when configuring -the project. - -From this directory type the following commands to prepare the -build directory and configure the project: - -```sh -mkdir build -cd build -cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/install-root -``` - -Now build and install: - -```sh -make -make install -``` - -This examples the following file system: - -``` -install-root -├── bin -│   └── example -└── lib - └── qml - └── ... -``` - -You can adopt a different layout passing the following arguments to `cmake`: - - * `INSTALL_BINDIR` - * `INSTALL_QMLDIR` - -Please remember to change your imports path accordingly, see `main.cpp`. diff --git a/examples/perproject/minimalcmake/src/CMakeLists.txt b/examples/perproject/minimalcmake/src/CMakeLists.txt deleted file mode 100644 index 06e1efc2..00000000 --- a/examples/perproject/minimalcmake/src/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -liri_add_executable("example" - SOURCES - main.cpp - RESOURCES - qml.qrc - LIBRARIES - Qt5::Core - Qt5::Gui - Qt5::QuickControls2 -) - -liri_finalize_executable("example") diff --git a/examples/perproject/minimalcmake/src/Page1.qml b/examples/perproject/minimalcmake/src/Page1.qml deleted file mode 100644 index 58af1415..00000000 --- a/examples/perproject/minimalcmake/src/Page1.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.10 - -Page1Form { - button1.onClicked: { - console.log("Button Pressed. Entered text: " + textField1.text); - } -} diff --git a/examples/perproject/minimalcmake/src/Page1Form.ui.qml b/examples/perproject/minimalcmake/src/Page1Form.ui.qml deleted file mode 100644 index d8b0af7d..00000000 --- a/examples/perproject/minimalcmake/src/Page1Form.ui.qml +++ /dev/null @@ -1,24 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 -import QtQuick.Layouts 1.3 - -Item { - property alias textField1: textField1 - property alias button1: button1 - - RowLayout { - anchors.horizontalCenter: parent.horizontalCenter - anchors.topMargin: 20 - anchors.top: parent.top - - TextField { - id: textField1 - placeholderText: qsTr("Text Field") - } - - Button { - id: button1 - text: qsTr("Press Me") - } - } -} diff --git a/examples/perproject/minimalcmake/src/main.cpp b/examples/perproject/minimalcmake/src/main.cpp deleted file mode 100644 index 949024fa..00000000 --- a/examples/perproject/minimalcmake/src/main.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QGuiApplication app(argc, argv); - - QQmlApplicationEngine engine; - engine.addImportPath(QCoreApplication::applicationDirPath() + QDir::separator() + QLatin1String("..") + - QDir::separator() + QLatin1String("lib") + QDir::separator() + QLatin1String("qml")); - engine.addImportPath(QCoreApplication::applicationDirPath() + QDir::separator() + QLatin1String("qml")); - engine.load(QUrl(QLatin1String("qrc:/main.qml"))); - - return app.exec(); -} diff --git a/examples/perproject/minimalcmake/src/main.qml b/examples/perproject/minimalcmake/src/main.qml deleted file mode 100644 index f65c8d91..00000000 --- a/examples/perproject/minimalcmake/src/main.qml +++ /dev/null @@ -1,41 +0,0 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Fluid as Fluid - -Fluid.ApplicationWindow { - width: 640 - height: 480 - title: qsTr("Hello World") - visible: true - - initialPage: Fluid.TabbedPage { - title: qsTr("Tabbed Page") - - actions: [ - Fluid.Action { - icon.source: Fluid.Utils.iconUrl("content/add") - text: qsTr("Add content") - toolTip: qsTr("Add content") - onTriggered: console.log("Example action...") - } - ] - - Fluid.Tab { - title: qsTr("First") - - Page1 { - anchors.fill: parent - } - } - - Fluid.Tab { - title: qsTr("Second") - - Label { - text: qsTr("Second page") - anchors.centerIn: parent - } - } - } -} diff --git a/examples/perproject/minimalcmake/src/qml.qrc b/examples/perproject/minimalcmake/src/qml.qrc deleted file mode 100644 index 44587bd5..00000000 --- a/examples/perproject/minimalcmake/src/qml.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - main.qml - Page1.qml - Page1Form.ui.qml - qtquickcontrols2.conf - - diff --git a/examples/perproject/minimalcmake/src/qtquickcontrols2.conf b/examples/perproject/minimalcmake/src/qtquickcontrols2.conf deleted file mode 100644 index 0c8980f8..00000000 --- a/examples/perproject/minimalcmake/src/qtquickcontrols2.conf +++ /dev/null @@ -1,15 +0,0 @@ -; This file can be edited to change the style of the application -; See Styling Qt Quick Controls 2 in the documentation for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-styles.html - -[Controls] -Style=Material - -[Universal] -Theme=Light -;Accent=Steel - -[Material] -Theme=Light -;Accent=BlueGrey -;Primary=BlueGray