summaryrefslogtreecommitdiff
path: root/examples/ivicore/qface-tutorial/chapter5-ipc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ivicore/qface-tutorial/chapter5-ipc')
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/CMakeLists.txt2
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/backend_qtro/CMakeLists.txt12
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/backend_simulator/CMakeLists.txt12
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/frontend/CMakeLists.txt14
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/imports/CMakeLists.txt11
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/CMakeLists.txt9
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/Dial.qml41
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/LeftDial.qml1
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt8
9 files changed, 10 insertions, 100 deletions
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/CMakeLists.txt
index 6bdba9a..fac920e 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/CMakeLists.txt
@@ -1,4 +1,6 @@
# Generated from chapter5-ipc.pro.
+cmake_minimum_required(VERSION 3.14)
+project(qface-chapter5-ipc LANGUAGES CXX)
add_subdirectory(instrument-cluster)
add_subdirectory(frontend)
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/backend_qtro/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/backend_qtro/CMakeLists.txt
index fbf027a..a7b4d50 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/backend_qtro/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/backend_qtro/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from backend_qtro.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(instrumentcluster_qtro LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -20,19 +16,13 @@ find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS IviCore)
qt_add_plugin(instrumentcluster_qtro)
+set_target_properties(instrumentcluster_qtro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../qtivi)
# IVI Generator:
qt6_ivigenerator(instrumentcluster_qtro
QFACE_SOURCES ../instrument-cluster.qface
QFACE_FORMAT backend_qtro
)
-set_target_properties(instrumentcluster_qtro PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_include_directories(instrumentcluster_qtro PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}/../frontend
-)
target_link_libraries(instrumentcluster_qtro PUBLIC
QtIviInstrumentCluster_Chapter5
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/backend_simulator/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/backend_simulator/CMakeLists.txt
index c27a530..0a21a1b 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/backend_simulator/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/backend_simulator/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from backend_simulator.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(instrumentcluster_simulation LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -20,19 +16,13 @@ find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS IviCore)
qt_add_plugin(instrumentcluster_chapter5_simulation)
+set_target_properties(instrumentcluster_chapter5_simulation PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../qtivi)
# IVI Generator:
qt6_ivigenerator(instrumentcluster_chapter5_simulation
QFACE_SOURCES ../instrument-cluster.qface
QFACE_FORMAT backend_simulator
)
-set_target_properties(instrumentcluster_chapter5_simulation PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_include_directories(instrumentcluster_chapter5_simulation PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}/../frontend
-)
target_link_libraries(instrumentcluster_chapter5_simulation PUBLIC
QtIviInstrumentCluster_Chapter5
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/frontend/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/frontend/CMakeLists.txt
index 9be3458..2dc37cb 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/frontend/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/frontend/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from frontend.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(QtIviInstrumentCluster LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -22,18 +18,16 @@ find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
add_library(QtIviInstrumentCluster_Chapter5)
+set_target_properties(QtIviInstrumentCluster_Chapter5 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../)
# IVI Generator:
qt6_ivigenerator(QtIviInstrumentCluster_Chapter5
QFACE_SOURCES ../instrument-cluster.qface
QFACE_FORMAT frontend
)
-set_target_properties(QtIviInstrumentCluster_Chapter5 PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_compile_definitions(QtIviInstrumentCluster_Chapter5 PUBLIC
- QT_BUILD_EXAMPLE_IVI_INSTRUMENTCLUSTER_LIB
+
+target_include_directories(QtIviInstrumentCluster_Chapter5 PUBLIC
+ ${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(QtIviInstrumentCluster_Chapter5 PUBLIC
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/imports/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/imports/CMakeLists.txt
index 2e43fb2..ba332da 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/imports/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/imports/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from imports.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(imports LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -25,13 +21,6 @@ qt6_ivigenerator(instrument_cluster_chapter5_imports
QFACE_SOURCES ../instrument-cluster.qface
QFACE_FORMAT qmlplugin
)
-set_target_properties(instrument_cluster_chapter5_imports PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_include_directories(instrument_cluster_chapter5_imports PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}/../frontend
-)
target_link_libraries(instrument_cluster_chapter5_imports PUBLIC
QtIviInstrumentCluster_Chapter5
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/CMakeLists.txt
index 9582055..35fe21b 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from instrument-cluster.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(chapter5-ipc LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -23,16 +19,13 @@ find_package(Qt6 COMPONENTS Quick)
qt_add_executable(chapter5-ipc
main.cpp
)
+set_target_properties(chapter5-ipc PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../)
set_target_properties(chapter5-ipc PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE FALSE
)
-target_include_directories(chapter5-ipc PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}/../frontend
-)
target_link_libraries(chapter5-ipc PUBLIC
- # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../
Qt::Core
Qt::Gui
Qt::Qml
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/Dial.qml b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/Dial.qml
index a4b5c3f..af44cbe 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/Dial.qml
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/Dial.qml
@@ -75,45 +75,4 @@ Item {
rotation: min + (max - min) * root.value
source: Qt.resolvedUrl(root.dialCursor)
}
-
- ShaderEffect {
- anchors.fill: meter
- property var pattern: Image {
- source: Qt.resolvedUrl("images/dial_pattern.png")
- }
- property var fill: Image {
- source: Qt.resolvedUrl(root.fillImage)
- }
- property real value: root.value
-
- fragmentShader: "
-#define M_PI 3.141592653589793
-#define INNER " + root.circleRadius + "
-
-varying highp vec2 qt_TexCoord0;
-uniform lowp float qt_Opacity;
-uniform sampler2D pattern;
-uniform sampler2D fill;
-uniform lowp float value;
-
-void main() {
- lowp vec4 pattern = texture2D(pattern, qt_TexCoord0);
- lowp vec4 fill = texture2D(fill, qt_TexCoord0);
-
- lowp vec2 pos = vec2(qt_TexCoord0.x - 0.5, 0.501 - qt_TexCoord0.y);
- lowp float d = length(pos);
- lowp float angle = atan(pos.x, pos.y) / (2.0 * M_PI);
- lowp float v = 0.66 * value - 0.33;
-
- // Flare pattern
- lowp vec4 color = mix(pattern, vec4(0.0), smoothstep(v, v + 0.1, angle));
- // Gradient fill color
- color += mix(fill, vec4(0.0), step(v, angle));
- // Punch out the center hole
- color = mix(vec4(0.0), color, smoothstep(INNER - 0.001, INNER + 0.001, d));
- // Fade out below 0
- gl_FragColor = mix(color, vec4(0.0), smoothstep(-0.35, -0.5, angle));
-}
- "
- }
}
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/LeftDial.qml b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/LeftDial.qml
index f57b8af..0cae23f 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/LeftDial.qml
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/instrument-cluster/LeftDial.qml
@@ -52,7 +52,6 @@
****************************************************************************/
import QtQuick 2.1
-import QtGraphicalEffects 1.0
Item {
id: root
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt
index e92b615..43e0e87 100644
--- a/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt
+++ b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt
@@ -1,8 +1,4 @@
# Generated from simulation_server.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(chapter5-ipc-server LANGUAGES CXX)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -19,6 +15,7 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS IviCore)
qt_add_executable(chapter5-ipc-server)
+set_target_properties(chapter5-ipc-server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../)
# IVI Generator:
qt6_ivigenerator(chapter5-ipc-server
@@ -29,9 +26,6 @@ set_target_properties(chapter5-ipc-server PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE FALSE
)
-target_include_directories(chapter5-ipc-server PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}/../frontend
-)
target_link_libraries(chapter5-ipc-server PUBLIC
QtIviInstrumentCluster_Chapter5