2022-06-21 21:07:06 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
2022-06-20 21:44:58 +02:00
|
|
|
|
2022-08-16 22:08:57 +02:00
|
|
|
#include "ui_mainwindow.h"
|
|
|
|
|
2022-07-26 20:44:47 +02:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QCloseEvent>
|
2022-06-20 21:44:58 +02:00
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
#include <QTranslator>
|
2022-07-26 20:44:47 +02:00
|
|
|
#include <QFontDatabase>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QTreeWidget>
|
|
|
|
#include <QChartView>
|
2022-06-21 21:07:06 +02:00
|
|
|
|
2022-08-22 21:18:31 +02:00
|
|
|
#include "utilities/strings.h"
|
|
|
|
|
|
|
|
#include "modules/tb.h"
|
|
|
|
|
2022-08-27 11:18:02 +02:00
|
|
|
#include "modules/craplog/craplog.h"
|
|
|
|
#include "modules/crapview/crapview.h"
|
|
|
|
#include "modules/craphelp/craphelp.h"
|
|
|
|
#include "modules/crapup/crapup.h"
|
|
|
|
#include "modules/crapinfo/crapinfo.h"
|
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
#include "tools/crapnote/crapnote.h"
|
2022-08-27 11:18:02 +02:00
|
|
|
|
2022-11-24 22:29:50 +01:00
|
|
|
#include "games/crisscross/game.h"
|
|
|
|
#include "games/snake/game.h"
|
2022-10-16 16:27:13 +02:00
|
|
|
|
2022-06-23 04:00:37 +02:00
|
|
|
|
2022-06-20 21:44:58 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
2022-06-21 21:07:06 +02:00
|
|
|
namespace Ui { class MainWindow; }
|
2022-06-20 21:44:58 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! MainWindow
|
|
|
|
/*!
|
|
|
|
The parent window
|
|
|
|
*/
|
2022-06-21 21:07:06 +02:00
|
|
|
class MainWindow : public QMainWindow
|
2022-06-20 21:44:58 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-20 21:44:58 +02:00
|
|
|
public:
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 19:07:24 +01:00
|
|
|
explicit MainWindow( QWidget* parent=nullptr );
|
2022-06-21 21:07:06 +02:00
|
|
|
~MainWindow();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-06-30 20:47:05 +02:00
|
|
|
|
2022-06-21 21:07:06 +02:00
|
|
|
private slots:
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
///////////////////
|
|
|
|
//// OVERRIDES ////
|
2022-12-04 19:26:07 +01:00
|
|
|
void closeEvent( QCloseEvent *event ) override;
|
|
|
|
|
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
//////////////
|
|
|
|
//// INIT ////
|
2022-07-21 21:45:52 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void waitActiveWindow(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
//////////////
|
|
|
|
//// TABS ////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
void on_button_Tab_Log_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_View_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_Conf_clicked();
|
|
|
|
|
|
|
|
//// STATS ////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
void on_button_Tab_StatsWarn_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_StatsSpeed_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_StatsCount_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_StatsDay_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_StatsRelat_clicked();
|
|
|
|
|
|
|
|
void on_button_Tab_StatsGlob_clicked();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
/////////////////
|
|
|
|
//// CRAPLOG ////
|
|
|
|
|
2022-11-07 21:25:29 +01:00
|
|
|
void on_button_Logs_Down_clicked();
|
|
|
|
|
|
|
|
void on_button_Logs_Up_clicked();
|
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void refreshLogsList(); // CUSTOM
|
2022-10-06 21:34:02 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void checkRefreshFinished(); // CUSTOM
|
|
|
|
|
|
|
|
void runCraplog(); // CUSTOM
|
|
|
|
|
|
|
|
void checkCraplogFinished(); // CUSTOM
|
|
|
|
|
|
|
|
void afterCraplogFinished(); // CUSTOM
|
2022-10-06 21:34:02 +02:00
|
|
|
|
2022-06-30 20:47:05 +02:00
|
|
|
void on_button_LogFiles_ViewFile_clicked();
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-25 21:17:40 +02:00
|
|
|
void on_checkBox_LogFiles_CheckAll_stateChanged(int arg1);
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-30 20:47:05 +02:00
|
|
|
void on_button_LogFiles_RefreshList_clicked();
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-21 21:07:06 +02:00
|
|
|
void on_listLogFiles_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-22 21:37:35 +02:00
|
|
|
void on_listLogFiles_itemChanged(QTreeWidgetItem *item, int column);
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-06-26 23:12:57 +02:00
|
|
|
void on_button_LogFiles_Apache_clicked();
|
|
|
|
|
|
|
|
void on_button_LogFiles_Nginx_clicked();
|
|
|
|
|
|
|
|
void on_button_LogFiles_Iis_clicked();
|
|
|
|
|
2022-06-30 20:47:05 +02:00
|
|
|
void on_button_MakeStats_Start_clicked();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//////////////////
|
|
|
|
//// CRAPVIEW ////
|
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsWarn(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsSpeed(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsCount(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsDay(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsRelat(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void drawStatsGlobals(); // CUSTOM
|
2022-08-19 22:42:58 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// WARNINGS ////
|
|
|
|
|
2022-07-25 21:57:45 +02:00
|
|
|
void on_box_StatsWarn_WebServer_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsWarn_Year_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsWarn_Month_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsWarn_Day_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_checkBox_StatsWarn_Hour_stateChanged(int state);
|
|
|
|
|
|
|
|
void on_box_StatsWarn_Hour_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_button_StatsWarn_Draw_clicked();
|
|
|
|
|
2022-07-28 22:45:38 +02:00
|
|
|
void on_button_StatsWarn_Update_clicked();
|
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// SPEED ////
|
|
|
|
|
2022-07-21 21:45:52 +02:00
|
|
|
void on_box_StatsSpeed_WebServer_currentIndexChanged(int index);
|
2022-07-09 18:16:09 +02:00
|
|
|
|
2022-07-21 21:45:52 +02:00
|
|
|
void on_box_StatsSpeed_Year_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsSpeed_Month_currentIndexChanged(int index);
|
|
|
|
|
2022-07-25 21:57:45 +02:00
|
|
|
void on_box_StatsSpeed_Day_currentIndexChanged(int index);
|
|
|
|
|
2022-07-21 21:45:52 +02:00
|
|
|
void on_button_StatsSpeed_Draw_clicked();
|
2022-06-30 20:47:05 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// COUNTS ////
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_box_StatsCount_WebServer_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsCount_Year_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsCount_Month_currentIndexChanged(int index);
|
|
|
|
|
2022-07-25 21:57:45 +02:00
|
|
|
void on_box_StatsCount_Day_currentIndexChanged(int index);
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_button_StatsCount_Protocol_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsCount_Method_clicked();
|
|
|
|
|
2022-08-22 21:18:31 +02:00
|
|
|
void on_button_StatsCount_Uri_clicked();
|
2022-07-22 22:56:49 +02:00
|
|
|
|
|
|
|
void on_button_StatsCount_Query_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsCount_Response_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsCount_Referrer_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsCount_Cookie_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsCount_UserAgent_clicked();
|
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_StatsCount_Client_clicked();
|
2022-07-22 22:56:49 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// DAY-TIME ////
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_box_StatsDay_WebServer_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsDay_LogsField_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsDay_FromYear_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsDay_FromMonth_currentIndexChanged(int index);
|
|
|
|
|
2022-07-23 15:11:55 +02:00
|
|
|
void on_box_StatsDay_FromDay_currentIndexChanged(int index);
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_checkBox_StatsDay_Period_stateChanged(int state);
|
|
|
|
|
|
|
|
void on_box_StatsDay_ToYear_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsDay_ToMonth_currentIndexChanged(int index);
|
|
|
|
|
2022-07-23 15:11:55 +02:00
|
|
|
void on_box_StatsDay_ToDay_currentIndexChanged(int index);
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_button_StatsDay_Draw_clicked();
|
|
|
|
|
2022-08-09 21:45:58 +02:00
|
|
|
//// RELATIONAL ////
|
2022-08-04 21:59:02 +02:00
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_box_StatsRelat_WebServer_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsRelat_LogsField_1_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsRelat_LogsField_2_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsRelat_FromYear_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsRelat_FromMonth_currentIndexChanged(int index);
|
|
|
|
|
2022-07-23 15:11:55 +02:00
|
|
|
void on_box_StatsRelat_FromDay_currentIndexChanged(int index);
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_box_StatsRelat_ToYear_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_box_StatsRelat_ToMonth_currentIndexChanged(int index);
|
|
|
|
|
2022-07-23 15:11:55 +02:00
|
|
|
void on_box_StatsRelat_ToDay_currentIndexChanged(int index);
|
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
void on_button_StatsRelat_Draw_clicked();
|
|
|
|
|
2022-07-29 20:13:06 +02:00
|
|
|
void on_button_StatsGlob_Apache_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsGlob_Nginx_clicked();
|
|
|
|
|
|
|
|
void on_button_StatsGlob_Iis_clicked();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
/////////////////
|
|
|
|
//// CRAPSET ////
|
|
|
|
|
|
|
|
//// WINDOW ////
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void on_checkBox_ConfWindow_Geometry_clicked(bool checked);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void on_box_ConfWindow_Theme_currentIndexChanged(int index);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
void on_box_ConfWindow_Icons_currentIndexChanged(int index);
|
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// DIALOGS ////
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void on_slider_ConfDialogs_General_sliderReleased();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void on_slider_ConfDialogs_Logs_sliderReleased();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void on_slider_ConfDialogs_Stats_sliderReleased();
|
|
|
|
|
|
|
|
//// TEXT BROWSER ////
|
|
|
|
|
|
|
|
void on_box_ConfTextBrowser_Font_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_checkBox_ConfTextBrowser_WideLines_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_box_ConfTextBrowser_ColorScheme_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
//// CHARTS ////
|
|
|
|
|
|
|
|
void on_box_ConfCharts_Theme_currentIndexChanged(int index);
|
|
|
|
|
2022-08-23 00:48:49 +02:00
|
|
|
//// DATABASES ////
|
|
|
|
|
|
|
|
void on_inLine_ConfDatabases_Data_Path_textChanged(const QString &arg1);
|
|
|
|
|
|
|
|
void on_inLine_ConfDatabases_Data_Path_returnPressed();
|
|
|
|
|
|
|
|
void on_button_ConfDatabases_Data_Save_clicked();
|
|
|
|
|
|
|
|
void on_inLine_ConfDatabases_Hashes_Path_textChanged(const QString &arg1);
|
|
|
|
|
|
|
|
void on_inLine_ConfDatabases_Hashes_Path_returnPressed();
|
|
|
|
|
|
|
|
void on_button_ConfDatabases_Hashes_Save_clicked();
|
|
|
|
|
|
|
|
void on_checkBox_ConfDatabases_DoBackup_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_spinBox_ConfDatabases_NumBackups_valueChanged(int arg1);
|
|
|
|
|
2022-08-10 23:49:07 +02:00
|
|
|
//// LOGS DEFAULTS ////
|
|
|
|
|
|
|
|
void on_radio_ConfDefaults_Apache_toggled(bool checked);
|
|
|
|
|
|
|
|
void on_radio_ConfDefaults_Nginx_toggled(bool checked);
|
|
|
|
|
|
|
|
void on_radio_ConfDefaults_Iis_toggled(bool checked);
|
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// LOGS CONTROL ////
|
2022-08-03 21:36:13 +02:00
|
|
|
|
|
|
|
void on_checkBox_ConfControl_Usage_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_checkBox_ConfControl_Size_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_spinBox_ConfControl_Size_editingFinished();
|
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
//// APACHE ////
|
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Path_String_textChanged(const QString &arg1);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Path_String_returnPressed();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Path_Save_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Format_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Format_String_returnPressed();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Format_Save_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Format_Sample_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Format_Help_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfApache_Warnlist_Field_currentTextChanged(const QString &arg1);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfApache_Warnlist_Used_clicked(bool checked);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Warnlist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Warnlist_String_returnPressed();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Warnlist_Add_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfApache_Warnlist_List_itemSelectionChanged();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Warnlist_Remove_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Warnlist_Up_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Warnlist_Down_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfApache_Blacklist_Field_currentTextChanged(const QString &arg1);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfApache_Blacklist_Used_clicked(bool checked);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Blacklist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfApache_Blacklist_String_returnPressed();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Blacklist_Add_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfApache_Blacklist_List_itemSelectionChanged();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Blacklist_Remove_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Blacklist_Up_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfApache_Blacklist_Down_clicked();
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-08-06 00:23:25 +02:00
|
|
|
//// NGINX ////
|
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Path_String_textChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Path_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Path_Save_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Format_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Format_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Format_Save_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Format_Sample_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Format_Help_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfNginx_Warnlist_Field_currentTextChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfNginx_Warnlist_Used_clicked(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Warnlist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Warnlist_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Warnlist_Add_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfNginx_Warnlist_List_itemSelectionChanged();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Warnlist_Remove_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Warnlist_Up_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Warnlist_Down_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfNginx_Blacklist_Field_currentTextChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfNginx_Blacklist_Used_clicked(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Blacklist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfNginx_Blacklist_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Blacklist_Add_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfNginx_Blacklist_List_itemSelectionChanged();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Blacklist_Remove_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Blacklist_Up_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfNginx_Blacklist_Down_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
|
|
|
//// IIS ////
|
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Path_String_textChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Path_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Path_Save_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_radio_ConfIis_Format_W3C_toggled(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_radio_ConfIis_Format_NCSA_toggled(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_radio_ConfIis_Format_IIS_toggled(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Format_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Format_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Format_Save_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Format_Sample_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Format_Help_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfIis_Warnlist_Field_currentTextChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfIis_Warnlist_Used_clicked(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Warnlist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Warnlist_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Warnlist_Add_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfIis_Warnlist_List_itemSelectionChanged();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Warnlist_Remove_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Warnlist_Up_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Warnlist_Down_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_box_ConfIis_Blacklist_Field_currentTextChanged(const QString &arg1);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_checkBox_ConfIis_Blacklist_Used_clicked(bool checked);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Blacklist_String_cursorPositionChanged(int arg1, int arg2);
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_inLine_ConfIis_Blacklist_String_returnPressed();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Blacklist_Add_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_list_ConfIis_Blacklist_List_itemSelectionChanged();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Blacklist_Remove_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Blacklist_Up_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
void on_button_ConfIis_Blacklist_Down_clicked();
|
2022-08-06 00:23:25 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
///////////////
|
|
|
|
//// MENU ////
|
|
|
|
|
|
|
|
//// LANGUAGE ////
|
|
|
|
|
2023-01-12 23:01:19 +01:00
|
|
|
void menu_actionEnglishGb_triggered();
|
2022-08-18 20:59:49 +02:00
|
|
|
|
2023-01-12 23:01:19 +01:00
|
|
|
void menu_actionEspanolEs_triggered();
|
2022-08-18 20:59:49 +02:00
|
|
|
|
2023-01-12 23:01:19 +01:00
|
|
|
void menu_actionFrancaisFr_triggered();
|
2022-08-18 20:59:49 +02:00
|
|
|
|
2023-01-12 23:01:19 +01:00
|
|
|
void menu_actionItalianoIt_triggered();
|
|
|
|
|
|
|
|
void menu_actionJapaneseJp_triggered();
|
|
|
|
|
|
|
|
void menu_actionPortuguesBr_triggered();
|
2022-08-18 20:59:49 +02:00
|
|
|
|
|
|
|
//// TOOLS ////
|
|
|
|
|
|
|
|
void menu_actionBlockNote_triggered();
|
|
|
|
|
2022-08-23 21:43:49 +02:00
|
|
|
//// UTILITIES ////
|
|
|
|
|
|
|
|
void menu_actionInfos_triggered();
|
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
void menu_actionCheckUpdates_triggered();
|
|
|
|
|
2022-11-07 21:25:29 +01:00
|
|
|
//// GAMES ////
|
2022-10-16 16:27:13 +02:00
|
|
|
|
|
|
|
void menu_actionCrissCross_triggered();
|
|
|
|
|
2022-10-17 20:19:56 +02:00
|
|
|
void menu_actionSnake_triggered();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-06-20 21:44:58 +02:00
|
|
|
private:
|
2022-06-21 21:07:06 +02:00
|
|
|
Ui::MainWindow *ui;
|
2022-06-24 19:56:34 +02:00
|
|
|
|
2022-08-17 23:38:00 +02:00
|
|
|
// current version of LogDoctor
|
2023-01-23 19:07:24 +01:00
|
|
|
const float version = 2.02;
|
2022-08-17 23:38:00 +02:00
|
|
|
|
2022-08-03 21:36:13 +02:00
|
|
|
// web servers ID constants
|
|
|
|
const unsigned int APACHE_ID=11, NGINX_ID=12, IIS_ID=13;
|
2023-01-23 19:07:24 +01:00
|
|
|
const QString wsFromIndex( const int index ) const;
|
2022-08-03 21:36:13 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
//// OPERATING SYSTEM ////
|
|
|
|
|
2022-08-27 10:35:58 +02:00
|
|
|
const std::string home_path = StringOps::rstrip( QStandardPaths::locate( QStandardPaths::HomeLocation, "", QStandardPaths::LocateDirectory ).toStdString(), "/" );
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-10 23:49:07 +02:00
|
|
|
// 1: linux, 2:windows, 3:mac
|
2022-10-24 23:11:26 +02:00
|
|
|
#if defined( Q_OS_DARWIN )
|
|
|
|
// Darwin-based systems: macOS, iOS, watchOS and tvOS.
|
|
|
|
const unsigned int OS = 3;
|
|
|
|
const std::string configs_path = this->home_path + "/Lybrary/Preferences/LogDoctor/logdoctor.conf";
|
|
|
|
const std::string logdoc_path = this->home_path + "/Lybrary/Application Support/LogDoctor";
|
2022-08-10 23:49:07 +02:00
|
|
|
#elif defined( Q_OS_WIN )
|
|
|
|
// Microsoft Windows systems
|
2022-08-27 10:35:58 +02:00
|
|
|
const unsigned int OS = 2;
|
|
|
|
const std::string configs_path = this->home_path + "/AppData/Local/LogDoctor/logdoctor.conf";
|
|
|
|
const std::string logdoc_path = this->home_path + "/AppData/Local/LogDoctor";
|
2022-10-24 23:11:26 +02:00
|
|
|
#elif defined( Q_OS_UNIX )
|
|
|
|
// Unix-like systems: Linux, BSD and SysV
|
|
|
|
const unsigned int OS = 1;
|
|
|
|
const std::string configs_path = this->home_path + "/.config/LogDoctor/logdoctor.conf";
|
2022-12-03 17:23:35 +01:00
|
|
|
const std::string logdoc_path = "/usr/share/LogDoctor";
|
2022-08-10 23:49:07 +02:00
|
|
|
#else
|
|
|
|
#error "System not supported"
|
|
|
|
#endif
|
2022-08-09 21:45:58 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Defines OS specific stuff
|
2022-08-11 21:00:25 +02:00
|
|
|
void defineOSspec();
|
|
|
|
|
2022-08-09 21:45:58 +02:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
//// CONFIGURATIONS ////
|
|
|
|
////////////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Reads the configurations file and apply the resulting configuration
|
2022-08-09 21:45:58 +02:00
|
|
|
void readConfigs();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Writes the current configuration on file
|
2022-08-09 21:45:58 +02:00
|
|
|
void writeConfigs();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Converts a list of items to a string
|
|
|
|
/*!
|
|
|
|
\param list The list to stringify
|
|
|
|
\param user_agents Whether to apply the special rule to parse user-agents lists or not
|
|
|
|
\return The resulting string
|
|
|
|
\see writeConfigs()
|
|
|
|
*/
|
2023-01-23 19:07:24 +01:00
|
|
|
const std::string list2string( const std::vector<std::string>& list, const bool user_agent=false ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Retrieves a list of items from the given string
|
|
|
|
/*!
|
|
|
|
\param list The list to stringify
|
|
|
|
\param user_agents Whether to apply the special rule to parse user-agents lists or not
|
|
|
|
\return The resulting list
|
|
|
|
\see readConfigs()
|
|
|
|
*/
|
2023-01-23 19:07:24 +01:00
|
|
|
const std::vector<std::string> string2list( const std::string& string, const bool user_agent=false ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-09 21:45:58 +02:00
|
|
|
// string to bool and vice versa
|
|
|
|
const std::unordered_map<std::string, bool> s2b = { {"true",true}, {"false",false} };
|
|
|
|
const std::unordered_map<bool, std::string> b2s = { {true,"true"}, {false,"false"} };
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////
|
|
|
|
//// LANGUAGE ////
|
|
|
|
|
2022-08-18 21:04:42 +02:00
|
|
|
QTranslator translator;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-12 23:01:19 +01:00
|
|
|
std::string language = "en_GB";
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Translates the UI to the selected language
|
2022-08-09 21:45:58 +02:00
|
|
|
void updateUiLanguage();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////
|
|
|
|
//// WINDOW GEOMETRY ////
|
|
|
|
|
|
|
|
//! Converts the window's geometry to string
|
|
|
|
/*!
|
|
|
|
\see writeConfigs()
|
|
|
|
*/
|
2023-01-23 19:07:24 +01:00
|
|
|
const std::string geometryToString() const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Retrieves the window geometry from the given string
|
|
|
|
/*!
|
|
|
|
\see readConfigs()
|
|
|
|
*/
|
2023-01-23 19:07:24 +01:00
|
|
|
void setGeometryFromString( const std::string& geometry );
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
/////////////////
|
|
|
|
//// GENERAL ////
|
|
|
|
|
2022-08-09 21:45:58 +02:00
|
|
|
// quantoty of informational dialogs to display
|
2022-08-10 23:49:07 +02:00
|
|
|
int dialogs_level = 2; // 0: essential, 1: usefull, 2: explanatory
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-10 23:49:07 +02:00
|
|
|
// default web server
|
|
|
|
int default_ws = 11;
|
2022-08-09 21:45:58 +02:00
|
|
|
|
2022-07-09 18:16:09 +02:00
|
|
|
|
2022-07-06 21:03:58 +02:00
|
|
|
//////////////////
|
|
|
|
//// GRAPHICS ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-03 21:36:13 +02:00
|
|
|
// remember window position and sizes
|
|
|
|
bool remember_window = true;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-03 21:36:13 +02:00
|
|
|
// themes
|
2022-11-19 00:07:56 +01:00
|
|
|
int window_theme_id = 0;
|
|
|
|
int charts_theme_id = 0;
|
|
|
|
int icons_theme_id = 0;
|
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
QString icons_theme;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Auto-detects the icon-set to use depending on the current window theme
|
2022-10-27 23:34:14 +02:00
|
|
|
void detectIconsTheme();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Updates the icons on the window
|
2022-10-27 23:34:14 +02:00
|
|
|
void updateUiIcons();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Updates the window theme
|
2022-08-13 21:12:52 +02:00
|
|
|
void updateUiTheme();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Updates the fonts on the window
|
2022-11-07 21:25:29 +01:00
|
|
|
void updateUiFonts();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
const std::vector<QChart::ChartTheme> CHARTS_THEMES = {
|
|
|
|
QChart::ChartTheme::ChartThemeLight,
|
|
|
|
QChart::ChartTheme::ChartThemeDark,
|
|
|
|
QChart::ChartTheme::ChartThemeBrownSand,
|
|
|
|
QChart::ChartTheme::ChartThemeBlueCerulean
|
|
|
|
};
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-03 21:36:13 +02:00
|
|
|
// color schemes
|
2022-06-27 21:55:14 +02:00
|
|
|
std::unordered_map<int, std::unordered_map<std::string, QString>> TB_COLOR_SCHEMES;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
// colors
|
2022-06-24 19:56:34 +02:00
|
|
|
std::unordered_map<std::string, QColor> COLORS;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-03 21:36:13 +02:00
|
|
|
// fonts
|
2022-06-25 18:48:08 +02:00
|
|
|
std::unordered_map<std::string, QFont> FONTS;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
int font_size = 13;
|
|
|
|
int font_size_big = 16;
|
|
|
|
int font_size_small = 10;
|
|
|
|
|
2022-06-25 18:48:08 +02:00
|
|
|
// base font families, to build fonts from
|
2022-11-19 00:07:56 +01:00
|
|
|
QString main_font_family;
|
|
|
|
QString alternative_font_family;
|
|
|
|
QString script_font_family;
|
2022-06-30 20:47:05 +02:00
|
|
|
|
2022-07-06 21:03:58 +02:00
|
|
|
|
2022-06-30 20:47:05 +02:00
|
|
|
/////////////////////
|
|
|
|
//// GENERAL USE ////
|
2022-07-06 21:03:58 +02:00
|
|
|
/////////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Printable size, including suffix
|
2023-01-23 19:07:24 +01:00
|
|
|
const QString printableSize( const int bytes ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Printable time, including suffix(es)
|
2023-01-23 19:07:24 +01:00
|
|
|
const QString printableTime( const int seconds ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Printable speed, namely printable size over printable time
|
2023-01-23 19:07:24 +01:00
|
|
|
const QString printableSpeed( const int bytes, const int secs ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
//! Resolves the given path and returns the canonical path
|
2023-01-23 19:07:24 +01:00
|
|
|
const std::string resolvePath( const std::string& path ) const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Returns the parent folder of the given path
|
2023-01-23 19:07:24 +01:00
|
|
|
const std::string parentPath( const std::string& path ) const;
|
2022-06-25 18:48:08 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
////////////////
|
|
|
|
//// CHECKS ////
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
bool initiating = true;
|
|
|
|
|
|
|
|
bool db_ok = true;
|
|
|
|
|
|
|
|
//! Makes the initial integrity checks
|
|
|
|
void makeInitialChecks();
|
|
|
|
|
|
|
|
//! Checks the integrity of the logs data collection database
|
2023-01-23 19:07:24 +01:00
|
|
|
const bool checkDataDB();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
2022-08-09 21:45:58 +02:00
|
|
|
///////////////////
|
|
|
|
//// DATABASES ////
|
|
|
|
///////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-23 00:48:49 +02:00
|
|
|
bool db_edited = false;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-23 00:48:49 +02:00
|
|
|
bool db_do_backup = true;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-23 00:58:17 +02:00
|
|
|
unsigned db_backups_number = 3;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Backs-up the logs data collection database
|
2023-01-23 19:07:24 +01:00
|
|
|
void backupDatabase() const;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
std::string db_data_path;
|
|
|
|
std::string db_hashes_path;
|
|
|
|
|
2022-08-19 22:42:58 +02:00
|
|
|
// actions when working on a db
|
|
|
|
bool db_working = false;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Called when a member begins/ends performing operations on the database
|
2023-01-24 01:27:00 +01:00
|
|
|
void setDbWorkingState( const bool working );
|
2022-07-06 21:03:58 +02:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
const bool dbUsable();
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
//////////////////
|
|
|
|
//// CRAPTABS ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 19:07:24 +01:00
|
|
|
void switchMainTab( const int new_index );
|
2022-10-27 23:34:14 +02:00
|
|
|
|
2022-07-06 21:03:58 +02:00
|
|
|
|
|
|
|
/////////////////
|
|
|
|
//// CRAPLOG ////
|
|
|
|
/////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-07-06 21:03:58 +02:00
|
|
|
Craplog craplog;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-06 21:34:02 +02:00
|
|
|
QTimer* craplog_timer = new QTimer();
|
|
|
|
QTimer* waiter_timer;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-06 21:34:02 +02:00
|
|
|
std::chrono::system_clock::time_point waiter_timer_start;
|
|
|
|
std::chrono::system_clock::duration waiter_timer_elapsed;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! The logs parser started working
|
2022-07-06 21:03:58 +02:00
|
|
|
void craplogStarted();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! The logs parser finished working
|
2022-07-06 21:03:58 +02:00
|
|
|
void craplogFinished();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-19 22:42:58 +02:00
|
|
|
void checkMakeStats_Makable();
|
2022-07-06 21:03:58 +02:00
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-06-27 19:49:09 +02:00
|
|
|
//////////////
|
|
|
|
//// LOGS ////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-06-27 19:49:09 +02:00
|
|
|
bool loading_LogsList = false;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
void disableAllButtons_LogFiles_WS();
|
|
|
|
void enableAllButtons_LogFiles_WS();
|
|
|
|
|
2022-08-08 22:45:17 +02:00
|
|
|
bool hide_used_files = false;
|
2022-08-19 22:42:58 +02:00
|
|
|
bool refreshing_list = false;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////////
|
|
|
|
//// TEXT BROWSER ////
|
|
|
|
|
2022-06-27 21:55:14 +02:00
|
|
|
TextBrowser TB;
|
|
|
|
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-07-01 21:30:15 +02:00
|
|
|
//////////////////////////
|
|
|
|
//// LOGS PERFORMANCE ////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void updatePerfsLabels(); // CUSTOM
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
/*void update_MakeStats_graphs(); // CUSTOM*/
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 22:02:07 +01:00
|
|
|
void resetPerfsLabels(); // CUSTOM
|
2022-07-01 21:30:15 +02:00
|
|
|
|
2022-07-21 21:45:52 +02:00
|
|
|
|
|
|
|
//////////////////
|
|
|
|
//// CRAPVIEW ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-07-21 21:45:52 +02:00
|
|
|
Crapview crapview;
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-22 21:18:31 +02:00
|
|
|
QTimer *crapview_timer = new QTimer();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-10-27 23:34:14 +02:00
|
|
|
// change tab
|
2023-01-23 19:07:24 +01:00
|
|
|
void switchStatsTab( const int new_index );
|
2022-11-19 00:07:56 +01:00
|
|
|
|
|
|
|
//! Queries the available dates from the db and apply to the tabs
|
|
|
|
/*!
|
|
|
|
\see Crapview::refreshDates()
|
|
|
|
*/
|
2022-07-21 21:45:52 +02:00
|
|
|
void refreshStatsDates();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-07-22 22:56:49 +02:00
|
|
|
// check if drawing conditions are met
|
2022-07-25 21:57:45 +02:00
|
|
|
void checkStatsWarnDrawable();
|
2022-07-22 22:56:49 +02:00
|
|
|
void checkStatsSpeedDrawable();
|
|
|
|
void checkStatsCountDrawable();
|
|
|
|
void checkStatsDayDrawable();
|
|
|
|
void checkStatsRelatDrawable();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-19 22:42:58 +02:00
|
|
|
// count
|
|
|
|
QString count_fld;
|
2023-01-23 19:07:24 +01:00
|
|
|
void makeStatsCount();
|
2022-08-08 22:45:17 +02:00
|
|
|
void resetStatsCountButtons();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-16 22:08:57 +02:00
|
|
|
// globals
|
2022-08-19 22:42:58 +02:00
|
|
|
QString glob_ws;
|
2023-01-23 19:07:24 +01:00
|
|
|
void makeStatsGlob();
|
|
|
|
void resetStatsGlob();
|
2022-07-21 21:45:52 +02:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
|
|
|
|
/////////////////
|
|
|
|
//// CRAPSET ////
|
|
|
|
/////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void refreshTextBrowserPreview();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-04 21:59:02 +02:00
|
|
|
void refreshChartsPreview();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2023-01-23 19:07:24 +01:00
|
|
|
const int getIisLogsModule() const;
|
2022-08-04 21:59:02 +02:00
|
|
|
|
2022-08-11 21:00:25 +02:00
|
|
|
|
|
|
|
//////////////////
|
|
|
|
//// CRAPHELP ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-11 21:00:25 +02:00
|
|
|
Craphelp* craphelp = new Craphelp();
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-16 22:08:57 +02:00
|
|
|
void showHelp( const std::string& file_name );
|
2022-08-11 21:00:25 +02:00
|
|
|
|
2022-08-17 23:38:00 +02:00
|
|
|
|
|
|
|
////////////////
|
|
|
|
//// CRAPUP ////
|
|
|
|
////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-11-13 01:40:20 +01:00
|
|
|
Crapup *crapup = new Crapup(0,"");
|
2022-08-17 23:38:00 +02:00
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
|
|
|
|
//////////////////
|
|
|
|
//// CRAPNOTE ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-08-18 20:59:49 +02:00
|
|
|
Crapnote* crapnote = new Crapnote();
|
|
|
|
|
2022-08-23 21:43:49 +02:00
|
|
|
|
|
|
|
//////////////////
|
|
|
|
//// CRAPINFO ////
|
|
|
|
//////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-11-13 01:40:20 +01:00
|
|
|
Crapinfo* crapinfo = new Crapinfo(0,"","","","");
|
2022-08-23 21:43:49 +02:00
|
|
|
|
2022-10-16 16:27:13 +02:00
|
|
|
|
|
|
|
///////////////////
|
|
|
|
//// CRAPGAMES ////
|
|
|
|
///////////////////
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-11-10 18:22:06 +01:00
|
|
|
CrissCross* crisscross = new CrissCross( 0 );
|
2022-11-19 00:07:56 +01:00
|
|
|
|
2022-11-24 22:29:50 +01:00
|
|
|
SnakeGame* snake = new SnakeGame( 0, QFont() );
|
2022-10-16 16:27:13 +02:00
|
|
|
|
2022-06-20 21:44:58 +02:00
|
|
|
};
|
2022-06-21 21:07:06 +02:00
|
|
|
#endif // MAINWINDOW_H
|