hlp:桂林国际齿轮泵代码

This commit is contained in:
kite_lucs
2026-10-09 10:25:24 +08:00
commit fd606b3c81
2447 changed files with 999531 additions and 0 deletions
@@ -0,0 +1,365 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.4.1, 2018-04-06T23:16:49. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">System</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">3</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">Qt4ProjectManager.ToolChain.Maemo:/home/student/QtSDK/Madde/targets/harmattan_10.2011.34-1_rt1.2/bin/gcc.arm-linux-generic-elf-32bit./home/student/QtSDK/debugger/Maemo/gdb</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.5 (QtEmbedded-4.8.5-arm) 发布</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/student/newDisk/RTL819xCU_USB_linux_v3.4.3_4369.20120622/RTL8188C_8192C_USB_linux_v3.4.3_4369.20120622/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_20120622/wpa_supplicant_hostapd-0.8/wpa_supplicant/wpa_gui-qt4</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">10</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">Qt4ProjectManager.ToolChain.Maemo:/home/student/QtSDK/Madde/targets/harmattan_10.2011.34-1_rt1.2/bin/gcc.arm-linux-generic-elf-32bit./home/student/QtSDK/debugger/Maemo/gdb</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.5 (QtEmbedded-4.8.5-arm) 调试</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/student/newDisk/RTL819xCU_USB_linux_v3.4.3_4369.20120622/RTL8188C_8192C_USB_linux_v3.4.3_4369.20120622/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_20120622/wpa_supplicant_hostapd-0.8/wpa_supplicant/wpa_gui-qt4</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">10</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-32bit./home/student/QtSDK/debugger/Desktop/bin/gdb</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.6.3 (QtEmbedded-4.6.3) 调试</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory"></value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">4</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-32bit./home/student/QtSDK/debugger/Desktop/bin/gdb</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.6.3 (QtEmbedded-4.6.3) 发布</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/student/newDisk/wpa_gui-qt4-build</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">4</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">当前无部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">wpa_gui</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">wpa_gui.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{3b8bf03b-2221-4e2e-9b07-52812b684da2}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">10</value>
</data>
</qtcreator>
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@@ -0,0 +1,40 @@
/**
*
* This is a simple Reed-Solomon encoder
* (C) Cliff Hones 2004
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __REEDSOL_H
#define __REEDSOL_H
/*#ifdef __cplusplus
extern "C"
{
#endif */ /* __cplusplus */
extern void rs_init_gf(int poly);
extern void rs_init_code(int nsym, int index);
extern void rs_encode(int len, unsigned char *data, unsigned char *res);
extern void rs_encode_long(int len, unsigned int *data, unsigned int *res);
extern void rs_free(void);
/*#ifdef __cplusplus
}
#endif */ /* __cplusplus */
#endif /* __REEDSOL_H */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,365 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2026-02-04T10:48:47. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt4.8.5</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">qt4.8.5</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{20f192ec-b47c-40b3-ae29-2a8641ace74c}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/mnt/hgfs/share/800X600_Universal_StandardMode_GuiLin</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Check for free disk space</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CheckForFreeDiskSpaceStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedSysroots"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes"/>
<value type="QString" key="RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck">/</value>
<value type="qulonglong" key="RemoteLinux.CheckForFreeDiskSpaceStep.RequiredSpace">5242880</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Upload files via SFTP</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.DirectUploadStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedSysroots"/>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes"/>
<value type="bool" key="RemoteLinux.GenericDirectUploadStep.IgnoreMissingFiles">false</value>
<value type="bool" key="RemoteLinux.GenericDirectUploadStep.Incremental">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy to Remote Linux Host</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">DeployToGenericLinux</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">1</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">QtUI (on Remote Device)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinuxRunConfiguration:/mnt/hgfs/share/800X600_Universal_StandardMode_GuiLin/QtUI.pro</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.Arguments"/>
<value type="QString" key="Qt4ProjectManager.MaemoRunConfiguration.ProFile">QtUI.pro</value>
<value type="QString" key="RemoteLinux.RunConfig.AlternateRemoteExecutable"></value>
<value type="bool" key="RemoteLinux.RunConfig.UseAlternateRemoteExecutable">false</value>
<value type="QString" key="RemoteLinux.RunConfig.WorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.1</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面-qt4.6.3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面-qt4.6.3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{9d05cdb8-0cfc-4b95-a6f7-6dda9a6985a7}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/mnt/hgfs/share/800X600_Universal_StandardMode_GuiLin</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 4.6.3 (QtEmbedded-4.6.3) 调试</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">QtUI</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/mnt/hgfs/share/800X600_Universal_StandardMode_GuiLin_V5.6.01/QtUI.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">QtUI.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">2</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{10e574f4-3397-4f1f-aa93-8dcf2d20fc96}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">15</value>
</data>
</qtcreator>
@@ -0,0 +1,151 @@
/****************************************************************************
** Meta object code from reading C++ file 'DialogFileOperation.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../DialogFileOperation.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'DialogFileOperation.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DialogFileOperation[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
15, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: signature, parameters, type, tag, flags
41, 21, 20, 20, 0x05,
73, 64, 20, 20, 0x05,
// slots: signature, parameters, type, tag, flags
99, 20, 20, 20, 0x08,
127, 20, 20, 20, 0x08,
155, 20, 20, 20, 0x08,
183, 20, 20, 20, 0x08,
214, 20, 20, 20, 0x08,
244, 20, 20, 20, 0x08,
274, 20, 20, 20, 0x08,
304, 20, 20, 20, 0x08,
334, 20, 20, 20, 0x08,
362, 20, 20, 20, 0x08,
393, 20, 20, 20, 0x08,
430, 424, 20, 20, 0x08,
467, 424, 20, 20, 0x08,
0 // eod
};
static const char qt_meta_stringdata_DialogFileOperation[] = {
"DialogFileOperation\0\0filePath,insertFlag\0"
"openFile(QString,bool)\0filePath\0"
"createSceneImage(QString)\0"
"on_pushButtonNext_pressed()\0"
"on_pushButtonLast_pressed()\0"
"on_pushButtonExit_pressed()\0"
"on_pushButtonDelFile_pressed()\0"
"on_pushButtonDelAll_pressed()\0"
"on_pushButtonImport_pressed()\0"
"on_pushButtonExport_pressed()\0"
"on_pushButtonInsert_clicked()\0"
"on_pushButtonOpen_clicked()\0"
"on_radioButtonLocal_released()\0"
"on_radioButtonUdisk_released()\0index\0"
"on_listViewFile_entered(QModelIndex)\0"
"on_listViewFile_clicked(QModelIndex)\0"
};
void DialogFileOperation::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
DialogFileOperation *_t = static_cast<DialogFileOperation *>(_o);
switch (_id) {
case 0: _t->openFile((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
case 1: _t->createSceneImage((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 2: _t->on_pushButtonNext_pressed(); break;
case 3: _t->on_pushButtonLast_pressed(); break;
case 4: _t->on_pushButtonExit_pressed(); break;
case 5: _t->on_pushButtonDelFile_pressed(); break;
case 6: _t->on_pushButtonDelAll_pressed(); break;
case 7: _t->on_pushButtonImport_pressed(); break;
case 8: _t->on_pushButtonExport_pressed(); break;
case 9: _t->on_pushButtonInsert_clicked(); break;
case 10: _t->on_pushButtonOpen_clicked(); break;
case 11: _t->on_radioButtonLocal_released(); break;
case 12: _t->on_radioButtonUdisk_released(); break;
case 13: _t->on_listViewFile_entered((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break;
case 14: _t->on_listViewFile_clicked((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break;
default: ;
}
}
}
const QMetaObjectExtraData DialogFileOperation::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DialogFileOperation::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DialogFileOperation,
qt_meta_data_DialogFileOperation, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DialogFileOperation::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DialogFileOperation::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DialogFileOperation::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DialogFileOperation))
return static_cast<void*>(const_cast< DialogFileOperation*>(this));
return QDialog::qt_metacast(_clname);
}
int DialogFileOperation::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 15)
qt_static_metacall(this, _c, _id, _a);
_id -= 15;
}
return _id;
}
// SIGNAL 0
void DialogFileOperation::openFile(QString _t1, bool _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void DialogFileOperation::createSceneImage(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_END_MOC_NAMESPACE
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgMutiLanguage</class>
<widget class="QDialog" name="DlgMutiLanguage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>376</width>
<height>328</height>
</rect>
</property>
<property name="windowTitle">
<string>界面语言设置</string>
</property>
<property name="windowIcon">
<iconset resource="image.qrc">
<normaloff>:/icon/TEXT.PNG</normaloff>:/icon/TEXT.PNG</iconset>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>110</x>
<y>280</y>
<width>221</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>60</x>
<y>20</y>
<width>271</width>
<height>213</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>中文</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QRadioButton" name="radioButton_6">
<property name="text">
<string>越南语</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButton_3">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>土耳其语</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QRadioButton" name="radioButton_5">
<property name="text">
<string>泰语</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="radioButton_4">
<property name="text">
<string>西班牙语</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>英语</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QRadioButton" name="radioButton_7">
<property name="text">
<string>波斯语</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>250</y>
<width>331</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>(注意: 选择切换显示语言, 重启后才能生效)</string>
</property>
</widget>
</widget>
<resources>
<include location="image.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DlgMutiLanguage</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgMutiLanguage</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
@@ -0,0 +1,41 @@
/*
* wpa_gui - WpaMsg class for storing event messages
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively, this software may be distributed under the terms of BSD
* license.
*
* See README and COPYING for more details.
*/
#ifndef WPAMSG_H
#define WPAMSG_H
#include <QDateTime>
#include <QLinkedList>
class WpaMsg {
public:
WpaMsg(const QString &_msg, int _priority = 2)
: msg(_msg), priority(_priority)
{
timestamp = QDateTime::currentDateTime();
}
QString getMsg() const { return msg; }
int getPriority() const { return priority; }
QDateTime getTimestamp() const { return timestamp; }
private:
QString msg;
int priority;
QDateTime timestamp;
};
typedef QLinkedList<WpaMsg> WpaMsgList;
#endif /* WPAMSG_H */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgMyWarring</class>
<widget class="QDialog" name="DlgMyWarring">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>213</height>
</rect>
</property>
<property name="windowTitle">
<string>警告</string>
</property>
<property name="windowIcon">
<iconset resource="image.qrc">
<normaloff>:/icon/a9.ico</normaloff>:/icon/a9.ico</iconset>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>40</y>
<width>431</width>
<height>111</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>85</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>85</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>150</red>
<green>147</green>
<blue>140</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="midLineWidth">
<number>5</number>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
<widget class="QPushButton" name="pushButtonOK">
<property name="geometry">
<rect>
<x>310</x>
<y>170</y>
<width>93</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
<widget class="QLabel" name="labelTitle">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>441</width>
<height>31</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>150</red>
<green>147</green>
<blue>140</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</widget>
<resources>
<include location="image.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,25 @@
#ifndef DIALOGAUTHORIZATION_H
#define DIALOGAUTHORIZATION_H
#include <QDialog>
namespace Ui {
class DialogAuthorization;
}
class DialogAuthorization : public QDialog
{
Q_OBJECT
public:
explicit DialogAuthorization(QWidget *parent = 0);
~DialogAuthorization();
QString getAuth();
void clearAuth();
private:
Ui::DialogAuthorization *ui;
//QTimer time1;
};
#endif // DIALOGAUTHORIZATION_H
@@ -0,0 +1 @@
*.qm
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,116 @@
/****************************************************************************
** Meta object code from reading C++ file 'dlgQrCode.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../dlgQrCode.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dlgQrCode.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_dlgQrCode[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
7, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: signature, parameters, type, tag, flags
11, 10, 10, 10, 0x05,
// slots: signature, parameters, type, tag, flags
30, 10, 10, 10, 0x0a,
46, 10, 10, 10, 0x08,
65, 10, 10, 10, 0x08,
93, 10, 10, 10, 0x08,
119, 10, 10, 10, 0x08,
144, 10, 10, 10, 0x08,
0 // eod
};
static const char qt_meta_stringdata_dlgQrCode[] = {
"dlgQrCode\0\0onQRCodeCloseNow()\0"
"onTextChanged()\0onQRCodeAuto(bool)\0"
"on_pushBtnPreView_pressed()\0"
"on_pushBtnClose_pressed()\0"
"on_pushBtnSave_pressed()\0onComboBoxType(int)\0"
};
void dlgQrCode::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
dlgQrCode *_t = static_cast<dlgQrCode *>(_o);
switch (_id) {
case 0: _t->onQRCodeCloseNow(); break;
case 1: _t->onTextChanged(); break;
case 2: _t->onQRCodeAuto((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 3: _t->on_pushBtnPreView_pressed(); break;
case 4: _t->on_pushBtnClose_pressed(); break;
case 5: _t->on_pushBtnSave_pressed(); break;
case 6: _t->onComboBoxType((*reinterpret_cast< int(*)>(_a[1]))); break;
default: ;
}
}
}
const QMetaObjectExtraData dlgQrCode::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject dlgQrCode::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_dlgQrCode,
qt_meta_data_dlgQrCode, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &dlgQrCode::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *dlgQrCode::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *dlgQrCode::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_dlgQrCode))
return static_cast<void*>(const_cast< dlgQrCode*>(this));
return QDialog::qt_metacast(_clname);
}
int dlgQrCode::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 7)
qt_static_metacall(this, _c, _id, _a);
_id -= 7;
}
return _id;
}
// SIGNAL 0
void dlgQrCode::onQRCodeCloseNow()
{
QMetaObject::activate(this, &staticMetaObject, 0, 0);
}
QT_END_MOC_NAMESPACE
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,246 @@
/****************************************************************************
** Meta object code from reading C++ file 'PicEdit.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../PicEdit.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'PicEdit.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_PicEdit[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
45, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
4, // signalCount
// signals: signature, parameters, type, tag, flags
11, 9, 8, 8, 0x05,
41, 8, 8, 8, 0x05,
65, 8, 8, 8, 0x05,
84, 8, 8, 8, 0x05,
// slots: signature, parameters, type, tag, flags
104, 8, 8, 8, 0x08,
123, 118, 8, 8, 0x08,
148, 8, 8, 8, 0x08,
162, 8, 8, 8, 0x08,
189, 8, 8, 8, 0x08,
217, 8, 8, 8, 0x08,
253, 244, 8, 8, 0x08,
275, 8, 8, 8, 0x08,
306, 8, 8, 8, 0x08,
336, 8, 8, 8, 0x08,
362, 8, 8, 8, 0x08,
390, 8, 8, 8, 0x08,
420, 8, 8, 8, 0x08,
449, 8, 8, 8, 0x08,
477, 8, 8, 8, 0x08,
511, 509, 8, 8, 0x08,
551, 8, 8, 8, 0x08,
581, 8, 8, 8, 0x08,
604, 8, 8, 8, 0x08,
625, 8, 8, 8, 0x08,
653, 8, 8, 8, 0x08,
673, 8, 8, 8, 0x08,
701, 8, 8, 8, 0x08,
720, 8, 8, 8, 0x08,
754, 750, 8, 8, 0x08,
800, 794, 8, 8, 0x08,
844, 8, 8, 8, 0x08,
878, 8, 8, 8, 0x08,
912, 8, 8, 8, 0x08,
948, 8, 8, 8, 0x08,
983, 8, 8, 8, 0x08,
997, 8, 8, 8, 0x08,
1031, 8, 8, 8, 0x08,
1064, 8, 8, 8, 0x08,
1094, 750, 8, 8, 0x08,
1122, 1116, 8, 8, 0x08,
1149, 1147, 8, 8, 0x08,
1177, 1175, 8, 8, 0x08,
1195, 8, 8, 8, 0x08,
1229, 8, 8, 8, 0x08,
1276, 1262, 8, 8, 0x09,
0 // eod
};
static const char qt_meta_stringdata_PicEdit[] = {
"PicEdit\0\0,\0openCurrentFile(QString,bool)\0"
"zkEditEnStatus(QString)\0setMainTabNow(int)\0"
"setMainTabEdit(int)\0ondlgDrawOK()\0"
"auth\0updateAuthorization(int)\0"
"cursorFlash()\0on_pushButtonEnd_pressed()\0"
"on_pushButtonHome_pressed()\0"
"on_pushButtonNew_pressed()\0fileName\0"
"EditCurrFile(QString)\0"
"on_pushButtonEnlarge_pressed()\0"
"on_pushButtonReduce_pressed()\0"
"on_pushButtonUp_pressed()\0"
"on_pushButtonLeft_pressed()\0"
"on_pushButtonEnsure_pressed()\0"
"on_pushButtonRight_pressed()\0"
"on_pushButtonDown_pressed()\0"
"on_checkBoxDrawGridEn_clicked()\0i\0"
"on_spinBoxHeightPoint_valueChanged(int)\0"
"on_pushButtonSaveAs_clicked()\0"
"onSaveAS_FIle_select()\0onSave_File_reject()\0"
"on_pushButtonOpen_clicked()\0"
"onOpenFIle_select()\0on_pushButtonSave_clicked()\0"
"enableSaveButton()\0on_pushButtonImport_clicked()\0"
"txt\0on_lineEditInputTxt_textEdited(QString)\0"
"index\0on_comboBoxLattice_currentIndexChanged(int)\0"
"on_pushButtonStartInput_clicked()\0"
"on_pushButtonDeleteChar_clicked()\0"
"on_radioButtonCharCurrent_clicked()\0"
"on_radioButtonDotCurrent_clicked()\0"
"showKeybord()\0on_pushButtonInsertVari_pressed()\0"
"on_pushButtonCharSpace_pressed()\0"
"on_pushButtonZKEdit_pressed()\0"
"ChinaProview(QString)\0txt,m\0"
"onFileOpen(QString,bool)\0s\0"
"printThisFileNow(QString)\0n\0"
"onChangeFont(int)\0on_pushButtonInsertMode_pressed()\0"
"on_checkBoxControlChar_clicked()\0"
"fileName,Flag\0onSaveASFile(QString,bool)\0"
};
void PicEdit::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
PicEdit *_t = static_cast<PicEdit *>(_o);
switch (_id) {
case 0: _t->openCurrentFile((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
case 1: _t->zkEditEnStatus((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 2: _t->setMainTabNow((*reinterpret_cast< int(*)>(_a[1]))); break;
case 3: _t->setMainTabEdit((*reinterpret_cast< int(*)>(_a[1]))); break;
case 4: _t->ondlgDrawOK(); break;
case 5: _t->updateAuthorization((*reinterpret_cast< int(*)>(_a[1]))); break;
case 6: _t->cursorFlash(); break;
case 7: _t->on_pushButtonEnd_pressed(); break;
case 8: _t->on_pushButtonHome_pressed(); break;
case 9: _t->on_pushButtonNew_pressed(); break;
case 10: _t->EditCurrFile((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 11: _t->on_pushButtonEnlarge_pressed(); break;
case 12: _t->on_pushButtonReduce_pressed(); break;
case 13: _t->on_pushButtonUp_pressed(); break;
case 14: _t->on_pushButtonLeft_pressed(); break;
case 15: _t->on_pushButtonEnsure_pressed(); break;
case 16: _t->on_pushButtonRight_pressed(); break;
case 17: _t->on_pushButtonDown_pressed(); break;
case 18: _t->on_checkBoxDrawGridEn_clicked(); break;
case 19: _t->on_spinBoxHeightPoint_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 20: _t->on_pushButtonSaveAs_clicked(); break;
case 21: _t->onSaveAS_FIle_select(); break;
case 22: _t->onSave_File_reject(); break;
case 23: _t->on_pushButtonOpen_clicked(); break;
case 24: _t->onOpenFIle_select(); break;
case 25: _t->on_pushButtonSave_clicked(); break;
case 26: _t->enableSaveButton(); break;
case 27: _t->on_pushButtonImport_clicked(); break;
case 28: _t->on_lineEditInputTxt_textEdited((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 29: _t->on_comboBoxLattice_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 30: _t->on_pushButtonStartInput_clicked(); break;
case 31: _t->on_pushButtonDeleteChar_clicked(); break;
case 32: _t->on_radioButtonCharCurrent_clicked(); break;
case 33: _t->on_radioButtonDotCurrent_clicked(); break;
case 34: _t->showKeybord(); break;
case 35: _t->on_pushButtonInsertVari_pressed(); break;
case 36: _t->on_pushButtonCharSpace_pressed(); break;
case 37: _t->on_pushButtonZKEdit_pressed(); break;
case 38: _t->ChinaProview((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 39: _t->onFileOpen((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
case 40: _t->printThisFileNow((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 41: _t->onChangeFont((*reinterpret_cast< int(*)>(_a[1]))); break;
case 42: _t->on_pushButtonInsertMode_pressed(); break;
case 43: _t->on_checkBoxControlChar_clicked(); break;
case 44: _t->onSaveASFile((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
default: ;
}
}
}
const QMetaObjectExtraData PicEdit::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject PicEdit::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_PicEdit,
qt_meta_data_PicEdit, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &PicEdit::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *PicEdit::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *PicEdit::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_PicEdit))
return static_cast<void*>(const_cast< PicEdit*>(this));
return QWidget::qt_metacast(_clname);
}
int PicEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 45)
qt_static_metacall(this, _c, _id, _a);
_id -= 45;
}
return _id;
}
// SIGNAL 0
void PicEdit::openCurrentFile(QString _t1, bool _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void PicEdit::zkEditEnStatus(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void PicEdit::setMainTabNow(int _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
// SIGNAL 3
void PicEdit::setMainTabEdit(int _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 3, _a);
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,165 @@
#include "dialogshowcounter.h"
#include "ui_dialogshowcounter.h"
#include <QDebug>
DialogShowCounter::DialogShowCounter(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogShowCounter)
{
ui->setupUi(this);
cycle_flag = true;
cycleTimecount = 0;
savecnt1CurrValue = 0;
dialogcycleprint = new DialogCycleprint(parent);
connect(dialogcycleprint,SIGNAL(accepted()),this,SLOT(ondialogcycleprintAccepted()));
// ui->CycleprintpushButton->hide();
setWindowFlags(Qt::FramelessWindowHint);
}
DialogShowCounter::~DialogShowCounter()
{
delete ui;
}
void DialogShowCounter::init_arg()
{
dialogcycleprint->getSpinboxValue(cycleprintarg);
dialogcycleprint->SetSpinboxValue(cycleprintarg);
// qDebug()<<"[init_arg]cycleprintarg.area_end1="<<cycleprintarg.area_end1;
}
void DialogShowCounter::refreshdate(int currCnt1Value, int cn1StartValue, int cn1EndValue,int currGroupIndex, int currGroupLoop/*当前循环次数*/)
{
#if 0
if(bcdTodec < savecnt1CurrValue && cycle_flag){
cycle_flag = false;
cycleTimecount++;
}else{
savecnt1CurrValue = bcdTodec;
cycle_flag = true;
}
cycleprintarg.area_end1 = cn1EndValue;
if(cycleTimecount == cycleprintarg.cycle_time1){ //cycle time finish
qDebug()<< "always here?";
int t_cycle_time1,area_end1;
t_cycle_time1 = cycleprintarg.cycle_time1;
area_end1 = cycleprintarg.area_end1;
cycleprintarg.cycle_time1 = cycleprintarg.cycle_time2;
cycleprintarg.cycle_time2 = cycleprintarg.cycle_time3;
cycleprintarg.cycle_time3 = cycleprintarg.cycle_time4;
cycleprintarg.cycle_time4 = cycleprintarg.cycle_time5;
cycleprintarg.cycle_time5 = cycleprintarg.cycle_time6;
cycleprintarg.cycle_time6 = t_cycle_time1;
cycleprintarg.area_end1 = cycleprintarg.area_end2;
cycleprintarg.area_end2 = cycleprintarg.area_end3;
cycleprintarg.area_end3 = cycleprintarg.area_end4;
cycleprintarg.area_end4 = cycleprintarg.area_end5;
cycleprintarg.area_end5 = cycleprintarg.area_end6;
cycleprintarg.area_end6 = area_end1;
dialogcycleprint->SetSpinboxValue(cycleprintarg);
// emit set_count_endvalue(cycleprintarg.cycle_time1, cycleprintarg.area_end1);
}
#endif
// 当前米标
// QString temp_str = QString::number(metre);
ui->lcdNumber->display(currCnt1Value);
// 结束值
// temp_str = QString::number(cn1EndValue);
ui->lcdCycleEndNumber->display(cn1EndValue);
// 起始值
// temp_str = QString::number(cn1StartValue);
ui->lcdCycleStartNumber->display(cn1StartValue);
// 循环
//// cycleTimecount = cycle_count;
// temp_str = QString::number(cycleTimecount);
ui->lcdCycleTimeNumber->display(currGroupLoop + 1);
// 剩余米数
// lcd_number = cn1EndValue - metre;
// temp_str = QString::number(lcd_number);
int remainValue = cn1EndValue - currCnt1Value;
ui->lcdLessNumber->display(remainValue);
}
void DialogShowCounter::setLCDframe()
{
ui->lcdNumber->setDigitCount(4);
ui->lcdNumber->setMode(QLCDNumber::Dec);
ui->lcdNumber->setSegmentStyle(QLCDNumber::Flat);
QPalette lcdpat = ui->lcdNumber->palette();
lcdpat.setColor(QPalette::Normal, QPalette::WindowText, Qt::red);
ui->lcdNumber->setPalette(lcdpat);
ui->lcdCycleEndNumber->setDigitCount(4);
ui->lcdCycleEndNumber->setMode(QLCDNumber::Dec);
ui->lcdCycleEndNumber->setSegmentStyle(QLCDNumber::Flat);
lcdpat = ui->lcdCycleEndNumber->palette();
lcdpat.setColor(QPalette::Normal, QPalette::WindowText, Qt::red);
ui->lcdCycleEndNumber->setPalette(lcdpat);
ui->lcdCycleStartNumber->setDigitCount(4);
ui->lcdCycleStartNumber->setMode(QLCDNumber::Dec);
ui->lcdCycleStartNumber->setSegmentStyle(QLCDNumber::Flat);
lcdpat = ui->lcdCycleStartNumber->palette();
lcdpat.setColor(QPalette::Normal, QPalette::WindowText, Qt::red);
ui->lcdCycleStartNumber->setPalette(lcdpat);
ui->lcdCycleTimeNumber->setDigitCount(4);
ui->lcdCycleTimeNumber->setMode(QLCDNumber::Dec);
ui->lcdCycleTimeNumber->setSegmentStyle(QLCDNumber::Flat);
lcdpat = ui->lcdCycleTimeNumber->palette();
lcdpat.setColor(QPalette::Normal, QPalette::WindowText, Qt::red);
ui->lcdCycleTimeNumber->setPalette(lcdpat);
ui->lcdLessNumber->setDigitCount(4);
ui->lcdLessNumber->setMode(QLCDNumber::Dec);
ui->lcdLessNumber->setSegmentStyle(QLCDNumber::Flat);
lcdpat = ui->lcdLessNumber->palette();
lcdpat.setColor(QPalette::Normal, QPalette::WindowText, Qt::red);
ui->lcdLessNumber->setPalette(lcdpat);
}
int DialogShowCounter::getResetMetreState(int &area_end)
{
int t_reset;
t_reset = reset_meter;
reset_meter = false;
//qDebug()<<"cycleprintarg.area_end1="<<cycleprintarg.area_end1;
area_end = cycleprintarg.area_end1;
return t_reset;
}
void DialogShowCounter::on_pushButton_clicked()
{
reset_meter = true;
}
void DialogShowCounter::ondialogcycleprintAccepted()
{
dialogcycleprint->getSpinboxValue(cycleprintarg);
}
void DialogShowCounter::on_CycleprintpushButton_clicked()
{
dialogcycleprint->show();
}
@@ -0,0 +1,97 @@
/********************************************************************************
** Form generated from reading UI file 'dlgmywarring.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DLGMYWARRING_H
#define UI_DLGMYWARRING_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
QT_BEGIN_NAMESPACE
class Ui_DlgMyWarring
{
public:
QLabel *label;
QPushButton *pushButtonOK;
QLabel *labelTitle;
void setupUi(QDialog *DlgMyWarring)
{
if (DlgMyWarring->objectName().isEmpty())
DlgMyWarring->setObjectName(QString::fromUtf8("DlgMyWarring"));
DlgMyWarring->resize(464, 213);
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/a9.ico"), QSize(), QIcon::Normal, QIcon::Off);
DlgMyWarring->setWindowIcon(icon);
label = new QLabel(DlgMyWarring);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(20, 40, 431, 111));
QPalette palette;
QBrush brush(QColor(0, 85, 255, 255));
brush.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::WindowText, brush);
palette.setBrush(QPalette::Inactive, QPalette::WindowText, brush);
QBrush brush1(QColor(150, 147, 140, 255));
brush1.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Disabled, QPalette::WindowText, brush1);
label->setPalette(palette);
QFont font;
font.setPointSize(12);
label->setFont(font);
label->setMidLineWidth(5);
label->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
label->setWordWrap(true);
label->setMargin(0);
pushButtonOK = new QPushButton(DlgMyWarring);
pushButtonOK->setObjectName(QString::fromUtf8("pushButtonOK"));
pushButtonOK->setGeometry(QRect(310, 170, 93, 27));
labelTitle = new QLabel(DlgMyWarring);
labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
labelTitle->setGeometry(QRect(10, 10, 441, 31));
QPalette palette1;
QBrush brush2(QColor(255, 0, 0, 255));
brush2.setStyle(Qt::SolidPattern);
palette1.setBrush(QPalette::Active, QPalette::WindowText, brush2);
palette1.setBrush(QPalette::Inactive, QPalette::WindowText, brush2);
palette1.setBrush(QPalette::Disabled, QPalette::WindowText, brush1);
labelTitle->setPalette(palette1);
QFont font1;
font1.setPointSize(16);
labelTitle->setFont(font1);
labelTitle->setAlignment(Qt::AlignCenter);
labelTitle->setWordWrap(true);
retranslateUi(DlgMyWarring);
QMetaObject::connectSlotsByName(DlgMyWarring);
} // setupUi
void retranslateUi(QDialog *DlgMyWarring)
{
DlgMyWarring->setWindowTitle(QApplication::translate("DlgMyWarring", "\350\255\246\345\221\212", 0, QApplication::UnicodeUTF8));
label->setText(QString());
pushButtonOK->setText(QApplication::translate("DlgMyWarring", "\347\241\256\345\256\232", 0, QApplication::UnicodeUTF8));
labelTitle->setText(QApplication::translate("DlgMyWarring", "TextLabel", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DlgMyWarring: public Ui_DlgMyWarring {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DLGMYWARRING_H
@@ -0,0 +1,104 @@
/****************************************************************************
** Meta object code from reading C++ file 'dlgdrawinit.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../dlgdrawinit.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dlgdrawinit.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_dlgDrawInit[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: signature, parameters, type, tag, flags
13, 12, 12, 12, 0x05,
// slots: signature, parameters, type, tag, flags
25, 12, 12, 12, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_dlgDrawInit[] = {
"dlgDrawInit\0\0dlgDrawOK()\0"
"on_pushButtonOK_pressed()\0"
};
void dlgDrawInit::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
dlgDrawInit *_t = static_cast<dlgDrawInit *>(_o);
switch (_id) {
case 0: _t->dlgDrawOK(); break;
case 1: _t->on_pushButtonOK_pressed(); break;
default: ;
}
}
Q_UNUSED(_a);
}
const QMetaObjectExtraData dlgDrawInit::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject dlgDrawInit::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_dlgDrawInit,
qt_meta_data_dlgDrawInit, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &dlgDrawInit::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *dlgDrawInit::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *dlgDrawInit::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_dlgDrawInit))
return static_cast<void*>(const_cast< dlgDrawInit*>(this));
return QDialog::qt_metacast(_clname);
}
int dlgDrawInit::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
}
return _id;
}
// SIGNAL 0
void dlgDrawInit::dlgDrawOK()
{
QMetaObject::activate(this, &staticMetaObject, 0, 0);
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,47 @@
#ifndef RSCODE_H
#define RSCODE_H
/*
* qrencode - QR Code encoder
*
* Reed solomon encoder. This code is taken from Phil Karn's libfec then
* editted and packed into a pair of .c and .h files.
*
* Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q
* (libfec is released under the GNU Lesser General Public License.)
*
* Copyright (C) 2006,2007 Kentaro Fukuchi <fukuchi@megaui.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __RSCODE_H__
#define __RSCODE_H__
/*
* General purpose RS codec, 8-bit symbols.
*/
typedef struct _RS RS;
/* WARNING: Thread unsafe!!! */
extern RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad);
extern void encode_rs_char(RS *rs, const unsigned char *data, unsigned char *parity);
extern void free_rs_char(RS *rs);
#endif /* __RSCODE_H__ */
#endif // RSCODE_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -0,0 +1,170 @@
/********************************************************************************
** Form generated from reading UI file 'dlgvarlength.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DLGVARLENGTH_H
#define UI_DLGVARLENGTH_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QDialog>
#include <QtGui/QGridLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QSpinBox>
QT_BEGIN_NAMESPACE
class Ui_DlgVarLength
{
public:
QGridLayout *gridLayout_2;
QGridLayout *gridLayout;
QLabel *label_2;
QLabel *label;
QLabel *label_4;
QSpinBox *spinHeadLen;
QSpinBox *spinEndLen;
QLineEdit *lineEditAllLen;
QLabel *label_3;
QSpinBox *spinVarLen;
QLabel *label_5;
QSpinBox *spinVarLen1;
QCheckBox *checkVarEN;
QPushButton *pushButtonOK;
void setupUi(QDialog *DlgVarLength)
{
if (DlgVarLength->objectName().isEmpty())
DlgVarLength->setObjectName(QString::fromUtf8("DlgVarLength"));
DlgVarLength->setWindowModality(Qt::WindowModal);
DlgVarLength->resize(386, 166);
DlgVarLength->setFocusPolicy(Qt::StrongFocus);
gridLayout_2 = new QGridLayout(DlgVarLength);
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
gridLayout = new QGridLayout();
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
label_2 = new QLabel(DlgVarLength);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setMaximumSize(QSize(100, 16777215));
label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_2, 0, 0, 1, 1);
label = new QLabel(DlgVarLength);
label->setObjectName(QString::fromUtf8("label"));
label->setMaximumSize(QSize(100, 16777215));
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label, 1, 0, 1, 1);
label_4 = new QLabel(DlgVarLength);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setMaximumSize(QSize(100, 16777215));
label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_4, 3, 0, 1, 1);
spinHeadLen = new QSpinBox(DlgVarLength);
spinHeadLen->setObjectName(QString::fromUtf8("spinHeadLen"));
spinHeadLen->setMaximum(9999);
gridLayout->addWidget(spinHeadLen, 0, 1, 1, 1);
spinEndLen = new QSpinBox(DlgVarLength);
spinEndLen->setObjectName(QString::fromUtf8("spinEndLen"));
spinEndLen->setMaximum(9999);
gridLayout->addWidget(spinEndLen, 1, 1, 1, 1);
lineEditAllLen = new QLineEdit(DlgVarLength);
lineEditAllLen->setObjectName(QString::fromUtf8("lineEditAllLen"));
lineEditAllLen->setEnabled(true);
lineEditAllLen->setMaximumSize(QSize(120, 16777215));
lineEditAllLen->setAcceptDrops(false);
lineEditAllLen->setReadOnly(true);
gridLayout->addWidget(lineEditAllLen, 3, 1, 1, 1);
label_3 = new QLabel(DlgVarLength);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setMaximumSize(QSize(100, 16777215));
label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_3, 0, 2, 1, 1);
spinVarLen = new QSpinBox(DlgVarLength);
spinVarLen->setObjectName(QString::fromUtf8("spinVarLen"));
spinVarLen->setMinimumSize(QSize(60, 0));
spinVarLen->setMinimum(-9999);
spinVarLen->setMaximum(9999);
gridLayout->addWidget(spinVarLen, 0, 3, 1, 1);
label_5 = new QLabel(DlgVarLength);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setMaximumSize(QSize(100, 16777215));
label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_5, 1, 2, 1, 1);
spinVarLen1 = new QSpinBox(DlgVarLength);
spinVarLen1->setObjectName(QString::fromUtf8("spinVarLen1"));
spinVarLen1->setMinimumSize(QSize(60, 0));
spinVarLen1->setMinimum(-9999);
spinVarLen1->setMaximum(9999);
gridLayout->addWidget(spinVarLen1, 1, 3, 1, 1);
checkVarEN = new QCheckBox(DlgVarLength);
checkVarEN->setObjectName(QString::fromUtf8("checkVarEN"));
checkVarEN->setLayoutDirection(Qt::RightToLeft);
gridLayout->addWidget(checkVarEN, 3, 2, 1, 1);
pushButtonOK = new QPushButton(DlgVarLength);
pushButtonOK->setObjectName(QString::fromUtf8("pushButtonOK"));
pushButtonOK->setMaximumSize(QSize(100, 60));
pushButtonOK->setDefault(true);
gridLayout->addWidget(pushButtonOK, 5, 2, 1, 1);
gridLayout_2->addLayout(gridLayout, 0, 0, 1, 1);
retranslateUi(DlgVarLength);
QMetaObject::connectSlotsByName(DlgVarLength);
} // setupUi
void retranslateUi(QDialog *DlgVarLength)
{
DlgVarLength->setWindowTitle(QApplication::translate("DlgVarLength", "\345\217\230\351\225\277\345\226\267\345\215\260\345\217\202\346\225\260", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("DlgVarLength", "\345\244\264\351\203\250\351\225\277\345\272\246(m)", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("DlgVarLength", "\345\260\276\351\203\250\351\225\277\345\272\246(m)", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("DlgVarLength", "\346\200\273\351\225\277(m)", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("DlgVarLength", "\350\260\203\346\225\264\351\225\277\345\272\246(mm)", 0, QApplication::UnicodeUTF8));
label_5->setText(QApplication::translate("DlgVarLength", "\350\260\203\346\225\264\351\225\277\345\272\246(mm)", 0, QApplication::UnicodeUTF8));
checkVarEN->setText(QApplication::translate("DlgVarLength", "\345\217\257\345\217\230\351\225\277\345\272\246\345\205\201\350\256\270", 0, QApplication::UnicodeUTF8));
pushButtonOK->setText(QApplication::translate("DlgVarLength", "\347\241\256\345\256\232", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DlgVarLength: public Ui_DlgVarLength {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DLGVARLENGTH_H
@@ -0,0 +1,160 @@
#include "IPEdit.h"
#include <QPainter>
#include <QApplication>
#include <QStyle>
#include <QStyleOptionButton>
#include <QKeyEvent>
#include <QShortcutEvent>
#include <QRegExpValidator>
#include <QRegExp>
#include <QClipboard>
#include <QDebug>
IPEdit::IPEdit(QWidget *parent) : QWidget(parent)
{
init();
}
IPEdit::~IPEdit()
{
}
void IPEdit::init()
{
m_layout = new QHBoxLayout(this);
m_layout->setSpacing(3);
m_layout->setContentsMargins(2, 0, 2, 0);
m_edit1 = new QLineEdit(this);
m_edit2 = new QLineEdit(this);
m_edit3 = new QLineEdit(this);
m_edit4 = new QLineEdit(this);
initForEdit(m_edit1);
initForEdit(m_edit2);
initForEdit(m_edit3);
initForEdit(m_edit4);
m_dot1 = new QLabel(".", this);
m_dot2 = new QLabel(".", this);
m_dot3 = new QLabel(".", this);
m_layout->addWidget(m_edit1, 1);
m_layout->addWidget(m_dot1);
m_layout->addWidget(m_edit2, 1);
m_layout->addWidget(m_dot2);
m_layout->addWidget(m_edit3, 1);
m_layout->addWidget(m_dot3);
m_layout->addWidget(m_edit4, 1);
}
void IPEdit::initForEdit(QLineEdit* edit)
{
edit->setFrame(false);
edit->setAlignment(Qt::AlignCenter);
edit->installEventFilter(this);
QRegExpValidator* validator = new QRegExpValidator(QRegExp("^(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$"), this);
edit->setValidator(validator);
connect(edit, SIGNAL(textChanged(const QString&)), this, SLOT(editTextChanged(const QString&)));
}
QLineEdit* IPEdit::nextEdit(QLineEdit* curEdit)
{
if (curEdit == m_edit1)
return m_edit2;
else if (curEdit == m_edit2)
return m_edit3;
else if (curEdit == m_edit3)
return m_edit4;
else
return NULL;
}
bool IPEdit::isEdit(QObject* object)
{
return (object == m_edit1 ||
object == m_edit2 ||
object == m_edit3 ||
object == m_edit4);
}
QString IPEdit::text()
{
QString sec1 = m_edit1->text().isEmpty() ? "0" : m_edit1->text();
QString sec2 = m_edit2->text().isEmpty() ? "0" : m_edit2->text();
QString sec3 = m_edit3->text().isEmpty() ? "0" : m_edit3->text();
QString sec4 = m_edit4->text().isEmpty() ? "0" : m_edit4->text();
return QString("%1.%2.%3.%4").arg(sec1).arg(sec2).arg(sec3).arg(sec4);
}
void IPEdit::setText(const QString& text)
{
QRegExp reg("^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$");
if (!reg.exactMatch(text))
return;
QStringList ips = text.split(".");
m_edit1->setText(ips.at(0));
m_edit2->setText(ips.at(1));
m_edit3->setText(ips.at(2));
m_edit4->setText(ips.at(3));
}
void IPEdit::paintEvent(QPaintEvent* event)
{
QPainter painter(this);
QStyleOptionFrame option;
option.initFrom(this);
option.lineWidth = 1;
style()->drawPrimitive(QStyle::PE_PanelLineEdit, &option, &painter, this);
QWidget::paintEvent(event);
}
bool IPEdit::eventFilter(QObject* object, QEvent* event)
{
if (isEdit(object))
{
if (event->type() == QEvent::KeyPress)
{
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Period)
{
QLineEdit* next = nextEdit(qobject_cast<QLineEdit*>(object));
if (next)
{
next->setFocus();
next->selectAll();
}
}
else if (keyEvent->matches(QKeySequence::Paste))
{
QString clip = QApplication::clipboard()->text(QClipboard::Clipboard);
if (clip.split(".").size() == 4)
{
setText(clip);
return true;
}
}
}
}
return QWidget::eventFilter(object, event);
}
void IPEdit::editTextChanged(const QString& text)
{
QLineEdit* curEdit = qobject_cast<QLineEdit*>(sender());
if (text.size() == 3)
{
QLineEdit* next = nextEdit(curEdit);
if (next)
{
next->setFocus();
next->selectAll();
}
}
}
@@ -0,0 +1,325 @@
/********************************************************************************
** Form generated from reading UI file 'zkedit.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ZKEDIT_H
#define UI_ZKEDIT_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QScrollArea>
#include <QtGui/QSpinBox>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include <zkWidget.h>
QT_BEGIN_NAMESPACE
class Ui_ZkEdit
{
public:
QGridLayout *gridLayout_3;
QHBoxLayout *horizontalLayout;
QScrollArea *scrollArea;
zkWidget *widgetPic;
QVBoxLayout *verticalLayout;
QLabel *labelScaleLeval;
QLabel *labelFileName;
QGridLayout *gridLayout_2;
QPushButton *pushButtonDown;
QPushButton *pushButtonEnsure;
QPushButton *pushButtonLeft;
QPushButton *pushButtonUp;
QPushButton *pushButtonRight;
QGridLayout *gridLayout;
QPushButton *pushButtonReduce;
QPushButton *pushButtonSave;
QPushButton *pushButtonNew;
QSpinBox *spinBoxWidthPoint;
QPushButton *pushButtonSaveAs;
QLabel *label_2;
QCheckBox *checkBoxPicExpand;
QPushButton *pushButtonOpen;
QLabel *label;
QLineEdit *lineEdit;
QSpinBox *spinBoxHeightPoint;
QPushButton *pushButtonEnlarge;
QPushButton *pushButtonImport;
QCheckBox *checkBoxTrimPic;
void setupUi(QWidget *ZkEdit)
{
if (ZkEdit->objectName().isEmpty())
ZkEdit->setObjectName(QString::fromUtf8("ZkEdit"));
ZkEdit->resize(800, 600);
ZkEdit->setFocusPolicy(Qt::StrongFocus);
gridLayout_3 = new QGridLayout(ZkEdit);
gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
horizontalLayout = new QHBoxLayout();
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
scrollArea = new QScrollArea(ZkEdit);
scrollArea->setObjectName(QString::fromUtf8("scrollArea"));
scrollArea->setWidgetResizable(false);
scrollArea->setAlignment(Qt::AlignCenter);
widgetPic = new zkWidget();
widgetPic->setObjectName(QString::fromUtf8("widgetPic"));
widgetPic->setGeometry(QRect(0, 89, 400, 400));
scrollArea->setWidget(widgetPic);
horizontalLayout->addWidget(scrollArea);
verticalLayout = new QVBoxLayout();
verticalLayout->setSpacing(0);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setContentsMargins(0, 0, 0, 0);
labelScaleLeval = new QLabel(ZkEdit);
labelScaleLeval->setObjectName(QString::fromUtf8("labelScaleLeval"));
labelScaleLeval->setMaximumSize(QSize(16777215, 20));
verticalLayout->addWidget(labelScaleLeval);
labelFileName = new QLabel(ZkEdit);
labelFileName->setObjectName(QString::fromUtf8("labelFileName"));
labelFileName->setMaximumSize(QSize(180, 20));
verticalLayout->addWidget(labelFileName);
gridLayout_2 = new QGridLayout();
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
gridLayout_2->setHorizontalSpacing(0);
gridLayout_2->setVerticalSpacing(30);
pushButtonDown = new QPushButton(ZkEdit);
pushButtonDown->setObjectName(QString::fromUtf8("pushButtonDown"));
pushButtonDown->setMinimumSize(QSize(50, 50));
pushButtonDown->setMaximumSize(QSize(50, 50));
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/arrowdown.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonDown->setIcon(icon);
gridLayout_2->addWidget(pushButtonDown, 2, 2, 1, 1);
pushButtonEnsure = new QPushButton(ZkEdit);
pushButtonEnsure->setObjectName(QString::fromUtf8("pushButtonEnsure"));
pushButtonEnsure->setMinimumSize(QSize(50, 50));
pushButtonEnsure->setMaximumSize(QSize(50, 50));
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/icon/sure.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonEnsure->setIcon(icon1);
pushButtonEnsure->setIconSize(QSize(24, 24));
gridLayout_2->addWidget(pushButtonEnsure, 1, 2, 1, 1);
pushButtonLeft = new QPushButton(ZkEdit);
pushButtonLeft->setObjectName(QString::fromUtf8("pushButtonLeft"));
pushButtonLeft->setMinimumSize(QSize(50, 50));
pushButtonLeft->setMaximumSize(QSize(50, 50));
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/icon/arrowleft.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonLeft->setIcon(icon2);
gridLayout_2->addWidget(pushButtonLeft, 1, 1, 1, 1);
pushButtonUp = new QPushButton(ZkEdit);
pushButtonUp->setObjectName(QString::fromUtf8("pushButtonUp"));
pushButtonUp->setMinimumSize(QSize(50, 50));
pushButtonUp->setMaximumSize(QSize(50, 50));
QIcon icon3;
icon3.addFile(QString::fromUtf8(":/icon/arrowup.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonUp->setIcon(icon3);
gridLayout_2->addWidget(pushButtonUp, 0, 2, 1, 1);
pushButtonRight = new QPushButton(ZkEdit);
pushButtonRight->setObjectName(QString::fromUtf8("pushButtonRight"));
pushButtonRight->setMinimumSize(QSize(50, 50));
pushButtonRight->setMaximumSize(QSize(50, 50));
QIcon icon4;
icon4.addFile(QString::fromUtf8(":/icon/arrowright.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonRight->setIcon(icon4);
gridLayout_2->addWidget(pushButtonRight, 1, 3, 1, 1);
verticalLayout->addLayout(gridLayout_2);
gridLayout = new QGridLayout();
gridLayout->setSpacing(5);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
pushButtonReduce = new QPushButton(ZkEdit);
pushButtonReduce->setObjectName(QString::fromUtf8("pushButtonReduce"));
pushButtonReduce->setMinimumSize(QSize(0, 45));
QIcon icon5;
icon5.addFile(QString::fromUtf8(":/icon/zoomout.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonReduce->setIcon(icon5);
gridLayout->addWidget(pushButtonReduce, 1, 2, 1, 1);
pushButtonSave = new QPushButton(ZkEdit);
pushButtonSave->setObjectName(QString::fromUtf8("pushButtonSave"));
QIcon icon6;
icon6.addFile(QString::fromUtf8(":/icon/filesave.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonSave->setIcon(icon6);
gridLayout->addWidget(pushButtonSave, 6, 1, 1, 1);
pushButtonNew = new QPushButton(ZkEdit);
pushButtonNew->setObjectName(QString::fromUtf8("pushButtonNew"));
QIcon icon7;
icon7.addFile(QString::fromUtf8(":/icon/filenew.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonNew->setIcon(icon7);
gridLayout->addWidget(pushButtonNew, 6, 2, 1, 1);
spinBoxWidthPoint = new QSpinBox(ZkEdit);
spinBoxWidthPoint->setObjectName(QString::fromUtf8("spinBoxWidthPoint"));
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(spinBoxWidthPoint->sizePolicy().hasHeightForWidth());
spinBoxWidthPoint->setSizePolicy(sizePolicy);
spinBoxWidthPoint->setMaximumSize(QSize(16777215, 37));
spinBoxWidthPoint->setMinimum(1);
spinBoxWidthPoint->setMaximum(256);
spinBoxWidthPoint->setValue(12);
gridLayout->addWidget(spinBoxWidthPoint, 3, 1, 1, 1);
pushButtonSaveAs = new QPushButton(ZkEdit);
pushButtonSaveAs->setObjectName(QString::fromUtf8("pushButtonSaveAs"));
QIcon icon8;
icon8.addFile(QString::fromUtf8(":/icon/filesaveas.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonSaveAs->setIcon(icon8);
gridLayout->addWidget(pushButtonSaveAs, 5, 2, 1, 1);
label_2 = new QLabel(ZkEdit);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setMaximumSize(QSize(16777215, 20));
gridLayout->addWidget(label_2, 2, 2, 1, 1);
checkBoxPicExpand = new QCheckBox(ZkEdit);
checkBoxPicExpand->setObjectName(QString::fromUtf8("checkBoxPicExpand"));
gridLayout->addWidget(checkBoxPicExpand, 0, 1, 1, 1);
pushButtonOpen = new QPushButton(ZkEdit);
pushButtonOpen->setObjectName(QString::fromUtf8("pushButtonOpen"));
QIcon icon9;
icon9.addFile(QString::fromUtf8(":/icon/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonOpen->setIcon(icon9);
gridLayout->addWidget(pushButtonOpen, 5, 1, 1, 1);
label = new QLabel(ZkEdit);
label->setObjectName(QString::fromUtf8("label"));
label->setMaximumSize(QSize(16777215, 20));
gridLayout->addWidget(label, 2, 1, 1, 1);
lineEdit = new QLineEdit(ZkEdit);
lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
lineEdit->setEnabled(false);
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(lineEdit->sizePolicy().hasHeightForWidth());
lineEdit->setSizePolicy(sizePolicy1);
lineEdit->setMaximumSize(QSize(80, 16777215));
lineEdit->setMaxLength(11);
gridLayout->addWidget(lineEdit, 4, 1, 1, 1);
spinBoxHeightPoint = new QSpinBox(ZkEdit);
spinBoxHeightPoint->setObjectName(QString::fromUtf8("spinBoxHeightPoint"));
sizePolicy.setHeightForWidth(spinBoxHeightPoint->sizePolicy().hasHeightForWidth());
spinBoxHeightPoint->setSizePolicy(sizePolicy);
spinBoxHeightPoint->setMinimum(1);
spinBoxHeightPoint->setMaximum(256);
spinBoxHeightPoint->setValue(12);
gridLayout->addWidget(spinBoxHeightPoint, 3, 2, 1, 1);
pushButtonEnlarge = new QPushButton(ZkEdit);
pushButtonEnlarge->setObjectName(QString::fromUtf8("pushButtonEnlarge"));
pushButtonEnlarge->setMinimumSize(QSize(0, 45));
QIcon icon10;
icon10.addFile(QString::fromUtf8(":/icon/zoomin.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonEnlarge->setIcon(icon10);
gridLayout->addWidget(pushButtonEnlarge, 1, 1, 1, 1);
pushButtonImport = new QPushButton(ZkEdit);
pushButtonImport->setObjectName(QString::fromUtf8("pushButtonImport"));
QIcon icon11;
icon11.addFile(QString::fromUtf8(":/icon/fileimport.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonImport->setIcon(icon11);
gridLayout->addWidget(pushButtonImport, 4, 2, 1, 1);
checkBoxTrimPic = new QCheckBox(ZkEdit);
checkBoxTrimPic->setObjectName(QString::fromUtf8("checkBoxTrimPic"));
gridLayout->addWidget(checkBoxTrimPic, 0, 2, 1, 1);
verticalLayout->addLayout(gridLayout);
horizontalLayout->addLayout(verticalLayout);
gridLayout_3->addLayout(horizontalLayout, 0, 0, 1, 1);
retranslateUi(ZkEdit);
QMetaObject::connectSlotsByName(ZkEdit);
} // setupUi
void retranslateUi(QWidget *ZkEdit)
{
ZkEdit->setWindowTitle(QApplication::translate("ZkEdit", "Form", 0, QApplication::UnicodeUTF8));
labelScaleLeval->setText(QApplication::translate("ZkEdit", "\347\274\226\350\276\221\345\233\276\346\241\210", 0, QApplication::UnicodeUTF8));
labelFileName->setText(QString());
pushButtonDown->setText(QString());
pushButtonEnsure->setText(QString());
pushButtonLeft->setText(QString());
pushButtonUp->setText(QString());
pushButtonRight->setText(QString());
pushButtonReduce->setText(QApplication::translate("ZkEdit", "\347\274\251\345\260\217", 0, QApplication::UnicodeUTF8));
pushButtonSave->setText(QApplication::translate("ZkEdit", "\344\277\235\345\255\230", 0, QApplication::UnicodeUTF8));
pushButtonNew->setText(QApplication::translate("ZkEdit", "\346\226\260\345\273\272", 0, QApplication::UnicodeUTF8));
pushButtonSaveAs->setText(QApplication::translate("ZkEdit", "\344\277\235\345\255\230\344\270\272", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("ZkEdit", "\351\253\230\345\272\246", 0, QApplication::UnicodeUTF8));
checkBoxPicExpand->setText(QApplication::translate("ZkEdit", "\345\233\276\345\203\217\346\211\251\345\274\240", 0, QApplication::UnicodeUTF8));
pushButtonOpen->setText(QApplication::translate("ZkEdit", "\346\211\223\345\274\200", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("ZkEdit", "\345\256\275\345\272\246", 0, QApplication::UnicodeUTF8));
lineEdit->setText(QApplication::translate("ZkEdit", "A", 0, QApplication::UnicodeUTF8));
pushButtonEnlarge->setText(QApplication::translate("ZkEdit", "\346\224\276\345\244\247", 0, QApplication::UnicodeUTF8));
pushButtonImport->setText(QApplication::translate("ZkEdit", "\345\257\274\345\205\245", 0, QApplication::UnicodeUTF8));
checkBoxTrimPic->setText(QApplication::translate("ZkEdit", "\345\233\276\345\203\217\350\243\201\345\211\252", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class ZkEdit: public Ui_ZkEdit {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ZKEDIT_H
@@ -0,0 +1,111 @@
/****************************************************************************
** Meta object code from reading C++ file 'dialogshowcounter.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../dialogshowcounter.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dialogshowcounter.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DialogShowCounter[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: signature, parameters, type, tag, flags
39, 19, 18, 18, 0x05,
// slots: signature, parameters, type, tag, flags
67, 18, 18, 18, 0x08,
91, 18, 18, 18, 0x08,
125, 18, 18, 18, 0x08,
0 // eod
};
static const char qt_meta_stringdata_DialogShowCounter[] = {
"DialogShowCounter\0\0cycle_time,area_end\0"
"set_count_endvalue(int,int)\0"
"on_pushButton_clicked()\0"
"on_CycleprintpushButton_clicked()\0"
"ondialogcycleprintAccepted()\0"
};
void DialogShowCounter::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
DialogShowCounter *_t = static_cast<DialogShowCounter *>(_o);
switch (_id) {
case 0: _t->set_count_endvalue((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
case 1: _t->on_pushButton_clicked(); break;
case 2: _t->on_CycleprintpushButton_clicked(); break;
case 3: _t->ondialogcycleprintAccepted(); break;
default: ;
}
}
}
const QMetaObjectExtraData DialogShowCounter::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DialogShowCounter::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DialogShowCounter,
qt_meta_data_DialogShowCounter, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DialogShowCounter::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DialogShowCounter::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DialogShowCounter::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DialogShowCounter))
return static_cast<void*>(const_cast< DialogShowCounter*>(this));
return QDialog::qt_metacast(_clname);
}
int DialogShowCounter::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
}
return _id;
}
// SIGNAL 0
void DialogShowCounter::set_count_endvalue(int _t1, int _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,153 @@
/****************************************************************************
** Meta object code from reading C++ file 'modbusserial.h'
**
** Created: Wed Dec 25 15:36:17 2024
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../modbus/modbusserial.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'modbusserial.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 62
#error "This file was generated using the moc from 4.6.3. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_ModbusSerial[] = {
// content:
4, // revision
0, // classname
0, 0, // classinfo
9, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
8, // signalCount
// signals: signature, parameters, type, tag, flags
14, 13, 13, 13, 0x05,
29, 13, 13, 13, 0x05,
42, 13, 13, 13, 0x05,
55, 13, 13, 13, 0x05,
69, 67, 13, 13, 0x05,
92, 13, 13, 13, 0x05,
106, 13, 13, 13, 0x05,
142, 122, 13, 13, 0x05,
// slots: signature, parameters, type, tag, flags
183, 177, 170, 13, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_ModbusSerial[] = {
"ModbusSerial\0\0updateQRcode()\0startPrint()\0"
"pausePrint()\0stopPrint()\0,\0"
"openFile(QString,bool)\0faultResume()\0"
"writeCalendar()\0lineSpace,charSpace\0"
"mbLineAndCharSpace(int,int)\0qint32\0"
"index\0processCommands(qint32)\0"
};
const QMetaObject ModbusSerial::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_ModbusSerial,
qt_meta_data_ModbusSerial, 0 }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &ModbusSerial::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *ModbusSerial::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *ModbusSerial::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_ModbusSerial))
return static_cast<void*>(const_cast< ModbusSerial*>(this));
return QObject::qt_metacast(_clname);
}
int ModbusSerial::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: updateQRcode(); break;
case 1: startPrint(); break;
case 2: pausePrint(); break;
case 3: stopPrint(); break;
case 4: openFile((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
case 5: faultResume(); break;
case 6: writeCalendar(); break;
case 7: mbLineAndCharSpace((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
case 8: { qint32 _r = processCommands((*reinterpret_cast< qint32(*)>(_a[1])));
if (_a[0]) *reinterpret_cast< qint32*>(_a[0]) = _r; } break;
default: ;
}
_id -= 9;
}
return _id;
}
// SIGNAL 0
void ModbusSerial::updateQRcode()
{
QMetaObject::activate(this, &staticMetaObject, 0, 0);
}
// SIGNAL 1
void ModbusSerial::startPrint()
{
QMetaObject::activate(this, &staticMetaObject, 1, 0);
}
// SIGNAL 2
void ModbusSerial::pausePrint()
{
QMetaObject::activate(this, &staticMetaObject, 2, 0);
}
// SIGNAL 3
void ModbusSerial::stopPrint()
{
QMetaObject::activate(this, &staticMetaObject, 3, 0);
}
// SIGNAL 4
void ModbusSerial::openFile(QString _t1, bool _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 4, _a);
}
// SIGNAL 5
void ModbusSerial::faultResume()
{
QMetaObject::activate(this, &staticMetaObject, 5, 0);
}
// SIGNAL 6
void ModbusSerial::writeCalendar()
{
QMetaObject::activate(this, &staticMetaObject, 6, 0);
}
// SIGNAL 7
void ModbusSerial::mbLineAndCharSpace(int _t1, int _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 7, _a);
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,741 @@
#include "TriggerCtrl.h"
#include "ui_triggerctrl.h"
#include <QCheckBox>
#include <QMessageBox>
#include <QValidator>
#include <QDoubleValidator>
#include "qdebug.h"
#include <stdio.h>
#include "myinclude.h"
#include "Public.h"
#include "VerBVersion.h"
#include "DevOp.h"
#include "InkJetPrinter.h"
extern InkJetPrinter *pInkJectPrinter;
/* readme: 20140809
1. 同步字宽mm: 0.1+ w*(4-0.1) = 0.1+3.9w (mm)
2. 按长度喷印:
*/
// 20140923-12:05版本存在图形方式下变量不变绿问题,新版本已经更正
// 20141013-16:36修正密码有效期设置错误。
//2015-10-17 二维码变量问题
// 2015-11-01 无聊: 要从V6S版本恢复原来的 para.set_HVData_Flag = 0; 参数
// 估计过段时间又要要求增加 UART功能。 V6S 原来已经有这个功能了。但他们不用!!
// 20151109 新增计数1和计数器2单独立即清零 版本号 No42
// 更新了Vietname字库,使用中文使用wenquanyiBitmap,编译uncode编码使用wenquanyimicrohei,英文自己编,越南语自己编,基于DejaVu Sans
// 新版软件更新或升级,会因参数错位,出现隔膜位置设定值(等参数)错误,引起主墨泵不工作,开机不循环等现象。(解决办法,重新检查并设置所有参数)
// 20160203:修改了变量定位方式,更新的Image图片。 将左下角更换为RGB = 250,250,0 -=== 0xFFF7FC00
// 修正了停止打印关闭高压的问题,重新打印出现高压故障
// 修改了密码一周一变,增加了密码校验,需要使用新版20以上的手机密码软件,密码为7位;
// 20160218 修改了提示框显示方式,避免提示阻塞处理进程
// 20160304 优化了变量显示; 增加了中心旋转交替功能;增加了 13位随机码打印功能; 修正界面显示字库部分汉字问题
// 本次修改需要同时更并按ARM和FPGA
// FPGA实现自动点距调整,实现连续点位置修正 20160714 FPGA版本 V44, 0714B
// 20160715 : 去掉了“点距电压微调”、“内存数据显示”、部分相检控制参数设置
// 20160729: 发现打开历史记录会死机问题,原因待查。但执行删除历史记录后,可避免再次死机。
// 20160723: 增加电眼复位功能。 与电眼清零不同,复位时,计数不清零,而是等于预设的当前值。
// 20160718: 参考日立方案,优化打印效果
/*
20160728:发现历史记录打开时,会死机
20160729: 查找原因:fi
// 20160806:重要修改 : 毫米脉冲的系数由X8改为X256,原因是:使用X8时传递误差较大,导致1000mm会有6mm误差, 使用X256(即8位二进制表示小数时,可以精确到0.004,从而提高精度)
X8 时,小数精度为0.125而已
20160812:增加左横,右横变量
if((varType<9) // 普通变量
||(varType>=20 && varType<29) // 横左变量
||(varType>=40 && varType<49) // 右横变量
if(fontname.contains("SerifL") ||fontname.contains("serifl") ) varType1= 20+varType;
else if(fontname.contains("SerifR") ||fontname.contains("serifr") ) varType1= 40+varType;
20160831: 增加临时密码,每小时一变
20160904: 解决重新开机后,有时不能自动打印文件问题。
20160905: 第二行单独变量时显示不全问题
// 20160912: 去掉高压故障自动关闭回收的默认值 1
// 20160912: 设置了隐藏按键,用于对墨线时间和开机次数进行复位 No49
20160927: FIFO实现RAND 码上传,暂时与RST0806 No49区别开来 No50
20161212: 修改总产品计数器清零功能。由ARM清零改为FPGA清零 No51 // [3]总产品计数器清零FPGA
20161217: 增加了 SPV210编译选项,以处理V6核心版驱动问题
修改随机码处理函数,以解决 不能输出奇数位 随机码问题。
20170217: 有厂家只想打一条横线,改最小列点阵数。
20170224: 输入密码不回显
20170313: 修改开机重启或重载参数时,设定计数当前值为起始值
20170318: 制作0318版本的刷机文件
20170803: 增加外接屏功能,20170808完成
*/
#ifdef MIMA
#ifdef ALT16
#define BVER "(ALT53)" TST // 20160801 之前使用 RST46
#else
#define BVER "(SUN53)" TST // 20160801 之前使用 RST46
#endif
#endif
//#define NON_CABLE//喷印间隔固定
// 20160507 1138
// 20161209 编辑 小数点喷印间隔
// 20170603: 太阳能条码专用版本
// Nam Ninh phồng tuyệt vời Mã Technology Co., Ltd.
TriggerCtrl::TriggerCtrl(QWidget *parent) :
QWidget(parent),
ui(new Ui::TriggerCtrl)
{
ui->setupUi(this);
//#ifdef SYNLENFLOAT
QRegExp double_rx100("10000000|([0-9]{1,8}[\.][0-9]{0,1})");
ui->spinBoxSynTriggerPrintLen->setValidator(new QRegExpValidator(double_rx100,ui->spinBoxSynTriggerPrintLen));
#ifdef NON_CABLE
ui->spinBoxSynTriggerPrintLen->setEnabled(0);
#endif
//#endif
pulseNumFix = new PulseNumFix(parent);
pulseNumFix->hide();
ui->lineEditTriggerPulsePerMm->setValidator(new QDoubleValidator(0));
connect(pulseNumFix,SIGNAL(pulseNuxFixDone(float)),this,SLOT(onPulseNumFixDone(float)));
//ui->test_version->setText (tr(BUILD_DATE));
updateSysStatusToUI();
QString s;
#if 0 /* roger use new Version manage,so delete it */
s.sprintf(" %s ",__TIME__);
#ifdef MYTEST
s = (QString) Public::DateToString(__DATE__)+s + "A2451测试";
#else
s = (QString) Public::DateToString(__DATE__)+s + BVER;
#endif
#else
s.sprintf("%d.%d.%02d_GuiL_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER);
s = s + (QString) Public::DateToString(__DATE__)+"_"+ QString(__TIME__)+"_"+ UP_PRINTER_STAGE_VER;
//s = s + BVER;
#endif
ui->test_version->setText(s);
ui->checkBoxEleEyeMakeClean->setVisible(false);
tr("独立参数");
//ui->labelDelayTriggerValue->setText(tr("重复间隔(毫秒)"));
//--if( QString(BUILD_DATE).left(21)!="2015-10-26 20:56(M40)"){
//--ui->labelEleMaskTime->hide();
//--ui->spinBoxEleMaskTime->hide();
//--}
if(Public::ReadLanguageName()=="Chinese"){
ui->label_miv12->setPixmap(QPixmap(QString::fromUtf8(":/image/MIV12.png")));
}else
{
ui->label_miv12->setPixmap(QPixmap(QString::fromUtf8(":/image/MIV13.png")));
}
//qDebug()<<"Run TriggerCtrl ok.";
#ifdef ENGLISH
ui->label_miv12->setPixmap(QPixmap(QString::fromUtf8(":/image/MIV13.png")));
#endif
ui->spinBoxOuputPulseCol->setHidden(1);
// ui->labelOuputPulseCol->setHidden(1);
}
TriggerCtrl::~TriggerCtrl()
{
delete ui;
delete pulseNumFix;
}
void TriggerCtrl::setTriggerUI(int triggerMode){
ui->radioButtonDelayTrigger->setChecked(triggerMode == PRINT_TRIGGER_TIME);
ui->spinBoxDelayTriggerValue->setEnabled(triggerMode == PRINT_TRIGGER_TIME);
ui->labelDelayTriggerValue->setEnabled(triggerMode == PRINT_TRIGGER_TIME);
ui->comboBoxTimeTriggerMode->setEnabled(triggerMode == PRINT_TRIGGER_TIME);
ui->labelTimeTriggerMode->setEnabled(triggerMode == PRINT_TRIGGER_TIME);
ui->radioButtonEleEyeEdgetTrigger->setChecked( triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->radioButtonEleEyeLevelTrigger->setChecked(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL);
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->labelEleEyeTriggerIntervalMs->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->spinBoxEleEyeTriggerRepeatCnt->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->labelEleEyeTriggerRepeatCnt->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->spinBoxEleEyeTriggerPrintDelay->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE || PRINT_TRIGGER_SYNCHRONIZER);
ui->labelEleEyeTriggerPrintDelay->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE || PRINT_TRIGGER_SYNCHRONIZER);
ui->checkBoxSynMakeClean->setEnabled(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->checkEyeTriggerSynPrintEn->setEnabled (triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->labelEleMaskTime->setEnabled (triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
ui->spinBoxEleMaskTime->setEnabled (triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE);
if(sysPara->para.eleEyeTriggerSynPrintEn &&
(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE)
)
{
//ui->radioButtonSynTrigger->setChecked(1);
ui->spinBoxSynTriggerPrintLen->setEnabled(0);
ui->labelSynTriggerPrintLen->setEnabled(1);
ui->lineEditTriggerPulsePerMm->setEnabled(1);
ui->labelTriggerPulsePerMm->setEnabled(1);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(1);
ui->labelSynTriggerPrintLenRatio->setEnabled(1);
ui->checkBoxEleEyeMakeClean->setEnabled(1);
ui->pushButtonApplyPulseFix->setEnabled(1);
ui->comboBoxSynPrintMode->setEnabled(1);
ui->labelSynPrintMode->setEnabled(1);
//ui->checkBoxAutoSpeedEN->setEnabled (1);
ui->labelEleMaskTime->setEnabled(1);
ui->spinBoxEleMaskTime->setEnabled(1);
//ui->spinBoxEleMaskTime->setEnabled(1);
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫米)"));
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫米)"));
ui->labelEleMaskTime->setText(tr("封锁间隔(毫米)"));
}
else
{
ui->radioButtonSynTrigger->setChecked(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
#ifndef NON_CABLE
ui->spinBoxSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
#endif
ui->labelSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->lineEditTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->checkBoxEleEyeMakeClean->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->pushButtonApplyPulseFix->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->comboBoxSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->checkBoxAutoSpeedEN->setEnabled (triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->labelEleMaskTime->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->spinBoxEleMaskTime->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
if(triggerMode == PRINT_TRIGGER_SYNCHRONIZER)
{
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫米)"));
}
else
{
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫秒)"));
}
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫秒)"));
ui->labelEleMaskTime->setText(tr("封锁时间(毫秒)"));
}
if(( ( //sysPara->para.eleEyeTriggerSynPrintEn ||
ui->checkEyeTriggerSynPrintEn->isChecked())
&&(triggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || triggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE))
|| triggerMode == PRINT_TRIGGER_SYNCHRONIZER )
{
ui->labelOutputPulseDelayMs->setText(tr("延时(毫米):"));
}
else ui->labelOutputPulseDelayMs->setText(tr("延时(毫秒):"));
setSynPrintMode(sysPara->para.sysTriggerPrintMode);
//72版本禁用该输入框
//67打开
// if(triggerMode== PRINT_TRIGGER_SYNCHRONIZER){
// const unsigned short &FpgaVer=sysPara->status.build_dat.builTime;
// if(72==FpgaVer)
// {
// ui->spinBoxSynTriggerPrintLenRatio->setValue(0);
// ui->spinBoxSynTriggerPrintLenRatio->setEnabled(false);
// }
// else if(67==FpgaVer)
// {
// ui->spinBoxSynTriggerPrintLenRatio->setEnabled(true);
// }
// }
// else{
// ui->spinBoxSynTriggerPrintLenRatio->setValue(0);
// ui->spinBoxSynTriggerPrintLenRatio->setEnabled(false);
// }
}
void TriggerCtrl::setSynPrintMode(int mode){
ui->labelSynTriggerPrintLenRatio->setText((mode == SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH)?tr("字符宽度"):tr("喷印比例(%)"));
ui->comboBoxSynPrintMode->setCurrentIndex(mode);
//ui->spinBoxSynTriggerPrintLenRatio->setValue((mode == SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH)?sysPara->para.synCharWidthRatio:sysPara->para.synTriggerPrintLenRatio);
//edit@11-18
if(SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH!=mode)
{
ui->spinBoxSynTriggerPrintLenRatio->setValue(sysPara->para.synTriggerPrintLenRatio);
}
const bool bShow=SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH!=mode;
//隐藏文本框
ui->labelSynTriggerPrintLenRatio->setVisible(bShow);
//隐藏输入框
ui->spinBoxSynTriggerPrintLenRatio->setVisible(bShow);
}
void TriggerCtrl::GetTriggerUIPara(){
if(sysPara){
sysPara->para.printDelayMs = ui->spinBoxDelayTriggerValue->value();
sysPara->para.timeTriggerPrintMode = ui->comboBoxTimeTriggerMode->currentIndex();
sysPara->para.elecEyeTriggerInterval = ui->spinBoxEleEyeTriggerIntervalMs->value();
sysPara->para.photoElectricityRepeateNum = ui->spinBoxEleEyeTriggerRepeatCnt->value();
//
sysPara->para.synTriggerPrintLenMm = ui->spinBoxSynTriggerPrintLen->text().toFloat();
//sysPara->para.synTriggerPrintLenMm = ui->spinBoxSynTriggerPrintLen->value();
#ifdef NON_CABLE
sysPara->para.synTriggerPrintLenMm = 255.0;
ui->spinBoxSynTriggerPrintLen->setText("255");
#endif
sysPara->para.synPulseNumPerMm = ui->lineEditTriggerPulsePerMm->text().toFloat();
sysPara->para.sysTriggerPrintMode = ui->comboBoxSynPrintMode->currentIndex();
if(sysPara->para.sysTriggerPrintMode == SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH)
//edit@11-19
;//sysPara->para.synCharWidthRatio = ui->spinBoxSynTriggerPrintLenRatio->value();
else
sysPara->para.synTriggerPrintLenRatio = ui->spinBoxSynTriggerPrintLenRatio->value();
// 原代码:
//sysPara->para.AltMirrorGap =(unsigned int) ( ((unsigned int)ui->spinBoxAltMirrorGap->value()) & 0x7fff) | ( ui->comboBoxAltMirrType->currentIndex()==1?0x8000:0x0000);
// 20160303:
sysPara->para.AltMirrorGap =(unsigned int) ( ((unsigned int)ui->spinBoxAltMirrorGap->value()) & 0x0fff) |( ( ui->comboBoxAltMirrType->currentIndex())<<12 );
//qDebug()<< (sysPara->para.AltMirrorGap & 0x0fff) << (sysPara->para.AltMirrorGap & 0xf000);
if(ui->radioButtonDelayTrigger->isChecked())
sysPara->para.printTriggerMode = PRINT_TRIGGER_TIME;
else if(ui->radioButtonEleEyeLevelTrigger->isChecked())
sysPara->para.printTriggerMode = PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL;
else if(ui->radioButtonEleEyeEdgetTrigger->isChecked())
sysPara->para.printTriggerMode = PRINT_TRIGGER_ELEC_EYE_EDGE;
else if(ui->radioButtonSynTrigger->isChecked())
sysPara->para.printTriggerMode = PRINT_TRIGGER_SYNCHRONIZER;
else
sysPara->para.printTriggerMode = PRINT_TRIGGER_NONE;
sysPara->para.eleEyeTriggerSynPrintEn = ui->checkEyeTriggerSynPrintEn->isChecked ();
sysPara->para.eleEyeTriggerPrintDelay = ui->spinBoxEleEyeTriggerPrintDelay->value();
sysPara->para.synClearCntInEleEyeMode = ui->checkBoxSynMakeClean->isChecked();
sysPara->para.eleEyeClearCntInSynMode = (sysPara->para.eleEyeClearCntInSynMode & 0xf0) + ui->comboBoxEleEyeMakeClean->currentIndex(); //ui->checkBoxEleEyeMakeClean->isChecked();
//sysPara->para.autoSynSpeedEn = ui->checkBoxAutoSpeedEN->isChecked ();
sysPara->para.autoSynSpeedEn = 0;
//sysPara->para.synPulsePerMmX8 = (unsigned short)(sysPara->para.synPulseNumPerMm *256);
sysPara->para.synPulsePerMmX8 = (unsigned short)((unsigned int)sysPara->para.synPulseNumPerMm <<8);
sysPara->para.eleMaskTime = ui->spinBoxEleMaskTime->value();
//qDebug()<<"eleEyeClearCntInSynMode"<< sysPara->para.eleEyeClearCntInSynMode ;
sysPara->para.synchronizorActType = ui->comboBoxSyncActType->currentIndex();
//qDebug()<<"synchronizorActType"<< sysPara->para.synchronizorActType;
sysPara->para.pulse_sinal_value = ui->spinBoxpluseSinal->value();
}
}
void TriggerCtrl::TriggerupdateSysParaToUI(){
updateSysParaToUI();
}
void TriggerCtrl::updateSysParaToUI(){
if(sysPara)
{
/*----------------------------------------*/
setTriggerUI(sysPara->para.printTriggerMode);
ui->spinBoxDelayTriggerValue->setValue(sysPara->para.printDelayMs);
#ifndef NON_CABLE
ui->comboBoxTimeTriggerMode->setCurrentIndex(sysPara->para.timeTriggerPrintMode);
#endif
ui->spinBoxEleEyeTriggerIntervalMs->setValue(sysPara->para.elecEyeTriggerInterval);
ui->spinBoxOutputPulseDelayMs->setValue(sysPara->para.outputPulseDelayMs);
ui->spinBoxEleEyeTriggerRepeatCnt->setValue(sysPara->para.photoElectricityRepeateNum);
//ui->spinBoxSynTriggerPrintLen->setValue(sysPara->para.synTriggerPrintLenMm);
ui->spinBoxSynTriggerPrintLen->setText(QString::number(sysPara->para.synTriggerPrintLenMm));
ui->lineEditTriggerPulsePerMm->setText(QString::number(sysPara->para.synPulseNumPerMm));
if(sysPara->para.sysTriggerPrintMode == SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH)
//edit@11-19
;//ui->spinBoxSynTriggerPrintLenRatio->setValue(sysPara->para.synCharWidthRatio);
else
ui->spinBoxSynTriggerPrintLenRatio->setValue(sysPara->para.synTriggerPrintLenRatio);
/*----------------------------------------*/
ui->spinBoxEleEyeTriggerPrintDelay->setValue(sysPara->para.eleEyeTriggerPrintDelay);
ui->checkBoxSynMakeClean->setChecked(sysPara->para.synClearCntInEleEyeMode);
//ui->checkBoxEleEyeMakeClean->setChecked(sysPara->para.eleEyeClearCntInSynMode);
ui->comboBoxEleEyeMakeClean->setCurrentIndex( sysPara->para.eleEyeClearCntInSynMode & 0x0f);
ui->checkBoxPulseOutputEnable->setChecked(sysPara->para.pulseOutputEnable);
ui->labelProductCntPerOutputPulse->setEnabled(sysPara->para.pulseOutputEnable);
ui->spinBoxProductCntPerOutputPulse->setEnabled(sysPara->para.pulseOutputEnable);
ui->spinBoxProductCntPerOutputPulse->setValue(sysPara->para.productCntPerOutputPulse);
ui->labelOutputPulseDelayMs->setEnabled(sysPara->para.pulseOutputEnable);
//ui->spinBoxOutputPulseDelayMs->setEnabled(sysPara->para.pulseOutputEnable);
ui->spinBoxOutputPulseDelayMs->setEnabled(true /*sysPara->para.outputPulseDelayMs*/);
ui->spinBoxOuputPulseCol->setValue(sysPara->para.OuputPulseCol);
ui->checkEyeTriggerSynPrintEn->setChecked (sysPara->para.eleEyeTriggerSynPrintEn);
ui->comboBoxSyncActType->setCurrentIndex (sysPara->para.synchronizorActType);
//ui->checkBoxAutoSpeedEN->setChecked (sysPara->para.autoSynSpeedEn );
ui->spinBoxEleMaskTime->setValue(sysPara->para.eleMaskTime);
ui->spinBoxAltMirrorGap->setValue( sysPara->para.AltMirrorGap & 0x0fff );
ui->comboBoxAltMirrType->setCurrentIndex( (sysPara->para.AltMirrorGap>>12) & 0x000F);
ui->spinBoxpluseSinal->setValue(sysPara->para.pulse_sinal_value);
//72版本禁用该输入框
//67打开
}
}
void TriggerCtrl::applyUIPara(){
if(sysPara){
GetTriggerUIPara();
if(sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER)
{
if( sysPara->para.synTriggerPrintLenMm < sysPara->para.eleEyeTriggerPrintDelay )
{
QMessageBox::information(this,tr("提示:参数不正确"),tr("要求:触发长度小于喷印间隔"));
}
}
sysPara->para.pulseOutputEnable = ui->checkBoxPulseOutputEnable->isChecked();
sysPara->para.productCntPerOutputPulse = ui->spinBoxProductCntPerOutputPulse->value();
sysPara->para.outputPulseDelayMs = ui->spinBoxOutputPulseDelayMs->value();
sysPara->para.OuputPulseCol = ui->spinBoxOuputPulseCol->value();
if(( ( //sysPara->para.eleEyeTriggerSynPrintEn ||
ui->checkEyeTriggerSynPrintEn->checkState()==1 )
&&(sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL || sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE))
|| sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER )
{
ui->labelOutputPulseDelayMs->setText(tr("延时(毫米):"));
}
else ui->labelOutputPulseDelayMs->setText(tr("延时(毫秒):"));
#ifdef DEBUG1
qDebug()<<"TriggerCtrl::applyUIPara"<<"1";
#endif
if(sysPara->devOp->writeFpgaPrintPara() != -1)
QMessageBox::information(this,tr("提示"),tr("应用成功"));
#ifdef DEBUG1
qDebug()<<"TriggerCtrl::applyUIPara"<<"3";
#endif
}
}
void TriggerCtrl::updateSysStatusToUI(){
static char t_init = 0;
if(sysPara){
if(t_init == 0){
sysPara->loadParaFromFile();
//qDebug()<<"sysPara->para.pulse_sinal_value="<<sysPara->para.pulse_sinal_value;
ui->spinBoxpluseSinal->setValue(sysPara->para.pulse_sinal_value);
t_init = 1;
}
// if((sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER))
// {
// ui->lineEditPulseCount ->setText(QString::number((int )((sysPara->para.synTriggerPrintLenMm)*sysPara->para.synPulseNumPerMm)));
// }
// else if(((sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL
// ||sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE)
// && sysPara->para.eleEyeTriggerSynPrintEn))
// {
// ui->lineEditPulseCount ->setText(QString::number( (int )((sysPara->para.elecEyeTriggerInterval)*sysPara->para.synPulseNumPerMm)));
// }
}
}
void TriggerCtrl::on_checkEyeTriggerSynPrintEn_pressed()
{
#if 0
int triggerMode = sysPara->para.printTriggerMode;
if(sysPara)
{
//if( !sysPara->para.eleEyeTriggerSynPrintEn )
if( !ui->checkEyeTriggerSynPrintEn->isChecked() )
{
//ui->radioButtonSynTrigger->setChecked(1);
ui->spinBoxSynTriggerPrintLen->setEnabled(1);
ui->labelSynTriggerPrintLen->setEnabled(1);
ui->lineEditTriggerPulsePerMm->setEnabled(1);
ui->labelTriggerPulsePerMm->setEnabled(1);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(1);
ui->labelSynTriggerPrintLenRatio->setEnabled(1);
ui->checkBoxEleEyeMakeClean->setEnabled(1);
ui->pushButtonApplyPulseFix->setEnabled(1);
ui->comboBoxSynPrintMode->setEnabled(1);
ui->labelSynPrintMode->setEnabled(1);
ui->checkBoxAutoSpeedEN->setEnabled (1);
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(0);
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫米)"));
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫米)"));
ui->labelOutputPulseDelayMs->setText("延时(毫米):");
if(ui->checkBoxpausePrintSyncInv->isChecked())
{
ui->checkBoxpausePrintSyncInv->setChecked(false);
}
}
else
{
ui->radioButtonSynTrigger->setChecked(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->lineEditTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->checkBoxEleEyeMakeClean->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->pushButtonApplyPulseFix->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->comboBoxSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->checkBoxAutoSpeedEN->setEnabled (triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(1);
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫秒)"));
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫秒)"));
ui->labelOutputPulseDelayMs->setText( ui->radioButtonSynTrigger->isChecked()?"延时(毫米):":"延时(毫秒):");
}
// sysPara->para.eleEyeTriggerSynPrintEn=!sysPara->para.eleEyeTriggerSynPrintEn;
}
#endif
}
void TriggerCtrl::on_radioButtonDelayTrigger_pressed()
{
setTriggerUI(PRINT_TRIGGER_TIME);
// emit synDisableFontWidth(false);
}
void TriggerCtrl::on_radioButtonEleEyeEdgetTrigger_pressed()
{
setTriggerUI(PRINT_TRIGGER_ELEC_EYE_EDGE);
// emit synDisableFontWidth(false);
}
void TriggerCtrl::on_radioButtonEleEyeLevelTrigger_pressed()
{
setTriggerUI(PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL);
// emit synDisableFontWidth(false);
}
void TriggerCtrl::on_radioButtonSynTrigger_pressed()
{
//edit@11-19
sysPara->para.printTriggerMode = PRINT_TRIGGER_SYNCHRONIZER;
setTriggerUI(PRINT_TRIGGER_SYNCHRONIZER);
// const unsigned short &FpgaVer=sysPara->status.build_dat.builTime;
// //72版本禁用字符宽度
// if(72 == FpgaVer){
// ui->spinBoxSynTriggerPrintLenRatio->setValue(0);
// ui->spinBoxSynTriggerPrintLenRatio->setEnabled(0);
// }else if (67 == FpgaVer)
// ui->spinBoxSynTriggerPrintLenRatio->setEnabled(1);
// emit synDisableFontWidth(true);
}
void TriggerCtrl::on_pushButtonApplyPulseFix_clicked()
{
pulseNumFix->bindSysPara(sysPara);
pulseNumFix->hide();
pulseNumFix->show();
}
void TriggerCtrl::onPulseNumFixDone(float value){
ui->lineEditTriggerPulsePerMm->setText(QString::number(value));
}
void TriggerCtrl::on_comboBoxSynPrintMode_currentIndexChanged(int index)
{
setSynPrintMode(index);
}
void TriggerCtrl::on_pushButtonApply_pressed()
{
applyUIPara();
if(sysPara)sysPara->saveParaToFile ();
emit autoUpdateFontWidthByTriggerCtrl(sysPara->status.textEditTotalCol);
TriggerCtrlLog();
}
void TriggerCtrl::TriggerCtrlLog(){
qDebug()<<QString("TriggerCtrl 触发模式: %1").arg(sysPara->para.printTriggerMode);
qDebug()<<QString("TriggerCtrl 脉冲数/毫米: %1").arg(ui->lineEditTriggerPulsePerMm->text().toFloat());
qDebug()<<QString("TriggerCtrl 喷印间隔(毫米): %1").arg(ui->spinBoxSynTriggerPrintLen->text().toFloat());
qDebug()<<QString("TriggerCtrl 同步喷印模式: %1").arg(ui->comboBoxSynPrintMode->currentIndex());
qDebug()<<QString("TriggerCtrl 字符宽度: %1").arg(ui->spinBoxSynTriggerPrintLenRatio->value());
qDebug()<<QString("TriggerCtrl 电眼控制: %1").arg(ui->comboBoxEleEyeMakeClean->currentIndex());
qDebug()<<QString("TriggerCtrl 镜象交替类型: %1").arg(ui->comboBoxAltMirrType->currentIndex());
qDebug()<<QString("TriggerCtrl 镜像交替间隔: %1").arg(ui->spinBoxAltMirrorGap->value());
qDebug()<<QString("TriggerCtrl 脉冲信号值: %1").arg(ui->spinBoxpluseSinal->value());
qDebug()<<QString("TriggerCtrl 重复次数: %1").arg(ui->spinBoxEleEyeTriggerRepeatCnt->value());
qDebug()<<QString("TriggerCtrl 重复间隔(毫秒): %1").arg(ui->spinBoxEleEyeTriggerIntervalMs->value());
qDebug()<<QString("TriggerCtrl 同步打印: %1").arg(ui->checkEyeTriggerSynPrintEn->isChecked ());
qDebug()<<QString("TriggerCtrl 触发延时(毫秒): %1").arg(ui->spinBoxEleEyeTriggerPrintDelay->value());
qDebug()<<QString("TriggerCtrl 封锁时间(毫秒): %1").arg(ui->spinBoxEleMaskTime->value());
qDebug()<<QString("TriggerCtrl 同步器清零: %1").arg(ui->checkBoxSynMakeClean->isChecked());
qDebug()<<QString("TriggerCtrl 重复间隔(毫秒): %1").arg(ui->spinBoxDelayTriggerValue->value());
qDebug()<<QString("TriggerCtrl 间隔模式: %1").arg(ui->comboBoxTimeTriggerMode->currentIndex());
qDebug()<<QString("TriggerCtrl 同步器正反转打印: %1").arg(ui->comboBoxSyncActType->currentIndex());
qDebug()<<QString("TriggerCtrl 产生脉冲所需计数: %1").arg(ui->spinBoxProductCntPerOutputPulse->value());
qDebug()<<QString("TriggerCtrl 延时(毫秒): %1").arg(ui->spinBoxOutputPulseDelayMs->value());
qDebug()<<QString("TriggerCtrl 脉冲输出使能: %1").arg(ui->checkBoxPulseOutputEnable->isChecked());
}
void TriggerCtrl::on_checkBoxPulseOutputEnable_clicked()
{
bool checked = ui->checkBoxPulseOutputEnable->isChecked();
ui->labelProductCntPerOutputPulse->setEnabled(checked);
ui->spinBoxProductCntPerOutputPulse->setEnabled(checked);
//ui->labelOutputPulseDelayMs->setEnabled(checked);
//ui->spinBoxOutputPulseDelayMs->setEnabled(checked);
}
void TriggerCtrl::setBuildTime(QString s1)
{
QString s;
#if 0 /* roger use new Version manage,so delete it */
s.sprintf(" %s ",__TIME__);
s = (QString) Public::DateToString(__DATE__)+s + BVER;
#else
s.sprintf("%d.%d.%02d_GuiL_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER);
s = s + (QString) Public::DateToString(__DATE__)+ "_"+ QString(__TIME__)+"_"+UP_PRINTER_STAGE_VER;
// s = s + BVER;
#endif
ui->test_version->setText(s+s1);
//ui->test_version->setText (BUILD_DATE+s);
}
void TriggerCtrl::on_checkEyeTriggerSynPrintEn_clicked(bool checked)
{
int triggerMode = sysPara->para.printTriggerMode;
if(sysPara)
{
//if( !sysPara->para.eleEyeTriggerSynPrintEn )
if( checked)
{
//ui->radioButtonSynTrigger->setChecked(1);
#ifndef NON_CABLE
ui->spinBoxSynTriggerPrintLen->setEnabled(1);
#endif
ui->labelSynTriggerPrintLen->setEnabled(1);
ui->lineEditTriggerPulsePerMm->setEnabled(1);
ui->labelTriggerPulsePerMm->setEnabled(1);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(1);
ui->labelSynTriggerPrintLenRatio->setEnabled(1);
ui->checkBoxEleEyeMakeClean->setEnabled(1);
ui->pushButtonApplyPulseFix->setEnabled(1);
ui->comboBoxSynPrintMode->setEnabled(1);
ui->labelSynPrintMode->setEnabled(1);
//ui->checkBoxAutoSpeedEN->setEnabled (1);
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(0);
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫米)"));
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫米)"));
ui->labelEleMaskTime->setText(tr("封锁间隔(毫米)"));
ui->labelOutputPulseDelayMs->setText(tr("延时(毫米):"));
if(ui->comboBoxSyncActType->currentIndex() || 0b11) //如果不是在正反转打印的模式下,就切换到正反转模式
{
ui->comboBoxSyncActType->setCurrentIndex(0);
}
}
else
{
ui->radioButtonSynTrigger->setChecked(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
#ifndef NON_CABLE
ui->spinBoxSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
#endif
ui->labelSynTriggerPrintLen->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->lineEditTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelTriggerPulsePerMm->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynTriggerPrintLenRatio->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->checkBoxEleEyeMakeClean->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->pushButtonApplyPulseFix->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->comboBoxSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->labelSynPrintMode->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->checkBoxAutoSpeedEN->setEnabled (triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
//ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(triggerMode == PRINT_TRIGGER_SYNCHRONIZER);
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(1);
ui->labelEleEyeTriggerPrintDelay->setText(tr("触发延时(毫秒)"));
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫秒)"));
ui->labelEleMaskTime->setText(tr("封锁间隔(毫秒)"));
ui->labelOutputPulseDelayMs->setText( ui->radioButtonSynTrigger->isChecked()?tr("延时(毫米):"):tr("延时(毫秒):"));
}
}
}
void TriggerCtrl::on_comboBoxSyncActType_activated(int index)
{
if(index>0)
{
on_checkEyeTriggerSynPrintEn_clicked(false);
}
}
void TriggerCtrl::on_lineEditTriggerPulsePerMm_textChanged(const QString &arg1)
{
Q_UNUSED(arg1);
sysPara->para.synPulseNumPerMm = ui->lineEditTriggerPulsePerMm->text().toFloat();
}
void TriggerCtrl::on_spinBoxSynTriggerPrintLen_textChanged(const QString &arg1)
{
Q_UNUSED(arg1);
//sysPara->para.synTriggerPrintLenMm = ui->spinBoxSynTriggerPrintLen->text().toFloat();
}
//void TriggerCtrl::on_spinBoxEleEyeTriggerIntervalMs_valueChanged(int arg1)
//{
// sysPara->para.elecEyeTriggerInterval = arg1;
//}
// //2020/3/2
// void TriggerCtrl::on_radioButtonSynTrigger_clicked()
// {
// sysPara->para.printTriggerMode = PRINT_TRIGGER_SYNCHRONIZER;
// sysPara->para.printColDelay = 0;
// }
void TriggerCtrl::on_radioButtonEleEyeLevelTrigger_clicked()
{
sysPara->para.printTriggerMode = PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL;
}
void TriggerCtrl::on_radioButtonEleEyeEdgetTrigger_clicked()
{
sysPara->para.printTriggerMode = PRINT_TRIGGER_ELEC_EYE_EDGE;
}
void TriggerCtrl::on_radioButtonDelayTrigger_clicked()
{
sysPara->para.printTriggerMode = PRINT_TRIGGER_TIME;
}
#define PRINT_CTRL_ADDR_BASE 0xa400
typedef struct pulse_struct {
unsigned int pulse_value:16;
}Pulse_struct;
void TriggerCtrl::on_spinBoxpluseSinal_valueChanged(int arg1)
{
Pulse_struct t_pulse_struct;
sysPara->para.pulse_sinal_value = arg1;
t_pulse_struct.pulse_value = arg1*10*ui->lineEditTriggerPulsePerMm->text().toFloat();
sysPara->devOp->fpgaWr(PRINT_CTRL_ADDR_BASE + 0x88, (unsigned char *)&t_pulse_struct, 2);
}
void TriggerCtrl::OutputPulse()
{
ui->checkBoxPulseOutputEnable->setChecked(true);
ui->spinBoxProductCntPerOutputPulse->setEnabled(true);
ui->spinBoxProductCntPerOutputPulse->setValue(sysPara->para.productCntPerOutputPulse);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

@@ -0,0 +1,80 @@
/****************************************************************************
** Meta object code from reading C++ file 'InsertSpaceNumDialog.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../InsertSpaceNumDialog.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'InsertSpaceNumDialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_InsertSpaceNumDialog[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_InsertSpaceNumDialog[] = {
"InsertSpaceNumDialog\0"
};
void InsertSpaceNumDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData InsertSpaceNumDialog::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject InsertSpaceNumDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_InsertSpaceNumDialog,
qt_meta_data_InsertSpaceNumDialog, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &InsertSpaceNumDialog::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *InsertSpaceNumDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *InsertSpaceNumDialog::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_InsertSpaceNumDialog))
return static_cast<void*>(const_cast< InsertSpaceNumDialog*>(this));
return QDialog::qt_metacast(_clname);
}
int InsertSpaceNumDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,226 @@
#include "qextserialbase.h"
/*!
\fn QextSerialBase::QextSerialBase()
Default constructor.
*/
QextSerialBase::QextSerialBase()
: QIODevice()
{
#ifdef _TTY_WIN_
setPortName("COM1");
#elif defined(_TTY_IRIX_)
setPortName("/dev/ttyf1");
#elif defined(_TTY_HPUX_)
setPortName("/dev/tty1p0");
#elif defined(_TTY_SUN_)
setPortName("/dev/ttya");
#elif defined(_TTY_DIGITAL_)
setPortName("/dev/tty01");
#elif defined(_TTY_FREEBSD_)
setPortName("/dev/ttyd1");
#else
setPortName("/dev/ttyS0");
#endif
construct();
}
/*!
\fn QextSerialBase::QextSerialBase(const QString & name)
Construct a port and assign it to the device specified by the name parameter.
*/
QextSerialBase::QextSerialBase(const QString & name)
: QIODevice()
{
setPortName(name);
construct();
}
/*!
\fn QextSerialBase::~QextSerialBase()
Standard destructor.
*/
QextSerialBase::~QextSerialBase()
{
delete mutex;
}
/*!
\fn void QextSerialBase::construct()
Common constructor function for setting up default port settings.
(115200 Baud, 8N1, Hardware flow control where supported, otherwise no flow control, and 0 ms timeout).
*/
void QextSerialBase::construct()
{
Settings.BaudRate=BAUD115200;
Settings.DataBits=DATA_8;
Settings.Parity=PAR_NONE;
Settings.StopBits=STOP_1;
Settings.FlowControl=FLOW_HARDWARE;
Settings.Timeout_Millisec=500;
mutex = new QMutex( QMutex::Recursive );
setOpenMode(QIODevice::NotOpen);
}
void QextSerialBase::setQueryMode(QueryMode mechanism)
{
_queryMode = mechanism;
}
/*!
\fn void QextSerialBase::setPortName(const QString & name)
Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".
*/
void QextSerialBase::setPortName(const QString & name)
{
port = name;
}
/*!
\fn QString QextSerialBase::portName() const
Returns the name set by setPortName().
*/
QString QextSerialBase::portName() const
{
return port;
}
/*!
\fn BaudRateType QextSerialBase::baudRate(void) const
Returns the baud rate of the serial port. For a list of possible return values see
the definition of the enum BaudRateType.
*/
BaudRateType QextSerialBase::baudRate(void) const
{
return Settings.BaudRate;
}
/*!
\fn DataBitsType QextSerialBase::dataBits() const
Returns the number of data bits used by the port. For a list of possible values returned by
this function, see the definition of the enum DataBitsType.
*/
DataBitsType QextSerialBase::dataBits() const
{
return Settings.DataBits;
}
/*!
\fn ParityType QextSerialBase::parity() const
Returns the type of parity used by the port. For a list of possible values returned by
this function, see the definition of the enum ParityType.
*/
ParityType QextSerialBase::parity() const
{
return Settings.Parity;
}
/*!
\fn StopBitsType QextSerialBase::stopBits() const
Returns the number of stop bits used by the port. For a list of possible return values, see
the definition of the enum StopBitsType.
*/
StopBitsType QextSerialBase::stopBits() const
{
return Settings.StopBits;
}
/*!
\fn FlowType QextSerialBase::flowControl() const
Returns the type of flow control used by the port. For a list of possible values returned
by this function, see the definition of the enum FlowType.
*/
FlowType QextSerialBase::flowControl() const
{
return Settings.FlowControl;
}
/*!
\fn bool QextSerialBase::isSequential() const
Returns true if device is sequential, otherwise returns false. Serial port is sequential device
so this function always returns true. Check QIODevice::isSequential() documentation for more
information.
*/
bool QextSerialBase::isSequential() const
{
return true;
}
/*!
\fn bool QextSerialBase::atEnd() const
This function will return true if the input buffer is empty (or on error), and false otherwise.
Call QextSerialBase::lastError() for error information.
*/
bool QextSerialBase::atEnd() const
{
if (size()) {
return true;
}
return false;
}
/*!
\fn qint64 QextSerialBase::readLine(char * data, qint64 maxSize)
This function will read a line of buffered input from the port, stopping when either maxSize bytes
have been read, the port has no more data available, or a newline is encountered.
The value returned is the length of the string that was read.
*/
qint64 QextSerialBase::readLine(char * data, qint64 maxSize)
{
qint64 numBytes = bytesAvailable();
char* pData = data;
if (maxSize < 2) //maxSize must be larger than 1
return -1;
/*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
while (pData<(data+numBytes) && --maxSize) {
readData(pData, 1);
if (*pData++ == '\n') {
break;
}
}
*pData='\0';
/*return size of data read*/
return (pData-data);
}
/*!
\fn ulong QextSerialBase::lastError() const
Returns the code for the last error encountered by the port, or E_NO_ERROR if the last port
operation was successful. Possible error codes are:
\verbatim
Error Explanation
--------------------------- -------------------------------------------------------------
E_NO_ERROR No Error has occured
E_INVALID_FD Invalid file descriptor (port was not opened correctly)
E_NO_MEMORY Unable to allocate memory tables (POSIX)
E_CAUGHT_NON_BLOCKED_SIGNAL Caught a non-blocked signal (POSIX)
E_PORT_TIMEOUT Operation timed out (POSIX)
E_INVALID_DEVICE The file opened by the port is not a character device (POSIX)
E_BREAK_CONDITION The port detected a break condition
E_FRAMING_ERROR The port detected a framing error
(usually caused by incorrect baud rate settings)
E_IO_ERROR There was an I/O error while communicating with the port
E_BUFFER_OVERRUN Character buffer overrun
E_RECEIVE_OVERFLOW Receive buffer overflow
E_RECEIVE_PARITY_ERROR The port detected a parity error in the received data
E_TRANSMIT_OVERFLOW Transmit buffer overflow
E_READ_FAILED General read operation failure
E_WRITE_FAILED General write operation failure
\endverbatim
*/
ulong QextSerialBase::lastError() const
{
return lastErr;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@@ -0,0 +1,93 @@
/****************************************************************************
** Meta object code from reading C++ file 'dlgmutilanguage.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../dlgmutilanguage.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dlgmutilanguage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DlgMutiLanguage[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
1, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: signature, parameters, type, tag, flags
17, 16, 16, 16, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_DlgMutiLanguage[] = {
"DlgMutiLanguage\0\0SetNewLanguage()\0"
};
void DlgMutiLanguage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
DlgMutiLanguage *_t = static_cast<DlgMutiLanguage *>(_o);
switch (_id) {
case 0: _t->SetNewLanguage(); break;
default: ;
}
}
Q_UNUSED(_a);
}
const QMetaObjectExtraData DlgMutiLanguage::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DlgMutiLanguage::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DlgMutiLanguage,
qt_meta_data_DlgMutiLanguage, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DlgMutiLanguage::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DlgMutiLanguage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DlgMutiLanguage::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DlgMutiLanguage))
return static_cast<void*>(const_cast< DlgMutiLanguage*>(this));
return QDialog::qt_metacast(_clname);
}
int DlgMutiLanguage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
}
return _id;
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,144 @@
/*
* wpa_gui - ScanResults class
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively, this software may be distributed under the terms of BSD
* license.
*
* See README and COPYING for more details.
*/
#include <cstdio>
#include "scanresults.h"
#include "wpagui.h"
#include "networkconfig.h"
ScanResults::ScanResults(QWidget *parent, const char *, bool, Qt::WFlags)
: QDialog(parent)
{
setupUi(this);
connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
connect(scanButton, SIGNAL(clicked()), this, SLOT(scanRequest()));
connect(scanResultsWidget,
SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this,
SLOT(bssSelected(QTreeWidgetItem *)));
wpagui = NULL;
scanResultsWidget->setItemsExpandable(FALSE);
scanResultsWidget->setRootIsDecorated(FALSE);
}
ScanResults::~ScanResults()
{
}
void ScanResults::languageChange()
{
retranslateUi(this);
}
void ScanResults::setWpaGui(WpaGui *_wpagui)
{
wpagui = _wpagui;
updateResults();
}
void ScanResults::updateResults()
{
char reply[2048];
size_t reply_len;
int index;
char cmd[20];
scanResultsWidget->clear();
index = 0;
while (wpagui) {
snprintf(cmd, sizeof(cmd), "BSS %d", index++);
if (index > 1000)
break;
reply_len = sizeof(reply) - 1;
if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0)
break;
reply[reply_len] = '\0';
QString bss(reply);
if (bss.isEmpty() || bss.startsWith("FAIL"))
break;
QString ssid, bssid, freq, signal, flags;
QStringList lines = bss.split(QRegExp("\\n"));
for (QStringList::Iterator it = lines.begin();
it != lines.end(); it++) {
int pos = (*it).indexOf('=') + 1;
if (pos < 1)
continue;
if ((*it).startsWith("bssid="))
bssid = (*it).mid(pos);
else if ((*it).startsWith("freq="))
freq = (*it).mid(pos);
else if ((*it).startsWith("qual="))
signal = (*it).mid(pos);
else if ((*it).startsWith("flags="))
flags = (*it).mid(pos);
else if ((*it).startsWith("ssid="))
ssid = (*it).mid(pos);
}
QTreeWidgetItem *item = new QTreeWidgetItem(scanResultsWidget);
if (item) {
item->setText(0, ssid);
item->setText(1, bssid);
item->setText(2, freq);
item->setText(3, signal);
item->setText(4, flags);
}
if (bssid.isEmpty())
break;
}
}
void ScanResults::scanRequest()
{
char reply[10];
size_t reply_len = sizeof(reply);
if (wpagui == NULL)
return;
wpagui->ctrlRequest("SCAN", reply, &reply_len);
}
void ScanResults::getResults()
{
updateResults();
}
void ScanResults::bssSelected(QTreeWidgetItem *sel)
{
NetworkConfig *nc = new NetworkConfig();
if (nc == NULL)
return;
nc->setWpaGui(wpagui);
nc->paramsFromScanResults(sel);
nc->show();
nc->exec();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

@@ -0,0 +1,80 @@
/****************************************************************************
** Meta object code from reading C++ file 'dualfilelogger.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../Log/dualfilelogger.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dualfilelogger.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DualFileLogger[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_DualFileLogger[] = {
"DualFileLogger\0"
};
void DualFileLogger::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData DualFileLogger::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DualFileLogger::staticMetaObject = {
{ &Logger::staticMetaObject, qt_meta_stringdata_DualFileLogger,
qt_meta_data_DualFileLogger, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DualFileLogger::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DualFileLogger::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DualFileLogger::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DualFileLogger))
return static_cast<void*>(const_cast< DualFileLogger*>(this));
return Logger::qt_metacast(_clname);
}
int DualFileLogger::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = Logger::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,25 @@
#ifndef DIALOGMODIFYPASSWD_H
#define DIALOGMODIFYPASSWD_H
#include <QDialog>
namespace Ui {
class Dialogmodifypasswd;
}
class Dialogmodifypasswd : public QDialog
{
Q_OBJECT
public:
explicit Dialogmodifypasswd(QWidget *parent = 0);
~Dialogmodifypasswd();
QString getModPasswd();
void clearAuth();
private:
Ui::Dialogmodifypasswd *ui;
};
#endif // DIALOGMODIFYPASSWD_H
@@ -0,0 +1,649 @@
/********************************************************************************
** Form generated from reading UI file 'systemsetting.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_SYSTEMSETTING_H
#define UI_SYSTEMSETTING_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QComboBox>
#include <QtGui/QFrame>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QSpinBox>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include "ClickLabel.h"
QT_BEGIN_NAMESPACE
class Ui_SystemSetting
{
public:
QGridLayout *gridLayout_3;
QVBoxLayout *verticalLayout;
QGridLayout *gridLayout;
QLabel *label_16;
QLabel *labelReclaimTankCloseTime;
QLabel *labelSpetalPosition;
QLabel *label_2;
QLabel *labelMotorCurrent;
QLabel *label_17;
QLabel *labelInkTemp;
QLabel *label_9;
QLabel *label_12;
QLabel *labelNozzle;
QLabel *label_PulseCounter;
QSpinBox *spinBoxPumpInterval;
QComboBox *comboBoxOscillatorFreq;
QLabel *label_10;
QLabel *label_4;
QSpinBox *spinBoxSeptalPostion;
ClickLabel *labelHighVoltageLevel;
QSpinBox *spinBoxReclaimPumpPower;
QSpinBox *spinBoxOscillatorVoltage;
QComboBox *comboBoxDiameter;
QComboBox *ViscosityAdujstSelect;
QComboBox *comboBoxEditMode;
QLabel *labelHighVoltageValue;
QSpinBox *spinBoxReclaimTankTime;
QSpinBox *spinBoxTemperature;
QSpinBox *spinBoxVIscosity;
QSpinBox *spinBoxPressure;
QLabel *label;
QLabel *labelTemperature;
QLabel *label_13;
QLabel *label_18;
QLabel *label_15;
QLabel *label_20;
QSpinBox *spinBoxOscillatorFreqFix;
QSpinBox *spinBoxHighVoltageLevel;
QLabel *label_InkTemp;
QLabel *label_11;
QLabel *label_3;
QLabel *labelPressure;
QLabel *label_14;
QLabel *label_19;
QComboBox *comboBoxDiaphramOffset;
QLabel *labelVIscosity;
QLabel *labelPulseCounter;
QLabel *ViscosityAdjustText;
QLabel *label_5;
QSpinBox *spinBoxFanTemperature;
QLabel *label_6;
QFrame *line;
QGridLayout *gridLayout_2;
QPushButton *pushButtonHighVoltageData;
QPushButton *pushButtonInterFace;
QPushButton *pushButtonCleanUP;
QFrame *line_2;
QHBoxLayout *horizontalLayout;
QPushButton *pushButtonSearchBestOscillatorFreq;
QPushButton *pushButtonSearchBestOscillatorVoltage;
QPushButton *pushButtonApply;
void setupUi(QWidget *SystemSetting)
{
if (SystemSetting->objectName().isEmpty())
SystemSetting->setObjectName(QString::fromUtf8("SystemSetting"));
SystemSetting->resize(800, 600);
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(SystemSetting->sizePolicy().hasHeightForWidth());
SystemSetting->setSizePolicy(sizePolicy);
SystemSetting->setFocusPolicy(Qt::StrongFocus);
gridLayout_3 = new QGridLayout(SystemSetting);
gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
verticalLayout = new QVBoxLayout();
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
gridLayout = new QGridLayout();
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
gridLayout->setContentsMargins(3, 3, 3, 3);
label_16 = new QLabel(SystemSetting);
label_16->setObjectName(QString::fromUtf8("label_16"));
label_16->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_16, 7, 4, 1, 1);
labelReclaimTankCloseTime = new QLabel(SystemSetting);
labelReclaimTankCloseTime->setObjectName(QString::fromUtf8("labelReclaimTankCloseTime"));
labelReclaimTankCloseTime->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelReclaimTankCloseTime, 6, 3, 1, 1);
labelSpetalPosition = new QLabel(SystemSetting);
labelSpetalPosition->setObjectName(QString::fromUtf8("labelSpetalPosition"));
labelSpetalPosition->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelSpetalPosition, 7, 3, 1, 1);
label_2 = new QLabel(SystemSetting);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_2, 1, 1, 1, 1);
labelMotorCurrent = new QLabel(SystemSetting);
labelMotorCurrent->setObjectName(QString::fromUtf8("labelMotorCurrent"));
gridLayout->addWidget(labelMotorCurrent, 7, 5, 1, 1);
label_17 = new QLabel(SystemSetting);
label_17->setObjectName(QString::fromUtf8("label_17"));
label_17->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(label_17, 8, 6, 1, 1);
labelInkTemp = new QLabel(SystemSetting);
labelInkTemp->setObjectName(QString::fromUtf8("labelInkTemp"));
gridLayout->addWidget(labelInkTemp, 8, 5, 1, 1);
label_9 = new QLabel(SystemSetting);
label_9->setObjectName(QString::fromUtf8("label_9"));
label_9->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_9, 3, 1, 1, 1);
label_12 = new QLabel(SystemSetting);
label_12->setObjectName(QString::fromUtf8("label_12"));
label_12->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_12, 1, 4, 1, 1);
labelNozzle = new QLabel(SystemSetting);
labelNozzle->setObjectName(QString::fromUtf8("labelNozzle"));
labelNozzle->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelNozzle, 6, 4, 1, 1);
label_PulseCounter = new QLabel(SystemSetting);
label_PulseCounter->setObjectName(QString::fromUtf8("label_PulseCounter"));
label_PulseCounter->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_PulseCounter, 9, 4, 1, 1);
spinBoxPumpInterval = new QSpinBox(SystemSetting);
spinBoxPumpInterval->setObjectName(QString::fromUtf8("spinBoxPumpInterval"));
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(spinBoxPumpInterval->sizePolicy().hasHeightForWidth());
spinBoxPumpInterval->setSizePolicy(sizePolicy1);
spinBoxPumpInterval->setMinimumSize(QSize(0, 37));
spinBoxPumpInterval->setMaximumSize(QSize(16777215, 37));
spinBoxPumpInterval->setMinimum(30);
spinBoxPumpInterval->setMaximum(59);
gridLayout->addWidget(spinBoxPumpInterval, 5, 2, 1, 1);
comboBoxOscillatorFreq = new QComboBox(SystemSetting);
comboBoxOscillatorFreq->setObjectName(QString::fromUtf8("comboBoxOscillatorFreq"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(comboBoxOscillatorFreq->sizePolicy().hasHeightForWidth());
comboBoxOscillatorFreq->setSizePolicy(sizePolicy2);
gridLayout->addWidget(comboBoxOscillatorFreq, 4, 5, 1, 1);
label_10 = new QLabel(SystemSetting);
label_10->setObjectName(QString::fromUtf8("label_10"));
label_10->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_10, 4, 4, 1, 1);
label_4 = new QLabel(SystemSetting);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_4, 2, 4, 1, 1);
spinBoxSeptalPostion = new QSpinBox(SystemSetting);
spinBoxSeptalPostion->setObjectName(QString::fromUtf8("spinBoxSeptalPostion"));
sizePolicy1.setHeightForWidth(spinBoxSeptalPostion->sizePolicy().hasHeightForWidth());
spinBoxSeptalPostion->setSizePolicy(sizePolicy1);
spinBoxSeptalPostion->setMinimumSize(QSize(0, 37));
spinBoxSeptalPostion->setMaximumSize(QSize(16777215, 37));
spinBoxSeptalPostion->setMinimum(80);
spinBoxSeptalPostion->setMaximum(750);
spinBoxSeptalPostion->setSingleStep(10);
spinBoxSeptalPostion->setValue(300);
gridLayout->addWidget(spinBoxSeptalPostion, 7, 2, 1, 1);
labelHighVoltageLevel = new ClickLabel(SystemSetting);
labelHighVoltageLevel->setObjectName(QString::fromUtf8("labelHighVoltageLevel"));
labelHighVoltageLevel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelHighVoltageLevel, 2, 1, 1, 1);
spinBoxReclaimPumpPower = new QSpinBox(SystemSetting);
spinBoxReclaimPumpPower->setObjectName(QString::fromUtf8("spinBoxReclaimPumpPower"));
sizePolicy1.setHeightForWidth(spinBoxReclaimPumpPower->sizePolicy().hasHeightForWidth());
spinBoxReclaimPumpPower->setSizePolicy(sizePolicy1);
spinBoxReclaimPumpPower->setMinimumSize(QSize(0, 37));
spinBoxReclaimPumpPower->setMaximumSize(QSize(16777215, 37));
spinBoxReclaimPumpPower->setMinimum(2);
spinBoxReclaimPumpPower->setMaximum(99);
spinBoxReclaimPumpPower->setValue(10);
gridLayout->addWidget(spinBoxReclaimPumpPower, 3, 2, 1, 1);
spinBoxOscillatorVoltage = new QSpinBox(SystemSetting);
spinBoxOscillatorVoltage->setObjectName(QString::fromUtf8("spinBoxOscillatorVoltage"));
sizePolicy1.setHeightForWidth(spinBoxOscillatorVoltage->sizePolicy().hasHeightForWidth());
spinBoxOscillatorVoltage->setSizePolicy(sizePolicy1);
spinBoxOscillatorVoltage->setMinimumSize(QSize(0, 37));
spinBoxOscillatorVoltage->setMaximumSize(QSize(16777215, 37));
spinBoxOscillatorVoltage->setMaximum(99);
spinBoxOscillatorVoltage->setValue(50);
gridLayout->addWidget(spinBoxOscillatorVoltage, 1, 2, 1, 1);
comboBoxDiameter = new QComboBox(SystemSetting);
comboBoxDiameter->setObjectName(QString::fromUtf8("comboBoxDiameter"));
sizePolicy2.setHeightForWidth(comboBoxDiameter->sizePolicy().hasHeightForWidth());
comboBoxDiameter->setSizePolicy(sizePolicy2);
gridLayout->addWidget(comboBoxDiameter, 6, 5, 1, 1);
ViscosityAdujstSelect = new QComboBox(SystemSetting);
ViscosityAdujstSelect->setObjectName(QString::fromUtf8("ViscosityAdujstSelect"));
sizePolicy2.setHeightForWidth(ViscosityAdujstSelect->sizePolicy().hasHeightForWidth());
ViscosityAdujstSelect->setSizePolicy(sizePolicy2);
ViscosityAdujstSelect->setMinimumSize(QSize(0, 37));
ViscosityAdujstSelect->setMaximumSize(QSize(16777215, 37));
gridLayout->addWidget(ViscosityAdujstSelect, 4, 2, 1, 1);
comboBoxEditMode = new QComboBox(SystemSetting);
comboBoxEditMode->setObjectName(QString::fromUtf8("comboBoxEditMode"));
sizePolicy2.setHeightForWidth(comboBoxEditMode->sizePolicy().hasHeightForWidth());
comboBoxEditMode->setSizePolicy(sizePolicy2);
comboBoxEditMode->setMinimumSize(QSize(0, 37));
comboBoxEditMode->setMaximumSize(QSize(16777215, 37));
gridLayout->addWidget(comboBoxEditMode, 9, 2, 1, 1);
labelHighVoltageValue = new QLabel(SystemSetting);
labelHighVoltageValue->setObjectName(QString::fromUtf8("labelHighVoltageValue"));
gridLayout->addWidget(labelHighVoltageValue, 2, 3, 1, 1);
spinBoxReclaimTankTime = new QSpinBox(SystemSetting);
spinBoxReclaimTankTime->setObjectName(QString::fromUtf8("spinBoxReclaimTankTime"));
sizePolicy1.setHeightForWidth(spinBoxReclaimTankTime->sizePolicy().hasHeightForWidth());
spinBoxReclaimTankTime->setSizePolicy(sizePolicy1);
spinBoxReclaimTankTime->setMinimumSize(QSize(0, 37));
spinBoxReclaimTankTime->setMaximumSize(QSize(16777215, 37));
spinBoxReclaimTankTime->setMinimum(1);
spinBoxReclaimTankTime->setMaximum(59);
gridLayout->addWidget(spinBoxReclaimTankTime, 6, 2, 1, 1);
spinBoxTemperature = new QSpinBox(SystemSetting);
spinBoxTemperature->setObjectName(QString::fromUtf8("spinBoxTemperature"));
spinBoxTemperature->setEnabled(true);
sizePolicy1.setHeightForWidth(spinBoxTemperature->sizePolicy().hasHeightForWidth());
spinBoxTemperature->setSizePolicy(sizePolicy1);
spinBoxTemperature->setMinimum(0);
spinBoxTemperature->setMaximum(70);
gridLayout->addWidget(spinBoxTemperature, 3, 5, 1, 1);
spinBoxVIscosity = new QSpinBox(SystemSetting);
spinBoxVIscosity->setObjectName(QString::fromUtf8("spinBoxVIscosity"));
sizePolicy1.setHeightForWidth(spinBoxVIscosity->sizePolicy().hasHeightForWidth());
spinBoxVIscosity->setSizePolicy(sizePolicy1);
spinBoxVIscosity->setMinimum(500);
spinBoxVIscosity->setMaximum(3800);
gridLayout->addWidget(spinBoxVIscosity, 2, 5, 1, 1);
spinBoxPressure = new QSpinBox(SystemSetting);
spinBoxPressure->setObjectName(QString::fromUtf8("spinBoxPressure"));
sizePolicy1.setHeightForWidth(spinBoxPressure->sizePolicy().hasHeightForWidth());
spinBoxPressure->setSizePolicy(sizePolicy1);
spinBoxPressure->setMaximum(5000);
gridLayout->addWidget(spinBoxPressure, 1, 5, 1, 1);
label = new QLabel(SystemSetting);
label->setObjectName(QString::fromUtf8("label"));
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label, 9, 1, 1, 1);
labelTemperature = new QLabel(SystemSetting);
labelTemperature->setObjectName(QString::fromUtf8("labelTemperature"));
gridLayout->addWidget(labelTemperature, 3, 6, 1, 1);
label_13 = new QLabel(SystemSetting);
label_13->setObjectName(QString::fromUtf8("label_13"));
label_13->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_13, 5, 4, 1, 1);
label_18 = new QLabel(SystemSetting);
label_18->setObjectName(QString::fromUtf8("label_18"));
label_18->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_18, 5, 1, 1, 1);
label_15 = new QLabel(SystemSetting);
label_15->setObjectName(QString::fromUtf8("label_15"));
label_15->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(label_15, 5, 6, 1, 1);
label_20 = new QLabel(SystemSetting);
label_20->setObjectName(QString::fromUtf8("label_20"));
label_20->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_20, 7, 1, 1, 1);
spinBoxOscillatorFreqFix = new QSpinBox(SystemSetting);
spinBoxOscillatorFreqFix->setObjectName(QString::fromUtf8("spinBoxOscillatorFreqFix"));
sizePolicy1.setHeightForWidth(spinBoxOscillatorFreqFix->sizePolicy().hasHeightForWidth());
spinBoxOscillatorFreqFix->setSizePolicy(sizePolicy1);
spinBoxOscillatorFreqFix->setMinimum(-80000);
spinBoxOscillatorFreqFix->setMaximum(80000);
spinBoxOscillatorFreqFix->setValue(0);
gridLayout->addWidget(spinBoxOscillatorFreqFix, 5, 5, 1, 1);
spinBoxHighVoltageLevel = new QSpinBox(SystemSetting);
spinBoxHighVoltageLevel->setObjectName(QString::fromUtf8("spinBoxHighVoltageLevel"));
sizePolicy1.setHeightForWidth(spinBoxHighVoltageLevel->sizePolicy().hasHeightForWidth());
spinBoxHighVoltageLevel->setSizePolicy(sizePolicy1);
spinBoxHighVoltageLevel->setMinimumSize(QSize(0, 37));
spinBoxHighVoltageLevel->setMaximumSize(QSize(16777215, 37));
spinBoxHighVoltageLevel->setMinimum(5);
spinBoxHighVoltageLevel->setMaximum(300);
spinBoxHighVoltageLevel->setSingleStep(5);
spinBoxHighVoltageLevel->setValue(50);
gridLayout->addWidget(spinBoxHighVoltageLevel, 2, 2, 1, 1);
label_InkTemp = new QLabel(SystemSetting);
label_InkTemp->setObjectName(QString::fromUtf8("label_InkTemp"));
label_InkTemp->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_InkTemp, 8, 4, 1, 1);
label_11 = new QLabel(SystemSetting);
label_11->setObjectName(QString::fromUtf8("label_11"));
label_11->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_11, 4, 1, 1, 1);
label_3 = new QLabel(SystemSetting);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_3, 3, 4, 1, 1);
labelPressure = new QLabel(SystemSetting);
labelPressure->setObjectName(QString::fromUtf8("labelPressure"));
gridLayout->addWidget(labelPressure, 1, 6, 1, 1);
label_14 = new QLabel(SystemSetting);
label_14->setObjectName(QString::fromUtf8("label_14"));
label_14->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_14, 6, 1, 1, 1);
label_19 = new QLabel(SystemSetting);
label_19->setObjectName(QString::fromUtf8("label_19"));
label_19->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_19, 8, 1, 1, 1);
comboBoxDiaphramOffset = new QComboBox(SystemSetting);
comboBoxDiaphramOffset->setObjectName(QString::fromUtf8("comboBoxDiaphramOffset"));
sizePolicy2.setHeightForWidth(comboBoxDiaphramOffset->sizePolicy().hasHeightForWidth());
comboBoxDiaphramOffset->setSizePolicy(sizePolicy2);
comboBoxDiaphramOffset->setMinimumSize(QSize(0, 37));
comboBoxDiaphramOffset->setMaximumSize(QSize(16777215, 37));
gridLayout->addWidget(comboBoxDiaphramOffset, 8, 2, 1, 1);
labelVIscosity = new QLabel(SystemSetting);
labelVIscosity->setObjectName(QString::fromUtf8("labelVIscosity"));
gridLayout->addWidget(labelVIscosity, 2, 6, 1, 1);
labelPulseCounter = new QLabel(SystemSetting);
labelPulseCounter->setObjectName(QString::fromUtf8("labelPulseCounter"));
gridLayout->addWidget(labelPulseCounter, 9, 5, 1, 1);
ViscosityAdjustText = new QLabel(SystemSetting);
ViscosityAdjustText->setObjectName(QString::fromUtf8("ViscosityAdjustText"));
gridLayout->addWidget(ViscosityAdjustText, 4, 3, 1, 1);
label_5 = new QLabel(SystemSetting);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setLayoutDirection(Qt::LeftToRight);
label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_5, 10, 4, 1, 1);
spinBoxFanTemperature = new QSpinBox(SystemSetting);
spinBoxFanTemperature->setObjectName(QString::fromUtf8("spinBoxFanTemperature"));
sizePolicy1.setHeightForWidth(spinBoxFanTemperature->sizePolicy().hasHeightForWidth());
spinBoxFanTemperature->setSizePolicy(sizePolicy1);
spinBoxFanTemperature->setMinimumSize(QSize(0, 37));
spinBoxFanTemperature->setValue(25);
gridLayout->addWidget(spinBoxFanTemperature, 10, 5, 1, 1);
label_6 = new QLabel(SystemSetting);
label_6->setObjectName(QString::fromUtf8("label_6"));
gridLayout->addWidget(label_6, 10, 6, 1, 1);
verticalLayout->addLayout(gridLayout);
line = new QFrame(SystemSetting);
line->setObjectName(QString::fromUtf8("line"));
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
verticalLayout->addWidget(line);
gridLayout_2 = new QGridLayout();
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
pushButtonHighVoltageData = new QPushButton(SystemSetting);
pushButtonHighVoltageData->setObjectName(QString::fromUtf8("pushButtonHighVoltageData"));
pushButtonHighVoltageData->setEnabled(true);
pushButtonHighVoltageData->setMinimumSize(QSize(0, 40));
pushButtonHighVoltageData->setMaximumSize(QSize(260, 16777215));
pushButtonHighVoltageData->setLayoutDirection(Qt::LeftToRight);
gridLayout_2->addWidget(pushButtonHighVoltageData, 0, 0, 1, 1);
pushButtonInterFace = new QPushButton(SystemSetting);
pushButtonInterFace->setObjectName(QString::fromUtf8("pushButtonInterFace"));
pushButtonInterFace->setEnabled(true);
pushButtonInterFace->setMinimumSize(QSize(0, 40));
pushButtonInterFace->setMaximumSize(QSize(260, 16777215));
gridLayout_2->addWidget(pushButtonInterFace, 0, 2, 1, 1);
pushButtonCleanUP = new QPushButton(SystemSetting);
pushButtonCleanUP->setObjectName(QString::fromUtf8("pushButtonCleanUP"));
pushButtonCleanUP->setMinimumSize(QSize(0, 40));
gridLayout_2->addWidget(pushButtonCleanUP, 0, 1, 1, 1);
verticalLayout->addLayout(gridLayout_2);
line_2 = new QFrame(SystemSetting);
line_2->setObjectName(QString::fromUtf8("line_2"));
line_2->setFrameShape(QFrame::HLine);
line_2->setFrameShadow(QFrame::Sunken);
verticalLayout->addWidget(line_2);
horizontalLayout = new QHBoxLayout();
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setContentsMargins(3, 3, 3, 3);
pushButtonSearchBestOscillatorFreq = new QPushButton(SystemSetting);
pushButtonSearchBestOscillatorFreq->setObjectName(QString::fromUtf8("pushButtonSearchBestOscillatorFreq"));
pushButtonSearchBestOscillatorFreq->setMinimumSize(QSize(0, 70));
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/searchsuitablefrequency.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonSearchBestOscillatorFreq->setIcon(icon);
horizontalLayout->addWidget(pushButtonSearchBestOscillatorFreq);
pushButtonSearchBestOscillatorVoltage = new QPushButton(SystemSetting);
pushButtonSearchBestOscillatorVoltage->setObjectName(QString::fromUtf8("pushButtonSearchBestOscillatorVoltage"));
pushButtonSearchBestOscillatorVoltage->setMinimumSize(QSize(0, 70));
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/icon/searchsuitablevoltage.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonSearchBestOscillatorVoltage->setIcon(icon1);
horizontalLayout->addWidget(pushButtonSearchBestOscillatorVoltage);
pushButtonApply = new QPushButton(SystemSetting);
pushButtonApply->setObjectName(QString::fromUtf8("pushButtonApply"));
pushButtonApply->setMinimumSize(QSize(0, 70));
QPalette palette;
QBrush brush(QColor(255, 170, 127, 255));
brush.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Button, brush);
palette.setBrush(QPalette::Inactive, QPalette::Button, brush);
palette.setBrush(QPalette::Disabled, QPalette::Button, brush);
pushButtonApply->setPalette(palette);
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/icon/apply.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonApply->setIcon(icon2);
horizontalLayout->addWidget(pushButtonApply);
verticalLayout->addLayout(horizontalLayout);
verticalLayout->setStretch(4, 1);
gridLayout_3->addLayout(verticalLayout, 0, 0, 1, 1);
retranslateUi(SystemSetting);
QMetaObject::connectSlotsByName(SystemSetting);
} // setupUi
void retranslateUi(QWidget *SystemSetting)
{
SystemSetting->setWindowTitle(QApplication::translate("SystemSetting", "Form", 0, QApplication::UnicodeUTF8));
label_16->setText(QApplication::translate("SystemSetting", "\347\224\265\346\234\272\347\224\265\346\265\201:", 0, QApplication::UnicodeUTF8));
labelReclaimTankCloseTime->setText(QString());
labelSpetalPosition->setText(QString());
label_2->setText(QApplication::translate("SystemSetting", "\346\231\266\346\214\257\347\224\265\345\216\213(%):", 0, QApplication::UnicodeUTF8));
labelMotorCurrent->setText(QString());
label_17->setText(QApplication::translate("SystemSetting", "\302\260C", 0, QApplication::UnicodeUTF8));
labelInkTemp->setText(QString());
label_9->setText(QApplication::translate("SystemSetting", "\345\233\236\346\224\266\346\263\265\345\212\233\345\272\246(%):", 0, QApplication::UnicodeUTF8));
label_12->setText(QApplication::translate("SystemSetting", "\345\216\213\345\212\233:", 0, QApplication::UnicodeUTF8));
labelNozzle->setText(QApplication::translate("SystemSetting", "\345\226\267\345\230\264\347\233\264\345\276\204:", 0, QApplication::UnicodeUTF8));
label_PulseCounter->setText(QApplication::translate("SystemSetting", "\350\204\211\345\206\262\350\256\241\346\225\260\345\231\250:", 0, QApplication::UnicodeUTF8));
comboBoxOscillatorFreq->clear();
comboBoxOscillatorFreq->insertItems(0, QStringList()
<< QApplication::translate("SystemSetting", "64K", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "76K", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "96K", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "128K", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "\346\226\260\346\231\266\346\214\257", 0, QApplication::UnicodeUTF8)
);
label_10->setText(QApplication::translate("SystemSetting", "\346\231\266\346\214\257\351\242\221\347\216\207:", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("SystemSetting", "\347\262\230\345\272\246:", 0, QApplication::UnicodeUTF8));
labelHighVoltageLevel->setText(QApplication::translate("SystemSetting", "\351\253\230\345\216\213\345\214\205\345\256\271\345\267\256:", 0, QApplication::UnicodeUTF8));
comboBoxDiameter->clear();
comboBoxDiameter->insertItems(0, QStringList()
<< QApplication::translate("SystemSetting", "50 (UM)", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "60 (UM)", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "70 (UM)", 0, QApplication::UnicodeUTF8)
);
ViscosityAdujstSelect->clear();
ViscosityAdujstSelect->insertItems(0, QStringList()
<< QApplication::translate("SystemSetting", "0", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "0.6", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "1.0", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "1.6", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "2.0", 0, QApplication::UnicodeUTF8)
);
comboBoxEditMode->clear();
comboBoxEditMode->insertItems(0, QStringList()
<< QApplication::translate("SystemSetting", "\346\226\207\346\234\254\346\250\241\345\274\217", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "\347\202\271\351\230\265\346\250\241\345\274\217", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "\345\234\272\346\231\257\346\250\241\345\274\217", 0, QApplication::UnicodeUTF8)
);
labelHighVoltageValue->setText(QString());
label->setText(QApplication::translate("SystemSetting", " \344\277\241\346\201\257\347\274\226\350\276\221\346\250\241\345\274\217:", 0, QApplication::UnicodeUTF8));
labelTemperature->setText(QString());
label_13->setText(QApplication::translate("SystemSetting", "\351\242\221\347\216\207\344\277\256\346\255\243:", 0, QApplication::UnicodeUTF8));
label_18->setText(QApplication::translate("SystemSetting", "\347\262\230\345\272\246\346\263\265\345\212\250\344\275\234\351\227\264\351\232\224(\347\247\222):", 0, QApplication::UnicodeUTF8));
label_15->setText(QApplication::translate("SystemSetting", "Hz", 0, QApplication::UnicodeUTF8));
label_20->setText(QApplication::translate("SystemSetting", "\351\232\224\350\206\234\344\275\215\347\275\256:", 0, QApplication::UnicodeUTF8));
label_InkTemp->setText(QApplication::translate("SystemSetting", "\345\242\250\346\260\264\346\270\251\345\272\246:", 0, QApplication::UnicodeUTF8));
label_11->setText(QApplication::translate("SystemSetting", "\347\262\230\345\272\246\346\240\241\346\255\243(%):", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("SystemSetting", "\345\226\267\345\244\264\346\270\251\345\272\246:", 0, QApplication::UnicodeUTF8));
labelPressure->setText(QString());
label_14->setText(QApplication::translate("SystemSetting", "\345\233\236\346\224\266\346\247\275\345\274\200\345\205\263\346\227\266\351\227\264:", 0, QApplication::UnicodeUTF8));
label_19->setText(QApplication::translate("SystemSetting", "\351\232\224\350\206\234\344\275\215\347\275\256\345\201\217\347\247\273:", 0, QApplication::UnicodeUTF8));
comboBoxDiaphramOffset->clear();
comboBoxDiaphramOffset->insertItems(0, QStringList()
<< QApplication::translate("SystemSetting", "5", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "10", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "15", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "20", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "25", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "30", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "40", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "45", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "50", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "55", 0, QApplication::UnicodeUTF8)
<< QApplication::translate("SystemSetting", "60", 0, QApplication::UnicodeUTF8)
);
labelVIscosity->setText(QString());
labelPulseCounter->setText(QString());
ViscosityAdjustText->setText(QString());
label_5->setText(QApplication::translate("SystemSetting", "\351\243\216\346\211\207\345\274\200\345\220\257\346\270\251\345\272\246:", 0, QApplication::UnicodeUTF8));
label_6->setText(QApplication::translate("SystemSetting", "\302\260C", 0, QApplication::UnicodeUTF8));
pushButtonHighVoltageData->setText(QApplication::translate("SystemSetting", "\351\207\215\347\275\256\351\253\230\345\216\213", 0, QApplication::UnicodeUTF8));
pushButtonInterFace->setText(QApplication::translate("SystemSetting", "\347\225\214\351\235\242\350\257\255\350\250\200\350\256\276\347\275\256", 0, QApplication::UnicodeUTF8));
pushButtonCleanUP->setText(QApplication::translate("SystemSetting", "\345\226\267\345\230\264\351\200\206\346\270\205\346\264\227", 0, QApplication::UnicodeUTF8));
pushButtonSearchBestOscillatorFreq->setText(QApplication::translate("SystemSetting", "\346\220\234\347\264\242\346\234\200\344\275\263\346\231\266\346\214\257\351\242\221\347\216\207", 0, QApplication::UnicodeUTF8));
pushButtonSearchBestOscillatorVoltage->setText(QApplication::translate("SystemSetting", "\346\220\234\347\264\242\346\234\200\344\275\263\346\231\266\346\214\257\347\224\265\345\216\213", 0, QApplication::UnicodeUTF8));
pushButtonApply->setText(QApplication::translate("SystemSetting", "\345\272\224\347\224\250\345\275\223\345\211\215\351\205\215\347\275\256", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class SystemSetting: public Ui_SystemSetting {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_SYSTEMSETTING_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

@@ -0,0 +1,142 @@
/****************************************************************************
** Meta object code from reading C++ file 'picscene.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../scene/picscene.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'picscene.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_PicScene[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
7, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
5, // signalCount
// signals: signature, parameters, type, tag, flags
15, 10, 9, 9, 0x05,
48, 10, 9, 9, 0x05,
77, 9, 9, 9, 0x05,
97, 9, 9, 9, 0x05,
119, 9, 9, 9, 0x05,
// slots: signature, parameters, type, tag, flags
141, 136, 9, 9, 0x0a,
175, 155, 9, 9, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_PicScene[] = {
"PicScene\0\0item\0textInserted(QGraphicsTextItem*)\0"
"itemSelected(QGraphicsItem*)\0"
"xmlContentChanged()\0showTextWidthHeight()\0"
"adjustItemsPos()\0mode\0setMode(Mode)\0"
"newIsdrawBackground\0setIsdrawBackground(bool)\0"
};
void PicScene::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
PicScene *_t = static_cast<PicScene *>(_o);
switch (_id) {
case 0: _t->textInserted((*reinterpret_cast< QGraphicsTextItem*(*)>(_a[1]))); break;
case 1: _t->itemSelected((*reinterpret_cast< QGraphicsItem*(*)>(_a[1]))); break;
case 2: _t->xmlContentChanged(); break;
case 3: _t->showTextWidthHeight(); break;
case 4: _t->adjustItemsPos(); break;
case 5: _t->setMode((*reinterpret_cast< Mode(*)>(_a[1]))); break;
case 6: _t->setIsdrawBackground((*reinterpret_cast< bool(*)>(_a[1]))); break;
default: ;
}
}
}
const QMetaObjectExtraData PicScene::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject PicScene::staticMetaObject = {
{ &QGraphicsScene::staticMetaObject, qt_meta_stringdata_PicScene,
qt_meta_data_PicScene, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &PicScene::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *PicScene::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *PicScene::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_PicScene))
return static_cast<void*>(const_cast< PicScene*>(this));
return QGraphicsScene::qt_metacast(_clname);
}
int PicScene::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QGraphicsScene::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 7)
qt_static_metacall(this, _c, _id, _a);
_id -= 7;
}
return _id;
}
// SIGNAL 0
void PicScene::textInserted(QGraphicsTextItem * _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void PicScene::itemSelected(QGraphicsItem * _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void PicScene::xmlContentChanged()
{
QMetaObject::activate(this, &staticMetaObject, 2, 0);
}
// SIGNAL 3
void PicScene::showTextWidthHeight()
{
QMetaObject::activate(this, &staticMetaObject, 3, 0);
}
// SIGNAL 4
void PicScene::adjustItemsPos()
{
QMetaObject::activate(this, &staticMetaObject, 4, 0);
}
QT_END_MOC_NAMESPACE
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,959 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#ifdef _MSC_VER
#include <malloc.h>
#endif
#include "reedsol.h"
#include "common.h"
#include "dm200.h"
#include <QDebug>
//#define QTDEBUG
// simple checked response malloc
static void *safemalloc(int n)
{
void *p = malloc(n);
return p;
}
// Annex M placement alorithm low level
static void ecc200placementbit(int *array, int NR, int NC, int r, int c, int p, char b)
{
if (r < 0) {
r += NR;
c += 4 - ((NR + 4) % 8);
}
if (c < 0) {
c += NC;
r += 4 - ((NC + 4) % 8);
}
array[r * NC + c] = (p << 3) + b;
}
static void ecc200placementblock(int *array, int NR, int NC, int r,
int c, int p)
{
ecc200placementbit(array, NR, NC, r - 2, c - 2, p, 7);
ecc200placementbit(array, NR, NC, r - 2, c - 1, p, 6);
ecc200placementbit(array, NR, NC, r - 1, c - 2, p, 5);
ecc200placementbit(array, NR, NC, r - 1, c - 1, p, 4);
ecc200placementbit(array, NR, NC, r - 1, c - 0, p, 3);
ecc200placementbit(array, NR, NC, r - 0, c - 2, p, 2);
ecc200placementbit(array, NR, NC, r - 0, c - 1, p, 1);
ecc200placementbit(array, NR, NC, r - 0, c - 0, p, 0);
}
static void ecc200placementcornerA(int *array, int NR, int NC, int p)
{
ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7);
ecc200placementbit(array, NR, NC, NR - 1, 1, p, 6);
ecc200placementbit(array, NR, NC, NR - 1, 2, p, 5);
ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2);
ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1);
ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0);
}
static void ecc200placementcornerB(int *array, int NR, int NC, int p)
{
ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7);
ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6);
ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5);
ecc200placementbit(array, NR, NC, 0, NC - 4, p, 4);
ecc200placementbit(array, NR, NC, 0, NC - 3, p, 3);
ecc200placementbit(array, NR, NC, 0, NC - 2, p, 2);
ecc200placementbit(array, NR, NC, 0, NC - 1, p, 1);
ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0);
}
static void ecc200placementcornerC(int *array, int NR, int NC, int p)
{
ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7);
ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6);
ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5);
ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2);
ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1);
ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0);
}
static void ecc200placementcornerD(int *array, int NR, int NC, int p)
{
ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7);
ecc200placementbit(array, NR, NC, NR - 1, NC - 1, p, 6);
ecc200placementbit(array, NR, NC, 0, NC - 3, p, 5);
ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
ecc200placementbit(array, NR, NC, 1, NC - 3, p, 2);
ecc200placementbit(array, NR, NC, 1, NC - 2, p, 1);
ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0);
}
// Annex M placement alorithm main function
static void ecc200placement(int *array, int NR, int NC)
{
int r, c, p;
// invalidate
for (r = 0; r < NR; r++)
for (c = 0; c < NC; c++)
array[r * NC + c] = 0;
// start
p = 1;
r = 4;
c = 0;
do {
// check corner
if (r == NR && !c)
ecc200placementcornerA(array, NR, NC, p++);
if (r == NR - 2 && !c && NC % 4)
ecc200placementcornerB(array, NR, NC, p++);
if (r == NR - 2 && !c && (NC % 8) == 4)
ecc200placementcornerC(array, NR, NC, p++);
if (r == NR + 4 && c == 2 && !(NC % 8))
ecc200placementcornerD(array, NR, NC, p++);
// up/right
do {
if (r < NR && c >= 0 && !array[r * NC + c])
ecc200placementblock(array, NR, NC, r, c, p++);
r -= 2;
c += 2;
}
while (r >= 0 && c < NC);
r++;
c += 3;
// down/left
do {
if (r >= 0 && c < NC && !array[r * NC + c])
ecc200placementblock(array, NR, NC, r, c, p++);
r += 2;
c -= 2;
}
while (r < NR && c >= 0);
r += 3;
c++;
}
while (r < NR || c < NC);
// unfilled corner
if (!array[NR * NC - 1])
array[NR * NC - 1] = array[NR * NC - NC - 2] = 1;
}
// calculate and append ecc code, and if necessary interleave
static void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock)
{
int blocks, b;
blocks = (bytes + 2) / datablock;
rs_init_gf(0x12d);
rs_init_code(rsblock, 1);
for (b = 0; b < blocks; b++) {
unsigned char buf[256], ecc[256];
int n, p = 0;
for (n = b; n < bytes; n += blocks)
buf[p++] = binary[n];
rs_encode(p, buf, ecc);
p = rsblock - 1; // comes back reversed
for (n = b; n < rsblock * blocks; n += blocks)
binary[bytes + n] = ecc[p--];
}
rs_free();
}
float dmroundup(float input)
{
float fraction, output = 0.0;
fraction = input - (int)input;
if(fraction > 0.01) { output = (input - fraction) + 1.0; } else { output = input; }
return output;
}
/*int istwodigits(unsigned char source[], int position)
{
if((source[position] >= '0') && (source[position] <= '9')) {
if((source[position + 1] >= '0') && (source[position + 1] <= '9')) {
return 1;
}
}
return 0;
} */
int isx12(unsigned char source)
{
if(source == 13) { return 1; }
if(source == 42) { return 1; }
if(source == 62) { return 1; }
if(source == 32) { return 1; }
if((source >= '0') && (source <= '9')) { return 1; }
if((source >= 'A') && (source <= 'Z')) { return 1; }
return 0;
}
void dminsert(char binary_string[], int posn, char newbit)
{ /* Insert a character into the middle of a string at position posn */
int i, end;
end = strlen(binary_string);
for(i = end; i > posn; i--) {
binary_string[i] = binary_string[i - 1];
}
binary_string[posn] = newbit;
}
void insert_value(unsigned char binary_stream[], int posn, int streamlen, char newbit)
{
int i;
for(i = streamlen; i > posn; i--) {
binary_stream[i] = binary_stream[i - 1];
}
binary_stream[posn] = newbit;
}
int look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1)
{
/* A custom version of the 'look ahead test' from Annex P */
/* This version is deliberately very reluctant to end a data stream with EDIFACT encoding */
float ascii_count, c40_count, text_count, x12_count, edf_count, b256_count, best_count;
int sp, done, best_scheme;
char reduced_char;
/* step (j) */
if(current_mode == DM_ASCII) {
ascii_count = 0.0;
c40_count = 1.0;
text_count = 1.0;
x12_count = 1.0;
edf_count = 1.0;
b256_count = 1.25;
} else {
ascii_count = 1.0;
c40_count = 2.0;
text_count = 2.0;
x12_count = 2.0;
edf_count = 2.0;
b256_count = 2.25;
}
switch(current_mode) {
case DM_C40: c40_count = 0.0; break;
case DM_TEXT: text_count = 0.0; break;
case DM_X12: x12_count = 0.0; break;
case DM_EDIFACT: edf_count = 0.0; break;
case DM_BASE256: b256_count = 0.0; break;
}
for(sp = position; (sp < sourcelen) && (sp <= (position + 8)); sp++) {
if(source[sp] <= 127) { reduced_char = source[sp]; } else { reduced_char = source[sp] - 127; }
if((source[sp] >= '0') && (source[sp] <= '9')) { ascii_count += 0.5; } else { ascii_count += 1.0; }
if(source[sp] > 127) { ascii_count += 1.0; }
done = 0;
if(reduced_char == ' ') { c40_count += (2.0 / 3.0); done = 1; }
if((reduced_char >= '0') && (reduced_char <= '9')) { c40_count += (2.0 / 3.0); done = 1; }
if((reduced_char >= 'A') && (reduced_char <= 'Z')) { c40_count += (2.0 / 3.0); done = 1; }
if(source[sp] > 127) { c40_count += (4.0 / 3.0); }
if(done == 0) { c40_count += (4.0 / 3.0); }
done = 0;
if(reduced_char == ' ') { text_count += (2.0 / 3.0); done = 1; }
if((reduced_char >= '0') && (reduced_char <= '9')) { text_count += (2.0 / 3.0); done = 1; }
if((reduced_char >= 'a') && (reduced_char <= 'z')) { text_count += (2.0 / 3.0); done = 1; }
if(source[sp] > 127) { text_count += (4.0 / 3.0); }
if(done == 0) { text_count += (4.0 / 3.0); }
if(isx12(source[sp])) { x12_count += (2.0 / 3.0); } else { x12_count += 4.0; }
/* step (p) */
done = 0;
if((source[sp] >= ' ') && (source[sp] <= '^')) { edf_count += (3.0 / 4.0); } else { edf_count += 6.0; }
if(gs1 && (source[sp] == '[')) { edf_count += 6.0; }
if(sp >= (sourcelen - 5)) { edf_count += 6.0; } /* MMmmm fudge! */
/* step (q) */
if(gs1 && (source[sp] == '[')) { b256_count += 4.0; } else { b256_count += 1.0; }
/*printf("lat a%.2f c%.2f t%.2f x%.2f e%.2f b%.2f\n", ascii_count, c40_count, text_count, x12_count, edf_count, b256_count);*/
}
/* Round up all the counts to round numbers */
best_count = ascii_count;
best_scheme = DM_ASCII;
if(b256_count <= best_count) {
best_count = b256_count;
best_scheme = DM_BASE256;
}
if(edf_count <= best_count) {
best_count = edf_count;
best_scheme = DM_EDIFACT;
}
if(text_count <= best_count) {
best_count = text_count;
best_scheme = DM_TEXT;
}
if(x12_count <= best_count) {
best_count = x12_count;
best_scheme = DM_X12;
}
if(c40_count <= best_count) {
best_count = c40_count;
best_scheme = DM_C40;
}
return best_scheme;
}
int dm200encode(unsigned char source[], unsigned char target[], int *last_mode)
{
/* Encodes data using ASCII, C40, Text, X12, EDIFACT or Base 256 modes as appropriate */
/* Supports encoding FNC1 in supporting systems */
int sp, tp, i, gs1;
int current_mode, next_mode;
int c40_buffer[6], c40_p;
int text_buffer[6], text_p;
int x12_buffer[6], x12_p;
int edifact_buffer[8], edifact_p;
int inputlen;
char *binary;
inputlen = ustrlen(source);
binary = (char *)malloc(2 * inputlen);
// binary = (char *)QRcode_malloc(2 * inputlen);
memset(binary, 0x00, 2*inputlen);
sp = 0;
tp = 0;
memset(c40_buffer, 0, 6);
c40_p = 0;
memset(text_buffer, 0, 6);
text_p = 0;
memset(x12_buffer, 0, 6);
x12_p = 0;
memset(edifact_buffer, 0, 8);
edifact_p = 0;
strcpy(binary, "");
/* step (a) */
current_mode = DM_ASCII;
next_mode = DM_ASCII;
gs1 = 0;
if(gs1) { target[tp] = 232; tp++; concat(binary, " "); } /* FNC1 */
while (sp < inputlen) {
current_mode = next_mode;
/* step (b) - ASCII encodation */
if(current_mode == DM_ASCII) {
next_mode = DM_ASCII;
if(istwodigits(source, sp) && ((sp + 1) != inputlen)) {
target[tp] = (10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130;
tp++; concat(binary, " ");
sp += 2;
} else {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
if(next_mode != DM_ASCII) {
switch(next_mode) {
case DM_C40: target[tp] = 230; tp++; concat(binary, " "); break;
case DM_TEXT: target[tp] = 239; tp++; concat(binary, " "); break;
case DM_X12: target[tp] = 238; tp++; concat(binary, " "); break;
case DM_EDIFACT: target[tp] = 240; tp++; concat(binary, " "); break;
case DM_BASE256: target[tp] = 231; tp++; concat(binary, " "); break;
}
} else {
if(source[sp] > 127) {
target[tp] = 235;
tp++;
target[tp] = (source[sp] - 128) + 1;
tp++; concat(binary, " ");
} else {
if(gs1 && (source[sp] == '[')) {
target[tp] = 232; /* FNC1 */
} else {
target[tp] = source[sp] + 1;
}
tp++;
concat(binary, " ");
}
sp++;
}
}
}
/* step (c) C40 encodation */
if(current_mode == DM_C40) {
int shift_set, value;
next_mode = DM_C40;
if(c40_p == 0) {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
}
if(next_mode != DM_C40) {
target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
next_mode = DM_ASCII;
} else {
if(source[sp] > 127) {
c40_buffer[c40_p] = 1; c40_p++;
c40_buffer[c40_p] = 30; c40_p++; /* Upper Shift */
shift_set = c40_shift[source[sp] - 128];
value = c40_value[source[sp] - 128];
} else {
shift_set = c40_shift[source[sp]];
value = c40_value[source[sp]];
}
if(gs1 && (source[sp] == '[')) {
shift_set = 2;
value = 27; /* FNC1 */
}
if(shift_set != 0) {
c40_buffer[c40_p] = shift_set - 1; c40_p++;
}
c40_buffer[c40_p] = value; c40_p++;
if(c40_p >= 3) {
int iv;
iv = (1600 * c40_buffer[0]) + (40 * c40_buffer[1]) + (c40_buffer[2]) + 1;
target[tp] = iv / 256; tp++;
target[tp] = iv % 256; tp++;
concat(binary, " ");
c40_buffer[0] = c40_buffer[3];
c40_buffer[1] = c40_buffer[4];
c40_buffer[2] = c40_buffer[5];
c40_buffer[3] = 0;
c40_buffer[4] = 0;
c40_buffer[5] = 0;
c40_p -= 3;
}
sp++;
}
}
/* step (d) Text encodation */
if(current_mode == DM_TEXT) {
int shift_set, value;
next_mode = DM_TEXT;
if(text_p == 0) {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
}
if(next_mode != DM_TEXT) {
target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
next_mode = DM_ASCII;
} else {
if(source[sp] > 127) {
text_buffer[text_p] = 1; text_p++;
text_buffer[text_p] = 30; text_p++; /* Upper Shift */
shift_set = text_shift[source[sp] - 128];
value = text_value[source[sp] - 128];
} else {
shift_set = text_shift[source[sp]];
value = text_value[source[sp]];
}
if(gs1 && (source[sp] == '[')) {
shift_set = 2;
value = 27; /* FNC1 */
}
if(shift_set != 0) {
text_buffer[text_p] = shift_set - 1; text_p++;
}
text_buffer[text_p] = value; text_p++;
if(text_p >= 3) {
int iv;
iv = (1600 * text_buffer[0]) + (40 * text_buffer[1]) + (text_buffer[2]) + 1;
target[tp] = iv / 256; tp++;
target[tp] = iv % 256; tp++;
concat(binary, " ");
text_buffer[0] = text_buffer[3];
text_buffer[1] = text_buffer[4];
text_buffer[2] = text_buffer[5];
text_buffer[3] = 0;
text_buffer[4] = 0;
text_buffer[5] = 0;
text_p -= 3;
}
sp++;
}
}
/* step (e) X12 encodation */
if(current_mode == DM_X12) {
int value = 0;
next_mode = DM_X12;
if(text_p == 0) {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
}
if(next_mode != DM_X12) {
target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
} else {
if(source[sp] == 13) { value = 0; }
if(source[sp] == '*') { value = 1; }
if(source[sp] == '>') { value = 2; }
if(source[sp] == ' ') { value = 3; }
if((source[sp] >= '0') && (source[sp] <= '9')) { value = (source[sp] - '0') + 4; }
if((source[sp] >= 'A') && (source[sp] <= 'Z')) { value = (source[sp] - 'A') + 14; }
x12_buffer[x12_p] = value; x12_p++;
if(x12_p >= 3) {
int iv;
iv = (1600 * x12_buffer[0]) + (40 * x12_buffer[1]) + (x12_buffer[2]) + 1;
target[tp] = iv / 256; tp++;
target[tp] = iv % 256; tp++;
concat(binary, " ");
x12_buffer[0] = x12_buffer[3];
x12_buffer[1] = x12_buffer[4];
x12_buffer[2] = x12_buffer[5];
x12_buffer[3] = 0;
x12_buffer[4] = 0;
x12_buffer[5] = 0;
x12_p -= 3;
}
sp++;
}
}
/* step (f) EDIFACT encodation */
if(current_mode == DM_EDIFACT) {
int value = 0;
next_mode = DM_EDIFACT;
if(edifact_p == 3) {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
}
if(next_mode != DM_EDIFACT) {
edifact_buffer[edifact_p] = 31; edifact_p++;
next_mode = DM_ASCII;
} else {
if((source[sp] >= '@') && (source[sp] <= '^')) { value = source[sp] - '@'; }
if((source[sp] >= ' ') && (source[sp] <= '?')) { value = source[sp]; }
edifact_buffer[edifact_p] = value; edifact_p++;
sp++;
}
if(edifact_p >= 4) {
target[tp] = (edifact_buffer[0] << 2) + ((edifact_buffer[1] & 0x30) >> 4); tp++;
target[tp] = ((edifact_buffer[1] & 0x0f) << 4) + ((edifact_buffer[2] & 0x3c) >> 2); tp++;
target[tp] = ((edifact_buffer[2] & 0x03) << 6) + edifact_buffer[3]; tp++;
concat(binary, " ");
edifact_buffer[0] = edifact_buffer[4];
edifact_buffer[1] = edifact_buffer[5];
edifact_buffer[2] = edifact_buffer[6];
edifact_buffer[3] = edifact_buffer[7];
edifact_buffer[4] = 0;
edifact_buffer[5] = 0;
edifact_buffer[6] = 0;
edifact_buffer[7] = 0;
edifact_p -= 4;
}
}
/* step (g) Base 256 encodation */
if(current_mode == DM_BASE256) {
next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
if(next_mode == DM_BASE256) {
target[tp] = source[sp];
tp++;
sp++;
concat(binary, "b");
} else {
next_mode = DM_ASCII;
}
}
if(tp > 1558) {
free(binary);
return 0;
}
} /* while */
/* Empty buffers */
if(c40_p == 2) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 2] + 1; tp++;
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
if(c40_p == 1) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
if(text_p == 2) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 2] + 1; tp++;
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
if(text_p == 1) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
if(x12_p == 2) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 2] + 1; tp++;
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
if(x12_p == 1) {
target[tp] = 254; tp++; /* unlatch */
target[tp] = source[inputlen - 1] + 1; tp++;
concat(binary, " ");
current_mode = DM_ASCII;
}
/* Add length and randomising algorithm to b256 */
i = 0;
while (i < tp) {
if(binary[i] == 'b') {
if((i == 0) || ((i != 0) && (binary[i - 1] != 'b'))) {
/* start of binary data */
int binary_count; /* length of b256 data */
for(binary_count = 0; binary[binary_count + i] == 'b'; binary_count++);
if(binary_count <= 249) {
dminsert(binary, i, 'b');
insert_value(target, i, tp, binary_count); tp++;
} else {
dminsert(binary, i, 'b');
dminsert(binary, i + 1, 'b');
insert_value(target, i, tp, (binary_count / 250) + 249); tp++;
insert_value(target, i + 1, tp, binary_count % 250); tp++;
}
}
}
i++;
}
for(i = 0; i < tp; i++) {
if(binary[i] == 'b') {
int prn, temp;
prn = ((149 * (i + 1)) % 255) + 1;
temp = target[i] + prn;
if (temp <= 255) { target[i] = temp; } else { target[i] = temp - 256; }
}
}
// QString s,s1;
// s="";
// for(i = 0; i < tp; i++){
// s1.sprintf("%02X ", target[i]);
// s+=s1;
// }
//qDebug()<<"bin:"<<tp;
*(last_mode) = current_mode;
free(binary);
return tp;
}
void add_tail(unsigned char target[], int tp, int tail_length, int last_mode)
{
/* adds unlatch and pad bits */
int i, prn, temp;
switch(last_mode) {
case DM_C40:
case DM_TEXT:
case DM_X12:
target[tp] = 254; tp++; /* Unlatch */
tail_length--;
}
for(i = tail_length; i > 0; i--) {
if(i == tail_length) {
target[tp] = 129; tp++; /* Pad */
} else {
prn = ((149 * (tp + 1)) % 253) + 1;
temp = 129 + prn;
if(temp <= 254) {
target[tp] = temp; tp++;
} else {
target[tp] = temp - 254; tp++;
}
}
}
}
unsigned char *iec16022ecc200(short *Wptr, short *Hptr, unsigned char *barcode, short* type)
{
int inputlen, i;
int binlen;
int symbolsize, optionsize, calcsize;
int taillength, error_number = 0;
int H, W, FH, FW, datablock, bytes, rsblock;
int last_mode;
unsigned char *grid = 0;
unsigned char *source;
// unsigned char binary[100];
unsigned char *binary;
binary = (unsigned char *)malloc(2000+10);
// binary = (unsigned char *)QRcode_malloc(2000+10);
#ifdef WIN32
printf("New Lib Routine !!! \n");
#endif
source = barcode;
inputlen = ustrlen(source);
binlen = dm200encode(barcode, binary, &last_mode);
if(binlen == 0) {
free(binary);
return 0;
}
calcsize = 29;
for(i = 29; i > -1; i--) {
if(matrixbytes[i] > binlen) {
calcsize = i;
}
}
#ifdef QTDEBUG
qDebug()<<"binlen"<<binlen<<calcsize;
#endif
short k = *type;
if(k != 0)
{
switch(k)
{
case 1:
{
if(calcsize > 2)
{
*type = -1;
}
else
{
calcsize = 2;
}
}break;
case 2:
{
if(calcsize > 4)
{
*type = -1;
}
else
{
calcsize = 4;
}
}break;
case 3:
{
if(calcsize > 6)
{
*type = -1;
}
else
{
calcsize = 6;
}
}break;
case 4:
{
if(calcsize > 9)
{
*type = -1;
}
else
{
calcsize = 9;
}
}break;
case 5:
{
if(calcsize > 11)
{
*type = -1;
}
else
{
calcsize = 11;
}
}break;
case 6:
{
if(calcsize > 14)
{
*type = -1;
}
else
{
calcsize = 14;
}
}break;
}
}
else
{
switch(calcsize) {
case 2:
case 4:
case 6:
case 9:
case 11:
case 14:
calcsize++;
}
}
//optionsize = -1;
optionsize = 10;
symbolsize = optionsize;
if(calcsize <= optionsize) {
symbolsize = optionsize;
} else
{
symbolsize = calcsize;
}
#ifdef QTDEBUG
qDebug()<<"symbolsize ="<<symbolsize <<optionsize<<calcsize;
#endif
H = matrixH[symbolsize];
W = matrixW[symbolsize];
FH = matrixFH[symbolsize];
FW = matrixFW[symbolsize];
bytes = matrixbytes[symbolsize];
datablock = matrixdatablock[symbolsize];
rsblock = matrixrsblock[symbolsize];
taillength = bytes - binlen;
if(taillength != 0) {
add_tail(binary, binlen, taillength, last_mode);
}
// ecc code
ecc200(binary, bytes, datablock, rsblock);
{ // placement
int x, y, NC, NR, *places;
NC = W - 2 * (W / FW);
NR = H - 2 * (H / FH);
places = (int*)safemalloc(NC * NR * sizeof(int));
// places = (int*)QRcode_malloc(NC * NR * sizeof(int));
ecc200placement(places, NR, NC);
grid = (unsigned char*)safemalloc(W * H);
// grid = (unsigned char*)QRcode_malloc(W * H);
memset(grid, 0, W * H);
for (y = 0; y < H; y += FH) {
for (x = 0; x < W; x++)
grid[y * W + x] = 1;
for (x = 0; x < W; x += 2)
grid[(y + FH - 1) * W + x] = 1;
}
for (x = 0; x < W; x += FW) {
for (y = 0; y < H; y++)
grid[y * W + x] = 1;
for (y = 0; y < H; y += 2)
grid[y * W + x + FW - 1] = 1;
}
for (y = 0; y < NR; y++) {
for (x = 0; x < NC; x++) {
int v = places[(NR - y - 1) * NC + x];
//fprintf (stderr, "%4d", v);
if (v == 1 || (v > 7 && (binary[(v >> 3) - 1] & (1 << (v & 7)))))
grid[(1 + y + 2 * (y / (FH - 2))) * W + 1 + x + 2 * (x / (FW - 2))] = 1;
}
//fprintf (stderr, "\n");
}
for(y = H - 1; y >= 0; y--) {
int x;
for(x = 0; x < W; x++) {
if(grid[W * y + x])
{
#ifdef WIN32
printf("X");
#endif
}
#ifdef WIN32
else
printf(" ");
#endif
}
#ifdef WIN32
printf("\n");
#endif
}
free(places);
}
*Wptr = (short)W;
*Hptr = (short)H;
free(binary);
return grid;
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PulseNumFix</class>
<widget class="QDialog" name="PulseNumFix">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>481</width>
<height>228</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>240</x>
<y>180</y>
<width>221</width>
<height>41</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>461</width>
<height>177</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButtonAccordingRate">
<property name="text">
<string>根据速度</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonAccordingLength">
<property name="text">
<string>根据喷印</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonAccordingPulseNum">
<property name="text">
<string>根据脉冲数</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonSynchonizerPara">
<property name="text">
<string>根据同步器参数</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labelRate">
<property name="text">
<string>实际皮带速度(毫米/秒):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditRate">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="labelActualSynLength">
<property name="text">
<string>实际喷印间隔长度(毫米):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditActualSynLength">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="labelLength">
<property name="text">
<string>长度(毫米):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditLength">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelPulseNum">
<property name="text">
<string>同步脉冲数</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditPulseNum">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="labelDiameter">
<property name="text">
<string>同步器直径(毫米):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditDiameter">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelPulsePerCycle">
<property name="text">
<string>脉冲数/转:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditPulsePerCycle">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>PulseNumFix</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>PulseNumFix</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,439 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ZkEdit</class>
<widget class="QWidget" name="ZkEdit">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<widget class="zkWidget" name="widgetPic">
<property name="geometry">
<rect>
<x>0</x>
<y>89</y>
<width>400</width>
<height>400</height>
</rect>
</property>
</widget>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelScaleLeval">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>编辑图案</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelFileName">
<property name="maximumSize">
<size>
<width>180</width>
<height>20</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0">
<property name="horizontalSpacing">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>30</number>
</property>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonDown">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/arrowdown.png</normaloff>:/icon/arrowdown.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonEnsure">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/sure.png</normaloff>:/icon/sure.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButtonLeft">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/arrowleft.png</normaloff>:/icon/arrowleft.png</iconset>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonUp">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/arrowup.png</normaloff>:/icon/arrowup.png</iconset>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButtonRight">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/arrowright.png</normaloff>:/icon/arrowright.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>5</number>
</property>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonReduce">
<property name="minimumSize">
<size>
<width>0</width>
<height>45</height>
</size>
</property>
<property name="text">
<string>缩小</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/zoomout.png</normaloff>:/icon/zoomout.png</iconset>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QPushButton" name="pushButtonSave">
<property name="text">
<string>保存</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/filesave.png</normaloff>:/icon/filesave.png</iconset>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QPushButton" name="pushButtonNew">
<property name="text">
<string>新建</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/filenew.png</normaloff>:/icon/filenew.png</iconset>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBoxWidthPoint">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>37</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>256</number>
</property>
<property name="value">
<number>12</number>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="pushButtonSaveAs">
<property name="text">
<string>保存为</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/filesaveas.png</normaloff>:/icon/filesaveas.png</iconset>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>高度</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxPicExpand">
<property name="text">
<string>图像扩张</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="pushButtonOpen">
<property name="text">
<string>打开</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/fileopen.png</normaloff>:/icon/fileopen.png</iconset>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>宽度</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>A</string>
</property>
<property name="maxLength">
<number>11</number>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="spinBoxHeightPoint">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>256</number>
</property>
<property name="value">
<number>12</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButtonEnlarge">
<property name="minimumSize">
<size>
<width>0</width>
<height>45</height>
</size>
</property>
<property name="text">
<string>放大</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/zoomin.png</normaloff>:/icon/zoomin.png</iconset>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pushButtonImport">
<property name="text">
<string>导入</string>
</property>
<property name="icon">
<iconset resource="image.qrc">
<normaloff>:/icon/fileimport.png</normaloff>:/icon/fileimport.png</iconset>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="checkBoxTrimPic">
<property name="text">
<string>图像裁剪</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>zkWidget</class>
<extends>QWidget</extends>
<header location="global">zkWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="image.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,20 @@
#ifndef VERBVERSION_H
#define VERBVERSION_H
/*
Major.Minor.Rivison.yyyy-MM-DD_Beta
*/
#define UP_PRINTER_MAJOR_VER 6
#define UP_PRINTER_MINOR_VER 1
#define UP_PRINTER_RIVISION_VER 1
#define UP_PRINTER_STAGE_VER "Std"
#define SUB_VERSION "GuiL"
//#define UP_PRINTER_STAGE_VER "Beta"
//#define UP_PRINTER_STAGE_VER "RC"
//#define UP_PRINTER_STAGE_VER "Release"
#define VERNONBACH_VERSION(a,b,c) (((a)<<16) + ((b)<<8) + (c))
#define VERNONBACH_VERSION_CODE VERNONBACH_VERSION(UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER, UP_PRINTER_RIVISION_VER)
#endif // VERBVERSION_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,270 @@
/*
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* File: $Id: mbfunccoils.c,v 1.8 2007/02/18 23:47:16 wolti Exp $
*/
/* ----------------------- System includes ----------------------------------*/
#include "stdlib.h"
#include "string.h"
/* ----------------------- Platform includes --------------------------------*/
#include "port.h"
/* ----------------------- Modbus includes ----------------------------------*/
#include "mb.h"
#include "mbframe.h"
#include "mbproto.h"
#include "mbconfig.h"
/* ----------------------- Defines ------------------------------------------*/
#define MB_PDU_FUNC_READ_ADDR_OFF ( MB_PDU_DATA_OFF )
#define MB_PDU_FUNC_READ_COILCNT_OFF ( MB_PDU_DATA_OFF + 2 )
#define MB_PDU_FUNC_READ_SIZE ( 4 )
#define MB_PDU_FUNC_READ_COILCNT_MAX ( 0x07D0 )
#define MB_PDU_FUNC_WRITE_ADDR_OFF ( MB_PDU_DATA_OFF )
#define MB_PDU_FUNC_WRITE_VALUE_OFF ( MB_PDU_DATA_OFF + 2 )
#define MB_PDU_FUNC_WRITE_SIZE ( 4 )
#define MB_PDU_FUNC_WRITE_MUL_ADDR_OFF ( MB_PDU_DATA_OFF )
#define MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF ( MB_PDU_DATA_OFF + 2 )
#define MB_PDU_FUNC_WRITE_MUL_BYTECNT_OFF ( MB_PDU_DATA_OFF + 4 )
#define MB_PDU_FUNC_WRITE_MUL_VALUES_OFF ( MB_PDU_DATA_OFF + 5 )
#define MB_PDU_FUNC_WRITE_MUL_SIZE_MIN ( 5 )
#define MB_PDU_FUNC_WRITE_MUL_COILCNT_MAX ( 0x07B0 )
/* ----------------------- Static functions ---------------------------------*/
eMBException prveMBError2Exception( eMBErrorCode eErrorCode );
/* ----------------------- Start implementation -----------------------------*/
#if MB_FUNC_READ_COILS_ENABLED > 0
eMBException
eMBFuncReadCoils( UCHAR * pucFrame, USHORT * usLen )
{
USHORT usRegAddress;
USHORT usCoilCount;
UCHAR ucNBytes;
UCHAR *pucFrameCur;
eMBException eStatus = MB_EX_NONE;
eMBErrorCode eRegStatus;
if( *usLen == ( MB_PDU_FUNC_READ_SIZE + MB_PDU_SIZE_MIN ) )
{
usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_ADDR_OFF] << 8 );
usRegAddress |= ( USHORT )( pucFrame[MB_PDU_FUNC_READ_ADDR_OFF + 1] );
usRegAddress++;
usCoilCount = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_COILCNT_OFF] << 8 );
usCoilCount |= ( USHORT )( pucFrame[MB_PDU_FUNC_READ_COILCNT_OFF + 1] );
/* Check if the number of registers to read is valid. If not
* return Modbus illegal data value exception.
*/
if( ( usCoilCount >= 1 ) &&
( usCoilCount < MB_PDU_FUNC_READ_COILCNT_MAX ) )
{
/* Set the current PDU data pointer to the beginning. */
pucFrameCur = &pucFrame[MB_PDU_FUNC_OFF];
*usLen = MB_PDU_FUNC_OFF;
/* First byte contains the function code. */
*pucFrameCur++ = MB_FUNC_READ_COILS;
*usLen += 1;
/* Test if the quantity of coils is a multiple of 8. If not last
* byte is only partially field with unused coils set to zero. */
if( ( usCoilCount & 0x0007 ) != 0 )
{
ucNBytes = ( UCHAR )( usCoilCount / 8 + 1 );
}
else
{
ucNBytes = ( UCHAR )( usCoilCount / 8 );
}
*pucFrameCur++ = ucNBytes;
*usLen += 1;
eRegStatus =
eMBRegCoilsCB( pucFrameCur, usRegAddress, usCoilCount,
MB_REG_READ );
/* If an error occured convert it into a Modbus exception. */
if( eRegStatus != MB_ENOERR )
{
eStatus = prveMBError2Exception( eRegStatus );
}
else
{
/* The response contains the function code, the starting address
* and the quantity of registers. We reuse the old values in the
* buffer because they are still valid. */
*usLen += ucNBytes;;
}
}
else
{
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
}
else
{
/* Can't be a valid read coil register request because the length
* is incorrect. */
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
return eStatus;
}
#if MB_FUNC_WRITE_COIL_ENABLED > 0
eMBException
eMBFuncWriteCoil( UCHAR * pucFrame, USHORT * usLen )
{
USHORT usRegAddress;
UCHAR ucBuf[2];
eMBException eStatus = MB_EX_NONE;
eMBErrorCode eRegStatus;
if( *usLen == ( MB_PDU_FUNC_WRITE_SIZE + MB_PDU_SIZE_MIN ) )
{
usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_ADDR_OFF] << 8 );
usRegAddress |= ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_ADDR_OFF + 1] );
usRegAddress++;
if( ( pucFrame[MB_PDU_FUNC_WRITE_VALUE_OFF + 1] == 0x00 ) &&
( ( pucFrame[MB_PDU_FUNC_WRITE_VALUE_OFF] == 0xFF ) ||
( pucFrame[MB_PDU_FUNC_WRITE_VALUE_OFF] == 0x00 ) ) )
{
ucBuf[1] = 0;
if( pucFrame[MB_PDU_FUNC_WRITE_VALUE_OFF] == 0xFF )
{
ucBuf[0] = 1;
}
else
{
ucBuf[0] = 0;
}
eRegStatus =
eMBRegCoilsCB( &ucBuf[0], usRegAddress, 1, MB_REG_WRITE );
/* If an error occured convert it into a Modbus exception. */
if( eRegStatus != MB_ENOERR )
{
eStatus = prveMBError2Exception( eRegStatus );
}
}
else
{
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
}
else
{
/* Can't be a valid write coil register request because the length
* is incorrect. */
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
return eStatus;
}
#endif
#if MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED > 0
eMBException
eMBFuncWriteMultipleCoils( UCHAR * pucFrame, USHORT * usLen )
{
USHORT usRegAddress;
USHORT usCoilCnt;
UCHAR ucByteCount;
UCHAR ucByteCountVerify;
eMBException eStatus = MB_EX_NONE;
eMBErrorCode eRegStatus;
if( *usLen > ( MB_PDU_FUNC_WRITE_SIZE + MB_PDU_SIZE_MIN ) )
{
usRegAddress = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_ADDR_OFF] << 8 );
usRegAddress |= ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_ADDR_OFF + 1] );
usRegAddress++;
usCoilCnt = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF] << 8 );
usCoilCnt |= ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF + 1] );
ucByteCount = pucFrame[MB_PDU_FUNC_WRITE_MUL_BYTECNT_OFF];
/* Compute the number of expected bytes in the request. */
if( ( usCoilCnt & 0x0007 ) != 0 )
{
ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 + 1 );
}
else
{
ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 );
}
if( ( usCoilCnt >= 1 ) &&
( usCoilCnt <= MB_PDU_FUNC_WRITE_MUL_COILCNT_MAX ) &&
( ucByteCountVerify == ucByteCount ) )
{
eRegStatus =
eMBRegCoilsCB( &pucFrame[MB_PDU_FUNC_WRITE_MUL_VALUES_OFF],
usRegAddress, usCoilCnt, MB_REG_WRITE );
/* If an error occured convert it into a Modbus exception. */
if( eRegStatus != MB_ENOERR )
{
eStatus = prveMBError2Exception( eRegStatus );
}
else
{
/* The response contains the function code, the starting address
* and the quantity of registers. We reuse the old values in the
* buffer because they are still valid. */
*usLen = MB_PDU_FUNC_WRITE_MUL_BYTECNT_OFF;
}
}
else
{
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
}
else
{
/* Can't be a valid write coil register request because the length
* is incorrect. */
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
return eStatus;
}
#endif
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>435</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>330</x>
<y>350</y>
<width>99</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>encode</string>
</property>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="geometry">
<rect>
<x>10</x>
<y>290</y>
<width>541</width>
<height>51</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>270</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Message</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_size">
<property name="geometry">
<rect>
<x>450</x>
<y>240</y>
<width>85</width>
<height>27</height>
</rect>
</property>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="comboBox_level">
<property name="geometry">
<rect>
<x>310</x>
<y>240</y>
<width>85</width>
<height>27</height>
</rect>
</property>
<item>
<property name="text">
<string>L</string>
</property>
</item>
<item>
<property name="text">
<string>M</string>
</property>
</item>
<item>
<property name="text">
<string>H</string>
</property>
</item>
<item>
<property name="text">
<string>Q</string>
</property>
</item>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>370</x>
<y>240</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>230</x>
<y>250</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>level:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="labQRImage">
<property name="geometry">
<rect>
<x>40</x>
<y>10</y>
<width>431</width>
<height>211</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,68 @@
#include <stdio.h>
#include <string.h>
//
// U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize
#include "dm200.h"
#include "QImage"
#include "QDebug"
#define MAX_WIDTH_BYTE 48 // 384/8
char DataMatrixdDraw(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize);
//char DataMatrixdDrawImg(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize,QImage *pImg);
void Draw_Matrix(unsigned char *buffer)
{
U16 sColumns, sRows;
U08 *Grid;
sColumns = sRows = 0;
Grid = 0;
sColumns = sRows = 0;
short sizeType = 0;
Grid = iec16022ecc200((short*)&sRows, (short*)&sColumns, buffer, &sizeType);
DataMatrixdDraw(Grid,sRows,sColumns,2);
}
char DataMatrixdDraw(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize)
{
int Size=MSize;
int w = cColumns*Size;
int h = cRows*Size;
//qDebug()<<w<<h<<Size;
QImage QRImage(w,h,QImage::Format_ARGB32 );
QImage *img;
img = &QRImage;
img->fill(0x00ffffff);
/* data */
int margin=0;
U08 *p = OutBuff;
int ypos=0;//margin * Size;
int xpos=0;
int x,y,xx,yy,bit;
for(y=0; y<cRows; y++) {
bit = 7;
bit = 7 - (margin * Size % 8);
xpos=margin * Size;
for(x=0; x<cColumns; x++) {
for(xx=0; xx<Size; xx++) {
if((*p & 1) << bit){
for(yy=0; yy<Size; yy++) {
img->setPixel(xpos,h-1-(ypos+yy),0xff000000);
}
}
xpos++;
}
p++;
bit--;
if(bit < 0) {
//q++;
bit = 7;
}
}
ypos+=Size;
}
img->save("Myqr.bmp");
return 0;
}
@@ -0,0 +1,80 @@
/****************************************************************************
** Meta object code from reading C++ file 'DialogInputTxt.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../DialogInputTxt.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'DialogInputTxt.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DialogInputTxt[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_DialogInputTxt[] = {
"DialogInputTxt\0"
};
void DialogInputTxt::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData DialogInputTxt::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DialogInputTxt::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DialogInputTxt,
qt_meta_data_DialogInputTxt, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DialogInputTxt::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DialogInputTxt::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DialogInputTxt::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DialogInputTxt))
return static_cast<void*>(const_cast< DialogInputTxt*>(this));
return QDialog::qt_metacast(_clname);
}
int DialogInputTxt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,153 @@
/********************************************************************************
** Form generated from reading UI file 'sceneEditOption.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_SCENEEDITOPTION_H
#define UI_SCENEEDITOPTION_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_SceneEditOption
{
public:
QHBoxLayout *horizontalLayout;
QHBoxLayout *horizontalLayout_2;
QPushButton *previewButton;
QPushButton *newfileButton;
QPushButton *openfileButton;
QPushButton *saveButton;
QPushButton *saveAsButton;
QPushButton *addButton;
QPushButton *EditItemButton;
QPushButton *delButton;
QPushButton *enlargeButton;
QPushButton *reduceButton;
void setupUi(QWidget *SceneEditOption)
{
if (SceneEditOption->objectName().isEmpty())
SceneEditOption->setObjectName(QString::fromUtf8("SceneEditOption"));
SceneEditOption->resize(924, 58);
horizontalLayout = new QHBoxLayout(SceneEditOption);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
previewButton = new QPushButton(SceneEditOption);
previewButton->setObjectName(QString::fromUtf8("previewButton"));
previewButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(previewButton);
newfileButton = new QPushButton(SceneEditOption);
newfileButton->setObjectName(QString::fromUtf8("newfileButton"));
newfileButton->setEnabled(true);
newfileButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(newfileButton);
openfileButton = new QPushButton(SceneEditOption);
openfileButton->setObjectName(QString::fromUtf8("openfileButton"));
openfileButton->setEnabled(true);
openfileButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(openfileButton);
saveButton = new QPushButton(SceneEditOption);
saveButton->setObjectName(QString::fromUtf8("saveButton"));
saveButton->setEnabled(true);
saveButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(saveButton);
saveAsButton = new QPushButton(SceneEditOption);
saveAsButton->setObjectName(QString::fromUtf8("saveAsButton"));
saveAsButton->setEnabled(true);
saveAsButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(saveAsButton);
addButton = new QPushButton(SceneEditOption);
addButton->setObjectName(QString::fromUtf8("addButton"));
addButton->setEnabled(true);
addButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(addButton);
EditItemButton = new QPushButton(SceneEditOption);
EditItemButton->setObjectName(QString::fromUtf8("EditItemButton"));
EditItemButton->setEnabled(true);
EditItemButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(EditItemButton);
delButton = new QPushButton(SceneEditOption);
delButton->setObjectName(QString::fromUtf8("delButton"));
delButton->setEnabled(true);
delButton->setMinimumSize(QSize(0, 40));
horizontalLayout_2->addWidget(delButton);
enlargeButton = new QPushButton(SceneEditOption);
enlargeButton->setObjectName(QString::fromUtf8("enlargeButton"));
enlargeButton->setMinimumSize(QSize(0, 40));
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/zoomin.png"), QSize(), QIcon::Normal, QIcon::Off);
enlargeButton->setIcon(icon);
horizontalLayout_2->addWidget(enlargeButton);
reduceButton = new QPushButton(SceneEditOption);
reduceButton->setObjectName(QString::fromUtf8("reduceButton"));
reduceButton->setMinimumSize(QSize(0, 40));
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/icon/zoomout.png"), QSize(), QIcon::Normal, QIcon::Off);
reduceButton->setIcon(icon1);
horizontalLayout_2->addWidget(reduceButton);
horizontalLayout->addLayout(horizontalLayout_2);
retranslateUi(SceneEditOption);
QMetaObject::connectSlotsByName(SceneEditOption);
} // setupUi
void retranslateUi(QWidget *SceneEditOption)
{
SceneEditOption->setWindowTitle(QApplication::translate("SceneEditOption", "Form", 0, QApplication::UnicodeUTF8));
previewButton->setText(QApplication::translate("SceneEditOption", "\351\242\204\350\247\210", 0, QApplication::UnicodeUTF8));
newfileButton->setText(QApplication::translate("SceneEditOption", "\346\226\260\345\273\272", 0, QApplication::UnicodeUTF8));
openfileButton->setText(QApplication::translate("SceneEditOption", "\346\211\223\345\274\200", 0, QApplication::UnicodeUTF8));
saveButton->setText(QApplication::translate("SceneEditOption", "\344\277\235\345\255\230", 0, QApplication::UnicodeUTF8));
saveAsButton->setText(QApplication::translate("SceneEditOption", "\345\217\246\345\255\230\344\270\272", 0, QApplication::UnicodeUTF8));
addButton->setText(QApplication::translate("SceneEditOption", "\346\226\260\345\242\236\345\233\276\345\205\203", 0, QApplication::UnicodeUTF8));
EditItemButton->setText(QApplication::translate("SceneEditOption", "\347\274\226\350\276\221\345\233\276\345\205\203", 0, QApplication::UnicodeUTF8));
delButton->setText(QApplication::translate("SceneEditOption", "\345\210\240\351\231\244\345\233\276\345\205\203", 0, QApplication::UnicodeUTF8));
enlargeButton->setText(QApplication::translate("SceneEditOption", "\346\224\276\345\244\247", 0, QApplication::UnicodeUTF8));
reduceButton->setText(QApplication::translate("SceneEditOption", "\347\274\251\345\260\217", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class SceneEditOption: public Ui_SceneEditOption {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_SCENEEDITOPTION_H
@@ -0,0 +1,84 @@
/********************************************************************************
** Form generated from reading UI file 'dialogauthorization.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DIALOGAUTHORIZATION_H
#define UI_DIALOGAUTHORIZATION_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_DialogAuthorization
{
public:
QDialogButtonBox *buttonBox;
QWidget *horizontalLayoutWidget;
QHBoxLayout *horizontalLayout;
QLabel *label;
QLineEdit *lineEditAuth;
void setupUi(QDialog *DialogAuthorization)
{
if (DialogAuthorization->objectName().isEmpty())
DialogAuthorization->setObjectName(QString::fromUtf8("DialogAuthorization"));
DialogAuthorization->resize(445, 123);
DialogAuthorization->setFocusPolicy(Qt::StrongFocus);
buttonBox = new QDialogButtonBox(DialogAuthorization);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setGeometry(QRect(210, 80, 221, 41));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
horizontalLayoutWidget = new QWidget(DialogAuthorization);
horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
horizontalLayoutWidget->setGeometry(QRect(10, 20, 421, 51));
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setContentsMargins(0, 0, 0, 0);
label = new QLabel(horizontalLayoutWidget);
label->setObjectName(QString::fromUtf8("label"));
horizontalLayout->addWidget(label);
lineEditAuth = new QLineEdit(horizontalLayoutWidget);
lineEditAuth->setObjectName(QString::fromUtf8("lineEditAuth"));
horizontalLayout->addWidget(lineEditAuth);
retranslateUi(DialogAuthorization);
QObject::connect(buttonBox, SIGNAL(accepted()), DialogAuthorization, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), DialogAuthorization, SLOT(reject()));
QMetaObject::connectSlotsByName(DialogAuthorization);
} // setupUi
void retranslateUi(QDialog *DialogAuthorization)
{
DialogAuthorization->setWindowTitle(QApplication::translate("DialogAuthorization", "Dialog", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("DialogAuthorization", "\346\216\210\346\235\203\345\257\206\347\240\201:", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DialogAuthorization: public Ui_DialogAuthorization {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOGAUTHORIZATION_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
#include "InsertSpaceNumDialog.h"
#include "ui_insertspacenumdialog.h"
InsertSpaceNumDialog::InsertSpaceNumDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::InsertSpaceNumDialog)
{
ui->setupUi(this);
this->setFixedSize(this->geometry().width(),this->geometry().height());
}
InsertSpaceNumDialog::~InsertSpaceNumDialog()
{
delete ui;
}
QSpinBox *InsertSpaceNumDialog::getSpinBoxSpaceNum(){
return ui->spinBoxSpaceNum;
}
@@ -0,0 +1,130 @@
#ifndef SYSTEMMANAGE_H
#define SYSTEMMANAGE_H
#include <QWidget>
#include "ParaSettingUI.h"
#include "TimeSettingDialog.h"
#include <QTimer>
#include "DialogAuthorization.h"
#include "qprogressdialog.h"
#include "PrintSetting.h"
#include "dlginputaddr.h"
namespace Ui {
class SystemManage;
}
class SystemManage : public QWidget,public ParaSettingUI
{
Q_OBJECT
public:
explicit SystemManage(QWidget *parent = 0);
~SystemManage();
void updateSysStatusToUI(); //重载
void bindDlgInputAddr(DlgInputAddr *dlgInputAddr);//绑定时间权限管理对象
void getCurrentScrennType();
bool flagOfTouchScreenType;
private slots:
void on_pushButtonCompressPump_pressed();
void on_pushButtonGhost_pressed();
void on_pushButtonCycleValve_pressed();
void updateGearPumpValue(int);
void on_pushButtonGearPump_pressed();
void on_pushButtonInkValve_pressed();
void on_pushButtonMainInkPump_pressed();
void on_pushButtonMixValve_pressed();
void on_pushButtonReclaimPump_pressed();
void on_pushButtonViscosityPump_pressed();
void on_pushButtonControlByHand_pressed();
void on_pushButtonReclaimTankOpen_pressed();
void on_pushButtonReclaimTankClose_pressed();
void on_pushButtonTimeSetting_clicked();
void onTimeSettingDone(); //时间设置完成
void on_pushButtonUpdateCharLib_pressed();
void on_pushButtonFactorySetting_pressed();
void on_pushButtonScreenAdjust_pressed();
void on_pushButtonUpdateSoftware_pressed();
void on_pushButtonCleanUP_pressed();
void on_pushButtonReleaseValve_pressed();
void timerHandler();
void timerHandler2();
void autoCleanTimerHandler();
void on_pushButtonExportConfToUDisk_clicked();
void on_pushButtonImportConfFromUdisk_clicked();
void ondialogAuthorizationAccepted();
void on_pushButtonAutoClean_pressed();
void onAutoCleanStart();
void reclainTankTestHandler();
void changeToManualControl();
/***2019/10/22 start*****/
void inkcloseCountHandler();
/***2019/10/22 end*****/
/***2019/10/23 start*****/
void MainInkCmpSepetalHandler();
/***2019/10/23 */
//void on_pushButtonAutoClean_clicked();
void on_pushButtonFontToUdisk_pressed();
void on_pushButtonMotorTest_pressed();
void on_pushButtonPushAir_pressed();
void on_dialogTimeSetAuthorizationAccepted();//2020/1/6
void on_dialogFactorySetAuthorizationAccepted();
void on_dialogSysUpdateAuthorizationAccepted();
void on_pushButtonGearPumpOff_pressed();
void on_pushButtonChangeScreen_clicked();
Q_SIGNALS:
void configChanged();
void autoCleanStart();
void enableReclaimButton(bool flag);
private:
Ui::SystemManage *ui;
void setPumpValveBottonEnable(bool enable);
TimeSettingDialog timeDia;
QTimer *timer,*timer2,*autoCleanTimer,*reclaimTankTestTimer,*inkcloseCountTimer,*MainnkCmpSepetalTimer;
int reclainTankTestState;
int reclainTankTestCount;//测试次数
DialogAuthorization *dialogUpateMm;
DialogAuthorization *dialogTimeSetAuthorization; //2020/1/6
DialogAuthorization *dialogSysUpdateAuthorization;
DlgInputAddr *dlgInputAddr_TimeSet;//2020/1/6
QProgressDialog *dialogAutoClean;
QProgressDialog *reclainTankTestProcess;
int pushAir;// 正在排气
DialogAuthorization *dialogFactorySetAuthorization;
QTimer *manualControl;
};
#endif // SYSTEMMANAGE_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,618 @@
/*
* code128.c -- encoding for code128 (A, B, C)
*
* Copyright (c) 1999,2000 Alessandro Rubini (rubini@gnu.org)
* Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
* Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "barcode.h"
//0 b1a2a4 123221 223211 221132 221231 213212 223112 312131 311222 314111 b3c1a1b
static char *codeset[] = {
"212222", "222122", "222221", "121223", "121322", /* 0 - 4 */
"131222", "122213", "122312", "132212", "221213",
"221312", "231212", "112232", "122132", "122231", /* 10 - 14 */
"113222", "123122", "123221", "223211", "221132",
"221231", "213212", "223112", "312131", "311222", /* 20 - 24 */
"321122", "321221", "312212", "322112", "322211",
"212123", "212321", "232121", "111323", "131123", /* 30 - 34 */
"131321", "112313", "132113", "132311", "211313",
"231113", "231311", "112133", "112331", "132131", /* 40 - 44 */
"113123", "113321", "133121", "313121", "211331",
"231131", "213113", "213311", "213131", "311123", /* 50 - 54 */
"311321", "331121", "312113", "312311", "332111",
"314111", "221411", "431111", "111224", "111422", /* 60 - 64 */
"121124", "121421", "141122", "141221", "112214",
"112412", "122114", "122411", "142112", "142211", /* 70 - 74 */
"241211", "221114", "413111", "241112", "134111",
"111242", "121142", "121241", "114212", "124112", /* 80 - 84 */
"124211", "411212", "421112", "421211", "212141",
"214121", "412121", "111143", "111341", "131141", /* 90 - 94 */
"114113", "114311", "411113", "411311", "113141",
"114131", "311141", "411131", "b1a4a2", "b1a2a4", /* 100 - 104 */
"b1a2c2", "b3c1a1b"
};
// "114131", "311141", "411131", "211412", "211214", /* 100 - 104 */
// "211232", "2331112"
//0 b1a2a4 123221 223211 221132 221231 213212 223112 312131 311222 314111 b3c1a1b
// 211214 2331112
/*
1,1,4,1,3,1,// CodeB FNC4 CodeB
3,1,1,1,4,1,// FNC4 CodeA CodeA
4,1,1,1,3,1,// FNC1 FNC1 FNC1
2,1,1,4,1,2,// StartA
2,1,1,2,1,4,// StartB
2,1,1,2,3,2,// StartC
2,3,3,1,1,1,2,// Stop
*/
#define START_A 103
#define START_B 104
#define START_C 105
#define STOP 106
#define SHIFT 98 /* only A and B */
#define CODE_A 101 /* only B and C */
#define CODE_B 100 /* only A and C */
#define CODE_C 99 /* only A and B */
#define FUNC_1 102 /* all of them */
#define FUNC_2 97 /* only A and B */
#define FUNC_3 96 /* only A and B */
/* FUNC_4 is CODE_A when in A and CODE_B when in B */
#define SYMBOL_WID 11 /* all of them are 11-bar wide */
/*
* code 128-b includes all printable ascii chars
*/
int Barcode_128b_verify(unsigned char *text)
{
if (text[0] == '\0')
return -1;
while (*text && *text>=32 && !(*text&0x80))
text++;
if (*text)
return -1; /* a non-ascii char */
return 0; /* ok */
}
int Barcode_128b_encode(struct Barcode_Item *bc)
{
static char *text;
static char *partial; /* dynamic */
static char *textinfo; /* dynamic */
char *textptr;
int i, code, textpos, checksum = 0;
if (bc->partial)
free(bc->partial);
if (bc->textinfo)
free(bc->textinfo);
bc->partial = bc->textinfo = NULL; /* safe */
if (!bc->encoding)
bc->encoding = strdup("code 128-B");
text = bc->ascii;
if (!text) {
bc->error = EINVAL;
return -1;
}
/* the partial code is 6* (head + text + check + tail) + final + term. */
partial = malloc( (strlen(text) + 4) * 6 +2);
if (!partial) {
bc->error = errno;
return -1;
}
/* the text information is at most "nnn:fff:c " * strlen +term */
textinfo = malloc(10*strlen(text) + 2);
if (!textinfo) {
bc->error = errno;
free(partial);
return -1;
}
/* up to now, it was the same code as other encodings */
strcpy(partial, "0"); /* the first space */
strcat(partial, codeset[START_B]);
checksum += START_B; /* the start char is counted in the checksum */
textptr = textinfo;
textpos = SYMBOL_WID;
for (i=0; i<strlen(text); i++) {
if ( text[i] < 32 || (text[i] & 0x80)) {
bc->error = EINVAL; /* impossible if text is verified */
free(partial);
free(textinfo);
return -1;
}
code = text[i]-32;
strcat(partial, codeset[code]);
checksum += code * (i+1); /* first * 1 + second * 2 + third * 3... */
sprintf(textptr, "%i:12:%c ", textpos, text[i]);
textptr += strlen(textptr);
textpos += SYMBOL_WID; /* width of each code */
}
/* Add the checksum, independent of BARCODE_NO_CHECKSUM */
checksum %= 103;
strcat(partial, codeset[checksum]);
/* and the end marker */
strcat(partial, codeset[STOP]);
bc->partial = partial;
bc->textinfo = textinfo;
return 0;
}
/*
* code 128-c is only digits, but two per symbol
*/
int Barcode_128c_verify(unsigned char *text)
{
if (text[0] == '\0')
return -1;
/* must be an even number of digits */
if (strlen(text)%2)
return -1;
/* and must be all digits */
for (; *text; text++)
if (!isdigit(*text))
return -1;
return 0;
}
int Barcode_128c_encode(struct Barcode_Item *bc)
{
static char *text;
static char *partial; /* dynamic */
static char *textinfo; /* dynamic */
char *textptr;
int i, code, textpos, checksum = 0;
if (bc->partial)
free(bc->partial);
if (bc->textinfo)
free(bc->textinfo);
bc->partial = bc->textinfo = NULL; /* safe */
if (!bc->encoding)
bc->encoding = strdup("code 128-C");
text = bc->ascii;
if (!text) {
bc->error = EINVAL;
return -1;
}
/* the partial code is 6* (head + text + check + tail) + final + term. */
partial = malloc( (strlen(text) + 3) * 6 +2);
if (!partial) {
bc->error = errno;
return -1;
}
/* the text information is at most "nnn.5:fff:c " * strlen +term */
textinfo = malloc(12*strlen(text) + 2);
if (!textinfo) {
bc->error = errno;
free(partial);
return -1;
}
strcpy(partial, "0"); /* the first space */
strcat(partial, codeset[START_C]);
checksum += START_C; /* the start char is counted in the checksum */
textptr = textinfo;
textpos = SYMBOL_WID;
for (i=0; text[i]; i+=2) {
if (!isdigit(text[i]) || !isdigit(text[i+1])) {
bc->error = EINVAL; /* impossible if text is verified */
free(partial);
free(textinfo);
return -1;
}
code = (text[i]-'0') * 10 + text[i+1]-'0';
strcat(partial, codeset[code]);
checksum += code * (i/2+1); /* first * 1 + second * 2 + third * 3... */
/* print as "%s", because we have ".5" positions */
sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos, text[i],
textpos + (double)SYMBOL_WID/2, text[i+1]);
textptr += strlen(textptr);
textpos += SYMBOL_WID; /* width of each code */
}
/* Add the checksum, independent of BARCODE_NO_CHECKSUM */
checksum %= 103;
strcat(partial, codeset[checksum]);
/* and the end marker */
strcat(partial, codeset[STOP]);
bc->partial = partial;
bc->textinfo = textinfo;
return 0;
}
/*
* generic (full-featured) code128 implementation: it selects between
* A, B, C according to the data being encoded. F1, F2, F3, F4 are expressed
* using ascii chars 0xc1, 0xc2, 0xc3, 0xc4 (0301, 0302, 0303, 0304).
* Char '\0' is expressed by 0x80 (0200).
*/
int Barcode_128_verify(unsigned char *text)
{
if (text[0] == '\0')
return -1;
while (*text && (*text<=0x80 || (*text >= 0xc1 && *text <= 0xc4)))
text++;
if (*text)
return -1; /* unencodable character */
return 0; /* ok */
}
/*
* These functions are extracted from Barcode_128_encode for clarity.
* It deals with choosing the symbols used to represent the text
* and returns a dynamic array of integers, terminated by -1.
*
* The algorithm used in choosing the codes comes from App 2 of
* "El Codigo Estandar EAN/UCC 128", courtesy of AECOC, Spain.
* Thanks to Dani Pardo for getting permission and giving me a copy
* of the document
*/
#define NEED_CODE_A(c) ((c)<32 || (c)==0x80)
#define NEED_CODE_B(c) ((c)>=96 && (c)<128)
static int Barcode_a_or_b(unsigned char *text)
{
for ( ; *text; text++) {
if (NEED_CODE_A(*text))
return 'A';
if (NEED_CODE_B(*text))
return 'B';
}
return 0; /* any */
}
/* code is either 'A' or 'B', and value must be valid */
static int Barcode_encode_as(int code, int value)
{
/* first check the special chars */
if (value == 0xC1) return FUNC_1;
if (value == 0xC2) return FUNC_2;
if (value == 0xC3) return FUNC_3;
if (value == 0xC4) { /* F4 */
if (code == 'A') return CODE_A;
return CODE_B;
}
/* then check ascii values */
if (value >= 0x20 && value <= 0x5F)
return value - 0x20; /* both codes */
if (value == 0x80) return 64; /* code A */
if (value < 0x20) return value+64; /* code A */
if (value >= 0x60) return value - 0x20; /* code B */
/* can't happen */
return -1;
}
static int *Barcode_128_make_array(struct Barcode_Item *bc, int *lptr)
{
int len, *codes;
unsigned char *s;
int i=0, j, code, checksum;
/* allocate twice the text length + 5, as this is the worst case */
len = 2 * strlen(bc->ascii) + 5;
codes = malloc(len * sizeof(int));
s = bc->ascii;
/* choose the starting code */
if (s[2]=='\0' && isdigit(s[0]) && isdigit(s[1])) {
code = 'C';
} else if (isdigit(s[0])&&isdigit(s[1]) && isdigit(s[2])&&isdigit(s[3])) {
code = 'C';
} else {
code = Barcode_a_or_b(s);
if (!code) code = 'B'; /* default */
}
codes[i++] = START_A + code - 'A';
for (s = bc->ascii; *s; /* increments are in the loop */) {
switch(code) {
case 'C':
if (s[0] == 0xC1) { /* F1 is valid */
codes[i++] = FUNC_1;
s++;
} else if (isdigit(s[0]) && isdigit(s[1])) {
/* encode two digits */
codes[i++] = (s[0]-'0') * 10 + s[1]-'0';
s += 2;
} else {
/* change code */
code = Barcode_a_or_b(s);
if (!code) code = 'B';
codes[i++] = (code == 'A') ? CODE_A : CODE_B;
}
break;
case 'B':
case 'A':
for (j=0; isdigit(s[j]); j++)
;
if (j>=4) { /* if there are 4 or more digits, turn to C */
if (j&1) {
/* odd number: encode one first */
codes[i++] = *(s++) - ' ';
}
codes[i++] = CODE_C;
code = 'C';
} else if (code == 'A' && NEED_CODE_B(*s)) {
/* check whether we should use SHIFT or change code */
j = Barcode_a_or_b(s+1);
if (j == 'B') {
codes[i++] = CODE_B;
code = 'B';
} else {
codes[i++] = SHIFT;
codes[i++] = Barcode_encode_as('B', *s);
s++;
}
} else if (code == 'B' && NEED_CODE_A(*s)) {
/* check whether we should use SHIFT or change code */
j = Barcode_a_or_b(s+1);
if (j == 'A') {
codes[i++] = CODE_A;
code = 'A';
} else {
codes[i++] = SHIFT;
codes[i++] = Barcode_encode_as('A', *s);
s++;
}
} else {
codes[i++] = Barcode_encode_as(code, *s);
s++;
}
break;
}
}
/* add the checksum */
checksum = codes[0];
for (j=1; j<i; j++)
checksum += j * codes[j];
checksum %= 103;
codes[i++] = checksum;
codes[i++] = STOP;
if (i > len) {
fprintf(stderr, "impossible: length is > allocated len\n");
}
*lptr = i;
return codes;
}
/*
* Encoding is tricky, in that we cannot print the ascii
* representation in an easy way. Therefore, just skip non-printable
* chars and try to fit the rest somehow.
*/
int Barcode_128_encode(struct Barcode_Item *bc)
{
static char *text;
static char *partial; /* dynamic */
static char *textinfo; /* dynamic */
char *textptr;
int *codes; /* dynamic */
int i, c, len;
double textpos, size, step;
if (bc->partial)
free(bc->partial);
if (bc->textinfo)
free(bc->textinfo);
bc->partial = bc->textinfo = NULL; /* safe */
if (!bc->encoding)
bc->encoding = strdup("code 128");
text = bc->ascii;
if (!text) {
bc->error = EINVAL;
return -1;
}
codes = Barcode_128_make_array(bc, &len);
if (!codes) return -1;
/* the partial code is 6*codelen + ini + term (+margin) */
partial = malloc( 6 * len + 4);
if (!partial) {
bc->error = errno;
free(codes);
return -1;
}
/* the text information is at most "nnn.n:ff.f:c " * strlen +term */
textptr = textinfo = malloc(13*strlen(text) + 2);
if (!textinfo) {
bc->error = errno;
free(partial);
free(codes);
return -1;
}
/* up to now, it was almost the same code as other encodings */
strcpy(partial, "0"); /* the first space */
for (i=0; i<len; i++) /* the symbols */
strcat(partial, codeset[codes[i]]);
/* avoid bars that fall lower than other bars */
for (i=0; partial[i]; i++)
if (isalpha(partial[i]))
partial[i] += '1' - 'a';
/*
* the accompanying text: reserve a space for every char.
* F[1-4] are rendered as spaces (separators), other unprintable chars
* are rendered as underscoress (placeholders)
*/
/*
* A size of 9 is good for code-C (used above), so 18 for each symbol,
* but we place an upper limit of 12 to avoid overlapping on the bars.
*/
size = (int)(180.0 * (len-3) / strlen(text) + .5) / 10.0;
if (size > 12.0) size = 12.0;
/* align the text to the left, using its natural size */
step = (int)(10 * (size/18.0 * SYMBOL_WID) + .5) / 10.0;
textpos = SYMBOL_WID;
for (i=0; i<strlen(text); i++) {
c = text[i];
if (c < 32 || c == 0x80) c = '_'; /* not printable */
if (c > 0xc0) c = ' '; /* F code */
sprintf(textptr, "%g:%g:%c ", textpos, size, c);
textptr += strlen(textptr);
textpos += step;
}
bc->partial = partial;
bc->textinfo = textinfo;
free(codes);
return 0;
}
/*
* A raw 128 code is given as a sequence of space separated numbers
* from 0 to 105, starting from the start code to be (Leonid)
*/
int Barcode_128raw_verify(unsigned char *text)
{
int n;
unsigned val;
if (!strlen(text))
return -1;
while (*text) {
if (sscanf(text, "%u%n", &val, &n) < 1)
return -1;
if (val > 105)
return -1;
text += n;
}
return 0;
}
int Barcode_128raw_encode(struct Barcode_Item *bc)
{
static char *text;
static char *partial; /* dynamic */
static char *textinfo; /* dynamic */
char *textptr;
int i, n, count, code, textpos, checksum = 0;
if (bc->partial)
free(bc->partial);
if (bc->textinfo)
free(bc->textinfo);
bc->partial = bc->textinfo = NULL; /* safe */
if (!bc->encoding)
bc->encoding = strdup("128raw");
text = bc->ascii;
if (!text) {
bc->error = EINVAL;
return -1;
}
/*
* length of partial code is unknown in advance, but it is
* at most 6* (1+text/2 + check + tail) + final + terminator
*/
partial = malloc( (3+ strlen(text)/2) * 6 + 2);
if (!partial) {
bc->error = errno;
return -1;
}
/* the text information is at most "nnn.5:fff:c " * 1+strlen/2 +term */
textinfo = malloc(12 * (1+strlen(text)/2) + 2);
if (!textinfo) {
bc->error = errno;
free(partial);
return -1;
}
strcpy(partial, "0"); /* the first space */
textptr = textinfo;
textpos = 0;
for (i=0, count = 0; i < strlen(text); count++) {
if (sscanf(text + i, "%u%n", &code, &n) < 1) {
bc->error = EINVAL; /* impossible if text is verified */
free(partial);
free(textinfo);
return -1;
}
strcat(partial, codeset[code]);
/*
* since the start code is part of the "raw" input, it is
* counted in the checksum by itself
*/
if (!count) checksum += code; /* the start code */
else checksum += code * count; /* first * 1 + second * 2 ... */
/*
* print as "%s", because we have ".5" positions
* also, use a size of 9 like codeC above, as each symbol is
* represented by two chars
*/
sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos,
code >= 100 ? 'A' : code/10 + '0',
textpos + (double)SYMBOL_WID/2, code%10 + '0');
textptr += strlen(textptr);
textpos += SYMBOL_WID; /* width of each code */
i += n;
}
/* Add the checksum, independent of BARCODE_NO_CHECKSUM */
checksum %= 103;
strcat(partial, codeset[checksum]);
/* and the end marker */
strcat(partial, codeset[STOP]);
bc->partial = partial;
bc->textinfo = textinfo;
return 0;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,180 @@
/*
* qrencode - QR Code encoder
*
* Binary sequence class.
* Copyright (C) 2006,2007 Kentaro Fukuchi <fukuchi@megaui.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bistream.h"
BitStream *BitStream_new(void)
{
BitStream *bstream;
bstream = (BitStream *)malloc(sizeof(BitStream));
bstream->data = NULL;
return bstream;
}
static BitStream *BitStream_newFromNum(int bits, unsigned int num)
{
unsigned int mask;
int i;
char *p;
BitStream *bstream;
bstream = BitStream_new();
bstream->data = (char *)malloc(bits + 1);
p = bstream->data;
mask = 1 << (bits - 1);
for(i=0; i<bits; i++) {
if(num & mask) {
*p = '1';
} else {
*p = '0';
}
p++;
mask = mask >> 1;
}
*p = '\0';
return bstream;
}
static BitStream *BitStream_newFromBytes(int size, unsigned char *data)
{
unsigned char mask;
int i, j;
char *p;
BitStream *bstream;
bstream = BitStream_new();
bstream->data = (char *)malloc(size * 8 + 1);
p = bstream->data;
for(i=0; i<size; i++) {
mask = 0x80;
for(j=0; j<8; j++) {
if(data[i] & mask) {
*p = '1';
} else {
*p = '0';
}
p++;
mask = mask >> 1;
}
}
*p = '\0';
return bstream;
}
void BitStream_append(BitStream *bstream, BitStream *arg)
{
int l1, l2;
char *_new;
if(arg == NULL || arg->data == NULL) {
return;
}
if(bstream->data == NULL) {
bstream->data = strdup(arg->data);
return;
}
l1 = strlen(bstream->data);
l2 = strlen(arg->data);
_new = (char *)malloc(l1 + l2 + 1);
strcpy(_new, bstream->data);
strcat(_new, arg->data);
free(bstream->data);
bstream->data = _new;
}
void BitStream_appendNum(BitStream *bstream, int bits, unsigned int num)
{
BitStream *b;
b = BitStream_newFromNum(bits, num);
BitStream_append(bstream, b);
BitStream_free(b);
}
void BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data)
{
BitStream *b;
b = BitStream_newFromBytes(size, data);
BitStream_append(bstream, b);
BitStream_free(b);
}
unsigned int BitStream_size(BitStream *bstream)
{
if(bstream->data == NULL) return 0;
return strlen(bstream->data);
}
unsigned char *BitStream_toByte(BitStream *bstream)
{
int i, j, size, bytes;
unsigned char *data, v;
char *p;
size = BitStream_size(bstream);
data = (unsigned char *)malloc((size + 7) / 8);
bytes = size / 8;
p = bstream->data;
for(i=0; i<bytes; i++) {
v = 0;
for(j=0; j<8; j++) {
v = v << 1;
v |= *p == '1';
p++;
}
data[i] = v;
}
if(size & 7) {
v = 0;
for(j=0; j<(size & 7); j++) {
v = v << 1;
v |= *p == '1';
p++;
}
data[bytes] = v;
}
return data;
}
void BitStream_free(BitStream *bstream)
{
if(bstream->data != NULL) {
free(bstream->data);
}
free(bstream);
}
@@ -0,0 +1,132 @@
#ifndef SYSTEMMANAGE_H
#define SYSTEMMANAGE_H
#include <QWidget>
#include "ParaSettingUI.h"
#include "TimeSettingDialog.h"
#include <QTimer>
#include "DialogAuthorization.h"
#include "qprogressdialog.h"
#include "PrintSetting.h"
#include "dlginputaddr.h"
namespace Ui {
class SystemManage;
}
class SystemManage : public QWidget,public ParaSettingUI
{
Q_OBJECT
public:
explicit SystemManage(QWidget *parent = 0);
~SystemManage();
void updateSysStatusToUI(); //重载
void bindDlgInputAddr(DlgInputAddr *dlgInputAddr);//绑定时间权限管理对象
void getCurrentScrennType();
bool flagOfTouchScreenType;
private slots:
void on_pushButtonCompressPump_pressed();
void on_pushButtonGhost_pressed();
void on_pushButtonCycleValve_pressed();
void updateGearPumpValue(int);
void on_pushButtonGearPump_pressed();
void on_pushButtonInkValve_pressed();
void on_pushButtonMainInkPump_pressed();
void on_pushButtonMixValve_pressed();
void on_pushButtonReclaimPump_pressed();
void on_pushButtonViscosityPump_pressed();
void on_pushButtonControlByHand_pressed();
void on_pushButtonReclaimTankOpen_pressed();
void on_pushButtonReclaimTankClose_pressed();
void on_pushButtonTimeSetting_clicked();
void onTimeSettingDone(); //时间设置完成
void on_pushButtonUpdateCharLib_pressed();
void on_pushButtonFactorySetting_pressed();
void on_pushButtonScreenAdjust_pressed();
void on_pushButtonUpdateSoftware_pressed();
void on_pushButtonCleanUP_pressed();
void on_pushButtonReleaseValve_pressed();
void timerHandler();
void timerHandler2();
void autoCleanTimerHandler();
void on_pushButtonExportConfToUDisk_clicked();
void on_pushButtonImportConfFromUdisk_clicked();
void ondialogAuthorizationAccepted();
void on_pushButtonAutoClean_pressed();
void onAutoCleanStart();
void reclainTankTestHandler();
void changeToAutoControl();
void changeToManualControl();
/***2019/10/22 start*****/
void inkcloseCountHandler();
/***2019/10/22 end*****/
/***2019/10/23 start*****/
void MainInkCmpSepetalHandler();
/***2019/10/23 */
//void on_pushButtonAutoClean_clicked();
void on_pushButtonFontToUdisk_pressed();
void on_pushButtonMotorTest_pressed();
void on_pushButtonPushAir_pressed();
void on_dialogTimeSetAuthorizationAccepted();//2020/1/6
void on_dialogFactorySetAuthorizationAccepted();
void on_dialogSysUpdateAuthorizationAccepted();
void on_pushButtonGearPumpOff_pressed();
void on_pushButtonChangeScreen_clicked();
Q_SIGNALS:
void configChanged();
void autoCleanStart();
void enableReclaimButton(bool flag);
private:
Ui::SystemManage *ui;
void setPumpValveBottonEnable(bool enable);
TimeSettingDialog timeDia;
QTimer *timer,*timer2,*autoCleanTimer,*reclaimTankTestTimer,*inkcloseCountTimer,*MainnkCmpSepetalTimer;
int reclainTankTestState;
int reclainTankTestCount;//测试次数
DialogAuthorization *dialogUpateMm;
DialogAuthorization *dialogTimeSetAuthorization; //2020/1/6
DialogAuthorization *dialogSysUpdateAuthorization;
DlgInputAddr *dlgInputAddr_TimeSet;//2020/1/6
QProgressDialog *dialogAutoClean;
QProgressDialog *reclainTankTestProcess;
int pushAir;// 正在排气
DialogAuthorization *dialogFactorySetAuthorization;
QTimer *toAutoControl;
QTimer *manualControl;
};
#endif // SYSTEMMANAGE_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

@@ -0,0 +1,364 @@
/*
* FreeModbus Libary: Linux Port
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* File: $Id: portserial.c,v 1.3 2006/10/12 08:35:34 wolti Exp $
*/
/* ----------------------- Standard includes --------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/select.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
#include "port.h"
/* ----------------------- Modbus includes ----------------------------------*/
#include "mb.h"
#include "mbport.h"
#include "mbconfig.h"
/* ----------------------- Defines -----------------------------------------*/
#if MB_ASCII_ENABLED == 1
#define BUF_SIZE 513 /* must hold a complete ASCII frame. */
#else
#define BUF_SIZE 256 /* must hold a complete RTU frame. */
#endif
/* ----------------------- Static variables ---------------------------------*/
static int iSerialFd = -1;
static BOOL bRxEnabled;
static BOOL bTxEnabled;
static ULONG ulTimeoutMs;
static UCHAR ucBuffer[BUF_SIZE];
static int uiRxBufferPos;
static int uiTxBufferPos;
static struct termios xOldTIO;
/* ----------------------- Function prototypes ------------------------------*/
static BOOL prvbMBPortSerialRead( UCHAR * pucBuffer, USHORT usNBytes, USHORT * usNBytesRead );
static BOOL prvbMBPortSerialWrite( UCHAR * pucBuffer, USHORT usNBytes );
/* ----------------------- Begin implementation -----------------------------*/
void
vMBPortSerialEnable( BOOL bEnableRx, BOOL bEnableTx )
{
/* it is not allowed that both receiver and transmitter are enabled. */
assert( !bEnableRx || !bEnableTx );
if( bEnableRx )
{
( void )tcflush( iSerialFd, TCIFLUSH );
uiRxBufferPos = 0;
bRxEnabled = TRUE;
}
else
{
bRxEnabled = FALSE;
}
if( bEnableTx )
{
bTxEnabled = TRUE;
uiTxBufferPos = 0;
}
else
{
bTxEnabled = FALSE;
}
}
BOOL
xMBPortSerialInit( UCHAR ucPort, ULONG ulBaudRate, UCHAR ucDataBits, eMBParity eParity )
{
CHAR szDevice[16];
BOOL bStatus = TRUE;
struct termios xNewTIO;
speed_t xNewSpeed;
//snprintf( szDevice, 16, "/dev/ttyUSB%d", ucPort );
snprintf( szDevice, 16, "/dev/ttyO1");
if( ( iSerialFd = open( szDevice, O_RDWR | O_NOCTTY ) ) < 0 )
{
vMBPortLog( MB_LOG_ERROR, "SER-INIT", "Can't open serial port %s: %s\n", szDevice,
strerror( errno ) );
bStatus = FALSE;
return bStatus;
}
else if( tcgetattr( iSerialFd, &xOldTIO ) != 0 )
{
vMBPortLog( MB_LOG_ERROR, "SER-INIT", "Can't get settings from port %s: %s\n", szDevice,
strerror( errno ) );
}
else
{
bzero( &xNewTIO, sizeof( struct termios ) );
xNewTIO.c_iflag |= IGNBRK | INPCK;
xNewTIO.c_cflag |= CREAD | CLOCAL;
switch ( eParity )
{
case MB_PAR_NONE:
break;
case MB_PAR_EVEN:
xNewTIO.c_cflag |= PARENB;
break;
case MB_PAR_ODD:
xNewTIO.c_cflag |= PARENB | PARODD;
break;
default:
bStatus = FALSE;
}
switch ( ucDataBits )
{
case 8:
xNewTIO.c_cflag |= CS8;
break;
case 7:
xNewTIO.c_cflag |= CS7;
break;
default:
bStatus = FALSE;
}
switch ( ulBaudRate )
{
case 9600:
xNewSpeed = B9600;
break;
case 19200:
xNewSpeed = B19200;
break;
case 38400:
xNewSpeed = B38400;
break;
case 57600:
xNewSpeed = B57600;
break;
case 115200:
xNewSpeed = B115200;
break;
default:
bStatus = FALSE;
}
/*设置等待时间和最小接收字符*/
xNewTIO.c_cc[VTIME] = 0;
xNewTIO.c_cc[VMIN] = 0;
/*处理未接收字符*/
tcflush(iSerialFd,TCIFLUSH); //lch add
if( bStatus )
{
if( cfsetispeed( &xNewTIO, xNewSpeed ) != 0 )
{
vMBPortLog( MB_LOG_ERROR, "SER-INIT", "Can't set baud rate %ld for port %s: %s\n",
ulBaudRate, strerror( errno ) );
}
else if( cfsetospeed( &xNewTIO, xNewSpeed ) != 0 )
{
vMBPortLog( MB_LOG_ERROR, "SER-INIT", "Can't set baud rate %ld for port %s: %s\n",
ulBaudRate, szDevice, strerror( errno ) );
}
else if( tcsetattr( iSerialFd, TCSANOW, &xNewTIO ) != 0 )
//else if( tcsetattr( iSerialFd, TCSAFLUSH, &xNewTIO ) != 0 ) //lch fix
{
vMBPortLog( MB_LOG_ERROR, "SER-INIT", "Can't set settings for port %s: %s\n",
szDevice, strerror( errno ) );
}
else
{
vMBPortSerialEnable( FALSE, FALSE );
bStatus = TRUE;
}
}
}
return bStatus;
}
BOOL
xMBPortSerialSetTimeout( ULONG ulNewTimeoutMs )
{
if( ulNewTimeoutMs > 0 )
{
ulTimeoutMs = ulNewTimeoutMs;
}
else
{
ulTimeoutMs = 1;
}
return TRUE;
}
void
vMBPortClose( void )
{
if( iSerialFd != -1 )
{
( void )tcsetattr( iSerialFd, TCSANOW, &xOldTIO );
( void )close( iSerialFd );
iSerialFd = -1;
}
}
BOOL
prvbMBPortSerialRead( UCHAR * pucBuffer, USHORT usNBytes, USHORT * usNBytesRead )
{
BOOL bResult = TRUE;
ssize_t res;
fd_set rfds;
struct timeval tv;
// tv.tv_sec = 1;
// tv.tv_usec = 60000;
tv.tv_sec = 0;
tv.tv_usec = 10000; //lch fix
FD_ZERO( &rfds );
FD_SET( iSerialFd, &rfds );
/* Wait until character received or timeout. Recover in case of an
* interrupted read system call. */
do
{
if( select( iSerialFd + 1, &rfds, NULL, NULL, &tv ) == -1 )
{
if( errno != EINTR )
{
bResult = FALSE;
}
}
else if( FD_ISSET( iSerialFd, &rfds ) )
{
if( ( res = read( iSerialFd, pucBuffer, usNBytes ) ) == -1 )
{
bResult = FALSE;
}
else
{
*usNBytesRead = ( USHORT ) res;
break;
}
}
else
{
*usNBytesRead = 0;
break;
}
}
while( bResult == TRUE );
return bResult;
}
BOOL
prvbMBPortSerialWrite( UCHAR * pucBuffer, USHORT usNBytes )
{
ssize_t res;
size_t left = ( size_t ) usNBytes;
size_t done = 0;
while( left > 0 )
{
if( ( res = write( iSerialFd, pucBuffer + done, left ) ) == -1 )
{
if( errno != EINTR )
{
break;
}
/* call write again because of interrupted system call. */
continue;
}
done += res;
left -= res;
}
return left == 0 ? TRUE : FALSE;
}
BOOL
xMBPortSerialPoll( )
{
BOOL bStatus = TRUE;
USHORT usBytesRead;
int i;
while( bRxEnabled )
{
if( prvbMBPortSerialRead( &ucBuffer[0], BUF_SIZE, &usBytesRead ) )
{
if( usBytesRead == 0 )
{
/* timeout with no bytes. */
break;
}
else if( usBytesRead > 0 )
{
for( i = 0; i < usBytesRead; i++ )
{
/* Call the modbus stack and let him fill the buffers. */
( void )pxMBFrameCBByteReceived( );
}
uiRxBufferPos = 0;
}
}
else
{
vMBPortLog( MB_LOG_ERROR, "SER-POLL", "read failed on serial device: %s\n",
strerror( errno ) );
bStatus = FALSE;
}
}
if( bTxEnabled )
{
while( bTxEnabled )
{
( void )pxMBFrameCBTransmitterEmpty( );
/* Call the modbus stack to let him fill the buffer. */
}
if( !prvbMBPortSerialWrite( &ucBuffer[0], uiTxBufferPos ) )
{
vMBPortLog( MB_LOG_ERROR, "SER-POLL", "write failed on serial device: %s\n",
strerror( errno ) );
bStatus = FALSE;
}
}
return bStatus;
}
BOOL
xMBPortSerialPutByte( CHAR ucByte )
{
assert( uiTxBufferPos < BUF_SIZE );
ucBuffer[uiTxBufferPos] = ucByte;
uiTxBufferPos++;
return TRUE;
}
BOOL
xMBPortSerialGetByte( CHAR * pucByte )
{
assert( uiRxBufferPos < BUF_SIZE );
*pucByte = ucBuffer[uiRxBufferPos];
uiRxBufferPos++;
return TRUE;
}
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 48 KiB

@@ -0,0 +1,147 @@
/****************************************************************************
** Meta object code from reading C++ file 'dlginputaddr.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../dlginputaddr.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dlginputaddr.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DlgInputAddr[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
7, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
5, // signalCount
// signals: signature, parameters, type, tag, flags
14, 13, 13, 13, 0x05,
38, 13, 13, 13, 0x05,
62, 13, 13, 13, 0x05,
83, 81, 13, 13, 0x05,
114, 13, 13, 13, 0x05,
// slots: signature, parameters, type, tag, flags
140, 133, 13, 13, 0x08,
206, 179, 13, 13, 0x08,
0 // eod
};
static const char qt_meta_stringdata_DlgInputAddr[] = {
"DlgInputAddr\0\0changePowerCnt(QString)\0"
"changePrintCnt(QString)\0dateError(QString)\0"
",\0printErrorStatus(QString,uint)\0"
"changeMac(QString)\0button\0"
"on_buttonBox_clicked(QAbstractButton*)\0"
"year,mon,mday,hour,min,sec\0"
"setTime(int,int,int,int,int,int)\0"
};
void DlgInputAddr::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
DlgInputAddr *_t = static_cast<DlgInputAddr *>(_o);
switch (_id) {
case 0: _t->changePowerCnt((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 1: _t->changePrintCnt((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 2: _t->dateError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 3: _t->printErrorStatus((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< uint(*)>(_a[2]))); break;
case 4: _t->changeMac((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: _t->on_buttonBox_clicked((*reinterpret_cast< QAbstractButton*(*)>(_a[1]))); break;
case 6: _t->setTime((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4])),(*reinterpret_cast< int(*)>(_a[5])),(*reinterpret_cast< int(*)>(_a[6]))); break;
default: ;
}
}
}
const QMetaObjectExtraData DlgInputAddr::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DlgInputAddr::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DlgInputAddr,
qt_meta_data_DlgInputAddr, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DlgInputAddr::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DlgInputAddr::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DlgInputAddr::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DlgInputAddr))
return static_cast<void*>(const_cast< DlgInputAddr*>(this));
return QDialog::qt_metacast(_clname);
}
int DlgInputAddr::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 7)
qt_static_metacall(this, _c, _id, _a);
_id -= 7;
}
return _id;
}
// SIGNAL 0
void DlgInputAddr::changePowerCnt(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void DlgInputAddr::changePrintCnt(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void DlgInputAddr::dateError(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
// SIGNAL 3
void DlgInputAddr::printErrorStatus(QString _t1, unsigned int _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 3, _a);
}
// SIGNAL 4
void DlgInputAddr::changeMac(QString _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 4, _a);
}
QT_END_MOC_NAMESPACE
@@ -0,0 +1,57 @@
/*
* MyFileDialog.cpp
*
* Created on: Jul 14, 2013
* Author: yiyu
* QQ:1036184468
* Descriptoin:
*/
#include "MyFileDialog.h"
#include "SysPara.h"
#include <QDir>
#include <QDesktopServices>
#include <QUrl>
MyFileDialog::MyFileDialog(QWidget *parent):QFileDialog(parent){
setFileMode(QFileDialog::AnyFile);
//setLabelText(QFileDialog::LookIn,tr("文件夹"));
// setLabelText(QFileDialog::FileName,tr("文件名"));
// setLabelText(QFileDialog::FileType,tr("文件类型"));
setLabelText(QFileDialog::Accept,tr("确定"));
// setLabelText(QFileDialog::Reject,tr("取消"));
setViewMode(QFileDialog::Detail);
setOption(QFileDialog::ReadOnly,true);
//setOption(QFileDialog::DontUseNativeDialog,true);
QList<QUrl> urls;
urls << QUrl::fromLocalFile(DOC_ROOT_DIR) ;//<< QUrl::fromLocalFile(UDISK_DOC_ROOT_DIR) ;
setSidebarUrls (urls );
this->setFixedSize(this->geometry().width(),this->geometry().height());
}
MyFileDialog::~MyFileDialog(){
}
void MyFileDialog::showFileDialog(QString title,QString dir,QString filter){
setNameFilter(filter);
setDirectory (dir);
setWindowTitle(title);
//autoCompleteFileName("dfdfs");
setViewMode(QFileDialog::Detail);
//setOption(QFileDialog::ReadOnly,true);
//setOption(QFileDialog::DontUseSheet,true);
//setOption(QFileDialog::HideNameFilterDetails,true);
//setResolveSymlinks(0);
if(isMinimized()){
setWindowState(Qt::WindowMaximized);
}
show();
QWidget *widget = focusWidget () ;
if(widget){
widget->clearFocus(); //默认不要弹出输入法
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,269 @@
/********************************************************************************
** Form generated from reading UI file 'dialogfileoperation.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DIALOGFILEOPERATION_H
#define UI_DIALOGFILEOPERATION_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QListView>
#include <QtGui/QPushButton>
#include <QtGui/QRadioButton>
#include <QtGui/QTextEdit>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_DialogFileOperation
{
public:
QWidget *verticalLayoutWidget_3;
QVBoxLayout *verticalLayout_3;
QHBoxLayout *horizontalLayout_3;
QListView *listViewFile;
QVBoxLayout *verticalLayout;
QHBoxLayout *horizontalLayout_2;
QRadioButton *radioButtonLocal;
QRadioButton *radioButtonUdisk;
QHBoxLayout *horizontalLayout_4;
QPushButton *pushButtonDelFile;
QPushButton *pushButtonDelAll;
QPushButton *pushButtonImport;
QPushButton *pushButtonExport;
QTextEdit *textEditView;
QHBoxLayout *horizontalLayout;
QPushButton *pushButtonInsert;
QPushButton *pushButtonOpen;
QPushButton *pushButtonLast;
QPushButton *pushButtonNext;
QPushButton *pushButtonExit;
void setupUi(QDialog *DialogFileOperation)
{
if (DialogFileOperation->objectName().isEmpty())
DialogFileOperation->setObjectName(QString::fromUtf8("DialogFileOperation"));
DialogFileOperation->resize(757, 314);
DialogFileOperation->setFocusPolicy(Qt::StrongFocus);
verticalLayoutWidget_3 = new QWidget(DialogFileOperation);
verticalLayoutWidget_3->setObjectName(QString::fromUtf8("verticalLayoutWidget_3"));
verticalLayoutWidget_3->setGeometry(QRect(10, 10, 748, 291));
verticalLayout_3 = new QVBoxLayout(verticalLayoutWidget_3);
verticalLayout_3->setContentsMargins(2, 2, 2, 2);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
verticalLayout_3->setContentsMargins(0, 0, 0, 0);
horizontalLayout_3 = new QHBoxLayout();
horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
listViewFile = new QListView(verticalLayoutWidget_3);
listViewFile->setObjectName(QString::fromUtf8("listViewFile"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(listViewFile->sizePolicy().hasHeightForWidth());
listViewFile->setSizePolicy(sizePolicy);
listViewFile->setMinimumSize(QSize(200, 0));
listViewFile->setMaximumSize(QSize(100, 16777215));
horizontalLayout_3->addWidget(listViewFile);
verticalLayout = new QVBoxLayout();
verticalLayout->setContentsMargins(2, 2, 2, 2);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setSpacing(1);
horizontalLayout_2->setContentsMargins(1, 1, 1, 1);
horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
radioButtonLocal = new QRadioButton(verticalLayoutWidget_3);
radioButtonLocal->setObjectName(QString::fromUtf8("radioButtonLocal"));
radioButtonLocal->setLayoutDirection(Qt::LeftToRight);
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/localdisk.png"), QSize(), QIcon::Normal, QIcon::Off);
radioButtonLocal->setIcon(icon);
radioButtonLocal->setChecked(true);
horizontalLayout_2->addWidget(radioButtonLocal);
radioButtonUdisk = new QRadioButton(verticalLayoutWidget_3);
radioButtonUdisk->setObjectName(QString::fromUtf8("radioButtonUdisk"));
radioButtonUdisk->setLayoutDirection(Qt::LeftToRight);
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/icon/udisk.png"), QSize(), QIcon::Normal, QIcon::Off);
radioButtonUdisk->setIcon(icon1);
horizontalLayout_2->addWidget(radioButtonUdisk);
verticalLayout->addLayout(horizontalLayout_2);
horizontalLayout_4 = new QHBoxLayout();
horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
horizontalLayout_4->setContentsMargins(-1, 2, -1, -1);
pushButtonDelFile = new QPushButton(verticalLayoutWidget_3);
pushButtonDelFile->setObjectName(QString::fromUtf8("pushButtonDelFile"));
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(37);
sizePolicy1.setHeightForWidth(pushButtonDelFile->sizePolicy().hasHeightForWidth());
pushButtonDelFile->setSizePolicy(sizePolicy1);
pushButtonDelFile->setMinimumSize(QSize(0, 37));
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/icon/keydelete.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonDelFile->setIcon(icon2);
horizontalLayout_4->addWidget(pushButtonDelFile);
pushButtonDelAll = new QPushButton(verticalLayoutWidget_3);
pushButtonDelAll->setObjectName(QString::fromUtf8("pushButtonDelAll"));
QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(pushButtonDelAll->sizePolicy().hasHeightForWidth());
pushButtonDelAll->setSizePolicy(sizePolicy2);
pushButtonDelAll->setMinimumSize(QSize(0, 37));
QIcon icon3;
icon3.addFile(QString::fromUtf8(":/icon/filedelete.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonDelAll->setIcon(icon3);
horizontalLayout_4->addWidget(pushButtonDelAll);
pushButtonImport = new QPushButton(verticalLayoutWidget_3);
pushButtonImport->setObjectName(QString::fromUtf8("pushButtonImport"));
sizePolicy2.setHeightForWidth(pushButtonImport->sizePolicy().hasHeightForWidth());
pushButtonImport->setSizePolicy(sizePolicy2);
pushButtonImport->setMinimumSize(QSize(0, 37));
QIcon icon4;
icon4.addFile(QString::fromUtf8(":/icon/import.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonImport->setIcon(icon4);
horizontalLayout_4->addWidget(pushButtonImport);
pushButtonExport = new QPushButton(verticalLayoutWidget_3);
pushButtonExport->setObjectName(QString::fromUtf8("pushButtonExport"));
sizePolicy2.setHeightForWidth(pushButtonExport->sizePolicy().hasHeightForWidth());
pushButtonExport->setSizePolicy(sizePolicy2);
pushButtonExport->setMinimumSize(QSize(0, 37));
QIcon icon5;
icon5.addFile(QString::fromUtf8(":/icon/export.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonExport->setIcon(icon5);
horizontalLayout_4->addWidget(pushButtonExport);
verticalLayout->addLayout(horizontalLayout_4);
textEditView = new QTextEdit(verticalLayoutWidget_3);
textEditView->setObjectName(QString::fromUtf8("textEditView"));
textEditView->setEnabled(true);
textEditView->setAutoFillBackground(false);
verticalLayout->addWidget(textEditView);
horizontalLayout = new QHBoxLayout();
horizontalLayout->setSpacing(0);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
pushButtonInsert = new QPushButton(verticalLayoutWidget_3);
pushButtonInsert->setObjectName(QString::fromUtf8("pushButtonInsert"));
sizePolicy2.setHeightForWidth(pushButtonInsert->sizePolicy().hasHeightForWidth());
pushButtonInsert->setSizePolicy(sizePolicy2);
pushButtonInsert->setMinimumSize(QSize(0, 37));
pushButtonInsert->setMaximumSize(QSize(90, 16777215));
QIcon icon6;
icon6.addFile(QString::fromUtf8(":/icon/insert.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonInsert->setIcon(icon6);
horizontalLayout->addWidget(pushButtonInsert);
pushButtonOpen = new QPushButton(verticalLayoutWidget_3);
pushButtonOpen->setObjectName(QString::fromUtf8("pushButtonOpen"));
sizePolicy2.setHeightForWidth(pushButtonOpen->sizePolicy().hasHeightForWidth());
pushButtonOpen->setSizePolicy(sizePolicy2);
pushButtonOpen->setMaximumSize(QSize(90, 16777215));
QIcon icon7;
icon7.addFile(QString::fromUtf8(":/icon/fileoperation.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonOpen->setIcon(icon7);
horizontalLayout->addWidget(pushButtonOpen);
pushButtonLast = new QPushButton(verticalLayoutWidget_3);
pushButtonLast->setObjectName(QString::fromUtf8("pushButtonLast"));
sizePolicy2.setHeightForWidth(pushButtonLast->sizePolicy().hasHeightForWidth());
pushButtonLast->setSizePolicy(sizePolicy2);
pushButtonLast->setMaximumSize(QSize(90, 16777215));
QIcon icon8;
icon8.addFile(QString::fromUtf8(":/icon/lastpage.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonLast->setIcon(icon8);
horizontalLayout->addWidget(pushButtonLast);
pushButtonNext = new QPushButton(verticalLayoutWidget_3);
pushButtonNext->setObjectName(QString::fromUtf8("pushButtonNext"));
sizePolicy2.setHeightForWidth(pushButtonNext->sizePolicy().hasHeightForWidth());
pushButtonNext->setSizePolicy(sizePolicy2);
pushButtonNext->setMaximumSize(QSize(90, 16777215));
QIcon icon9;
icon9.addFile(QString::fromUtf8(":/icon/nextpage.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonNext->setIcon(icon9);
horizontalLayout->addWidget(pushButtonNext);
pushButtonExit = new QPushButton(verticalLayoutWidget_3);
pushButtonExit->setObjectName(QString::fromUtf8("pushButtonExit"));
sizePolicy2.setHeightForWidth(pushButtonExit->sizePolicy().hasHeightForWidth());
pushButtonExit->setSizePolicy(sizePolicy2);
pushButtonExit->setMaximumSize(QSize(90, 16777215));
QIcon icon10;
icon10.addFile(QString::fromUtf8(":/icon/exit.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonExit->setIcon(icon10);
horizontalLayout->addWidget(pushButtonExit);
verticalLayout->addLayout(horizontalLayout);
horizontalLayout_3->addLayout(verticalLayout);
verticalLayout_3->addLayout(horizontalLayout_3);
retranslateUi(DialogFileOperation);
QMetaObject::connectSlotsByName(DialogFileOperation);
} // setupUi
void retranslateUi(QDialog *DialogFileOperation)
{
DialogFileOperation->setWindowTitle(QApplication::translate("DialogFileOperation", "Dialog", 0, QApplication::UnicodeUTF8));
radioButtonLocal->setText(QApplication::translate("DialogFileOperation", "\346\234\254\345\234\260\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
radioButtonUdisk->setText(QApplication::translate("DialogFileOperation", "U\347\233\230\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
pushButtonDelFile->setText(QApplication::translate("DialogFileOperation", "\345\210\240\351\231\244\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
pushButtonDelAll->setText(QApplication::translate("DialogFileOperation", "\345\210\240\351\231\244\345\205\250\351\203\250", 0, QApplication::UnicodeUTF8));
pushButtonImport->setText(QApplication::translate("DialogFileOperation", "\344\273\216U\347\233\230\345\257\274\345\205\245", 0, QApplication::UnicodeUTF8));
pushButtonExport->setText(QApplication::translate("DialogFileOperation", "\345\257\274\345\207\272\345\210\260U\347\233\230", 0, QApplication::UnicodeUTF8));
pushButtonInsert->setText(QApplication::translate("DialogFileOperation", "\346\217\222\345\205\245", 0, QApplication::UnicodeUTF8));
pushButtonOpen->setText(QApplication::translate("DialogFileOperation", "\346\211\223\345\274\200\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
pushButtonLast->setText(QApplication::translate("DialogFileOperation", "\344\270\212\344\270\200\344\270\252", 0, QApplication::UnicodeUTF8));
pushButtonNext->setText(QApplication::translate("DialogFileOperation", "\344\270\213\344\270\200\344\270\252", 0, QApplication::UnicodeUTF8));
pushButtonExit->setText(QApplication::translate("DialogFileOperation", "\351\200\200\345\207\272", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DialogFileOperation: public Ui_DialogFileOperation {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOGFILEOPERATION_H
@@ -0,0 +1,120 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QJSONPARSER_P_H
#define QJSONPARSER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qjsondocument.h"
#include <qvarlengtharray.h>
QT_BEGIN_NAMESPACE
namespace QJsonPrivate {
class Parser
{
public:
Parser(const char *json, int length);
QJsonDocument parse(QJsonParseError *error);
class ParsedObject
{
public:
ParsedObject(Parser *p, int pos) : parser(p), objectPosition(pos) {}
void insert(uint offset);
Parser *parser;
int objectPosition;
QVector<uint> offsets;
inline QJsonPrivate::Entry *entryAt(int i) const {
return reinterpret_cast<QJsonPrivate::Entry *>(parser->data + objectPosition + offsets[i]);
}
};
private:
inline bool eatSpace();
inline char nextToken();
bool parseObject();
bool parseArray();
bool parseMember(int baseOffset);
bool parseString(bool *latin1);
bool parseValue(QJsonPrivate::Value *val, int baseOffset);
bool parseNumber(QJsonPrivate::Value *val, int baseOffset);
const char *head;
const char *json;
const char *end;
char *data;
int dataLength;
int current;
QJsonParseError::ParseError lastError;
inline int reserveSpace(int space) {
if (current + space >= dataLength) {
dataLength = 2*dataLength + space;
data = (char *)realloc(data, dataLength);
}
int pos = current;
current += space;
return pos;
}
};
}
QT_END_NAMESPACE
#endif
@@ -0,0 +1,276 @@
#include "filelogger.h"
#include <QTime>
#include <QStringList>
#include <QThread>
#include <QtGlobal>
#include <QFile>
#include <QTimerEvent>
#include <QDir>
#include <QFileInfo>
#include <stdio.h>
#include<iostream>
#include<string>
#include<QDate>
#include "LogInfo.h"
#define LOG_FILE_PATH "/home/plg/loginfo/"
void FileLogger::refreshSettings()
{
mutex.lock();
QString oldFileName=fileName;
settings->sync();
fileName = LOG_FILE_PATH;
// fileName=settings->value("fileName").toString();
// LogInfo::setRunStatusText(tr("fileName: %1").arg(fileName));
QDate today = QDate::currentDate();
QString todayString=today.toString(Qt::ISODate);
// 计算前七天的日期
//QDate oneWeekAgo = today.addDays(-7);
fileName+=today.toString(Qt::ISODate);
fileName+="/";
fileName+="log.txt";
static QString lastDay = "";
if(lastDay!=todayString)
{
TimerDel->start(30000);
lastDay=todayString;
}
#ifdef Q_OS_WIN32
if (QDir::isRelativePath(fileName) && settings->format()!=QSettings::NativeFormat)
#else
// std::cout<<"QDir::isRelativePath:"<<QDir::isRelativePath(fileName)<<std::endl;
if (QDir::isRelativePath(fileName))
#endif
{
QFileInfo configFile(settings->fileName());
fileName=QFileInfo(configFile.absolutePath(),fileName).absoluteFilePath();
}
maxSize=settings->value("maxSize",0).toLongLong();
maxBackups=settings->value("maxBackups",0).toInt();
msgFormat=settings->value("msgFormat","{timestamp} {type} {msg}").toString();
timestampFormat=settings->value("timestampFormat","yyyy-MM-dd hh:mm:ss.zzz").toString();
bufferSize=settings->value("bufferSize",0).toInt();
QByteArray minLevelStr = settings->value("minLevel","ALL").toByteArray();
if (minLevelStr=="ALL" || minLevelStr=="DEBUG" || minLevelStr=="0")
{
minLevel=QtDebugMsg;
}
else if (minLevelStr=="WARNING" || minLevelStr=="WARN" || minLevelStr=="1")
{
minLevel=QtWarningMsg;
}
else if (minLevelStr=="ERROR" || minLevelStr=="CRITICAL" || minLevelStr=="2")
{
minLevel=QtCriticalMsg;
}
else if (minLevelStr=="FATAL" || minLevelStr=="3")
{
// minLevel=QtMsgType::QtFatalMsg;
minLevel=QtFatalMsg;
}
// else if (minLevelStr=="INFO" || minLevelStr=="4")
// {
// minLevel=QtMsgType::QtInfoMsg;
// }
if (oldFileName!=fileName)
{
fprintf(stderr,"Logging to %s\n",qPrintable(fileName));
close();
open();
}
mutex.unlock();
}
FileLogger::FileLogger(QSettings *settings, const int refreshInterval, QObject* parent)
: Logger(parent)
{
TimerDel = new QTimer(this);
connect(TimerDel,SIGNAL(timeout()),this,SLOT(timeOutToDelete()));
Q_ASSERT(settings!=nullptr);
Q_ASSERT(refreshInterval>=0);
this->settings=settings;
file=nullptr;
if (refreshInterval>0)
{
refreshTimer.start(refreshInterval,this);
}
flushTimer.start(1000,this);
refreshSettings();
}
FileLogger::~FileLogger()
{
close();
}
void FileLogger::write(const LogMessage* logMessage)
{
if (file)
{
// qDebug()<<"Critical message output test\n";
// qCritical("This is a critical message of test\n");
file->write(qPrintable(logMessage->toString(msgFormat,timestampFormat)));
if (logMessage->getType()>=QtCriticalMsg)
{
file->flush();
}
if (file->error())
{
qWarning("Cannot write to log file %s: %s",qPrintable(fileName),qPrintable(file->errorString()));
close();
}
}
if (!file)
{
Logger::write(logMessage);
}
}
void FileLogger::open()
{
if (fileName.isEmpty())
{
qWarning("Name of logFile is empty");
}
else {
file=new QFile(fileName);
QFileInfo fileInfo(fileName);
//std::cout<<"fileInfo.exists:"<<fileInfo.exists()?"true" : "false"<<std::endl;
// 检查文件路径是否有效
if (!fileInfo.exists()) {
// 获取文件所在的目录路径
QString dirPath = QFileInfo(fileName).absoluteDir().path();
// 检查目录是否存在
if (!QDir(dirPath).exists()) {
// 如果目录不存在,则创建目录
QDir().mkpath(dirPath);
if (!QDir(dirPath).exists()) {
// 如果创建目录失败,显示错误消息
qDebug("Cannot create directory for log file: %s", qPrintable(dirPath));
delete file;
file = nullptr;
return;
}
}
}
if (!file->open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text))
{
std::cout<<"file is is open faile fileName:"<<fileName.toStdString()<<std::endl;
qWarning("Cannot open log file %s: %s",qPrintable(fileName),qPrintable(file->errorString()));
file=nullptr;
}
}
}
void FileLogger::close()
{
if (file)
{
file->close();
delete file;
file=nullptr;
}
}
void FileLogger::rotate() {
int count=0;
forever
{
QFile bakFile(QString("%1.%2").arg(fileName).arg(count+1));
if (bakFile.exists())
{
++count;
}
else
{
break;
}
}
while (maxBackups>0 && count>=maxBackups)
{
QFile::remove(QString("%1.%2").arg(fileName).arg(count));
--count;
}
for (int i=count; i>0; --i) {
QFile::rename(QString("%1.%2").arg(fileName).arg(i),QString("%1.%2").arg(fileName).arg(i+1));
}
QFile::rename(fileName,fileName+".1");
}
void FileLogger::timerEvent(QTimerEvent* event)
{
if (!event)
{
return;
}
else if (event->timerId()==refreshTimer.timerId())
{
refreshSettings();
}
else if (event->timerId()==flushTimer.timerId() && file)
{
mutex.lock();
file->flush();
if (maxSize>0 && file->size()>=maxSize)
{
close();
rotate();
open();
}
mutex.unlock();
}
}
bool FileLogger::removeDirectory(const QString &directoryPath) {
// 检查目录是否存在
QDir dir(directoryPath);
if (dir.exists()) {
system((char *)((QString("rm -r %1").arg(directoryPath)).toAscii().data()));
return true;
}
return false;
}
void FileLogger::timeOutToDelete(){
QDate today = QDate::currentDate();
for(int daysAgo=14;daysAgo>=7;--daysAgo){
QString needToDelFoldPath=LOG_FILE_PATH;
QDate pastDate=today.addDays(-daysAgo);
needToDelFoldPath+=pastDate.toString(Qt::ISODate);
needToDelFoldPath+="/";
if (QDir(needToDelFoldPath).exists()) {
bool result= removeDirectory(needToDelFoldPath);
if(result){
qDebug()<<"The directory and all its contents have been removed";
LogInfo::setRunStatusText(tr("The directory and all its contents have been removed"));
}else{
qDebug() << "Failed to remove the directory";
LogInfo::setRunStatusText(tr("Failed to remove the directory"));
}
}
}
TimerDel->stop();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,100 @@
#ifndef QBARCODE_H
#define QBARCODE_H
#include <QDialog>
#include "BarCode/barcode.h"
#include "QGraphicsScene"
#include "QGraphicsPixmapItem"
#include "SysPara.h"
#include "QTextEdit"
#include "ParaSettingUI.h"
//typedef struct // BarCodeOption
//{
// unsigned char xpos;
// unsigned char font;
// unsigned char height;
// unsigned char scale;
// unsigned char text[200];
//}bcOption_t;
typedef struct {
unsigned int width;
unsigned char height;
unsigned char type;
unsigned char nc;
}bcPara_t;
namespace Ui {
class QBarCode;
}
class QBarCode : public QDialog, public ParaSettingUI
{
Q_OBJECT
public:
explicit QBarCode(QWidget *parent = 0);
~QBarCode();
void bindSysPara(SysPara *sysPara);
//unsigned char pointMap[40*1000];
QString pictureName;//当前显示的图片
void SetOption(bcOption_t *bcOption);
void GetOption(bcOption_t *bcOption);
QString bcText;
int bcWidth,bcHeight;
unsigned char flagInsert:1;
unsigned char flagCount:1;
unsigned char inkColor:1;
unsigned char flagNC:5;
int ImgRightPos(QImage *img);
int ImgLeftPos(QImage *img);
int getDat(unsigned char *dat,int varNum);
int getDat2(SysPara* sysPara,int varNum);
public:
QImage imgBar;
QString TextToBCImg(bcOption_t *bcVar,QString txt);
void TextBarCode(QString txt, int index);
void GetOption2(bcPara_t *bcOption);
QString getLabe_TxtString();
QString getVarTxt(bool varEn, unsigned varType);// 0,1,2,3,4
void extSetText(QString text);
public slots:
void setFontSize(int PixelSize);
private slots:
void onEnCodeBar();
void onScaleChange(int n);
void onXposChange(int n);
void on_pushBtnColse_pressed();
void ImgSave();
void onBarCodeRefresh(QString s);
signals:
void onBarCodeClose();
private:
void OnCharRamData(QImage *img);
void OnCharRamData1(QImage *img);
void OnCharRamData2(QImage *img1,int Txtwidth,int height);
void ShowBarCode(QString fileName);
void ShowBarCode(QImage *img);
int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
int xoff, int yoff, int flags);
int Barcode_ToImage(Barcode_Item * bc );
int fontSize;
QGraphicsScene *scene;//声明scene
QGraphicsPixmapItem *item;//声明item
bool bcOK;
QString bcPartial;
QString bcTextinfo;
bool AutoRefresh;
QTextEdit textEdit;
QString txtVar1,txtVar2;
private:
Ui::QBarCode *ui;
};
#endif // QBARCODE_H
@@ -0,0 +1,43 @@
#ifndef BISTREAM_H
#define BISTREAM_H
/*
* qrencode - QR Code encoder
*
* Binary sequence class.
* Copyright (C) 2006,2007 Kentaro Fukuchi <fukuchi@megaui.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __BITSTREAM_H__
#define __BITSTREAM_H__
typedef struct {
char *data;
} BitStream;
extern BitStream *BitStream_new(void);
extern void BitStream_append(BitStream *bstream, BitStream *arg);
extern void BitStream_appendNum(BitStream *bstream, int bits, unsigned int num);
extern void BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data);
extern unsigned int BitStream_size(BitStream *bstream);
extern unsigned char *BitStream_toByte(BitStream *bstream);
extern void BitStream_free(BitStream *bstream);
#endif /* __BITSTREAM_H__ */
#endif // BISTREAM_H
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LogInfo</class>
<widget class="QWidget" name="LogInfo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>当前状态</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QTextEdit" name="textEditRunStatus">
<property name="enabled">
<bool>true</bool>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="undoRedoEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QPushButton" name="pushButtonClearCurrent">
<property name="minimumSize">
<size>
<width>120</width>
<height>70</height>
</size>
</property>
<property name="text">
<string>清空当前状态</string>
</property>
</widget>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>历史状态</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QTextEdit" name="textEditRunStatus_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="undoRedoEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="labelPreFileName">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QPushButton" name="pushButtonClear">
<property name="minimumSize">
<size>
<width>0</width>
<height>70</height>
</size>
</property>
<property name="text">
<string>删除历史文件</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="pushButtonPreState">
<property name="minimumSize">
<size>
<width>0</width>
<height>70</height>
</size>
</property>
<property name="text">
<string>打开历史文件</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonExportFile">
<property name="minimumSize">
<size>
<width>0</width>
<height>70</height>
</size>
</property>
<property name="text">
<string>导出日志到U盘</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabInformation">
<attribute name="title">
<string>版本信息</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QTextEdit" name="machinInformation">
<property name="enabled">
<bool>true</bool>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="undoRedoEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dlgQrCode</class>
<widget class="QDialog" name="dlgQrCode">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>560</width>
<height>300</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="image.qrc">
<normaloff>:/icon/bypm.png</normaloff>:/icon/bypm.png</iconset>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2" colspan="3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="3">
<widget class="QPushButton" name="pushBtnClose">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>返回</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="comboBoxType">
<item>
<property name="text">
<string>DataMatrix</string>
</property>
</item>
<item>
<property name="text">
<string>QRCode</string>
</property>
</item>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushBtnSave">
<property name="text">
<string>保存</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="pushBtnPreView">
<property name="text">
<string>预览</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="comboBoxInkColor">
<item>
<property name="text">
<string>正相打印</string>
</property>
</item>
<item>
<property name="text">
<string>反相打印</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labelVarInc">
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>变量增量</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEditVarInc">
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="inputMethodHints">
<set>Qt::ImhDigitsOnly</set>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="5" column="0" colspan="5">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>信息前缀</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditCNT">
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="inputMethodHints">
<set>Qt::ImhDigitsOnly</set>
</property>
<property name="maxLength">
<number>10</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>变量(初值)</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="lineEditIn2">
<property name="maxLength">
<number>80</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="lineEditIn">
<property name="maxLength">
<number>100</number>
</property>
</widget>
</item>
<item row="0" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>信息后缀</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="3" column="0" colspan="5">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labRECT">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxAutoCount">
<property name="text">
<string>计数器(变量)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxAuto">
<property name="text">
<string>自动刷新</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>插入文档</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labName">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>160</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0" colspan="5">
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maxLength">
<number>200</number>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QGraphicsView" name="BarCodeView">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>600</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="barCodeCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>条形码</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QComboBox" name="comboBox_DMType">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>默认</string>
</property>
</item>
<item>
<property name="text">
<string>8 x 18</string>
</property>
</item>
<item>
<property name="text">
<string>8 x 32</string>
</property>
</item>
<item>
<property name="text">
<string>12 x 26</string>
</property>
</item>
<item>
<property name="text">
<string>12 x 36</string>
</property>
</item>
<item>
<property name="text">
<string>16 x 36</string>
</property>
</item>
<item>
<property name="text">
<string>16 x 48</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>DM码尺寸:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QCheckBox" name="checkBoxInsertTime">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>自动插入时间</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="image.qrc"/>
</resources>
<connections/>
</ui>
@@ -0,0 +1,12 @@
#ifndef QJSONBACKPORT_GLOBAL_H
#define QJSONBACKPORT_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(QJSONBACKPORT_LIBRARY)
# define QJSONBACKPORTSHARED_EXPORT Q_DECL_EXPORT
#else
# define QJSONBACKPORTSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // QJSONBACKPORT_GLOBAL_H

Some files were not shown because too many files have changed in this diff Show More