| @@ -40,7 +40,8 @@ HEADERS += \ | |||||
| Sources/LogsSorterConfigData.h \ | Sources/LogsSorterConfigData.h \ | ||||
| Sources/Gui/ConfigPage.h \ | Sources/Gui/ConfigPage.h \ | ||||
| Sources/Gui/StatusWindow.h \ | Sources/Gui/StatusWindow.h \ | ||||
| Sources/LogsHandler.h | |||||
| Sources/LogsHandler.h \ | |||||
| Sources/defines.h | |||||
| FORMS += \ | FORMS += \ | ||||
| Sources/Gui/MainWindow.ui \ | Sources/Gui/MainWindow.ui \ | ||||
| @@ -0,0 +1,318 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE QtCreatorProject> | |||||
| <!-- Written by QtCreator 4.2.1, 2023-04-14T13:40:41. --> | |||||
| <qtcreator> | |||||
| <data> | |||||
| <variable>EnvironmentId</variable> | |||||
| <value type="QByteArray">{49dba0cf-bcb2-4719-a5e3-f633e3e28161}</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"/> | |||||
| </data> | |||||
| <data> | |||||
| <variable>ProjectExplorer.Project.Target.0</variable> | |||||
| <valuemap type="QVariantMap"> | |||||
| <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">QT 5.14.2</value> | |||||
| <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QT 5.14.2</value> | |||||
| <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{894798a9-78b3-4123-aa44-c90339d460a9}</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">D:/Main/Dev/LogsValet</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">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.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="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="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"></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> | |||||
| <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |||||
| <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Main/Dev/LogsValet</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="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.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="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="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> | |||||
| <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2"> | |||||
| <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Main/Dev/build-LogsValet-QT_5_14_2-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.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">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">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="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="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">Profile</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">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"></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"> | |||||
| <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="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">LogsValet</value> | |||||
| <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||||
| <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Main/Dev/LogsValet/LogsValet.pro</value> | |||||
| <value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value> | |||||
| <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |||||
| <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">LogsValet.pro</value> | |||||
| <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |||||
| <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |||||
| <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">D:/Main/Dev/LogsValet</value> | |||||
| <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |||||
| <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | |||||
| <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">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> | |||||
| </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">18</value> | |||||
| </data> | |||||
| <data> | |||||
| <variable>Version</variable> | |||||
| <value type="int">18</value> | |||||
| </data> | |||||
| </qtcreator> | |||||
| @@ -26,11 +26,14 @@ CConfigPage::CConfigPage(QWidget *parent) : | |||||
| ui->mConfigTable->setSelectionBehavior(QAbstractItemView::SelectRows); | ui->mConfigTable->setSelectionBehavior(QAbstractItemView::SelectRows); | ||||
| ui->mConfigTable->setRowCount(0); | ui->mConfigTable->setRowCount(0); | ||||
| ui->mConfigTable->setSortingEnabled(true); | |||||
| connect(ui->mAddFilterBtn,&QPushButton::pressed,this,&CConfigPage::AddFilterBtnPressed); | connect(ui->mAddFilterBtn,&QPushButton::pressed,this,&CConfigPage::AddFilterBtnPressed); | ||||
| connect(ui->mDeleteFilterBtn,&QPushButton::pressed,this,&CConfigPage::DeleteFilterBtnPressed); | connect(ui->mDeleteFilterBtn,&QPushButton::pressed,this,&CConfigPage::DeleteFilterBtnPressed); | ||||
| connect(ui->mSaveBtn,&QPushButton::pressed,this,&CConfigPage::SaveConfigBtnPressed); | connect(ui->mSaveBtn,&QPushButton::pressed,this,&CConfigPage::SaveConfigBtnPressed); | ||||
| connect(ui->mCancelBtn,&QPushButton::pressed,this,&CConfigPage::CancelBtnPressed); | connect(ui->mCancelBtn,&QPushButton::pressed,this,&CConfigPage::CancelBtnPressed); | ||||
| connect(ui->mCopyFilterBtn,&QPushButton::pressed,this,&CConfigPage::CopyFilterBtnPressed); | |||||
| } | } | ||||
| CConfigPage::~CConfigPage() | CConfigPage::~CConfigPage() | ||||
| @@ -40,6 +43,7 @@ CConfigPage::~CConfigPage() | |||||
| void CConfigPage::AddFilterBtnPressed() | void CConfigPage::AddFilterBtnPressed() | ||||
| { | { | ||||
| ui->mConfigTable->setSortingEnabled(false); | |||||
| ui->mConfigTable->insertRow(0); | ui->mConfigTable->insertRow(0); | ||||
| QTableWidgetItem *NewItem; | QTableWidgetItem *NewItem; | ||||
| @@ -53,6 +57,7 @@ void CConfigPage::AddFilterBtnPressed() | |||||
| ui->mConfigTable->setItem(0,3,NewItem); | ui->mConfigTable->setItem(0,3,NewItem); | ||||
| NewItem = new QTableWidgetItem(""); | NewItem = new QTableWidgetItem(""); | ||||
| ui->mConfigTable->setItem(0,4,NewItem); | ui->mConfigTable->setItem(0,4,NewItem); | ||||
| ui->mConfigTable->setSortingEnabled(true); | |||||
| } | } | ||||
| void CConfigPage::DeleteFilterBtnPressed() | void CConfigPage::DeleteFilterBtnPressed() | ||||
| @@ -110,6 +115,7 @@ void CConfigPage::SaveConfigBtnPressed() | |||||
| void CConfigPage::InitializeConfigData(const CLogsSorterConfigData *DataStruct) | void CConfigPage::InitializeConfigData(const CLogsSorterConfigData *DataStruct) | ||||
| { | { | ||||
| ui->mConfigTable->clearContents(); | ui->mConfigTable->clearContents(); | ||||
| ui->mConfigTable->setSortingEnabled(false); | |||||
| ui->mSrcDirLineEdit->setText(DataStruct->mLogsSourceDirectory); | ui->mSrcDirLineEdit->setText(DataStruct->mLogsSourceDirectory); | ||||
| ui->mConfigTable->setRowCount(DataStruct->mLogsFiltersList.size()); | ui->mConfigTable->setRowCount(DataStruct->mLogsFiltersList.size()); | ||||
| @@ -140,5 +146,28 @@ void CConfigPage::InitializeConfigData(const CLogsSorterConfigData *DataStruct) | |||||
| } | } | ||||
| ui->mConfigTable->resizeColumnsToContents(); | ui->mConfigTable->resizeColumnsToContents(); | ||||
| ui->mConfigTable->setSortingEnabled(true); | |||||
| } | } | ||||
| void CConfigPage::CopyFilterBtnPressed() | |||||
| { | |||||
| ui->mConfigTable->setSortingEnabled(false); | |||||
| ui->mConfigTable->insertRow(0); | |||||
| int row = ui->mConfigTable->currentRow(); | |||||
| QTableWidgetItem *NewItem; | |||||
| NewItem = new QTableWidgetItem(*ui->mConfigTable->item(row,0)); | |||||
| ui->mConfigTable->setItem(0,0,NewItem); | |||||
| NewItem = new QTableWidgetItem(*ui->mConfigTable->item(row,1)); | |||||
| ui->mConfigTable->setItem(0,1,NewItem); | |||||
| NewItem = new QTableWidgetItem(*ui->mConfigTable->item(row,2)); | |||||
| ui->mConfigTable->setItem(0,2,NewItem); | |||||
| NewItem = new QTableWidgetItem(*ui->mConfigTable->item(row,3)); | |||||
| ui->mConfigTable->setItem(0,3,NewItem); | |||||
| NewItem = new QTableWidgetItem(*ui->mConfigTable->item(row,4)); | |||||
| ui->mConfigTable->setItem(0,4,NewItem); | |||||
| ui->mConfigTable->setSortingEnabled(true); | |||||
| } | |||||
| @@ -31,6 +31,7 @@ public slots: | |||||
| void DeleteFilterBtnPressed(); | void DeleteFilterBtnPressed(); | ||||
| void CancelBtnPressed(); | void CancelBtnPressed(); | ||||
| void SaveConfigBtnPressed(); | void SaveConfigBtnPressed(); | ||||
| void CopyFilterBtnPressed(); | |||||
| }; | }; | ||||
| #endif // CONFIGPAGE_H | #endif // CONFIGPAGE_H | ||||
| @@ -119,6 +119,19 @@ | |||||
| <string>Supprimer</string> | <string>Supprimer</string> | ||||
| </property> | </property> | ||||
| </widget> | </widget> | ||||
| <widget class="QPushButton" name="mCopyFilterBtn"> | |||||
| <property name="geometry"> | |||||
| <rect> | |||||
| <x>830</x> | |||||
| <y>230</y> | |||||
| <width>81</width> | |||||
| <height>22</height> | |||||
| </rect> | |||||
| </property> | |||||
| <property name="text"> | |||||
| <string>Copier</string> | |||||
| </property> | |||||
| </widget> | |||||
| </widget> | </widget> | ||||
| <resources/> | <resources/> | ||||
| <connections/> | <connections/> | ||||
| @@ -1,14 +1,99 @@ | |||||
| #include "StatusWindow.h" | #include "StatusWindow.h" | ||||
| #include "ui_StatusWindow.h" | #include "ui_StatusWindow.h" | ||||
| #include <QScrollBar> | |||||
| #include <QDateTime> | |||||
| #include "defines.h" | |||||
| #include "LogsSorter.h" | |||||
| CStatusWindow::CStatusWindow(QWidget *parent) : | CStatusWindow::CStatusWindow(QWidget *parent) : | ||||
| QWidget(parent), | QWidget(parent), | ||||
| ui(new Ui::CStatusWindow) | ui(new Ui::CStatusWindow) | ||||
| { | { | ||||
| ui->setupUi(this); | ui->setupUi(this); | ||||
| setAutoFillBackground(true); | |||||
| mProgramPtr = 0; | |||||
| connect(ui->mForceScanBtn,&QPushButton::pressed,this,&CStatusWindow::ManualScanBtnPressed); | |||||
| } | } | ||||
| CStatusWindow::~CStatusWindow() | CStatusWindow::~CStatusWindow() | ||||
| { | { | ||||
| delete ui; | delete ui; | ||||
| } | } | ||||
| int CStatusWindow::AddGeneralMsgBoxLineEntry(QString NewLine, QColor Color) | |||||
| { | |||||
| NewLine.remove('\n'); | |||||
| NewLine.remove('\r'); | |||||
| NewLine.append('\n'); | |||||
| NewLine.prepend(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss - ")); | |||||
| AddColoredLineToGenMsgBox(NewLine,Color); | |||||
| //Limit the number of lines in the MsgBox to avoid overruns... | |||||
| // if(mGenMsgListBoxTextLines.size() >= GENERAL_MESSAGES_MAX_LOG_LINES) | |||||
| // { | |||||
| // mGenMsgListBoxTextLines.removeFirst(); | |||||
| // mGenMsgListBoxTextLines.append(NewLine); | |||||
| // ui->mMsgTxtEditBox->clear(); | |||||
| // for(int i = 0; i < mGenMsgListBoxTextLines.size(); i++) | |||||
| // { | |||||
| // AddColoredLineToGenMsgBox(mGenMsgListBoxTextLines[i],Color); | |||||
| // } | |||||
| // } | |||||
| // else | |||||
| // { | |||||
| // mGenMsgListBoxTextLines.append(NewLine); | |||||
| // AddColoredLineToGenMsgBox(NewLine,Color); | |||||
| // } | |||||
| ui->mMsgTxtEditBox->verticalScrollBar()->setValue(ui->mMsgTxtEditBox->verticalScrollBar()->maximum()); | |||||
| return RET_OK; | |||||
| } | |||||
| int CStatusWindow::AddColoredLineToGenMsgBox(QString Line, QColor Color) | |||||
| { | |||||
| if(Line.isEmpty()) | |||||
| { | |||||
| return RET_GENERAL_ERROR; | |||||
| } | |||||
| // if(Line.at(0) == QChar('%')) | |||||
| // { | |||||
| // if(Line.at(1) == QChar('E')) //The line is describing an error... write it red | |||||
| // { | |||||
| // ui->mMsgTxtEditBox->setTextColor(Qt::red); | |||||
| // } | |||||
| // else if(Line.at(1) == QChar('W')) //The line is describing a warning... write it yellow | |||||
| // { | |||||
| // ui->mMsgTxtEditBox->setTextColor(Qt::blue); | |||||
| // } | |||||
| // else if(Line.at(1) == QChar('S')) //The line is describing a warning... write it yellow | |||||
| // { | |||||
| // ui->mMsgTxtEditBox->setTextColor(Qt::darkGreen); | |||||
| // } | |||||
| // else | |||||
| // { | |||||
| // qDebug("GeneralStatusPage: Logic error in general message box line encoding... you should check into that"); | |||||
| // return RET_GENERAL_ERROR; | |||||
| // } | |||||
| // Line.remove(0,2); | |||||
| // } | |||||
| ui->mMsgTxtEditBox->setTextColor(Color); | |||||
| ui->mMsgTxtEditBox->insertPlainText(Line); | |||||
| ui->mMsgTxtEditBox->setTextColor(Qt::black); | |||||
| return RET_OK; | |||||
| } | |||||
| void CStatusWindow::ManualScanBtnPressed() | |||||
| { | |||||
| AddGeneralMsgBoxLineEntry("Lancement d'un scan manuel",Qt::darkBlue); | |||||
| mProgramPtr->LauchManualScanRequest(); | |||||
| } | |||||
| @@ -2,11 +2,17 @@ | |||||
| #define STATUSWINDOW_H | #define STATUSWINDOW_H | ||||
| #include <QWidget> | #include <QWidget> | ||||
| #include <QStringList> | |||||
| //#define GENERAL_MESSAGES_MAX_LOG_LINES 5000 | |||||
| namespace Ui { | namespace Ui { | ||||
| class CStatusWindow; | class CStatusWindow; | ||||
| } | } | ||||
| class CLogsSorter; | |||||
| class CStatusWindow : public QWidget | class CStatusWindow : public QWidget | ||||
| { | { | ||||
| Q_OBJECT | Q_OBJECT | ||||
| @@ -14,6 +20,16 @@ class CStatusWindow : public QWidget | |||||
| public: | public: | ||||
| explicit CStatusWindow(QWidget *parent = 0); | explicit CStatusWindow(QWidget *parent = 0); | ||||
| ~CStatusWindow(); | ~CStatusWindow(); | ||||
| CLogsSorter *mProgramPtr; | |||||
| int AddGeneralMsgBoxLineEntry(QString NewLine,QColor Color); | |||||
| int AddColoredLineToGenMsgBox(QString Line,QColor Color); | |||||
| int AddLineToGenMsgBox(QString Line); | |||||
| QStringList mGenMsgListBoxTextLines; | |||||
| public slots: | |||||
| void ManualScanBtnPressed(); | |||||
| private: | private: | ||||
| Ui::CStatusWindow *ui; | Ui::CStatusWindow *ui; | ||||
| @@ -1,21 +1,42 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <ui version="4.0"> | <ui version="4.0"> | ||||
| <author/> | |||||
| <comment/> | |||||
| <exportmacro/> | |||||
| <class>CStatusWindow</class> | <class>CStatusWindow</class> | ||||
| <widget class="QWidget" name="CStatusWindow"> | <widget class="QWidget" name="CStatusWindow"> | ||||
| <property name="geometry"> | <property name="geometry"> | ||||
| <rect> | <rect> | ||||
| <x>0</x> | <x>0</x> | ||||
| <y>0</y> | <y>0</y> | ||||
| <width>400</width> | |||||
| <height>300</height> | |||||
| <width>1592</width> | |||||
| <height>670</height> | |||||
| </rect> | </rect> | ||||
| </property> | </property> | ||||
| <property name="windowTitle"> | <property name="windowTitle"> | ||||
| <string>Form</string> | <string>Form</string> | ||||
| </property> | </property> | ||||
| <widget class="QTextEdit" name="mMsgTxtEditBox"> | |||||
| <property name="geometry"> | |||||
| <rect> | |||||
| <x>150</x> | |||||
| <y>60</y> | |||||
| <width>1411</width> | |||||
| <height>571</height> | |||||
| </rect> | |||||
| </property> | |||||
| </widget> | |||||
| <widget class="QPushButton" name="mForceScanBtn"> | |||||
| <property name="geometry"> | |||||
| <rect> | |||||
| <x>30</x> | |||||
| <y>60</y> | |||||
| <width>80</width> | |||||
| <height>22</height> | |||||
| </rect> | |||||
| </property> | |||||
| <property name="text"> | |||||
| <string>Forcer scan</string> | |||||
| </property> | |||||
| </widget> | |||||
| </widget> | </widget> | ||||
| <pixmapfunction/> | |||||
| <resources/> | |||||
| <connections/> | <connections/> | ||||
| </ui> | </ui> | ||||
| @@ -30,26 +30,32 @@ int CLogsHandler::SetSortingConfigData(CLogsSorterConfigData *ConfigData) | |||||
| if(QDir(ConfigData->mLogsSourceDirectory).exists()) | if(QDir(ConfigData->mLogsSourceDirectory).exists()) | ||||
| { | { | ||||
| mLogsWatcher->addPath(ConfigData->mLogsSourceDirectory); | mLogsWatcher->addPath(ConfigData->mLogsSourceDirectory); | ||||
| QString msg = QString("Le répertoire source %1 sous surveillance").arg(ConfigData->mLogsSourceDirectory); | |||||
| QString msg = QString("La surveillance est débutée pour le répertoire source %1").arg(ConfigData->mLogsSourceDirectory); | |||||
| qDebug(qPrintable(msg)); | qDebug(qPrintable(msg)); | ||||
| mProgramPtr->AddGeneralMsgTextRequest(msg,Qt::darkGreen); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| QString msg = QString("Erreur, le répertoire source %1 n'existe pas").arg(ConfigData->mLogsSourceDirectory); | QString msg = QString("Erreur, le répertoire source %1 n'existe pas").arg(ConfigData->mLogsSourceDirectory); | ||||
| } | } | ||||
| return 0; | |||||
| return RET_OK; | |||||
| } | } | ||||
| int CLogsHandler::StartLogHandling() | int CLogsHandler::StartLogHandling() | ||||
| { | { | ||||
| mHandlerRunning = true; | mHandlerRunning = true; | ||||
| return 0; | |||||
| return RET_OK; | |||||
| } | } | ||||
| int CLogsHandler::StopLogHandling() | int CLogsHandler::StopLogHandling() | ||||
| { | { | ||||
| mHandlerRunning = false; | mHandlerRunning = false; | ||||
| return 0; | |||||
| return RET_OK; | |||||
| } | |||||
| int CLogsHandler::ParseWatchedDirectory() | |||||
| { | |||||
| return ParseWatchedDirectory(mSortingConfigData->mLogsSourceDirectory); | |||||
| } | } | ||||
| void CLogsHandler::WatchedDirectoryChanged(QString Path) | void CLogsHandler::WatchedDirectoryChanged(QString Path) | ||||
| @@ -91,20 +97,28 @@ int CLogsHandler::ParseWatchedDirectory(QString Path) | |||||
| if(QFile::copy(LogFiles.at(i).absoluteFilePath(),FullDestinationPath)) | if(QFile::copy(LogFiles.at(i).absoluteFilePath(),FullDestinationPath)) | ||||
| { | { | ||||
| qDebug("Fichier %s copié vers %s",qPrintable(LogFiles.at(i).absoluteFilePath()),qPrintable(FullDestinationPath)); | |||||
| QString msg = QString("Fichier %1 copié vers %2").arg(LogFiles.at(i).absoluteFilePath()).arg(FullDestinationPath); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| qDebug("Impossible de copier %s vers %s",qPrintable(LogFiles.at(i).absoluteFilePath()),qPrintable(FullDestinationPath)); | |||||
| QString msg = QString("Impossible de copier %1 vers %2 (le fichier existe-t-il déjà ???)").arg(LogFiles.at(i).absoluteFilePath()).arg(FullDestinationPath); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg,Qt::red); | |||||
| } | } | ||||
| if(QFile::remove(LogFiles.at(i).absoluteFilePath())) | if(QFile::remove(LogFiles.at(i).absoluteFilePath())) | ||||
| { | { | ||||
| qDebug("Fichier %s effacé",qPrintable(LogFiles.at(i).absoluteFilePath())); | |||||
| QString msg = QString("Fichier %1 effacé").arg(LogFiles.at(i).absoluteFilePath()); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| qDebug("Impossible d'effacer %s",qPrintable(LogFiles.at(i).absoluteFilePath())); | |||||
| QString msg = QString("Impossible d'effacer le fichier %1").arg(LogFiles.at(i).absoluteFilePath()); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg,Qt::red); | |||||
| } | } | ||||
| } | } | ||||
| @@ -112,11 +126,15 @@ int CLogsHandler::ParseWatchedDirectory(QString Path) | |||||
| { | { | ||||
| if(QFile::remove(LogFiles.at(i).absoluteFilePath())) | if(QFile::remove(LogFiles.at(i).absoluteFilePath())) | ||||
| { | { | ||||
| qDebug("Fichier %s effacé",qPrintable(LogFiles.at(i).absoluteFilePath())); | |||||
| QString msg = QString("Fichier %1 effacé").arg(LogFiles.at(i).absoluteFilePath()); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| qDebug("Impossible d'effacer %s",qPrintable(LogFiles.at(i).absoluteFilePath())); | |||||
| QString msg = QString("Impossible d'effacer le fichier %1").arg(LogFiles.at(i).absoluteFilePath()); | |||||
| qDebug(qPrintable(msg)); | |||||
| mProgramPtr->AddGeneralMsgTextRequest(msg); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -126,5 +144,5 @@ int CLogsHandler::ParseWatchedDirectory(QString Path) | |||||
| return 0; | |||||
| return RET_OK; | |||||
| } | } | ||||
| @@ -19,6 +19,7 @@ public: | |||||
| int StopLogHandling(); | int StopLogHandling(); | ||||
| bool mHandlerRunning; | bool mHandlerRunning; | ||||
| int ParseWatchedDirectory(QString Path); | int ParseWatchedDirectory(QString Path); | ||||
| int ParseWatchedDirectory(); | |||||
| CLogsSorter *mProgramPtr; | CLogsSorter *mProgramPtr; | ||||
| const CLogsSorterConfigData *mSortingConfigData; | const CLogsSorterConfigData *mSortingConfigData; | ||||
| @@ -7,24 +7,49 @@ CLogsSorter::CLogsSorter() : QObject() | |||||
| int CLogsSorter::InitLogsSorter() | int CLogsSorter::InitLogsSorter() | ||||
| { | { | ||||
| mMainWindow.show(); | |||||
| mMainWindow.mConfigPage->mProgramPtr = this; | mMainWindow.mConfigPage->mProgramPtr = this; | ||||
| mSorterConfig.LoadLogsSorterConfig(".\\Config.bin"); | |||||
| mMainWindow.mStatusPage->mProgramPtr = this; | |||||
| mSorterConfig.mProgramHandle = this; | |||||
| mMainWindow.show(); | |||||
| AddGeneralMsgTextRequest("Démarrage de l'application"); | |||||
| if(mSorterConfig.LoadLogsSorterConfig(".\\Config.bin") != RET_OK) | |||||
| { | |||||
| AddGeneralMsgTextRequest("Échec du chargement de la configuration"); | |||||
| } | |||||
| else | |||||
| { | |||||
| AddGeneralMsgTextRequest("Configuration chargée avec succès"); | |||||
| } | |||||
| mMainWindow.mConfigPage->InitializeConfigData(&mSorterConfig.mLogsSorterConfig); | mMainWindow.mConfigPage->InitializeConfigData(&mSorterConfig.mLogsSorterConfig); | ||||
| mLogsHandler.mProgramPtr = this; | mLogsHandler.mProgramPtr = this; | ||||
| mLogsHandler.SetSortingConfigData(&mSorterConfig.mLogsSorterConfig); | mLogsHandler.SetSortingConfigData(&mSorterConfig.mLogsSorterConfig); | ||||
| return RET_OK; | |||||
| } | } | ||||
| int CLogsSorter::SaveSorterConfigRequest(CLogsSorterConfigData NewConfig) | int CLogsSorter::SaveSorterConfigRequest(CLogsSorterConfigData NewConfig) | ||||
| { | { | ||||
| mSorterConfig.SetNewConfig(NewConfig); | mSorterConfig.SetNewConfig(NewConfig); | ||||
| return 0; | |||||
| return RET_OK; | |||||
| } | } | ||||
| CLogsSorterConfigData *CLogsSorter::GetSorterConfigRequest() | CLogsSorterConfigData *CLogsSorter::GetSorterConfigRequest() | ||||
| { | { | ||||
| return &mSorterConfig.mLogsSorterConfig; | return &mSorterConfig.mLogsSorterConfig; | ||||
| } | } | ||||
| int CLogsSorter::AddGeneralMsgTextRequest(QString NewLine, QColor Color) | |||||
| { | |||||
| mMainWindow.mStatusPage->AddGeneralMsgBoxLineEntry(NewLine,Color); | |||||
| return RET_OK; | |||||
| } | |||||
| int CLogsSorter::LauchManualScanRequest() | |||||
| { | |||||
| return mLogsHandler.ParseWatchedDirectory(); | |||||
| } | |||||
| @@ -6,6 +6,7 @@ | |||||
| #include "LogsSorterConfig.h" | #include "LogsSorterConfig.h" | ||||
| #include "MainWindow.h" | #include "MainWindow.h" | ||||
| #include "LogsHandler.h" | #include "LogsHandler.h" | ||||
| #include "defines.h" | |||||
| class CLogsSorter : public QObject | class CLogsSorter : public QObject | ||||
| { | { | ||||
| @@ -15,6 +16,8 @@ public: | |||||
| int InitLogsSorter(); | int InitLogsSorter(); | ||||
| int SaveSorterConfigRequest(CLogsSorterConfigData NewConfig); | int SaveSorterConfigRequest(CLogsSorterConfigData NewConfig); | ||||
| CLogsSorterConfigData * GetSorterConfigRequest(); | CLogsSorterConfigData * GetSorterConfigRequest(); | ||||
| int AddGeneralMsgTextRequest(QString NewLine, QColor Color = Qt::black); | |||||
| int LauchManualScanRequest(); | |||||
| CMainWindow mMainWindow; | CMainWindow mMainWindow; | ||||
| @@ -1,10 +1,12 @@ | |||||
| #include "LogsSorterConfig.h" | #include "LogsSorterConfig.h" | ||||
| #include <QFile> | #include <QFile> | ||||
| #include <QDataStream> | #include <QDataStream> | ||||
| #include "LogsSorter.h" | |||||
| CLogsSorterConfig::CLogsSorterConfig() | CLogsSorterConfig::CLogsSorterConfig() | ||||
| { | { | ||||
| mIsConfigLoaded = false; | mIsConfigLoaded = false; | ||||
| mProgramHandle = 0; | |||||
| } | } | ||||
| @@ -19,11 +21,13 @@ DESTINATION="D:\Main\Fichiers\JOB\LogsDump\ZT Angrignon" | |||||
| int CLogsSorterConfig::LoadLogsSorterConfig(QString ConfigFileName) | int CLogsSorterConfig::LoadLogsSorterConfig(QString ConfigFileName) | ||||
| { | { | ||||
| mProgramHandle->AddGeneralMsgTextRequest("Chargement des filtres"); | |||||
| QFile *ConfigFile = new QFile(ConfigFileName); | QFile *ConfigFile = new QFile(ConfigFileName); | ||||
| if (!ConfigFile->open(QIODevice::ReadOnly | QIODevice::Text)) | if (!ConfigFile->open(QIODevice::ReadOnly | QIODevice::Text)) | ||||
| { | { | ||||
| delete ConfigFile; | delete ConfigFile; | ||||
| return 1; | |||||
| return RET_GENERAL_ERROR; | |||||
| } | } | ||||
| mLogsSorterConfig.mLogsFiltersList.clear(); | mLogsSorterConfig.mLogsFiltersList.clear(); | ||||
| @@ -45,7 +49,7 @@ int CLogsSorterConfig::LoadLogsSorterConfig(QString ConfigFileName) | |||||
| delete ConfigFile; | delete ConfigFile; | ||||
| delete OutputStream; | delete OutputStream; | ||||
| return 0; | |||||
| return RET_OK; | |||||
| // bool finished = false; | // bool finished = false; | ||||
| @@ -112,7 +116,7 @@ int CLogsSorterConfig::SetNewConfig(CLogsSorterConfigData NewConfig) | |||||
| mLogsSorterConfig = NewConfig; | mLogsSorterConfig = NewConfig; | ||||
| SaveConfigToFile(".\\Config.bin"); | SaveConfigToFile(".\\Config.bin"); | ||||
| return 0; | |||||
| return RET_OK; | |||||
| } | } | ||||
| int CLogsSorterConfig::SaveConfigToFile(QString ConfigFileName) | int CLogsSorterConfig::SaveConfigToFile(QString ConfigFileName) | ||||
| @@ -121,7 +125,7 @@ int CLogsSorterConfig::SaveConfigToFile(QString ConfigFileName) | |||||
| if (!ConfigFile->open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Unbuffered)) | if (!ConfigFile->open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Unbuffered)) | ||||
| { | { | ||||
| delete ConfigFile; | delete ConfigFile; | ||||
| return 1; | |||||
| return RET_GENERAL_ERROR; | |||||
| } | } | ||||
| QDataStream * OutputStream = new QDataStream(ConfigFile); | QDataStream * OutputStream = new QDataStream(ConfigFile); | ||||
| @@ -137,6 +141,8 @@ int CLogsSorterConfig::SaveConfigToFile(QString ConfigFileName) | |||||
| delete ConfigFile; | delete ConfigFile; | ||||
| delete OutputStream; | delete OutputStream; | ||||
| mProgramHandle->AddGeneralMsgTextRequest("Configuration des filtres sauvée avec succès"); | |||||
| } | } | ||||
| @@ -3,6 +3,8 @@ | |||||
| #include <QString> | #include <QString> | ||||
| #include "LogsSorterConfigData.h" | #include "LogsSorterConfigData.h" | ||||
| class CLogsSorter; | |||||
| class CLogsSorterConfig | class CLogsSorterConfig | ||||
| { | { | ||||
| public: | public: | ||||
| @@ -13,6 +15,7 @@ public: | |||||
| bool mIsConfigLoaded; | bool mIsConfigLoaded; | ||||
| CLogsSorterConfigData mLogsSorterConfig; | CLogsSorterConfigData mLogsSorterConfig; | ||||
| CLogsSorter *mProgramHandle; | |||||
| }; | }; | ||||
| @@ -0,0 +1,25 @@ | |||||
| #ifndef DEFINES_H | |||||
| #define DEFINES_H | |||||
| #define GENERAL_MESSAGES_MAX_LOG_LINES 5000 //The number of lines of general status log we keep in the general status window (avoids fucking up because you know.... RAM) | |||||
| enum eOtarcikGeneralReturns | |||||
| { | |||||
| RET_OK = 0, | |||||
| RET_GENERAL_ERROR, | |||||
| RET_MAX_ERROR | |||||
| }; | |||||
| #endif // DEFINES_H | |||||
| @@ -31,6 +31,7 @@ public: | |||||
| QPushButton *mCancelBtn; | QPushButton *mCancelBtn; | ||||
| QPushButton *mAddFilterBtn; | QPushButton *mAddFilterBtn; | ||||
| QPushButton *mDeleteFilterBtn; | QPushButton *mDeleteFilterBtn; | ||||
| QPushButton *mCopyFilterBtn; | |||||
| void setupUi(QDialog *CConfigPage) | void setupUi(QDialog *CConfigPage) | ||||
| { | { | ||||
| @@ -65,6 +66,9 @@ public: | |||||
| mDeleteFilterBtn = new QPushButton(CConfigPage); | mDeleteFilterBtn = new QPushButton(CConfigPage); | ||||
| mDeleteFilterBtn->setObjectName(QString::fromUtf8("mDeleteFilterBtn")); | mDeleteFilterBtn->setObjectName(QString::fromUtf8("mDeleteFilterBtn")); | ||||
| mDeleteFilterBtn->setGeometry(QRect(830, 190, 81, 22)); | mDeleteFilterBtn->setGeometry(QRect(830, 190, 81, 22)); | ||||
| mCopyFilterBtn = new QPushButton(CConfigPage); | |||||
| mCopyFilterBtn->setObjectName(QString::fromUtf8("mCopyFilterBtn")); | |||||
| mCopyFilterBtn->setGeometry(QRect(830, 230, 81, 22)); | |||||
| retranslateUi(CConfigPage); | retranslateUi(CConfigPage); | ||||
| @@ -80,6 +84,7 @@ public: | |||||
| mCancelBtn->setText(QCoreApplication::translate("CConfigPage", "Annuler", nullptr)); | mCancelBtn->setText(QCoreApplication::translate("CConfigPage", "Annuler", nullptr)); | ||||
| mAddFilterBtn->setText(QCoreApplication::translate("CConfigPage", "Ajouter Filtre", nullptr)); | mAddFilterBtn->setText(QCoreApplication::translate("CConfigPage", "Ajouter Filtre", nullptr)); | ||||
| mDeleteFilterBtn->setText(QCoreApplication::translate("CConfigPage", "Supprimer", nullptr)); | mDeleteFilterBtn->setText(QCoreApplication::translate("CConfigPage", "Supprimer", nullptr)); | ||||
| mCopyFilterBtn->setText(QCoreApplication::translate("CConfigPage", "Copier", nullptr)); | |||||
| } // retranslateUi | } // retranslateUi | ||||
| }; | }; | ||||
| @@ -11,6 +11,8 @@ | |||||
| #include <QtCore/QVariant> | #include <QtCore/QVariant> | ||||
| #include <QtWidgets/QApplication> | #include <QtWidgets/QApplication> | ||||
| #include <QtWidgets/QPushButton> | |||||
| #include <QtWidgets/QTextEdit> | |||||
| #include <QtWidgets/QWidget> | #include <QtWidgets/QWidget> | ||||
| QT_BEGIN_NAMESPACE | QT_BEGIN_NAMESPACE | ||||
| @@ -18,12 +20,20 @@ QT_BEGIN_NAMESPACE | |||||
| class Ui_CStatusWindow | class Ui_CStatusWindow | ||||
| { | { | ||||
| public: | public: | ||||
| QTextEdit *mMsgTxtEditBox; | |||||
| QPushButton *mForceScanBtn; | |||||
| void setupUi(QWidget *CStatusWindow) | void setupUi(QWidget *CStatusWindow) | ||||
| { | { | ||||
| if (CStatusWindow->objectName().isEmpty()) | if (CStatusWindow->objectName().isEmpty()) | ||||
| CStatusWindow->setObjectName(QString::fromUtf8("CStatusWindow")); | CStatusWindow->setObjectName(QString::fromUtf8("CStatusWindow")); | ||||
| CStatusWindow->resize(400, 300); | |||||
| CStatusWindow->resize(1592, 670); | |||||
| mMsgTxtEditBox = new QTextEdit(CStatusWindow); | |||||
| mMsgTxtEditBox->setObjectName(QString::fromUtf8("mMsgTxtEditBox")); | |||||
| mMsgTxtEditBox->setGeometry(QRect(150, 60, 1411, 571)); | |||||
| mForceScanBtn = new QPushButton(CStatusWindow); | |||||
| mForceScanBtn->setObjectName(QString::fromUtf8("mForceScanBtn")); | |||||
| mForceScanBtn->setGeometry(QRect(30, 60, 80, 22)); | |||||
| retranslateUi(CStatusWindow); | retranslateUi(CStatusWindow); | ||||
| @@ -33,6 +43,7 @@ public: | |||||
| void retranslateUi(QWidget *CStatusWindow) | void retranslateUi(QWidget *CStatusWindow) | ||||
| { | { | ||||
| CStatusWindow->setWindowTitle(QCoreApplication::translate("CStatusWindow", "Form", nullptr)); | CStatusWindow->setWindowTitle(QCoreApplication::translate("CStatusWindow", "Form", nullptr)); | ||||
| mForceScanBtn->setText(QCoreApplication::translate("CStatusWindow", "Forcer scan", nullptr)); | |||||
| } // retranslateUi | } // retranslateUi | ||||
| }; | }; | ||||