git-svn-id: svn://192.168.0.12/source@1 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
19
DataAnalyzer/DataAnalyzer.pro
Normal file
19
DataAnalyzer/DataAnalyzer.pro
Normal file
@@ -0,0 +1,19 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2014-11-13T17:55:03
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui sql
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = DataAnalyzer
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += main.cpp\
|
||||
widget.cpp \
|
||||
stable.cpp
|
||||
|
||||
HEADERS += widget.h \
|
||||
stable.h
|
||||
444
DataAnalyzer/DataAnalyzer.pro.user
Normal file
444
DataAnalyzer/DataAnalyzer.pro.user
Normal file
@@ -0,0 +1,444 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.3.0, 2015-01-14T12:08:29. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{4807ee1c-974e-40e0-bfb3-245390f0fc5f}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">1</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.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">Desktop Qt 5.4.0 MSVC2013 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.4.0 MSVC2013 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.54.win64_msvc2013_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">C:/source/build-DataAnalyzer-Desktop_Qt_5_4_0_MSVC2013_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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<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">C:/source/build-DataAnalyzer-Desktop_Qt_5_4_0_MSVC2013_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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<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>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">DataAnalyzer</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/source/DataAnalyzer/DataAnalyzer.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">DataAnalyzer.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">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.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.4.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.4.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.54.win32_mingw491_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">C:/source/build-DataAnalyzer-Desktop_Qt_5_3_MinGW_32bit-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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<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">C:/source/build-DataAnalyzer-Desktop_Qt_5_3_MinGW_32bit-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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<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>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">DataAnalyzer</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/source/DataAnalyzer/DataAnalyzer.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">DataAnalyzer.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">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">2</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>
|
||||
BIN
DataAnalyzer/DataAnalyzer.v12.suo
Normal file
BIN
DataAnalyzer/DataAnalyzer.v12.suo
Normal file
Binary file not shown.
11
DataAnalyzer/main.cpp
Normal file
11
DataAnalyzer/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "widget.h"
|
||||
#include <QApplication>
|
||||
#include <QLibrary>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
Widget w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
94
DataAnalyzer/stable.cpp
Normal file
94
DataAnalyzer/stable.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
#include "stable.h"
|
||||
#include <QKeyEvent>
|
||||
#include <QApplication>
|
||||
#include <qclipboard>
|
||||
#include <QMenu>
|
||||
#include <QDebug>
|
||||
#include <QHeaderView>
|
||||
|
||||
STable::STable(QWidget *parent):
|
||||
QTableWidget(parent)
|
||||
{
|
||||
setSortingEnabled(true);
|
||||
verticalHeader()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(verticalHeader(),SIGNAL(customContextMenuRequested(QPoint)),SLOT(HeaderContextMenuShow(QPoint)));
|
||||
connect(this,SIGNAL(cellClicked(int,int)),SLOT(CellClick(int,int)));
|
||||
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
SetHeaderList();
|
||||
}
|
||||
|
||||
void STable::SetHeaderList()
|
||||
{
|
||||
m_strListHeader << "id " << "nickname" << "date" << "title" << "data" << "platform id" << "platform title" << "url"
|
||||
<< "reply nickname" << "reply parent" << "reply date" << "reply data" << "reply urlreply"
|
||||
<< "keyword id " << " platfor mname " << " platform form " << " article form " << " reply rownum ";
|
||||
setColumnCount(m_strListHeader.size());
|
||||
int i = 0;
|
||||
foreach(QString str, m_strListHeader )
|
||||
setHorizontalHeaderItem(i++,new QTableWidgetItem(str));
|
||||
}
|
||||
|
||||
void STable::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
// If Ctrl-C typed
|
||||
if (event->key() == Qt::Key_C && (event->modifiers() & Qt::ControlModifier))
|
||||
{
|
||||
QModelIndexList cells = selectedIndexes();
|
||||
//qSort(cells);
|
||||
QString text;
|
||||
int currentRow = 0;
|
||||
foreach (const QModelIndex& cell, cells)
|
||||
{
|
||||
if (text.length() == 0)
|
||||
{
|
||||
}
|
||||
else if (cell.row() != currentRow)
|
||||
text += '\n';
|
||||
else
|
||||
text += '\t';
|
||||
currentRow = cell.row();
|
||||
text += cell.data().toString();
|
||||
}
|
||||
QApplication::clipboard()->setText(text);
|
||||
}
|
||||
if (event->key() == Qt::Key_V && (event->modifiers() & Qt::ControlModifier))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void STable::menuInsert()
|
||||
{
|
||||
int nRow = currentRow();
|
||||
insertRow(nRow);
|
||||
for (int i = 0; i < columnCount() ; i++)
|
||||
setItem(nRow,i,new QTableWidgetItem(" "));
|
||||
}
|
||||
|
||||
|
||||
void STable::menuDelete()
|
||||
{
|
||||
int nCount = 0;
|
||||
foreach(QModelIndex current,verticalHeader()->selectionModel()->selectedRows())
|
||||
{
|
||||
removeRow(current.row()-nCount);
|
||||
nCount++;
|
||||
}
|
||||
}
|
||||
|
||||
void STable::HeaderContextMenuShow(const QPoint& pos) // this is a slot
|
||||
{
|
||||
QMenu myMenu;
|
||||
myMenu.addAction("Insert", this, SLOT(menuInsert()));
|
||||
myMenu.addAction("Delete", this, SLOT(menuDelete()));
|
||||
myMenu.exec(mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void STable::CellClick(int nRow,int nPrev)
|
||||
{
|
||||
if (rowHeight(nRow) == 30)
|
||||
resizeRowToContents(nRow);
|
||||
else
|
||||
setRowHeight(nRow,30);
|
||||
repaint();
|
||||
}
|
||||
24
DataAnalyzer/stable.h
Normal file
24
DataAnalyzer/stable.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef STABLE_H
|
||||
#define STABLE_H
|
||||
|
||||
#include <QTableWidget>
|
||||
#include <QStringList>
|
||||
|
||||
class STable : public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit STable(QWidget *parent = 0);
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void SetHeaderList();
|
||||
public:
|
||||
QStringList m_strListHeader;
|
||||
signals:
|
||||
public slots:
|
||||
void HeaderContextMenuShow(const QPoint& pos);
|
||||
void menuInsert();
|
||||
void menuDelete();
|
||||
void CellClick(int nRow,int nPrev);
|
||||
};
|
||||
|
||||
#endif // STABLE_H
|
||||
691
DataAnalyzer/widget.cpp
Normal file
691
DataAnalyzer/widget.cpp
Normal file
@@ -0,0 +1,691 @@
|
||||
#include "widget.h"
|
||||
#include <QGroupBox>
|
||||
#include <QButtonGroup>
|
||||
#include <QLabel>
|
||||
#include <QSqlQuery>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileDialog>
|
||||
#include <QTextCodec>
|
||||
#include <QMessageBox>
|
||||
#include <QSqlError>
|
||||
|
||||
/*
|
||||
QSqlDatabase dbWeb = QSqlDatabase::addDatabase("QMYSQL");
|
||||
dbWeb.setHostName("db.big-bird.co.kr");
|
||||
dbWeb.setUserName("concepters");
|
||||
dbWeb.setPassword("con97996655");
|
||||
dbWeb.setDatabaseName("dbconcepters");
|
||||
*/
|
||||
|
||||
#define D_NOT_SELECT -1
|
||||
|
||||
#define SAFE_DELETE(x) if(x != NULL) { delete x; x = NULL; }
|
||||
#define SAFE_DELETEARRAY(x) if(x != NULL) { delete [] x; x = NULL; }
|
||||
#define SAFE_RELEASE(x) if(x != NULL) { x->Release(); x = NULL; }
|
||||
|
||||
Widget::Widget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
QVBoxLayout *vMainLayout = new QVBoxLayout;
|
||||
vMainLayout->setAlignment(Qt::AlignVCenter);
|
||||
{
|
||||
QVBoxLayout *vlayout = new QVBoxLayout;
|
||||
vlayout->addWidget(setDateWidgets());
|
||||
vlayout->addWidget(setSearchWidgets());
|
||||
vlayout->addWidget(setDelLengWidgets());
|
||||
vlayout->setAlignment(Qt::AlignTop);
|
||||
|
||||
QHBoxLayout *hlayout = new QHBoxLayout;
|
||||
hlayout->addWidget(setDataWidgets());
|
||||
hlayout->addLayout(vlayout);
|
||||
hlayout->addWidget(setFilterWidgets());
|
||||
vMainLayout->addLayout(hlayout,1);
|
||||
|
||||
m_ptwData = new QTabWidget;
|
||||
vMainLayout->addWidget(m_ptwData,8);
|
||||
m_ptwData->setTabsClosable(true);
|
||||
connect(m_ptwData,SIGNAL(tabCloseRequested(int)),this,SLOT(CloseTab(int)));
|
||||
|
||||
m_pProgress = new QProgressBar;
|
||||
vMainLayout->addWidget(m_pProgress,1);
|
||||
}
|
||||
setLayout(vMainLayout);
|
||||
DataGroupRefresh();
|
||||
FilterGroupRefresh();
|
||||
AddTable("1");
|
||||
}
|
||||
|
||||
Widget::~Widget()
|
||||
{
|
||||
}
|
||||
|
||||
QTableWidget *Widget::AddTable(QString _str)
|
||||
{
|
||||
STable *pTable = new STable;
|
||||
m_ptwData->addTab(pTable,_str);
|
||||
return (QTableWidget *)pTable;
|
||||
}
|
||||
|
||||
void Widget::CloseTab(int index)
|
||||
{
|
||||
m_ptwData->removeTab(index);
|
||||
}
|
||||
|
||||
QGroupBox *Widget::setDataWidgets()
|
||||
{
|
||||
QVBoxLayout *vlayout = new QVBoxLayout;
|
||||
|
||||
QGroupBox *groupBox = new QGroupBox(tr("Data Group"));
|
||||
m_plwData = new QListWidget;
|
||||
vlayout->addWidget(m_plwData);
|
||||
m_plwData->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
QPushButton *ppbRefresh = new QPushButton("Refresh");
|
||||
vlayout->addWidget(ppbRefresh);
|
||||
connect(ppbRefresh, SIGNAL(released()),this, SLOT(DataGroupRefresh()));
|
||||
groupBox->setLayout(vlayout);
|
||||
connect(m_plwData,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(DataGroupItemChanged(QListWidgetItem*)));
|
||||
return groupBox;
|
||||
}
|
||||
|
||||
QGroupBox *Widget::setDateWidgets()
|
||||
{
|
||||
m_pcbDateCatalog = new QComboBox;
|
||||
m_pdeStart = new QDateEdit(QDate::currentDate());
|
||||
m_pdeEnd = new QDateEdit(QDate::currentDate());
|
||||
|
||||
m_pdeStart->setDateRange(QDate(2003, 5, 20),QDate::currentDate());
|
||||
m_pdeEnd->setDateRange(QDate(2003, 5, 20),QDate::currentDate());
|
||||
|
||||
m_pcw = new QCalendarWidget();
|
||||
m_pdeStart->setCalendarWidget(m_pcw);
|
||||
m_pdeStart->setCalendarPopup(true);
|
||||
|
||||
m_pdeEnd->setCalendarWidget(m_pcw);
|
||||
m_pdeEnd->setCalendarPopup(true);
|
||||
|
||||
m_ppbInsertCalc = new QPushButton("Insert");
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
hlayout->addWidget(new QLabel("Catalog:"));
|
||||
hlayout->addWidget(m_pcbDateCatalog);
|
||||
hlayout->addWidget(new QLabel("Start:"));
|
||||
hlayout->addWidget(m_pdeStart);
|
||||
hlayout->addWidget(new QLabel("End:"));
|
||||
hlayout->addWidget(m_pdeEnd);
|
||||
hlayout->addWidget(m_ppbInsertCalc);
|
||||
hlayout->setAlignment(Qt::AlignLeft|Qt::AlignTop);
|
||||
QGroupBox *groupBox = new QGroupBox(tr("Term"));
|
||||
groupBox->setAlignment(Qt::AlignLeft|Qt::AlignTop);
|
||||
groupBox->setLayout(hlayout);
|
||||
m_pcbDateCatalog->addItems(QStringList() << "body date" << "reply date");
|
||||
connect(m_ppbInsertCalc, SIGNAL(released()),this, SLOT(SearchDate()));
|
||||
return groupBox;
|
||||
}
|
||||
|
||||
QGroupBox *Widget::setSearchWidgets()
|
||||
{
|
||||
m_pcbCatalog = new QComboBox;
|
||||
m_pcbKeyword = new QComboBox;
|
||||
m_pcbKeyword->addItem(QString("Or"));// or
|
||||
m_pcbKeyword->addItem(QString("And"));// and
|
||||
m_pcbKeyword->addItem(QString("Cell Delete"));
|
||||
m_pcbKeyword->addItem(QString("Word Delete"));
|
||||
m_pcbMethod = new QComboBox;
|
||||
m_pcbMethod->addItem(QString("Sentence"));
|
||||
m_pcbMethod->addItem(QString("Space"));
|
||||
m_pleString = new QLineEdit;
|
||||
m_ppbInsertSearch = new QPushButton("Insert");
|
||||
m_pcbCatalog->addItems(QStringList() << "id " << "nickname" << "date" << "title" << "data" << "platform id" << "platform title" << "url"
|
||||
<< "reply nickname" << "reply parent" << "reply date" << "reply data" << "reply urlreply"
|
||||
<< "keyword id " << " platfor mname " << " platform form " << " article form " << " reply rownum ");
|
||||
|
||||
QVBoxLayout *vlayout = new QVBoxLayout();
|
||||
{
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
hlayout->addWidget(new QLabel("Item:"));
|
||||
hlayout->addWidget(m_pcbCatalog);
|
||||
hlayout->addWidget(new QLabel("Method:"));
|
||||
hlayout->addWidget(m_pcbMethod);
|
||||
hlayout->addWidget(new QLabel("keyword:"));
|
||||
hlayout->addWidget(m_pcbKeyword);
|
||||
vlayout->addLayout(hlayout);
|
||||
}
|
||||
|
||||
{
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
hlayout->addWidget(new QLabel("Search:"));
|
||||
hlayout->addWidget(m_pleString);
|
||||
vlayout->addLayout(hlayout);
|
||||
}
|
||||
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
hlayout->addLayout(vlayout);
|
||||
hlayout->addWidget(m_ppbInsertSearch);
|
||||
QGroupBox *groupBox = new QGroupBox(tr("Search"));
|
||||
groupBox->setLayout(hlayout);
|
||||
|
||||
connect(m_ppbInsertSearch, SIGNAL(released()),this, SLOT(SearchKeyword()));
|
||||
return groupBox;
|
||||
}
|
||||
|
||||
QGroupBox *Widget::setDelLengWidgets()
|
||||
{
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
m_pcbDelLeng = new QComboBox;
|
||||
m_pleDelLeng = new QLineEdit;
|
||||
m_pcbDelLeng->addItems(QStringList() << "id " << "nickname" << "date" << "title" << "data" << "platform id" << "platform title" << "url"
|
||||
<< "reply nickname" << "reply parent" << "reply date" << "reply data" << "reply urlreply"
|
||||
<< "keyword id " << " platfor mname " << " platform form " << " article form " << " reply rownum ");
|
||||
hlayout->addWidget(new QLabel("Item:"));
|
||||
hlayout->addWidget(m_pcbDelLeng);
|
||||
hlayout->addWidget(new QLabel("Length:"));
|
||||
hlayout->addWidget(m_pleDelLeng);
|
||||
QPushButton *pbDelete = new QPushButton("insert");
|
||||
connect(pbDelete , SIGNAL(released()),this, SLOT(SearchLength()));
|
||||
hlayout->addWidget(pbDelete);
|
||||
QGroupBox *groupBox = new QGroupBox(tr("Delete Length"));
|
||||
groupBox->setLayout(hlayout);
|
||||
return groupBox;
|
||||
}
|
||||
|
||||
QGroupBox *Widget::setFilterWidgets()
|
||||
{
|
||||
QHBoxLayout *hMainlayout = new QHBoxLayout();
|
||||
{
|
||||
QVBoxLayout *vlayout = new QVBoxLayout();
|
||||
m_plwFilterGroup = new QListWidget;
|
||||
m_pleFilterGroup = new QLineEdit;
|
||||
vlayout->addWidget(m_plwFilterGroup);
|
||||
vlayout->addWidget(m_pleFilterGroup);
|
||||
{
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
QPushButton *pbInsert = new QPushButton("Insert");
|
||||
connect(pbInsert, SIGNAL(released()),this, SLOT(FilterGroupInsert()));
|
||||
QPushButton *pbDelete = new QPushButton("Delete");
|
||||
connect(pbDelete, SIGNAL(released()),this, SLOT(FilterGroupDelete()));
|
||||
QPushButton *pbModify = new QPushButton("Modfiy");
|
||||
connect(pbModify, SIGNAL(released()),this, SLOT(FilterGroupModify()));
|
||||
QPushButton *pbRefresh = new QPushButton("Refresh");
|
||||
connect(pbRefresh, SIGNAL(released()),this, SLOT(FilterGroupRefresh()));
|
||||
|
||||
hlayout->addWidget(pbInsert);
|
||||
hlayout->addWidget(pbDelete);
|
||||
hlayout->addWidget(pbRefresh);
|
||||
vlayout->addLayout(hlayout);
|
||||
}
|
||||
hMainlayout->addLayout(vlayout);
|
||||
}
|
||||
{
|
||||
QVBoxLayout *vlayout = new QVBoxLayout();
|
||||
m_plwFilter = new QListWidget;
|
||||
vlayout->addWidget(m_plwFilter);
|
||||
connect(m_plwFilter,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),this,SLOT(currentFilterItemChanged(QListWidgetItem*,QListWidgetItem*)));
|
||||
QPushButton *pbDelete = new QPushButton("Delete");
|
||||
vlayout->addWidget(pbDelete);
|
||||
connect(pbDelete, SIGNAL(released()),this, SLOT(FilterDelete()));
|
||||
hMainlayout->addLayout(vlayout);
|
||||
}
|
||||
QGroupBox *groupBox = new QGroupBox(tr("Filter"));
|
||||
groupBox->setLayout(hMainlayout);
|
||||
|
||||
connect(m_plwFilterGroup,SIGNAL(currentItemChanged(QListWidgetItem *,QListWidgetItem *)),this,SLOT(currentGroupItemChanged(QListWidgetItem *, QListWidgetItem *)));
|
||||
return groupBox;
|
||||
}
|
||||
|
||||
void Widget::DataGroupRefresh()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
m_plwData->clear();
|
||||
QSqlQuery query("select id,name from datagroup");
|
||||
while (query.next())
|
||||
{
|
||||
QListWidgetItem *pItem = new QListWidgetItem(query.value(1).toString(),m_plwData);
|
||||
pItem->setData(Qt::UserRole, QVariant(query.value(0)));
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::InsertCopyRow(int _nRow,QTableWidget *_pCurrent,QTableWidget *_pNew)
|
||||
{
|
||||
_pNew->setRowCount(_pNew->rowCount()+1);
|
||||
for (int nCount = 0;nCount < _pCurrent->columnCount() ;nCount++ )
|
||||
{
|
||||
_pNew->setItem(_pNew->rowCount()-1,nCount,new QTableWidgetItem(*_pCurrent->item(_nRow,nCount)));
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::SearchDate()
|
||||
{
|
||||
STable *pNew = new STable;
|
||||
QTableWidget *pCurrent = (QTableWidget *)m_ptwData->currentWidget();
|
||||
pNew->setColumnCount(pCurrent->columnCount());
|
||||
//SetColumHeader(pNew);
|
||||
m_pProgress->setRange(0,pCurrent->rowCount()-1);
|
||||
int nCurrentFilterGroupID = D_NOT_SELECT;
|
||||
foreach (QListWidgetItem *item,m_plwFilterGroup->selectedItems())
|
||||
{
|
||||
nCurrentFilterGroupID = item->data(Qt::UserRole).toInt();
|
||||
InsertTimeFilter(m_pcbDateCatalog->currentIndex(),m_pdeStart->date(),m_pdeEnd->date(),nCurrentFilterGroupID);
|
||||
}
|
||||
|
||||
|
||||
int nColumn;
|
||||
switch(m_pcbDateCatalog->currentIndex())
|
||||
{
|
||||
case 0:nColumn = 2;break; // main
|
||||
case 1:nColumn = 10;break; // comment
|
||||
default : return;
|
||||
}
|
||||
for (int nCount = 0 ; nCount < pCurrent->rowCount(); nCount++ )
|
||||
{
|
||||
bool bFlag = false;
|
||||
QString strTime = pCurrent->item(nCount,nColumn)->text().trimmed();
|
||||
if (strTime.size() >= 10)
|
||||
{
|
||||
QChar ch = strTime.at(4);
|
||||
QString strFormat = QString("yyyy")+ch+QString("MM")+ch+QString("dd");
|
||||
QDate date = QDate::fromString(strTime.left(10),strFormat);
|
||||
if (m_pdeStart->date() <= date && m_pdeEnd->date() >= date)
|
||||
bFlag = true;
|
||||
}
|
||||
if (bFlag)
|
||||
InsertCopyRow(nCount,pCurrent,pNew);
|
||||
m_pProgress->setValue(nCount);
|
||||
m_pProgress->repaint();
|
||||
}
|
||||
m_ptwData->addTab(pNew,m_ptwData->tabText(m_ptwData->currentIndex())+" d");
|
||||
m_ptwData->setCurrentIndex(m_ptwData->count()-1);
|
||||
if (nCurrentFilterGroupID != D_NOT_SELECT)
|
||||
RefreshFilter(nCurrentFilterGroupID);
|
||||
}
|
||||
|
||||
void Widget::SearchKeyword()
|
||||
{
|
||||
STable *pNew = new STable;
|
||||
QTableWidget *pCurrent = (QTableWidget *)m_ptwData->currentWidget();
|
||||
pNew->setColumnCount(pCurrent->columnCount());
|
||||
//SetColumHeader(pNew);
|
||||
int nCurrentFilterGroupID = D_NOT_SELECT;
|
||||
foreach (QListWidgetItem *item,m_plwFilterGroup->selectedItems())
|
||||
{
|
||||
nCurrentFilterGroupID = item->data(Qt::UserRole).toInt();
|
||||
InsertSearchFilter(m_pcbCatalog->currentIndex(),m_pcbMethod->currentIndex(),m_pcbKeyword->currentIndex(),m_pleString->text(),nCurrentFilterGroupID);
|
||||
}
|
||||
|
||||
QStringList strListKeyword = m_pleString->text().split(" ");
|
||||
if (m_pcbMethod->currentIndex() == 1)
|
||||
{
|
||||
for (int i = 0 ; i < strListKeyword.size(); i++ )
|
||||
{
|
||||
strListKeyword[i] = " " + strListKeyword[i] + " ";
|
||||
}
|
||||
}
|
||||
m_pProgress->setRange(0,pCurrent->rowCount()-1);
|
||||
qDebug() << QString::number(pCurrent->rowCount());
|
||||
for (int nCount = 0 ; nCount < pCurrent->rowCount(); nCount++ )
|
||||
{
|
||||
bool bFlag = false;
|
||||
//if (m_pcbCatalog->currentText() == "ALL")
|
||||
QString strData = pCurrent->item(nCount,m_pcbCatalog->currentIndex())->text();
|
||||
switch(m_pcbKeyword->currentIndex())
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
foreach(QString strKey , strListKeyword)
|
||||
if (strData.contains(strKey)){bFlag = true;break;}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
int nKeyCount = 0;
|
||||
foreach(QString strKey , strListKeyword)
|
||||
if (strData.contains(strKey)) nKeyCount++;
|
||||
if (nKeyCount == strListKeyword.size())
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
bFlag = true;
|
||||
foreach(QString strKey , strListKeyword)
|
||||
if (strData.contains(strKey)){bFlag = false;break;}
|
||||
break;
|
||||
}
|
||||
case 3: bFlag = true;break;
|
||||
}
|
||||
if (bFlag) InsertCopyRow(nCount,pCurrent,pNew);
|
||||
if (m_pcbKeyword->currentIndex() == 3)
|
||||
{
|
||||
foreach(QString strKey , strListKeyword)
|
||||
{
|
||||
strData.replace(strKey,"");
|
||||
}
|
||||
pNew->item(nCount,m_pcbCatalog->currentIndex())->setText(strData);
|
||||
}
|
||||
m_pProgress->setValue(nCount);
|
||||
m_pProgress->repaint();
|
||||
}
|
||||
m_ptwData->addTab(pNew,m_ptwData->tabText(m_ptwData->currentIndex())+" k");
|
||||
m_ptwData->setCurrentIndex(m_ptwData->count()-1);
|
||||
if (nCurrentFilterGroupID != D_NOT_SELECT)
|
||||
RefreshFilter(nCurrentFilterGroupID);
|
||||
}
|
||||
|
||||
void Widget::SearchLength()
|
||||
{
|
||||
}
|
||||
|
||||
void Widget::DataGroupItemChanged( QListWidgetItem *item)
|
||||
{
|
||||
DataReload("data_" + item->data(Qt::UserRole).toString());
|
||||
}
|
||||
|
||||
void Widget::DataReload(QString _strTableName)
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
QString strSelect;
|
||||
strSelect = "select ";
|
||||
strSelect += "CONVERT(body_articleid USING utf8),";
|
||||
strSelect += "CONVERT(body_nickname USING utf8),";
|
||||
strSelect += "CONVERT(body_date USING utf8),";
|
||||
strSelect += "CONVERT(body_articletitle USING utf8),";
|
||||
strSelect += "CONVERT(body_data USING utf8),";
|
||||
strSelect += "CONVERT(body_platformid USING utf8),";
|
||||
strSelect += "CONVERT(body_platformtitle USING utf8),";
|
||||
strSelect += "CONVERT(url USING utf8),";
|
||||
strSelect += "CONVERT(reply_nickname USING utf8),";
|
||||
strSelect += "CONVERT(reply_parent USING utf8),";
|
||||
strSelect += "CONVERT(reply_date USING utf8),";
|
||||
strSelect += "CONVERT(reply_data USING utf8),";
|
||||
strSelect += "CONVERT(reply_urlreply USING utf8),";
|
||||
strSelect += "CONVERT(keyword_id USING utf8),";
|
||||
strSelect += "CONVERT(platformname USING utf8),";
|
||||
strSelect += "CONVERT(platformform USING utf8),";
|
||||
strSelect += "CONVERT(articleform USING utf8),";
|
||||
strSelect += "CONVERT(reply_rownum USING utf8)";
|
||||
strSelect += " from ";
|
||||
strSelect += _strTableName;
|
||||
strSelect += " Order by body_date";
|
||||
|
||||
QSqlQuery query(strSelect);
|
||||
STable *pTable = (STable *)m_ptwData->currentWidget();
|
||||
pTable->clear();
|
||||
pTable->SetHeaderList();
|
||||
int nCount = 0;
|
||||
pTable->setColumnCount(18);
|
||||
pTable->setRowCount(query.size());
|
||||
m_pProgress->setRange(0,query.size()-1);
|
||||
while (query.next())
|
||||
{
|
||||
for (int i = 0; i < pTable->columnCount() ; i++)
|
||||
pTable->setItem(nCount,i,new QTableWidgetItem(" "+query.value(i).toString()+" "));
|
||||
nCount++;
|
||||
m_pProgress->setValue(nCount);
|
||||
m_pProgress->repaint();
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::FilterGroupInsert()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
|
||||
QString strQuery = QString("insert into filtergroup set "
|
||||
"name = '" + m_pleFilterGroup->text() + "'");
|
||||
db.exec(strQuery.toUtf8());
|
||||
db.close();
|
||||
FilterGroupRefresh();
|
||||
}
|
||||
|
||||
void Widget::FilterGroupDelete()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
foreach (QListWidgetItem *item,m_plwFilterGroup->selectedItems())
|
||||
{
|
||||
QString strQuery = QString("delete from filtergroup where id = " + item->data(Qt::UserRole).toString());
|
||||
db.exec(strQuery.toUtf8());
|
||||
strQuery = QString("delete from filter where filtergroup_id = " + item->data(Qt::UserRole).toString());
|
||||
db.exec(strQuery.toUtf8());
|
||||
RefreshFilter(item->data(Qt::UserRole).toInt());
|
||||
}
|
||||
db.close();
|
||||
FilterGroupRefresh();
|
||||
}
|
||||
|
||||
void Widget::FilterGroupModify()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::FilterGroupRefresh()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
m_plwFilterGroup->clear();
|
||||
QSqlQuery query("select id,name from filtergroup");
|
||||
while (query.next())
|
||||
{
|
||||
QListWidgetItem *pItem = new QListWidgetItem(query.value(1).toString(),m_plwFilterGroup);
|
||||
pItem->setData(Qt::UserRole, QVariant(query.value(0)));
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
void Widget::InsertTimeFilter(int _nCategory ,QDate _dateStart ,QDate _dateEnd ,int _nGroup)
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
|
||||
QString sql = "insert into filter (type,timecategory,timestart,timeend,filtergroup_id) value (";
|
||||
sql += "0,";
|
||||
sql += QString::number(_nCategory) + ",'";
|
||||
sql += _dateStart.toString("yyyy-MM-dd") + "','";
|
||||
sql += _dateEnd.toString("yyyy-MM-dd") + "',";
|
||||
sql += QString::number(_nGroup) + ")";
|
||||
QSqlQuery query;
|
||||
if (query.exec(sql.toUtf8()) == false)
|
||||
{
|
||||
qDebug() << sql;
|
||||
qDebug() << query.lastError().text();
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::InsertSearchFilter(int _nCategory,int _nMethod,int _nKeyword, QString str,int _nGroup)
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
QString sql = "insert into filter (type,searchescategory,searchesmethod,searcheskeyword,searchesstring,filtergroup_id) value (";
|
||||
sql += "1,";
|
||||
sql += QString::number(_nCategory) + ",";
|
||||
sql += QString::number(_nMethod) + ",";
|
||||
sql += QString::number(_nKeyword) + ",";
|
||||
sql += "'" + str + "',";
|
||||
sql += QString::number(_nGroup) + ")";
|
||||
|
||||
QSqlQuery query;
|
||||
if (query.exec(sql.toUtf8()) == false)
|
||||
{
|
||||
qDebug() << query.lastError().text();
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::RefreshFilter(int _nGroup)
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
QSqlQuery query("select id,type,timecategory,timestart,timeend,searchescategory,searchesmethod,searcheskeyword,searchesstring from filter where filtergroup_id = " + QString::number(_nGroup));
|
||||
|
||||
m_plwFilter->clear();
|
||||
while (query.next())
|
||||
{
|
||||
QString str;
|
||||
switch(query.value(1).toInt())
|
||||
{
|
||||
case 0:
|
||||
str = "Type : Date ";
|
||||
str += ", Catalog : ";
|
||||
str += m_pcbDateCatalog->itemText(query.value(2).toInt());
|
||||
str += ", Start : ";
|
||||
str += query.value(3).toString();
|
||||
str += ", End : ";
|
||||
str += query.value(4).toString();
|
||||
break;
|
||||
case 1:
|
||||
str = "Type : Seracher ";
|
||||
str += ", Catalog : ";
|
||||
str += m_pcbCatalog->itemText(query.value(5).toInt());
|
||||
str += ", Method : ";
|
||||
str += m_pcbMethod->itemText(query.value(6).toInt());
|
||||
str += ", Keyword : ";
|
||||
str += m_pcbKeyword->itemText(query.value(7).toInt());
|
||||
str += ", Search : ";
|
||||
str += query.value(8).toString();
|
||||
break;
|
||||
}
|
||||
QListWidgetItem *pItem = new QListWidgetItem(str,m_plwFilter);
|
||||
pItem->setData(Qt::UserRole, QVariant(query.value(0)));
|
||||
//m_plwFilter->insertItem(m_plwFilter->size().height()-1,pItem);
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
|
||||
void Widget::currentGroupItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev)
|
||||
{
|
||||
if (_pCurrent == 0) return;
|
||||
RefreshFilter(_pCurrent->data(Qt::UserRole).toInt());
|
||||
m_pleFilterGroup->setText(_pCurrent->text());
|
||||
m_pleFilterGroup->repaint();
|
||||
}
|
||||
|
||||
void Widget::FilterDelete()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
foreach (QListWidgetItem *item,m_plwFilter->selectedItems())
|
||||
{
|
||||
QString strQuery = QString("delete from filter where id = '" + item->data(Qt::UserRole).toString() + "'");
|
||||
db.exec(strQuery.toUtf8());
|
||||
}
|
||||
db.close();
|
||||
foreach (QListWidgetItem *item,m_plwFilterGroup->selectedItems())
|
||||
RefreshFilter(item->data(Qt::UserRole).toInt());
|
||||
}
|
||||
|
||||
void Widget::currentFilterItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev)
|
||||
{
|
||||
if (_pCurrent == 0) return;
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
|
||||
db.setHostName("bigbird.iptime.org");
|
||||
db.setUserName("admin");
|
||||
db.setPassword("admin123");
|
||||
db.setDatabaseName("concepters");
|
||||
if (db.open() == false)
|
||||
{
|
||||
qDebug() << db.lastError().text();
|
||||
return;
|
||||
}
|
||||
QSqlQuery query("select id,type,timecategory,timestart,timeend,searchescategory,searchesmethod,searcheskeyword,searchesstring from filter where id = " + _pCurrent->data(Qt::UserRole).toString());
|
||||
if (!query.next()) return;
|
||||
switch(query.value(1).toInt())
|
||||
{
|
||||
case 0:
|
||||
m_pcbDateCatalog->setCurrentIndex(query.value(2).toInt());
|
||||
m_pdeStart->setDate(query.value(3).toDate());
|
||||
m_pdeEnd->setDate(query.value(4).toDate());
|
||||
m_pleString->setText("");
|
||||
break;
|
||||
case 1:
|
||||
m_pcbCatalog->setCurrentIndex(query.value(5).toInt());
|
||||
m_pcbMethod->setCurrentIndex(query.value(6).toInt());
|
||||
m_pcbKeyword->setCurrentIndex(query.value(7).toInt());
|
||||
m_pleString->setText(query.value(8).toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
87
DataAnalyzer/widget.h
Normal file
87
DataAnalyzer/widget.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef WIDGET_H
|
||||
#define WIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QCalendarWidget>
|
||||
#include <QDateEdit>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <QGroupBox>
|
||||
#include <QListWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QRadioButton>
|
||||
#include <QButtonGroup>
|
||||
#include <QTableWidget>
|
||||
#include <QProgressBar>
|
||||
|
||||
#include "stable.h"
|
||||
|
||||
class Widget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Widget(QWidget *parent = 0);
|
||||
~Widget();
|
||||
private:
|
||||
// Data
|
||||
QListWidget *m_plwData;
|
||||
// Date
|
||||
QCalendarWidget *m_pcw;
|
||||
QDateEdit *m_pdeStart;
|
||||
QDateEdit *m_pdeEnd;
|
||||
QPushButton *m_ppbInsertCalc;
|
||||
QComboBox *m_pcbDateCatalog;
|
||||
// Keyword
|
||||
QComboBox *m_pcbCatalog;
|
||||
QComboBox *m_pcbKeyword;
|
||||
QComboBox *m_pcbMethod;
|
||||
QLineEdit *m_pleString;
|
||||
QPushButton *m_ppbInsertSearch;
|
||||
// Delete Length
|
||||
QComboBox *m_pcbDelLeng;
|
||||
QLineEdit *m_pleDelLeng;
|
||||
// Filter
|
||||
QListWidget *m_plwFilterGroup;
|
||||
QListWidget *m_plwFilter;
|
||||
QLineEdit *m_pleFilterGroup;
|
||||
//
|
||||
QTabWidget *m_ptwData;
|
||||
//
|
||||
QProgressBar *m_pProgress;
|
||||
|
||||
//void keyPressEvent(QKeyEvent* event);
|
||||
|
||||
private:
|
||||
QGroupBox *setDataWidgets();
|
||||
QGroupBox *setDateWidgets();
|
||||
QGroupBox *setSearchWidgets();
|
||||
QGroupBox *setDelLengWidgets();
|
||||
QGroupBox *setFilterWidgets();
|
||||
|
||||
QTableWidget *AddTable(QString _str);
|
||||
void SetTableHead();
|
||||
void SetColumHeader(QTableWidget *_pNew);
|
||||
void InsertCopyRow(int _nRow,QTableWidget *_pCurrent,QTableWidget *_pNew);
|
||||
void DataReload(QString _strTableName);
|
||||
void InsertTimeFilter(int _nTimeCategory ,QDate _dateStart ,QDate _dateEnd ,int _nGroup);
|
||||
void InsertSearchFilter(int _nCategory,int _nMethod,int _nKeyword, QString str,int _nGroup);
|
||||
void RefreshFilter(int _nGroup);
|
||||
public slots:
|
||||
void SearchDate();
|
||||
void CloseTab(int index);
|
||||
void SearchKeyword();
|
||||
void DataGroupRefresh();
|
||||
void DataGroupItemChanged ( QListWidgetItem * item );
|
||||
void FilterGroupInsert();
|
||||
void FilterGroupDelete();
|
||||
void FilterGroupModify();
|
||||
void FilterGroupRefresh();
|
||||
void currentGroupItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev=0);
|
||||
void FilterDelete();
|
||||
void SearchLength();
|
||||
void currentFilterItemChanged(QListWidgetItem *_pCurrent, QListWidgetItem *_pPrev=0);
|
||||
};
|
||||
|
||||
#endif // WIDGET_H
|
||||
Reference in New Issue
Block a user