定制路线界面,以及选择交通路线界面,显示路线详情,加入场所收藏夹和行程数据库

master
liukunlin123 4 years ago
parent 8b542e1db0
commit baaa2a60c1

@ -1,317 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2021-07-08T01:05:03. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{5009ac75-b61d-4c91-8540-bc9e10b6e582}</value>
</data>
<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="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</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="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</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">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.14.2 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.14.2 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5142.gcc_64_kit</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">/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/build-ChangShaTour-Desktop_Qt_5_14_2_GCC_64bit-Debug</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/build-ChangShaTour-Desktop_Qt_5_14_2_GCC_64bit-Release</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/build-ChangShaTour-Desktop_Qt_5_14_2_GCC_64bit-Profile</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</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">Deploy</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.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">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<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="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</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.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/ChangShaTour/ChangShaTour.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/ChangShaTour/ChangShaTour.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</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>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/extra/Program/Qt5.14.2/Trip-in-Chang-sha/build-ChangShaTour-Desktop_Qt_5_14_2_GCC_64bit-Debug</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.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2021-01-13T13:00:47. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{0c4c8ccc-c524-4850-ba23-7e124d5915df}</value>
</data>
<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="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</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="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</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">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.14.2 MSVC2017 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.14.2 MSVC2017 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5142.win64_msvc2017_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</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">F:/QtDemo/build-ChangShaTour-Desktop_Qt_5_14_2_MSVC2017_64bit-Debug</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">F:/QtDemo/build-ChangShaTour-Desktop_Qt_5_14_2_MSVC2017_64bit-Release</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">F:/QtDemo/build-ChangShaTour-Desktop_Qt_5_14_2_MSVC2017_64bit-Profile</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.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<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>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</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">Deploy</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.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">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<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="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</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.Id">Qt4ProjectManager.Qt4RunConfiguration:F:/QtDemo/ChangShaTour/ChangShaTour.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">F:/QtDemo/ChangShaTour/ChangShaTour.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</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>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">F:/QtDemo/build-ChangShaTour-Desktop_Qt_5_14_2_MSVC2017_64bit-Release</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.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

@ -1,21 +1,160 @@
#include "confirmwidget.h"
#include "ui_confirmwidget.h"
#include <QLabel>
#include <QGridLayout>
ConfirmWidget::ConfirmWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::ConfirmWidget)
{
ui->setupUi(this);
verLayout = new QVBoxLayout();
setLayout(verLayout);
QLabel *label = new QLabel("ConfirmWidget");
routeToConfirm = new Route();
routePlan = new RoutePlanning();
setLayout(verLayout);
verLayout->addWidget(label);
}
void ConfirmWidget::initWidget()
{
initInfoWidget();
qDebug()<<"generate ConfirmWidget";
//并不能像定制界面那样能对齐,因此取消
//format = new QHBoxLayout();
//format->addWidget(new QLabel("序号"),1);
//format->addWidget(new QLabel("场所"),12);
//format->addWidget(new QLabel("起始时间"),3);
//format->addWidget(new QLabel("结束时间"),3);
//format->addWidget(new QLabel(""),2);
//format->addWidget(new QLabel(""),2);
//verLayout->addLayout(format);
int i;
for (i = 0;i < size;i++) {
lineList[2*i]= new QHBoxLayout();
lineList[2*i]->addWidget(placeLabelList[i]);
lineList[2*i]->addWidget(startTimeLabelList[i]);
lineList[2*i]->addWidget(endTimeLabelList[i]);
verLayout->addLayout(lineList[2*i]);
qDebug()<<"generate verlayout";
if(i != size - 1)
{
lineList[2*i+1]= new QHBoxLayout();
lineList[2*i+1]->addWidget(trafficCBoxList[i]);
lineList[2*i+1]->addWidget(distanceLabelList[i]);
lineList[2*i+1]->addWidget(descriptionLabelList[i]);
lineList[2*i+1]->addWidget(timeCostLabelList[i]);
verLayout->addLayout(lineList[2*i+1]);
}
}
}
void ConfirmWidget::initInfoWidget()
{
initInfo();
RouteItem * routeItems = routeToConfirm->getAllItems();
int i = 0;
routeNameLabel = new QLabel("路线名称:");
routeNameLineEdit->setText(routeToConfirm->getRouteName());
nameLine = new QHBoxLayout();
nameLine->addWidget(routeNameLabel);
nameLine->addWidget(routeNameLineEdit);
verLayout->addLayout(nameLine);
while(routeItems->next != NULL)
{
routeItems=routeItems->next;
qDebug()<<i<<routeItems->placeName<<routeItems->startTime<<routeItems->endTime;
placeLabelList[i] = new QLabel(routeItems->placeName);
startTimeLabelList[i] = new QLabel(routeItems->startTime.toString());
endTimeLabelList[i] = new QLabel(routeItems->endTime.toString());
double * tt =getLatAndLng(routeItems->placeName,routeItems->cateId);
lats[i] = tt[0];
lngs[i] = tt[1];
i++;
}
//需要根据接口返回的数据调整顺序
trafficLabels<<"步行"<<"公交地铁"<<"驾车"<<"骑行";
qDebug()<<trafficLabels[0];
for(i = 0;i< size - 1;i++)
{
trafficCBoxList[i] = new QComboBox();
trafficCBoxList[i]->addItems(trafficLabels);
QString location1 = QString::number(lngs[i]) + "," + QString::number(lats[i]);
qDebug()<<location1;
QString location2 = QString::number(lngs[i+1]) + "," + QString::number(lats[i+1]);
QStringList * allInfo = routePlan->getAllInfo(location1,location2);
int k = trafficCBoxList[i]->currentIndex();
descriptionLabelList[i]=new QLabel(allInfo[k][2]);
distanceLabelList[i]=new QLabel("距离:"+allInfo[k][0]);
timeCostLabelList[i]=new QLabel("时间:"+allInfo[k][1]);
void(QComboBox::*fp)(int)=&QComboBox:: currentIndexChanged;
connect(trafficCBoxList[i],fp,this,[=](){descriptionLabelList[i]->setText(allInfo[trafficCBoxList[i]->currentIndex()][2]);distanceLabelList[i]->setText("距离:"+allInfo[trafficCBoxList[i]->currentIndex()][0]);timeCostLabelList[i]->setText("时间:"+allInfo[trafficCBoxList[i]->currentIndex()][1]);});
}
}
void ConfirmWidget::initInfo()
{
size = routeToConfirm->getLength();
routeNameLineEdit = new QLineEdit();
placeLabelList = (QLabel **)malloc(sizeof(QLabel *) * size);
startTimeLabelList = (QLabel **)malloc(sizeof(QLabel *) * size);
endTimeLabelList = (QLabel **)malloc(sizeof(QLabel *) * size);
trafficCBoxList = (QComboBox **)malloc(sizeof(QComboBox *) * (size - 1));
descriptionLabelList = (QLabel **)malloc(sizeof(QLabel *) * (size - 1));
distanceLabelList = (QLabel **)malloc(sizeof(QLabel *) * (size - 1));
timeCostLabelList = (QLabel **)malloc(sizeof(QLabel *) * (size - 1));
lineList = (QHBoxLayout **)malloc(sizeof(QHBoxLayout *) * (2 * size - 1));
lats = (double *)malloc(sizeof(double) * size);
lngs = (double *)malloc(sizeof(double) * size);
}
double * ConfirmWidget::getLatAndLng(QString title,QString cateId)
{
double *tuple = (double *)malloc(sizeof(double *) * 2);
QString sql = "select * from "+labelToDb[cateId] + " where title = ?";
qDebug()<<sql;
QSqlQuery query(meituanDb);
query.prepare(sql);
query.addBindValue(title);
query.exec();
query.next();
tuple[0] = query.value("latitude").toDouble();
tuple[1] = query.value("longitude").toDouble();
return tuple;
}
Route * ConfirmWidget::genRoute()
{
int i;
if(routeNameLineEdit->text()=="")
{
QMessageBox::warning(this,"警告","请填入路线名称!",QMessageBox::Yes);
return NULL;
}
routeToConfirm->setRouteName(routeNameLineEdit->text());
RouteItem * routeItems = routeToConfirm->getAllItems();
for(i = 0;i<size-1;i++)
{
routeItems = routeItems->next;
routeItems->traffic = trafficCBoxList[i]->currentText();
routeItems->description = descriptionLabelList[i]->text();
routeItems->distance = distanceLabelList[i]->text().split(":")[1].toDouble();
routeItems->timeCost = timeCostLabelList[i]->text().split(":")[1].toDouble();
if((routeItems->next->startTime.toTime_t()) - (routeItems->next->endTime.toTime_t()) < routeItems->timeCost)
{
QMessageBox::warning(this,"警告","当前交通方式无法按时到达目的地!",QMessageBox::Yes);
}
}
return routeToConfirm;
}
//路线用指针
void ConfirmWidget::setRouteToConfirm(Route *route)
{
this->routeToConfirm = route;
}
ConfirmWidget::~ConfirmWidget()

@ -2,8 +2,21 @@
#define CONFIRMWIDGET_H
#include <QWidget>
#include <route.h>
#include <QDebug>
#include <QStringList>
#include <QStringLiteral>
#include <QLabel>
#include <QMessageBox>
#include <QComboBox>
#include <cglobal.h>
#include <QObject>
#include <routeplanning.h>
#include <QSqlQuery>
#include <QPushButton>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QGridLayout>
#if _MSC_VER >= 1600
@ -21,11 +34,36 @@ class ConfirmWidget : public QWidget
public:
explicit ConfirmWidget(QWidget *parent = nullptr);
~ConfirmWidget();
void initInfoWidget();
void initInfo();
void setRouteToConfirm(Route * route);
double * getLatAndLng(QString title,QString cateId);
void initWidget();
void trafficInfoChanged(const QString &);
Route * genRoute();
private:
int size;
QLineEdit * routeNameLineEdit;
QHBoxLayout * nameLine;
QLabel * routeNameLabel;
Route * routeToConfirm;
RoutePlanning * routePlan;
QStringList trafficLabels;
QLabel ** placeLabelList;
QHBoxLayout ** lineList;
QVBoxLayout * verLayout;
QHBoxLayout * format;
QLabel ** startTimeLabelList;
QLabel ** descriptionLabelList;
QLabel ** distanceLabelList;
QLabel ** timeCostLabelList;
QLabel ** endTimeLabelList;
QLabel ** labelList;//显示序号
double *lats;//考虑用km保留一位有效数字*10即可
double *lngs;
QComboBox ** trafficCBoxList;
Ui::ConfirmWidget *ui;
QVBoxLayout *verLayout;
};
#endif // CONFIRMWIDGET_H

@ -23,6 +23,33 @@ void PlanWidget::switchToPlanChoice()
customizeWidget->deleteLater();
customizeWidget = new CustomizeWidget();
verLayout->addWidget(customizeWidget);
}
if (pageIndex == 6)
{
addRoute();
//删除界面定制相关界面
QMessageBox::information(NULL, "success", "已成功添加至行程\n可进入\"个人->行程\"查看");
showRouteInfoWidget->deleteLater();
showRouteInfoWidget = new ShowRouteInfoWidget();
verLayout->addWidget(showRouteInfoWidget);
confirmWidget->deleteLater();
confirmWidget = new ConfirmWidget();
verLayout->addWidget(confirmWidget);
customizeWidget->deleteLater();
customizeWidget = new CustomizeWidget();
verLayout->addWidget(customizeWidget);
//删除推荐路线相关界面
conditionWidget->deleteLater();
conditionWidget = new ConditionWidget();
verLayout->addWidget(conditionWidget);
preferenceWidget->deleteLater();
preferenceWidget = new PreferenceWidget();
verLayout->addWidget(preferenceWidget);
routeChoiceWidget->deleteLater();
routeChoiceWidget = new RouteChoiceWidget();
verLayout->addWidget(routeChoiceWidget);
}
pageIndex = 0;
@ -36,6 +63,7 @@ void PlanWidget::switchToPlanChoice()
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
}
void PlanWidget::switchToConditionWidget()
@ -64,6 +92,7 @@ void PlanWidget::switchToConditionWidget()
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
@ -119,6 +148,7 @@ void PlanWidget::switchToPreferenceWidget()
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
@ -130,10 +160,10 @@ void PlanWidget::switchToPreferenceWidget()
void PlanWidget::switchToRouteChoiceWidget()
{
if (pageIndex == 5)
if (pageIndex == 6)
{
confirmWidget->deleteLater();
confirmWidget = new ConfirmWidget();
showRouteInfoWidget->deleteLater();
showRouteInfoWidget = new ShowRouteInfoWidget();//显示详情界面index为6
verLayout->addWidget(confirmWidget);
}
@ -161,6 +191,7 @@ void PlanWidget::switchToRouteChoiceWidget()
routeChoiceWidget->setVisible(true);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
routeChoiceWidget->setBtns(recRouteManager->getRecRoutes(), recRouteManager->getNumOfRecRoutes());
@ -168,9 +199,82 @@ void PlanWidget::switchToRouteChoiceWidget()
disconnect(confirmBtn, 0, 0, 0);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToPreferenceWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToConfirmWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToShowRouteInfo);
}
void PlanWidget::switchToShowRouteInfo()
{
int originalIndex = pageIndex;
if (originalIndex == 3)
{
pageIndex = 6;
tag = 0;//推荐路线
functionWidget->setVisible(true);
returnBtn->setVisible(true);
favoriteBtn->setVisible(true);
confirmBtn->setVisible(true);
//rcmdPlanBtn->setVisible(false);
//cstmPlanBtn->setVisible(false);
conditionWidget->setVisible(false);
preferenceWidget->setVisible(false);
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(true);
showRouteInfoWidget->setRouteToShow(recRoute);//《在这添加》一点button就把recRoute赋值
showRouteInfoWidget->initWidget();
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToRouteChoiceWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToPlanChoice);
connect(favoriteBtn,&QPushButton::clicked, this, &PlanWidget::addFavRoute);
}
if (originalIndex == 5)
{
Route *route = confirmWidget->genRoute();
if(route == NULL)
{
return ;
}
else
{
pageIndex = 6;
tag = 1;//来自定制路线
functionWidget->setVisible(true);
returnBtn->setVisible(true);
favoriteBtn->setVisible(true);
confirmBtn->setVisible(true);
//rcmdPlanBtn->setVisible(false);
//cstmPlanBtn->setVisible(false);
conditionWidget->setVisible(false);
preferenceWidget->setVisible(false);
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(true);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToConfirmWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToPlanChoice);
connect(favoriteBtn,&QPushButton::clicked, this, &PlanWidget::addFavRoute);
showRouteInfoWidget->setRouteToShow(route);
showRouteInfoWidget->initWidget();
struct routeItem * p= route->getAllItems()->next;
while (p)
{
qDebug() << p->traffic;
p = p->next;
}
}
}
}
void PlanWidget::switchToCustomizeWidget()
{
@ -193,6 +297,7 @@ void PlanWidget::switchToCustomizeWidget()
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(true);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
@ -206,57 +311,68 @@ void PlanWidget::switchToConfirmWidget()
{
int originalIndex = pageIndex;
if (originalIndex == 3)
if (originalIndex == 6)
{
showRouteInfoWidget->deleteLater();
showRouteInfoWidget = new ShowRouteInfoWidget();
verLayout->addWidget(showRouteInfoWidget);
pageIndex = 5;
functionWidget->setVisible(true);
returnBtn->setVisible(true);
favoriteBtn->setVisible(true);
favoriteBtn->setVisible(false);
confirmBtn->setVisible(true);
choiceWidget->setVisible(false);
//rcmdPlanBtn->setVisible(false);
//cstmPlanBtn->setVisible(false);
conditionWidget->setVisible(false);
preferenceWidget->setVisible(false);
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(true);
showRouteInfoWidget->setVisible(false);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToRouteChoiceWidget);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToCustomizeWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToShowRouteInfo);
}
if (originalIndex == 4)
if(originalIndex == 4)
{
if (customizeWidget->genRoute())
if(customizeWidget->genRoute())
{
Route *route = customizeWidget->getRoute();
confirmWidget->setRouteToConfirm(route);
confirmWidget->initWidget();
qDebug() << "generate customize route:";
struct routeItem * p= route->getAllItems()->next;
while (p)
{
qDebug() << p->placeName;
p = p->next;
}
pageIndex = 5;
functionWidget->setVisible(true);
returnBtn->setVisible(true);
favoriteBtn->setVisible(true);
favoriteBtn->setVisible(false);
confirmBtn->setVisible(true);
choiceWidget->setVisible(false);
//rcmdPlanBtn->setVisible(false);
//cstmPlanBtn->setVisible(false);
conditionWidget->setVisible(false);
preferenceWidget->setVisible(false);
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(true);
showRouteInfoWidget->setVisible(false);
disconnect(returnBtn, 0, 0, 0);
disconnect(confirmBtn, 0, 0, 0);
connect(returnBtn, &QPushButton::clicked, this, &PlanWidget::switchToCustomizeWidget);
connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToShowRouteInfo);
}
Route *route = customizeWidget->getRoute();
qDebug() << "generate customize route:";
struct routeItem * p= route->getAllItems()->next;
while (p)
{
qDebug() << p->placeName;
p = p->next;
}
}
}
// connect(confirmBtn, &QPushButton::clicked, this, &PlanWidget::switchToPreferenceWidget);
}
@ -285,7 +401,6 @@ void PlanWidget::InitPlanWidget()
functionWidget = new QWidget();
InitFunctionWidget();
functionWidget->setFixedSize(1380, 50);
verLayout->addWidget(functionWidget);
functionWidget->setVisible(false);
returnBtn->setVisible(false);
@ -302,26 +417,30 @@ void PlanWidget::InitPlanWidget()
routeChoiceWidget = new RouteChoiceWidget();
customizeWidget = new CustomizeWidget();
confirmWidget = new ConfirmWidget();
showRouteInfoWidget = new ShowRouteInfoWidget();
conditionWidget->setVisible(false);
preferenceWidget->setVisible(false);
routeChoiceWidget->setVisible(false);
customizeWidget->setVisible(false);
confirmWidget->setVisible(false);
showRouteInfoWidget->setVisible(false);
verLayout->addWidget(conditionWidget);
verLayout->addWidget(preferenceWidget);
verLayout->addWidget(routeChoiceWidget);
verLayout->addWidget(customizeWidget);
verLayout->addWidget(confirmWidget);
verLayout->addWidget(showRouteInfoWidget);
}
void PlanWidget::InitChoiceWidget()
{
QVBoxLayout * verLayout = new QVBoxLayout();
choiceWidget->setLayout(verLayout);
QVBoxLayout * choiceverLayout = new QVBoxLayout();
choiceWidget->setLayout(choiceverLayout);
QWidget * firstSubWidget = new QWidget();
verLayout->addWidget(firstSubWidget);
choiceverLayout->addWidget(firstSubWidget);
QHBoxLayout * firstHoriLayout = new QHBoxLayout();
firstSubWidget->setLayout(firstHoriLayout);
@ -336,7 +455,7 @@ void PlanWidget::InitChoiceWidget()
firstHoriLayout->addWidget(cstmPlanBtn);
QWidget * secondSubWidget = new QWidget();
verLayout->addWidget(secondSubWidget);
choiceverLayout->addWidget(secondSubWidget);
QHBoxLayout * secondHoriLayout = new QHBoxLayout();
secondSubWidget->setLayout(secondHoriLayout);
@ -382,7 +501,82 @@ void PlanWidget::InitLabel(QLabel * label)
label->setStyleSheet("color:#FFFFFF");
label->setAlignment(Qt::AlignCenter);
}
void PlanWidget::addFavRoute()
{
Route * routeFav = showRouteInfoWidget->getRouteToShow();
RouteItem * routeItemsFav = routeFav->getAllItems();
QSqlQuery query(userDb);
QString sql = "insert into favRoutes (userId,routeId,routeName,placeNo,startTime,endTime,placeName,url,cateId,traffic,distance,timeCost,description) values(?,?,?,?,?,?,?,?,?,?,?,?,?);";
int i = 1;
QString sql_query="select max(routeId) from favRoutes";
query.exec(sql_query);
query.next();
int routeId = query.value(0).toInt();
routeId = routeId+1;
//int size = routeFav->getPlaceSize();
while(routeItemsFav->next != NULL)
{
routeItemsFav = routeItemsFav->next;
query.prepare(sql);
query.addBindValue(Id);
query.addBindValue(routeId);
//query.addBindValue(routeFav->getRouteId());
query.addBindValue(routeFav->getRouteName());
//query.addBindValue(routeFav->getRouteName());
query.addBindValue(i);
query.addBindValue(routeItemsFav->startTime.toString("yyyy-MM-dd HH:mm:ss"));
query.addBindValue(routeItemsFav->endTime.toString("yyyy-MM-dd HH:mm:ss"));
query.addBindValue(routeItemsFav->placeName);
query.addBindValue(routeItemsFav->url);
query.addBindValue(routeItemsFav->cateId);
query.addBindValue(routeItemsFav->traffic);
query.addBindValue(routeItemsFav->distance);
query.addBindValue(routeItemsFav->timeCost);
query.addBindValue(routeItemsFav->description);
//query.addBindValue(tag);
query.exec();
i++;
}
}
void PlanWidget::addRoute()
{
Route * routeFav = showRouteInfoWidget->getRouteToShow();
RouteItem * routeItemsFav = routeFav->getAllItems();
QSqlQuery query(userDb);
QString sql = "insert into journey (userId,routeId,routeName,placeNo,startTime,endTime,placeName,url,cateId,traffic,distance,timeCost,description,tag) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
int i = 1;
QString sql_query="select max(routeId) from journey";
query.exec(sql_query);
query.next();
int routeId = query.value(0).toInt();
routeId = routeId+1;
//int size = routeFav->getPlaceSize();
while(routeItemsFav->next != NULL)
{
routeItemsFav = routeItemsFav->next;
query.prepare(sql);
query.addBindValue(Id);
query.addBindValue(routeId);
//query.addBindValue(routeFav->getRouteId());
query.addBindValue(routeFav->getRouteName());
//query.addBindValue(routeFav->getRouteName());
query.addBindValue(i);
query.addBindValue(routeItemsFav->startTime.toString("yyyy-MM-dd HH:mm:ss"));
query.addBindValue(routeItemsFav->endTime.toString("yyyy-MM-dd HH:mm:ss"));
query.addBindValue(routeItemsFav->placeName);
query.addBindValue(routeItemsFav->url);
query.addBindValue(routeItemsFav->cateId);
query.addBindValue(routeItemsFav->traffic);
query.addBindValue(routeItemsFav->distance);
query.addBindValue(routeItemsFav->timeCost);
query.addBindValue(routeItemsFav->description);
query.addBindValue(tag);
query.exec();
i++;
}
}
void PlanWidget::InitButton(QPushButton * button)
{
button->setStyleSheet("QPushButton {"
@ -448,6 +642,7 @@ void PlanWidget::InitPlanButton(QPushButton * button, QString url)
button->setFixedSize(500, 300);
}
void PlanWidget::resizeEvent(QResizeEvent *event)
{
background->resize(this->size());

@ -12,6 +12,7 @@
#include "customizewidget.h"
#include "confirmwidget.h"
#include "route.h"
#include "showrouteinfowidget.h"
#include "recroutemanager.h"
#if _MSC_VER >= 1600
@ -48,6 +49,7 @@ private:
QLabel * background;
int pageIndex;
int tag = 1;
QVBoxLayout *verLayout;
@ -56,6 +58,7 @@ private:
QPushButton *confirmBtn;
QPushButton *rcmdPlanBtn;
QPushButton *cstmPlanBtn;
Route * recRoute;
QWidget * choiceWidget;
QWidget * functionWidget;
@ -63,13 +66,17 @@ private:
PreferenceWidget *preferenceWidget;
RouteChoiceWidget *routeChoiceWidget;
CustomizeWidget *customizeWidget;
ConfirmWidget *confirmWidget;
ConfirmWidget *confirmWidget;//选择交通路线界面
ShowRouteInfoWidget * showRouteInfoWidget;//显示详情界面
RecRouteManager * recRouteManager;
public slots:
void switchToPlanChoice();
void switchToConditionWidget();
void addFavRoute();
void addRoute();
void switchToShowRouteInfo();
void switchToPreferenceWidget();
void switchToRouteChoiceWidget();
void switchToCustomizeWidget();

@ -46,9 +46,9 @@ void Route::setAllItems(QStringList titleList,QStringList urlList,QStringList ca
{
RouteItem * head= routeItems;
RouteItem * p;
int totalSize=titleList.size();
placeSize=titleList.size();
int i;
for(i=0;i<totalSize;i++)
for(i=0;i<placeSize;i++)
{
p=new RouteItem;
p->placeName = titleList[i];
@ -98,12 +98,5 @@ RouteItem * Route::deleteItem(int locate)
int Route::getLength()
{
RouteItem * p = routeItems->next;
int i = 0;
while(p != NULL)
{
p = p->next;
i++;
}
return i;
return this->placeSize;
}

@ -21,6 +21,7 @@ public:
int getLength();
private:
QString routeName;
int placeSize = 0;
int userId=0;//路线没有用户时默认为0
int routeId=0;//路线编号默认为0
struct routeItem *routeItems;

@ -48,6 +48,7 @@ QStringList RoutePlanning::getWalkingRoute(QString origin, QString destination)
QString duration = pathsJson.value("duration").toString();
walkingInfo.append(distance);
walkingInfo.append(duration);
walkingInfo.append("");
return walkingInfo;
}
else
@ -61,6 +62,7 @@ QStringList RoutePlanning::getWalkingRoute(QString origin, QString destination)
netManager = nullptr;
}
walkingInfo.append("Error");
walkingInfo.append("Error");
walkingInfo.append("Error");
return walkingInfo;
@ -189,6 +191,7 @@ QStringList RoutePlanning::getDrivingRoute(QString origin, QString destination)
QString duration = pathsJson.value("duration").toString();
drivingInfo.append(distance);
drivingInfo.append(duration);
drivingInfo.append("");
return drivingInfo;
}
else
@ -202,6 +205,7 @@ QStringList RoutePlanning::getDrivingRoute(QString origin, QString destination)
netManager = nullptr;
}
drivingInfo.append("Error");
drivingInfo.append("Error");
drivingInfo.append("Error");
return drivingInfo;
@ -249,6 +253,7 @@ QStringList RoutePlanning::getBicyclingRoute(QString origin, QString destination
QString duration = QString::number(pathsJson.value("duration").toInt());
bicyclingInfo.append(distance);
bicyclingInfo.append(duration);
bicyclingInfo.append("");
return bicyclingInfo;
}
else
@ -262,6 +267,7 @@ QStringList RoutePlanning::getBicyclingRoute(QString origin, QString destination
netManager = nullptr;
}
bicyclingInfo.append("Error");
bicyclingInfo.append("Error");
bicyclingInfo.append("Error");
return bicyclingInfo;

@ -6,7 +6,89 @@ ShowRouteInfoWidget::ShowRouteInfoWidget(QWidget *parent) :
ui(new Ui::ShowRouteInfoWidget)
{
ui->setupUi(this);
verLayout = new QVBoxLayout();
setLayout(verLayout);
routeToShow = new Route();
}
void ShowRouteInfoWidget::initWidget()
{
initInfoWidget();
int i;
routeNameLabel = new QLabel("路线名称:");
nameLabel = new QLabel(routeToShow->getRouteName());
nameLine = new QHBoxLayout();
nameLine->addWidget(routeNameLabel);
nameLine->addWidget(nameLabel);
verLayout->addLayout(nameLine);
for (i = 0;i < size;i++) {
lineList[2*i] = new QHBoxLayout();
lineList[2*i]->addWidget(placeLabelList[i]);
lineList[2*i]->addWidget(startTimeLabelList[i]);
lineList[2*i]->addWidget(endTimeLabelList[i]);
verLayout->addLayout(lineList[2*i]);
if(i != size - 1)
{
lineList[2*i+1] = new QHBoxLayout();
lineList[2*i+1]->addWidget(trafficLabelList[i]);
lineList[2*i+1]->addWidget(descriptionLabelList[i]);
lineList[2*i+1]->addWidget(distanceLabelList[i]);
lineList[2*i+1]->addWidget(timeCostLabelList[i]);
verLayout->addLayout(lineList[2*i+1]);
}
}
}
void ShowRouteInfoWidget::initInfoWidget()
{
initInfo();
routeItems = routeToShow->getAllItems();
int i = 0;
while(routeItems->next != NULL)
{
routeItems=routeItems->next;
placeLabelList[i] = new QLabel(routeItems->placeName);
startTimeLabelList[i] = new QLabel(routeItems->startTime.toString());
endTimeLabelList[i] = new QLabel(routeItems->endTime.toString());
if(i != size-1)
{
trafficLabelList[i] = new QLabel(routeItems->traffic);
descriptionLabelList[i] = new QLabel(routeItems->description);
distanceLabelList[i] = new QLabel("距离:"+QString::number(routeItems->distance));
timeCostLabelList[i] = new QLabel("时间:"+QString::number(routeItems->timeCost));
}
i++;
}
}
void ShowRouteInfoWidget::initInfo()
{
size = routeToShow->getLength();
placeLabelList = (QLabel ** )malloc(sizeof (QLabel *) * size);
startTimeLabelList = (QLabel ** )malloc(sizeof (QLabel *) * size);
endTimeLabelList = (QLabel **)malloc(sizeof (QLabel *) * size);
trafficLabelList = (QLabel **)malloc(sizeof (QLabel *) * (size - 1));
descriptionLabelList = (QLabel **)malloc(sizeof (QLabel *) * (size - 1));
distanceLabelList = (QLabel **)malloc(sizeof (QLabel *) * (size - 1));
timeCostLabelList = (QLabel **)malloc(sizeof (QLabel *) * (size - 1));
lineList = (QHBoxLayout **)malloc(sizeof (QHBoxLayout *) * (2 * size - 1));
}
//路线用指针
void ShowRouteInfoWidget::setRouteToShow(Route *route)
{
this->routeToShow = route;
}
Route * ShowRouteInfoWidget::getRouteToShow()
{
return this->routeToShow;
}
ShowRouteInfoWidget::~ShowRouteInfoWidget()
{

@ -2,6 +2,15 @@
#define SHOWROUTEINFOWIDGET_H
#include <QWidget>
#include "route.h"
#include <QWidget>
#include <QLabel>
#include <QComboBox>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QMessageBox>
#include <route.h>
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
@ -18,9 +27,30 @@ class ShowRouteInfoWidget : public QWidget
public:
explicit ShowRouteInfoWidget(QWidget *parent = nullptr);
~ShowRouteInfoWidget();
void initInfo();
void initWidget();
void initInfoWidget();
void setRouteToShow(Route * route);
Route * getRouteToShow();
private:
Ui::ShowRouteInfoWidget *ui;
Route * routeToShow;
int size;
QLabel * routeNameLabel;
QLabel * nameLabel;
QHBoxLayout * nameLine;
RouteItem * routeItems;
QLabel ** placeLabelList;
QLabel ** startTimeLabelList;
QLabel ** descriptionLabelList;
QLabel ** distanceLabelList;
QLabel ** timeCostLabelList;
QLabel ** endTimeLabelList;
QLabel ** labelList;//显示序号
QHBoxLayout ** lineList;
QVBoxLayout * verLayout;
QLabel ** trafficLabelList;
};
#endif // SHOWROUTEINFOWIDGET_H

Loading…
Cancel
Save