re-commit all files to new repo
This commit is contained in:
@@ -8,13 +8,19 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Debug|x64.Build.0 = Debug|x64
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Debug|x86.Build.0 = Debug|Win32
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Release|x64.ActiveCfg = Release|x64
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Release|x64.Build.0 = Release|x64
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Release|x86.ActiveCfg = Release|Win32
|
||||
{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
private:
|
||||
static size_t process_data(void* buffer, size_t size, size_t nmemb, void* user_p);
|
||||
public:
|
||||
ACIClient(int server_port = 10000);
|
||||
ACIClient(int server_port = 10000, std::string target_ip = "127.0.0.1");
|
||||
~ACIClient();
|
||||
public:
|
||||
bool SendData(std::string item, std::string data, ClientCallback cb_func = nullptr);
|
||||
@@ -154,6 +154,7 @@ public:
|
||||
void Run(int worker_thread = 1, int loop_thread = 1);
|
||||
void ThreadRun(int worker_thread = 1, int loop_thread = 1);
|
||||
void Stop();
|
||||
bool IsRunning();
|
||||
bool EnableCallback(ServerInputCallback cb_func = nullptr);
|
||||
bool SetCallbackFunction(ServerInputCallback cb_func);
|
||||
bool DisableCallback();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,8 @@ ACIMode::ACIMode(QWidget* parent) : QMainWindow(parent)
|
||||
ui.setupUi(this);
|
||||
ui.Workmode_Client->setChecked(true);
|
||||
ui.Workmode_Server->setChecked(false);
|
||||
ui.PortNumber->setPlainText("23456");
|
||||
ui.IP->installEventFilter(this);
|
||||
ui.PortNumber->installEventFilter(this);
|
||||
connect(ui.BtnStart, &QCommandLinkButton::clicked, this, &ACIMode::StartACISystem);
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ void ACIMode::StartACISystem()
|
||||
{
|
||||
CleanUp();
|
||||
OperationMode = 0;
|
||||
client = new ACIClient(ui.PortNumber->toPlainText().toInt());
|
||||
client = new ACIClient(ui.PortNumber->toPlainText().toInt(), ui.IP->toPlainText().toStdString());
|
||||
this->hide();
|
||||
break;
|
||||
}
|
||||
@@ -101,6 +102,21 @@ void ACIMode::closeEvent(QCloseEvent* event)
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
bool ACIMode::eventFilter(QObject* watched, QEvent* event)
|
||||
{
|
||||
if (watched == ui.IP)
|
||||
{
|
||||
if (event->type() == QEvent::FocusIn)
|
||||
ui.IP->grabKeyboard();
|
||||
}
|
||||
else if (watched == ui.PortNumber)
|
||||
{
|
||||
if (event->type() == QEvent::FocusIn)
|
||||
ui.PortNumber->grabKeyboard();
|
||||
}
|
||||
return QWidget::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
std::string RequestedTimerStart(std::string json)
|
||||
{
|
||||
GlobalVari::ServerRequested = true;
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
bool eventFilter(QObject* watched, QEvent* event) override;
|
||||
|
||||
private:
|
||||
int OperationMode;
|
||||
|
||||
+56
-6
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>262</width>
|
||||
<height>241</height>
|
||||
<height>261</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -20,7 +20,7 @@
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>241</width>
|
||||
<height>171</height>
|
||||
<height>191</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@@ -30,11 +30,17 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>30</y>
|
||||
<y>60</y>
|
||||
<width>161</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>23456</string>
|
||||
</property>
|
||||
<property name="centerOnScroll">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -43,7 +49,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<y>60</y>
|
||||
<width>41</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@@ -56,7 +62,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<y>100</y>
|
||||
<width>221</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
@@ -91,12 +97,56 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>41</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP地址</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPlainTextEdit" name="IP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>20</y>
|
||||
<width>161</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
<property name="cursorWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="centerOnScroll">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QCommandLinkButton" name="BtnStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>190</y>
|
||||
<y>210</y>
|
||||
<width>141</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
|
||||
@@ -66,10 +66,17 @@ void ClockCounter::StartTimer()
|
||||
this->setWindowTitle("软件执行计时器: 正在计时");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CountTimer.start();
|
||||
this->setWindowTitle("软件执行计时器: 正在计时");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClockCounter::StopTimer()
|
||||
{
|
||||
if (CountTimer.isActive())
|
||||
{
|
||||
CountTimer.stop();
|
||||
if (GlobalVari::ServerRequested && (aci_mode_window.GetOperationMode() == 1))
|
||||
@@ -80,6 +87,7 @@ void ClockCounter::StopTimer()
|
||||
ui.BtnStartTimer->setText("重置计时器");
|
||||
this->setWindowTitle("软件执行计时器: 计时已停止");
|
||||
}
|
||||
}
|
||||
|
||||
void ClockCounter::ShowACIModeWindow()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
@@ -14,7 +22,9 @@
|
||||
<ProjectGuid>{D0E21A4E-4B89-4861-86DC-3C3C6D1E10C8}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">10.0.22621.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">10.0.22621.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">10.0.22621.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">10.0.22621.0</WindowsTargetPlatformVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
@@ -22,10 +32,18 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
@@ -35,11 +53,21 @@
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="QtSettings">
|
||||
<QtInstall>6.3.1_msvc2019_64</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||
<QtInstall>6.3.1_msvc2019_64</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="QtSettings">
|
||||
<QtInstall>6.3.1_msvc2019_64</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
@@ -49,21 +77,62 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<IncludePath>F:\QtGUIlib\qucsdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>F:\QtGUIlib\qucsdk\bin;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>F:\QtGUIlib\qucsdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>F:\QtGUIlib\qucsdk\bin;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<IncludePath>F:\QtGUIlib\qucsdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>F:\QtGUIlib\qucsdk\bin;$(LibraryPath)</LibraryPath>
|
||||
<CopyCppRuntimeToOutputDir>true</CopyCppRuntimeToOutputDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>F:\QtGUIlib\qucsdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>F:\QtGUIlib\qucsdk\bin;$(LibraryPath)</LibraryPath>
|
||||
<CopyCppRuntimeToOutputDir>true</CopyCppRuntimeToOutputDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>quc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>quc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>qucd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>qucd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
@@ -78,6 +147,19 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
@@ -91,6 +173,19 @@
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ACIMode.cpp" />
|
||||
<ClCompile Include="GlobalVari.cpp" />
|
||||
|
||||
@@ -54,6 +54,7 @@ void PreClick::StartCursorTrack()
|
||||
else
|
||||
{
|
||||
CursorUpdate.start();
|
||||
this->grabKeyboard();
|
||||
ui.BtnGetPos->setText("停止获取");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user