need to add api blocks
This commit is contained in:
parent
fe614284de
commit
63f805a8cd
@ -27,7 +27,9 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
MANUAL_FINALIZATION
|
||||
${PROJECT_SOURCES}
|
||||
resources.qrc
|
||||
form.ui
|
||||
sensorwidget.h sensorwidget.cpp
|
||||
sensorlayout.h sensorlayout.cpp
|
||||
|
||||
)
|
||||
# Define target properties for Android with Qt 6 as:
|
||||
# set_property(TARGET FemaSoftware APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 14.0.1, 2024-11-25T00:13:49. -->
|
||||
<!-- Written by QtCreator 14.0.1, 2024-11-26T22:55:27. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@ -102,14 +102,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_BUILD_TYPE:STRING=Debug
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_5_3_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -159,14 +159,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_BUILD_TYPE:STRING=Release
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_5_3_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -213,14 +213,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_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_5_3_MinGW_64_bit-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -267,14 +267,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_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_5_3_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -322,14 +322,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_BUILD_TYPE:STRING=MinSizeRel
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_5_3_MinGW_64_bit-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -422,14 +422,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_BUILD_TYPE:STRING=Debug
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_8_0_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -477,14 +477,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_BUILD_TYPE:STRING=Release
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_8_0_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -531,14 +531,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_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_8_0_MinGW_64_bit-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
@ -585,14 +585,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_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_8_0_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@ -640,14 +640,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_BUILD_TYPE:STRING=MinSizeRel
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake</value>
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\Projects\QTProjects\FemaSoftware\build\Desktop_Qt_6_8_0_MinGW_64_bit-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
|
Binary file not shown.
@ -14,11 +14,12 @@
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QGridLayout>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QSpacerItem>
|
||||
#include <QtWidgets/QStatusBar>
|
||||
#include <QtWidgets/QTabWidget>
|
||||
#include <QtWidgets/QTextEdit>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
@ -31,23 +32,19 @@ public:
|
||||
QGridLayout *gridLayout_4;
|
||||
QTabWidget *tabWidget;
|
||||
QWidget *sensorsTab;
|
||||
QVBoxLayout *verticalLayout;
|
||||
QVBoxLayout *verticalLayout_2;
|
||||
QSpacerItem *verticalSpacer;
|
||||
QHBoxLayout *horizontalLayout_2;
|
||||
QVBoxLayout *SensorsTabLayout;
|
||||
QHBoxLayout *nameLayout;
|
||||
QLabel *group;
|
||||
QLabel *showHidden;
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QComboBox *comboBox;
|
||||
QHBoxLayout *selectLayout;
|
||||
QComboBox *showHiddenSelect;
|
||||
QComboBox *groupSelect;
|
||||
QSpacerItem *horizontalSpacer_2;
|
||||
QComboBox *comboBox_2;
|
||||
QHBoxLayout *searchLayout;
|
||||
QLineEdit *search;
|
||||
QSpacerItem *horizontalSpacer_3;
|
||||
QSpacerItem *verticalSpacer_4;
|
||||
QHBoxLayout *horizontalLayout_3;
|
||||
QSpacerItem *horizontalSpacer_5;
|
||||
QTextEdit *textEdit;
|
||||
QSpacerItem *horizontalSpacer_4;
|
||||
QSpacerItem *verticalSpacer_2;
|
||||
QHBoxLayout *horizontalLayout;
|
||||
QSpacerItem *verticalSpacer_3;
|
||||
QVBoxLayout *sensorsLayout;
|
||||
QWidget *incidentsTab;
|
||||
QGridLayout *gridLayout_8;
|
||||
QWidget *journalTab;
|
||||
@ -62,7 +59,7 @@ public:
|
||||
{
|
||||
if (MainWindow->objectName().isEmpty())
|
||||
MainWindow->setObjectName("MainWindow");
|
||||
MainWindow->resize(1405, 867);
|
||||
MainWindow->resize(1632, 896);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
@ -71,13 +68,15 @@ public:
|
||||
MainWindow->setMinimumSize(QSize(1150, 750));
|
||||
MainWindow->setMaximumSize(QSize(16777215, 16777215));
|
||||
MainWindow->setBaseSize(QSize(0, 0));
|
||||
MainWindow->setStyleSheet(QString::fromUtf8(" margin: 0; \n"
|
||||
" padding: 0;"));
|
||||
MainWindow->setStyleSheet(QString::fromUtf8(""));
|
||||
MainWindow->setTabShape(QTabWidget::TabShape::Rounded);
|
||||
centralwidget = new QWidget(MainWindow);
|
||||
centralwidget->setObjectName("centralwidget");
|
||||
centralwidget->setAutoFillBackground(false);
|
||||
centralwidget->setStyleSheet(QString::fromUtf8("background: #dcd174;"));
|
||||
centralwidget->setStyleSheet(QString::fromUtf8("QWidget{\n"
|
||||
"background: #dcd174;\n"
|
||||
"}\n"
|
||||
""));
|
||||
gridLayout_4 = new QGridLayout(centralwidget);
|
||||
gridLayout_4->setSpacing(0);
|
||||
gridLayout_4->setObjectName("gridLayout_4");
|
||||
@ -90,7 +89,6 @@ public:
|
||||
" background: #dcd174;\n"
|
||||
" width: 222px;\n"
|
||||
" height: 44px;\n"
|
||||
" gap: 0px;\n"
|
||||
" opacity: 0px;\n"
|
||||
" border: 1px solid #dcd174; \n"
|
||||
" padding: 18px 0px;\n"
|
||||
@ -101,8 +99,6 @@ public:
|
||||
" font-weight: 500;\n"
|
||||
" line-height: 43.57px;\n"
|
||||
" text-align: left;\n"
|
||||
" text-underline-position: from-font;\n"
|
||||
" text-decoration-skip-ink: none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QTabBar::tab:selected {\n"
|
||||
@ -111,8 +107,6 @@ public:
|
||||
" font-weight: 900;\n"
|
||||
" line-height: 43.57px;\n"
|
||||
" text-align: left;\n"
|
||||
" text-underline-position: from-font;\n"
|
||||
" text-decoration-skip-ink: none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QTabBar::pane { \n"
|
||||
@ -131,96 +125,153 @@ public:
|
||||
" background-color: #ffffff; \n"
|
||||
" image-position: bottom right;\n"
|
||||
"}"));
|
||||
verticalLayout = new QVBoxLayout(sensorsTab);
|
||||
verticalLayout->setObjectName("verticalLayout");
|
||||
verticalLayout_2 = new QVBoxLayout();
|
||||
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||
verticalSpacer = new QSpacerItem(20, 25, QSizePolicy::Policy::Fixed, QSizePolicy::Minimum);
|
||||
|
||||
verticalLayout_2->addItem(verticalSpacer);
|
||||
|
||||
horizontalLayout_2 = new QHBoxLayout();
|
||||
horizontalLayout_2->setSpacing(0);
|
||||
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||
horizontalSpacer = new QSpacerItem(15, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_2->addItem(horizontalSpacer);
|
||||
|
||||
comboBox = new QComboBox(sensorsTab);
|
||||
comboBox->setObjectName("comboBox");
|
||||
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 sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
sizePolicy2.setHorizontalStretch(0);
|
||||
sizePolicy2.setVerticalStretch(0);
|
||||
sizePolicy2.setHeightForWidth(comboBox->sizePolicy().hasHeightForWidth());
|
||||
comboBox->setSizePolicy(sizePolicy2);
|
||||
comboBox->setMinimumSize(QSize(488, 60));
|
||||
comboBox->setMaximumSize(QSize(488, 60));
|
||||
sizePolicy2.setHeightForWidth(group->sizePolicy().hasHeightForWidth());
|
||||
group->setSizePolicy(sizePolicy2);
|
||||
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"
|
||||
""));
|
||||
|
||||
horizontalLayout_2->addWidget(comboBox);
|
||||
nameLayout->addWidget(group);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(15, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Minimum);
|
||||
showHidden = new QLabel(sensorsTab);
|
||||
showHidden->setObjectName("showHidden");
|
||||
sizePolicy2.setHeightForWidth(showHidden->sizePolicy().hasHeightForWidth());
|
||||
showHidden->setSizePolicy(sizePolicy2);
|
||||
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"
|
||||
""));
|
||||
|
||||
horizontalLayout_2->addItem(horizontalSpacer_2);
|
||||
nameLayout->addWidget(showHidden);
|
||||
|
||||
comboBox_2 = new QComboBox(sensorsTab);
|
||||
comboBox_2->setObjectName("comboBox_2");
|
||||
comboBox_2->setEnabled(true);
|
||||
sizePolicy2.setHeightForWidth(comboBox_2->sizePolicy().hasHeightForWidth());
|
||||
comboBox_2->setSizePolicy(sizePolicy2);
|
||||
comboBox_2->setMinimumSize(QSize(275, 60));
|
||||
comboBox_2->setMaximumSize(QSize(275, 60));
|
||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_2->addWidget(comboBox_2);
|
||||
nameLayout->addItem(horizontalSpacer);
|
||||
|
||||
|
||||
SensorsTabLayout->addLayout(nameLayout);
|
||||
|
||||
selectLayout = new QHBoxLayout();
|
||||
selectLayout->setSpacing(15);
|
||||
selectLayout->setObjectName("selectLayout");
|
||||
selectLayout->setSizeConstraint(QLayout::SizeConstraint::SetFixedSize);
|
||||
selectLayout->setContentsMargins(25, -1, -1, 10);
|
||||
showHiddenSelect = new QComboBox(sensorsTab);
|
||||
showHiddenSelect->setObjectName("showHiddenSelect");
|
||||
sizePolicy2.setHeightForWidth(showHiddenSelect->sizePolicy().hasHeightForWidth());
|
||||
showHiddenSelect->setSizePolicy(sizePolicy2);
|
||||
showHiddenSelect->setMinimumSize(QSize(488, 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"
|
||||
"}"));
|
||||
|
||||
selectLayout->addWidget(showHiddenSelect);
|
||||
|
||||
groupSelect = new QComboBox(sensorsTab);
|
||||
groupSelect->setObjectName("groupSelect");
|
||||
sizePolicy2.setHeightForWidth(groupSelect->sizePolicy().hasHeightForWidth());
|
||||
groupSelect->setSizePolicy(sizePolicy2);
|
||||
groupSelect->setMinimumSize(QSize(275, 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"
|
||||
"}"));
|
||||
|
||||
selectLayout->addWidget(groupSelect);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::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");
|
||||
sizePolicy2.setHeightForWidth(search->sizePolicy().hasHeightForWidth());
|
||||
search->setSizePolicy(sizePolicy2);
|
||||
search->setMinimumSize(QSize(778, 60));
|
||||
search->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"
|
||||
""));
|
||||
|
||||
searchLayout->addWidget(search);
|
||||
|
||||
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_2->addItem(horizontalSpacer_3);
|
||||
searchLayout->addItem(horizontalSpacer_3);
|
||||
|
||||
|
||||
verticalLayout_2->addLayout(horizontalLayout_2);
|
||||
SensorsTabLayout->addLayout(searchLayout);
|
||||
|
||||
verticalSpacer_4 = new QSpacerItem(20, 15, QSizePolicy::Policy::Fixed, QSizePolicy::Minimum);
|
||||
sensorsLayout = new QVBoxLayout();
|
||||
sensorsLayout->setObjectName("sensorsLayout");
|
||||
sensorsLayout->setContentsMargins(25, -1, -1, -1);
|
||||
|
||||
verticalLayout_2->addItem(verticalSpacer_4);
|
||||
|
||||
horizontalLayout_3 = new QHBoxLayout();
|
||||
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||
horizontalSpacer_5 = new QSpacerItem(15, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_3->addItem(horizontalSpacer_5);
|
||||
|
||||
textEdit = new QTextEdit(sensorsTab);
|
||||
textEdit->setObjectName("textEdit");
|
||||
sizePolicy2.setHeightForWidth(textEdit->sizePolicy().hasHeightForWidth());
|
||||
textEdit->setSizePolicy(sizePolicy2);
|
||||
textEdit->setMinimumSize(QSize(778, 60));
|
||||
textEdit->setMaximumSize(QSize(778, 60));
|
||||
|
||||
horizontalLayout_3->addWidget(textEdit);
|
||||
|
||||
horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_3->addItem(horizontalSpacer_4);
|
||||
|
||||
|
||||
verticalLayout_2->addLayout(horizontalLayout_3);
|
||||
|
||||
|
||||
verticalLayout->addLayout(verticalLayout_2);
|
||||
|
||||
verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
verticalLayout->addItem(verticalSpacer_2);
|
||||
|
||||
horizontalLayout = new QHBoxLayout();
|
||||
horizontalLayout->setSpacing(0);
|
||||
horizontalLayout->setObjectName("horizontalLayout");
|
||||
verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Policy::Maximum, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout->addItem(verticalSpacer_3);
|
||||
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout);
|
||||
SensorsTabLayout->addLayout(sensorsLayout);
|
||||
|
||||
tabWidget->addTab(sensorsTab, QString());
|
||||
incidentsTab = new QWidget();
|
||||
@ -281,7 +332,7 @@ public:
|
||||
|
||||
retranslateUi(MainWindow);
|
||||
|
||||
tabWidget->setCurrentIndex(1);
|
||||
tabWidget->setCurrentIndex(0);
|
||||
|
||||
|
||||
QMetaObject::connectSlotsByName(MainWindow);
|
||||
@ -290,7 +341,9 @@ public:
|
||||
void retranslateUi(QMainWindow *MainWindow)
|
||||
{
|
||||
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "FemaLocal", nullptr));
|
||||
comboBox->setCurrentText(QString());
|
||||
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(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));
|
||||
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(journalTab), QCoreApplication::translate("MainWindow", "\320\226\321\203\321\200\320\275\320\260\320\273", nullptr));
|
||||
|
@ -1,2 +1,3 @@
|
||||
// This file is autogenerated. Changes will be overwritten.
|
||||
#include "EWIEGA46WW/moc_mainwindow.cpp"
|
||||
#include "EWIEGA46WW/moc_sensorwidget.cpp"
|
||||
|
193
form.ui
193
form.ui
@ -1,193 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1537</width>
|
||||
<height>859</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>220</y>
|
||||
<width>778</width>
|
||||
<height>98</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetNoConstraint</enum>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="comboBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>275</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<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;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Ignored</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>15</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<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;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>111</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>111</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-family: Inter;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
line-height: 36.31px;
|
||||
text-align: left;
|
||||
text-underline-position: from-font;
|
||||
text-decoration-skip-ink: none;
|
||||
color: #13385F;
|
||||
background: transparent;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Группа:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>274</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>274</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-family: Inter;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
line-height: 36.31px;
|
||||
text-align: left;
|
||||
text-underline-position: from-font;
|
||||
text-decoration-skip-ink: none;
|
||||
color: #13385F;
|
||||
background: transparent;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Показать скрытые</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,17 +1,51 @@
|
||||
#include "mainwindow.h"
|
||||
#include "./ui_mainwindow.h"
|
||||
#include "sensorwidget.h"
|
||||
#include "sensorlayout.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QResizeEvent>
|
||||
#include <QComboBox>
|
||||
#include <QScrollArea>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
// Создаем QScrollArea для прокрутки
|
||||
QScrollArea* scrollArea = new QScrollArea(this);
|
||||
scrollArea->setStyleSheet("background: transparent; border: 0;");
|
||||
SensorLayout* sl = new SensorLayout(scrollArea);
|
||||
scrollArea->setLayout(sl); // Устанавливаем контейнер
|
||||
scrollArea->setWidgetResizable(true); // Контейнер будет растягиваться по области просмотра
|
||||
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
|
||||
// Добавляем QScrollArea в основной layout
|
||||
ui->SensorsTabLayout->addWidget(scrollArea);
|
||||
|
||||
// Добавляем виджеты в SensorLayout
|
||||
int rows = 0; // Количество строк
|
||||
int columns = 0; // Количество столбцов
|
||||
|
||||
for (int row = 0; row < rows; ++row) {
|
||||
for (int col = 0; col < columns; ++col) {
|
||||
const QString a = QString::number(row);
|
||||
const QString b = QString::number(col);
|
||||
const QString c = QString::number(row + col);
|
||||
SensorWidget* sensor = new SensorWidget(nullptr, a, b, c);
|
||||
sl->addWidget(sensor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
|
464
mainwindow.ui
464
mainwindow.ui
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1405</width>
|
||||
<height>867</height>
|
||||
<width>1632</width>
|
||||
<height>896</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -38,8 +38,7 @@
|
||||
<string>FemaLocal</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"> margin: 0;
|
||||
padding: 0;</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="tabShape">
|
||||
<enum>QTabWidget::TabShape::Rounded</enum>
|
||||
@ -49,7 +48,10 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #dcd174;</string>
|
||||
<string notr="true">QWidget{
|
||||
background: #dcd174;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
@ -83,7 +85,6 @@
|
||||
background: #dcd174;
|
||||
width: 222px;
|
||||
height: 44px;
|
||||
gap: 0px;
|
||||
opacity: 0px;
|
||||
border: 1px solid #dcd174;
|
||||
padding: 18px 0px;
|
||||
@ -94,8 +95,6 @@
|
||||
font-weight: 500;
|
||||
line-height: 43.57px;
|
||||
text-align: left;
|
||||
text-underline-position: from-font;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected {
|
||||
@ -104,8 +103,6 @@ QTabBar::tab:selected {
|
||||
font-weight: 900;
|
||||
line-height: 43.57px;
|
||||
text-align: left;
|
||||
text-underline-position: from-font;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
QTabBar::pane {
|
||||
@ -113,7 +110,7 @@ border-image: url(:/visual/res/svg/fema-wing.svg);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="sensorsTab">
|
||||
<property name="sizePolicy">
|
||||
@ -138,236 +135,273 @@ border-image: url(:/visual/res/svg/fema-wing.svg);
|
||||
<attribute name="title">
|
||||
<string>Датчики</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="SensorsTabLayout">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QHBoxLayout" name="nameLayout">
|
||||
<property name="spacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<widget class="QLabel" name="group">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 488px;
|
||||
height: 36px;
|
||||
background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
line-height: 36.31px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Группа:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="showHidden">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>275</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 275px;
|
||||
height: 36px;
|
||||
background: transparent;
|
||||
font-family: Inter;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
line-height: 36.31px;
|
||||
text-align: left;
|
||||
color: #13385F;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Показать скрытые</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>25</height>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>15</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>15</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>275</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>275</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>15</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>778</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>778</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="selectLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<widget class="QComboBox" name="showHiddenSelect">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Policy::Maximum</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<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;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="groupSelect">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>275</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<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;
|
||||
}</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>20</width>
|
||||
<height>40</height>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="searchLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="search">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>778</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">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;
|
||||
|
||||
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Поиск...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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="QVBoxLayout" name="sensorsLayout">
|
||||
<property name="leftMargin">
|
||||
<number>25</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="incidentsTab">
|
||||
|
75
sensorlayout.cpp
Normal file
75
sensorlayout.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
#include "sensorlayout.h"
|
||||
|
||||
SensorLayout::SensorLayout(QWidget *parent)
|
||||
: QLayout(parent)
|
||||
{
|
||||
}
|
||||
|
||||
SensorLayout::~SensorLayout()
|
||||
{
|
||||
while (!items.isEmpty())
|
||||
delete items.takeFirst();
|
||||
}
|
||||
|
||||
void SensorLayout::addItem(QLayoutItem *item)
|
||||
{
|
||||
items.append(item);
|
||||
}
|
||||
|
||||
QSize SensorLayout::sizeHint() const
|
||||
{
|
||||
return QSize(400, 400); // Базовый размер
|
||||
}
|
||||
|
||||
QSize SensorLayout::minimumSize() const
|
||||
{
|
||||
return QSize(200, 200); // Минимальный размер
|
||||
}
|
||||
|
||||
int SensorLayout::count() const
|
||||
{
|
||||
return items.size();
|
||||
}
|
||||
|
||||
QLayoutItem* SensorLayout::itemAt(int index) const
|
||||
{
|
||||
return items.value(index);
|
||||
}
|
||||
|
||||
QLayoutItem* SensorLayout::takeAt(int index)
|
||||
{
|
||||
if (index >= 0 && index < items.size())
|
||||
return items.takeAt(index);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SensorLayout::setGeometry(const QRect &rect)
|
||||
{
|
||||
QLayout::setGeometry(rect);
|
||||
|
||||
int x = spacing; // Отступ слева
|
||||
int y = spacing; // Отступ сверху
|
||||
int maxWidth = rect.width(); // Максимальная ширина доступного пространства
|
||||
int rowHeight = 0; // Высота текущей строки
|
||||
|
||||
for (QLayoutItem *item : qAsConst(items)) {
|
||||
QSize itemSize = item->sizeHint();
|
||||
|
||||
// Проверяем, помещается ли элемент в текущую строку
|
||||
if (x + itemSize.width() > maxWidth - spacing) {
|
||||
// Переход на новую строку
|
||||
x = spacing; // Сбрасываем горизонтальное положение
|
||||
y += rowHeight + spacing; // Увеличиваем вертикальное положение
|
||||
rowHeight = 0; // Сбрасываем высоту строки
|
||||
}
|
||||
|
||||
// Устанавливаем элемент
|
||||
item->setGeometry(QRect(QPoint(x, y), itemSize));
|
||||
|
||||
// Обновляем `x` для следующего элемента
|
||||
x += itemSize.width() + spacing;
|
||||
|
||||
// Высота строки обновляется, если текущий элемент выше
|
||||
rowHeight = qMax(rowHeight, itemSize.height());
|
||||
}
|
||||
}
|
27
sensorlayout.h
Normal file
27
sensorlayout.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef SENSORLAYOUT_H
|
||||
#define SENSORLAYOUT_H
|
||||
|
||||
#include <QLayout>
|
||||
#include <QRect>
|
||||
#include <QWidgetItem>
|
||||
|
||||
class SensorLayout : public QLayout
|
||||
{
|
||||
public:
|
||||
SensorLayout(QWidget *parent = nullptr);
|
||||
~SensorLayout();
|
||||
|
||||
void addItem(QLayoutItem *item) override;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSize() const override;
|
||||
int count() const override;
|
||||
QLayoutItem* itemAt(int index) const override;
|
||||
QLayoutItem* takeAt(int index) override;
|
||||
void setGeometry(const QRect &rect) override;
|
||||
private:
|
||||
QList<QLayoutItem*> items;
|
||||
int spacing = 20;
|
||||
};
|
||||
|
||||
#endif // SENSORLAYOUT_H
|
||||
|
130
sensorwidget.cpp
Normal file
130
sensorwidget.cpp
Normal file
@ -0,0 +1,130 @@
|
||||
#include "sensorwidget.h"
|
||||
#include <QSpacerItem>
|
||||
|
||||
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))
|
||||
{
|
||||
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;");
|
||||
|
||||
titleLabel->setText(title);
|
||||
valueLabel->setText(value);
|
||||
incidentLabel->setText(incident);
|
||||
|
||||
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)
|
||||
{
|
||||
// Включение ошибки
|
||||
if (hasError) {
|
||||
// Изменение текста и стиля для отображения ошибки
|
||||
setStyleSheet("QFrame { border: 2px solid #FF453A; border-radius: 10px; background: rgba(255, 69, 58, 0.25);}");
|
||||
|
||||
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: #FF453A;"
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
|
||||
incidentLabel->setStyleSheet("font-family: Inter;"
|
||||
"font-size: 24px;"
|
||||
"font-weight: 400;"
|
||||
"line-height: 29.05px;"
|
||||
"text-align: left;"
|
||||
"color: #13385F;"
|
||||
"border: 0;"
|
||||
"background: transparent;");
|
||||
} else {
|
||||
// Восстановление нормального состояния
|
||||
setStyleSheet("QFrame { border: 2px solid rgba(229, 231, 235, 0.70);; border-radius: 10px; background: transparent}");
|
||||
|
||||
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;");
|
||||
}
|
||||
|
||||
titleLabel->setText(title);
|
||||
valueLabel->setText(value);
|
||||
incidentLabel->setText(incident);
|
||||
}
|
32
sensorwidget.h
Normal file
32
sensorwidget.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef SENSORWIDGET_H
|
||||
#define SENSORWIDGET_H
|
||||
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
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");
|
||||
|
||||
// Метод для изменения внешнего вида при ошибке
|
||||
void setErrorState(bool hasError,
|
||||
const QString &title = "Default error",
|
||||
const QString &value = "Default error",
|
||||
const QString &incident = "123 - 123");
|
||||
|
||||
private:
|
||||
QLabel *titleLabel;
|
||||
QLabel *valueLabel;
|
||||
QLabel *incidentLabel;
|
||||
QVBoxLayout *layout;
|
||||
};
|
||||
|
||||
#endif // SENSORWIDGET_H
|
Loading…
Reference in New Issue
Block a user