SensorTab all Done
paginationBar Done
@ -31,6 +31,23 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
|
||||
httpclient.h httpclient.cpp
|
||||
flowlayout.h flowlayout.cpp
|
||||
pagination.h pagination.cpp
|
||||
pagingstyle1.h pagingstyle1.cpp
|
||||
pagingstyle2.h pagingstyle2.cpp
|
||||
pagingutil.h pagingutil.cpp
|
||||
sensordialog.h sensordialog.cpp sensordialog.ui
|
||||
sensorgroups_r.h
|
||||
getsensors_p.h
|
||||
getsensors_r.h
|
||||
sensorservice.h
|
||||
sensorlogs.h
|
||||
sensorlogervice.h
|
||||
utils.h
|
||||
utils.cpp
|
||||
savesensorservice.h
|
||||
paginationbar.h paginationbar.cpp
|
||||
|
||||
|
||||
|
||||
)
|
||||
# Define target properties for Android with Qt 6 as:
|
||||
|
92
CMakeLists.txt.XkxIoT
Normal file
@ -0,0 +1,92 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(FemaSoftware VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools SvgWidgets Gui Network)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools SvgWidgets Gui Network)
|
||||
|
||||
set(TS_FILES FemaSoftware_ru_RU.ts)
|
||||
|
||||
set(PROJECT_SOURCES
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
mainwindow.h
|
||||
mainwindow.ui
|
||||
${TS_FILES}
|
||||
)
|
||||
|
||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
qt_add_executable(FemaSoftware
|
||||
MANUAL_FINALIZATION
|
||||
${PROJECT_SOURCES}
|
||||
resources.qrc
|
||||
sensorwidget.h sensorwidget.cpp
|
||||
|
||||
httpclient.h httpclient.cpp
|
||||
flowlayout.h flowlayout.cpp
|
||||
pagination.h pagination.cpp
|
||||
pagingstyle1.h pagingstyle1.cpp
|
||||
pagingstyle2.h pagingstyle2.cpp
|
||||
pagingutil.h pagingutil.cpp
|
||||
sensordialog.h sensordialog.cpp sensordialog.ui
|
||||
sensorgroups_r.h
|
||||
getsensors_p.h
|
||||
getsensors_r.h
|
||||
sensorservice.h
|
||||
|
||||
)
|
||||
# Define target properties for Android with Qt 6 as:
|
||||
# set_property(TARGET FemaSoftware APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
|
||||
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
|
||||
|
||||
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
else()
|
||||
if(ANDROID)
|
||||
add_library(FemaSoftware SHARED
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
# Define properties for Android with Qt 5 after find_package() calls as:
|
||||
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
|
||||
else()
|
||||
add_executable(FemaSoftware
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
endif()
|
||||
|
||||
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(FemaSoftware PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::SvgWidgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Network)
|
||||
|
||||
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
|
||||
# If you are developing for iOS or macOS you should consider setting an
|
||||
# explicit, fixed bundle identifier manually though.
|
||||
if(${QT_VERSION} VERSION_LESS 6.1.0)
|
||||
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.FemaSoftware)
|
||||
endif()
|
||||
set_target_properties(FemaSoftware PROPERTIES
|
||||
${BUNDLE_ID_OPTION}
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
MACOSX_BUNDLE TRUE
|
||||
WIN32_EXECUTABLE TRUE
|
||||
)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS FemaSoftware
|
||||
BUNDLE DESTINATION .
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
qt_finalize_executable(FemaSoftware)
|
||||
endif()
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-09T10:37:52. -->
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-15T23:25:42. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@ -90,6 +90,360 @@
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.8.1 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.8.1 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.681.win64_mingw_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_MinGW_64_bit-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_MinGW_64_bit-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString"></value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.CMakePackageStep</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="QString" key="ApplicationManagerPlugin.Deploy.InstallPackageStep.Arguments">install-package --acknowledge</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Install Application Manager package</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.InstallPackageStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ApplicationManagerPlugin.Deploy.Configuration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">FemaSoftware</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">FemaSoftware</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Projects/QTProjects/FemaLocalSoftware/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.8.1 llvm-mingw 64-bit</value>
|
||||
@ -103,14 +457,14 @@
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug</value>
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -160,14 +514,14 @@
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release</value>
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -214,14 +568,14 @@
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -268,14 +622,14 @@
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -323,14 +677,14 @@
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel</value>
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaLocalSoftware\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -437,14 +791,13 @@
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Projects/QTProjects/FemaLocalSoftware/build/Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
<value type="qlonglong">2</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
|
@ -0,0 +1,314 @@
|
||||
#
|
||||
# Internal Qt Creator variable reference
|
||||
#
|
||||
foreach(qtcreator_var
|
||||
QT_QMAKE_EXECUTABLE CMAKE_PREFIX_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
set(__just_reference_${qtcreator_var} ${${qtcreator_var}})
|
||||
endforeach()
|
||||
|
||||
option(QT_CREATOR_SOURCE_GROUPS "Qt Creator source groups extensions" ON)
|
||||
if (QT_CREATOR_SOURCE_GROUPS)
|
||||
source_group("Resources" REGULAR_EXPRESSION "\\.(pdf|plist|png|jpeg|jpg|storyboard|xcassets|qrc|svg|gif|ico|webp)$")
|
||||
source_group("Forms" REGULAR_EXPRESSION "\\.(ui)$")
|
||||
source_group("State charts" REGULAR_EXPRESSION "\\.(scxml)$")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/QtCreatorPackageManager.cmake")
|
||||
include("${CMAKE_SOURCE_DIR}/QtCreatorPackageManager.cmake")
|
||||
endif()
|
||||
|
||||
if (QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP)
|
||||
return()
|
||||
endif()
|
||||
option(QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP "Skip Qt Creator's package manager auto-setup" OFF)
|
||||
|
||||
# Store the C/C++ object output extension
|
||||
if (CMAKE_VERSION GREATER_EQUAL "3.19")
|
||||
cmake_language(DEFER CALL set CMAKE_C_OUTPUT_EXTENSION "${CMAKE_C_OUTPUT_EXTENSION}" CACHE STRING "" FORCE)
|
||||
cmake_language(DEFER CALL set CMAKE_CXX_OUTPUT_EXTENSION "${CMAKE_CXX_OUTPUT_EXTENSION}" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
macro(qtc_auto_setup_compiler_standard toolchainFile)
|
||||
foreach(lang_var C CXX CUDA OBJC OBJCXX)
|
||||
foreach(prop_var STANDARD STANDARD_REQUIRED EXTENSIONS)
|
||||
if (CMAKE_${lang_var}_${prop_var})
|
||||
file(APPEND "${toolchainFile}"
|
||||
"set(CMAKE_${lang_var}_${prop_var} ${CMAKE_${lang_var}_${prop_var}})\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# Forward important CMake variables to the package manager in the toolchain file
|
||||
foreach(fwd_var CMAKE_MSVC_RUNTIME_LIBRARY CMAKE_SYSROOT CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES)
|
||||
if (${fwd_var})
|
||||
file(APPEND "${toolchainFile}"
|
||||
"set(${fwd_var} ${${fwd_var}})\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# conan
|
||||
#
|
||||
macro(qtc_auto_setup_conan)
|
||||
foreach(file conanfile.txt conanfile.py)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${file}")
|
||||
set(conanfile_txt "${CMAKE_SOURCE_DIR}/${file}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (conanfile_txt AND NOT QT_CREATOR_SKIP_CONAN_SETUP)
|
||||
option(QT_CREATOR_SKIP_CONAN_SETUP "Skip Qt Creator's conan package manager auto-setup" OFF)
|
||||
set(QT_CREATOR_CONAN_BUILD_POLICY "missing" CACHE STRING "Qt Creator's conan package manager auto-setup build policy. This is used for the BUILD property of cmake_conan_run")
|
||||
|
||||
set_property(
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS "${conanfile_txt}")
|
||||
|
||||
find_program(conan_program conan)
|
||||
if (NOT conan_program)
|
||||
message(WARNING "Qt Creator: conan executable not found. "
|
||||
"Package manager auto-setup will be skipped. "
|
||||
"To disable this warning set QT_CREATOR_SKIP_CONAN_SETUP to ON.")
|
||||
return()
|
||||
endif()
|
||||
execute_process(COMMAND ${conan_program} --version
|
||||
RESULT_VARIABLE result_code
|
||||
OUTPUT_VARIABLE conan_version_output
|
||||
ERROR_VARIABLE conan_version_output)
|
||||
if (NOT result_code EQUAL 0)
|
||||
message(FATAL_ERROR "conan --version failed='${result_code}: ${conan_version_output}")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE ".*Conan version ([0-9].[0-9]).*" "\\1" conan_version "${conan_version_output}")
|
||||
|
||||
set(conanfile_timestamp_file "${CMAKE_BINARY_DIR}/conan-dependencies/conanfile.timestamp")
|
||||
file(TIMESTAMP "${conanfile_txt}" conanfile_timestamp)
|
||||
|
||||
set(do_conan_installation ON)
|
||||
if (EXISTS "${conanfile_timestamp_file}")
|
||||
file(READ "${conanfile_timestamp_file}" old_conanfile_timestamp)
|
||||
if ("${conanfile_timestamp}" STREQUAL "${old_conanfile_timestamp}")
|
||||
set(do_conan_installation OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(conanfile_build_policy_file "${CMAKE_BINARY_DIR}/conan-dependencies/conanfile.buildpolicy")
|
||||
if (EXISTS "${conanfile_build_policy_file}")
|
||||
file(READ "${conanfile_build_policy_file}" build_policy)
|
||||
if (NOT "${build_policy}" STREQUAL "${QT_CREATOR_CONAN_BUILD_POLICY}")
|
||||
set(do_conan_installation ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (do_conan_installation)
|
||||
message(STATUS "Qt Creator: conan package manager auto-setup. "
|
||||
"Skip this step by setting QT_CREATOR_SKIP_CONAN_SETUP to ON.")
|
||||
|
||||
file(COPY "${conanfile_txt}" DESTINATION "${CMAKE_BINARY_DIR}/conan-dependencies/")
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake" "
|
||||
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
|
||||
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
|
||||
")
|
||||
qtc_auto_setup_compiler_standard("${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake")
|
||||
|
||||
if (CMAKE_TOOLCHAIN_FILE)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
|
||||
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/CMakeLists.txt" "
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
unset(CMAKE_PROJECT_INCLUDE_BEFORE CACHE)
|
||||
project(conan-setup)
|
||||
|
||||
if (${conan_version} VERSION_GREATER_EQUAL 2.0)
|
||||
set(CONAN_COMMAND \"${conan_program}\")
|
||||
include(\"${CMAKE_CURRENT_LIST_DIR}/conan_provider.cmake\")
|
||||
conan_profile_detect_default()
|
||||
detect_host_profile(\"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\")
|
||||
|
||||
set(build_types \${CMAKE_BUILD_TYPE})
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
set(build_types \${CMAKE_CONFIGURATION_TYPES})
|
||||
endif()
|
||||
|
||||
foreach(type \${build_types})
|
||||
conan_install(
|
||||
-pr \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\"
|
||||
--build=${QT_CREATOR_CONAN_BUILD_POLICY}
|
||||
-s build_type=\${type}
|
||||
-g CMakeDeps)
|
||||
endforeach()
|
||||
|
||||
get_property(CONAN_INSTALL_SUCCESS GLOBAL PROPERTY CONAN_INSTALL_SUCCESS)
|
||||
if (CONAN_INSTALL_SUCCESS)
|
||||
get_property(CONAN_GENERATORS_FOLDER GLOBAL PROPERTY CONAN_GENERATORS_FOLDER)
|
||||
file(TO_CMAKE_PATH \"\${CONAN_GENERATORS_FOLDER}\" CONAN_GENERATORS_FOLDER)
|
||||
file(WRITE \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake\" \"
|
||||
list(PREPEND CMAKE_PREFIX_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\")
|
||||
list(PREPEND CMAKE_MODULE_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\")
|
||||
list(PREPEND CMAKE_FIND_ROOT_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\")
|
||||
list(REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
|
||||
list(REMOVE_DUPLICATES CMAKE_MODULE_PATH)
|
||||
list(REMOVE_DUPLICATES CMAKE_FIND_ROOT_PATH)
|
||||
set(CMAKE_PREFIX_PATH \\\"\\\${CMAKE_PREFIX_PATH}\\\" CACHE STRING \\\"\\\" FORCE)
|
||||
set(CMAKE_MODULE_PATH \\\"\\\${CMAKE_MODULE_PATH}\\\" CACHE STRING \\\"\\\" FORCE)
|
||||
set(CMAKE_FIND_ROOT_PATH \\\"\\\${CMAKE_FIND_ROOT_PATH}\\\" CACHE STRING \\\"\\\" FORCE)
|
||||
\")
|
||||
endif()
|
||||
else()
|
||||
include(\"${CMAKE_CURRENT_LIST_DIR}/conan.cmake\")
|
||||
conan_cmake_run(
|
||||
CONANFILE \"${conanfile_txt}\"
|
||||
INSTALL_FOLDER \"${CMAKE_BINARY_DIR}/conan-dependencies\"
|
||||
GENERATORS cmake_paths cmake_find_package json
|
||||
BUILD ${QT_CREATOR_CONAN_BUILD_POLICY}
|
||||
ENV CONAN_CMAKE_TOOLCHAIN_FILE=\"${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake\"
|
||||
)
|
||||
endif()
|
||||
")
|
||||
|
||||
if (NOT DEFINED CMAKE_BUILD_TYPE AND NOT DEFINED CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||
-S "${CMAKE_BINARY_DIR}/conan-dependencies/"
|
||||
-B "${CMAKE_BINARY_DIR}/conan-dependencies/build"
|
||||
-C "${CMAKE_BINARY_DIR}/qtcsettings.cmake"
|
||||
-D "CMAKE_TOOLCHAIN_FILE=${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake"
|
||||
-G ${CMAKE_GENERATOR}
|
||||
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-D "CMAKE_CONFIGURATION_TYPES=${CMAKE_CONFIGURATION_TYPES}"
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if (result EQUAL 0)
|
||||
file(WRITE "${conanfile_timestamp_file}" "${conanfile_timestamp}")
|
||||
file(WRITE "${conanfile_build_policy_file}" ${QT_CREATOR_CONAN_BUILD_POLICY})
|
||||
else()
|
||||
message(WARNING "Qt Creator's conan package manager auto-setup failed. Consider setting "
|
||||
"QT_CREATOR_SKIP_CONAN_SETUP to ON and reconfigure to skip this step.")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include("${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake")
|
||||
endif()
|
||||
unset(conanfile_txt)
|
||||
endmacro()
|
||||
qtc_auto_setup_conan()
|
||||
|
||||
#
|
||||
# vcpkg
|
||||
#
|
||||
macro(qtc_auto_setup_vcpkg)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json" AND NOT QT_CREATOR_SKIP_VCPKG_SETUP)
|
||||
option(QT_CREATOR_SKIP_VCPKG_SETUP "Skip Qt Creator's vcpkg package manager auto-setup" OFF)
|
||||
|
||||
set_property(
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/vcpkg.json")
|
||||
|
||||
find_program(vcpkg_program vcpkg
|
||||
PATHS $ENV{VCPKG_ROOT} ${CMAKE_SOURCE_DIR}/vcpkg ${CMAKE_SOURCE_DIR}/3rdparty/vcpkg
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
if (NOT vcpkg_program)
|
||||
message(WARNING "Qt Creator: vcpkg executable not found. "
|
||||
"Package manager auto-setup will be skipped. "
|
||||
"To disable this warning set QT_CREATOR_SKIP_VCPKG_SETUP to ON.")
|
||||
return()
|
||||
endif()
|
||||
execute_process(COMMAND ${vcpkg_program} version
|
||||
RESULT_VARIABLE result_code
|
||||
OUTPUT_VARIABLE vcpkg_version_output
|
||||
ERROR_VARIABLE vcpkg_version_output)
|
||||
if (NOT result_code EQUAL 0)
|
||||
message(FATAL_ERROR "vcpkg version failed='${result_code}: ${vcpkg_version_output}")
|
||||
endif()
|
||||
|
||||
# Resolve any symlinks
|
||||
get_filename_component(vpkg_program_real_path ${vcpkg_program} REALPATH)
|
||||
get_filename_component(vpkg_root ${vpkg_program_real_path} DIRECTORY)
|
||||
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
|
||||
message(STATUS "Qt Creator: vcpkg package manager auto-setup. "
|
||||
"Skip this step by setting QT_CREATOR_SKIP_VCPKG_SETUP to ON.")
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
|
||||
set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")
|
||||
set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")
|
||||
")
|
||||
qtc_auto_setup_compiler_standard("${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
|
||||
|
||||
if (CMAKE_TOOLCHAIN_FILE AND NOT
|
||||
CMAKE_TOOLCHAIN_FILE STREQUAL "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake"
|
||||
"include(\"${CMAKE_TOOLCHAIN_FILE}\")\n")
|
||||
endif()
|
||||
|
||||
if (VCPKG_TARGET_TRIPLET)
|
||||
set(vcpkg_triplet ${VCPKG_TARGET_TRIPLET})
|
||||
else()
|
||||
if (ANDROID_ABI)
|
||||
if (ANDROID_ABI STREQUAL "armeabi-v7a")
|
||||
set(vcpkg_triplet arm-neon-android)
|
||||
elseif (ANDROID_ABI STREQUAL "arm64-v8a")
|
||||
set(vcpkg_triplet arm64-android)
|
||||
elseif (ANDROID_ABI STREQUAL "x86")
|
||||
set(vcpkg_triplet x86-android)
|
||||
elseif (ANDROID_ABI STREQUAL "x86_64")
|
||||
set(vcpkg_triplet x64-android)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported Android ABI: ${ANDROID_ABI}")
|
||||
endif()
|
||||
# Needed by vcpkg/scripts/toolchains/android.cmake
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
|
||||
set(ENV{ANDROID_NDK_HOME} \"${ANDROID_NDK}\")
|
||||
")
|
||||
elseif (WIN32)
|
||||
set(vcpkg_triplet x64-mingw-static)
|
||||
if (CMAKE_CXX_COMPILER MATCHES ".*/(.*)/cl.exe")
|
||||
set(vcpkg_triplet ${CMAKE_MATCH_1}-windows)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
# We're too early to use CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
execute_process(
|
||||
COMMAND uname -m
|
||||
OUTPUT_VARIABLE __apple_host_system_processor
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (__apple_host_system_processor MATCHES "arm64")
|
||||
set(vcpkg_triplet arm64-osx)
|
||||
else()
|
||||
set(vcpkg_triplet x64-osx)
|
||||
endif()
|
||||
else()
|
||||
set(vcpkg_triplet x64-linux)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" "
|
||||
set(VCPKG_TARGET_TRIPLET ${vcpkg_triplet})
|
||||
include(\"${vpkg_root}/scripts/buildsystems/vcpkg.cmake\")
|
||||
")
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" CACHE PATH "" FORCE)
|
||||
|
||||
# Save CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH as cache variables
|
||||
if (CMAKE_VERSION GREATER_EQUAL "3.19")
|
||||
cmake_language(DEFER CALL list REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
|
||||
cmake_language(DEFER CALL list REMOVE_DUPLICATES CMAKE_MODULE_PATH)
|
||||
cmake_language(DEFER CALL set CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}" CACHE STRING "" FORCE)
|
||||
cmake_language(DEFER CALL set CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
qtc_auto_setup_vcpkg()
|
@ -0,0 +1,92 @@
|
||||
set(CMAKE_CXX_COMPILER "G:/Programs/QT/Tools/mingw1310_64/bin/g++.exe")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "13.1.0")
|
||||
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
|
||||
set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
||||
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
||||
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
||||
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
||||
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
|
||||
set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
|
||||
|
||||
set(CMAKE_CXX_PLATFORM_ID "MinGW")
|
||||
set(CMAKE_CXX_SIMULATE_ID "")
|
||||
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
|
||||
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "G:/Programs/QT/Tools/mingw1310_64/bin/ar.exe")
|
||||
set(CMAKE_CXX_COMPILER_AR "G:/Programs/QT/Tools/mingw1310_64/bin/gcc-ar.exe")
|
||||
set(CMAKE_RANLIB "G:/Programs/QT/Tools/mingw1310_64/bin/ranlib.exe")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "G:/Programs/QT/Tools/mingw1310_64/bin/gcc-ranlib.exe")
|
||||
set(CMAKE_LINKER "G:/Programs/QT/Tools/mingw1310_64/bin/ld.exe")
|
||||
set(CMAKE_LINKER_LINK "")
|
||||
set(CMAKE_LINKER_LLD "")
|
||||
set(CMAKE_CXX_COMPILER_LINKER "../src/gcc-13.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64 --enable-host-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libssp --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev1, Built by MinGW-Builds project' --with-bugurl=https:/github.com/niXman/mingw-builds CFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64/opt/lib -L/c/buildroot/prerequisites/x86_64-zlib-static/lib -L/c/buildroot/prerequisites/x86_64-w64-mingw32-static/lib ' LD_FOR_TARGET=/c/buildroot/x86_64-1310-posix-seh-msvcrt-rt_v11-rev1/mingw64/bin/ld.exe")
|
||||
set(CMAKE_CXX_COMPILER_LINKER_ID "")
|
||||
set(CMAKE_CXX_COMPILER_LINKER_VERSION )
|
||||
set(CMAKE_CXX_COMPILER_LINKER_FRONTEND_VARIANT )
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_TAPI "CMAKE_TAPI-NOTFOUND")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm;ccm;cxxm;c++m)
|
||||
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
|
||||
foreach (lang IN ITEMS C OBJC OBJCXX)
|
||||
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
||||
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
|
||||
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED FALSE)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_CXX_COMPILER_ABI "")
|
||||
set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
|
||||
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++;G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/x86_64-w64-mingw32;G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/backward;G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include;G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed;G:/Programs/QT/Tools/mingw1310_64/x86_64-w64-mingw32/include")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;mingw32;gcc_s;gcc;moldname;mingwex;kernel32;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc_s;gcc;moldname;mingwex;kernel32")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "G:/Programs/QT/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0;G:/Programs/QT/Tools/mingw1310_64/lib/gcc;G:/Programs/QT/Tools/mingw1310_64/x86_64-w64-mingw32/lib;G:/Programs/QT/Tools/mingw1310_64/lib")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||
set(CMAKE_CXX_COMPILER_CLANG_RESOURCE_DIR "")
|
@ -0,0 +1,6 @@
|
||||
set(CMAKE_RC_COMPILER "G:/Programs/QT/Tools/mingw1310_64/bin/windres.exe")
|
||||
set(CMAKE_RC_COMPILER_ARG1 "")
|
||||
set(CMAKE_RC_COMPILER_LOADED 1)
|
||||
set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
|
||||
set(CMAKE_RC_OUTPUT_EXTENSION .obj)
|
||||
set(CMAKE_RC_COMPILER_ENV_VAR "RC")
|
@ -0,0 +1,15 @@
|
||||
set(CMAKE_HOST_SYSTEM "Windows-10.0.26100")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Windows")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "10.0.26100")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Windows-10.0.26100")
|
||||
set(CMAKE_SYSTEM_NAME "Windows")
|
||||
set(CMAKE_SYSTEM_VERSION "10.0.26100")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
BIN
build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/FemaSoftware.exe
Normal file
@ -0,0 +1,926 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'mainwindow.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 6.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef UI_MAINWINDOW_H
|
||||
#define UI_MAINWINDOW_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QGridLayout>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QSpacerItem>
|
||||
#include <QtWidgets/QStatusBar>
|
||||
#include <QtWidgets/QTabWidget>
|
||||
#include <QtWidgets/QTreeWidget>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_MainWindow
|
||||
{
|
||||
public:
|
||||
QWidget *centralwidget;
|
||||
QGridLayout *gridLayout_4;
|
||||
QTabWidget *tabWidget;
|
||||
QWidget *sensorsTab;
|
||||
QVBoxLayout *SensorsTabLayout;
|
||||
QHBoxLayout *nameLayout;
|
||||
QLabel *group;
|
||||
QLabel *showHidden;
|
||||
QSpacerItem *horizontalSpacer_4;
|
||||
QHBoxLayout *selectLayout;
|
||||
QComboBox *groupSelect;
|
||||
QComboBox *showHiddenSelect;
|
||||
QSpacerItem *horizontalSpacer_2;
|
||||
QHBoxLayout *searchLayout;
|
||||
QLineEdit *search;
|
||||
QSpacerItem *horizontalSpacer_3;
|
||||
QVBoxLayout *sensorsLayout;
|
||||
QWidget *incidentsTab;
|
||||
QVBoxLayout *verticalLayout;
|
||||
QVBoxLayout *IncidentsSearchLayout;
|
||||
QHBoxLayout *IncidentsSearchTextLayout;
|
||||
QLabel *TimeIntrval;
|
||||
QHBoxLayout *horizontalLayout_6;
|
||||
QComboBox *comboBox;
|
||||
QLineEdit *lineEdit;
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QHBoxLayout *IncidentsDataLayout;
|
||||
QVBoxLayout *verticalLayout_2;
|
||||
QWidget *treeBorder;
|
||||
QVBoxLayout *verticalLayout_6;
|
||||
QTreeWidget *treeWidget;
|
||||
QVBoxLayout *verticalLayout_7;
|
||||
QWidget *paginationBorder;
|
||||
QVBoxLayout *paginationLayout;
|
||||
QWidget *widget;
|
||||
QSpacerItem *verticalSpacer;
|
||||
QHBoxLayout *paginationBarLayout;
|
||||
QWidget *statisticsTab;
|
||||
QGridLayout *gridLayout_5;
|
||||
QWidget *journalTab;
|
||||
QVBoxLayout *verticalLayout_3;
|
||||
QVBoxLayout *verticalLayout_4;
|
||||
QHBoxLayout *horizontalLayout_8;
|
||||
QLabel *label_4;
|
||||
QLabel *label_3;
|
||||
QLabel *label_2;
|
||||
QSpacerItem *horizontalSpacer_6;
|
||||
QHBoxLayout *horizontalLayout_7;
|
||||
QComboBox *comboBox_4;
|
||||
QComboBox *comboBox_3;
|
||||
QComboBox *comboBox_2;
|
||||
QLineEdit *lineEdit_2;
|
||||
QSpacerItem *horizontalSpacer_7;
|
||||
QHBoxLayout *horizontalLayout_3;
|
||||
QVBoxLayout *verticalLayout_5;
|
||||
QTreeWidget *treeWidget_2;
|
||||
QGridLayout *gridLayout_2;
|
||||
QSpacerItem *horizontalSpacer_8;
|
||||
QSpacerItem *verticalSpacer_2;
|
||||
QWidget *settingsTab;
|
||||
QGridLayout *gridLayout_6;
|
||||
QStatusBar *statusbar;
|
||||
|
||||
void setupUi(QMainWindow *MainWindow)
|
||||
{
|
||||
if (MainWindow->objectName().isEmpty())
|
||||
MainWindow->setObjectName("MainWindow");
|
||||
MainWindow->resize(1632, 896);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(MainWindow->sizePolicy().hasHeightForWidth());
|
||||
MainWindow->setSizePolicy(sizePolicy);
|
||||
MainWindow->setMinimumSize(QSize(1150, 750));
|
||||
MainWindow->setMaximumSize(QSize(16777215, 16777215));
|
||||
MainWindow->setBaseSize(QSize(0, 0));
|
||||
MainWindow->setStyleSheet(QString::fromUtf8(""));
|
||||
MainWindow->setTabShape(QTabWidget::TabShape::Rounded);
|
||||
centralwidget = new QWidget(MainWindow);
|
||||
centralwidget->setObjectName("centralwidget");
|
||||
centralwidget->setAutoFillBackground(false);
|
||||
centralwidget->setStyleSheet(QString::fromUtf8("QWidget#centralwidget{\n"
|
||||
" background: #dcd174;\n"
|
||||
"}\n"
|
||||
""));
|
||||
gridLayout_4 = new QGridLayout(centralwidget);
|
||||
gridLayout_4->setSpacing(0);
|
||||
gridLayout_4->setObjectName("gridLayout_4");
|
||||
gridLayout_4->setContentsMargins(0, 0, 0, 0);
|
||||
tabWidget = new QTabWidget(centralwidget);
|
||||
tabWidget->setObjectName("tabWidget");
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
|
||||
sizePolicy1.setHorizontalStretch(0);
|
||||
sizePolicy1.setVerticalStretch(0);
|
||||
sizePolicy1.setHeightForWidth(tabWidget->sizePolicy().hasHeightForWidth());
|
||||
tabWidget->setSizePolicy(sizePolicy1);
|
||||
tabWidget->setMinimumSize(QSize(488, 60));
|
||||
tabWidget->setAutoFillBackground(false);
|
||||
tabWidget->setStyleSheet(QString::fromUtf8("QTabWidget {\n"
|
||||
" border: none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QTabBar::tab{\n"
|
||||
" background: #dcd174;\n"
|
||||
" width: 222px;\n"
|
||||
" height: 44px;\n"
|
||||
" opacity: 0px;\n"
|
||||
" border: 1px solid #dcd174; \n"
|
||||
" padding: 18px 0px;\n"
|
||||
" color: white; \n"
|
||||
" font-family: Inter;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 36px;\n"
|
||||
" font-weight: 500;\n"
|
||||
" line-height: 43.57px;\n"
|
||||
" text-align: left;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QTabBar::tab:selected {\n"
|
||||
" background: #dcd174; \n"
|
||||
" font-size: 36px;\n"
|
||||
" font-weight: 900;\n"
|
||||
" line-height: 43.57px;\n"
|
||||
" text-align: left;\n"
|
||||
"}\n"
|
||||
""));
|
||||
sensorsTab = new QWidget();
|
||||
sensorsTab->setObjectName("sensorsTab");
|
||||
QSizePolicy sizePolicy2(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding);
|
||||
sizePolicy2.setHorizontalStretch(0);
|
||||
sizePolicy2.setVerticalStretch(0);
|
||||
sizePolicy2.setHeightForWidth(sensorsTab->sizePolicy().hasHeightForWidth());
|
||||
sensorsTab->setSizePolicy(sizePolicy2);
|
||||
sensorsTab->setMinimumSize(QSize(0, 0));
|
||||
sensorsTab->setStyleSheet(QString::fromUtf8("#sensorsTab {\n"
|
||||
" image: url(:/visual/res/svg/fema-wing.svg);\n"
|
||||
" background-color: white; \n"
|
||||
" image-position: bottom right;\n"
|
||||
" border: none;\n"
|
||||
"}"));
|
||||
SensorsTabLayout = new QVBoxLayout(sensorsTab);
|
||||
SensorsTabLayout->setSpacing(10);
|
||||
SensorsTabLayout->setObjectName("SensorsTabLayout");
|
||||
SensorsTabLayout->setSizeConstraint(QLayout::SizeConstraint::SetDefaultConstraint);
|
||||
SensorsTabLayout->setContentsMargins(0, 25, 0, 0);
|
||||
nameLayout = new QHBoxLayout();
|
||||
nameLayout->setSpacing(15);
|
||||
nameLayout->setObjectName("nameLayout");
|
||||
nameLayout->setSizeConstraint(QLayout::SizeConstraint::SetFixedSize);
|
||||
nameLayout->setContentsMargins(25, -1, -1, -1);
|
||||
group = new QLabel(sensorsTab);
|
||||
group->setObjectName("group");
|
||||
QSizePolicy sizePolicy3(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed);
|
||||
sizePolicy3.setHorizontalStretch(0);
|
||||
sizePolicy3.setVerticalStretch(0);
|
||||
sizePolicy3.setHeightForWidth(group->sizePolicy().hasHeightForWidth());
|
||||
group->setSizePolicy(sizePolicy3);
|
||||
group->setMinimumSize(QSize(488, 36));
|
||||
group->setStyleSheet(QString::fromUtf8("width: 488px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
nameLayout->addWidget(group);
|
||||
|
||||
showHidden = new QLabel(sensorsTab);
|
||||
showHidden->setObjectName("showHidden");
|
||||
sizePolicy3.setHeightForWidth(showHidden->sizePolicy().hasHeightForWidth());
|
||||
showHidden->setSizePolicy(sizePolicy3);
|
||||
showHidden->setMinimumSize(QSize(275, 36));
|
||||
showHidden->setStyleSheet(QString::fromUtf8("width: 275px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
nameLayout->addWidget(showHidden);
|
||||
|
||||
horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
nameLayout->addItem(horizontalSpacer_4);
|
||||
|
||||
|
||||
SensorsTabLayout->addLayout(nameLayout);
|
||||
|
||||
selectLayout = new QHBoxLayout();
|
||||
selectLayout->setSpacing(15);
|
||||
selectLayout->setObjectName("selectLayout");
|
||||
selectLayout->setSizeConstraint(QLayout::SizeConstraint::SetFixedSize);
|
||||
selectLayout->setContentsMargins(25, -1, -1, 10);
|
||||
groupSelect = new QComboBox(sensorsTab);
|
||||
groupSelect->setObjectName("groupSelect");
|
||||
sizePolicy3.setHeightForWidth(groupSelect->sizePolicy().hasHeightForWidth());
|
||||
groupSelect->setSizePolicy(sizePolicy3);
|
||||
groupSelect->setMinimumSize(QSize(488, 60));
|
||||
groupSelect->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 24px;\n"
|
||||
" font-weight: 400;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border: 2px solid #DCD174; \n"
|
||||
" background: white; \n"
|
||||
" selection-color: red;\n"
|
||||
" selection-background-color: blue;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item {\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 50px;\n"
|
||||
" font-weight: 400;\n"
|
||||
" text-align: left;\n"
|
||||
" padding: 5px;\n"
|
||||
" color: #13385F;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item:hover {\n"
|
||||
" background-color: #13385F; \n"
|
||||
" selection-color: white;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
selectLayout->addWidget(groupSelect);
|
||||
|
||||
showHiddenSelect = new QComboBox(sensorsTab);
|
||||
showHiddenSelect->setObjectName("showHiddenSelect");
|
||||
sizePolicy3.setHeightForWidth(showHiddenSelect->sizePolicy().hasHeightForWidth());
|
||||
showHiddenSelect->setSizePolicy(sizePolicy3);
|
||||
showHiddenSelect->setMinimumSize(QSize(275, 60));
|
||||
showHiddenSelect->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 24px;\n"
|
||||
" font-weight: 400;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border: 2px solid #DCD174; \n"
|
||||
" background: white; \n"
|
||||
" selection-color: red;\n"
|
||||
" selection-background-color: blue;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item {\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 50px;\n"
|
||||
" font-weight: 400;\n"
|
||||
" text-align: left;\n"
|
||||
" padding: 5px;\n"
|
||||
" color: #13385F;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item:hover {\n"
|
||||
" background-color: #13385F; \n"
|
||||
" selection-color: white;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
selectLayout->addWidget(showHiddenSelect);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
selectLayout->addItem(horizontalSpacer_2);
|
||||
|
||||
|
||||
SensorsTabLayout->addLayout(selectLayout);
|
||||
|
||||
searchLayout = new QHBoxLayout();
|
||||
searchLayout->setSpacing(0);
|
||||
searchLayout->setObjectName("searchLayout");
|
||||
searchLayout->setSizeConstraint(QLayout::SizeConstraint::SetFixedSize);
|
||||
searchLayout->setContentsMargins(25, -1, -1, 10);
|
||||
search = new QLineEdit(sensorsTab);
|
||||
search->setObjectName("search");
|
||||
sizePolicy3.setHeightForWidth(search->sizePolicy().hasHeightForWidth());
|
||||
search->setSizePolicy(sizePolicy3);
|
||||
search->setMinimumSize(QSize(778, 60));
|
||||
search->setStyleSheet(QString::fromUtf8("QLineEdit {\n"
|
||||
"width: 778px;\n"
|
||||
"height: 60px;\n"
|
||||
"border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #a6a6a6;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
searchLayout->addWidget(search);
|
||||
|
||||
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
searchLayout->addItem(horizontalSpacer_3);
|
||||
|
||||
|
||||
SensorsTabLayout->addLayout(searchLayout);
|
||||
|
||||
sensorsLayout = new QVBoxLayout();
|
||||
sensorsLayout->setSpacing(0);
|
||||
sensorsLayout->setObjectName("sensorsLayout");
|
||||
sensorsLayout->setContentsMargins(25, -1, -1, -1);
|
||||
|
||||
SensorsTabLayout->addLayout(sensorsLayout);
|
||||
|
||||
tabWidget->addTab(sensorsTab, QString());
|
||||
incidentsTab = new QWidget();
|
||||
incidentsTab->setObjectName("incidentsTab");
|
||||
sizePolicy2.setHeightForWidth(incidentsTab->sizePolicy().hasHeightForWidth());
|
||||
incidentsTab->setSizePolicy(sizePolicy2);
|
||||
incidentsTab->setStyleSheet(QString::fromUtf8("#incidentsTab {\n"
|
||||
" image: url(:/visual/res/svg/fema-wing.svg);\n"
|
||||
" background-color: #ffffff; \n"
|
||||
" image-position: bottom right;\n"
|
||||
" border: none;\n"
|
||||
"}"));
|
||||
verticalLayout = new QVBoxLayout(incidentsTab);
|
||||
verticalLayout->setSpacing(0);
|
||||
verticalLayout->setObjectName("verticalLayout");
|
||||
verticalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
IncidentsSearchLayout = new QVBoxLayout();
|
||||
IncidentsSearchLayout->setObjectName("IncidentsSearchLayout");
|
||||
IncidentsSearchTextLayout = new QHBoxLayout();
|
||||
IncidentsSearchTextLayout->setSpacing(0);
|
||||
IncidentsSearchTextLayout->setObjectName("IncidentsSearchTextLayout");
|
||||
IncidentsSearchTextLayout->setContentsMargins(25, 25, -1, 10);
|
||||
TimeIntrval = new QLabel(incidentsTab);
|
||||
TimeIntrval->setObjectName("TimeIntrval");
|
||||
TimeIntrval->setStyleSheet(QString::fromUtf8("width: 488px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
IncidentsSearchTextLayout->addWidget(TimeIntrval);
|
||||
|
||||
|
||||
IncidentsSearchLayout->addLayout(IncidentsSearchTextLayout);
|
||||
|
||||
horizontalLayout_6 = new QHBoxLayout();
|
||||
horizontalLayout_6->setSpacing(10);
|
||||
horizontalLayout_6->setObjectName("horizontalLayout_6");
|
||||
horizontalLayout_6->setContentsMargins(25, -1, -1, -1);
|
||||
comboBox = new QComboBox(incidentsTab);
|
||||
comboBox->setObjectName("comboBox");
|
||||
comboBox->setMinimumSize(QSize(488, 60));
|
||||
comboBox->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_6->addWidget(comboBox);
|
||||
|
||||
lineEdit = new QLineEdit(incidentsTab);
|
||||
lineEdit->setObjectName("lineEdit");
|
||||
sizePolicy3.setHeightForWidth(lineEdit->sizePolicy().hasHeightForWidth());
|
||||
lineEdit->setSizePolicy(sizePolicy3);
|
||||
lineEdit->setMinimumSize(QSize(488, 60));
|
||||
lineEdit->setMaximumSize(QSize(488, 60));
|
||||
lineEdit->setStyleSheet(QString::fromUtf8("width: 778px;\n"
|
||||
"height: 60px;\n"
|
||||
"border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #a6a6a6;\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_6->addWidget(lineEdit);
|
||||
|
||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_6->addItem(horizontalSpacer);
|
||||
|
||||
|
||||
IncidentsSearchLayout->addLayout(horizontalLayout_6);
|
||||
|
||||
|
||||
verticalLayout->addLayout(IncidentsSearchLayout);
|
||||
|
||||
IncidentsDataLayout = new QHBoxLayout();
|
||||
IncidentsDataLayout->setObjectName("IncidentsDataLayout");
|
||||
verticalLayout_2 = new QVBoxLayout();
|
||||
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||
verticalLayout_2->setContentsMargins(25, 15, -1, 82);
|
||||
treeBorder = new QWidget(incidentsTab);
|
||||
treeBorder->setObjectName("treeBorder");
|
||||
treeBorder->setMinimumSize(QSize(272, 0));
|
||||
treeBorder->setMaximumSize(QSize(272, 16777215));
|
||||
treeBorder->setStyleSheet(QString::fromUtf8("QWidget#treeBorder {\n"
|
||||
" border: 2px solid #E5E7EB;\n"
|
||||
" border-radius: 5px;\n"
|
||||
" background-color: transparent;\n"
|
||||
"}\n"
|
||||
""));
|
||||
verticalLayout_6 = new QVBoxLayout(treeBorder);
|
||||
verticalLayout_6->setSpacing(0);
|
||||
verticalLayout_6->setObjectName("verticalLayout_6");
|
||||
verticalLayout_6->setContentsMargins(0, 0, 0, 0);
|
||||
treeWidget = new QTreeWidget(treeBorder);
|
||||
QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem();
|
||||
__qtreewidgetitem->setText(0, QString::fromUtf8("1"));
|
||||
treeWidget->setHeaderItem(__qtreewidgetitem);
|
||||
treeWidget->setObjectName("treeWidget");
|
||||
sizePolicy1.setHeightForWidth(treeWidget->sizePolicy().hasHeightForWidth());
|
||||
treeWidget->setSizePolicy(sizePolicy1);
|
||||
treeWidget->setStyleSheet(QString::fromUtf8(" QTreeView::branch:has-siblings:!adjoins-item {\n"
|
||||
" border-image: url(:/png/res/png/vline.png) 0;\n"
|
||||
" }\n"
|
||||
" QTreeView::branch:has-siblings:adjoins-item {\n"
|
||||
" border-image: url(:/png/res/png/branch-more.png) 0;\n"
|
||||
" }\n"
|
||||
" QTreeView::branch:!has-children:!has-siblings:adjoins-item {\n"
|
||||
" border-image: url(:/png/res/png/branch-end.png) 0;\n"
|
||||
" }\n"
|
||||
" QTreeView::branch:has-children:!has-siblings:closed,\n"
|
||||
" QTreeView::branch:closed:has-children:has-siblings {\n"
|
||||
" border-image: url(:/png/res/png/branch-more.png);\n"
|
||||
" }\n"
|
||||
" QTreeView::branch:open:has-children:!has-siblings,\n"
|
||||
" QTreeView::branch:open:has-children:has-siblings {\n"
|
||||
" border-image: url(:/png/res/png/branch-more.png);\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
"QHeaderView {\n"
|
||||
" min-height: 0px;\n"
|
||||
" max-height: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
" QTreeWidget {\n"
|
||||
" background: transparent;\n"
|
||||
" border: none;\n"
|
||||
" font-family: 'Inter';\n"
|
||||
" font-size: 16px;\n"
|
||||
" font-weight: 500;\n"
|
||||
" line-he"
|
||||
"ight: 19.36px;\n"
|
||||
" text-align: left;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" QTreeWidget::indicator:unchecked {\n"
|
||||
" border: 2px solid #e6e6e6; \n"
|
||||
" background-color: transparent;\n"
|
||||
" width: 18px;\n"
|
||||
" height: 18px;\n"
|
||||
" border-radius: 4px;\n"
|
||||
" }\n"
|
||||
" QTreeWidget::indicator:checked {\n"
|
||||
" border: 2px solid #c7bf78; \n"
|
||||
" background-color: rgba(220, 209, 116, 0.85); \n"
|
||||
" width: 18px;\n"
|
||||
" height: 18px;\n"
|
||||
" border-radius: 4px;\n"
|
||||
" image: url(:/png/res/png/checked.png);\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" QTreeWidget::item {\n"
|
||||
" color: #808080;\n"
|
||||
" }\n"
|
||||
" QTreeWidget::item:open {\n"
|
||||
" color: #404040;\n"
|
||||
" }\n"
|
||||
" QTreeWidget::item:!has-children {\n"
|
||||
" color: #808080; \n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" QTreeWidget::item:selected {\n"
|
||||
" background: transparent;\n"
|
||||
" }\n"
|
||||
""));
|
||||
|
||||
verticalLayout_6->addWidget(treeWidget);
|
||||
|
||||
|
||||
verticalLayout_2->addWidget(treeBorder);
|
||||
|
||||
|
||||
IncidentsDataLayout->addLayout(verticalLayout_2);
|
||||
|
||||
verticalLayout_7 = new QVBoxLayout();
|
||||
verticalLayout_7->setObjectName("verticalLayout_7");
|
||||
verticalLayout_7->setContentsMargins(15, 15, 25, -1);
|
||||
paginationBorder = new QWidget(incidentsTab);
|
||||
paginationBorder->setObjectName("paginationBorder");
|
||||
sizePolicy2.setHeightForWidth(paginationBorder->sizePolicy().hasHeightForWidth());
|
||||
paginationBorder->setSizePolicy(sizePolicy2);
|
||||
paginationBorder->setStyleSheet(QString::fromUtf8("QWidget#paginationBorder {\n"
|
||||
" border: 2px solid #E5E7EB;\n"
|
||||
" border-radius: 5px;\n"
|
||||
" background-color: transparent;\n"
|
||||
"}\n"
|
||||
""));
|
||||
paginationLayout = new QVBoxLayout(paginationBorder);
|
||||
paginationLayout->setSpacing(0);
|
||||
paginationLayout->setObjectName("paginationLayout");
|
||||
paginationLayout->setContentsMargins(0, 0, 0, 0);
|
||||
widget = new QWidget(paginationBorder);
|
||||
widget->setObjectName("widget");
|
||||
widget->setMinimumSize(QSize(0, 60));
|
||||
widget->setMaximumSize(QSize(16777215, 60));
|
||||
widget->setStyleSheet(QString::fromUtf8("QWidget {\n"
|
||||
" border: 2px solid #E5E7EB;\n"
|
||||
" border-radius: 5px;\n"
|
||||
" background-color: transparent;\n"
|
||||
"}\n"
|
||||
""));
|
||||
|
||||
paginationLayout->addWidget(widget);
|
||||
|
||||
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
|
||||
paginationLayout->addItem(verticalSpacer);
|
||||
|
||||
|
||||
verticalLayout_7->addWidget(paginationBorder);
|
||||
|
||||
paginationBarLayout = new QHBoxLayout();
|
||||
paginationBarLayout->setSpacing(5);
|
||||
paginationBarLayout->setObjectName("paginationBarLayout");
|
||||
paginationBarLayout->setContentsMargins(0, 20, 0, 22);
|
||||
|
||||
verticalLayout_7->addLayout(paginationBarLayout);
|
||||
|
||||
|
||||
IncidentsDataLayout->addLayout(verticalLayout_7);
|
||||
|
||||
|
||||
verticalLayout->addLayout(IncidentsDataLayout);
|
||||
|
||||
tabWidget->addTab(incidentsTab, QString());
|
||||
statisticsTab = new QWidget();
|
||||
statisticsTab->setObjectName("statisticsTab");
|
||||
sizePolicy2.setHeightForWidth(statisticsTab->sizePolicy().hasHeightForWidth());
|
||||
statisticsTab->setSizePolicy(sizePolicy2);
|
||||
statisticsTab->setStyleSheet(QString::fromUtf8("#statisticsTab {\n"
|
||||
" image: url(:/visual/res/svg/fema-wing.svg);\n"
|
||||
" background-color: #ffffff; \n"
|
||||
" image-position: bottom right;\n"
|
||||
"}"));
|
||||
gridLayout_5 = new QGridLayout(statisticsTab);
|
||||
gridLayout_5->setObjectName("gridLayout_5");
|
||||
tabWidget->addTab(statisticsTab, QString());
|
||||
journalTab = new QWidget();
|
||||
journalTab->setObjectName("journalTab");
|
||||
sizePolicy2.setHeightForWidth(journalTab->sizePolicy().hasHeightForWidth());
|
||||
journalTab->setSizePolicy(sizePolicy2);
|
||||
journalTab->setStyleSheet(QString::fromUtf8("#journalTab {\n"
|
||||
" image: url(:/visual/res/svg/fema-wing.svg);\n"
|
||||
" background-color: #ffffff; \n"
|
||||
" image-position: bottom right;\n"
|
||||
"}"));
|
||||
verticalLayout_3 = new QVBoxLayout(journalTab);
|
||||
verticalLayout_3->setSpacing(0);
|
||||
verticalLayout_3->setObjectName("verticalLayout_3");
|
||||
verticalLayout_3->setContentsMargins(0, 0, 0, 0);
|
||||
verticalLayout_4 = new QVBoxLayout();
|
||||
verticalLayout_4->setSpacing(0);
|
||||
verticalLayout_4->setObjectName("verticalLayout_4");
|
||||
horizontalLayout_8 = new QHBoxLayout();
|
||||
horizontalLayout_8->setSpacing(10);
|
||||
horizontalLayout_8->setObjectName("horizontalLayout_8");
|
||||
horizontalLayout_8->setContentsMargins(25, 25, -1, 10);
|
||||
label_4 = new QLabel(journalTab);
|
||||
label_4->setObjectName("label_4");
|
||||
sizePolicy3.setHeightForWidth(label_4->sizePolicy().hasHeightForWidth());
|
||||
label_4->setSizePolicy(sizePolicy3);
|
||||
label_4->setMinimumSize(QSize(488, 60));
|
||||
label_4->setMaximumSize(QSize(488, 60));
|
||||
label_4->setStyleSheet(QString::fromUtf8("width: 488px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_8->addWidget(label_4);
|
||||
|
||||
label_3 = new QLabel(journalTab);
|
||||
label_3->setObjectName("label_3");
|
||||
sizePolicy3.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
|
||||
label_3->setSizePolicy(sizePolicy3);
|
||||
label_3->setMinimumSize(QSize(270, 60));
|
||||
label_3->setMaximumSize(QSize(270, 60));
|
||||
label_3->setStyleSheet(QString::fromUtf8("width: 488px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_8->addWidget(label_3);
|
||||
|
||||
label_2 = new QLabel(journalTab);
|
||||
label_2->setObjectName("label_2");
|
||||
sizePolicy3.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
|
||||
label_2->setSizePolicy(sizePolicy3);
|
||||
label_2->setMinimumSize(QSize(270, 60));
|
||||
label_2->setMaximumSize(QSize(270, 60));
|
||||
label_2->setStyleSheet(QString::fromUtf8("width: 488px;\n"
|
||||
"height: 36px;\n"
|
||||
"background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 30px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 36.31px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_8->addWidget(label_2);
|
||||
|
||||
horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_8->addItem(horizontalSpacer_6);
|
||||
|
||||
|
||||
verticalLayout_4->addLayout(horizontalLayout_8);
|
||||
|
||||
horizontalLayout_7 = new QHBoxLayout();
|
||||
horizontalLayout_7->setSpacing(10);
|
||||
horizontalLayout_7->setObjectName("horizontalLayout_7");
|
||||
horizontalLayout_7->setContentsMargins(25, -1, -1, -1);
|
||||
comboBox_4 = new QComboBox(journalTab);
|
||||
comboBox_4->setObjectName("comboBox_4");
|
||||
sizePolicy3.setHeightForWidth(comboBox_4->sizePolicy().hasHeightForWidth());
|
||||
comboBox_4->setSizePolicy(sizePolicy3);
|
||||
comboBox_4->setMinimumSize(QSize(488, 60));
|
||||
comboBox_4->setMaximumSize(QSize(480, 60));
|
||||
comboBox_4->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_7->addWidget(comboBox_4);
|
||||
|
||||
comboBox_3 = new QComboBox(journalTab);
|
||||
comboBox_3->setObjectName("comboBox_3");
|
||||
sizePolicy3.setHeightForWidth(comboBox_3->sizePolicy().hasHeightForWidth());
|
||||
comboBox_3->setSizePolicy(sizePolicy3);
|
||||
comboBox_3->setMinimumSize(QSize(270, 60));
|
||||
comboBox_3->setMaximumSize(QSize(270, 60));
|
||||
comboBox_3->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_7->addWidget(comboBox_3);
|
||||
|
||||
comboBox_2 = new QComboBox(journalTab);
|
||||
comboBox_2->setObjectName("comboBox_2");
|
||||
sizePolicy3.setHeightForWidth(comboBox_2->sizePolicy().hasHeightForWidth());
|
||||
comboBox_2->setSizePolicy(sizePolicy3);
|
||||
comboBox_2->setMinimumSize(QSize(270, 60));
|
||||
comboBox_2->setMaximumSize(QSize(270, 60));
|
||||
comboBox_2->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_7->addWidget(comboBox_2);
|
||||
|
||||
lineEdit_2 = new QLineEdit(journalTab);
|
||||
lineEdit_2->setObjectName("lineEdit_2");
|
||||
sizePolicy3.setHeightForWidth(lineEdit_2->sizePolicy().hasHeightForWidth());
|
||||
lineEdit_2->setSizePolicy(sizePolicy3);
|
||||
lineEdit_2->setMinimumSize(QSize(480, 60));
|
||||
lineEdit_2->setMaximumSize(QSize(480, 60));
|
||||
lineEdit_2->setStyleSheet(QString::fromUtf8("width: 778px;\n"
|
||||
"height: 60px;\n"
|
||||
"border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #a6a6a6;\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_7->addWidget(lineEdit_2);
|
||||
|
||||
horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_7->addItem(horizontalSpacer_7);
|
||||
|
||||
|
||||
verticalLayout_4->addLayout(horizontalLayout_7);
|
||||
|
||||
|
||||
verticalLayout_3->addLayout(verticalLayout_4);
|
||||
|
||||
horizontalLayout_3 = new QHBoxLayout();
|
||||
horizontalLayout_3->setSpacing(0);
|
||||
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||
verticalLayout_5 = new QVBoxLayout();
|
||||
verticalLayout_5->setSpacing(0);
|
||||
verticalLayout_5->setObjectName("verticalLayout_5");
|
||||
treeWidget_2 = new QTreeWidget(journalTab);
|
||||
QTreeWidgetItem *__qtreewidgetitem1 = new QTreeWidgetItem();
|
||||
__qtreewidgetitem1->setText(0, QString::fromUtf8("1"));
|
||||
treeWidget_2->setHeaderItem(__qtreewidgetitem1);
|
||||
treeWidget_2->setObjectName("treeWidget_2");
|
||||
QSizePolicy sizePolicy4(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Expanding);
|
||||
sizePolicy4.setHorizontalStretch(0);
|
||||
sizePolicy4.setVerticalStretch(0);
|
||||
sizePolicy4.setHeightForWidth(treeWidget_2->sizePolicy().hasHeightForWidth());
|
||||
treeWidget_2->setSizePolicy(sizePolicy4);
|
||||
treeWidget_2->setMinimumSize(QSize(272, 0));
|
||||
treeWidget_2->setMaximumSize(QSize(272, 16777215));
|
||||
treeWidget_2->setStyleSheet(QString::fromUtf8("background-color: transparent;\n"
|
||||
"\n"
|
||||
"QTreeView::branch {\n"
|
||||
" background: yellow;\n"
|
||||
"}"));
|
||||
|
||||
verticalLayout_5->addWidget(treeWidget_2);
|
||||
|
||||
|
||||
horizontalLayout_3->addLayout(verticalLayout_5);
|
||||
|
||||
gridLayout_2 = new QGridLayout();
|
||||
gridLayout_2->setSpacing(0);
|
||||
gridLayout_2->setObjectName("gridLayout_2");
|
||||
horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
gridLayout_2->addItem(horizontalSpacer_8, 0, 1, 1, 1);
|
||||
|
||||
verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
|
||||
gridLayout_2->addItem(verticalSpacer_2, 0, 0, 1, 1);
|
||||
|
||||
|
||||
horizontalLayout_3->addLayout(gridLayout_2);
|
||||
|
||||
|
||||
verticalLayout_3->addLayout(horizontalLayout_3);
|
||||
|
||||
tabWidget->addTab(journalTab, QString());
|
||||
settingsTab = new QWidget();
|
||||
settingsTab->setObjectName("settingsTab");
|
||||
sizePolicy2.setHeightForWidth(settingsTab->sizePolicy().hasHeightForWidth());
|
||||
settingsTab->setSizePolicy(sizePolicy2);
|
||||
settingsTab->setStyleSheet(QString::fromUtf8("#settingsTab {\n"
|
||||
" image: url(:/visual/res/svg/fema-wing.svg);\n"
|
||||
" background-color: #ffffff; \n"
|
||||
" image-position: bottom right;\n"
|
||||
"}"));
|
||||
gridLayout_6 = new QGridLayout(settingsTab);
|
||||
gridLayout_6->setObjectName("gridLayout_6");
|
||||
tabWidget->addTab(settingsTab, QString());
|
||||
|
||||
gridLayout_4->addWidget(tabWidget, 0, 0, 1, 1);
|
||||
|
||||
MainWindow->setCentralWidget(centralwidget);
|
||||
statusbar = new QStatusBar(MainWindow);
|
||||
statusbar->setObjectName("statusbar");
|
||||
MainWindow->setStatusBar(statusbar);
|
||||
|
||||
retranslateUi(MainWindow);
|
||||
|
||||
tabWidget->setCurrentIndex(1);
|
||||
|
||||
|
||||
QMetaObject::connectSlotsByName(MainWindow);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QMainWindow *MainWindow)
|
||||
{
|
||||
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "FemaLocal", nullptr));
|
||||
group->setText(QCoreApplication::translate("MainWindow", "\320\223\321\200\321\203\320\277\320\277\320\260:", nullptr));
|
||||
showHidden->setText(QCoreApplication::translate("MainWindow", "\320\237\320\276\320\272\320\260\320\267\320\260\321\202\321\214 \321\201\320\272\321\200\321\213\321\202\321\213\320\265", nullptr));
|
||||
search->setText(QString());
|
||||
search->setPlaceholderText(QCoreApplication::translate("MainWindow", "\320\237\320\276\320\270\321\201\320\272...", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(sensorsTab), QCoreApplication::translate("MainWindow", "\320\224\320\260\321\202\321\207\320\270\320\272\320\270", nullptr));
|
||||
TimeIntrval->setText(QCoreApplication::translate("MainWindow", "\320\222\321\200\320\265\320\274\320\265\320\275\320\275\320\276\320\271 \320\277\321\200\320\276\320\274\320\265\320\266\321\203\321\202\320\276\320\272:", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(incidentsTab), QCoreApplication::translate("MainWindow", "\320\230\320\275\321\206\320\270\320\264\320\265\320\275\321\202\321\213", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(statisticsTab), QCoreApplication::translate("MainWindow", "\320\241\321\202\320\260\321\202\320\270\321\201\321\202\320\270\320\272\320\260", nullptr));
|
||||
label_4->setText(QCoreApplication::translate("MainWindow", "\320\222\321\200\320\265\320\274\320\265\320\275\320\275\320\276\320\271 \320\277\321\200\320\276\320\274\320\265\320\266\321\203\321\202\320\276\320\272:", nullptr));
|
||||
label_3->setText(QCoreApplication::translate("MainWindow", "\320\241\321\202\320\260\321\202\321\203\321\201:", nullptr));
|
||||
label_2->setText(QCoreApplication::translate("MainWindow", "\320\241\320\276\321\200\321\202\320\270\321\200\320\276\320\262\320\272\320\260", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(journalTab), QCoreApplication::translate("MainWindow", "\320\226\321\203\321\200\320\275\320\260\320\273", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(settingsTab), QCoreApplication::translate("MainWindow", "\320\235\320\260\321\201\321\202\321\200\320\276\320\271\320\272\320\270", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow: public Ui_MainWindow {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // UI_MAINWINDOW_H
|
@ -0,0 +1,792 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'sensordialog.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 6.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef UI_SENSORDIALOG_H
|
||||
#define UI_SENSORDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QSpacerItem>
|
||||
#include <QtWidgets/QTextEdit>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_SensorDialog
|
||||
{
|
||||
public:
|
||||
QVBoxLayout *verticalLayout;
|
||||
QHBoxLayout *horizontalLayout_18;
|
||||
QLabel *label_14;
|
||||
QLabel *nameHeader;
|
||||
QSpacerItem *horizontalSpacer_2;
|
||||
QHBoxLayout *horizontalLayout_17;
|
||||
QLabel *label;
|
||||
QLineEdit *name;
|
||||
QHBoxLayout *horizontalLayout_16;
|
||||
QLabel *label_2;
|
||||
QLineEdit *unitName;
|
||||
QHBoxLayout *horizontalLayout_15;
|
||||
QLabel *label_3;
|
||||
QComboBox *isBooled;
|
||||
QHBoxLayout *horizontalLayout_14;
|
||||
QLabel *label_4;
|
||||
QComboBox *isAlarm;
|
||||
QHBoxLayout *horizontalLayout_13;
|
||||
QLabel *label_5;
|
||||
QLineEdit *alarmLow;
|
||||
QHBoxLayout *horizontalLayout_12;
|
||||
QLabel *label_6;
|
||||
QLineEdit *alarmUp;
|
||||
QHBoxLayout *horizontalLayout_11;
|
||||
QLabel *label_7;
|
||||
QLineEdit *alarmCooldown;
|
||||
QHBoxLayout *horizontalLayout_10;
|
||||
QLabel *label_8;
|
||||
QHBoxLayout *horizontalLayout_9;
|
||||
QTextEdit *logError;
|
||||
QHBoxLayout *horizontalLayout_8;
|
||||
QLabel *label_9;
|
||||
QHBoxLayout *horizontalLayout_7;
|
||||
QTextEdit *logManual;
|
||||
QHBoxLayout *horizontalLayout_6;
|
||||
QLabel *label_10;
|
||||
QLineEdit *alarmSleepage;
|
||||
QHBoxLayout *horizontalLayout_5;
|
||||
QLabel *label_11;
|
||||
QHBoxLayout *horizontalLayout_4;
|
||||
QTextEdit *logHugeError;
|
||||
QHBoxLayout *horizontalLayout_3;
|
||||
QLabel *label_12;
|
||||
QComboBox *isVisible;
|
||||
QHBoxLayout *horizontalLayout_2;
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QPushButton *cancelButton;
|
||||
QPushButton *saveButton;
|
||||
|
||||
void setupUi(QDialog *SensorDialog)
|
||||
{
|
||||
if (SensorDialog->objectName().isEmpty())
|
||||
SensorDialog->setObjectName("SensorDialog");
|
||||
SensorDialog->resize(759, 947);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(SensorDialog->sizePolicy().hasHeightForWidth());
|
||||
SensorDialog->setSizePolicy(sizePolicy);
|
||||
SensorDialog->setStyleSheet(QString::fromUtf8("background-color: white;"));
|
||||
verticalLayout = new QVBoxLayout(SensorDialog);
|
||||
verticalLayout->setSpacing(0);
|
||||
verticalLayout->setObjectName("verticalLayout");
|
||||
verticalLayout->setContentsMargins(25, 0, 25, 0);
|
||||
horizontalLayout_18 = new QHBoxLayout();
|
||||
horizontalLayout_18->setSpacing(20);
|
||||
horizontalLayout_18->setObjectName("horizontalLayout_18");
|
||||
horizontalLayout_18->setContentsMargins(-1, 25, -1, 25);
|
||||
label_14 = new QLabel(SensorDialog);
|
||||
label_14->setObjectName("label_14");
|
||||
sizePolicy.setHeightForWidth(label_14->sizePolicy().hasHeightForWidth());
|
||||
label_14->setSizePolicy(sizePolicy);
|
||||
label_14->setMinimumSize(QSize(32, 32));
|
||||
label_14->setMaximumSize(QSize(32, 32));
|
||||
label_14->setStyleSheet(QString::fromUtf8(""));
|
||||
label_14->setPixmap(QPixmap(QString::fromUtf8(":/visual/res/svg/settings.svg")));
|
||||
|
||||
horizontalLayout_18->addWidget(label_14);
|
||||
|
||||
nameHeader = new QLabel(SensorDialog);
|
||||
nameHeader->setObjectName("nameHeader");
|
||||
nameHeader->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_18->addWidget(nameHeader);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_18->addItem(horizontalSpacer_2);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_18);
|
||||
|
||||
horizontalLayout_17 = new QHBoxLayout();
|
||||
horizontalLayout_17->setSpacing(15);
|
||||
horizontalLayout_17->setObjectName("horizontalLayout_17");
|
||||
horizontalLayout_17->setContentsMargins(-1, -1, -1, 10);
|
||||
label = new QLabel(SensorDialog);
|
||||
label->setObjectName("label");
|
||||
label->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_17->addWidget(label);
|
||||
|
||||
name = new QLineEdit(SensorDialog);
|
||||
name->setObjectName("name");
|
||||
name->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_17->addWidget(name);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_17);
|
||||
|
||||
horizontalLayout_16 = new QHBoxLayout();
|
||||
horizontalLayout_16->setSpacing(15);
|
||||
horizontalLayout_16->setObjectName("horizontalLayout_16");
|
||||
horizontalLayout_16->setContentsMargins(-1, -1, -1, 10);
|
||||
label_2 = new QLabel(SensorDialog);
|
||||
label_2->setObjectName("label_2");
|
||||
label_2->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_16->addWidget(label_2);
|
||||
|
||||
unitName = new QLineEdit(SensorDialog);
|
||||
unitName->setObjectName("unitName");
|
||||
unitName->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_16->addWidget(unitName);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_16);
|
||||
|
||||
horizontalLayout_15 = new QHBoxLayout();
|
||||
horizontalLayout_15->setSpacing(15);
|
||||
horizontalLayout_15->setObjectName("horizontalLayout_15");
|
||||
horizontalLayout_15->setContentsMargins(-1, -1, -1, 10);
|
||||
label_3 = new QLabel(SensorDialog);
|
||||
label_3->setObjectName("label_3");
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Preferred);
|
||||
sizePolicy1.setHorizontalStretch(0);
|
||||
sizePolicy1.setVerticalStretch(0);
|
||||
sizePolicy1.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
|
||||
label_3->setSizePolicy(sizePolicy1);
|
||||
label_3->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_15->addWidget(label_3);
|
||||
|
||||
isBooled = new QComboBox(SensorDialog);
|
||||
isBooled->setObjectName("isBooled");
|
||||
isBooled->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 20px;\n"
|
||||
" font-weight: 400;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border: 2px solid #DCD174; \n"
|
||||
" background: white; \n"
|
||||
" selection-color: red;\n"
|
||||
" selection-background-color: blue;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item {\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 50px;\n"
|
||||
" font-weight: 400;\n"
|
||||
" text-align: left;\n"
|
||||
" padding: 5px;\n"
|
||||
" color: #13385F;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item:hover {\n"
|
||||
" background-color: #13385F; \n"
|
||||
" selection-color: white;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_15->addWidget(isBooled);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_15);
|
||||
|
||||
horizontalLayout_14 = new QHBoxLayout();
|
||||
horizontalLayout_14->setSpacing(15);
|
||||
horizontalLayout_14->setObjectName("horizontalLayout_14");
|
||||
horizontalLayout_14->setContentsMargins(-1, -1, -1, 10);
|
||||
label_4 = new QLabel(SensorDialog);
|
||||
label_4->setObjectName("label_4");
|
||||
sizePolicy1.setHeightForWidth(label_4->sizePolicy().hasHeightForWidth());
|
||||
label_4->setSizePolicy(sizePolicy1);
|
||||
label_4->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_14->addWidget(label_4);
|
||||
|
||||
isAlarm = new QComboBox(SensorDialog);
|
||||
isAlarm->setObjectName("isAlarm");
|
||||
isAlarm->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 20px;\n"
|
||||
" font-weight: 400;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border: 2px solid #DCD174; \n"
|
||||
" background: white; \n"
|
||||
" selection-color: red;\n"
|
||||
" selection-background-color: blue;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item {\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 50px;\n"
|
||||
" font-weight: 400;\n"
|
||||
" text-align: left;\n"
|
||||
" padding: 5px;\n"
|
||||
" color: #13385F;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item:hover {\n"
|
||||
" background-color: #13385F; \n"
|
||||
" selection-color: white;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_14->addWidget(isAlarm);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_14);
|
||||
|
||||
horizontalLayout_13 = new QHBoxLayout();
|
||||
horizontalLayout_13->setSpacing(15);
|
||||
horizontalLayout_13->setObjectName("horizontalLayout_13");
|
||||
horizontalLayout_13->setContentsMargins(-1, -1, -1, 10);
|
||||
label_5 = new QLabel(SensorDialog);
|
||||
label_5->setObjectName("label_5");
|
||||
sizePolicy1.setHeightForWidth(label_5->sizePolicy().hasHeightForWidth());
|
||||
label_5->setSizePolicy(sizePolicy1);
|
||||
label_5->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_13->addWidget(label_5);
|
||||
|
||||
alarmLow = new QLineEdit(SensorDialog);
|
||||
alarmLow->setObjectName("alarmLow");
|
||||
alarmLow->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_13->addWidget(alarmLow);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_13);
|
||||
|
||||
horizontalLayout_12 = new QHBoxLayout();
|
||||
horizontalLayout_12->setSpacing(15);
|
||||
horizontalLayout_12->setObjectName("horizontalLayout_12");
|
||||
horizontalLayout_12->setContentsMargins(-1, -1, -1, 10);
|
||||
label_6 = new QLabel(SensorDialog);
|
||||
label_6->setObjectName("label_6");
|
||||
sizePolicy1.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth());
|
||||
label_6->setSizePolicy(sizePolicy1);
|
||||
label_6->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_12->addWidget(label_6);
|
||||
|
||||
alarmUp = new QLineEdit(SensorDialog);
|
||||
alarmUp->setObjectName("alarmUp");
|
||||
alarmUp->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_12->addWidget(alarmUp);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_12);
|
||||
|
||||
horizontalLayout_11 = new QHBoxLayout();
|
||||
horizontalLayout_11->setSpacing(15);
|
||||
horizontalLayout_11->setObjectName("horizontalLayout_11");
|
||||
horizontalLayout_11->setContentsMargins(-1, -1, -1, 10);
|
||||
label_7 = new QLabel(SensorDialog);
|
||||
label_7->setObjectName("label_7");
|
||||
label_7->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_11->addWidget(label_7);
|
||||
|
||||
alarmCooldown = new QLineEdit(SensorDialog);
|
||||
alarmCooldown->setObjectName("alarmCooldown");
|
||||
alarmCooldown->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_11->addWidget(alarmCooldown);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_11);
|
||||
|
||||
horizontalLayout_10 = new QHBoxLayout();
|
||||
horizontalLayout_10->setObjectName("horizontalLayout_10");
|
||||
horizontalLayout_10->setContentsMargins(-1, -1, -1, 5);
|
||||
label_8 = new QLabel(SensorDialog);
|
||||
label_8->setObjectName("label_8");
|
||||
label_8->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_10->addWidget(label_8);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_10);
|
||||
|
||||
horizontalLayout_9 = new QHBoxLayout();
|
||||
horizontalLayout_9->setObjectName("horizontalLayout_9");
|
||||
horizontalLayout_9->setContentsMargins(-1, -1, -1, 10);
|
||||
logError = new QTextEdit(SensorDialog);
|
||||
logError->setObjectName("logError");
|
||||
QSizePolicy sizePolicy2(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed);
|
||||
sizePolicy2.setHorizontalStretch(0);
|
||||
sizePolicy2.setVerticalStretch(0);
|
||||
sizePolicy2.setHeightForWidth(logError->sizePolicy().hasHeightForWidth());
|
||||
logError->setSizePolicy(sizePolicy2);
|
||||
logError->setMinimumSize(QSize(707, 80));
|
||||
logError->setMaximumSize(QSize(16777215, 80));
|
||||
logError->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_9->addWidget(logError);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_9);
|
||||
|
||||
horizontalLayout_8 = new QHBoxLayout();
|
||||
horizontalLayout_8->setObjectName("horizontalLayout_8");
|
||||
horizontalLayout_8->setContentsMargins(-1, -1, -1, 5);
|
||||
label_9 = new QLabel(SensorDialog);
|
||||
label_9->setObjectName("label_9");
|
||||
label_9->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_8->addWidget(label_9);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_8);
|
||||
|
||||
horizontalLayout_7 = new QHBoxLayout();
|
||||
horizontalLayout_7->setObjectName("horizontalLayout_7");
|
||||
horizontalLayout_7->setContentsMargins(-1, -1, -1, 10);
|
||||
logManual = new QTextEdit(SensorDialog);
|
||||
logManual->setObjectName("logManual");
|
||||
sizePolicy2.setHeightForWidth(logManual->sizePolicy().hasHeightForWidth());
|
||||
logManual->setSizePolicy(sizePolicy2);
|
||||
logManual->setMinimumSize(QSize(707, 80));
|
||||
logManual->setMaximumSize(QSize(16777215, 80));
|
||||
logManual->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_7->addWidget(logManual);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_7);
|
||||
|
||||
horizontalLayout_6 = new QHBoxLayout();
|
||||
horizontalLayout_6->setSpacing(15);
|
||||
horizontalLayout_6->setObjectName("horizontalLayout_6");
|
||||
horizontalLayout_6->setContentsMargins(-1, -1, -1, 10);
|
||||
label_10 = new QLabel(SensorDialog);
|
||||
label_10->setObjectName("label_10");
|
||||
label_10->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_6->addWidget(label_10);
|
||||
|
||||
alarmSleepage = new QLineEdit(SensorDialog);
|
||||
alarmSleepage->setObjectName("alarmSleepage");
|
||||
alarmSleepage->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_6->addWidget(alarmSleepage);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_6);
|
||||
|
||||
horizontalLayout_5 = new QHBoxLayout();
|
||||
horizontalLayout_5->setObjectName("horizontalLayout_5");
|
||||
horizontalLayout_5->setContentsMargins(-1, -1, -1, 5);
|
||||
label_11 = new QLabel(SensorDialog);
|
||||
label_11->setObjectName("label_11");
|
||||
label_11->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_5->addWidget(label_11);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_5);
|
||||
|
||||
horizontalLayout_4 = new QHBoxLayout();
|
||||
horizontalLayout_4->setObjectName("horizontalLayout_4");
|
||||
horizontalLayout_4->setContentsMargins(-1, -1, -1, 10);
|
||||
logHugeError = new QTextEdit(SensorDialog);
|
||||
logHugeError->setObjectName("logHugeError");
|
||||
sizePolicy2.setHeightForWidth(logHugeError->sizePolicy().hasHeightForWidth());
|
||||
logHugeError->setSizePolicy(sizePolicy2);
|
||||
logHugeError->setMinimumSize(QSize(707, 80));
|
||||
logHugeError->setMaximumSize(QSize(16777215, 80));
|
||||
logHugeError->setStyleSheet(QString::fromUtf8("border: 2px solid #DCD174;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 26px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 31.47px;\n"
|
||||
"text-align: left;\n"
|
||||
"background: #00000000;\n"
|
||||
"color: #13385F;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_4->addWidget(logHugeError);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_4);
|
||||
|
||||
horizontalLayout_3 = new QHBoxLayout();
|
||||
horizontalLayout_3->setSpacing(15);
|
||||
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||
horizontalLayout_3->setContentsMargins(-1, -1, -1, 25);
|
||||
label_12 = new QLabel(SensorDialog);
|
||||
label_12->setObjectName("label_12");
|
||||
sizePolicy1.setHeightForWidth(label_12->sizePolicy().hasHeightForWidth());
|
||||
label_12->setSizePolicy(sizePolicy1);
|
||||
label_12->setStyleSheet(QString::fromUtf8("background: transparent;\n"
|
||||
"font-family: Inter;\n"
|
||||
"font-size: 22px;\n"
|
||||
"font-weight: 400;\n"
|
||||
"line-height: 26.63px;\n"
|
||||
"text-align: left;\n"
|
||||
"color: #FF453A;\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_3->addWidget(label_12);
|
||||
|
||||
isVisible = new QComboBox(SensorDialog);
|
||||
isVisible->setObjectName("isVisible");
|
||||
isVisible->setStyleSheet(QString::fromUtf8("QComboBox::drop-down {\n"
|
||||
" border: 0px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: url(:/visual/res/svg/chevron-down.png);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox {\n"
|
||||
" border: 2px solid #DCD174;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 20px;\n"
|
||||
" font-weight: 400;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border: 2px solid #DCD174; \n"
|
||||
" background: white; \n"
|
||||
" selection-color: red;\n"
|
||||
" selection-background-color: blue;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item {\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 50px;\n"
|
||||
" font-weight: 400;\n"
|
||||
" text-align: left;\n"
|
||||
" padding: 5px;\n"
|
||||
" color: #13385F;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView::item:hover {\n"
|
||||
" background-color: #13385F; \n"
|
||||
" selection-color: white;\n"
|
||||
" outline: 0px;;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
""));
|
||||
|
||||
horizontalLayout_3->addWidget(isVisible);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_3);
|
||||
|
||||
horizontalLayout_2 = new QHBoxLayout();
|
||||
horizontalLayout_2->setSpacing(15);
|
||||
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||
horizontalLayout_2->setContentsMargins(-1, -1, -1, 25);
|
||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_2->addItem(horizontalSpacer);
|
||||
|
||||
cancelButton = new QPushButton(SensorDialog);
|
||||
cancelButton->setObjectName("cancelButton");
|
||||
sizePolicy.setHeightForWidth(cancelButton->sizePolicy().hasHeightForWidth());
|
||||
cancelButton->setSizePolicy(sizePolicy);
|
||||
cancelButton->setMinimumSize(QSize(110, 41));
|
||||
cancelButton->setMaximumSize(QSize(110, 41));
|
||||
cancelButton->setStyleSheet(QString::fromUtf8("QPushButton {\n"
|
||||
" border-style: outset;\n"
|
||||
" border-radius: 5px;\n"
|
||||
" border-color: #13385F;\n"
|
||||
" border-width: 1px;\n"
|
||||
" color: #13385F;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 22px;\n"
|
||||
" font-weight: 500;\n"
|
||||
" line-height: 26.63px;\n"
|
||||
" text-align: center;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QPushButton:hover {\n"
|
||||
" background-color: #e0f2f7;\n"
|
||||
" border-color: #1A4A73;\n"
|
||||
" color: #1A4A73;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QPushButton:pressed {\n"
|
||||
" background-color: #102E47;\n"
|
||||
" border-color: #102E47;\n"
|
||||
" color: white; \n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_2->addWidget(cancelButton);
|
||||
|
||||
saveButton = new QPushButton(SensorDialog);
|
||||
saveButton->setObjectName("saveButton");
|
||||
sizePolicy.setHeightForWidth(saveButton->sizePolicy().hasHeightForWidth());
|
||||
saveButton->setSizePolicy(sizePolicy);
|
||||
saveButton->setMinimumSize(QSize(143, 41));
|
||||
saveButton->setMaximumSize(QSize(143, 41));
|
||||
saveButton->setStyleSheet(QString::fromUtf8("QPushButton {\n"
|
||||
" border-style: outset;\n"
|
||||
" border-radius: 5px;\n"
|
||||
" border-color: #13385F;\n"
|
||||
" border-width: 1px;\n"
|
||||
" background-color: #13385F;\n"
|
||||
" color: white;\n"
|
||||
" font-family: Inter;\n"
|
||||
" font-size: 22px;\n"
|
||||
" font-weight: 500;\n"
|
||||
" line-height: 26.63px;\n"
|
||||
" text-align: center;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QPushButton:hover {\n"
|
||||
" background-color: #1A4A73;\n"
|
||||
" border-color: #1A4A73;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QPushButton:pressed {\n"
|
||||
" background-color: #102E47;\n"
|
||||
" border-color: #102E47;\n"
|
||||
"}"));
|
||||
|
||||
horizontalLayout_2->addWidget(saveButton);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_2);
|
||||
|
||||
|
||||
retranslateUi(SensorDialog);
|
||||
|
||||
QMetaObject::connectSlotsByName(SensorDialog);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QDialog *SensorDialog)
|
||||
{
|
||||
SensorDialog->setWindowTitle(QCoreApplication::translate("SensorDialog", "Dialog", nullptr));
|
||||
label_14->setText(QString());
|
||||
nameHeader->setText(QCoreApplication::translate("SensorDialog", "TextLabel", nullptr));
|
||||
label->setText(QCoreApplication::translate("SensorDialog", "\320\235\320\260\320\270\320\274\320\265\320\275\320\276\320\262\320\260\320\275\320\270\320\265", nullptr));
|
||||
label_2->setText(QCoreApplication::translate("SensorDialog", "\320\225\320\264\320\270\320\275\320\270\321\206\320\260 \320\270\320\267\320\274\320\265\321\200\320\265\320\275\320\270\321\217", nullptr));
|
||||
label_3->setText(QCoreApplication::translate("SensorDialog", "\320\236\321\202\320\276\320\261\321\200\320\260\320\266\320\260\321\202\321\214 \321\202\320\276\320\273\321\214\320\272\320\276 \320\224\320\260/\320\235\320\265\321\202 \320\262\320\274\320\265\321\201\321\202\320\276 \320\267\320\275\320\260\321\207\320\265\320\275\320\270\320\271 \320\264\320\260\321\202\321\207\320\270\320\272\320\260", nullptr));
|
||||
label_4->setText(QCoreApplication::translate("SensorDialog", "\320\230\320\274\320\265\320\265\321\202 \320\273\320\270 \320\277\320\276\321\200\320\276\320\263\320\276\320\262\321\213\320\265 \320\267\320\275\320\260\321\207\320\265\320\275\320\270\321\217", nullptr));
|
||||
label_5->setText(QCoreApplication::translate("SensorDialog", "\320\237\320\276\321\200\320\276\320\263\320\276\320\262\320\276\320\265 \320\267\320\275\320\260\321\207\320\265\320\275\320\270\320\265 (\320\274\320\270\320\275\320\270\320\274\321\203\320\274)", nullptr));
|
||||
label_6->setText(QCoreApplication::translate("SensorDialog", "\320\237\320\276\321\200\320\276\320\263\320\276\320\262\320\276\320\265 \320\267\320\275\320\260\321\207\320\265\320\275\320\270\320\265 (\320\274\320\260\320\272\321\201\320\270\320\274\321\203\320\274)", nullptr));
|
||||
label_7->setText(QCoreApplication::translate("SensorDialog", "\320\224\320\273\320\270\321\202\320\265\320\273\321\214\320\275\320\276\321\201\321\202\321\214, \321\201\320\265\320\272\321\203\320\275\320\264", nullptr));
|
||||
label_8->setText(QCoreApplication::translate("SensorDialog", "\320\233\320\276\320\263 \320\276\321\210\320\270\320\261\320\272\320\270", nullptr));
|
||||
label_9->setText(QCoreApplication::translate("SensorDialog", "\320\233\320\276\320\263 \320\270\320\275\321\201\321\202\321\200\321\203\320\272\321\206\320\270\320\270", nullptr));
|
||||
label_10->setText(QCoreApplication::translate("SensorDialog", "\320\222\321\200\320\265\320\274\321\217 \320\277\320\276\320\262\321\202\320\276\321\200\320\260, \321\201\320\265\320\272\321\203\320\275\320\264", nullptr));
|
||||
label_11->setText(QCoreApplication::translate("SensorDialog", "\320\233\320\276\320\263 \320\277\320\276\320\262\321\202\320\276\321\200\321\217\321\216\321\211\320\265\320\271\321\201\321\217 \320\276\321\210\320\270\320\261\320\272\320\270", nullptr));
|
||||
label_12->setText(QCoreApplication::translate("SensorDialog", "\320\241\320\272\321\200\321\213\321\202\321\214 \320\264\320\260\321\202\321\207\320\270\320\272?", nullptr));
|
||||
cancelButton->setText(QCoreApplication::translate("SensorDialog", "\320\236\321\202\320\274\320\265\320\275\320\260", nullptr));
|
||||
saveButton->setText(QCoreApplication::translate("SensorDialog", "\320\241\320\276\321\205\321\200\320\260\320\275\320\270\321\202\321\214", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class SensorDialog: public Ui_SensorDialog {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // UI_SENSORDIALOG_H
|
@ -0,0 +1,11 @@
|
||||
// This file is autogenerated. Changes will be overwritten.
|
||||
#include "EWIEGA46WW/moc_httpclient.cpp"
|
||||
#include "EWIEGA46WW/moc_mainwindow.cpp"
|
||||
#include "EWIEGA46WW/moc_pagination.cpp"
|
||||
#include "EWIEGA46WW/moc_paginationbar.cpp"
|
||||
#include "EWIEGA46WW/moc_pagingutil.cpp"
|
||||
#include "EWIEGA46WW/moc_savesensorservice.cpp"
|
||||
#include "EWIEGA46WW/moc_sensordialog.cpp"
|
||||
#include "EWIEGA46WW/moc_sensorlogervice.cpp"
|
||||
#include "EWIEGA46WW/moc_sensorservice.cpp"
|
||||
#include "EWIEGA46WW/moc_sensorwidget.cpp"
|
@ -1,6 +1,7 @@
|
||||
#include "flowlayout.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <utility>
|
||||
|
||||
FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
|
||||
: QLayout(parent), m_hSpacing(hSpacing), m_vSpacing(vSpacing) {
|
||||
@ -14,6 +15,15 @@ FlowLayout::~FlowLayout() {
|
||||
}
|
||||
}
|
||||
|
||||
void FlowLayout::clear() {
|
||||
while (QLayoutItem *item = takeAt(0)) {
|
||||
if (item->widget()) {
|
||||
item->widget()->hide();
|
||||
}
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
|
||||
void FlowLayout::addItem(QLayoutItem *item) {
|
||||
m_items.append(item);
|
||||
}
|
||||
@ -53,7 +63,7 @@ QSize FlowLayout::sizeHint() const {
|
||||
|
||||
QSize FlowLayout::minimumSize() const {
|
||||
QSize size;
|
||||
for (const QLayoutItem *item : qAsConst(m_items)) {
|
||||
for (const QLayoutItem *item : std::as_const(m_items)) {
|
||||
size = size.expandedTo(item->minimumSize());
|
||||
}
|
||||
const QMargins margins = contentsMargins();
|
||||
@ -66,7 +76,7 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const {
|
||||
int y = rect.y();
|
||||
int lineHeight = 0;
|
||||
|
||||
for (QLayoutItem *item : qAsConst(m_items)) {
|
||||
for (QLayoutItem *item : std::as_const(m_items)) {
|
||||
int spaceX = horizontalSpacing();
|
||||
int spaceY = verticalSpacing();
|
||||
int nextX = x + item->sizeHint().width() + spaceX;
|
||||
|
@ -11,6 +11,7 @@ public:
|
||||
explicit FlowLayout(QWidget *parent = nullptr, int margin = 0, int hSpacing = -1, int vSpacing = -1);
|
||||
~FlowLayout() override;
|
||||
|
||||
void clear();
|
||||
void addItem(QLayoutItem *item) override;
|
||||
int count() const override;
|
||||
QLayoutItem *itemAt(int index) const override;
|
||||
|
27
getsensors_p.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef GETSENSORS_P_H
|
||||
#define GETSENSORS_P_H
|
||||
#include <QString>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QByteArray>
|
||||
|
||||
class GetSensorsP {
|
||||
public:
|
||||
GetSensorsP() = default;
|
||||
|
||||
void setGroup(const QString& group) {
|
||||
this->group = group;
|
||||
}
|
||||
|
||||
QByteArray createRequestJson() const {
|
||||
QJsonObject obj;
|
||||
obj["group"] = group;
|
||||
|
||||
QJsonDocument doc(obj);
|
||||
return doc.toJson();
|
||||
}
|
||||
|
||||
private:
|
||||
QString group;
|
||||
};
|
||||
#endif // GETSENSORS_P_H
|
83
getsensors_r.h
Normal file
@ -0,0 +1,83 @@
|
||||
#ifndef GETSENSORS_R_H
|
||||
#define GETSENSORS_R_H
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QList>
|
||||
|
||||
class Sensor {
|
||||
public:
|
||||
int alarmCooldown;
|
||||
double alarmLowerBound;
|
||||
double alarmUpperBound;
|
||||
bool isBooled; // Поле из EXTRA
|
||||
bool isHide; // Поле из EXTRA
|
||||
QString group;
|
||||
QString id;
|
||||
bool isAlarmEnabled;
|
||||
bool isEnabled;
|
||||
double lastValue;
|
||||
QString name;
|
||||
QString unitName;
|
||||
|
||||
void parseSensor(const QJsonObject& sensorObj) {
|
||||
alarmCooldown = sensorObj["ALARM_COOLDOWN"].toInt();
|
||||
alarmLowerBound = sensorObj["ALARM_LOWERBOUND"].toDouble();
|
||||
alarmUpperBound = sensorObj["ALARM_UPPERBOUND"].toDouble();
|
||||
|
||||
// Обработка полей из EXTRA
|
||||
QString extraString = sensorObj["EXTRA"].toString();
|
||||
if (!extraString.isEmpty()) {
|
||||
QJsonParseError parseError;
|
||||
QJsonDocument extraDoc = QJsonDocument::fromJson(extraString.toUtf8(), &parseError);
|
||||
if (parseError.error == QJsonParseError::NoError && extraDoc.isObject()) {
|
||||
QJsonObject extraObj = extraDoc.object();
|
||||
isBooled = extraObj.value("isBool").toBool(false);
|
||||
isHide = extraObj.value("isHide").toBool(true); // Обратное значение "isHide"
|
||||
} else {
|
||||
isBooled = false;
|
||||
isHide = false;
|
||||
}
|
||||
} else {
|
||||
isBooled = false;
|
||||
isHide = false;
|
||||
}
|
||||
|
||||
group = sensorObj["GROUP"].toString();
|
||||
id = sensorObj["ID"].toString();
|
||||
isAlarmEnabled = sensorObj["IS_ALARM_ENABLED"].toBool();
|
||||
isEnabled = sensorObj["IS_ENABLED"].toBool();
|
||||
lastValue = sensorObj["LAST_VALUE"].toDouble();
|
||||
name = sensorObj["NAME"].toString();
|
||||
unitName = sensorObj["UNIT_NAME"].toString();
|
||||
}
|
||||
};
|
||||
|
||||
class GetSensorsR {
|
||||
public:
|
||||
GetSensorsR() = default;
|
||||
|
||||
void parseResponse(const QJsonObject& responseObj) {
|
||||
if (responseObj.contains("sensors") && responseObj["sensors"].isArray()) {
|
||||
QJsonArray sensorsArray = responseObj["sensors"].toArray();
|
||||
for (const QJsonValue& value : sensorsArray) {
|
||||
if (value.isObject()) {
|
||||
Sensor sensor;
|
||||
sensor.parseSensor(value.toObject());
|
||||
sensors.append(sensor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QList<Sensor>& getSensors() const {
|
||||
return sensors;
|
||||
}
|
||||
|
||||
private:
|
||||
QList<Sensor> sensors;
|
||||
};
|
||||
|
||||
#endif // GETSENSORS_R_H
|
@ -5,6 +5,7 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QMessageBox>
|
||||
|
||||
HttpClient::HttpClient(QObject *parent)
|
||||
: QObject(parent)
|
||||
@ -29,6 +30,15 @@ QJsonObject HttpClient::post(const QString &url, const QJsonObject &json)
|
||||
return processReply(reply);
|
||||
}
|
||||
|
||||
QJsonObject HttpClient::post(const QString &url)
|
||||
{
|
||||
QNetworkRequest request{QUrl(url)};
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
|
||||
QNetworkReply *reply = networkManager->post(request, "");
|
||||
return processReply(reply);
|
||||
}
|
||||
|
||||
QJsonObject HttpClient::put(const QString &url, const QJsonObject &json)
|
||||
{
|
||||
QNetworkRequest request{QUrl(url)};
|
||||
@ -49,14 +59,18 @@ QJsonObject HttpClient::processReply(QNetworkReply *reply)
|
||||
QByteArray responseData = reply->readAll();
|
||||
QJsonParseError parseError;
|
||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(responseData, &parseError);
|
||||
|
||||
if (parseError.error == QJsonParseError::NoError && jsonDoc.isObject()) {
|
||||
result = jsonDoc.object();
|
||||
} else {
|
||||
result["error"] = "Invalid JSON response.";
|
||||
QMessageBox::critical(nullptr, "Ошибка", "Получен неверный формат ответа от сервера.");
|
||||
}
|
||||
} else {
|
||||
result["error"] = reply->errorString();
|
||||
QMessageBox::critical(nullptr, "Ошибка", "Ошибка при запросе: " + reply->errorString());
|
||||
}
|
||||
|
||||
reply->deleteLater();
|
||||
return result;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
explicit HttpClient(QObject *parent = nullptr);
|
||||
QJsonObject get(const QString &url);
|
||||
QJsonObject post(const QString &url, const QJsonObject &json);
|
||||
QJsonObject post(const QString &url);
|
||||
QJsonObject put(const QString &url, const QJsonObject &json);
|
||||
|
||||
private:
|
||||
|
5
main.cpp
@ -1,9 +1,14 @@
|
||||
#include "mainwindow.h"
|
||||
#include "sensordialog.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLocale>
|
||||
#include <QTranslator>
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QHeaderView>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
309
mainwindow.cpp
@ -1,13 +1,17 @@
|
||||
#include "mainwindow.h"
|
||||
#include "./ui_mainwindow.h"
|
||||
#include "httpclient.h"
|
||||
#include "sensordialog.h"
|
||||
#include "flowlayout.h"
|
||||
#include "sensorwidget.h"
|
||||
#include "paginationbar.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QGridLayout>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include <QStackedWidget>
|
||||
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -17,54 +21,283 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
httpClient = new HttpClient(this);
|
||||
sensorService = new SensorService(httpClient, this);
|
||||
|
||||
//sensor tab
|
||||
SetupSensorTab();
|
||||
startSensorTabRefreshTimer();
|
||||
|
||||
QTreeWidgetItem *group1 = new QTreeWidgetItem(ui->treeWidget);
|
||||
group1->setText(0, "1 Группа");
|
||||
|
||||
QTreeWidgetItem *group2 = new QTreeWidgetItem(ui->treeWidget);
|
||||
group2->setText(0, "2 Группа");
|
||||
|
||||
QTreeWidgetItem *group3 = new QTreeWidgetItem(ui->treeWidget);
|
||||
group3->setText(0, "3 Группа");
|
||||
|
||||
for (int i = 1; i <= 8; ++i) {
|
||||
QTreeWidgetItem *sensorItem = new QTreeWidgetItem(group2);
|
||||
sensorItem->setText(0, QString("%1 Датчик").arg(i));
|
||||
sensorItem->setCheckState(0, (i >= 2 && i <= 4) ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 3; ++i) {
|
||||
QTreeWidgetItem *sensorItem = new QTreeWidgetItem(group1);
|
||||
sensorItem->setText(0, QString("%1 Датчик").arg(i));
|
||||
sensorItem->setCheckState(0, (i >= 2 && i <= 4) ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 4; ++i) {
|
||||
QTreeWidgetItem *sensorItem = new QTreeWidgetItem(group3);
|
||||
sensorItem->setText(0, QString("%1 Датчик").arg(i));
|
||||
sensorItem->setCheckState(0, (i >= 2 && i <= 4) ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
|
||||
int totalPages = 100;
|
||||
auto *paginationBar = new PaginationBar(totalPages, this);
|
||||
|
||||
ui->paginationBarLayout->addStretch();
|
||||
ui->paginationBarLayout->addWidget(paginationBar);
|
||||
ui->paginationBarLayout->addStretch();
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::SetupSensorTab() {
|
||||
QScrollArea *scrollArea = new QScrollArea(this);
|
||||
scrollArea->setStyleSheet("background: transparent; border: 0;");
|
||||
scrollArea->setStyleSheet(
|
||||
"QScrollArea {"
|
||||
" background: transparent;"
|
||||
"}"
|
||||
"QScrollBar:vertical {"
|
||||
" background: #ebebeb;"
|
||||
" width: 10px;"
|
||||
" border-radius: 5px;"
|
||||
"}"
|
||||
"QScrollBar::handle:vertical {"
|
||||
" background: #6d6d6d;"
|
||||
" border-radius: 5px;"
|
||||
" min-height: 20px;"
|
||||
"}"
|
||||
"QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {"
|
||||
" border: none;"
|
||||
" background: none;"
|
||||
" color: none;"
|
||||
"}"
|
||||
"QScrollBar::sub-line:vertical, QScrollBar::add-line:vertical {"
|
||||
" background: transparent;"
|
||||
" border: none;"
|
||||
"}"
|
||||
"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {"
|
||||
" background: transparent;"
|
||||
"}"
|
||||
);
|
||||
scrollArea->setWidgetResizable(true);
|
||||
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
QWidget *widgetContainer = new QWidget(scrollArea);
|
||||
FlowLayout *layout = new FlowLayout(widgetContainer, 10, 10, 10);
|
||||
|
||||
int num = 0;
|
||||
for (int row = 0; row < 10; ++row) {
|
||||
for (int col = 0; col < 1; ++col) {
|
||||
const QString a = QString::number(row);
|
||||
const QString b = QString::number(col);
|
||||
const QString c = QString::number(num);
|
||||
num++;
|
||||
SensorWidget *sensor = new SensorWidget(nullptr, a, b, c);
|
||||
|
||||
layout->addWidget(sensor);
|
||||
}
|
||||
}
|
||||
widgetContainer = new QWidget(scrollArea);
|
||||
widgetContainer->setStyleSheet("background: transparent;");
|
||||
layout = new FlowLayout(widgetContainer, 10, 10, 10);
|
||||
|
||||
widgetContainer->setLayout(layout);
|
||||
scrollArea->setWidget(widgetContainer);
|
||||
ui->SensorsTabLayout->addWidget(scrollArea);
|
||||
ui->sensorsLayout->addWidget(scrollArea);
|
||||
|
||||
/* HttpClient httpClient;
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
QJsonObject getResult = httpClient.get("http://raspberrypi.lan:8080/data/getDevices");
|
||||
qDebug() << "GET Response:" << getResult;
|
||||
}*/
|
||||
connect(ui->search, &QLineEdit::textChanged, this, &MainWindow::onSearchTextChanged);
|
||||
ui->showHiddenSelect->addItems({"Да", "Нет"});
|
||||
connect(ui->groupSelect, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::onGroupSelected);
|
||||
connect(ui->showHiddenSelect, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::onShowHiddenSelected);
|
||||
|
||||
loadSensorGroups();
|
||||
}
|
||||
|
||||
void MainWindow::startSensorTabRefreshTimer() {
|
||||
QTimer *refreshTimer = new QTimer(this);
|
||||
|
||||
connect(refreshTimer, &QTimer::timeout, this, [this]() {
|
||||
if (ui->tabWidget->currentWidget() == ui->sensorsTab) {
|
||||
updateDisplayedWidgets();
|
||||
}
|
||||
});
|
||||
|
||||
refreshTimer->start(5000); //5 sec
|
||||
}
|
||||
|
||||
void MainWindow::showSensorDialog(SensorWidget *sensor)
|
||||
{
|
||||
SensorDialog *dialog = new SensorDialog(this, sensor, httpClient);
|
||||
dialog->setWindowModality(Qt::ApplicationModal);
|
||||
|
||||
this->setStyleSheet("QMainWindow { background-color: rgba(0, 0, 0, 1); }");
|
||||
|
||||
connect(dialog, &SensorDialog::resultReady, this, &MainWindow::onSensorDialogFinished);
|
||||
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
void MainWindow::onSensorDialogFinished(int result)
|
||||
{
|
||||
this->setStyleSheet("");
|
||||
|
||||
switch (result) {
|
||||
case SensorDialog::SaveSuccess:
|
||||
updateDisplayedWidgets();
|
||||
break;
|
||||
|
||||
case SensorDialog::SaveError:
|
||||
QMessageBox::critical(nullptr, "Ошибка", "Данные не сохранены, попробуйте еще раз");
|
||||
break;
|
||||
|
||||
case SensorDialog::NoSave:
|
||||
updateDisplayedWidgets();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::loadSensorGroups() {
|
||||
QStringList groups = sensorService->getSensorGroups();
|
||||
|
||||
if (groups.isEmpty()) {
|
||||
QTimer::singleShot(5000, this, &MainWindow::loadSensorGroups);
|
||||
return;
|
||||
}
|
||||
|
||||
groups.sort(Qt::CaseInsensitive);
|
||||
ui->groupSelect->clear();
|
||||
ui->groupSelect->addItems(groups);
|
||||
|
||||
if (!groups.isEmpty()) {
|
||||
loadSensors(groups.first());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::loadSensors(const QString& group) {
|
||||
QList<Sensor> sensors = sensorService->getSensors(group);
|
||||
|
||||
const auto &existingWidgets = widgetContainer->findChildren<SensorWidget *>();
|
||||
for (SensorWidget *widget : existingWidgets) {
|
||||
delete widget;
|
||||
}
|
||||
|
||||
layout->clear();
|
||||
|
||||
for (const Sensor& sensor : sensors) {
|
||||
SensorWidget* s = new SensorWidget(nullptr, sensor);
|
||||
layout->addWidget(s);
|
||||
|
||||
connect(s, &SensorWidget::clicked, this, &MainWindow::showSensorDialog);
|
||||
}
|
||||
|
||||
widgetContainer->update();
|
||||
}
|
||||
|
||||
void MainWindow::updateDisplayedWidgets()
|
||||
{
|
||||
QString selectedGroup = ui->groupSelect->currentText();
|
||||
QString showHidden = ui->showHiddenSelect->currentText();
|
||||
QString searchText = ui->search->text();
|
||||
|
||||
// Загружаем датчики только для выбранной группы
|
||||
QList<Sensor> sensors = sensorService->getSensors(selectedGroup);
|
||||
|
||||
// Храним уже добавленные виджеты
|
||||
QMap<QString, SensorWidget*> existingWidgets;
|
||||
|
||||
// Сохраняем существующие виджеты и их сенсоры для последующего обновления
|
||||
const auto &widgets = widgetContainer->findChildren<SensorWidget *>();
|
||||
for (SensorWidget *widget : widgets) {
|
||||
existingWidgets[widget->getSensor().id] = widget;
|
||||
}
|
||||
|
||||
layout->clear(); // Очищаем layout, но не удаляем сами виджеты
|
||||
|
||||
// Проходим по новым датчикам и добавляем их в layout, если они ещё не добавлены
|
||||
for (const Sensor& sensor : sensors) {
|
||||
SensorWidget* widget = nullptr;
|
||||
|
||||
// Проверяем, существует ли виджет для данного сенсора
|
||||
if (existingWidgets.contains(sensor.id)) {
|
||||
widget = existingWidgets[sensor.id];
|
||||
widget->setSensor(sensor); // Обновляем данные существующего виджета
|
||||
} else {
|
||||
widget = new SensorWidget(nullptr, sensor);
|
||||
connect(widget, &SensorWidget::clicked, this, &MainWindow::showSensorDialog);
|
||||
}
|
||||
|
||||
// Применяем фильтрацию по условиям
|
||||
bool matchesHidden = (showHidden == "Да") || !sensor.isHide;
|
||||
bool matchesSearch = sensor.name.contains(searchText, Qt::CaseInsensitive);
|
||||
|
||||
if (matchesHidden && matchesSearch) {
|
||||
layout->addWidget(widget);
|
||||
widget->show();
|
||||
} else {
|
||||
widget->hide();
|
||||
}
|
||||
}
|
||||
|
||||
widgetContainer->update(); // Обновляем виджеты в контейнере
|
||||
}
|
||||
|
||||
void MainWindow::onGroupSelected(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
loadSensors(ui->groupSelect->currentText());
|
||||
updateDisplayedWidgets();
|
||||
}
|
||||
|
||||
void MainWindow::onShowHiddenSelected(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
updateDisplayedWidgets();
|
||||
}
|
||||
|
||||
void MainWindow::onSearchTextChanged(const QString &text)
|
||||
{
|
||||
Q_UNUSED(text);
|
||||
if (text.isEmpty()) {
|
||||
ui->search->setStyleSheet(R"(
|
||||
QLineEdit {
|
||||
width: 778px;
|
||||
height: 60px;
|
||||
border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
|
||||
)");
|
||||
} else {
|
||||
ui->search->setStyleSheet(R"(
|
||||
QLineEdit {
|
||||
width: 778px;
|
||||
height: 60px;
|
||||
border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
}
|
||||
)");
|
||||
}
|
||||
updateDisplayedWidgets();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::ResizeEvent(QResizeEvent *event) {}
|
||||
|
||||
void MainWindow::SetupTabs() {}
|
||||
|
||||
void MainWindow::SetupSensorTab(QWidget *tab, QVBoxLayout *mainLayout) {}
|
||||
|
||||
void MainWindow::SetupIncidentTab(QWidget *tab, QVBoxLayout *mainLayout) {}
|
||||
|
||||
void MainWindow::SetupStatisticsTab(QWidget *tab, QVBoxLayout *mainLayout) {}
|
||||
|
||||
void MainWindow::SetupJournalTab(QWidget *tab, QVBoxLayout *mainLayout) {}
|
||||
|
||||
void MainWindow::SetupSettingsTab(QWidget *tab, QVBoxLayout *mainLayout) {}
|
||||
|
37
mainwindow.h
@ -1,6 +1,11 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "flowlayout.h"
|
||||
#include "sensorwidget.h"
|
||||
#include "sensorservice.h"
|
||||
#include "httpclient.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QPixmap>
|
||||
#include <QVBoxLayout>
|
||||
@ -11,8 +16,6 @@
|
||||
#include <QLabel>
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
@ -38,17 +41,27 @@ private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
private:
|
||||
QLabel *imageLabel;
|
||||
QPixmap pixmap;
|
||||
std::map<QWidget *, TabImageData> tabImageLabels;
|
||||
HttpClient *httpClient;
|
||||
QWidget *widgetContainer;
|
||||
FlowLayout *layout;
|
||||
SensorService *sensorService;
|
||||
|
||||
|
||||
private:
|
||||
void ResizeEvent(QResizeEvent *event);
|
||||
void SetupTabs();
|
||||
void SetupSensorTab(QWidget *tab, QVBoxLayout *mainLayout);
|
||||
void SetupIncidentTab(QWidget *tab, QVBoxLayout *mainLayout);
|
||||
void SetupStatisticsTab(QWidget *tab, QVBoxLayout *mainLayout);
|
||||
void SetupJournalTab(QWidget *tab, QVBoxLayout *mainLayout);
|
||||
void SetupSettingsTab(QWidget *tab, QVBoxLayout *mainLayout);
|
||||
//dialog windows
|
||||
void showSensorDialog(SensorWidget *sensor);
|
||||
void onSensorDialogFinished(int result);
|
||||
//api requests
|
||||
void loadSensors(const QString& group);
|
||||
void loadSensorGroups();
|
||||
//update sensor widgets
|
||||
void updateDisplayedWidgets();
|
||||
void onSearchTextChanged(const QString &text);
|
||||
void onGroupSelected(int index);
|
||||
void onShowHiddenSelected(int index);
|
||||
//sensor tab utility
|
||||
void startSensorTabRefreshTimer();
|
||||
void SetupSensorTab();
|
||||
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
943
mainwindow.ui
424
pagination.cpp
Normal file
@ -0,0 +1,424 @@
|
||||
#include "pagination.h"
|
||||
|
||||
#include "pagingstyle1.h"
|
||||
|
||||
#include <qcoreevent.h>
|
||||
#include <qvariant.h>
|
||||
#include <qstyle.h>
|
||||
#include <qpainter.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <qevent.h>
|
||||
|
||||
Pagination::Pagination(QWidget* parent)
|
||||
: QFrame(parent)
|
||||
, pagingStyle(nullptr)
|
||||
, lastSelectedIndex(0)
|
||||
, boxSpacing(6)
|
||||
, pageUpText("<")
|
||||
, pageDownText(">")
|
||||
, pageUpPressed(false)
|
||||
, pageDownPressed(false)
|
||||
, hoverNumber(-1)
|
||||
, pushButton(new QPushButton(this))
|
||||
{
|
||||
setAttribute(Qt::WA_Hover);
|
||||
|
||||
pushButton->setVisible(false);
|
||||
|
||||
setPagingStyle(new PagingStyle1);
|
||||
pagingStyle->pre2ReCacheNumbers();
|
||||
}
|
||||
|
||||
Pagination::~Pagination() {
|
||||
delete pagingStyle;
|
||||
}
|
||||
|
||||
int Pagination::getBoxSpacing() const {
|
||||
return boxSpacing;
|
||||
}
|
||||
|
||||
void Pagination::setBoxSpacing(int spacing) {
|
||||
boxSpacing = spacing;
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
int Pagination::getTotalSize() const {
|
||||
return pagingStyle->getTotalSize();
|
||||
}
|
||||
|
||||
void Pagination::setTotalSize(int size) {
|
||||
pagingStyle->setTotalSize(size);
|
||||
}
|
||||
|
||||
int Pagination::getSizeofPerPage() const {
|
||||
return pagingStyle->getSizeofPerPage();
|
||||
}
|
||||
|
||||
void Pagination::setSizeofPerPage(int size) {
|
||||
Q_ASSERT(size > 0);
|
||||
pagingStyle->setSizeofPerPage(size);
|
||||
}
|
||||
|
||||
bool Pagination::isPageUpEnabled() const {
|
||||
return !pageUpText.isEmpty();
|
||||
}
|
||||
|
||||
QString Pagination::getPageUpText() const {
|
||||
return pageUpText;
|
||||
}
|
||||
|
||||
void Pagination::setPageUpText(const QString& text) {
|
||||
pageUpText = text;
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
bool Pagination::isPageDownEnabled() const {
|
||||
return !pageDownText.isEmpty();
|
||||
}
|
||||
|
||||
QString Pagination::getPageDownText() const {
|
||||
return pageDownText;
|
||||
}
|
||||
|
||||
void Pagination::setPageDownText(const QString& text) {
|
||||
pageDownText = text;
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
|
||||
void Pagination::setPagingStyle(PagingUtil* pagingStyle) {
|
||||
//copy data from old style
|
||||
if (this->pagingStyle != nullptr) {
|
||||
*pagingStyle = *this->pagingStyle;
|
||||
}
|
||||
//remove old style util
|
||||
delete this->pagingStyle;
|
||||
this->pagingStyle = pagingStyle;
|
||||
this->pagingStyle->pre2ReCacheNumbers();
|
||||
|
||||
connect(pagingStyle, &PagingUtil::numberArraySizeChanged, [&] {
|
||||
updateGeometry();
|
||||
});
|
||||
|
||||
connect(pagingStyle, &PagingUtil::numbersChanged, [&] {
|
||||
update();
|
||||
});
|
||||
|
||||
connect(pagingStyle, &PagingUtil::numberSelectChanged, [&] {
|
||||
auto index = this->pagingStyle->getCurrentSelectedNumber() - 1;
|
||||
if (lastSelectedIndex != index) {
|
||||
lastSelectedIndex = index;
|
||||
emit pageIndexChanged(index);
|
||||
}
|
||||
});
|
||||
|
||||
lastSelectedIndex = pagingStyle->getCurrentSelectedNumber() - 1;
|
||||
}
|
||||
|
||||
void Pagination::setCurrentPage(int number) {
|
||||
pagingStyle->numberSelected(number);
|
||||
}
|
||||
|
||||
void Pagination::pageDown() {
|
||||
pagingStyle->numberSelected(pagingStyle->getCurrentSelectedNumber() + 1);
|
||||
}
|
||||
|
||||
void Pagination::pageUp() {
|
||||
pagingStyle->numberSelected(pagingStyle->getCurrentSelectedNumber() - 1);
|
||||
}
|
||||
|
||||
void Pagination::pageFirst() {
|
||||
pagingStyle->numberSelected(1);
|
||||
}
|
||||
|
||||
void Pagination::pageLast() {
|
||||
pagingStyle->numberSelected(pagingStyle->getPageSize());
|
||||
}
|
||||
|
||||
int Pagination::getCurrentPageIndex() const {
|
||||
return lastSelectedIndex;
|
||||
}
|
||||
|
||||
|
||||
QSize Pagination::sizeHint() const {
|
||||
return minimumSizeHint();
|
||||
}
|
||||
|
||||
QSize Pagination::minimumSizeHint() const {
|
||||
|
||||
int minWidth = getPageUpBtnWidth();
|
||||
minWidth += boxSpacing;
|
||||
|
||||
auto boxSize = getBoxSize();
|
||||
|
||||
//calc numbers width
|
||||
auto numbers = pagingStyle->getCurCacheNumbers();
|
||||
for (int i = 0; i < numbers.size(); i++) {
|
||||
minWidth += boxSize.width();
|
||||
minWidth += boxSpacing;
|
||||
}
|
||||
minWidth += getPageDownBtnWidth();
|
||||
|
||||
return { minWidth, boxSize.height() };
|
||||
}
|
||||
|
||||
bool Pagination::event(QEvent* e) {
|
||||
if (e->type() == QEvent::HoverLeave) {
|
||||
hoverNumber = -1;
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
if (e->type() == QEvent::HoverMove || e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonRelease) {
|
||||
QPoint mousePos;
|
||||
if (e->type() == QEvent::HoverMove) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
mousePos = dynamic_cast<QHoverEvent*>(e)->pos();
|
||||
#else
|
||||
mousePos = dynamic_cast<QHoverEvent*>(e)->position().toPoint();
|
||||
#endif
|
||||
} else {
|
||||
mousePos = dynamic_cast<QMouseEvent*>(e)->pos();
|
||||
}
|
||||
|
||||
auto boxSize = getBoxSize();
|
||||
auto top = centerTop(boxSize.height());
|
||||
|
||||
hoverNumber = -1;
|
||||
|
||||
do {
|
||||
int pageUpBtnWidth = getPageUpBtnWidth();
|
||||
if (pageUpBtnWidth != 0) {
|
||||
auto boxRect = QRect(
|
||||
0,
|
||||
top,
|
||||
pageUpBtnWidth,
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
if (boxRect.contains(mousePos)) {
|
||||
if (e->type() == QEvent::MouseButtonPress) {
|
||||
pageUpPressed = true;
|
||||
} else if (e->type() == QEvent::MouseButtonRelease) {
|
||||
pageUpPressed = false;
|
||||
pageUp();
|
||||
}
|
||||
hoverNumber = -3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
auto numbers = pagingStyle->getCurCacheNumbers();
|
||||
|
||||
int pageDownBtnWidth = getPageDownBtnWidth();
|
||||
if (pageDownBtnWidth != 0) {
|
||||
auto boxRect = QRect(
|
||||
getPageUpBtnWidth() + boxSpacing + (boxSize.width() + boxSpacing) * numbers.size(),
|
||||
top,
|
||||
pageDownBtnWidth,
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
if (boxRect.contains(mousePos)) {
|
||||
if (e->type() == QEvent::MouseButtonPress) {
|
||||
pageDownPressed = true;
|
||||
} else if (e->type() == QEvent::MouseButtonRelease) {
|
||||
pageDownPressed = false;
|
||||
pageDown();
|
||||
}
|
||||
hoverNumber = -2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < numbers.size(); i++) {
|
||||
|
||||
auto boxRect = QRect(
|
||||
pageUpBtnWidth + boxSpacing + (boxSize.width() + boxSpacing) * i,
|
||||
top,
|
||||
boxSize.width(),
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
if (boxRect.contains(mousePos)) {
|
||||
if (e->type() == QEvent::MouseButtonPress) {
|
||||
setCurrentPage(numbers.at(i));
|
||||
} else {
|
||||
hoverNumber = numbers.at(i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (false);
|
||||
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
return QFrame::event(e);
|
||||
}
|
||||
|
||||
void Pagination::paintEvent(QPaintEvent* event) {
|
||||
|
||||
QPainter painter(this);
|
||||
|
||||
auto boxSize = getBoxSize();
|
||||
auto top = centerTop(boxSize.height());
|
||||
|
||||
auto numbers = pagingStyle->getCurCacheNumbers();
|
||||
|
||||
int pageUpBtnWidth = getPageUpBtnWidth();
|
||||
if (pageUpBtnWidth != 0) {
|
||||
auto boxRect = QRect(
|
||||
0,
|
||||
top,
|
||||
pageUpBtnWidth,
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
drawPageUpBtn(boxRect, &painter);
|
||||
}
|
||||
|
||||
for (int i=0; i<numbers.size(); i++) {
|
||||
|
||||
auto boxRect = QRect(
|
||||
pageUpBtnWidth + boxSpacing + (boxSize.width() + boxSpacing) * i,
|
||||
top,
|
||||
boxSize.width(),
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
int num = numbers.at(i);
|
||||
if (num != -1) {
|
||||
drawNumber(boxRect, numbers.at(i), &painter);
|
||||
} else {
|
||||
drawEllipsis(boxRect, numbers.at(i), &painter);
|
||||
}
|
||||
}
|
||||
|
||||
int pageDownBtnWidth = getPageDownBtnWidth();
|
||||
if (pageDownBtnWidth != 0) {
|
||||
auto boxRect = QRect(
|
||||
getPageUpBtnWidth() + boxSpacing + (boxSize.width() + boxSpacing) * numbers.size(),
|
||||
top,
|
||||
pageDownBtnWidth,
|
||||
boxSize.height()
|
||||
);
|
||||
|
||||
drawPageDownBtn(boxRect, &painter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString Pagination::numberFormat(int number) const {
|
||||
if (number == -1) {
|
||||
return "...";
|
||||
}
|
||||
return QString::number(number);
|
||||
}
|
||||
|
||||
void Pagination::drawNumber(const QRect& rect, int number, QPainter* painter) {
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(pushButton);
|
||||
opt.text = numberFormat(number);
|
||||
opt.rect = rect;
|
||||
opt.state.setFlag(QStyle::State_MouseOver, hoverNumber == number);
|
||||
opt.state.setFlag(QStyle::State_Selected, pagingStyle->isSelectedNumber(number));
|
||||
style()->drawControl(QStyle::CE_PushButton, &opt, painter, pushButton);
|
||||
}
|
||||
|
||||
void Pagination::drawEllipsis(const QRect& rect, int number, QPainter* painter) {
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(pushButton);
|
||||
opt.text = numberFormat(number);
|
||||
opt.rect = rect;
|
||||
opt.state.setFlag(QStyle::State_Enabled, false);
|
||||
style()->drawControl(QStyle::CE_PushButton, &opt, painter, pushButton);
|
||||
}
|
||||
|
||||
void Pagination::drawPageUpBtn(const QRect& rect, QPainter* painter) {
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(pushButton);
|
||||
opt.text = getPageUpText();
|
||||
opt.rect = rect;
|
||||
opt.state.setFlag(QStyle::State_MouseOver, hoverNumber == -3);
|
||||
opt.state.setFlag(QStyle::State_Sunken, pageUpPressed);
|
||||
style()->drawControl(QStyle::CE_PushButton, &opt, painter, pushButton);
|
||||
}
|
||||
|
||||
void Pagination::drawPageDownBtn(const QRect& rect, QPainter* painter) {
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(pushButton);
|
||||
opt.text = getPageDownText();
|
||||
opt.rect = rect;
|
||||
opt.state.setFlag(QStyle::State_MouseOver, hoverNumber == -2);
|
||||
opt.state.setFlag(QStyle::State_Sunken, pageDownPressed);
|
||||
style()->drawControl(QStyle::CE_PushButton, &opt, painter, pushButton);
|
||||
}
|
||||
|
||||
|
||||
QSize Pagination::getBoxSize() const {
|
||||
auto met = fontMetrics();
|
||||
|
||||
int l, t, r, b;
|
||||
readContentMargins(l, t, r, b);
|
||||
|
||||
int boxWidth = l + r + met.height();
|
||||
int boxHeight = t + b + met.height();
|
||||
|
||||
return { boxWidth, boxHeight };
|
||||
}
|
||||
|
||||
int Pagination::getPageUpBtnWidth() const {
|
||||
if (!isPageUpEnabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int l, t, r, b;
|
||||
readContentMargins(l, t, r, b);
|
||||
|
||||
auto met = fontMetrics();
|
||||
return qMax(t + b + met.height(),
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
|
||||
met.width(pageUpText) + l + r
|
||||
#else
|
||||
met.horizontalAdvance(pageUpText) + l + r
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
int Pagination::getPageDownBtnWidth() const {
|
||||
if (!isPageDownEnabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int l, t, r, b;
|
||||
readContentMargins(l, t, r, b);
|
||||
|
||||
auto met = fontMetrics();
|
||||
return qMax(t + b + met.height(),
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
|
||||
met.width(pageDownText) + l + r
|
||||
#else
|
||||
met.horizontalAdvance(pageDownText) + l + r
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
int Pagination::centerTop(int boxHeight) const {
|
||||
return (height() - boxHeight) / 2;
|
||||
}
|
||||
|
||||
void Pagination::readContentMargins(int& l, int& t, int& r, int& b) const {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
getContentsMargins(&l, &t, &r, &b);
|
||||
#else
|
||||
auto margins = contentsMargins();
|
||||
l = margins.left();
|
||||
t = margins.top();
|
||||
r = margins.right();
|
||||
b = margins.bottom();
|
||||
#endif
|
||||
}
|
97
pagination.h
Normal file
@ -0,0 +1,97 @@
|
||||
#ifndef PAGINATION_H
|
||||
#define PAGINATION_H
|
||||
|
||||
#include <qframe.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include "pagingutil.h"
|
||||
|
||||
class Pagination : public QFrame {
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(int spacing READ getBoxSpacing WRITE setBoxSpacing)
|
||||
Q_PROPERTY(int totalsize READ getTotalSize WRITE setTotalSize)
|
||||
Q_PROPERTY(int sizeofperpage READ getSizeofPerPage WRITE setSizeofPerPage)
|
||||
|
||||
Q_PROPERTY(QString pageUpText READ getPageUpText WRITE setPageUpText)
|
||||
Q_PROPERTY(QString pageDownText READ getPageDownText WRITE setPageDownText)
|
||||
|
||||
public:
|
||||
explicit Pagination(QWidget* parent = nullptr);
|
||||
~Pagination();
|
||||
|
||||
int getBoxSpacing() const;
|
||||
void setBoxSpacing(int spacing);
|
||||
|
||||
int getTotalSize() const;
|
||||
void setTotalSize(int size);
|
||||
|
||||
int getSizeofPerPage() const;
|
||||
void setSizeofPerPage(int size);
|
||||
|
||||
bool isPageUpEnabled() const;
|
||||
|
||||
QString getPageUpText() const;
|
||||
void setPageUpText(const QString& text);
|
||||
|
||||
bool isPageDownEnabled() const;
|
||||
|
||||
QString getPageDownText() const;
|
||||
void setPageDownText(const QString& text);
|
||||
|
||||
void setPagingStyle(PagingUtil* pagingStyle);
|
||||
|
||||
void setCurrentPage(int number);
|
||||
|
||||
void pageUp();
|
||||
void pageDown();
|
||||
void pageFirst();
|
||||
void pageLast();
|
||||
|
||||
int getCurrentPageIndex() const;
|
||||
|
||||
signals:
|
||||
void pageIndexChanged(int index);
|
||||
|
||||
protected:
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
bool event(QEvent* e) override;
|
||||
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
|
||||
virtual QString numberFormat(int number) const;
|
||||
|
||||
virtual void drawNumber(const QRect& rect, int number, QPainter* painter);
|
||||
virtual void drawEllipsis(const QRect& rect, int number, QPainter* painter);
|
||||
|
||||
virtual void drawPageUpBtn(const QRect& rect, QPainter* painter);
|
||||
virtual void drawPageDownBtn(const QRect& rect, QPainter* painter);
|
||||
|
||||
protected:
|
||||
PagingUtil* pagingStyle;
|
||||
|
||||
int lastSelectedIndex;
|
||||
|
||||
int boxSpacing;
|
||||
|
||||
QString pageUpText, pageDownText;
|
||||
bool pageUpPressed, pageDownPressed;
|
||||
|
||||
//-3: pageUp -2: pageDown -1: none
|
||||
int hoverNumber;
|
||||
|
||||
QPushButton* pushButton;
|
||||
|
||||
private:
|
||||
QSize getBoxSize() const;
|
||||
|
||||
int getPageUpBtnWidth() const;
|
||||
int getPageDownBtnWidth() const;
|
||||
|
||||
int centerTop(int boxHeight) const;
|
||||
|
||||
void readContentMargins(int& l, int& t, int& r, int& b) const;
|
||||
};
|
||||
#endif // PAGINATION_H
|
209
paginationbar.cpp
Normal file
@ -0,0 +1,209 @@
|
||||
#include "PaginationBar.h"
|
||||
#include <QStyle>
|
||||
#include <QIntValidator>
|
||||
#include <QDebug>
|
||||
|
||||
PaginationBar::PaginationBar(int totalPages, QWidget *parent)
|
||||
: QWidget(parent), totalPages(totalPages), currentPage(1) {
|
||||
layout = new QHBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(5);
|
||||
|
||||
leftArrow = new QPushButton(this);
|
||||
leftArrow->setFixedSize(40, 40);
|
||||
leftArrow->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 0;
|
||||
background-image: url(:/png/res/png/arrowLeft.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
)");
|
||||
connect(leftArrow, &QPushButton::clicked, this, &PaginationBar::goToPreviousPage);
|
||||
|
||||
rightArrow = new QPushButton(this);
|
||||
rightArrow->setFixedSize(40, 40);
|
||||
rightArrow->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 0;
|
||||
background-image: url(:/png/res/png/arrowRight.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
)");
|
||||
connect(rightArrow, &QPushButton::clicked, this, &PaginationBar::goToNextPage);
|
||||
|
||||
layout->addWidget(leftArrow);
|
||||
layout->addWidget(rightArrow);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void PaginationBar::onPageButtonClicked(int page) {
|
||||
currentPage = page;
|
||||
emit pageChanged(currentPage);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void PaginationBar::goToPreviousPage() {
|
||||
if (currentPage > 1) {
|
||||
currentPage--;
|
||||
emit pageChanged(currentPage);
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
void PaginationBar::goToNextPage() {
|
||||
if (currentPage < totalPages) {
|
||||
currentPage++;
|
||||
emit pageChanged(currentPage);
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
void PaginationBar::onEllipsisClicked(QPushButton *ellipsisButton) {
|
||||
if (activeLineEdit) {
|
||||
layout->replaceWidget(activeLineEdit, previousEllipsisButton);
|
||||
activeLineEdit->deleteLater();
|
||||
activeLineEdit = nullptr;
|
||||
if (previousEllipsisButton) {
|
||||
previousEllipsisButton->show();
|
||||
}
|
||||
}
|
||||
|
||||
auto *lineEdit = new QLineEdit(this);
|
||||
lineEdit->setFixedSize(40, 40);
|
||||
lineEdit->setStyleSheet(R"(
|
||||
border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
)");
|
||||
lineEdit->setAlignment(Qt::AlignCenter);
|
||||
lineEdit->setValidator(new QIntValidator(1, totalPages, this));
|
||||
layout->replaceWidget(ellipsisButton, lineEdit);
|
||||
ellipsisButton->hide();
|
||||
|
||||
lineEdit->setFocus();
|
||||
|
||||
activeLineEdit = lineEdit;
|
||||
previousEllipsisButton = ellipsisButton;
|
||||
|
||||
connect(lineEdit, &QLineEdit::editingFinished, [this, lineEdit, ellipsisButton]() {
|
||||
bool ok;
|
||||
int page = lineEdit->text().toInt(&ok);
|
||||
if (ok && page >= 1 && page <= totalPages) {
|
||||
currentPage = page;
|
||||
emit pageChanged(currentPage);
|
||||
}
|
||||
|
||||
layout->replaceWidget(lineEdit, ellipsisButton);
|
||||
lineEdit->deleteLater();
|
||||
activeLineEdit = nullptr;
|
||||
ellipsisButton->show();
|
||||
|
||||
updateButtons();
|
||||
});
|
||||
}
|
||||
|
||||
void PaginationBar::updateButtons() {
|
||||
if (activeLineEdit) {
|
||||
for (auto *button : pageButtons) {
|
||||
if (!button->isVisible()) {
|
||||
layout->replaceWidget(activeLineEdit, button);
|
||||
activeLineEdit->deleteLater();
|
||||
activeLineEdit = nullptr;
|
||||
button->show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *button : pageButtons) {
|
||||
layout->removeWidget(button);
|
||||
button->deleteLater();
|
||||
}
|
||||
pageButtons.clear();
|
||||
|
||||
if (totalPages <= 7) {
|
||||
for (int i = 1; i <= totalPages; ++i) {
|
||||
addPageButton(i);
|
||||
}
|
||||
} else {
|
||||
if (currentPage <= 4) {
|
||||
for (int i = 1; i <= 5; ++i) addPageButton(i);
|
||||
addEllipsisButton();
|
||||
addPageButton(totalPages);
|
||||
} else if (currentPage >= totalPages - 3) {
|
||||
addPageButton(1);
|
||||
addEllipsisButton();
|
||||
for (int i = totalPages - 4; i <= totalPages; ++i) addPageButton(i);
|
||||
} else {
|
||||
addPageButton(1);
|
||||
addEllipsisButton();
|
||||
for (int i = currentPage - 1; i <= currentPage + 1; ++i) addPageButton(i);
|
||||
addEllipsisButton();
|
||||
addPageButton(totalPages);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PaginationBar::addPageButton(int page) {
|
||||
auto *button = new QPushButton(QString::number(page), this);
|
||||
button->setFixedSize(40, 40);
|
||||
if (page == currentPage) {
|
||||
button->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background: #13385f;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
color: white;
|
||||
}
|
||||
)");
|
||||
} else {
|
||||
button->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
color: #13385f;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
)");
|
||||
}
|
||||
connect(button, &QPushButton::clicked, [this, page]() { onPageButtonClicked(page); });
|
||||
pageButtons.append(button);
|
||||
layout->insertWidget(layout->count() - 1, button);
|
||||
}
|
||||
|
||||
void PaginationBar::addEllipsisButton() {
|
||||
auto *button = new QPushButton("...", this);
|
||||
button->setFixedSize(40, 40);
|
||||
button->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #13385f;
|
||||
}
|
||||
)");
|
||||
connect(button, &QPushButton::clicked, [this, button]() { onEllipsisClicked(button); });
|
||||
pageButtons.append(button);
|
||||
layout->insertWidget(layout->count() - 1, button);
|
||||
}
|
42
paginationbar.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef PAGINATIONBAR_H
|
||||
#define PAGINATIONBAR_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
class PaginationBar : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PaginationBar(int totalPages, QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void pageChanged(int page);
|
||||
|
||||
private slots:
|
||||
void onPageButtonClicked(int page);
|
||||
void goToPreviousPage();
|
||||
void goToNextPage();
|
||||
void onEllipsisClicked(QPushButton *ellipsisButton);
|
||||
|
||||
private:
|
||||
QLineEdit *activeLineEdit = nullptr;
|
||||
QPushButton *previousEllipsisButton = nullptr;
|
||||
|
||||
private:
|
||||
int totalPages; // Общее количество страниц
|
||||
int currentPage; // Текущая страница
|
||||
|
||||
QPushButton *leftArrow; // Кнопка влево
|
||||
QPushButton *rightArrow; // Кнопка вправо
|
||||
QHBoxLayout *layout; // Макет для размещения кнопок
|
||||
QList<QPushButton *> pageButtons; // Список кнопок страниц
|
||||
|
||||
void updateButtons(); // Обновление кнопок в зависимости от состояния
|
||||
void addPageButton(int page); // Добавить кнопку страницы
|
||||
void addEllipsisButton(); // Добавить кнопку с троеточием
|
||||
};
|
||||
|
||||
#endif // PAGINATIONBAR_H
|
71
pagingstyle1.cpp
Normal file
@ -0,0 +1,71 @@
|
||||
#include "pagingstyle1.h"
|
||||
|
||||
void PagingStyle1::reCacheNumbers() {
|
||||
|
||||
curCacheNumbers.clear();
|
||||
|
||||
int pageSize = getPageSize();
|
||||
|
||||
if (pageSize < 10) {
|
||||
for (int i = 0; i < pageSize; i++) {
|
||||
curCacheNumbers << i + 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool leftEllipsisVisible = false;
|
||||
bool rightEllipsisVisible = false;
|
||||
|
||||
int leftLimitNumber = 1 + 3; //max display 4 number
|
||||
int rightLimitNumber = pageSize - 3;
|
||||
|
||||
//left put 1,2
|
||||
curCacheNumbers << 1 << 2;
|
||||
|
||||
int currentLeftEdge = curSelectNumber - 2; //display 2 number side of left
|
||||
int currentRightEdge = curSelectNumber + 2;
|
||||
|
||||
//number 3 condition
|
||||
if (currentLeftEdge > leftLimitNumber) {
|
||||
curCacheNumbers << -1;
|
||||
leftEllipsisVisible = true;
|
||||
} else {
|
||||
curCacheNumbers << 3;
|
||||
}
|
||||
|
||||
//place 2 number to current selected number side of left and right
|
||||
for (int k = qMax(leftLimitNumber, currentLeftEdge); k <= qMin(rightLimitNumber, currentRightEdge); k++) {
|
||||
curCacheNumbers << k;
|
||||
}
|
||||
|
||||
//number pageSize - 2 condition
|
||||
if (currentRightEdge < rightLimitNumber) {
|
||||
curCacheNumbers << -1;
|
||||
rightEllipsisVisible = true;
|
||||
} else {
|
||||
curCacheNumbers << pageSize - 2;
|
||||
}
|
||||
|
||||
//put pageSize-1, pageSize
|
||||
curCacheNumbers << pageSize - 1;
|
||||
curCacheNumbers << pageSize;
|
||||
|
||||
int minSize = minDisplaySize();
|
||||
Q_ASSERT_X(minSize <= 11, "paging style 1", "paging style 1 min size need <= 11");
|
||||
if (curCacheNumbers.size() < minSize) {
|
||||
int remaining = minSize - curCacheNumbers.size();
|
||||
if (leftEllipsisVisible && !rightEllipsisVisible) {
|
||||
for (int i = 0; i < remaining; i++) {
|
||||
curCacheNumbers.insert(3, curCacheNumbers.at(3) - 1);
|
||||
}
|
||||
} else if (!leftEllipsisVisible && rightEllipsisVisible) {
|
||||
for (int i = 0; i < remaining; i++) {
|
||||
curCacheNumbers.insert(curCacheNumbers.size() - 3, curCacheNumbers.at(curCacheNumbers.size() - 4) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int PagingStyle1::minDisplaySize() const {
|
||||
return 8;
|
||||
}
|
15
pagingstyle1.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef PAGINGSTYLE1_H
|
||||
#define PAGINGSTYLE1_H
|
||||
|
||||
#include "pagingutil.h"
|
||||
|
||||
class PagingStyle1 : public PagingUtil {
|
||||
public:
|
||||
using PagingUtil::PagingUtil;
|
||||
|
||||
void reCacheNumbers() override;
|
||||
|
||||
virtual int minDisplaySize() const;
|
||||
};
|
||||
|
||||
#endif // PAGINGSTYLE1_H
|
66
pagingstyle2.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
#include "pagingstyle2.h"
|
||||
|
||||
void PagingStyle2::reCacheNumbers() {
|
||||
|
||||
curCacheNumbers.clear();
|
||||
|
||||
int pageSize = getPageSize();
|
||||
|
||||
if (pageSize < 8) {
|
||||
for (int i = 0; i < pageSize; i++) {
|
||||
curCacheNumbers << i + 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool leftEllipsisVisible = false;
|
||||
bool rightEllipsisVisible = false;
|
||||
|
||||
int leftLimitNumber = 1 + 2;
|
||||
int rightLimitNumber = pageSize - 2;
|
||||
|
||||
//put 1
|
||||
curCacheNumbers << 1;
|
||||
|
||||
int currentLeftEdge = curSelectNumber - 1; //display 1 number side of left
|
||||
int currentRightEdge = curSelectNumber + 1;
|
||||
|
||||
if (currentLeftEdge > leftLimitNumber) {
|
||||
curCacheNumbers << -1;
|
||||
leftEllipsisVisible = true;
|
||||
} else {
|
||||
curCacheNumbers << 2;
|
||||
}
|
||||
|
||||
for (int k = qMax(leftLimitNumber, currentLeftEdge); k <= qMin(rightLimitNumber, currentRightEdge); k++) {
|
||||
curCacheNumbers << k;
|
||||
}
|
||||
|
||||
if (currentRightEdge < rightLimitNumber) {
|
||||
curCacheNumbers << -1;
|
||||
rightEllipsisVisible = true;
|
||||
} else {
|
||||
curCacheNumbers << pageSize - 1;
|
||||
}
|
||||
|
||||
curCacheNumbers << pageSize;
|
||||
|
||||
int minSize = minDisplaySize();
|
||||
Q_ASSERT_X(minSize <= 7, "paging style 2", "paging style 2 min size need <= 7");
|
||||
if (curCacheNumbers.size() < minSize) {
|
||||
int remaining = minSize - curCacheNumbers.size();
|
||||
if (leftEllipsisVisible && !rightEllipsisVisible) {
|
||||
for (int i = 0; i < remaining; i++) {
|
||||
curCacheNumbers.insert(2, curCacheNumbers.at(2) - 1);
|
||||
}
|
||||
} else if (!leftEllipsisVisible && rightEllipsisVisible) {
|
||||
for (int i = 0; i < remaining; i++) {
|
||||
curCacheNumbers.insert(curCacheNumbers.size() - 2, curCacheNumbers.at(curCacheNumbers.size() - 3) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int PagingStyle2::minDisplaySize() const {
|
||||
return 7;
|
||||
}
|
15
pagingstyle2.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef PAGINGSTYLE2_H
|
||||
#define PAGINGSTYLE2_H
|
||||
|
||||
#include "pagingutil.h"
|
||||
|
||||
class PagingStyle2 : public PagingUtil {
|
||||
public:
|
||||
using PagingUtil::PagingUtil;
|
||||
|
||||
void reCacheNumbers() override;
|
||||
|
||||
virtual int minDisplaySize() const;
|
||||
};
|
||||
|
||||
#endif // PAGINGSTYLE2_H
|
84
pagingutil.cpp
Normal file
@ -0,0 +1,84 @@
|
||||
#include "pagingutil.h"
|
||||
|
||||
PagingUtil::PagingUtil(QObject* parent)
|
||||
: QObject(parent)
|
||||
, totalSize(10)
|
||||
, sizeofPerPage(2)
|
||||
, curSelectNumber(1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PagingUtil::~PagingUtil() {
|
||||
}
|
||||
|
||||
PagingUtil &PagingUtil::operator=(const PagingUtil &other) {
|
||||
this->totalSize = other.totalSize;
|
||||
this->sizeofPerPage = other.sizeofPerPage;
|
||||
this->curSelectNumber = other.curSelectNumber;
|
||||
return *this;
|
||||
}
|
||||
|
||||
int PagingUtil::getTotalSize() const {
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
void PagingUtil::setTotalSize(int size) {
|
||||
totalSize = size;
|
||||
pre2ReCacheNumbers();
|
||||
}
|
||||
|
||||
int PagingUtil::getSizeofPerPage() const {
|
||||
return sizeofPerPage;
|
||||
}
|
||||
|
||||
void PagingUtil::setSizeofPerPage(int size) {
|
||||
Q_ASSERT(size > 0);
|
||||
sizeofPerPage = size;
|
||||
pre2ReCacheNumbers();
|
||||
}
|
||||
|
||||
|
||||
void PagingUtil::numberSelected(int number) {
|
||||
if (number < 1) {
|
||||
return;
|
||||
}
|
||||
if (number > getPageSize()) {
|
||||
return;
|
||||
}
|
||||
|
||||
curSelectNumber = number;
|
||||
pre2ReCacheNumbers();
|
||||
emit numberSelectChanged();
|
||||
}
|
||||
|
||||
bool PagingUtil::isSelectedNumber(int number) const {
|
||||
return curSelectNumber == number;
|
||||
}
|
||||
|
||||
int PagingUtil::getPageSize() const {
|
||||
int pageSize = 1;
|
||||
if (totalSize != 0) {
|
||||
pageSize = (totalSize - 1) / sizeofPerPage + 1;
|
||||
}
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
void PagingUtil::pre2ReCacheNumbers() {
|
||||
int oldNumberSize = curCacheNumbers.size();
|
||||
|
||||
reCacheNumbers();
|
||||
|
||||
if (curCacheNumbers.size() != oldNumberSize) {
|
||||
emit numberArraySizeChanged();
|
||||
}
|
||||
|
||||
emit numbersChanged();
|
||||
|
||||
//check select number when total size changed
|
||||
auto pageSize = getPageSize();
|
||||
if (curSelectNumber > pageSize) {
|
||||
curSelectNumber = pageSize;
|
||||
emit numberSelectChanged();
|
||||
}
|
||||
}
|
58
pagingutil.h
Normal file
@ -0,0 +1,58 @@
|
||||
#ifndef PAGINGUTIL_H
|
||||
#define PAGINGUTIL_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class PagingUtil : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PagingUtil(QObject* parent = nullptr);
|
||||
virtual ~PagingUtil();
|
||||
|
||||
PagingUtil& operator=(const PagingUtil& other);
|
||||
|
||||
int getTotalSize() const;
|
||||
void setTotalSize(int size);
|
||||
|
||||
int getSizeofPerPage() const;
|
||||
void setSizeofPerPage(int size);
|
||||
|
||||
void numberSelected(int number);
|
||||
|
||||
virtual void reCacheNumbers() = 0;
|
||||
|
||||
bool isSelectedNumber(int number) const;
|
||||
|
||||
const QList<int>& getCurCacheNumbers() const {
|
||||
return curCacheNumbers;
|
||||
}
|
||||
|
||||
int getCurrentSelectedNumber() const {
|
||||
return curSelectNumber;
|
||||
}
|
||||
|
||||
int getPageSize() const;
|
||||
|
||||
signals:
|
||||
void numberArraySizeChanged();
|
||||
void numbersChanged();
|
||||
void numberSelectChanged();
|
||||
|
||||
protected:
|
||||
//total data size
|
||||
int totalSize;
|
||||
//max number of pages to display
|
||||
int sizeofPerPage;
|
||||
//current selected number value
|
||||
int curSelectNumber;
|
||||
|
||||
//current display numbers
|
||||
QList<int> curCacheNumbers;
|
||||
|
||||
private:
|
||||
void pre2ReCacheNumbers();
|
||||
|
||||
friend class Pagination;
|
||||
};
|
||||
#endif // PAGINGUTIL_H
|
BIN
res/png/arrowLeft.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
res/png/arrowRight.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
res/png/branch-close.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
res/png/branch-end.png
Normal file
After Width: | Height: | Size: 750 B |
BIN
res/png/branch-more.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
res/png/checked.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
res/png/vline.png
Normal file
After Width: | Height: | Size: 273 B |
BIN
res/svg/branch-closed.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
res/svg/branch-end.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
res/svg/branch-more.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
res/svg/branch-open.png
Normal file
After Width: | Height: | Size: 390 B |
3
res/svg/closed.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="37" height="22" viewBox="0 0 37 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 1C1 21 1 21 36 21" stroke="#DCD174" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 217 B |
3
res/svg/open.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="2" height="292" viewBox="0 0 2 292" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="2" height="292" rx="1" fill="#DCD174"/>
|
||||
</svg>
|
After Width: | Height: | Size: 156 B |
15
res/svg/settings.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_4_112)">
|
||||
<mask id="mask0_4_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="32" height="32">
|
||||
<path d="M0 0H32V32H0V0Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_4_112)">
|
||||
<path d="M14.591 31.985H17.409C18.205 31.985 18.787 31.51 18.955 30.73L19.751 27.363C20.326 27.1746 20.8885 26.9498 21.435 26.69L24.39 28.495C25.049 28.909 25.799 28.847 26.35 28.297L28.325 26.337C28.877 25.787 28.953 24.991 28.509 24.333L26.702 21.41C26.962 20.874 27.192 20.323 27.361 19.772L30.76 18.962C31.54 18.792 32 18.212 32 17.416V14.646C32 13.866 31.54 13.284 30.76 13.116L27.391 12.304C27.2048 11.7355 26.9851 11.1785 26.733 10.636L28.54 7.667C28.968 7.009 28.923 6.259 28.356 5.708L26.35 3.734C25.784 3.214 25.11 3.122 24.436 3.504L21.436 5.356C20.8963 5.07632 20.3323 4.84605 19.751 4.668L18.955 1.255C18.787 0.475 18.205 0 17.409 0H14.59C13.794 0 13.212 0.474 13.029 1.255L12.233 4.637C11.635 4.836 11.053 5.066 10.533 5.341L7.56302 3.505C6.88902 3.122 6.20002 3.198 5.63302 3.735L3.64302 5.708C3.07702 6.259 3.01502 7.009 3.45902 7.668L5.25102 10.636C5.05102 11.111 4.80702 11.676 4.60802 12.304L1.23902 13.115C0.459023 13.284 -0.000976562 13.865 -0.000976562 14.645V17.415C-0.000976562 18.211 0.459023 18.793 1.23902 18.961L4.63902 19.772C4.80702 20.323 5.03602 20.874 5.28102 21.41L3.49002 24.333C3.03002 24.991 3.12202 25.787 3.67402 26.338L5.63402 28.297C6.18402 28.847 6.95002 28.909 7.60902 28.495L10.549 26.69C11.069 26.934 11.635 27.164 12.232 27.363L13.029 30.73C13.212 31.51 13.795 31.985 14.591 31.985ZM16 21.395C13.03 21.395 10.595 18.946 10.595 15.977C10.595 13.023 13.03 10.59 16 10.59C18.97 10.59 21.405 13.024 21.405 15.977C21.405 18.946 18.97 21.395 16 21.395Z" fill="#13385F"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_4_112">
|
||||
<rect width="32" height="32" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
BIN
res/svg/vline.png
Normal file
After Width: | Height: | Size: 139 B |
@ -2,5 +2,15 @@
|
||||
<qresource prefix="/visual">
|
||||
<file>res/svg/fema-wing.svg</file>
|
||||
<file>res/svg/chevron-down.png</file>
|
||||
<file>res/svg/settings.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/png">
|
||||
<file>res/png/branch-close.png</file>
|
||||
<file>res/png/branch-end.png</file>
|
||||
<file>res/png/branch-more.png</file>
|
||||
<file>res/png/checked.png</file>
|
||||
<file>res/png/vline.png</file>
|
||||
<file>res/png/arrowLeft.png</file>
|
||||
<file>res/png/arrowRight.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
76
savesensorservice.h
Normal file
@ -0,0 +1,76 @@
|
||||
#ifndef SAVESENSORSERVICE_H
|
||||
#define SAVESENSORSERVICE_H
|
||||
|
||||
#include "utils.h"
|
||||
#include "getsensors_r.h"
|
||||
#include "sensorlogs.h"
|
||||
#include "httpclient.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
|
||||
class SaveSensorService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SaveSensorService(HttpClient* client, QObject *parent = nullptr)
|
||||
: QObject(parent), httpClient(client) {}
|
||||
|
||||
bool saveSensorLog(const Sensor &sensor, const SensorLogs &newSensorLogs) {
|
||||
QJsonObject responseSettingsJson = httpClient->get(utils::API_URL + "/settings/deviceSettings");
|
||||
|
||||
QJsonObject sensors = responseSettingsJson["SENSORS"].toObject();
|
||||
|
||||
if (!sensors.contains(sensor.group)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QJsonObject groupData = sensors[sensor.group].toObject();
|
||||
|
||||
if (!groupData.contains(sensor.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QJsonObject sensorData = groupData[sensor.id].toObject();
|
||||
|
||||
sensorData["LOG_ERROR"] = newSensorLogs.getLogError();
|
||||
sensorData["LOG_MANUAL"] = newSensorLogs.getLogManual();
|
||||
sensorData["ALARM_SLIPPAGE"] = newSensorLogs.getAlarmSleepage();
|
||||
sensorData["LOG_HUGE_ERROR"] = newSensorLogs.getLogHugeError();
|
||||
sensorData["NAME"] = sensor.name;
|
||||
|
||||
QJsonObject extraObject;
|
||||
extraObject["isBool"] = sensor.isBooled;
|
||||
extraObject["isHide"] = sensor.isHide;
|
||||
QString extraString = QString(QJsonDocument(extraObject).toJson(QJsonDocument::Compact));
|
||||
sensorData["EXTRA"] = extraString;
|
||||
|
||||
sensorData["UNIT_NAME"] = sensor.unitName;
|
||||
sensorData["IS_ALARM_ENABLED"] = sensor.isAlarmEnabled;
|
||||
sensorData["ALARM_UPPERBOUND"] = sensor.alarmUpperBound;
|
||||
sensorData["ALARM_LOWERBOUND"] = sensor.alarmLowerBound;
|
||||
sensorData["ALARM_COOLDOWN"] = sensor.alarmCooldown;
|
||||
|
||||
groupData[sensor.id] = sensorData;
|
||||
sensors[sensor.group] = groupData;
|
||||
|
||||
responseSettingsJson["SENSORS"] = sensors;
|
||||
|
||||
QJsonObject putResponse = httpClient->post(utils::API_URL + "/settings/deviceSettings", responseSettingsJson);
|
||||
|
||||
return putResponse["message"] == "OK";
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
HttpClient* httpClient;
|
||||
};
|
||||
|
||||
#endif // SAVESENSORSERVICE_H
|
147
sensordialog.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
#include "sensordialog.h"
|
||||
#include "ui_sensordialog.h"
|
||||
|
||||
#include "sensorlogervice.h"
|
||||
#include "savesensorservice.h"
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
SensorDialog::SensorDialog(QWidget *parent, SensorWidget *sensor, HttpClient *httpClient)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::SensorDialog)
|
||||
, sensorWidget(sensor)
|
||||
, _httpClient(httpClient)
|
||||
{
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->isAlarm->addItems({"Да", "Нет"});
|
||||
ui->isAlarm->setCurrentText(sensorWidget->getSensor().isAlarmEnabled ? "Да" : "Нет");
|
||||
ui->isBooled->addItems({"Да", "Нет"});
|
||||
ui->isBooled->setCurrentText(sensorWidget->getSensor().isBooled ? "Да" : "Нет");
|
||||
ui->isVisible->addItems({"Да", "Нет"});
|
||||
ui->isVisible->setCurrentText(sensorWidget->getSensor().isHide ? "Да" : "Нет");
|
||||
|
||||
ui->saveButton->setCursor(Qt::PointingHandCursor);
|
||||
ui->cancelButton->setCursor(Qt::PointingHandCursor);
|
||||
|
||||
|
||||
|
||||
ui->nameHeader->setText(sensorWidget->getSensor().id);
|
||||
ui->name->setText(sensorWidget->getSensor().name);
|
||||
ui->unitName->setText(sensorWidget->getSensor().unitName);
|
||||
ui->alarmLow->setText(QString::number(sensorWidget->getSensor().alarmLowerBound));
|
||||
ui->alarmUp->setText(QString::number(sensorWidget->getSensor().alarmUpperBound));
|
||||
ui->alarmCooldown->setText(QString::number(sensorWidget->getSensor().alarmCooldown));
|
||||
|
||||
SensorLogService *sensorLogService = new SensorLogService(httpClient);
|
||||
sensorLogs = sensorLogService->getSensorLog(sensorWidget->getSensor().id);
|
||||
|
||||
sensorC = sensorWidget->getSensor();
|
||||
sensorLogsC = sensorLogs;
|
||||
|
||||
ui->logError->setText(sensorLogs.getLogError());
|
||||
ui->logManual->setText(sensorLogs.getLogManual());
|
||||
ui->alarmSleepage->setText(QString::number(sensorLogs.getAlarmSleepage()));
|
||||
ui->logHugeError->setText(sensorLogs.getLogHugeError());
|
||||
|
||||
|
||||
connect(ui->cancelButton, &QPushButton::clicked, this, [this]() {
|
||||
isSavingSuccess = false;
|
||||
close();
|
||||
});
|
||||
connect(ui->saveButton, &QPushButton::clicked, this, &SensorDialog::onSaveButtonClicked);
|
||||
connect(ui->isAlarm, &QComboBox::currentTextChanged, this, &SensorDialog::onIsAlarmChanged);
|
||||
connect(ui->isBooled, &QComboBox::currentTextChanged, this, &SensorDialog::onIsBooledChanged);
|
||||
connect(ui->isVisible, &QComboBox::currentTextChanged, this, &SensorDialog::onIsVisibleChanged);
|
||||
connect(ui->name, &QLineEdit::textChanged, this, &SensorDialog::onNameChanged);
|
||||
connect(ui->unitName, &QLineEdit::textChanged, this, &SensorDialog::onUnitNameChanged);
|
||||
connect(ui->alarmLow, &QLineEdit::textChanged, this, &SensorDialog::onAlarmLowChanged);
|
||||
connect(ui->alarmUp, &QLineEdit::textChanged, this, &SensorDialog::onAlarmUpChanged);
|
||||
connect(ui->alarmCooldown, &QLineEdit::textChanged, this, &SensorDialog::onAlarmCooldownChanged);
|
||||
connect(ui->logError, &QTextEdit::textChanged, this, &SensorDialog::onLogErrorChanged);
|
||||
connect(ui->logManual, &QTextEdit::textChanged, this, &SensorDialog::onLogManualChanged);
|
||||
connect(ui->alarmSleepage, &QLineEdit::textChanged, this, &SensorDialog::onAlarmSleepageChanged);
|
||||
connect(ui->logHugeError, &QTextEdit::textChanged, this, &SensorDialog::onLogHugeErrorChanged);
|
||||
}
|
||||
|
||||
void SensorDialog::onIsAlarmChanged(const QString& value) {
|
||||
sensorC.isAlarmEnabled = (value == "Да");
|
||||
}
|
||||
|
||||
void SensorDialog::onIsBooledChanged(const QString& value) {
|
||||
sensorC.isBooled = (value == "Да");
|
||||
}
|
||||
|
||||
void SensorDialog::onIsVisibleChanged(const QString& value) {
|
||||
sensorC.isHide = (value == "Да");
|
||||
}
|
||||
|
||||
void SensorDialog::onNameChanged(const QString& value) {
|
||||
sensorC.name = value;
|
||||
}
|
||||
|
||||
void SensorDialog::onUnitNameChanged(const QString& value) {
|
||||
sensorC.unitName = value;
|
||||
}
|
||||
|
||||
void SensorDialog::onAlarmLowChanged(const QString& value) {
|
||||
sensorC.alarmLowerBound = value.toDouble();
|
||||
}
|
||||
|
||||
void SensorDialog::onAlarmUpChanged(const QString& value) {
|
||||
sensorC.alarmUpperBound = value.toDouble();
|
||||
}
|
||||
|
||||
void SensorDialog::onAlarmCooldownChanged(const QString& value) {
|
||||
sensorC.alarmCooldown = value.toDouble();
|
||||
}
|
||||
|
||||
void SensorDialog::onLogErrorChanged() {
|
||||
sensorLogsC.setLogError(ui->logError->toPlainText());
|
||||
}
|
||||
|
||||
void SensorDialog::onLogManualChanged() {
|
||||
sensorLogsC.setLogManual(ui->logManual->toPlainText());
|
||||
}
|
||||
|
||||
void SensorDialog::onAlarmSleepageChanged(const QString& value) {
|
||||
sensorLogsC.setAlarmSleepage(value.toInt());
|
||||
}
|
||||
|
||||
void SensorDialog::onLogHugeErrorChanged() {
|
||||
sensorLogsC.setLogHugeError(ui->logHugeError->toPlainText());
|
||||
}
|
||||
|
||||
void SensorDialog::onSaveButtonClicked()
|
||||
{
|
||||
sensorWidget->setSensor(sensorC);
|
||||
SaveSensorService *saveSensorService = new SaveSensorService(_httpClient);
|
||||
|
||||
if (saveSensorService->saveSensorLog(sensorC, sensorLogsC)) {
|
||||
isSavingSuccess = true;
|
||||
emit resultReady(SaveSuccess);
|
||||
accept();
|
||||
} else {
|
||||
isSavingSuccess = false;
|
||||
emit resultReady(SaveError);
|
||||
reject();
|
||||
}
|
||||
}
|
||||
|
||||
void SensorDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (!isSavingSuccess) {
|
||||
emit resultReady(NoSave);
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
SensorDialog::~SensorDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
61
sensordialog.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef SENSORDIALOG_H
|
||||
#define SENSORDIALOG_H
|
||||
|
||||
#include "sensorwidget.h"
|
||||
#include "httpclient.h"
|
||||
#include "sensorlogs.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class SensorDialog;
|
||||
}
|
||||
|
||||
class SensorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SensorDialog(QWidget *parent = nullptr, SensorWidget *sensor = nullptr, HttpClient *httpClient = nullptr);
|
||||
~SensorDialog();
|
||||
|
||||
enum DialogResult {
|
||||
NoSave = 0,
|
||||
SaveSuccess,
|
||||
SaveError
|
||||
};
|
||||
|
||||
signals:
|
||||
void resultReady(SensorDialog::DialogResult result);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private:
|
||||
bool isSavingSuccess = false;
|
||||
HttpClient *_httpClient;
|
||||
SensorWidget *sensorWidget;
|
||||
SensorLogs sensorLogs;
|
||||
Sensor sensorC;
|
||||
SensorLogs sensorLogsC;
|
||||
|
||||
private:
|
||||
void onSaveButtonClicked();
|
||||
void onIsAlarmChanged(const QString& value);
|
||||
void onIsBooledChanged(const QString& value);
|
||||
void onIsVisibleChanged(const QString& value);
|
||||
void onNameChanged(const QString& value);
|
||||
void onUnitNameChanged(const QString& value);
|
||||
void onAlarmLowChanged(const QString& value);
|
||||
void onAlarmUpChanged(const QString& value);
|
||||
void onAlarmCooldownChanged(const QString& value);
|
||||
void onLogErrorChanged();
|
||||
void onLogManualChanged();
|
||||
void onAlarmSleepageChanged(const QString& value);
|
||||
void onLogHugeErrorChanged();
|
||||
|
||||
private:
|
||||
Ui::SensorDialog *ui;
|
||||
};
|
||||
|
||||
#endif // SENSORDIALOG_H
|
947
sensordialog.ui
Normal file
@ -0,0 +1,947 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SensorDialog</class>
|
||||
<widget class="QDialog" name="SensorDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>759</width>
|
||||
<height>947</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: white;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
||||
<property name="spacing">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resources.qrc">:/visual/res/svg/settings.svg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="nameHeader">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_17">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Наименование</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="name">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Единица измерения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="unitName">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отображать только Да/Нет вместо значений датчика</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="isBooled">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox::drop-down {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(:/visual/res/svg/chevron-down.png);
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
border: 2px solid #DCD174;
|
||||
background: transparent;
|
||||
color: #13385F;
|
||||
font-family: Inter;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid #DCD174;
|
||||
background: white;
|
||||
selection-color: red;
|
||||
selection-background-color: blue;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item {
|
||||
font-family: Inter;
|
||||
font-size: 50px;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
color: #13385F;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #13385F;
|
||||
selection-color: white;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Имеет ли пороговые значения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="isAlarm">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox::drop-down {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(:/visual/res/svg/chevron-down.png);
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
border: 2px solid #DCD174;
|
||||
background: transparent;
|
||||
color: #13385F;
|
||||
font-family: Inter;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid #DCD174;
|
||||
background: white;
|
||||
selection-color: red;
|
||||
selection-background-color: blue;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item {
|
||||
font-family: Inter;
|
||||
font-size: 50px;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
color: #13385F;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #13385F;
|
||||
selection-color: white;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Пороговое значение (минимум)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="alarmLow">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Пороговое значение (максимум)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="alarmUp">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Длительность, секунд</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="alarmCooldown">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Лог ошибки</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="logError">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>707</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Лог инструкции</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="logManual">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>707</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Время повтора, секунд</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="alarmSleepage">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Лог повторяющейся ошибки</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="logHugeError">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>707</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border: 2px solid #DCD174;
|
||||
font-family: Inter;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 31.47px;
|
||||
text-align: left;
|
||||
background: #00000000;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 26.63px;
|
||||
text-align: left;
|
||||
color: #FF453A;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Скрыть датчик?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="isVisible">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox::drop-down {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(:/visual/res/svg/chevron-down.png);
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
border: 2px solid #DCD174;
|
||||
background: transparent;
|
||||
color: #13385F;
|
||||
font-family: Inter;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid #DCD174;
|
||||
background: white;
|
||||
selection-color: red;
|
||||
selection-background-color: blue;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item {
|
||||
font-family: Inter;
|
||||
font-size: 50px;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
color: #13385F;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #13385F;
|
||||
selection-color: white;
|
||||
outline: 0px;;
|
||||
}
|
||||
|
||||
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
border-style: outset;
|
||||
border-radius: 5px;
|
||||
border-color: #13385F;
|
||||
border-width: 1px;
|
||||
color: #13385F;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
line-height: 26.63px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #e0f2f7;
|
||||
border-color: #1A4A73;
|
||||
color: #1A4A73;
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
background-color: #102E47;
|
||||
border-color: #102E47;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отмена</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>143</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>143</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
border-style: outset;
|
||||
border-radius: 5px;
|
||||
border-color: #13385F;
|
||||
border-width: 1px;
|
||||
background-color: #13385F;
|
||||
color: white;
|
||||
font-family: Inter;
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
line-height: 26.63px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #1A4A73;
|
||||
border-color: #1A4A73;
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
background-color: #102E47;
|
||||
border-color: #102E47;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Сохранить</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
33
sensorgroups_r.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef SENSORGROUPS_R_H
|
||||
#define SENSORGROUPS_R_H
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QStringList>
|
||||
|
||||
class GetSensorsGroupsR {
|
||||
public:
|
||||
GetSensorsGroupsR() = default;
|
||||
|
||||
void parseResponse(const QJsonObject& responseObj) {
|
||||
if (responseObj.contains("groups") && responseObj["groups"].isArray()) {
|
||||
QJsonArray groupsArray = responseObj["groups"].toArray();
|
||||
for (const QJsonValue& value : groupsArray) {
|
||||
if (value.isString()) {
|
||||
groups.append(value.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QStringList& getGroups() const {
|
||||
return groups;
|
||||
}
|
||||
|
||||
private:
|
||||
QStringList groups;
|
||||
};
|
||||
|
||||
#endif // SENSORGROUPS_R_H
|
47
sensorlogervice.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef SENSORLOGSSERVICE_H
|
||||
#define SENSORLOGSSERVICE_H
|
||||
|
||||
#include "utils.h"
|
||||
#include "sensorlogs.h"
|
||||
#include "httpclient.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QMessageBox>
|
||||
#include <QJsonArray>
|
||||
|
||||
class SensorLogService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SensorLogService(HttpClient *client, QObject *parent = nullptr)
|
||||
: QObject(parent), httpClient(client) {}
|
||||
|
||||
SensorLogs getSensorLog(const QString &targetSensorId) {
|
||||
QJsonObject responseSettingsJson = httpClient->get(utils::API_URL + "/settings/deviceSettings");
|
||||
|
||||
QJsonObject sensors = responseSettingsJson["SENSORS"].toObject();
|
||||
for (const QString &groupKey : sensors.keys()) {
|
||||
QJsonObject groupData = sensors[groupKey].toObject();
|
||||
for (const QString &sensorKey : groupData.keys()) {
|
||||
if (sensorKey == targetSensorId) {
|
||||
QJsonObject sensorData = groupData[sensorKey].toObject();
|
||||
SensorLogs sensorLogs;
|
||||
sensorLogs.SensorLogsParse(sensorData);
|
||||
return sensorLogs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
HttpClient* httpClient;
|
||||
};
|
||||
|
||||
#endif // SENSORLOGSSERVICE_H
|
40
sensorlogs.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef SENSORLOGS_H
|
||||
#define SENSORLOGS_H
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
|
||||
class SensorLogs
|
||||
{
|
||||
public:
|
||||
SensorLogs() = default;
|
||||
SensorLogs(const QString &logError, const QString &logManual, const QString &logHugeError)
|
||||
: logError(logError), logManual(logManual), logHugeError(logHugeError) {}
|
||||
|
||||
QString getLogError() const { return logError; }
|
||||
void setLogError(const QString &value) { logError = value; }
|
||||
|
||||
QString getLogManual() const { return logManual; }
|
||||
void setLogManual(const QString &value) { logManual = value; }
|
||||
|
||||
QString getLogHugeError() const { return logHugeError; }
|
||||
void setLogHugeError(const QString &value) { logHugeError = value; }
|
||||
|
||||
int getAlarmSleepage() const { return AlarmSleepage; }
|
||||
void setAlarmSleepage(const int &value) { AlarmSleepage = value; }
|
||||
|
||||
void SensorLogsParse(QJsonObject &sensorData) {
|
||||
logError = sensorData["LOG_ERROR"].toString();
|
||||
logManual = sensorData["LOG_MANUAL"].toString();
|
||||
logHugeError = sensorData["LOG_HUGE_ERROR"].toString();
|
||||
AlarmSleepage = sensorData["ALARM_SLIPPAGE"].toInt();
|
||||
}
|
||||
|
||||
private:
|
||||
int AlarmSleepage;
|
||||
QString logError;
|
||||
QString logManual;
|
||||
QString logHugeError;
|
||||
};
|
||||
|
||||
#endif // SENSORLOGS_H
|
52
sensorservice.h
Normal file
@ -0,0 +1,52 @@
|
||||
#ifndef SENSORSERVICE_H
|
||||
#define SENSORSERVICE_H
|
||||
|
||||
#include "utils.h"
|
||||
#include "HttpClient.h"
|
||||
#include "getsensors_r.h"
|
||||
#include "getsensors_p.h"
|
||||
#include "SensorGroups_r.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QList>
|
||||
#include <QStringList>
|
||||
|
||||
class SensorService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SensorService(HttpClient* client, QObject *parent = nullptr)
|
||||
: QObject(parent), httpClient(client) {}
|
||||
|
||||
QList<Sensor> getSensors(const QString& group) {
|
||||
GetSensorsP requestParams;
|
||||
requestParams.setGroup(group);
|
||||
QByteArray requestData = requestParams.createRequestJson();
|
||||
|
||||
QJsonObject responseJson = httpClient->post(utils::API_URL + "/data/getDeviceSensors", QJsonDocument::fromJson(requestData).object());
|
||||
|
||||
GetSensorsR response;
|
||||
response.parseResponse(responseJson);
|
||||
|
||||
return response.getSensors();
|
||||
}
|
||||
|
||||
QStringList getSensorGroups() {
|
||||
QJsonObject emptyJson;
|
||||
QJsonObject responseJson = httpClient->post(utils::API_URL + "/data/getDeviceSensorGroups");
|
||||
|
||||
GetSensorsGroupsR response;
|
||||
response.parseResponse(responseJson);
|
||||
|
||||
return response.getGroups();
|
||||
}
|
||||
|
||||
private:
|
||||
HttpClient* httpClient;
|
||||
};
|
||||
|
||||
#endif // SENSORSERVICE_H
|
108
sensorwidget.cpp
@ -1,74 +1,51 @@
|
||||
#include "sensorwidget.h"
|
||||
#include <QSpacerItem>
|
||||
#include <QMouseEvent>
|
||||
|
||||
SensorWidget::SensorWidget(QWidget *parent,
|
||||
const QString &title,
|
||||
const QString &value,
|
||||
const QString &incident)
|
||||
: QFrame(parent)
|
||||
, titleLabel(new QLabel(this))
|
||||
, valueLabel(new QLabel(this))
|
||||
, incidentLabel(new QLabel(this))
|
||||
, layout(new QVBoxLayout(this))
|
||||
SensorWidget::SensorWidget(QWidget *parent, const Sensor &sensor)
|
||||
: QFrame(parent), sensor(sensor),
|
||||
titleLabel(new QLabel(this)), valueLabel(new QLabel(this)), incidentLabel(new QLabel(this)),
|
||||
layout(new QVBoxLayout(this))
|
||||
{
|
||||
setFrameStyle(QFrame::Box);
|
||||
setLineWidth(1);
|
||||
setStyleSheet("QFrame { border: 2px solid rgba(229, 231, 235, 0.70);; border-radius: 10px; "
|
||||
"background: rgba(255, 255, 255, 0.70)}");
|
||||
|
||||
setFixedSize(250, 200);
|
||||
|
||||
layout->addWidget(titleLabel);
|
||||
|
||||
layout->addSpacerItem(new QSpacerItem(1, 55, QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||
|
||||
layout->addWidget(valueLabel);
|
||||
layout->addWidget(incidentLabel);
|
||||
|
||||
// Стиль для нормального состояния
|
||||
titleLabel->setStyleSheet("font-family: Inter;"
|
||||
"font-size: 24px;"
|
||||
"font-weight: 400;"
|
||||
"line-height: 29.05px;"
|
||||
"text-align: left;"
|
||||
"color: #13385F;"
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
valueLabel->setStyleSheet("font-family: Inter;"
|
||||
"font-size: 24px;"
|
||||
"font-weight: 400;"
|
||||
"line-height: 29.05px;"
|
||||
"text-align: left;"
|
||||
"color: #13385F;"
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
incidentLabel->setStyleSheet("font-family: Inter;"
|
||||
"font-size: 24px;"
|
||||
"font-weight: 400;"
|
||||
"line-height: 29.05px;"
|
||||
"text-align: left;"
|
||||
"color: rgba(19, 56, 95, 0.5);"
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
setErrorState();
|
||||
|
||||
titleLabel->setText(title);
|
||||
valueLabel->setText(value);
|
||||
incidentLabel->setText(incident);
|
||||
QString titleText = sensor.name;
|
||||
if (titleText.length() > 40) {
|
||||
titleText = titleText.left(37) + "...";
|
||||
}
|
||||
titleLabel->setText(titleText);
|
||||
|
||||
layout->setContentsMargins(10, 10, 10, 10); // Внутренние отступы
|
||||
layout->setSpacing(5); // Отступы между текстами (кроме спейсеров)
|
||||
titleLabel->setWordWrap(true);
|
||||
titleLabel->setMinimumHeight(100);
|
||||
titleLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
||||
|
||||
if(sensor.isBooled) {
|
||||
valueLabel->setText(sensor.lastValue != 0 ? "Да" : "Нет");
|
||||
} else {
|
||||
valueLabel->setText(QString::number(sensor.lastValue) + ' ' + sensor.unitName);
|
||||
incidentLabel->setText(QString::number(sensor.alarmLowerBound) + "-" + QString::number(sensor.alarmUpperBound));
|
||||
}
|
||||
layout->setContentsMargins(10, 10, 10, 10);
|
||||
layout->setSpacing(5);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void SensorWidget::setErrorState(bool hasError,
|
||||
const QString &title,
|
||||
const QString &value,
|
||||
const QString &incident)
|
||||
void SensorWidget::mousePressEvent(QMouseEvent *event) {
|
||||
emit clicked(this); // Генерация сигнала о клике
|
||||
QFrame::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void SensorWidget::setErrorState()
|
||||
{
|
||||
// Включение ошибки
|
||||
if (hasError) {
|
||||
// Изменение текста и стиля для отображения ошибки
|
||||
if (sensor.isAlarmEnabled) {
|
||||
setStyleSheet("QFrame { border: 2px solid #FF453A; border-radius: 10px; background: "
|
||||
"rgba(255, 69, 58, 0.25);}");
|
||||
|
||||
@ -99,9 +76,8 @@ void SensorWidget::setErrorState(bool hasError,
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
} else {
|
||||
// Восстановление нормального состояния
|
||||
setStyleSheet("QFrame { border: 2px solid rgba(229, 231, 235, 0.70);; border-radius: 10px; "
|
||||
"background: transparent}");
|
||||
"background: rgba(255, 255, 255, 0.70)}");
|
||||
|
||||
titleLabel->setStyleSheet("font-family: Inter;"
|
||||
"font-size: 24px;"
|
||||
@ -130,8 +106,24 @@ void SensorWidget::setErrorState(bool hasError,
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
}
|
||||
|
||||
titleLabel->setText(title);
|
||||
valueLabel->setText(value);
|
||||
incidentLabel->setText(incident);
|
||||
}
|
||||
|
||||
Sensor SensorWidget::getSensor() const {
|
||||
return sensor;
|
||||
}
|
||||
|
||||
void SensorWidget::setSensor(const Sensor value) {
|
||||
sensor = value;
|
||||
QString titleText = sensor.name;
|
||||
if (titleText.length() > 40) {
|
||||
titleText = titleText.left(37) + "...";
|
||||
}
|
||||
titleLabel->setText(titleText);
|
||||
if(sensor.isBooled) {
|
||||
valueLabel->setText(sensor.lastValue != 0 ? "Да" : "Нет");
|
||||
} else {
|
||||
valueLabel->setText(QString::number(sensor.lastValue) + ' ' + sensor.unitName);
|
||||
incidentLabel->setText(QString::number(sensor.alarmLowerBound) + "-" + QString::number(sensor.alarmUpperBound));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef SENSORWIDGET_H
|
||||
#define SENSORWIDGET_H
|
||||
|
||||
#include "getsensors_r.h"
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
@ -10,19 +11,22 @@ class SensorWidget : public QFrame
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//Конструктор
|
||||
explicit SensorWidget(QWidget *parent = nullptr,
|
||||
const QString &title = "Default sensor",
|
||||
const QString &value = "1.01 #",
|
||||
const QString &incident = "Default incident");
|
||||
const Sensor &sensor = Sensor());
|
||||
|
||||
// Метод для изменения внешнего вида при ошибке
|
||||
void setErrorState(bool hasError,
|
||||
const QString &title = "Default error",
|
||||
const QString &value = "Default error",
|
||||
const QString &incident = "123 - 123");
|
||||
void setErrorState();
|
||||
|
||||
Sensor getSensor() const;
|
||||
void setSensor(const Sensor value);
|
||||
|
||||
signals:
|
||||
void clicked(SensorWidget *sensor);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
Sensor sensor;
|
||||
QLabel *titleLabel;
|
||||
QLabel *valueLabel;
|
||||
QLabel *incidentLabel;
|
||||
|
5
utils.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "utils.h"
|
||||
|
||||
namespace utils {
|
||||
QString API_URL = "http://localhost:8080"; // Определение переменной
|
||||
}
|