ソースを参照

Premier commit

master
jfmartel 1年前
コミット
dfb51b2dc1
39個のファイルの変更11619行の追加0行の削除
  1. +5
    -0
      .gitignore
  2. +36
    -0
      MainWindow.ui
  3. +485
    -0
      Makefile
  4. +2585
    -0
      Makefile.Debug
  5. +2585
    -0
      Makefile.Release
  6. +680
    -0
      ReportPage.ui
  7. +2
    -0
      Source.txt
  8. +264
    -0
      Sources/DirParserThread.cpp
  9. +46
    -0
      Sources/DirParserThread.h
  10. +75
    -0
      Sources/GlobalDefine.h
  11. +646
    -0
      Sources/LogMgr.cpp
  12. +145
    -0
      Sources/LogMgr.h
  13. +23
    -0
      Sources/MainWindow.cpp
  14. +30
    -0
      Sources/MainWindow.h
  15. +342
    -0
      Sources/ReportGenerator.cpp
  16. +46
    -0
      Sources/ReportGenerator.h
  17. +231
    -0
      Sources/ReportPage.cpp
  18. +44
    -0
      Sources/ReportPage.h
  19. +156
    -0
      Sources/ReportSettingsData.cpp
  20. +65
    -0
      Sources/ReportSettingsData.h
  21. +15
    -0
      Sources/SettingsPage.cpp
  22. +23
    -0
      Sources/SettingsPage.h
  23. +32
    -0
      Sources/SettingsPage.ui
  24. +1042
    -0
      Sources/TrainLogFileMgr.cpp
  25. +61
    -0
      Sources/TrainLogFileMgr.h
  26. +449
    -0
      Sources/ZTData.cpp
  27. +407
    -0
      Sources/ZTData.h
  28. +391
    -0
      Sources/ZTLogFilesMgr.cpp
  29. +83
    -0
      Sources/ZTLogFilesMgr.h
  30. +82
    -0
      Sources/ZTStats.cpp
  31. +29
    -0
      Sources/ZTStats.h
  32. +17
    -0
      Sources/main.cpp
  33. +59
    -0
      ZTStats.pro
  34. +19
    -0
      object_script.ZTStats.Debug
  35. +19
    -0
      object_script.ZTStats.Release
  36. バイナリ
      test.xlsx
  37. +62
    -0
      ui_MainWindow.h
  38. +286
    -0
      ui_ReportPage.h
  39. +52
    -0
      ui_SettingsPage.h

+ 5
- 0
.gitignore ファイルの表示

@@ -0,0 +1,5 @@
/LOGS/*
/bleh/
/release/*
/debug/*
/ZTStats.pro.user

+ 36
- 0
MainWindow.ui ファイルの表示

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CMainWindow</class>
<widget class="QMainWindow" name="CMainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>927</width>
<height>610</height>
</rect>
</property>
<property name="windowTitle">
<string>CMainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QGroupBox" name="ReportParamsGroupBx">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>531</width>
<height>551</height>
</rect>
</property>
<property name="title">
<string>Paramètres du rapport</string>
</property>
</widget>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

+ 485
- 0
Makefile ファイルの表示

@@ -0,0 +1,485 @@
#############################################################################
# Makefile for building: ZTStats
# Generated by qmake (3.1) (Qt 5.14.2)
# Project: ZTStats.pro
# Template: app
# Command: C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe -o Makefile ZTStats.pro -spec win32-g++
#############################################################################

MAKEFILE = Makefile

EQ = =

first: release
install: release-install
uninstall: release-uninstall
QMAKE = C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe
DEL_FILE = del
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
COPY = copy /y
COPY_FILE = copy /y
COPY_DIR = xcopy /s /q /y /i
INSTALL_FILE = copy /y
INSTALL_PROGRAM = copy /y
INSTALL_DIR = xcopy /s /q /y /i
QINSTALL = C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe -install qinstall
QINSTALL_PROGRAM = C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe -install qinstall -exe
DEL_FILE = del
SYMLINK = $(QMAKE) -install ln -f -s
DEL_DIR = rmdir
MOVE = move
IDC = idc
IDL = midl
ZIP = zip -r -9
DEF_FILE =
RES_FILE =
SED = $(QMAKE) -install sed
MOVE = move
SUBTARGETS = \
release \
debug


release: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-all: FORCE
$(MAKE) -f $(MAKEFILE).Release all
release-clean: FORCE
$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Release distclean
release-install: FORCE
$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Release uninstall
debug: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-all: FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall

Makefile: ZTStats.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/device_config.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/sanitize.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/gcc-base.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/g++-base.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/angle.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/windows_vulkan_sdk.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/windows-vulkan.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/g++-win32.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/windows-desktop.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qconfig.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3danimation.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3danimation_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dcore.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dcore_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dextras.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dextras_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dinput.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dinput_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dlogic.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dlogic_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquick.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquick_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickanimation.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickanimation_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickextras.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickextras_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickinput.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickinput_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickrender.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickrender_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickscene2d.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickscene2d_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3drender.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3drender_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_accessibility_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axbase.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axbase_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axcontainer.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axcontainer_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axserver.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axserver_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bluetooth.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bluetooth_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bootstrap_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_concurrent.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_concurrent_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_core.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_core_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_dbus.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_dbus_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designer.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designer_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designercomponents_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_edid_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_egl_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_fb_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gamepad.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gamepad_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gui.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gui_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_help.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_help_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_httpserver.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_httpserver_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_location.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_location_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_mqtt.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_mqtt_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimedia.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimedia_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimediawidgets.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimediawidgets_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_network.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_network_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_nfc.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_nfc_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_opengl.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_opengl_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_openglextensions.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_openglextensions_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_packetprotocol_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioning.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioning_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioningquick.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioningquick_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_printsupport.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_printsupport_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qml.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qml_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmldebug_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmldevtools_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlmodels.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlmodels_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmltest.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmltest_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlworkerscript.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlworkerscript_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quick.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quick_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickcontrols2.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickcontrols2_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickparticles_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickshapes_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quicktemplates2.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quicktemplates2_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickwidgets.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickwidgets_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_remoteobjects.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_remoteobjects_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_repparser.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_repparser_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_scxml.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_scxml_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sensors.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sensors_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialbus.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialbus_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialport.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialport_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sql.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sql_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sslserver.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sslserver_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_svg.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_svg_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_testlib.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_testlib_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_texttospeech.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_texttospeech_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_theme_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uiplugin.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uitools.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uitools_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_vulkan_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_webchannel.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_webchannel_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_websockets.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_websockets_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_widgets.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_widgets_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_zlib_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt_functions.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt_config.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_post.prf \
../.qmake.stash \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/toolchain.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_pre.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/default_pre.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resources_functions.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resources.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/moc.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/opengl.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/uic.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qmake_use.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/file_copies.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/windows.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/testcase_targets.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exceptions.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/yacc.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/lex.prf \
ZTStats.pro \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Xlsx.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Widgets.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf
$(QMAKE) -o Makefile ZTStats.pro -spec win32-g++
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/device_config.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/sanitize.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/gcc-base.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/g++-base.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/angle.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/windows_vulkan_sdk.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/windows-vulkan.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/g++-win32.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/common/windows-desktop.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qconfig.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3danimation.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3danimation_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dcore.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dcore_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dextras.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dextras_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dinput.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dinput_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dlogic.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dlogic_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquick.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquick_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickanimation.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickanimation_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickextras.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickextras_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickinput.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickinput_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickrender.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickrender_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickscene2d.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3dquickscene2d_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3drender.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_3drender_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_accessibility_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axbase.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axbase_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axcontainer.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axcontainer_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axserver.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_axserver_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bluetooth.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bluetooth_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_bootstrap_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_concurrent.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_concurrent_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_core.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_core_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_dbus.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_dbus_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designer.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designer_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_designercomponents_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_edid_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_egl_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_fb_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gamepad.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gamepad_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gui.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_gui_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_help.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_help_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_httpserver.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_httpserver_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_location.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_location_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_mqtt.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_mqtt_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimedia.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimedia_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimediawidgets.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_multimediawidgets_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_network.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_network_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_nfc.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_nfc_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_opengl.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_opengl_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_openglextensions.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_openglextensions_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_packetprotocol_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioning.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioning_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioningquick.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_positioningquick_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_printsupport.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_printsupport_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qml.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qml_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmldebug_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmldevtools_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlmodels.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlmodels_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmltest.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmltest_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlworkerscript.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qmlworkerscript_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quick.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quick_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickcontrols2.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickcontrols2_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickparticles_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickshapes_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quicktemplates2.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quicktemplates2_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickwidgets.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_quickwidgets_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_remoteobjects.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_remoteobjects_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_repparser.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_repparser_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_scxml.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_scxml_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sensors.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sensors_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialbus.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialbus_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialport.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_serialport_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sql.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sql_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sslserver.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_sslserver_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_svg.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_svg_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_testlib.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_testlib_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_texttospeech.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_texttospeech_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_theme_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uiplugin.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uitools.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_uitools_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_vulkan_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_webchannel.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_webchannel_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_websockets.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_websockets_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_widgets.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_widgets_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_zlib_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt_functions.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt_config.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_post.prf:
../.qmake.stash:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/toolchain.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_pre.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/default_pre.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resources_functions.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resources.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/moc.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/opengl.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/uic.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qmake_use.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/file_copies.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/windows.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/testcase_targets.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exceptions.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/yacc.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/lex.prf:
ZTStats.pro:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Xlsx.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Widgets.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf:
qmake: FORCE
@$(QMAKE) -o Makefile ZTStats.pro -spec win32-g++

qmake_all: FORCE

make_first: release-make_first debug-make_first FORCE
all: release-all debug-all FORCE
clean: release-clean debug-clean FORCE
distclean: release-distclean debug-distclean FORCE
-$(DEL_FILE) Makefile

release-mocclean:
$(MAKE) -f $(MAKEFILE).Release mocclean
debug-mocclean:
$(MAKE) -f $(MAKEFILE).Debug mocclean
mocclean: release-mocclean debug-mocclean

release-mocables:
$(MAKE) -f $(MAKEFILE).Release mocables
debug-mocables:
$(MAKE) -f $(MAKEFILE).Debug mocables
mocables: release-mocables debug-mocables

check: first

benchmark: first
FORCE:

$(MAKEFILE).Release: Makefile
$(MAKEFILE).Debug: Makefile

+ 2585
- 0
Makefile.Debug
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 2585
- 0
Makefile.Release
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 680
- 0
ReportPage.ui ファイルの表示

@@ -0,0 +1,680 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CReportPage</class>
<widget class="QWidget" name="CReportPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>980</width>
<height>617</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>391</width>
<height>561</height>
</rect>
</property>
<property name="title">
<string>Paramètres du rapport</string>
</property>
<widget class="QDateEdit" name="mReportEndDateEdit">
<property name="geometry">
<rect>
<x>94</x>
<y>70</y>
<width>110</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="mReportStartDateLbl">
<property name="geometry">
<rect>
<x>14</x>
<y>40</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Date début</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QDateEdit" name="mReportStartDateEdit">
<property name="geometry">
<rect>
<x>94</x>
<y>40</y>
<width>110</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="mReportEndDateLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Date fin</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>371</width>
<height>261</height>
</rect>
</property>
<property name="title">
<string>Filtre détection</string>
</property>
<widget class="QCheckBox" name="mReportFunctionPPI_2ChkBx">
<property name="geometry">
<rect>
<x>180</x>
<y>50</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>PP Intérieur</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionComptage_2ChkBx">
<property name="geometry">
<rect>
<x>180</x>
<y>90</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Comptage</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPEQ2ChkBx">
<property name="geometry">
<rect>
<x>180</x>
<y>110</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Panne Équipement</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionFNChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Frotteurs Négatifs</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPGChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>PG</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPEQ1ChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Panne Équipement</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPPE_2ChkBx">
<property name="geometry">
<rect>
<x>180</x>
<y>70</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>PP Extérieur</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionComptage_1ChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>130</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Comptage</string>
</property>
</widget>
<widget class="QLabel" name="mReportEndDateLbl_2">
<property name="geometry">
<rect>
<x>30</x>
<y>20</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>ZT1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="mReportEndDateLbl_3">
<property name="geometry">
<rect>
<x>190</x>
<y>20</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>ZT2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPPE_1ChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>PP Extérieur</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionPPI_1ChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>PP Intérieur</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionNoDecl1ChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>220</y>
<width>151</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Sans déclenchements</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportFunctionNoDecl2ChkBx">
<property name="geometry">
<rect>
<x>170</x>
<y>220</y>
<width>151</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Sans déclenchements</string>
</property>
</widget>
<widget class="QPushButton" name="mSelectAllFuncZT1Btn">
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Tout</string>
</property>
</widget>
<widget class="QPushButton" name="mSelectNoneFuncZT1Btn">
<property name="geometry">
<rect>
<x>70</x>
<y>180</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Rien</string>
</property>
</widget>
<widget class="QPushButton" name="mSelectNoneFuncZT2Btn">
<property name="geometry">
<rect>
<x>240</x>
<y>140</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Rien</string>
</property>
</widget>
<widget class="QPushButton" name="mSelectAllFuncZT2Btn">
<property name="geometry">
<rect>
<x>180</x>
<y>140</y>
<width>41</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Tout</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3">
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<width>371</width>
<height>141</height>
</rect>
</property>
<property name="title">
<string>Sélection des stations</string>
</property>
<widget class="QCheckBox" name="mReportStationSnowdonChkBx">
<property name="geometry">
<rect>
<x>150</x>
<y>90</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Snowdon</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationBeaugrandChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>H. Beaugrand</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationBourassaChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Henri-Bourassa</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationVertuChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Côte-Vertu</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationMontmorencyChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Montmorency</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationBerriChkBx">
<property name="geometry">
<rect>
<x>150</x>
<y>20</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Berri L4</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationLongueuilChkBx">
<property name="geometry">
<rect>
<x>150</x>
<y>40</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Longueuil</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationStMichelChkBx">
<property name="geometry">
<rect>
<x>150</x>
<y>70</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>St-Michel</string>
</property>
</widget>
<widget class="QCheckBox" name="mReportStationAngrignonChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Angrignon</string>
</property>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="mGenerateReportBtn">
<property name="geometry">
<rect>
<x>470</x>
<y>30</y>
<width>111</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Générer Rapport</string>
</property>
</widget>
<widget class="QProgressBar" name="mReportProgressBarr">
<property name="geometry">
<rect>
<x>510</x>
<y>470</y>
<width>321</width>
<height>23</height>
</rect>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
<widget class="QTextEdit" name="mReportProgressTextEdit">
<property name="geometry">
<rect>
<x>470</x>
<y>60</y>
<width>401</width>
<height>391</height>
</rect>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
<widget class="QLabel" name="mTimerLable">
<property name="geometry">
<rect>
<x>670</x>
<y>30</y>
<width>151</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QPushButton" name="mOpenReportBtn">
<property name="geometry">
<rect>
<x>470</x>
<y>510</y>
<width>80</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Ouvrir rapport</string>
</property>
</widget>
<widget class="QLabel" name="mReportPathLabel">
<property name="geometry">
<rect>
<x>560</x>
<y>510</y>
<width>381</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

+ 2
- 0
Source.txt ファイルの表示

@@ -0,0 +1,2 @@
D:\Main\Dev\ZTStats\LOGS
D:\Main\Dev\ZTStats\bleh

+ 264
- 0
Sources/DirParserThread.cpp ファイルの表示

@@ -0,0 +1,264 @@
#include "DirParserThread.h"
#include "ZTData.h"
#include "GlobalDefine.h"
#include "QString"
#include "QStringList"
#include <QDate>



void CDirParserThread::ParseDirectories()
{
// if(mRootDir.absolutePath().isEmpty() == true)
// {
// emit ParsingFinished(0);
// return;
// }

// ParseDir(mRootDir,mKeepData);
mMutex.lockForWrite();
mExecThread = true;
mMutex.unlock();
GatherReportData(mReportSettings,mReportFilters);

// emit ParsingFinished(1);
qDebug("Worker thread finished");


}

CDirParserThread::CDirParserThread()
{
mExecThread = true;
//Allocate a directory list for each station.
for(int i = 0; i < NB_ZT_ID; i++)
{
mReportDirectoriesList.append(QStringList());
}
}

void CDirParserThread::GatherReportData(CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters)
{
//First, get a list of the filtered directories
for(int i = 0; i < NB_ZT_ID; i++)
{
mReportDirectoriesList[i].clear();
}

for(int i = 0; i < ReportSettings.mDataSourceDirectoryPaths.size(); i++)
{
QString BaseDir(ReportSettings.mDataSourceDirectoryPaths.at(i));
if(ReportFilters.mReportStationAngrignon == true)
{
QDir AngDir(QString("%1/ANG/").arg(BaseDir));
mReportDirectoriesList[ANGRIGNON_ZT_ID].append(FilterDirectories(AngDir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationBeaugrand == true)
{
QDir Dir(QString("%1/HBGR/").arg(BaseDir));
mReportDirectoriesList[HONORE_BEAUGRAND_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationVertu == true)
{
QDir Dir(QString("%1/CVRT/").arg(BaseDir));
mReportDirectoriesList[COTE_VERTU_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationBourassa == true)
{
QDir Dir(QString("%1/HBOU/").arg(BaseDir));
mReportDirectoriesList[HENRI_BOURASSA_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationMontmorency == true)
{
QDir Dir(QString("%1/MMO/").arg(BaseDir));
mReportDirectoriesList[MONTMORENCY_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationBerri == true)
{
QDir Dir(QString("%1/BUQ4/").arg(BaseDir));
mReportDirectoriesList[BERRI_UQAM_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationLongueuil == true)
{
QDir Dir(QString("%1/LONG/").arg(BaseDir));
mReportDirectoriesList[LONGUEUIL_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationStMichel == true)
{
QDir Dir(QString("%1/SMIC/").arg(BaseDir));
mReportDirectoriesList[SAINT_MICHEL_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
if(ReportFilters.mReportStationSnowdon == true)
{
QDir Dir(QString("%1/SNW5/").arg(BaseDir));
mReportDirectoriesList[SNOWDON_ZT_ID].append(FilterDirectories(Dir,ReportFilters.mReportStartDate,ReportFilters.mReportEndDate));
}
}

//Check if we found any directory...
bool found = false;
for(int i = 0; i < mReportDirectoriesList.size(); i++)
{
if(mReportDirectoriesList.at(i).isEmpty() == false)
{
found = true;
break;
}
}
if(found == false)
{
emit ReportProgressStatus("Aucun log correspondant aux filtres n'a été trouvé");
emit ParsingFinished(0);
return;
}

//Now, parse each directory and collect data from ZT files.
for(int station = 0; station < mReportDirectoriesList.size(); station++)
{
if(mReportDirectoriesList[station].isEmpty() == false)
{

QList<CLogElement*> *Container = mReportDataContainer->at(station);
for(int dir =0; dir < mReportDirectoriesList[station].size(); dir++)
{
mMutex.lockForRead();
bool Run = mExecThread;
mMutex.unlock();

if(Run == false)
{
emit ThreadAborted();
return;
}
emit ReportProgressStatus(QString("Analyse des fichiers du répertoire %1").arg(mReportDirectoriesList[station].at(dir)));
ParseDir(QDir(mReportDirectoriesList[station].at(dir)),Container);
}
}
}

emit ParsingFinished(1);
}

QStringList CDirParserThread::FilterDirectories(QDir BaseDir, QDate StartDate, QDate EndDate)
{
QStringList OutputList;
OutputList.clear();

BaseDir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
BaseDir.setSorting(QDir::Name);
//QStringList DirList = BaseDir.entryList();
QFileInfoList DirList = BaseDir.entryInfoList();
for(int i = 0; i < DirList.size(); i++)
{
QString curDir = DirList.at(i).absoluteFilePath();
// QStringList DirNameChunks = curDir.split(BaseDir.separator());
// if(!DirNameChunks.isEmpty())
{
//QDate DirDate;
QString DirDateString = DirList.at(i).baseName().right(8);
QDate DirDate = QDate::fromString(DirDateString,"yyyyMMdd");

//Check if the directory is in the date range
if(DirDate <= EndDate && DirDate >= StartDate)
{
OutputList.append(curDir);
}

}
}

return OutputList;
}

int CDirParserThread::ParseDir(QDir dir, QList<CLogElement *> *Container)
{
mMutex.lockForRead();
bool Run = mExecThread;
mMutex.unlock();
if(Run == false)
{
emit ThreadAborted();
return 0;
}

QStringList LogFilters;
QFileInfoList list;
// QString LogDataDir = mProgramHandle->GetLogDataPath();
LogFilters << "*.bin";

//Load files in base directory
QDir LogDir(dir);
LogDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
LogDir.setNameFilters(LogFilters);
LogDir.setSorting(QDir::Name);
list = LogDir.entryInfoList();
if(list.size() != 0)
{
//Extract data for each passage
for(int i = 0; i < list.size(); i++)
{
mMutex.lockForRead();
bool Run = mExecThread;
mMutex.unlock();

if(Run == false)
{
emit ThreadAborted();
return 0;
}
//ParseNewLog(list.at(i).filePath(),KeepData);
unsigned int ret;

// emit ReportProgressStatus(QString("Analyse du fichiers %1").arg(list.at(i).fileName()));
CLogElement *NewLog = CTrainLogFileMgr::instance()->OpenTrainLog(list.at(i).filePath(),ret);
if(ret == RET_OK)
{
emit NewLogParsed(NewLog);
mMutex.lockForWrite();
Container->append(NewLog);
mMutex.unlock();
}

}
}
else
{
emit EmptyDirParsed();
}


// //Check for subdirectories
// QDir SubDirectories(dir);

// SubDirectories.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);

// QFileInfoList SubDirList = SubDirectories.entryInfoList();
// for(int i = 0; i < SubDirList.size(); i++)
// {
// ParseDir(QDir(SubDirList.at(i).absoluteFilePath()), KeepData);
// }

return 1;
}

//void CDirParserThread::SetParsingInfo(QDir dir, QString Filter, bool KeepData)
//{
// //qDebug("DirParserThread parsing info: dir: %s, Filter: %s",dir.dirName().toAscii().data(),Filter.toAscii().data());
// mRootDir = dir;
// mKeepData = KeepData;
// mFilter = Filter;
//}
void CDirParserThread::SetParsingInfo(CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters, QList<QList<CLogElement *> *> *ReportDataContainer)
{
mMutex.lockForWrite();
mReportSettings = ReportSettings;
mReportFilters = ReportFilters;
mReportDataContainer = ReportDataContainer;
mMutex.unlock();
}
void CDirParserThread::KillThread()
{
mMutex.lockForWrite();
mExecThread = false;
mMutex.unlock();
}

+ 46
- 0
Sources/DirParserThread.h ファイルの表示

@@ -0,0 +1,46 @@
#ifndef DIRPARSERTHREAD_H
#define DIRPARSERTHREAD_H
#include "GlobalDefine.h"
#include <QDir>
#include <QReadWriteLock>
#include "TrainLogFileMgr.h"
#include "ReportSettingsData.h"

class CDirParserThread : public QObject
{
Q_OBJECT
public:
CDirParserThread();
// void SetParsingInfo(QDir dir,QString Filter,bool KeepData = false);
void SetParsingInfo(CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters, QList<QList<CLogElement *> *> *ReportDataContainer);
void KillThread();
int ParseDir(QDir dir, QList<CLogElement*> *Container);

void GatherReportData(CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters);
QStringList FilterDirectories(QDir BaseDir, QDate StartDate, QDate EndDate);

private:
QDir mRootDir;
bool mKeepData;
QReadWriteLock mMutex;
bool mExecThread;
QString mFilter;
QList<QStringList> mReportDirectoriesList;

CReportProgramSettingsData mReportSettings;
CReportConfigData mReportFilters;
QList<QList<CLogElement*>*> *mReportDataContainer;

public slots:
void ParseDirectories();

signals:
void NewLogParsed(QString,bool);
void NewLogParsed(CLogElement*);
void ParsingFinished(int);
void EmptyDirParsed();
void ThreadAborted();
void ReportProgressStatus(QString);
};

#endif // DIRPARSERTHREAD_H

+ 75
- 0
Sources/GlobalDefine.h ファイルの表示

@@ -0,0 +1,75 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Description du fichier si nécessaire.

*/

/* ************************************************************************** */
/* Revision:
### 20121210 JFM
Verision d'origine.

### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */
#ifndef GLOBAL_DEFINE
#define GLOBAL_DEFINE

//Screen resolution.
#define SCREEN_RES_WIDTH 1200
#define SCREEN_RES_HEIGHT 700

//Train parameters
#define MR_BOGIE_LENGTH 1.52 //meters
#define MPM_BOGIE_LENGTH 2.0 //meters



//Misc definitions
#define USE_FAST_LOGFILE_LOADING
#define MAX_LOG_FILE_COUNT 25000
#define MAX_LOG_DIR_SIZE (qint64)1073741824 //in bytes = 1 GB
#define USE_ANALOG_ACQUISITION


#define ZT_TCP_PORT 1234
#define ZT_UDP_PORT 41245

//Debug defs
//#define LOG_RAM_USAGE

//General purpose return values.
enum eGeneralRetValue
{
RET_OK,
RET_ERROR
};

enum eZTID
{
ANGRIGNON_ZT_ID,
HONORE_BEAUGRAND_ZT_ID,
LONGUEUIL_ZT_ID,
BERRI_UQAM_ZT_ID,
SNOWDON_ZT_ID,
SAINT_MICHEL_ZT_ID,
COTE_VERTU_ZT_ID,
HENRI_BOURASSA_ZT_ID,
MONTMORENCY_ZT_ID,

NB_ZT_ID
};

#endif

+ 646
- 0
Sources/LogMgr.cpp ファイルの表示

@@ -0,0 +1,646 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 - 2013 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Cette classe est responsable de la création d'une liste d'objets CLogElement
à partir des données de passage des trains contenues dans les fichiers log.
Cette classe est principalement utilisée par l'interface graphique pour la
visualisation des passages.
*/

/* ************************************************************************** */
/* Revision:
### 20121024 JFM

### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#include "LogMgr.h"

#include "TrainLogFileMgr.h"
//#include "OutilZT.h"
//#include "ZTLog.h"
#include <QCoreApplication>
#include <QMessageBox>
#include <QBuffer>
#include <QThread>

CLogMgr::CLogMgr()
{
mProgramHandle = 0;

mDirParserThread = new QThread();
mDirParserWorkerThread = new CDirParserThread();
mDirParserWorkerThread->moveToThread(mDirParserThread);
connect(mDirParserThread,SIGNAL(started()),mDirParserWorkerThread,SLOT(ParseDirectories()));
connect(mDirParserThread,SIGNAL(finished()),this,SLOT(ThreadQuit()));
connect(mDirParserThread,SIGNAL(terminated()),this,SLOT(ThreadTerminated()));
// connect(mDirParserWorkerThread,SIGNAL(NewLogParsed(QString,bool)),this,SLOT(NewLogParsed(QString,bool)));
connect(mDirParserWorkerThread,SIGNAL(NewLogParsed(CLogElement*)),this,SLOT(NewLogParsed(CLogElement*)));
connect(mDirParserWorkerThread,SIGNAL(ParsingFinished(int)),this,SLOT(DirParsingFinished(int)));
connect(mDirParserWorkerThread,SIGNAL(EmptyDirParsed()),this,SLOT(EmptyDirParsed()));

mDatabaseParsingTimer = new QTimer();
mDatabaseParsingTimer->setInterval(60000);
connect(mDatabaseParsingTimer,SIGNAL(timeout()),this,SLOT(ParsingTimerExpired()));

}

CLogMgr::~CLogMgr()
{
DestroyLogList();
delete mDirParserThread;
delete mDirParserWorkerThread;
delete mDatabaseParsingTimer;
}

unsigned int CLogMgr::DestroyLogList()
{
for(int i = 0; i < mPassagesList.size(); i++)
{
delete mPassagesList.at(i);
}

mPassagesList.clear();

return RET_OK;
}

unsigned int CLogMgr::ProtectLogElementFile(bool IsProtected, CLogElement *Element)
{
if(Element->mZTLogType == ZT1_LOG_TYPE)
{
CZT1LogElement *ZT1Element = (CZT1LogElement*)Element;
if(CTrainLogFileMgr::instance()->SetTrainLogProtected(IsProtected,ZT1Element->mLogFileName) == RET_OK)
{
ZT1Element->mFileProtected = IsProtected;
SaveDatabaseFile();
return RET_OK;
}
}
else if(Element->mZTLogType == ZT2_LOG_TYPE)
{
CZT2LogElement *ZT2Element = (CZT2LogElement*)Element;
if(CTrainLogFileMgr::instance()->SetTrainLogProtected(IsProtected,ZT2Element->mLogFileName) == RET_OK)
{
ZT2Element->mFileProtected = IsProtected;
SaveDatabaseFile();
return RET_OK;
}
}

return RET_ERROR;
}
unsigned int CLogMgr::ParseLogs(bool RebuildDatabase, bool KeepData)
{
DestroyLogList();
qDebug("Parsing Logs now...");

mSaveDBFile = false;
mParsingFinished = false;
// mProgramHandle->DatabaseFetchingBegin(this);
mDatabaseFileCounter = 0;
if(RebuildDatabase == true)
{
qDebug("Rebuilding database now...");
//mDirParserWorkerThread->SetParsingInfo(QDir(mLogDataDir),"*.bin",KeepData);
qDebug("Starting parser thread now...");
mDirParserThread->start();
mSaveDBFile = true;
}
else
{
//Load database file.
QDir BaseDir(mLogDataDir);
QString DatabaseFilePath = BaseDir.filePath("Trains.zdb");
// DatabaseFilePath += "Trains.zdb";
QFile* DatabaseFile = new QFile(BaseDir.filePath("Trains.zdb")/*DatabaseFilePath*/);
if(DatabaseFile)
{
if(DatabaseFile->open(QIODevice::ReadOnly | QIODevice::Unbuffered) == false)
{
//rebuild database...
qDebug("Failed to open Trains.zdb, rebuilding database now...");
//mDirParserWorkerThread->SetParsingInfo(QDir(mLogDataDir),"*.bin",KeepData);
qDebug("Starting parser thread now...");
mDirParserThread->start();
mSaveDBFile = true;
delete DatabaseFile;
return RET_OK;
}
}
else
{
DirParsingFinished(0);
return RET_ERROR;
}


QByteArray DBData = DatabaseFile->readAll();
QDataStream *DBStrm = new QDataStream(DBData);

qint32 NBRecords;
*DBStrm >> NBRecords;

for(qint32 i = 0; i < NBRecords; i++)
{
unsigned int LogType;
*DBStrm >> LogType;

if(LogType == ZT1_LOG_TYPE)
{
CZT1LogElement *NewElement = new CZT1LogElement;


*DBStrm >> NewElement->mPassageDateTime
>> NewElement->mTrainType
>> NewElement->mNbElements
>> NewElement->mThreadDataStartTime
>> NewElement->mThreadDataEndTime
>> NewElement->mLogFileName
>> NewElement->mMeanSpeed
>> NewElement->mFlags
>> NewElement->mStationName
>> NewElement->mFileProtected;

int NBDetect;
*DBStrm >> NBDetect;

for(int i = 0; i < NBDetect; i++)
{
CZTDetectionData *NewDetection = new CZTDetectionData;
*DBStrm >> NewDetection->mDetectionID
>> NewDetection->mRank
>> NewDetection->mTimeStamp;

NewElement->mZTDetections.append(NewDetection);
}
NewLogParsed(NewElement);

}
else if(LogType == ZT2_LOG_TYPE)
{
CZT2LogElement *NewElement = new CZT2LogElement;


*DBStrm >> NewElement->mPassageDateTime
>> NewElement->mLogFileName
>> NewElement->mNbElements
>> NewElement-> mStationName
>> NewElement->mFlags
>> NewElement->mFileProtected;

int NBDetect;
*DBStrm >> NBDetect;

for(int i = 0; i < NBDetect; i++)
{
CZTDetectionData *NewDetection = new CZTDetectionData;
*DBStrm >> NewDetection->mDetectionID
>> NewDetection->mRank
>> NewDetection->mTimeStamp;

NewElement->mZTDetections.append(NewDetection);
}

NewLogParsed(NewElement);
}
else
{
qDebug("Invalid logtype in DB file...");
}


}

DatabaseFile->close();
delete DatabaseFile;
delete DBStrm;

DirParsingFinished(1);

}
return RET_OK;
}

unsigned int CLogMgr::SaveDatabaseFile()
{

QDir BaseDir(mLogDataDir);
QString DatabaseFilePath = BaseDir.filePath("Trains.zdb");
// DatabaseFilePath += "Trains.zdb";
QFile* DatabaseFile = new QFile(BaseDir.filePath("Trains.zdb")/*DatabaseFilePath*/);


if(DatabaseFile)
{
if(DatabaseFile->open(QIODevice::WriteOnly | QIODevice::Unbuffered) == false)
{
QMessageBox::information(0,"Erreur","Impossible de créer le fichier DB");
delete DatabaseFile;
return RET_ERROR;
}
}
else
{
QMessageBox::information(0,"Erreur","Impossible de créer le fichier DB");
return RET_ERROR;
}


QByteArray byteArray;
QBuffer FileBuffer(&byteArray);
FileBuffer.open(QIODevice::WriteOnly);
QDataStream *DBStrm = new QDataStream(&FileBuffer);

qint32 NBRecords = mPassagesList.size();
*DBStrm << NBRecords;

for(qint32 i = 0; i < NBRecords; i++)
{
unsigned int LogType = mPassagesList.at(i)->mZTLogType;
*DBStrm << LogType;

if(LogType == ZT1_LOG_TYPE)
{
CZT1LogElement *NewElement = (CZT1LogElement*)mPassagesList.at(i);

QDateTime test = NewElement->mPassageDateTime;

// *DBStrm << NewElement->mPassageDateTime
*DBStrm << test
<< NewElement->mTrainType
<< NewElement->mNbElements
<< NewElement->mThreadDataStartTime
<< NewElement->mThreadDataEndTime
<< NewElement->mLogFileName
<< NewElement->mMeanSpeed
<< NewElement->mFlags
<< NewElement->mStationName
<< NewElement->mFileProtected;

int NBDetect = NewElement->mZTDetections.size();
*DBStrm << NBDetect;

for(int i = 0; i < NBDetect; i++)
{
*DBStrm << NewElement->mZTDetections.at(i)->mDetectionID
<< NewElement->mZTDetections.at(i)->mRank
<< NewElement->mZTDetections.at(i)->mTimeStamp;
}
}
else if(LogType == ZT2_LOG_TYPE)
{
CZT2LogElement *NewElement = (CZT2LogElement*)mPassagesList.at(i);


*DBStrm << NewElement->mPassageDateTime
<< NewElement->mLogFileName
<< NewElement->mNbElements
<< NewElement->mStationName
<< NewElement->mFlags
<< NewElement->mFileProtected;

int NBDetect = NewElement->mZTDetections.size();
*DBStrm << NBDetect;

for(int i = 0; i < NBDetect; i++)
{
*DBStrm << NewElement->mZTDetections.at(i)->mDetectionID
<< NewElement->mZTDetections.at(i)->mRank
<< NewElement->mZTDetections.at(i)->mTimeStamp;
}
}
else
{
qDebug("Invalid log type in array!!!");
}


}


FileBuffer.seek(0);
DatabaseFile->write(FileBuffer.buffer());
DatabaseFile->flush();

FileBuffer.close();
DatabaseFile->close();
delete DatabaseFile;
delete DBStrm;
mSaveDBFile = false;
return RET_OK;
}

unsigned int CLogMgr::RebuildDatabaseFile()
{
ParseLogs(true,false);
mSaveDBFile = true;
return RET_OK;
}



int CLogMgr::ParseDir(QDir dir, bool KeepData)
{

QStringList LogFilters;
QFileInfoList list;
// QString LogDataDir = mProgramHandle->GetLogDataPath();
LogFilters << "*.bin";

//Load files in base directory
QDir LogDir(dir);
LogDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
LogDir.setNameFilters(LogFilters);
LogDir.setSorting(QDir::Name);
list = LogDir.entryInfoList();
if(list.size() != 0)
{
//Extract data for each passage
for(int i = 0; i < list.size(); i++)
{
ParseNewLog(list.at(i).filePath(),KeepData);
}
}


//Check for subdirectories
QDir SubDirectories(dir);

SubDirectories.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);

QFileInfoList SubDirList = SubDirectories.entryInfoList();
for(int i = 0; i < SubDirList.size(); i++)
{
ParseDir(QDir(SubDirList.at(i).absoluteFilePath()), KeepData);
}

return 1;
}

CLogElement* CLogMgr::LoadLogData(CLogElement *Element)
{
if(Element->mZTLogType == ZT1_LOG_TYPE)
{
CZT1LogElement *TargetElement = (CZT1LogElement*)Element;
QString FilePath = TargetElement->mLogFileName;
unsigned int ret;

//Make shure that the lists are empty in the target element
for(int i = 0; i < TargetElement->mZTLogData.size(); i++)
{
delete TargetElement->mZTLogData.at(i);
}
for(int i = 0; i < TargetElement->mZTDetections.size(); i++)
{
delete TargetElement->mZTDetections.at(i);
}

TargetElement->mZTLogData.clear();
TargetElement->mZTDetections.clear();

//Passing the TargetElement to the OpenTrainLog function will fill it with data
CTrainLogFileMgr::instance()->OpenTrainLog(FilePath,ret,TargetElement,true);

return (CLogElement*)TargetElement;
}
else if(Element->mZTLogType == ZT2_LOG_TYPE)
{
CZT2LogElement *TargetElement = (CZT2LogElement*)Element;
QString FilePath = TargetElement->mLogFileName;
unsigned int ret;

//Make shure that the lists are empty in the target element
for(int i = 0; i < TargetElement->mZTLogData.size(); i++)
{
delete TargetElement->mZTLogData.at(i);
}
for(int i = 0; i < TargetElement->mZTDetections.size(); i++)
{
delete TargetElement->mZTDetections.at(i);
}

TargetElement->mZTLogData.clear();
TargetElement->mZTDetections.clear();

//Passing the TargetElement to the OpenTrainLog function will fill it with data
CTrainLogFileMgr::instance()->OpenTrainLog(FilePath,ret,TargetElement,true);

return (CLogElement*)TargetElement;
}

return 0;

}

unsigned int CLogMgr::FreeLogData(CLogElement *Element)
{
if(Element->mZTLogType == ZT1_LOG_TYPE)
{
CZT1LogElement *temp = (CZT1LogElement*)Element;
for(int i = 0; i < temp->mZTLogData.size(); i++)
delete temp->mZTLogData.at(i);
temp->mZTLogData.clear();
}
if(Element->mZTLogType == ZT2_LOG_TYPE)
{
CZT2LogElement *temp = (CZT2LogElement*)Element;
for(int i = 0; i < temp->mZTLogData.size(); i++)
delete temp->mZTLogData.at(i);
temp->mZTLogData.clear();
}

return RET_OK;

}

unsigned int CLogMgr::DeleteLog(int LogIndex)
{
if(LogIndex >= mPassagesList.size())
return RET_ERROR;

QString Filename;

CLogElement *Element = mPassagesList.takeAt(LogIndex);
FreeLogData(Element); //make shure no data will be leaked
{
if(Element->mZTLogType == ZT1_LOG_TYPE)
{
CZT1LogElement *temp = (CZT1LogElement*)Element;
Filename = temp->mLogFileName;

}
if(Element->mZTLogType == ZT2_LOG_TYPE)
{
CZT2LogElement *temp = (CZT2LogElement*)Element;
Filename = temp->mLogFileName;
}
}
QDir DirObject;
DirObject.remove(Filename);
delete Element;

SaveDatabaseFile();

return RET_OK;
}

bool CLogMgr::ParseNextLog()
{
if((int)mLogsFileIndex >= mLogsFilelist.size())
return false;

//Extract data

if(ParseNewLog(mLogsFilelist.at(mLogsFileIndex).filePath()) == RET_ERROR)
return false;

mLogsFileIndex++;

return true;
}

void CLogMgr::NewLogParsed(QString Filename,bool KeepData)
{
ParseNewLog(Filename,KeepData);
mDatabaseParsingTimer->start();
}

void CLogMgr::NewLogParsed(CLogElement * NewLog)
{
mPassagesList.append(NewLog);
mDatabaseParsingTimer->start();
// mProgramHandle->DatabaseFetchingTick(this,mDatabaseFileCounter++);

}

void CLogMgr::DirParsingFinished(int Res)
{

mDatabaseParsingTimer->stop();
mParsingFinished = true;
mDirParserThread->quit();
// mProgramHandle->LogsDatabaseLoaded(this,Res);

if(mSaveDBFile == true)
{
SaveDatabaseFile();
}

}

void CLogMgr::ParsingTimerExpired()
{
qDebug("Parsing timer timeout");
mDirParserWorkerThread->KillThread();
mDirParserThread->terminate();
DirParsingFinished(2);

}
void CLogMgr::EmptyDirParsed()
{
//The thread is not stuck. Kick the timer...
mDatabaseParsingTimer->start();
}

void CLogMgr::ThreadQuit()
{
qDebug("Thread quit slot");
}

void CLogMgr::ThreadTerminated()
{
qDebug("Thread terminated slot");
}


unsigned int CLogMgr::ParseNewLog(QString FileName, bool KeepData)
{
Q_UNUSED(KeepData)

unsigned int ret;
CLogElement *NewLog = CTrainLogFileMgr::instance()->OpenTrainLog(FileName,ret);

if(ret == RET_ERROR)
{
return RET_ERROR;
}

//the date and time of the log entry is assigned the date and time of the first record...
if(NewLog->mZTLogType == ZT1_LOG_TYPE)
{
mPassagesList.append(NewLog);
}
else if(NewLog->mZTLogType == ZT2_LOG_TYPE)
{
mPassagesList.append(NewLog);
}
return RET_OK;
}

unsigned int CLogMgr::ParseImportedLogs(QStringList *NewLogFiles)
{
if(NewLogFiles == 0)
{
return RET_ERROR;
}

for(int i = 0; i < NewLogFiles->size(); i++)
{
ParseNewLog(NewLogFiles->at(i));
}

SaveDatabaseFile();
// mProgramHandle->LogsDatabaseLoaded(this,1);

return RET_OK;
}

unsigned int CLogMgr::GetLogsCount()
{
return mPassagesList.size();
}

QList<CLogElement*> * CLogMgr::GetLogsList()
{
return &mPassagesList;
}

CLogElement::~CLogElement()
{
}

CZT1LogElement::~CZT1LogElement()
{
qDeleteAll(mZTLogData);
mZTLogData.clear();

qDeleteAll(mZTDetections);
mZTDetections.clear();
}

CZT2LogElement::~CZT2LogElement()
{
for(int i = 0; i < mZTLogData.size(); i++)
delete mZTLogData.at(i);
mZTLogData.clear();

for(int i = 0; i < mZTDetections.size(); i++)
delete mZTDetections.at(i);
mZTDetections.clear();

}

+ 145
- 0
Sources/LogMgr.h ファイルの表示

@@ -0,0 +1,145 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 - 2013 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Description du fichier si nécessaire.
*/

/* ************************************************************************** */
/* Revision:
### YYYMMDD JFM
Verision d'origine.
### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#ifndef LOGMGR_H
#define LOGMGR_H

#include "ZTData.h"
#include "GlobalDefine.h"
#include <QList>
#include <QDir>
#include <QTimer>
#include <QReadWriteLock>
#include "DirParserThread.h"

class CLogElement
{
public:
unsigned int mZTLogType;
virtual ~CLogElement();
};
//QDataStream &operator<<(QDataStream &out, const CLogElement &source);
//QDataStream &operator>>(QDataStream &in, CLogElement &dest);

class CZT1LogElement : public CLogElement
{
public:
CZT1LogElement(){mZTLogType=ZT1_LOG_TYPE;}
~CZT1LogElement();
QDateTime mPassageDateTime;
QVector<CZT1LogData*> mZTLogData;
QVector<CZTDetectionData*> mZTDetections;
quint32 mTrainType;
quint32 mNbElements;
quint64 mThreadDataStartTime, mThreadDataEndTime;
QString mLogFileName;
qreal mMeanSpeed;
CZT1FlagsData mFlags;
QString mStationName;
bool mFileProtected;
int mFileVersion;
};
//QDataStream &operator<<(QDataStream &out, const CZT1LogElement &source);
//QDataStream &operator>>(QDataStream &in, CZT1LogElement &dest);

class CZT2LogElement : public CLogElement
{
public:
CZT2LogElement(){mZTLogType = ZT2_LOG_TYPE;}
~CZT2LogElement();
QDateTime mPassageDateTime;
QVector<CZT2LogData*> mZTLogData;
QVector<CZTDetectionData*> mZTDetections;
QString mLogFileName;
quint32 mNbElements;
QString mStationName;
CZT2FlagsData mFlags;
bool mFileProtected;
};

class COutilZT;

class CLogMgr : public QObject
{
Q_OBJECT
public:
CLogMgr();
~CLogMgr();

COutilZT *mProgramHandle;

unsigned int GetLogsCount();
QList<CLogElement*> *GetLogsList();
unsigned int ParseLogs(bool RebuildDatabase = false, bool KeepData = false);
unsigned int ParseNewLog(QString FileName, bool KeepData = false);
unsigned int ParseImportedLogs(QStringList *NewLogFiles);
CLogElement* LoadLogData(CLogElement * Element);
unsigned int FreeLogData(CLogElement * Element);
unsigned int DeleteLog(int LogIndex);
void SetLogDataDir(QString Dir){mLogDataDir = Dir;}
bool ParseNextLog();
unsigned int SaveDatabaseFile();
unsigned int RebuildDatabaseFile();
unsigned int ProtectLogElementFile(bool IsProtected, CLogElement *Element);
QTimer *mDatabaseParsingTimer;
QDir GetBaseLogDataDir(){return QDir(mLogDataDir);}


private:
CDirParserThread *mDirParserWorkerThread;
QThread *mDirParserThread;
QList<CLogElement*> mPassagesList;
unsigned int DestroyLogList();
int ParseDir(QDir dir, bool KeepData = false);


QFileInfoList mLogsFilelist;
unsigned int mLogsFileIndex;
QString mLogDataDir;

bool mParsingFinished;
unsigned int mDatabaseFileCounter;
bool mSaveDBFile;

public slots:
void NewLogParsed(QString,bool);
void NewLogParsed(CLogElement*);
void DirParsingFinished(int);
void ParsingTimerExpired();
void EmptyDirParsed();


void ThreadQuit();
void ThreadTerminated();

};




#endif // LOGMGR_H


+ 23
- 0
Sources/MainWindow.cpp ファイルの表示

@@ -0,0 +1,23 @@
#include "MainWindow.h"
#include "ui_MainWindow.h"

CMainWindow::CMainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::CMainWindow)
{
ui->setupUi(this);
setWindowTitle("Générateur de rapport ZT");

mMainWindowTabWidget = new QTabWidget(this);
mReportPage = new CReportPage(this);
mSettingsPage = new CSettingsPage(this);

setCentralWidget(mMainWindowTabWidget);
mMainWindowTabWidget->addTab(mReportPage,"Rapport");
mMainWindowTabWidget->addTab(mSettingsPage,"Paramètres");
}

CMainWindow::~CMainWindow()
{
delete ui;
}

+ 30
- 0
Sources/MainWindow.h ファイルの表示

@@ -0,0 +1,30 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTabWidget>
#include "ReportPage.h"
#include "SettingsPage.h"


namespace Ui {
class CMainWindow;
}

class CMainWindow : public QMainWindow
{
Q_OBJECT

public:
explicit CMainWindow(QWidget *parent = 0);
~CMainWindow();

QTabWidget *mMainWindowTabWidget;
CReportPage *mReportPage;
CSettingsPage *mSettingsPage;

private:
Ui::CMainWindow *ui;
};

#endif // MAINWINDOW_H

+ 342
- 0
Sources/ReportGenerator.cpp ファイルの表示

@@ -0,0 +1,342 @@
#include "ReportGenerator.h"
#include <QtXlsx>
#include <QStringList>
#include "ZTData.h"
#include "LogMgr.h"
#include "GlobalDefine.h"
#include "ZTStats.h"

CReportGenerator::CReportGenerator()
{
mDirParserThread = new QThread();
mDirParserWorkerThread = new CDirParserThread();
mDirParserWorkerThread->moveToThread(mDirParserThread);
connect(mDirParserThread,SIGNAL(started()),mDirParserWorkerThread,SLOT(ParseDirectories()));
connect(mDirParserThread,SIGNAL(finished()),this,SLOT(ThreadQuit()));
connect(mDirParserWorkerThread,SIGNAL(ParsingFinished(int)),this,SLOT(DirParsingFinished(int)));
connect(mDirParserWorkerThread,SIGNAL(ReportProgressStatus(QString)),this,SLOT(ThreadReportStatus(QString)));
connect(mDirParserWorkerThread,SIGNAL(ThreadAborted()),this,SLOT(DirThreadAborted()));

mStationNames << "Angrignon" << "Beaugrand" << "Longueuil" << "Berri" << "Snowdon" << "St-Michel" << "Vertu" << "Bourassa" << "Montmorency";

//Allocate report data structure for each station
for(int i = 0; i < NB_ZT_ID; i++)
{ QList<CLogElement*> *ElementList = new QList<CLogElement*>;
mReportData.append(ElementList);
}
}

CReportGenerator::~CReportGenerator()
{
mDirParserThread->quit();
delete mDirParserWorkerThread;
//delete mDirParserThread;
}

int CReportGenerator::GenerateReport(QString ReportFileName, CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters)
{

mReportFilename = ReportFileName;
mReportFilters = ReportFilters;

ClearReportData();

mDirParserWorkerThread->SetParsingInfo(ReportSettings,ReportFilters,&mReportData);
mDirParserThread->start();


return RET_OK;
}

int CReportGenerator::ClearReportData()
{
for(int station = 0; station < mReportData.size(); station++)
{
QList<CLogElement*> *LogsList = mReportData.at(station);
for(int log = 0; log < LogsList->size(); log++)
{
delete LogsList->at(log);
}
LogsList->clear();
}
return RET_OK;
}



void CReportGenerator::ThreadQuit()
{
qDebug("Parsing thread quit");
}

void CReportGenerator::ThreadTerminated()
{
qDebug("Parsing thread terminated");
}

void CReportGenerator::DirParsingFinished(int Res)
{
mDirParserThread->exit();
if(Res == 0)
{
ClearReportData();
ThreadReportStatus("La génération du rapport a échoué...");
mProgramPtr->ReportCreationFinished(QString());
return;
}

//Generate report
GenerateExcelReport();
}

void CReportGenerator::DirThreadAborted()
{
mDirParserThread->exit();
ClearReportData();
ThreadReportStatus("La génération du rapport a été annulée");
mProgramPtr->ReportCreationFinished(QString());
}

int CReportGenerator::GenerateExcelReport()
{
if(mReportFilename.isEmpty())
{
return RET_ERROR;
}
ThreadReportStatus("Passages analysés... création du fichier Excel.");

QXlsx::Document ExcelDoc(mReportFilename);
//Clean the file if it already exist
for(int station = 0; station < mStationNames.size(); station++)
{
ExcelDoc.deleteSheet(mStationNames.at(station));
}

for(int station = 0; station < mReportData.size(); station++)
{
int PassageID = 1;
if(mReportData.at(station)->isEmpty() == false)
{
QList<CLogElement*> *PassageLogData = mReportData.at(station);
int row = 6;
ExcelDoc.addSheet(mStationNames.at(station));
ExcelDoc.selectSheet(mStationNames.at(station));

//Create Header
ExcelDoc.write(1,1,QString("Rapport de déclenchements ZT de la station %1").arg(mStationNames.at(station)));
ExcelDoc.write(2,1,QString("Date de début %1").arg(mReportFilters.mReportStartDate.toString("yyyy-MM-dd")));
ExcelDoc.write(3,1,QString("Date de fin %1").arg(mReportFilters.mReportEndDate.toString("yyyy-MM-dd")));

ExcelDoc.write(5,1,QString("ID Passage"));
ExcelDoc.write(5,2,QString("Date et Heure"));
ExcelDoc.write(5,3,QString("Nb Décl (passage)"));
ExcelDoc.write(5,4,QString("Zone"));
ExcelDoc.write(5,5,QString("Composition"));
ExcelDoc.write(5,6,QString("Déclenchement"));
ExcelDoc.write(5,7,QString("Rang"));

for(int log = 0; log < PassageLogData->size(); log++)
{
if(PassageLogData->at(log)->mZTLogType == ZT1_LOG_TYPE)
{
bool IncPassage = false;
CZT1LogElement *Element = (CZT1LogElement*)PassageLogData->at(log);
if(mReportFilters.mReportIncludeSansDeclZT1 == true)
{
ExcelDoc.write(row,1,PassageID);
ExcelDoc.write(row,2,Element->mPassageDateTime.toString("yyyy-MM-dd hh:mm:ss"));
ExcelDoc.write(row,3,Element->mZTDetections.size());
ExcelDoc.write(row,4,"ZT1");
ExcelDoc.write(row,5,QString("%1-%2-%3").arg(Element->mFlags.mTrainCompo1).arg(Element->mFlags.mTrainCompo2).arg(Element->mFlags.mTrainCompo3));
ExcelDoc.write(row,6,"---");
ExcelDoc.write(row,7,"---");
row++;
}

if(Element->mZTDetections.size() != 0)
{
for(int detect = 0; detect < Element->mZTDetections.size(); detect++)
{
QString DetectionName = "";
switch(Element->mZTDetections.at(detect)->mDetectionID)
{
case DETECTION_FN_DETECTION:
{
if(mReportFilters.mReportFilterIncludeFN == true)
{
DetectionName = "FN";
}
break;
}
case DETECTION_MAGNETIC_SENSOR_COUNT:
{
if(mReportFilters.mReportfilterIncludeComptage1 == true)
{
DetectionName = "Erreur de comptage";
}
break;
}
case DETECTION_PG_DETECTION:
{
if(mReportFilters.mReportfilterIncludePG == true)
{
DetectionName = "PG";
}
break;
}
case DETECTION_PPI_DETECTION:
{
if(mReportFilters.mReportfilterIncludePPI1 == true)
{
DetectionName = "PPI";
}
break;
}
case DETECTION_PPE_DETECTION:
{
if(mReportFilters.mReportfilterIncludePPE1 == true)
{
DetectionName = "PPE";
}
break;
}
case DETECTION_PEQ1_DETECTION:
{
if(mReportFilters.mReportfilterIncludePEQ1 == true)
{
DetectionName = "Panne équipement";
}
break;
}
default:
{
DetectionName.clear();
break;
}
}

if(DetectionName.isEmpty() == false)
{
ExcelDoc.write(row,1,PassageID);
ExcelDoc.write(row,2,Element->mPassageDateTime.toString("yyyy-MM-dd hh:mm:ss"));
ExcelDoc.write(row,3,Element->mZTDetections.size());
ExcelDoc.write(row,4,"ZT1");
ExcelDoc.write(row,5,QString("%1-%2-%3").arg(Element->mFlags.mTrainCompo1).arg(Element->mFlags.mTrainCompo2).arg(Element->mFlags.mTrainCompo3));
ExcelDoc.write(row,6,DetectionName);
ExcelDoc.write(row,7,Element->mZTDetections.at(detect)->mRank);
row++;
IncPassage = true; //we had ad least one log added, this passage must count...
}
}

}

if(IncPassage == true || mReportFilters.mReportIncludeSansDeclZT1 == true)
{
PassageID++;
}
}
else if(PassageLogData->at(log)->mZTLogType == ZT2_LOG_TYPE)
{
bool IncPassage = false;
CZT2LogElement *Element = (CZT2LogElement*)PassageLogData->at(log);
if(mReportFilters.mReportIncludeSansDeclZT2 == true)
{
ExcelDoc.write(row,1,PassageID);
ExcelDoc.write(row,2,Element->mPassageDateTime.toString("yyyy-MM-dd hh:mm:ss"));
ExcelDoc.write(row,3,Element->mZTDetections.size());
ExcelDoc.write(row,4,"ZT2");
ExcelDoc.write(row,5,QString("%1-%2-%3").arg(Element->mFlags.mTrainCompo1).arg(Element->mFlags.mTrainCompo2).arg(Element->mFlags.mTrainCompo3));
ExcelDoc.write(row,6,"---");
ExcelDoc.write(row,7,"---");
row++;
}

if(Element->mZTDetections.size() != 0)
{
for(int detect = 0; detect < Element->mZTDetections.size(); detect++)
{
QString DetectionName = "";
switch(Element->mZTDetections.at(detect)->mDetectionID)
{
case DETECTION_ZT2_MAGNETIC_SENCOR_COUNT:
{
if(mReportFilters.mReportfilterIncludeComptage2 == true)
{
DetectionName = "Erreur de comptage";
}
break;
}
case DETECTION_ZT2_PPI_DETECTION:
{
if(mReportFilters.mReportfilterIncludePPI2 == true)
{
DetectionName = "PPI";
}
break;
}
case DETECTION_ZT2_PPE_DETECTION:
{
if(mReportFilters.mReportfilterIncludePPE2 == true)
{
DetectionName = "PPE";
}
break;
}
case DETECTION_PEQ2_DETECTION:
{
if(mReportFilters.mReportfilterIncludePEQ2 == true)
{
DetectionName = "Panne Équipement";
}
break;
}
default:
{
DetectionName.clear();
break;
}
}

if(DetectionName.isEmpty() == false)
{
ExcelDoc.write(row,1,PassageID);
ExcelDoc.write(row,2,Element->mPassageDateTime.toString("yyyy-MM-dd hh:mm:ss"));
ExcelDoc.write(row,3,Element->mZTDetections.size());
ExcelDoc.write(row,4,"ZT2");
ExcelDoc.write(row,5,QString("%1-%2-%3").arg(Element->mFlags.mTrainCompo1).arg(Element->mFlags.mTrainCompo2).arg(Element->mFlags.mTrainCompo3));
ExcelDoc.write(row,6,DetectionName);
ExcelDoc.write(row,7,Element->mZTDetections.at(detect)->mRank);
row++;
IncPassage = true; //we had ad least one log added, this passage must count...
}
}

}
if(IncPassage == true || mReportFilters.mReportIncludeSansDeclZT2)
{
PassageID++;
}
}
}
}
}

ExcelDoc.save();
ThreadReportStatus("Rapport créé avec succès!");
mProgramPtr->ReportCreationFinished(mReportFilename);
qDebug("Création du rapport terminée");

return RET_OK;
}

void CReportGenerator::ThreadReportStatus(QString status)
{
mProgramPtr->UpdateReportProgressStatus(status);
}

int CReportGenerator::AbortReportCreation()
{
mDirParserWorkerThread->KillThread();
return RET_OK;
}

+ 46
- 0
Sources/ReportGenerator.h ファイルの表示

@@ -0,0 +1,46 @@
#ifndef REPORTGENERATOR_H
#define REPORTGENERATOR_H
#include "ReportSettingsData.h"
#include <QList>
#include <QStringList>
#include <QObject>
#include <QThread>
#include "DirParserThread.h"
#include "ZTData.h"

class CZTStats;

class CReportGenerator : public QObject
{
Q_OBJECT
public:
CReportGenerator();
~CReportGenerator();


int GenerateReport(QString ReportFileName,CReportProgramSettingsData ReportSettings, CReportConfigData ReportFilters);
int ClearReportData();
int GenerateExcelReport();
int AbortReportCreation();

CZTStats *mProgramPtr;

QThread *mDirParserThread;
CDirParserThread *mDirParserWorkerThread;
QList<QList<CLogElement*>*> mReportData;
QString mReportFilename;
QStringList mStationNames;

CReportConfigData mReportFilters;

public slots:
void ThreadQuit();
void ThreadTerminated();
void DirParsingFinished(int Res);
void ThreadReportStatus(QString status);
void DirThreadAborted();


};

#endif // REPORTGENERATOR_H

+ 231
- 0
Sources/ReportPage.cpp ファイルの表示

@@ -0,0 +1,231 @@
#include "ReportPage.h"
#include "ui_ReportPage.h"
#include <QMessageBox>
#include <QFileDialog>
#include <QString>
#include "ZTStats.h"
#include <QScrollBar>
#include <QDesktopServices>


CReportPage::CReportPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CReportPage)
{
ui->setupUi(this);

ui->mReportStartDateEdit->setCalendarPopup(true);
ui->mReportStartDateEdit->setDate(QDate::currentDate());
ui->mReportStartDateEdit->setMaximumDate(QDate::currentDate());
ui->mReportEndDateEdit->setCalendarPopup(true);
ui->mReportEndDateEdit->setDate(QDate::currentDate());
ui->mReportEndDateEdit->setMaximumDate(QDate::currentDate());

ui->mReportFunctionFNChkBx->setCheckState(Qt::Checked);


connect(ui->mGenerateReportBtn,&QPushButton::clicked,this,&CReportPage::GenerateReportBtnClicked);
connect(ui->mSelectAllFuncZT1Btn,&QPushButton::clicked,this,&CReportPage::FunctionSelectionBtnPressed);
connect(ui->mSelectAllFuncZT2Btn,&QPushButton::clicked,this,&CReportPage::FunctionSelectionBtnPressed);
connect(ui->mSelectNoneFuncZT1Btn,&QPushButton::clicked,this,&CReportPage::FunctionSelectionBtnPressed);
connect(ui->mSelectNoneFuncZT2Btn,&QPushButton::clicked,this,&CReportPage::FunctionSelectionBtnPressed);
connect(ui->mOpenReportBtn,&QPushButton::clicked,this,&CReportPage::OpenReportBtnClicked);


mTimeCounter = new QTimer;
mTimeCounter->setSingleShot(false);
mTimeCounter->setInterval(1000);
// connect(mTimeCounter,&QTimer::timeout,this,&CReportPage::TimerExpired);
connect(mTimeCounter,SIGNAL(timeout()),this,SLOT(TimerExpired()));

ui->mTimerLable->setText("");

ui->mOpenReportBtn->hide();
ui->mReportPathLabel->hide();

ui->mReportProgressBarr->setMinimum(0);
ui->mReportProgressBarr->setMaximum(1);
ui->mReportProgressBarr->setValue(0);


}

CReportPage::~CReportPage()
{
delete ui;
delete mTimeCounter;
}

CReportConfigData CReportPage::GetReportFiltersConfig()
{
CReportConfigData FiltersConfig;

FiltersConfig.mReportStartDate = ui->mReportStartDateEdit->date();
FiltersConfig.mReportEndDate = ui->mReportEndDateEdit->date();



FiltersConfig.mReportFilterIncludeFN = ui->mReportFunctionFNChkBx->isChecked();
FiltersConfig.mReportfilterIncludePEQ1 = ui->mReportFunctionPEQ1ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePG = ui->mReportFunctionPGChkBx->isChecked();
FiltersConfig.mReportfilterIncludeComptage1 = ui->mReportFunctionComptage_1ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePPE1 = ui->mReportFunctionPPE_1ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePPI1 = ui->mReportFunctionPPI_1ChkBx->isChecked();

FiltersConfig.mReportfilterIncludeComptage2 = ui->mReportFunctionComptage_2ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePEQ2 = ui->mReportFunctionPEQ2ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePPE2 = ui->mReportFunctionPPE_2ChkBx->isChecked();
FiltersConfig.mReportfilterIncludePPI2 = ui->mReportFunctionPPI_2ChkBx->isChecked();


FiltersConfig.mReportStationAngrignon = ui->mReportStationAngrignonChkBx->isChecked();
FiltersConfig.mReportStationBeaugrand = ui->mReportStationBeaugrandChkBx->isChecked();
FiltersConfig.mReportStationBerri = ui->mReportStationBerriChkBx->isChecked();
FiltersConfig.mReportStationBourassa = ui->mReportStationBourassaChkBx->isChecked();
FiltersConfig.mReportStationLongueuil = ui->mReportStationLongueuilChkBx->isChecked();
FiltersConfig.mReportStationMontmorency = ui->mReportStationMontmorencyChkBx->isChecked();
FiltersConfig.mReportStationSnowdon = ui->mReportStationSnowdonChkBx->isChecked();
FiltersConfig.mReportStationStMichel = ui->mReportStationStMichelChkBx->isChecked();
FiltersConfig.mReportStationVertu = ui->mReportStationVertuChkBx->isChecked();

FiltersConfig.mReportIncludeSansDeclZT1 = ui->mReportFunctionNoDecl1ChkBx->isChecked();
FiltersConfig.mReportIncludeSansDeclZT2 = ui->mReportFunctionNoDecl2ChkBx->isChecked();

return FiltersConfig;
}

void CReportPage::GenerateReportBtnClicked()
{
if(ui->mGenerateReportBtn->text() == "Annuler")
{
mProgramHandle->AbortReportCreationRequest();
}
else
{
//Sanity check first...
CReportConfigData ConfigFilters = GetReportFiltersConfig();

if(ConfigFilters.IsAnyFilterSelected() == false)
{
QMessageBox::critical(this,"Erreur","Vous devez sélectionner au moins 1 alarme à analyser");
return;
}

if(ConfigFilters.IsAnyStationSelected() == false)
{
QMessageBox::critical(this,"Erreur","Vous devez sélectionner au moins 1 station");
return;
}

if(ConfigFilters.IsDateRangeValid() == false)
{
QMessageBox::critical(this,"Erreur","Vous devez sélectionner une période valide (dates)");
return;
}

QString ExcelFile = QFileDialog::getSaveFileName(this, tr("Fichier rapport"), QString(),tr("Excel (*.xlsx)"));
// qDebug("%s",qPrintable(ExcelFile));
if(ExcelFile.isEmpty())
{
return;
}

ClearProgressStatus();
ui->mReportProgressBarr->setMinimum(0);
ui->mReportProgressBarr->setMaximum(0);
mProgressTime.setHMS(0,0,0,0);
mTimeCounter->start();
UpdateProgressStatus("Création du rapport en cours... ça peut être long!!!");
ui->mGenerateReportBtn->setText("Annuler");
mProgramHandle->GenerateReportRequest(ExcelFile,ConfigFilters);
}

}



void CReportPage::UpdateProgressStatus(QString Status)
{
Status.append("\n");
ui->mReportProgressTextEdit->setPlainText(ui->mReportProgressTextEdit->document()->toPlainText().append(Status));
ui->mReportProgressTextEdit->verticalScrollBar()->setValue(ui->mReportProgressTextEdit->verticalScrollBar()->maximum());
}

void CReportPage::ClearProgressStatus()
{
ui->mReportProgressTextEdit->clear();
ui->mReportProgressBarr->setMinimum(0);
ui->mReportProgressBarr->setMaximum(1);
ui->mReportProgressBarr->setValue(0);
}

void CReportPage::ReportCreationFinished(QString ReportFilePath)
{
// ClearProgressStatus();
ui->mReportProgressBarr->setMinimum(0);
ui->mReportProgressBarr->setMaximum(1);
ui->mReportProgressBarr->setValue(0);
ui->mGenerateReportBtn->setText("Générer Rapport");
mTimeCounter->stop();

if(ReportFilePath.isEmpty() == false)
{
mReportFilePath = ReportFilePath;
ui->mReportPathLabel->setText(ReportFilePath);
ui->mReportPathLabel->show();
ui->mOpenReportBtn->show();
}
}

void CReportPage::TimerExpired()
{
mProgressTime = mProgressTime.addSecs(1);
ui->mTimerLable->setText(mProgressTime.toString("hh:mm:ss"));
}

void CReportPage::FunctionSelectionBtnPressed()
{
QObject *CallerBtn = sender();

if(CallerBtn == ui->mSelectAllFuncZT1Btn)
{
ui->mReportFunctionFNChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPEQ1ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPGChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionComptage_1ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPPI_1ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPPE_1ChkBx->setCheckState(Qt::Checked);
}
else if(CallerBtn == ui->mSelectAllFuncZT2Btn)
{
ui->mReportFunctionComptage_2ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionComptage_2ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPEQ2ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPPE_2ChkBx->setCheckState(Qt::Checked);
ui->mReportFunctionPPI_2ChkBx->setCheckState(Qt::Checked);
}
else if(CallerBtn == ui->mSelectNoneFuncZT1Btn)
{
ui->mReportFunctionFNChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPEQ1ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPGChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionComptage_1ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPPI_1ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPPE_1ChkBx->setCheckState(Qt::Unchecked);
}
else if(CallerBtn == ui->mSelectNoneFuncZT2Btn)
{
ui->mReportFunctionComptage_2ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionComptage_2ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPEQ2ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPPE_2ChkBx->setCheckState(Qt::Unchecked);
ui->mReportFunctionPPI_2ChkBx->setCheckState(Qt::Unchecked);
}
}

void CReportPage::OpenReportBtnClicked()
{
// system(qPrintable(mReportFilePath));
// QProcess::execute(mReportFilePath);
QDesktopServices::openUrl(QUrl::fromLocalFile(mReportFilePath));
}

+ 44
- 0
Sources/ReportPage.h ファイルの表示

@@ -0,0 +1,44 @@
#ifndef REPORTPAGE_H
#define REPORTPAGE_H

#include <QWidget>
#include "ReportSettingsData.h"
#include <QTimer>
#include <QTime>

class CZTStats;

namespace Ui {
class CReportPage;
}

class CReportPage : public QWidget
{
Q_OBJECT

public:
explicit CReportPage(QWidget *parent = 0);
~CReportPage();

CReportConfigData GetReportFiltersConfig();
void UpdateProgressStatus(QString Status);
void ClearProgressStatus();
void ReportCreationFinished(QString ReportFilePath);

CZTStats *mProgramHandle;
QTimer *mTimeCounter;
QTime mProgressTime;
QString mReportFilePath;

private:
Ui::CReportPage *ui;

public slots:
void GenerateReportBtnClicked();
void TimerExpired();
void FunctionSelectionBtnPressed();
void OpenReportBtnClicked();

};

#endif // REPORTPAGE_H

+ 156
- 0
Sources/ReportSettingsData.cpp ファイルの表示

@@ -0,0 +1,156 @@
#include "ReportSettingsData.h"

CReportSettingsData::CReportSettingsData()
{

}

CReportProgramSettingsData::CReportProgramSettingsData()
{
mDataSourceDirectoryPaths.clear();
}

CReportProgramSettingsData& CReportProgramSettingsData::operator=(const CReportProgramSettingsData &source)
{
if(&source == this)
{
return *this;
}

this->mDataSourceDirectoryPaths = source.mDataSourceDirectoryPaths;

return *this;
}


bool CReportConfigData::IsAnyStationSelected()
{
if(mReportStationAngrignon == true ||
mReportStationBeaugrand == true ||
mReportStationVertu == true ||
mReportStationBourassa == true ||
mReportStationMontmorency == true ||
mReportStationBerri == true ||
mReportStationLongueuil == true ||
mReportStationStMichel == true ||
mReportStationSnowdon == true)
{
return true;
}

return false;
}

bool CReportConfigData::IsAnyFilterSelected()
{
if(mReportFilterIncludeFN == true ||
mReportfilterIncludePPI1 == true ||
mReportfilterIncludePPE1 == true ||
mReportfilterIncludePG == true ||
mReportfilterIncludeComptage1 == true ||
mReportfilterIncludePEQ1 == true ||
mReportfilterIncludePPI2 == true ||
mReportfilterIncludePPE2 == true ||
mReportfilterIncludeComptage2 == true ||
mReportfilterIncludePEQ2 == true ||
mReportIncludeSansDeclZT1 == true ||
mReportIncludeSansDeclZT2 == true )
{
return true;
}

return false;
}

bool CReportConfigData::IsDateRangeValid()
{
if(mReportEndDate < mReportStartDate)
{
return false;
}

return true;
}

CReportConfigData& CReportConfigData::operator=(const CReportConfigData &source)
{
if(&source == this)
{
return *this;
}

this->mReportStationAngrignon = source.mReportStationAngrignon;
this->mReportStationBeaugrand = source.mReportStationBeaugrand;
this->mReportStationVertu = source.mReportStationVertu;
this->mReportStationBourassa = source.mReportStationBourassa;
this->mReportStationMontmorency = source.mReportStationMontmorency;
this->mReportStationBerri = source.mReportStationBerri;
this->mReportStationLongueuil = source.mReportStationLongueuil;
this->mReportStationStMichel = source.mReportStationStMichel;
this->mReportStationSnowdon = source.mReportStationSnowdon;
this->mReportFilterIncludeFN = source.mReportFilterIncludeFN;
this->mReportfilterIncludePPI1 = source.mReportfilterIncludePPI1;
this->mReportfilterIncludePPE1 = source.mReportfilterIncludePPE1;
this->mReportfilterIncludePG = source.mReportfilterIncludePG;
this->mReportfilterIncludeComptage1 = source.mReportfilterIncludeComptage1;
this->mReportfilterIncludePEQ1 = source.mReportfilterIncludePEQ1;
this->mReportfilterIncludePPI2 = source.mReportfilterIncludePPI2;
this->mReportfilterIncludePPE2 = source.mReportfilterIncludePPE2;
this->mReportfilterIncludeComptage2 = source.mReportfilterIncludeComptage2;
this->mReportfilterIncludePEQ2 = source.mReportfilterIncludePEQ2;
this->mReportStartDate = source.mReportStartDate;
this->mReportEndDate = source.mReportEndDate;
this->mReportIncludeSansDeclZT1 = source.mReportIncludeSansDeclZT1;
this->mReportIncludeSansDeclZT2 = source.mReportIncludeSansDeclZT2;


return *this;
}


QDataStream &operator<<(QDataStream &out, const CReportProgramSettingsData &source)
{
out << source.mDataSourceDirectoryPaths.size();

for(int i = 0; i < source.mDataSourceDirectoryPaths.size(); i++)
{
out << source.mDataSourceDirectoryPaths.at(i);
}

return out;
}




QDataStream &operator>>(QDataStream &in, CReportProgramSettingsData &dest)
{
// unsigned int NbPaths;
// in >> NbPaths;

// // in >> NbPaths;
// for(int i = 0; i < NbPaths; i++)
// {
// QString Path;
// in >> Path;
// dest.mDataSourceDirectoryPaths.append(Path);
// }

// return in;
}

















+ 65
- 0
Sources/ReportSettingsData.h ファイルの表示

@@ -0,0 +1,65 @@
#ifndef REPORTSETTINGSDATA_H
#define REPORTSETTINGSDATA_H

#include <QStringList>
#include <QString>
#include <QList>
#include <QDate>

class CReportProgramSettingsData
{
public:
CReportProgramSettingsData();

QStringList mDataSourceDirectoryPaths;

CReportProgramSettingsData &operator=(const CReportProgramSettingsData &source);
};

QDataStream &operator<<(QDataStream &out, const CReportProgramSettingsData &source);
QDataStream &operator>>(QDataStream &in, CReportProgramSettingsData &dest);

class CReportConfigData
{
public:
bool mReportStationAngrignon;
bool mReportStationBeaugrand;
bool mReportStationVertu;
bool mReportStationBourassa;
bool mReportStationMontmorency;
bool mReportStationBerri;
bool mReportStationLongueuil;
bool mReportStationStMichel;
bool mReportStationSnowdon;

bool mReportFilterIncludeFN;
bool mReportfilterIncludePPI1;
bool mReportfilterIncludePPE1;
bool mReportfilterIncludePG;
bool mReportfilterIncludeComptage1;
bool mReportfilterIncludePEQ1;

bool mReportfilterIncludePPI2;
bool mReportfilterIncludePPE2;
bool mReportfilterIncludeComptage2;
bool mReportfilterIncludePEQ2;

bool mReportIncludeSansDeclZT1;
bool mReportIncludeSansDeclZT2;

QDate mReportStartDate, mReportEndDate;

bool IsAnyStationSelected();
bool IsAnyFilterSelected();
bool IsDateRangeValid();

CReportConfigData &operator=(const CReportConfigData &source);
};

class CReportSettingsData
{
public:
CReportSettingsData();
};

#endif // REPORTSETTINGSDATA_H

+ 15
- 0
Sources/SettingsPage.cpp ファイルの表示

@@ -0,0 +1,15 @@
#include "SettingsPage.h"
#include "ui_SettingsPage.h"


CSettingsPage::CSettingsPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CSettingsPage)
{
ui->setupUi(this);
}

CSettingsPage::~CSettingsPage()
{
delete ui;
}

+ 23
- 0
Sources/SettingsPage.h ファイルの表示

@@ -0,0 +1,23 @@
#ifndef SETTINGSPAGE_H
#define SETTINGSPAGE_H

#include <QWidget>


namespace Ui {
class CSettingsPage;
}

class CSettingsPage : public QWidget
{
Q_OBJECT

public:
explicit CSettingsPage(QWidget *parent = 0);
~CSettingsPage();

private:
Ui::CSettingsPage *ui;
};

#endif // SETTINGSPAGE_H

+ 32
- 0
Sources/SettingsPage.ui ファイルの表示

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CSettingsPage</class>
<widget class="QWidget" name="CSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>667</width>
<height>650</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>40</x>
<y>20</y>
<width>431</width>
<height>471</height>
</rect>
</property>
<property name="title">
<string>Répertoires sources</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

+ 1042
- 0
Sources/TrainLogFileMgr.cpp
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 61
- 0
Sources/TrainLogFileMgr.h ファイルの表示

@@ -0,0 +1,61 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 - 2013 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Description du fichier si nécessaire.
*/

/* ************************************************************************** */
/* Revision:
### YYYMMDD JFM
Verision d'origine.
### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#ifndef TRAINLOGFILEMGR_H
#define TRAINLOGFILEMGR_H

#include "GlobalDefine.h"
#include "ZTData.h"



class CLogElement;

class CTrainLogFileMgr
{
public:

//CTrainLogFileMgr is a singleton class
static CTrainLogFileMgr* instance(){return &mSingleton;}
static CTrainLogFileMgr mSingleton;


CTrainLogFileMgr();
unsigned int SaveTrainLog(QString LogFilePathName,CZT1Log *ZT1Log,QVector<CZTDetectionData*> *ZT1DetectionsLog,QString StationName);
unsigned int SaveTrainLog(QString LogFilePathName,QVector<CZT2LogData*> *ZT2Log,QVector<CZTDetectionData*> *ZT2DetectionsLog,QString StationName);
CLogElement *OpenTrainLog(QString LogFilePathName,unsigned int &RetValue,CLogElement *TargetElement = 0,bool LoadData = false);
unsigned int SaveCSVFile(QString CSVFilePathName,QVector<CZT1LogData*> *ZT1Log,CZT1FlagsData *ZT1Flags,QVector<CZTDetectionData*> *ZT1DetectionsLog, QString StationName);
unsigned int SaveCSVFile(QString CSVFilePathName,CZT1Log *ZT1Log,QVector<CZTDetectionData*> *ZT1DetectionsLog, QString StationName);
unsigned int SaveCSVFile(QString CSVFilePathName,QVector<CZT2LogData*> *ZT2Log,QVector<CZTDetectionData*> *ZT2DetectionsLog, QString StationName);

unsigned int SetTrainLogProtected(bool IsProtected,QString LogFilePathName);

unsigned int SaveBINFromCSV(QString CSVFilePathName);
};

#endif // TRAINLOGFILEMGR_H


+ 449
- 0
Sources/ZTData.cpp ファイルの表示

@@ -0,0 +1,449 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Classe fourre-tout qui contient les différentes structures données utilisées
un peu partout dans le programme.
*/

/* ************************************************************************** */
/* Revision:
### YYYMMDD JFM
Verision d'origine.
### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#include "ZTData.h"

const char * CZTData::TrainTypeString[] = {"Inconnu","MR63/73", "MPM10"};
CZTData::CZTData()
{
}

const char * CZTData::ErrorString[] = {"Erreur de comptage S1-S2",
"Déclenchement frotteur négatif",
"Déclenchement pneu de guidage",
"Déclenchement pneu porteur intérieur",
"Déclenchement pneu porteur extérieur",

"Erreur de comptage ZT2",
"Déclenchement pneu porteur intérieur ZT2",
"Déclenchement pneu porteur extérieur ZT2",

"Panne équipement ZT1",
"Panne équipement ZT2",

};

const char * CZTData::ShortErrorString[] = {"V00",
"DFN",
"DPG",
"DPPI",
"DPPE",

"V002",
"DPPI2",
"DPPE2",

"PEQ1",
"PEQ2"};

const char* CZTData::GetErrorString(unsigned int ErrorID)
{
if(ErrorID >= DETECTION_MAX_DETECTION_ID)
ErrorID = 0;
return ErrorString[ErrorID];
}

const char* CZTData::GetShortErrorString(unsigned int ErrorID)
{
if(ErrorID >= DETECTION_MAX_DETECTION_ID)
ErrorID = 0;
return ShortErrorString[ErrorID];
}

const char* CZTData::GetTrainTypeString(unsigned int TrainType)
{
if(TrainType >= TRAIN_TYPE_MAX_ID)
TrainType = TRAIN_TYPE_UNKNOWN;
return TrainTypeString[TrainType];
}

const char* CZTData::GetModbusTrainTypeString(unsigned int TrainType)
{
switch(TrainType)
{
case MODBUS_CC_TRAIN_TYPE_MR63:
{
return "MR63";
break;
}
case MODBUS_CC_TRAIN_TYPE_MR73:
{
return "MR73";
break;
}
case MODBUS_CC_TRAIN_TYPE_MPM10:
{
return "MPM10";
break;
}
case MODBUS_CC_TRAIN_TYPE_MAINTENANCE:
{
return "Vehicule Travaux";
break;
}
case MODBUS_CC_TRAIN_TYPE_INVALID_ATS_OFFLINE:
case MODBUS_CC_TRAIN_TYPE_INVALID_SERVICE_REBOOT:
case MODBUS_CC_TRAIN_TYPE_INVALID_NOT_UPDATED:
case MODBUS_CC_TRAIN_TYPE_INVALID_SACL_OFFLINE:
default:
{
return "Inconnu";
break;
}
}
}


CZT1LogData::CZT1LogData(CZT1ThreadData *ThreadData):
mZT1ThreadData(ThreadData)
{
}
CZT1LogData::~CZT1LogData()
{
if(mZT1ThreadData != 0)
delete mZT1ThreadData;
}

CZT1ThreadData::~CZT1ThreadData()
{

}

void CZT1ThreadData::operator =(CZT1ThreadData& TD)
{
mTimeStamp = TD.mTimeStamp;
mDateTime = TD.mDateTime;
mS1 = TD.mS1;
mS2 = TD.mS2;
mPInt = TD.mPInt;
mPExt = TD.mPExt;
mFN = TD.mFN;
mPG = TD.mPG;

mBogie = TD.mBogie;
mRank = TD.mRank;
mS1Count = TD.mS1Count;
mS2Count = TD.mS2Count;
mFNCount = TD.mFNCount;
mPGExtValue = TD.mPGExtValue;
mPGIntValue = TD.mPGIntValue;
mTrainSpeed = TD.mTrainSpeed;
mTrainType = TD.mTrainType;
}



QDataStream &operator<<(QDataStream &out, const CZT1FlagsData &source)
{
out << source.mExtPGOffset
<< source.mIntPGOffset
<< source.mPGCalibrationON
<< source.mPGTresholdValue
<< source.mAnalogTracePresent
<< source.mIsProblematicPassage
<< source.mTrainCompo1
<< source.mTrainCompo2
<< source.mTrainCompo3
<< source.mModbusTrainType
<< source.mZT1ITI
<< source.mUnusedFlag13
<< source.mUnusedFlag14
<< source.mUnusedFlag15
<< source.mUnusedFlag16
<< source.mUnusedFlag17
<< source.mUnusedFlag18
<< source.mUnusedFlag19
<< source.mUnusedFlag20;

return out;
}

QDataStream &operator>>(QDataStream &in, CZT1FlagsData &dest)
{
in >> dest.mExtPGOffset
>> dest.mIntPGOffset
>> dest.mPGCalibrationON
>> dest.mPGTresholdValue
>> dest.mAnalogTracePresent
>> dest.mIsProblematicPassage
>> dest.mTrainCompo1
>> dest.mTrainCompo2
>> dest.mTrainCompo3
>> dest.mModbusTrainType
>> dest.mZT1ITI
>> dest.mUnusedFlag13
>> dest.mUnusedFlag14
>> dest.mUnusedFlag15
>> dest.mUnusedFlag16
>> dest.mUnusedFlag17
>> dest.mUnusedFlag18
>> dest.mUnusedFlag19
>> dest.mUnusedFlag20;

return in;
}

QDataStream& operator<<(QDataStream &out, const CZT1LogData &source)
{
quint32 ThreadDataValid = 0;
if(source.mZT1ThreadData != 0)
ThreadDataValid = 1;


out << source.mDateTime
<< source.mTimestamp
<< source.mCIZT1
<< source.mCDVApproach_ZT1
<< source.mCDVARM_ZT1
<< ThreadDataValid;

if(ThreadDataValid == 1)
{
out << source.mZT1ThreadData->mS1
<< source.mZT1ThreadData->mS2
<< source.mZT1ThreadData->mFN
<< source.mZT1ThreadData->mPInt
<< source.mZT1ThreadData->mPExt
<< source.mZT1ThreadData->mPG
<< source.mZT1ThreadData->mTrainSpeed
<< source.mZT1ThreadData->mBogie
<< source.mZT1ThreadData->mRank
<< source.mZT1ThreadData->mPGExtValue
<< source.mZT1ThreadData->mPGIntValue
<< source.mZT1ThreadData->mTrainType
<< source.mZT1ThreadData->mS1Count
<< source.mZT1ThreadData->mS2Count;
}

return out;
}

QDataStream &operator>>(QDataStream &in, CZT1LogData &dest)
{
quint32 ThreadValid;
in >> dest.mDateTime
>> dest.mTimestamp
>> dest.mCIZT1
>> dest.mCDVApproach_ZT1
>> dest.mCDVARM_ZT1
>> ThreadValid;
if(ThreadValid == 1)
{
dest.mZT1ThreadData = new CZT1ThreadData();
in >> dest.mZT1ThreadData->mS1
>> dest.mZT1ThreadData->mS2
>> dest.mZT1ThreadData->mFN
>> dest.mZT1ThreadData->mPInt
>> dest.mZT1ThreadData->mPExt
>> dest.mZT1ThreadData->mPG
>> dest.mZT1ThreadData->mTrainSpeed
>> dest.mZT1ThreadData->mBogie
>> dest.mZT1ThreadData->mRank
>> dest.mZT1ThreadData->mPGExtValue
>> dest.mZT1ThreadData->mPGIntValue
>> dest.mZT1ThreadData->mTrainType
>>dest.mZT1ThreadData->mS1Count
>>dest.mZT1ThreadData->mS2Count;
}

return in;
}


QDataStream &operator<<(QDataStream &out, const CZTDetectionData &source)
{
out << source.mTimeStamp
<< source.mRank
<< source.mDetectionID;

return out;
}

QDataStream &operator>>(QDataStream &in, CZTDetectionData &dest)
{
in >> dest.mTimeStamp
>> dest.mRank
>> dest.mDetectionID;

return in;
}

CZT2LogData::CZT2LogData(CZT2ThreadData *ThreadData):
mZT2ThreadData(ThreadData)
{
}
CZT2LogData::~CZT2LogData()
{
if(mZT2ThreadData != 0)
delete mZT2ThreadData;
}
QDataStream &operator<<(QDataStream &out, const CZT2FlagsData &source)
{
out << source.mIsProblematicPassage
<< source.mTrainCompo1
<< source.mTrainCompo2
<< source.mTrainCompo3
<< source.mModbusTrainType
<< source.mUnusedFlag6
<< source.mUnusedFlag7
<< source.mUnusedFlag8
<< source.mUnusedFlag9
<< source.mUnusedFlag10;

return out;
}

QDataStream &operator>>(QDataStream &in, CZT2FlagsData &dest)
{
in >> dest.mIsProblematicPassage
>> dest.mTrainCompo1
>> dest.mTrainCompo2
>> dest.mTrainCompo3
>> dest.mModbusTrainType
>> dest.mUnusedFlag6
>> dest.mUnusedFlag7
>> dest.mUnusedFlag8
>> dest.mUnusedFlag9
>> dest.mUnusedFlag10;;

return in;
}


QDataStream& operator<<(QDataStream &out, const CZT2LogData &source)
{
quint32 ThreadDataValid = 0;
if(source.mZT2ThreadData != 0)
ThreadDataValid = 1;

out << source.mDateTime
<< source.mTimestamp
<< source.mCIZT2
<< source.mCDVARM_ZT2
<< source.mCDVApproach_ZT2
<< ThreadDataValid;

if(ThreadDataValid == 1)
{
out << source.mZT2ThreadData->mS1
<< source.mZT2ThreadData->mPPInt
<< source.mZT2ThreadData->mPPExt
<< source.mZT2ThreadData->mBogie
<< source.mZT2ThreadData->mRank
<< source.mZT2ThreadData->mS1Count;
}

return out;
}

QDataStream &operator>>(QDataStream &in, CZT2LogData &dest)
{
quint32 ThreadValid;
in >> dest.mDateTime
>> dest.mTimestamp
>> dest.mCIZT2
>> dest.mCDVARM_ZT2
>> dest.mCDVApproach_ZT2
>> ThreadValid;
if(ThreadValid == 1)
{
dest.mZT2ThreadData = new CZT2ThreadData();
in >> dest.mZT2ThreadData->mS1
>> dest.mZT2ThreadData->mPPInt
>> dest.mZT2ThreadData->mPPExt
>> dest.mZT2ThreadData->mBogie
>> dest.mZT2ThreadData->mRank
>> dest.mZT2ThreadData->mS1Count;
}

return in;
}

CZTDetectionFunctionConfig::CZTDetectionFunctionConfig()
{
for(int i = 0; i < DETECTION_FCT_MAX_FCT; i++)
{
mZTDetectionConfig[i].AnalysisActive = false;
mZTDetectionConfig[i].TKActive = false;
}
}

void CZTDetectionFunctionConfig::operator =(CZTDetectionFunctionConfig& DF)
{
for(int i = 0; i < DETECTION_FCT_MAX_FCT; i++)
{
mZTDetectionConfig[i].AnalysisActive = DF.mZTDetectionConfig[i].AnalysisActive;
mZTDetectionConfig[i].TKActive = DF.mZTDetectionConfig[i].TKActive;
}
}

QDataStream &operator<<(QDataStream &out, const CZTDetectionFunctionConfig &source)
{
for(int i = 0; i < DETECTION_FCT_MAX_FCT; i++)
{
out << source.mZTDetectionConfig[i].AnalysisActive
<< source.mZTDetectionConfig[i].TKActive;
}
return out;
}

QDataStream &operator>>(QDataStream &in, CZTDetectionFunctionConfig &dest)
{
for(int i = 0; i < DETECTION_FCT_MAX_FCT; i++)
{
in >> dest.mZTDetectionConfig[i].AnalysisActive
>> dest.mZTDetectionConfig[i].TKActive;
}
return in;
}
CSettingsData::CSettingsData()
{

}
CZTSettingsData::CZTSettingsData()
{
mDetectionFunctionSettings = new CZTDetectionFunctionConfig();
mAutoExportZT1CSV = false;
mAutoExportZT2CSV = false;
}

QDataStream &operator<<(QDataStream &out, const CZTNetworkConfig &source)
{
out << source.mZTID
<< source.mIPAdress;

return out;
}

QDataStream &operator>>(QDataStream &in, CZTNetworkConfig &dest)
{
in >> dest.mZTID
>> dest.mIPAdress;

return in;
}

+ 407
- 0
Sources/ZTData.h ファイルの表示

@@ -0,0 +1,407 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Ces classes contiennent l'état de la Zone Tests et les informations nécessaires
au fonctionnement des machines à états.
*/

/* ************************************************************************** */
/* Revision:
### 20130501 JFM
Verision d'origine.
### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#ifndef ZTDATA_H
#define ZTDATA_H

#include "GlobalDefine.h"
#include <QObject>
#include <QTime>
#include <QDataStream>
#include <QVector>

enum eZTLOGType
{
ZT1_LOG_TYPE,
ZT2_LOG_TYPE,
UNKNOWN_LOG_TYPE
};

enum eCDVState
{
CDV_STATE_OCCUPIED,
CDV_STATE_FREE,
CDV_STATE_ITI_CMD,
CDV_STATE_UNKNOWN
};

enum eSwitchCVDPosition
{
SWITCH_CDV_NORMAL_POSITION,
SWITCH_CDV_REVERSE_POSITION,
SWITCH_CDV_UNKNOWN_POSITION
};

enum eCDVType
{
CDV_NORMAL_TYPE,
CDV_SWITCH_TYPE
};

enum eZTITI
{
ZT_PRIMARY_ITI, // Itinéraire 10/12 ou en voie normale
ZT_SECONDARY_ITI, // Itinéraire 10/22 ou autre changement de voie (quai banalisé)
ZT_MAX_ITI
};
enum eDetectionID
{
DETECTION_MAGNETIC_SENSOR_COUNT,
DETECTION_FN_DETECTION,
DETECTION_PG_DETECTION,
DETECTION_PPI_DETECTION,
DETECTION_PPE_DETECTION,

DETECTION_ZT2_MAGNETIC_SENCOR_COUNT,
DETECTION_ZT2_PPI_DETECTION,
DETECTION_ZT2_PPE_DETECTION,

DETECTION_PEQ1_DETECTION,
DETECTION_PEQ2_DETECTION,

DETECTION_MAX_DETECTION_ID
};

enum eDetectionFunctionID
{
DETECTION_FCT_FN,
DETECTION_FCT_PG,
DETECTION_FCT_PP,
DETECTION_FCT_PP2,
DETECTION_FCT_ZT1,
DETECTION_FCT_ZT2,

DETECTION_FCT_MAX_FCT
};

enum eTrainTypeID
{
TRAIN_TYPE_UNKNOWN,
TRAIN_TYPE_MR63_MR73,
TRAIN_TYPE_MPM10,


TRAIN_TYPE_MAX_ID
};

enum eOutilZTFlagsIndex
{
OUTILZT_FILE_PROTECTED_FLAG,
OUTILSZT_UNUSED_FLAG_2,
OUTILSZT_UNUSED_FLAG_3,
OUTILSZT_UNUSED_FLAG_4,
OUTILSZT_UNUSED_FLAG_5,
OUTILSZT_UNUSED_FLAG_6,
OUTILSZT_UNUSED_FLAG_7,
OUTILSZT_UNUSED_FLAG_8,
OUTILSZT_UNUSED_FLAG_9,
OUTILSZT_UNUSED_FLAG_10
};

enum eModbusCCTrainTypes
{
MODBUS_CC_TRAIN_TYPE_MR63 = 63,
MODBUS_CC_TRAIN_TYPE_MR73 = 73,
MODBUS_CC_TRAIN_TYPE_MPM10 = 10,
MODBUS_CC_TRAIN_TYPE_MAINTENANCE = 0,
MODBUS_CC_TRAIN_TYPE_INVALID_ATS_OFFLINE = 98,
MODBUS_CC_TRAIN_TYPE_INVALID_SERVICE_REBOOT = 97,
MODBUS_CC_TRAIN_TYPE_INVALID_NOT_UPDATED = 99,
MODBUS_CC_TRAIN_TYPE_INVALID_SACL_OFFLINE = 96,

MODBUS_CC_TRAIN_TYPE_MAX_VALUE
};


enum eZT1FlagsID
{
ZT1_INT_PG_OFFSET_FLAG_ID,
ZT1_EXT_PG_OFFSET_FLAG_ID,
ZT1_PG_TRESHOLD_VALUE_FLAG_ID,
ZT1_PG_CALIB_ON_FLAG_ID,


ZT1_MAX_FLAG_ID
};

enum eZTStatus
{
SB_ZT_ACTIVE_STATUS,
SB_ZT_INACTIVE_STATUS,
SB_ZT_NOT_PRESENT_STATUS,
SB_ZT_DISABLED_STATUS,
SB_ZT_MAX_STATUS
};


class CZTData
{
public:
CZTData();



unsigned int mCIZT2;

static const char *ErrorString[];
static const char *ShortErrorString[];
static const char* GetErrorString(unsigned int ErrorID);
static const char* GetShortErrorString(unsigned int ErrorID);

static const char *TrainTypeString[];
static const char *GetTrainTypeString(unsigned int TrainType);
static const char *GetModbusTrainTypeString(unsigned int TrainType);

};

//This class contains data from the ZT1 analysis thread
//that is periodically communicated to the main thread
class CZT1ThreadData
{

public:
~CZT1ThreadData();
qint64 mTimeStamp; //nanosecs
QDateTime mDateTime;
quint32 mS1;
quint32 mS2;
quint32 mPInt;
quint32 mPExt;
quint32 mFN;
quint32 mPG;

quint32 mBogie;
quint32 mRank;
quint32 mS1Count;
quint32 mS2Count;
quint32 mFNCount;
qint32 mPGExtValue;
qint32 mPGIntValue;
qreal mTrainSpeed;
quint32 mTrainType;

void operator=(CZT1ThreadData& a);
};


class CZT1FlagsData
{
public:
qint32 mIntPGOffset;
qint32 mExtPGOffset;
qint32 mPGTresholdValue;
qint32 mPGCalibrationON;
qint32 mAnalogTracePresent;
qint32 mIsProblematicPassage; //This flag will be set if problems have been detected but not sent to PCC due to PURE comitee rules.
qint32 mTrainCompo1;
qint32 mTrainCompo2;
qint32 mTrainCompo3;
qint32 mModbusTrainType;
qint32 mZT1ITI;
qint32 mUnusedFlag13;
qint32 mUnusedFlag14;
qint32 mUnusedFlag15;
qint32 mUnusedFlag16;
qint32 mUnusedFlag17;
qint32 mUnusedFlag18;
qint32 mUnusedFlag19;
qint32 mUnusedFlag20;
};

QDataStream &operator<<(QDataStream &out, const CZT1FlagsData &source);
QDataStream &operator>>(QDataStream &in, CZT1FlagsData &dest);

class CZT1LogData
{
public:
CZT1LogData(CZT1ThreadData *ThreadData = 0);
~CZT1LogData();

QDateTime mDateTime;
qint64 mTimestamp;
quint32 mCIZT1;
quint32 mCDVApproach_ZT1;
quint32 mCDVARM_ZT1;
#ifdef USE_ANALOG_ACQUISITION
qint32 mAnalogData; //The analog data must be written or read to/from file manually (not part of the QStream << operator overloading)
#endif

CZT1ThreadData *mZT1ThreadData;
};

class CZT1Log
{
public:
// QList<CZT1LogData*> mZT1LogData;
QVector<CZT1LogData*> mZT1LogData;
CZT1FlagsData mZT1Flags;
};

QDataStream &operator<<(QDataStream &out, const CZT1LogData &source);
QDataStream &operator>>(QDataStream &in, CZT1LogData &dest);

class CZT2ThreadData
{
public:
qint64 mTimeStamp;
quint32 mS1;
quint32 mPPInt;
quint32 mPPExt;

quint32 mBogie;
quint32 mRank;
quint32 mS1Count;
};

class CZTDetectionData
{
public:

qint64 mTimeStamp;
// QDateTime mDateTime;
quint32 mDetectionID;
quint32 mRank;
// quint32 mBogie;

};
QDataStream &operator<<(QDataStream &out, const CZTDetectionData &source);
QDataStream &operator>>(QDataStream &in, CZTDetectionData &dest);

class CZT2FlagsData
{
public:
qint32 mIsProblematicPassage; //This flag will be set if problems have been detected but not sent to PCC due to PURE comitee rules.
qint32 mTrainCompo1;
qint32 mTrainCompo2;
qint32 mTrainCompo3;
qint32 mModbusTrainType;
qint32 mUnusedFlag6;
qint32 mUnusedFlag7;
qint32 mUnusedFlag8;
qint32 mUnusedFlag9;
qint32 mUnusedFlag10;
};

QDataStream &operator<<(QDataStream &out, const CZT2FlagsData &source);
QDataStream &operator>>(QDataStream &in, CZT2FlagsData &dest);

class CZT2LogData
{
public:
CZT2LogData(CZT2ThreadData *ThreadData = 0);
~CZT2LogData();

QDateTime mDateTime;
qint64 mTimestamp;
quint32 mCIZT2;
quint32 mCDVARM_ZT2;
quint32 mCDVApproach_ZT2;

CZT2ThreadData *mZT2ThreadData;
};
QDataStream &operator<<(QDataStream &out, const CZT2LogData &source);
QDataStream &operator>>(QDataStream &in, CZT2LogData &dest);

class CZT2Log
{
public:
QVector<CZT2LogData*> mZT2LogData;
CZT2FlagsData mZT2Flags;
};


class CZTDetectionConfig
{
public:
bool AnalysisActive;
bool TKActive;
};

class CZTDetectionFunctionConfig
{
public:
CZTDetectionFunctionConfig();
CZTDetectionConfig mZTDetectionConfig[DETECTION_FCT_MAX_FCT];

void operator=(CZTDetectionFunctionConfig& a);

};

QDataStream &operator<<(QDataStream &out, const CZTDetectionFunctionConfig &source);
QDataStream &operator>>(QDataStream &in, CZTDetectionFunctionConfig &dest);

class CZTSettingsData
{
public:
CZTSettingsData();

CZTDetectionFunctionConfig *mDetectionFunctionSettings;
bool mAutoExportZT1CSV;
bool mAutoExportZT2CSV;
int mPGTreshold;

};
class CZTNetworkConfig
{
public:
int mZTID;
QString mIPAdress;
};

QDataStream &operator<<(QDataStream &out, const CZTNetworkConfig &source);
QDataStream &operator>>(QDataStream &in, CZTNetworkConfig &dest);

class CSettingsData
{
public:
CSettingsData();

QString mDataSourceDirectoryPath;
QList<CZTNetworkConfig> mNetworkCfgList;

};

class CZTPGCalibrationData
{
public:
qint64 mTimestamp;
int mTrainNbr;
qint32 mPGExtValue;
qint32 mPGIntValue;
};

class CZTLogFileInfo
{
public:
QDateTime mStartDateTime;
QDateTime mEndDateTime;
QString mStationName;
int mZTStationID;
QString mZTLogFilePath;
};

#endif // ZTDATA_H

+ 391
- 0
Sources/ZTLogFilesMgr.cpp ファイルの表示

@@ -0,0 +1,391 @@

#include "ZTLogFilesMgr.h"
#include <QFileInfo>
#include <QTextStream>
#include <QCoreApplication>
#include <QMessageBox>
#include <QBuffer>

CZTLogFilesMgr::CZTLogFilesMgr()
{

mProgramHandle = 0;

mDirParserThread = new QThread();
mDirParserWorkerThread = new CDirParserThread();
mDirParserWorkerThread->moveToThread(mDirParserThread);
connect(mDirParserThread,SIGNAL(started()),mDirParserWorkerThread,SLOT(ParseDirectories()));
connect(mDirParserThread,SIGNAL(finished()),this,SLOT(ThreadQuit()));
connect(mDirParserThread,SIGNAL(terminated()),this,SLOT(ThreadTerminated()));
connect(mDirParserWorkerThread,SIGNAL(NewLogParsed(QString,bool)),this,SLOT(NewZTLogParsed(QString,bool)));
connect(mDirParserWorkerThread,SIGNAL(ParsingFinished(int)),this,SLOT(DirParsingFinished(int)));
connect(mDirParserWorkerThread,SIGNAL(EmptyDirParsed()),this,SLOT(EmptyDirParsed()));

mDatabaseParsingTimer = new QTimer();
mDatabaseParsingTimer->setInterval(60000);
connect(mDatabaseParsingTimer,SIGNAL(timeout()),this,SLOT(ParsingTimerExpired()));

mSaveDBFile = false;
}

CZTLogFilesMgr::~CZTLogFilesMgr()
{
delete mDirParserThread;
delete mDirParserWorkerThread;
delete mDatabaseParsingTimer;
}


void CZTLogFilesMgr::DestroyZTLogFilesList()
{
mZTLogFilesList.clear();
}

void CZTLogFilesMgr::ParseZTLogFiles(bool RebuildDatabase)
{
mZTLogFilesList.clear();

if(RebuildDatabase == true)
{
mSaveDBFile = true;
// mDirParserWorkerThread->SetParsingInfo(QDir(mLogDatabaseDir),"*.txt",false);
mDirParserThread->start();
//mProgramHandle->ZTLogFilesFetchingBegin(this);
return ;
}
else
{
QDir BaseDir(mLogDatabaseDir);
QString DatabaseFilePath = BaseDir.filePath("ZTLogs.zdb");
// DatabaseFilePath += "Trains.zdb";
QFile* DatabaseFile = new QFile(BaseDir.filePath("ZTLogs.zdb")/*DatabaseFilePath*/);


if(DatabaseFile)
{
if(DatabaseFile->open(QIODevice::ReadOnly | QIODevice::Unbuffered) == false)
{
mSaveDBFile = true;
// mDirParserWorkerThread->SetParsingInfo(QDir(mLogDatabaseDir),"*.txt",false);
mDirParserThread->start();
// mProgramHandle->ZTLogFilesFetchingBegin(this);

delete DatabaseFile;
return ;
}
}
else
{
QMessageBox::information(0,"Erreur","Impossible de créer le fichier DB ZTLog");
return ;
}

QByteArray DBData = DatabaseFile->readAll();
QDataStream *DBStrm = new QDataStream(DBData);

qint32 NBRecords;
*DBStrm >> NBRecords;

for(qint32 i = 0; i < NBRecords; i++)
{
CZTLogFileInfo NewElement;

*DBStrm >> NewElement.mStationName
>> NewElement.mZTStationID
>> NewElement.mStartDateTime
>> NewElement.mEndDateTime
>> NewElement.mZTLogFilePath;

mZTLogFilesList.append(NewElement);
}

DatabaseFile->close();
delete DatabaseFile;
delete DBStrm;

DirParsingFinished(1);



}
}

void CZTLogFilesMgr::NewZTLogParsed(QString FilePath, bool KeepData)
{
Q_UNUSED(KeepData)

// mProgramHandle->ZTLogFilesFetchingTick(this,mZTLogFilesList.size(),FilePath);
ExtractLogInfo(FilePath);
mDatabaseParsingTimer->start();
}

void CZTLogFilesMgr::DirParsingFinished(int Res)
{
qDebug("ZTLog Files Parsing finished with result %d",Res);
mDirParserThread->quit();
mDatabaseParsingTimer->stop();
// mProgramHandle->ZTLogFilesDatabaseLoaded(this,Res);
qDebug("Parsed %d ZTLog files",mZTLogFilesList.size());

if(mSaveDBFile == true)
{
SaveDatabaseFile();
}
}

int CZTLogFilesMgr::GetZTLogFilesCount()
{
return mZTLogFilesList.size();
}

void CZTLogFilesMgr::ParsingTimerExpired()
{
qDebug("ZTLogs Parsing timer timeout");
mDirParserWorkerThread->KillThread();
mDirParserThread->terminate();
DirParsingFinished(2);
}

void CZTLogFilesMgr::EmptyDirParsed()
{
//The thread is not stuck. Kick the timer...
mDatabaseParsingTimer->start();
}

void CZTLogFilesMgr::ThreadQuit()
{
// qDebug("Thread quit slot");
}

void CZTLogFilesMgr::ThreadTerminated()
{
// qDebug("Thread terminated slot");
}


bool CZTLogFilesMgr::ExtractLogInfo(QString LogFilePath)
{
QFileInfo LogFileInfo(LogFilePath);

if(LogFileInfo.fileName() != "ZTLog.txt")
return false;

CZTLogFileInfo NewLogFileInfo;


int line =0;
QFile *LogFile = new QFile(LogFilePath);
if(LogFile)
{
if(LogFile->open(QIODevice::ReadOnly | QIODevice::Text | QIODevice::Unbuffered) == true)
{
QString LogText(LogFile->readAll());

QTextStream strm(&LogText);
strm.seek(0);

QString temp;

//find a valid line
do
{
temp = strm.readLine();
line++;

if(strm.atEnd())
break;
}
while(temp.length() < 10);

// temp = strm.readLine();
QStringList parts = temp.split(" : ");
QString LineText,DateString;


if(parts.size() != 0)
{
LineText.clear();

DateString = parts.at(0);
NewLogFileInfo.mStartDateTime = QDateTime::fromString(DateString,"yyyy/MM/dd - hh:mm:ss.zzz");
}

//go to end of file
QString LastValidLine;
do
{
temp = strm.readLine();
if(temp.size() >=10)
LastValidLine = temp;
}
while(!strm.atEnd());

parts = LastValidLine.split(" : ");

if(parts.size() != 0)
{
DateString = parts.at(0);
NewLogFileInfo.mEndDateTime = QDateTime::fromString(DateString,"yyyy/MM/dd - hh:mm:ss.zzz");
}
LogFile->close();
}
delete LogFile;
}
else
{
return false;
}

NewLogFileInfo.mZTLogFilePath = LogFilePath;

if(LogFilePath.contains("ANG"))
{
NewLogFileInfo.mZTStationID = ANGRIGNON_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(ANGRIGNON_ZT_ID);// "Angrignon";
}
else if(LogFilePath.contains("BUQ4"))
{
NewLogFileInfo.mZTStationID = BERRI_UQAM_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(BERRI_UQAM_ZT_ID);//"Berri-UQAM";
}
else if(LogFilePath.contains("HBOU"))
{
NewLogFileInfo.mZTStationID = HENRI_BOURASSA_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(HENRI_BOURASSA_ZT_ID);//"Henri-Bourassa";
}
else if(LogFilePath.contains("HBGR"))
{
NewLogFileInfo.mZTStationID = HONORE_BEAUGRAND_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(HONORE_BEAUGRAND_ZT_ID);//"Honoré-Beaugrand";
}
else if(LogFilePath.contains("LONG"))
{
NewLogFileInfo.mZTStationID = LONGUEUIL_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(LONGUEUIL_ZT_ID);//"Longueuil";
}
else if(LogFilePath.contains("MMOY"))
{
NewLogFileInfo.mZTStationID = MONTMORENCY_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(MONTMORENCY_ZT_ID);//"Montmorency";
}
// else if(LogFilePath.contains("MMO"))
// {
// NewLogFileInfo.mZTStationID = MONTMORENCY_10_12_ZT_ID;
// // NewLogFileInfo.mStationName = mProgramHandle->GetStationName(MONTMORENCY_10_12_ZT_ID);//"Montmorency 10/12";
// }
// else if(LogFilePath.contains("MMO2"))
// {
// NewLogFileInfo.mZTStationID = MONTMORENCY_10_22_ZT_ID;
// // NewLogFileInfo.mStationName = mProgramHandle->GetStationName(MONTMORENCY_10_22_ZT_ID);///"Montmorency 10/22";
// }
else if(LogFilePath.contains("SMIC"))
{
NewLogFileInfo.mZTStationID = SAINT_MICHEL_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(SAINT_MICHEL_ZT_ID);//"Saint-Michel";
}
else if(LogFilePath.contains("SNW5"))
{
NewLogFileInfo.mZTStationID = SNOWDON_ZT_ID;
// NewLogFileInfo.mStationName = mProgramHandle->GetStationName(SNOWDON_ZT_ID);//"Snowdon";
}
else
{
return false;
}

mZTLogFilesList.append(NewLogFileInfo);

return true;
}

int CZTLogFilesMgr::ParseDir(QDir dir)
{

QStringList LogFilters;
QFileInfoList list;
// QString LogDataDir = mProgramHandle->GetLogDataPath();
LogFilters << "*.txt";

//Load files in base directory
QDir LogDir(dir);
LogDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
LogDir.setNameFilters(LogFilters);
LogDir.setSorting(QDir::Name);
list = LogDir.entryInfoList();
if(list.size() != 0)
{
//Extract data for each passage
for(int i = 0; i < list.size(); i++)
{
ExtractLogInfo(list.at(i).absoluteFilePath());
}
}


//Check for subdirectories
QDir SubDirectories(dir);

SubDirectories.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);

QFileInfoList SubDirList = SubDirectories.entryInfoList();
for(int i = 0; i < SubDirList.size(); i++)
{
ParseDir(QDir(SubDirList.at(i).absoluteFilePath()));
}

return 1;
}

int CZTLogFilesMgr::SaveDatabaseFile()
{
qDebug("Saving ZTLogs.zdb database");
QDir BaseDir(mLogDatabaseDir);
QString DatabaseFilePath = BaseDir.filePath("ZTLogs.zdb");
// DatabaseFilePath += "Trains.zdb";
QFile* DatabaseFile = new QFile(BaseDir.filePath("ZTLogs.zdb")/*DatabaseFilePath*/);


if(DatabaseFile)
{
if(DatabaseFile->open(QIODevice::WriteOnly | QIODevice::Unbuffered) == false)
{
QMessageBox::information(0,"Erreur","Impossible de créer le fichier DB ZTLog");
delete DatabaseFile;
return RET_ERROR;
}
}
else
{
QMessageBox::information(0,"Erreur","Impossible de créer le fichier DB ZTLog");
return RET_ERROR;
}


QByteArray byteArray;
QBuffer FileBuffer(&byteArray);
FileBuffer.open(QIODevice::WriteOnly);
QDataStream *DBStrm = new QDataStream(&FileBuffer);

qint32 NBRecords = mZTLogFilesList.size();
*DBStrm << NBRecords;

for(int i = 0; i < mZTLogFilesList.size(); i++)
{
*DBStrm << mZTLogFilesList.at(i).mStationName
<< mZTLogFilesList.at(i).mZTStationID
<< mZTLogFilesList.at(i).mStartDateTime
<< mZTLogFilesList.at(i).mEndDateTime
<< mZTLogFilesList.at(i).mZTLogFilePath;
}

FileBuffer.seek(0);
DatabaseFile->write(FileBuffer.buffer());
DatabaseFile->flush();

FileBuffer.close();
DatabaseFile->close();
delete DatabaseFile;
delete DBStrm;
mSaveDBFile = false;
return RET_OK;
}

+ 83
- 0
Sources/ZTLogFilesMgr.h ファイルの表示

@@ -0,0 +1,83 @@
/*******************************************************************************
* *
* Société de Transports de Montréal. *
* 2012 - 2013 *
* *
* Projet Zones Tests *
* *
* *
* *
*******************************************************************************/
/*
Description:
Cette classe est responsable de la création d'une liste de tous lesfichiers
ZTLog présents dans la base de données. À ne pas confondre avec les fichiers
de passage.

*/

/* ************************************************************************** */
/* Revision:
### 20150227 JFM


### YYYYMMDD Description du besoin ou du bug
Description du changement.
*/

/* ************************************************************************** */

#ifndef ZTLOGFILESMGR_H
#define ZTLOGFILESMGR_H

#include "ZTData.h"
#include "GlobalDefine.h"
#include <QList>
#include <QDir>
#include "DirParserThread.h"
#include <QThread>
#include <QTimer>

class COutilZT;

class CZTLogFilesMgr: public QObject
{
Q_OBJECT
public:
CZTLogFilesMgr();
~CZTLogFilesMgr();

COutilZT *mProgramHandle;

void DestroyZTLogFilesList();
void ParseZTLogFiles(bool RebuildDatabase);
bool ExtractLogInfo(QString LogFilePath);
void SetLogDataDir(QString Dir){mLogDatabaseDir = Dir;}
QList<CZTLogFileInfo> *GetZTLogsList(){return &mZTLogFilesList;}
int GetZTLogFilesCount();
int SaveDatabaseFile();

private:

QList<CZTLogFileInfo> mZTLogFilesList;
QString mLogDatabaseDir;
QThread *mDirParserThread;
CDirParserThread *mDirParserWorkerThread;
QTimer *mDatabaseParsingTimer;
bool mSaveDBFile;


int ParseDir(QDir dir);

public slots:
void NewZTLogParsed(QString,bool);
void DirParsingFinished(int);
void ParsingTimerExpired();
void EmptyDirParsed();


void ThreadQuit();
void ThreadTerminated();
};

#endif // ZTLOGFILESMGR_H

+ 82
- 0
Sources/ZTStats.cpp ファイルの表示

@@ -0,0 +1,82 @@
#include "ZTStats.h"
#include "MainWindow.h"
#include <QFile>

CZTStats::CZTStats(CMainWindow *MainWindowPtr)
{
mMainWindow = MainWindowPtr;
mReportGenerator.mProgramPtr = this;
}

void CZTStats::Init()
{
mMainWindow->mReportPage->mProgramHandle = this;
// mProgramConfig.mDataSourceDirectoryPaths.append("D:\\Main\\Dev\\ZTStats\\LOGS");
QString Path = "C:";
QFile *CfgFile = new QFile("Source.txt");
if(CfgFile != 0)
{

CfgFile->open(QIODevice::ReadOnly | QIODevice::Text);
while(!CfgFile->atEnd())
{
Path = QString(CfgFile->readLine()).trimmed();
if(Path.contains("#") == false)
{
QDir test(Path);
if(test.exists() == true)
{
mProgramConfig.mDataSourceDirectoryPaths.append(Path);
}
else
{
mMainWindow->mReportPage->UpdateProgressStatus(QString("Répertoire invalide dans le fichier de configuration: %1").arg(Path));
}
}
}

// if(Path.isEmpty())
// {
// Path = "C:";
// }

CfgFile->close();
delete CfgFile;
}



for(int i = 0; i < mProgramConfig.mDataSourceDirectoryPaths.size(); i++)
{
UpdateReportProgressStatus(QString("Répertoire source: %1").arg(mProgramConfig.mDataSourceDirectoryPaths.at(i)));
}



}

void CZTStats::Run()
{

}

int CZTStats::GenerateReportRequest(QString OutputFileName, CReportConfigData ReportConfigFilters)
{
mReportGenerator.GenerateReport(OutputFileName,mProgramConfig,ReportConfigFilters);
return RET_OK;
}

void CZTStats::UpdateReportProgressStatus(QString status)
{
mMainWindow->mReportPage->UpdateProgressStatus(status);
}

void CZTStats::ReportCreationFinished(QString ReportFilePath)
{
mMainWindow->mReportPage->ReportCreationFinished(ReportFilePath);
}

void CZTStats::AbortReportCreationRequest()
{
mReportGenerator.AbortReportCreation();
}

+ 29
- 0
Sources/ZTStats.h ファイルの表示

@@ -0,0 +1,29 @@
#ifndef ZTSTATS_H
#define ZTSTATS_H

#include "ReportGenerator.h"
#include "ReportSettingsData.h"

class CMainWindow;

class CZTStats
{
public:
CZTStats(CMainWindow *MainWindowPtr);

void Init();
void Run();

int GenerateReportRequest(QString OutputFileName,CReportConfigData ReportConfigFilters);
void UpdateReportProgressStatus(QString status);
void ReportCreationFinished(QString ReportFilePath);
void AbortReportCreationRequest();

CReportGenerator mReportGenerator;
CReportProgramSettingsData mProgramConfig;

CMainWindow *mMainWindow;

};

#endif // ZTSTATS_H

+ 17
- 0
Sources/main.cpp ファイルの表示

@@ -0,0 +1,17 @@
#include "MainWindow.h"
#include <QApplication>
#include "ZTStats.h"

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
CMainWindow w;

CZTStats Program(&w);
Program.Init();
Program.Run();

w.show();

return a.exec();
}

+ 59
- 0
ZTStats.pro ファイルの表示

@@ -0,0 +1,59 @@
#-------------------------------------------------
#
# Project created by QtCreator 2024-07-23T14:12:59
#
#-------------------------------------------------

QT += core gui xlsx

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ZTStats
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0


SOURCES +=\
Sources/main.cpp \
Sources/MainWindow.cpp \
Sources/DirParserThread.cpp \
Sources/ZTLogFilesMgr.cpp \
Sources/ZTData.cpp \
Sources/TrainLogFileMgr.cpp \
Sources/LogMgr.cpp \
Sources/ReportPage.cpp \
Sources/SettingsPage.cpp \
Sources/ReportSettingsData.cpp \
Sources/ReportGenerator.cpp \
Sources/ZTStats.cpp

HEADERS += \
Sources/MainWindow.h \
Sources/DirParserThread.h \
Sources/GlobalDefine.h \
Sources/ZTLogFilesMgr.h \
Sources/ZTData.h \
Sources/TrainLogFileMgr.h \
Sources/LogMgr.h \
Sources/ReportPage.h \
Sources/SettingsPage.h \
Sources/ReportSettingsData.h \
Sources/ReportGenerator.h \
Sources/ZTStats.h
Sources/MainWindow.h

FORMS += MainWindow.ui \
ReportPage.ui \
Sources/SettingsPage.ui

INCLUDEPATH += PWD/Sources\

+ 19
- 0
object_script.ZTStats.Debug ファイルの表示

@@ -0,0 +1,19 @@
debug/main.o
debug/MainWindow.o
debug/DirParserThread.o
debug/ZTLogFilesMgr.o
debug/ZTData.o
debug/TrainLogFileMgr.o
debug/LogMgr.o
debug/ReportPage.o
debug/SettingsPage.o
debug/ReportSettingsData.o
debug/ReportGenerator.o
debug/ZTStats.o
debug/moc_MainWindow.o
debug/moc_DirParserThread.o
debug/moc_ZTLogFilesMgr.o
debug/moc_LogMgr.o
debug/moc_ReportPage.o
debug/moc_SettingsPage.o
debug/moc_ReportGenerator.o

+ 19
- 0
object_script.ZTStats.Release ファイルの表示

@@ -0,0 +1,19 @@
release/main.o
release/MainWindow.o
release/DirParserThread.o
release/ZTLogFilesMgr.o
release/ZTData.o
release/TrainLogFileMgr.o
release/LogMgr.o
release/ReportPage.o
release/SettingsPage.o
release/ReportSettingsData.o
release/ReportGenerator.o
release/ZTStats.o
release/moc_MainWindow.o
release/moc_DirParserThread.o
release/moc_ZTLogFilesMgr.o
release/moc_LogMgr.o
release/moc_ReportPage.o
release/moc_SettingsPage.o
release/moc_ReportGenerator.o

バイナリ
test.xlsx ファイルの表示


+ 62
- 0
ui_MainWindow.h ファイルの表示

@@ -0,0 +1,62 @@
/********************************************************************************
** Form generated from reading UI file 'MainWindow.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_MAINWINDOW_H
#define UI_MAINWINDOW_H

#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QWidget>

QT_BEGIN_NAMESPACE

class Ui_CMainWindow
{
public:
QWidget *centralWidget;
QGroupBox *ReportParamsGroupBx;
QStatusBar *statusBar;

void setupUi(QMainWindow *CMainWindow)
{
if (CMainWindow->objectName().isEmpty())
CMainWindow->setObjectName(QString::fromUtf8("CMainWindow"));
CMainWindow->resize(927, 610);
centralWidget = new QWidget(CMainWindow);
centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
ReportParamsGroupBx = new QGroupBox(centralWidget);
ReportParamsGroupBx->setObjectName(QString::fromUtf8("ReportParamsGroupBx"));
ReportParamsGroupBx->setGeometry(QRect(10, 10, 531, 551));
CMainWindow->setCentralWidget(centralWidget);
statusBar = new QStatusBar(CMainWindow);
statusBar->setObjectName(QString::fromUtf8("statusBar"));
CMainWindow->setStatusBar(statusBar);

retranslateUi(CMainWindow);

QMetaObject::connectSlotsByName(CMainWindow);
} // setupUi

void retranslateUi(QMainWindow *CMainWindow)
{
CMainWindow->setWindowTitle(QCoreApplication::translate("CMainWindow", "CMainWindow", nullptr));
ReportParamsGroupBx->setTitle(QCoreApplication::translate("CMainWindow", "Param\303\250tres du rapport", nullptr));
} // retranslateUi

};

namespace Ui {
class CMainWindow: public Ui_CMainWindow {};
} // namespace Ui

QT_END_NAMESPACE

#endif // UI_MAINWINDOW_H

+ 286
- 0
ui_ReportPage.h ファイルの表示

@@ -0,0 +1,286 @@
/********************************************************************************
** Form generated from reading UI file 'ReportPage.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_REPORTPAGE_H
#define UI_REPORTPAGE_H

#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDateEdit>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QLabel>
#include <QtWidgets/QProgressBar>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QWidget>

QT_BEGIN_NAMESPACE

class Ui_CReportPage
{
public:
QGroupBox *groupBox;
QDateEdit *mReportEndDateEdit;
QLabel *mReportStartDateLbl;
QDateEdit *mReportStartDateEdit;
QLabel *mReportEndDateLbl;
QGroupBox *groupBox_2;
QCheckBox *mReportFunctionPPI_2ChkBx;
QCheckBox *mReportFunctionComptage_2ChkBx;
QCheckBox *mReportFunctionPEQ2ChkBx;
QCheckBox *mReportFunctionFNChkBx;
QCheckBox *mReportFunctionPGChkBx;
QCheckBox *mReportFunctionPEQ1ChkBx;
QCheckBox *mReportFunctionPPE_2ChkBx;
QCheckBox *mReportFunctionComptage_1ChkBx;
QLabel *mReportEndDateLbl_2;
QLabel *mReportEndDateLbl_3;
QCheckBox *mReportFunctionPPE_1ChkBx;
QCheckBox *mReportFunctionPPI_1ChkBx;
QCheckBox *mReportFunctionNoDecl1ChkBx;
QCheckBox *mReportFunctionNoDecl2ChkBx;
QPushButton *mSelectAllFuncZT1Btn;
QPushButton *mSelectNoneFuncZT1Btn;
QPushButton *mSelectNoneFuncZT2Btn;
QPushButton *mSelectAllFuncZT2Btn;
QGroupBox *groupBox_3;
QCheckBox *mReportStationSnowdonChkBx;
QCheckBox *mReportStationBeaugrandChkBx;
QCheckBox *mReportStationBourassaChkBx;
QCheckBox *mReportStationVertuChkBx;
QCheckBox *mReportStationMontmorencyChkBx;
QCheckBox *mReportStationBerriChkBx;
QCheckBox *mReportStationLongueuilChkBx;
QCheckBox *mReportStationStMichelChkBx;
QCheckBox *mReportStationAngrignonChkBx;
QPushButton *mGenerateReportBtn;
QProgressBar *mReportProgressBarr;
QTextEdit *mReportProgressTextEdit;
QLabel *mTimerLable;
QPushButton *mOpenReportBtn;
QLabel *mReportPathLabel;

void setupUi(QWidget *CReportPage)
{
if (CReportPage->objectName().isEmpty())
CReportPage->setObjectName(QString::fromUtf8("CReportPage"));
CReportPage->resize(980, 617);
groupBox = new QGroupBox(CReportPage);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
groupBox->setGeometry(QRect(10, 20, 391, 561));
mReportEndDateEdit = new QDateEdit(groupBox);
mReportEndDateEdit->setObjectName(QString::fromUtf8("mReportEndDateEdit"));
mReportEndDateEdit->setGeometry(QRect(94, 70, 110, 22));
mReportStartDateLbl = new QLabel(groupBox);
mReportStartDateLbl->setObjectName(QString::fromUtf8("mReportStartDateLbl"));
mReportStartDateLbl->setGeometry(QRect(14, 40, 71, 20));
QFont font;
font.setPointSize(10);
mReportStartDateLbl->setFont(font);
mReportStartDateLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
mReportStartDateEdit = new QDateEdit(groupBox);
mReportStartDateEdit->setObjectName(QString::fromUtf8("mReportStartDateEdit"));
mReportStartDateEdit->setGeometry(QRect(94, 40, 110, 22));
mReportEndDateLbl = new QLabel(groupBox);
mReportEndDateLbl->setObjectName(QString::fromUtf8("mReportEndDateLbl"));
mReportEndDateLbl->setGeometry(QRect(10, 70, 71, 20));
mReportEndDateLbl->setFont(font);
mReportEndDateLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
groupBox_2 = new QGroupBox(groupBox);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
groupBox_2->setGeometry(QRect(10, 280, 371, 261));
mReportFunctionPPI_2ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPPI_2ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPPI_2ChkBx"));
mReportFunctionPPI_2ChkBx->setGeometry(QRect(180, 50, 131, 20));
mReportFunctionPPI_2ChkBx->setFont(font);
mReportFunctionComptage_2ChkBx = new QCheckBox(groupBox_2);
mReportFunctionComptage_2ChkBx->setObjectName(QString::fromUtf8("mReportFunctionComptage_2ChkBx"));
mReportFunctionComptage_2ChkBx->setGeometry(QRect(180, 90, 131, 20));
mReportFunctionComptage_2ChkBx->setFont(font);
mReportFunctionPEQ2ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPEQ2ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPEQ2ChkBx"));
mReportFunctionPEQ2ChkBx->setGeometry(QRect(180, 110, 131, 20));
mReportFunctionPEQ2ChkBx->setFont(font);
mReportFunctionFNChkBx = new QCheckBox(groupBox_2);
mReportFunctionFNChkBx->setObjectName(QString::fromUtf8("mReportFunctionFNChkBx"));
mReportFunctionFNChkBx->setGeometry(QRect(10, 50, 131, 20));
mReportFunctionFNChkBx->setFont(font);
mReportFunctionPGChkBx = new QCheckBox(groupBox_2);
mReportFunctionPGChkBx->setObjectName(QString::fromUtf8("mReportFunctionPGChkBx"));
mReportFunctionPGChkBx->setGeometry(QRect(10, 70, 131, 20));
mReportFunctionPGChkBx->setFont(font);
mReportFunctionPEQ1ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPEQ1ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPEQ1ChkBx"));
mReportFunctionPEQ1ChkBx->setGeometry(QRect(10, 150, 131, 20));
mReportFunctionPEQ1ChkBx->setFont(font);
mReportFunctionPPE_2ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPPE_2ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPPE_2ChkBx"));
mReportFunctionPPE_2ChkBx->setGeometry(QRect(180, 70, 131, 20));
mReportFunctionPPE_2ChkBx->setFont(font);
mReportFunctionComptage_1ChkBx = new QCheckBox(groupBox_2);
mReportFunctionComptage_1ChkBx->setObjectName(QString::fromUtf8("mReportFunctionComptage_1ChkBx"));
mReportFunctionComptage_1ChkBx->setGeometry(QRect(10, 130, 131, 20));
mReportFunctionComptage_1ChkBx->setFont(font);
mReportEndDateLbl_2 = new QLabel(groupBox_2);
mReportEndDateLbl_2->setObjectName(QString::fromUtf8("mReportEndDateLbl_2"));
mReportEndDateLbl_2->setGeometry(QRect(30, 20, 71, 20));
QFont font1;
font1.setPointSize(12);
mReportEndDateLbl_2->setFont(font1);
mReportEndDateLbl_2->setAlignment(Qt::AlignCenter);
mReportEndDateLbl_3 = new QLabel(groupBox_2);
mReportEndDateLbl_3->setObjectName(QString::fromUtf8("mReportEndDateLbl_3"));
mReportEndDateLbl_3->setGeometry(QRect(190, 20, 71, 20));
mReportEndDateLbl_3->setFont(font1);
mReportEndDateLbl_3->setAlignment(Qt::AlignCenter);
mReportFunctionPPE_1ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPPE_1ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPPE_1ChkBx"));
mReportFunctionPPE_1ChkBx->setGeometry(QRect(10, 110, 131, 20));
mReportFunctionPPE_1ChkBx->setFont(font);
mReportFunctionPPI_1ChkBx = new QCheckBox(groupBox_2);
mReportFunctionPPI_1ChkBx->setObjectName(QString::fromUtf8("mReportFunctionPPI_1ChkBx"));
mReportFunctionPPI_1ChkBx->setGeometry(QRect(10, 90, 131, 20));
mReportFunctionPPI_1ChkBx->setFont(font);
mReportFunctionNoDecl1ChkBx = new QCheckBox(groupBox_2);
mReportFunctionNoDecl1ChkBx->setObjectName(QString::fromUtf8("mReportFunctionNoDecl1ChkBx"));
mReportFunctionNoDecl1ChkBx->setGeometry(QRect(10, 220, 151, 20));
mReportFunctionNoDecl1ChkBx->setFont(font);
mReportFunctionNoDecl2ChkBx = new QCheckBox(groupBox_2);
mReportFunctionNoDecl2ChkBx->setObjectName(QString::fromUtf8("mReportFunctionNoDecl2ChkBx"));
mReportFunctionNoDecl2ChkBx->setGeometry(QRect(170, 220, 151, 20));
mReportFunctionNoDecl2ChkBx->setFont(font);
mSelectAllFuncZT1Btn = new QPushButton(groupBox_2);
mSelectAllFuncZT1Btn->setObjectName(QString::fromUtf8("mSelectAllFuncZT1Btn"));
mSelectAllFuncZT1Btn->setGeometry(QRect(10, 180, 41, 22));
mSelectNoneFuncZT1Btn = new QPushButton(groupBox_2);
mSelectNoneFuncZT1Btn->setObjectName(QString::fromUtf8("mSelectNoneFuncZT1Btn"));
mSelectNoneFuncZT1Btn->setGeometry(QRect(70, 180, 41, 22));
mSelectNoneFuncZT2Btn = new QPushButton(groupBox_2);
mSelectNoneFuncZT2Btn->setObjectName(QString::fromUtf8("mSelectNoneFuncZT2Btn"));
mSelectNoneFuncZT2Btn->setGeometry(QRect(240, 140, 41, 22));
mSelectAllFuncZT2Btn = new QPushButton(groupBox_2);
mSelectAllFuncZT2Btn->setObjectName(QString::fromUtf8("mSelectAllFuncZT2Btn"));
mSelectAllFuncZT2Btn->setGeometry(QRect(180, 140, 41, 22));
groupBox_3 = new QGroupBox(groupBox);
groupBox_3->setObjectName(QString::fromUtf8("groupBox_3"));
groupBox_3->setGeometry(QRect(10, 120, 371, 141));
mReportStationSnowdonChkBx = new QCheckBox(groupBox_3);
mReportStationSnowdonChkBx->setObjectName(QString::fromUtf8("mReportStationSnowdonChkBx"));
mReportStationSnowdonChkBx->setGeometry(QRect(150, 90, 111, 20));
mReportStationSnowdonChkBx->setFont(font);
mReportStationBeaugrandChkBx = new QCheckBox(groupBox_3);
mReportStationBeaugrandChkBx->setObjectName(QString::fromUtf8("mReportStationBeaugrandChkBx"));
mReportStationBeaugrandChkBx->setGeometry(QRect(10, 40, 111, 20));
mReportStationBeaugrandChkBx->setFont(font);
mReportStationBourassaChkBx = new QCheckBox(groupBox_3);
mReportStationBourassaChkBx->setObjectName(QString::fromUtf8("mReportStationBourassaChkBx"));
mReportStationBourassaChkBx->setGeometry(QRect(10, 90, 111, 20));
mReportStationBourassaChkBx->setFont(font);
mReportStationVertuChkBx = new QCheckBox(groupBox_3);
mReportStationVertuChkBx->setObjectName(QString::fromUtf8("mReportStationVertuChkBx"));
mReportStationVertuChkBx->setGeometry(QRect(10, 70, 111, 20));
mReportStationVertuChkBx->setFont(font);
mReportStationMontmorencyChkBx = new QCheckBox(groupBox_3);
mReportStationMontmorencyChkBx->setObjectName(QString::fromUtf8("mReportStationMontmorencyChkBx"));
mReportStationMontmorencyChkBx->setGeometry(QRect(10, 110, 111, 20));
mReportStationMontmorencyChkBx->setFont(font);
mReportStationBerriChkBx = new QCheckBox(groupBox_3);
mReportStationBerriChkBx->setObjectName(QString::fromUtf8("mReportStationBerriChkBx"));
mReportStationBerriChkBx->setGeometry(QRect(150, 20, 91, 20));
mReportStationBerriChkBx->setFont(font);
mReportStationLongueuilChkBx = new QCheckBox(groupBox_3);
mReportStationLongueuilChkBx->setObjectName(QString::fromUtf8("mReportStationLongueuilChkBx"));
mReportStationLongueuilChkBx->setGeometry(QRect(150, 40, 91, 20));
mReportStationLongueuilChkBx->setFont(font);
mReportStationStMichelChkBx = new QCheckBox(groupBox_3);
mReportStationStMichelChkBx->setObjectName(QString::fromUtf8("mReportStationStMichelChkBx"));
mReportStationStMichelChkBx->setGeometry(QRect(150, 70, 111, 20));
mReportStationStMichelChkBx->setFont(font);
mReportStationAngrignonChkBx = new QCheckBox(groupBox_3);
mReportStationAngrignonChkBx->setObjectName(QString::fromUtf8("mReportStationAngrignonChkBx"));
mReportStationAngrignonChkBx->setGeometry(QRect(10, 20, 91, 20));
mReportStationAngrignonChkBx->setFont(font);
mGenerateReportBtn = new QPushButton(CReportPage);
mGenerateReportBtn->setObjectName(QString::fromUtf8("mGenerateReportBtn"));
mGenerateReportBtn->setGeometry(QRect(470, 30, 111, 22));
mReportProgressBarr = new QProgressBar(CReportPage);
mReportProgressBarr->setObjectName(QString::fromUtf8("mReportProgressBarr"));
mReportProgressBarr->setGeometry(QRect(510, 470, 321, 23));
mReportProgressBarr->setValue(24);
mReportProgressTextEdit = new QTextEdit(CReportPage);
mReportProgressTextEdit->setObjectName(QString::fromUtf8("mReportProgressTextEdit"));
mReportProgressTextEdit->setGeometry(QRect(470, 60, 401, 391));
mReportProgressTextEdit->setTextInteractionFlags(Qt::NoTextInteraction);
mTimerLable = new QLabel(CReportPage);
mTimerLable->setObjectName(QString::fromUtf8("mTimerLable"));
mTimerLable->setGeometry(QRect(670, 30, 151, 16));
mTimerLable->setFont(font1);
mOpenReportBtn = new QPushButton(CReportPage);
mOpenReportBtn->setObjectName(QString::fromUtf8("mOpenReportBtn"));
mOpenReportBtn->setGeometry(QRect(470, 510, 80, 22));
mReportPathLabel = new QLabel(CReportPage);
mReportPathLabel->setObjectName(QString::fromUtf8("mReportPathLabel"));
mReportPathLabel->setGeometry(QRect(560, 510, 381, 16));
mReportPathLabel->setFont(font);

retranslateUi(CReportPage);

QMetaObject::connectSlotsByName(CReportPage);
} // setupUi

void retranslateUi(QWidget *CReportPage)
{
CReportPage->setWindowTitle(QCoreApplication::translate("CReportPage", "Form", nullptr));
groupBox->setTitle(QCoreApplication::translate("CReportPage", "Param\303\250tres du rapport", nullptr));
mReportStartDateLbl->setText(QCoreApplication::translate("CReportPage", "Date d\303\251but", nullptr));
mReportEndDateLbl->setText(QCoreApplication::translate("CReportPage", "Date fin", nullptr));
groupBox_2->setTitle(QCoreApplication::translate("CReportPage", "Filtre d\303\251tection", nullptr));
mReportFunctionPPI_2ChkBx->setText(QCoreApplication::translate("CReportPage", "PP Int\303\251rieur", nullptr));
mReportFunctionComptage_2ChkBx->setText(QCoreApplication::translate("CReportPage", "Comptage", nullptr));
mReportFunctionPEQ2ChkBx->setText(QCoreApplication::translate("CReportPage", "Panne \303\211quipement", nullptr));
mReportFunctionFNChkBx->setText(QCoreApplication::translate("CReportPage", "Frotteurs N\303\251gatifs", nullptr));
mReportFunctionPGChkBx->setText(QCoreApplication::translate("CReportPage", "PG", nullptr));
mReportFunctionPEQ1ChkBx->setText(QCoreApplication::translate("CReportPage", "Panne \303\211quipement", nullptr));
mReportFunctionPPE_2ChkBx->setText(QCoreApplication::translate("CReportPage", "PP Ext\303\251rieur", nullptr));
mReportFunctionComptage_1ChkBx->setText(QCoreApplication::translate("CReportPage", "Comptage", nullptr));
mReportEndDateLbl_2->setText(QCoreApplication::translate("CReportPage", "ZT1", nullptr));
mReportEndDateLbl_3->setText(QCoreApplication::translate("CReportPage", "ZT2", nullptr));
mReportFunctionPPE_1ChkBx->setText(QCoreApplication::translate("CReportPage", "PP Ext\303\251rieur", nullptr));
mReportFunctionPPI_1ChkBx->setText(QCoreApplication::translate("CReportPage", "PP Int\303\251rieur", nullptr));
mReportFunctionNoDecl1ChkBx->setText(QCoreApplication::translate("CReportPage", "Sans d\303\251clenchements", nullptr));
mReportFunctionNoDecl2ChkBx->setText(QCoreApplication::translate("CReportPage", "Sans d\303\251clenchements", nullptr));
mSelectAllFuncZT1Btn->setText(QCoreApplication::translate("CReportPage", "Tout", nullptr));
mSelectNoneFuncZT1Btn->setText(QCoreApplication::translate("CReportPage", "Rien", nullptr));
mSelectNoneFuncZT2Btn->setText(QCoreApplication::translate("CReportPage", "Rien", nullptr));
mSelectAllFuncZT2Btn->setText(QCoreApplication::translate("CReportPage", "Tout", nullptr));
groupBox_3->setTitle(QCoreApplication::translate("CReportPage", "S\303\251lection des stations", nullptr));
mReportStationSnowdonChkBx->setText(QCoreApplication::translate("CReportPage", "Snowdon", nullptr));
mReportStationBeaugrandChkBx->setText(QCoreApplication::translate("CReportPage", "H. Beaugrand", nullptr));
mReportStationBourassaChkBx->setText(QCoreApplication::translate("CReportPage", "Henri-Bourassa", nullptr));
mReportStationVertuChkBx->setText(QCoreApplication::translate("CReportPage", "C\303\264te-Vertu", nullptr));
mReportStationMontmorencyChkBx->setText(QCoreApplication::translate("CReportPage", "Montmorency", nullptr));
mReportStationBerriChkBx->setText(QCoreApplication::translate("CReportPage", "Berri L4", nullptr));
mReportStationLongueuilChkBx->setText(QCoreApplication::translate("CReportPage", "Longueuil", nullptr));
mReportStationStMichelChkBx->setText(QCoreApplication::translate("CReportPage", "St-Michel", nullptr));
mReportStationAngrignonChkBx->setText(QCoreApplication::translate("CReportPage", "Angrignon", nullptr));
mGenerateReportBtn->setText(QCoreApplication::translate("CReportPage", "G\303\251n\303\251rer Rapport", nullptr));
mTimerLable->setText(QCoreApplication::translate("CReportPage", "TextLabel", nullptr));
mOpenReportBtn->setText(QCoreApplication::translate("CReportPage", "Ouvrir rapport", nullptr));
mReportPathLabel->setText(QCoreApplication::translate("CReportPage", "TextLabel", nullptr));
} // retranslateUi

};

namespace Ui {
class CReportPage: public Ui_CReportPage {};
} // namespace Ui

QT_END_NAMESPACE

#endif // UI_REPORTPAGE_H

+ 52
- 0
ui_SettingsPage.h ファイルの表示

@@ -0,0 +1,52 @@
/********************************************************************************
** Form generated from reading UI file 'SettingsPage.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_SETTINGSPAGE_H
#define UI_SETTINGSPAGE_H

#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QWidget>

QT_BEGIN_NAMESPACE

class Ui_CSettingsPage
{
public:
QGroupBox *groupBox;

void setupUi(QWidget *CSettingsPage)
{
if (CSettingsPage->objectName().isEmpty())
CSettingsPage->setObjectName(QString::fromUtf8("CSettingsPage"));
CSettingsPage->resize(667, 650);
groupBox = new QGroupBox(CSettingsPage);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
groupBox->setGeometry(QRect(40, 20, 431, 471));

retranslateUi(CSettingsPage);

QMetaObject::connectSlotsByName(CSettingsPage);
} // setupUi

void retranslateUi(QWidget *CSettingsPage)
{
CSettingsPage->setWindowTitle(QCoreApplication::translate("CSettingsPage", "Form", nullptr));
groupBox->setTitle(QCoreApplication::translate("CSettingsPage", "R\303\251pertoires sources", nullptr));
} // retranslateUi

};

namespace Ui {
class CSettingsPage: public Ui_CSettingsPage {};
} // namespace Ui

QT_END_NAMESPACE

#endif // UI_SETTINGSPAGE_H

読み込み中…
キャンセル
保存