增加空基十三五微波算法参数界面工具箱
parent
25c5a65f4b
commit
203bb6cfc8
|
@ -42,6 +42,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pluginToolboxLibrary", "plu
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPG4Tool", "SPG4Tool\SPG4Tool.vcxproj", "{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KJ135WBJYAlgInterfaceToolbox", "Toolbox\KJ135WBJYAlgInterfaceToolbox\KJ135WBJYAlgInterfaceToolbox.vcxproj", "{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
|
@ -196,6 +198,18 @@ Global
|
|||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.Build.0 = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|ARM.ActiveCfg = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|ARM.Build.0 = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x64.Build.0 = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Debug|x86.Build.0 = Debug|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|ARM.ActiveCfg = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|ARM.Build.0 = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x64.ActiveCfg = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x64.Build.0 = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x86.ActiveCfg = Release|x64
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -210,6 +224,7 @@ Global
|
|||
{E56B3878-A3DC-41A4-ABF3-B628816D0D64} = {6505E2BA-06A2-447B-BC85-8CF1A81359BC}
|
||||
{8C8CA066-A93A-4098-9A46-B855EFEAADF2} = {2768F9D6-D410-4E88-A479-8336DAF97072}
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E} = {2768F9D6-D410-4E88-A479-8336DAF97072}
|
||||
{D3E9A2CA-7F05-425A-A4B6-416EC20972E8} = {41B1F23D-9119-47A7-B102-34022AF83CDA}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {179F0A62-C631-4667-AD03-3780ADE09F41}
|
||||
|
|
|
@ -196,9 +196,6 @@
|
|||
<ProjectReference Include="..\GPUBaseLib\GPUBaseLib.vcxproj">
|
||||
<Project>{b8b40c54-f7fe-4809-b6fb-8bc014570d7b}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\pluginToolboxLibrary\pluginToolboxLibrary.vcxproj">
|
||||
<Project>{667625a5-8de2-4373-99f0-8bad2cced011}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\RasterMainWidgetGUI\RasterMainWidgetGUI.vcxproj">
|
||||
<Project>{e56b3878-a3dc-41a4-abf3-b628816d0d64}</Project>
|
||||
</ProjectReference>
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,27 @@
|
|||
#include "KJ135WBJYAlgInterfaceToolbox.h"
|
||||
#include "ToolBoxWidget.h"
|
||||
#include "QWBFZAlgComponetXmlParamsDialog.h"
|
||||
|
||||
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
|
||||
{
|
||||
emit toolbox->addBoxToolItemSIGNAL(new WBFZAlgComponetLoadXmlParamsDialogToolButton(toolbox));
|
||||
}
|
||||
|
||||
|
||||
WBFZAlgComponetLoadXmlParamsDialogToolButton::WBFZAlgComponetLoadXmlParamsDialogToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"空基十三五微波算法组件");
|
||||
this->toolname = QString(u8"加载算法组件xml参数界面");
|
||||
}
|
||||
|
||||
WBFZAlgComponetLoadXmlParamsDialogToolButton::~WBFZAlgComponetLoadXmlParamsDialogToolButton()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void WBFZAlgComponetLoadXmlParamsDialogToolButton::run()
|
||||
{
|
||||
WBFZAlgComponetLoadXmlParamsProcess();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
/**
|
||||
* 增加界面空基的项目组件
|
||||
* @file KJ2AlgInterfaceToolbox.h
|
||||
* @brief KJ2AlgInterfaceToolbox.h
|
||||
* @details
|
||||
* 界面空基的项目组件,完成项目文件中的参数文件加载显示,并给出对应算法组件的执行调用
|
||||
*
|
||||
*/
|
||||
#ifndef __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
|
||||
#define __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
|
||||
#include "KJ135WBJYAlgInterfacetoolbox_global.h"
|
||||
#include "QToolAbstract.h"
|
||||
|
||||
namespace LAMPMainWidget {
|
||||
class RasterMainWidget;
|
||||
}
|
||||
|
||||
class ToolBoxWidget;
|
||||
|
||||
|
||||
extern "C" KJ2ALGINTERFACETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载空基十三五微波算法组件xml参数界面
|
||||
/// </summary>
|
||||
class KJ2ALGINTERFACETOOLBOX_EXPORT WBFZAlgComponetLoadXmlParamsDialogToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
WBFZAlgComponetLoadXmlParamsDialogToolButton(QWidget* parent = nullptr);
|
||||
~WBFZAlgComponetLoadXmlParamsDialogToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __KJ2ALGINTERFACETOOLBOX_GLOBAL_H__
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D3E9A2CA-7F05-425A-A4B6-416EC20972E8}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
<ProjectName>KJ135WBJYAlgInterfaceToolbox</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>tools_qt5</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||
<QtInstall>tools_qt5</QtInstall>
|
||||
<QtModules>core;xml;sql;opengl;gui;xmlpatterns;widgets;location;qml;positioning;printsupport;concurrent;3dcore;3danimation;3dextras;3dinput;3dlogic;3drender;dbus;gamepad;openglextensions;charts;datavisualization;purchasing</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Toolbox\</OutDir>
|
||||
<TargetName>PluginTool_$(ProjectName)</TargetName>
|
||||
<IncludePath>..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;.;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterMainWidgetGUI;..\..\RasterProcessToolWidget;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>KJ2ALGINTERFACETOOLBOX_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>KJ2ALGINTERFACETOOLBOX_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\BaseCommonLibrary\BaseCommonLibrary.vcxproj">
|
||||
<Project>{872ecd6f-30e3-4a1b-b17c-15e87d373ff6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\RasterMainWidgetGUI\RasterMainWidgetGUI.vcxproj">
|
||||
<Project>{e56b3878-a3dc-41a4-abf3-b628816d0d64}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\RasterProcessToolWidget\RasterProcessTool.vcxproj">
|
||||
<Project>{7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="KJ135WBJYAlgInterfaceToolbox.cpp" />
|
||||
<ClCompile Include="KJ135WBJYAlgWidgetComponet.cpp" />
|
||||
<ClCompile Include="QWBFZAlgComponetXmlParamsDialog.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="QWBFZAlgComponetXmlParamsDialog.h" />
|
||||
<QtMoc Include="KJ135WBJYAlgInterfaceToolbox.h" />
|
||||
<ClInclude Include="KJ135WBJYAlgInterfacetoolbox_global.h" />
|
||||
<QtMoc Include="KJ135WBJYAlgWidgetComponet.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="QWBFZAlgComponetXmlParamsDialog.ui" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="KJ135WBJYAlgInterfaceToolbox.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="KJ135WBJYAlgWidgetComponet.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QWBFZAlgComponetXmlParamsDialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="KJ135WBJYAlgInterfacetoolbox_global.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="KJ135WBJYAlgWidgetComponet.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="KJ135WBJYAlgInterfaceToolbox.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="QWBFZAlgComponetXmlParamsDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="QWBFZAlgComponetXmlParamsDialog.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef BUILD_STATIC
|
||||
# if defined(KJ2ALGINTERFACETOOLBOX_LIB)
|
||||
# define KJ2ALGINTERFACETOOLBOX_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define KJ2ALGINTERFACETOOLBOX_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define KJ2ALGINTERFACETOOLBOX_EXPORT
|
||||
#endif
|
|
@ -0,0 +1,169 @@
|
|||
#include "KJ135WBJYAlgWidgetComponet.h"
|
||||
#include <QHBoxLayout>
|
||||
|
||||
|
||||
FileSelectWidget::FileSelectWidget( ComponentType paramtype, QWidget* parent)
|
||||
: QWidget(parent),
|
||||
paramType(paramtype)
|
||||
{
|
||||
this->m_pFileSelectButton = new QToolButton(this);
|
||||
this->m_pFileSelectButton->setText("Select File");
|
||||
QObject::connect(m_pFileSelectButton, SIGNAL(clicked()), this, SLOT(onSelectFile()));
|
||||
m_pFileNameEdit = new QLineEdit(this);
|
||||
this->m_pFileNameLabel = new QLabel("Selected File:", this);
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->addWidget(m_pFileNameLabel);
|
||||
layout->addWidget(m_pFileNameEdit);
|
||||
layout->addWidget(m_pFileSelectButton);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
|
||||
FileSelectWidget::~FileSelectWidget()
|
||||
{
|
||||
// Destructor implementation
|
||||
}
|
||||
|
||||
void FileSelectWidget::setFileName(const QString& fileName)
|
||||
{
|
||||
this->m_pFileNameEdit->setText(fileName);
|
||||
}
|
||||
|
||||
QString FileSelectWidget::getFileName() const
|
||||
{
|
||||
return this->m_pFileNameEdit->text();
|
||||
}
|
||||
|
||||
void FileSelectWidget::setLabelText(const QString& text)
|
||||
{
|
||||
this->m_pFileNameLabel->setText(text);
|
||||
}
|
||||
|
||||
void FileSelectWidget::setDataTypeStr(const QString& str)
|
||||
{
|
||||
this->DataTypeStr = str;
|
||||
}
|
||||
|
||||
void FileSelectWidget::onSelectFile()
|
||||
{
|
||||
if (this->paramType == ComponentType::FolderSelect)
|
||||
{
|
||||
QString folderName = QFileDialog::getExistingDirectory(this, u8"Select Folder", "");
|
||||
if (!folderName.isEmpty())
|
||||
{
|
||||
this->m_pFileNameEdit->setText(folderName);
|
||||
emit fileSelected(folderName);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (this->paramType == ComponentType::FileSelect)
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, u8"Select File", "", QString("All Files (*);;%1(*.%1)").arg(this->DataTypeStr));
|
||||
if (!fileName.isEmpty())
|
||||
{
|
||||
this->m_pFileNameEdit->setText(fileName);
|
||||
emit fileSelected(fileName);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else {}
|
||||
|
||||
}
|
||||
|
||||
/*************** 复选框 **************************/
|
||||
|
||||
ComboxSelectWidget::ComboxSelectWidget(QWidget* parent)
|
||||
{
|
||||
}
|
||||
|
||||
ComboxSelectWidget::~ComboxSelectWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void ComboxSelectWidget::setLabelText(const QString& text)
|
||||
{
|
||||
}
|
||||
|
||||
void ComboxSelectWidget::setDataTypeStr(const QString& str)
|
||||
{
|
||||
}
|
||||
|
||||
void ComboxSelectWidget::addItem(const QString& item)
|
||||
{
|
||||
}
|
||||
|
||||
void ComboxSelectWidget::setCurrentIndex(int index)
|
||||
{
|
||||
}
|
||||
|
||||
void ComboxSelectWidget::setCurrentText(const QString& text)
|
||||
{
|
||||
}
|
||||
|
||||
QString ComboxSelectWidget::getCurrentText() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*************** 整数输入 **************************/
|
||||
|
||||
|
||||
|
||||
IntInputWidget::IntInputWidget(QWidget* parent)
|
||||
{
|
||||
}
|
||||
|
||||
IntInputWidget::~IntInputWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void IntInputWidget::setLabelText(const QString& text)
|
||||
{
|
||||
}
|
||||
|
||||
void IntInputWidget::setDataTypeStr(const QString& str)
|
||||
{
|
||||
}
|
||||
|
||||
void IntInputWidget::setValue(int value)
|
||||
{
|
||||
}
|
||||
|
||||
int IntInputWidget::getValue() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************** 浮点数输入 **************************/
|
||||
|
||||
DoubleInputWidget::DoubleInputWidget(QWidget* parent)
|
||||
{
|
||||
}
|
||||
|
||||
DoubleInputWidget::~DoubleInputWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void DoubleInputWidget::setLabelText(const QString& text)
|
||||
{
|
||||
}
|
||||
|
||||
void DoubleInputWidget::setDataTypeStr(const QString& str)
|
||||
{
|
||||
}
|
||||
|
||||
void DoubleInputWidget::setValue(double value)
|
||||
{
|
||||
}
|
||||
|
||||
double DoubleInputWidget::getValue() const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* 空基十三五微波算法组件界面组件类集
|
||||
* @file KJ135WBJYAlgWidgetComponet.h
|
||||
* @brief KJ135WBJYAlgWidgetComponet.h
|
||||
* @details
|
||||
* 空基十三五微波算法组件界面组件类集
|
||||
*/
|
||||
|
||||
#ifndef __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
||||
#define __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
||||
|
||||
#include "KJ135WBJYAlgInterfaceToolbox_global.h"
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QToolButton>
|
||||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QSpinBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QCheckBox>
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 参数类型枚举
|
||||
/// </summary>
|
||||
enum ComponentType{
|
||||
FileSelect = 0, // 文件选择
|
||||
FolderSelect, // 文件夹选择
|
||||
ComboxSelect,// 枚举多选
|
||||
IntInput,// 整数输入
|
||||
DoubleInput,// 浮点数输入
|
||||
|
||||
};
|
||||
|
||||
class FileSelectWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FileSelectWidget(ComponentType paramtype = ComponentType::FileSelect,QWidget* parent = nullptr);
|
||||
~FileSelectWidget();
|
||||
|
||||
void setFileName(const QString& fileName);
|
||||
QString getFileName() const;
|
||||
|
||||
void setLabelText(const QString& text);
|
||||
void setDataTypeStr(const QString& str);
|
||||
private slots:
|
||||
void onSelectFile();
|
||||
|
||||
signals:
|
||||
void fileSelected(const QString& fileName);
|
||||
private:
|
||||
QToolButton* m_pFileSelectButton;
|
||||
QLineEdit* m_pFileNameEdit;
|
||||
QLabel* m_pFileNameLabel;
|
||||
QString DataTypeStr;
|
||||
ComponentType paramType;
|
||||
};
|
||||
|
||||
|
||||
class ComboxSelectWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboxSelectWidget(QWidget* parent = nullptr);
|
||||
~ComboxSelectWidget();
|
||||
void setLabelText(const QString& text);
|
||||
void setDataTypeStr(const QString& str);
|
||||
void addItem(const QString& item);
|
||||
void setCurrentIndex(int index);
|
||||
void setCurrentText(const QString& text);
|
||||
QString getCurrentText() const;
|
||||
private:
|
||||
QComboBox* m_pCombox;
|
||||
QLabel* m_pComboxLabel;
|
||||
QString DataTypeStr;
|
||||
};
|
||||
|
||||
class IntInputWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IntInputWidget(QWidget* parent = nullptr);
|
||||
~IntInputWidget();
|
||||
void setLabelText(const QString& text);
|
||||
void setDataTypeStr(const QString& str);
|
||||
void setValue(int value);
|
||||
int getValue() const;
|
||||
private:
|
||||
QSpinBox* m_pIntInput;
|
||||
QLabel* m_pIntInputLabel;
|
||||
QString DataTypeStr;
|
||||
};
|
||||
|
||||
class DoubleInputWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DoubleInputWidget(QWidget* parent = nullptr);
|
||||
~DoubleInputWidget();
|
||||
void setLabelText(const QString& text);
|
||||
void setDataTypeStr(const QString& str);
|
||||
void setValue(double value);
|
||||
double getValue() const;
|
||||
private:
|
||||
QDoubleSpinBox* m_pDoubleInput;
|
||||
QLabel* m_pDoubleInputLabel;
|
||||
QString DataTypeStr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif// __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#include "QWBFZAlgComponetXmlParamsDialog.h"
|
||||
#include "ui_QWBFZAlgComponetXmlParamsDialog.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
QWBFZAlgComponetXmlParamsDialog::QWBFZAlgComponetXmlParamsDialog(QWidget *parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::QWBFZAlgComponetXmlParamsDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
QWBFZAlgComponetXmlParamsDialog::~QWBFZAlgComponetXmlParamsDialog()
|
||||
{}
|
||||
|
||||
void WBFZAlgComponetLoadXmlParamsProcess()
|
||||
{
|
||||
QString xmlFileName = QFileDialog::getOpenFileName(nullptr, u8"选择算法组件xml参数文件", "", u8"xml文件(*.xml)");
|
||||
if (xmlFileName.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(nullptr, u8"警告", u8"请选择算法组件xml参数文件");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class QWBFZAlgComponetXmlParamsDialogClass;
|
||||
}
|
||||
|
||||
class QWBFZAlgComponetXmlParamsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QWBFZAlgComponetXmlParamsDialog(QWidget *parent = nullptr);
|
||||
~QWBFZAlgComponetXmlParamsDialog();
|
||||
|
||||
private:
|
||||
Ui::QWBFZAlgComponetXmlParamsDialogClass* ui;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 加载微波算法组件xml参数界面渲染流程
|
||||
void WBFZAlgComponetLoadXmlParamsProcess();
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QWBFZAlgComponetXmlParamsDialogClass</class>
|
||||
<widget class="QDialog" name="QWBFZAlgComponetXmlParamsDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QWBFZAlgComponetXmlParamsDialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollAreaParamWidget">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>580</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue