LogDoctor/craplog/mainwindow.h

68 lines
1.4 KiB
C
Raw Normal View History

2022-06-21 21:07:06 +02:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
2022-06-20 21:44:58 +02:00
2022-06-23 04:00:37 +02:00
#include "qmainwindow.h"
#include "qfontdatabase.h"
#include "qmessagebox.h"
2022-06-20 21:44:58 +02:00
2022-06-21 21:07:06 +02:00
#include "qtreewidget.h"
#include "utilities.h"
2022-06-23 20:07:59 +02:00
#include "tools/craplog.h"
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-06-21 21:07:06 +02:00
class MainWindow : public QMainWindow
2022-06-20 21:44:58 +02:00
{
Q_OBJECT
2022-06-20 21:44:58 +02:00
public:
2022-06-21 21:07:06 +02:00
MainWindow(QWidget *parent = nullptr);
~MainWindow();
2022-06-21 21:07:06 +02:00
private slots:
void on_buttonViewFile_clicked();
2022-06-21 21:07:06 +02:00
void on_checkAllLogFiles_stateChanged(int arg1);
2022-06-21 21:07:06 +02:00
void on_buttonRefreshList_clicked();
2022-06-21 21:07:06 +02:00
void on_listLogFiles_itemDoubleClicked(QTreeWidgetItem *item, int column);
void on_listLogFiles_itemChanged(QTreeWidgetItem *item, int column);
2022-06-20 21:44:58 +02:00
private:
2022-06-21 21:07:06 +02:00
Ui::MainWindow *ui;
Craplog craplog;
bool runCraplog();
std::unordered_map<std::string, QColor> COLORS;
2022-06-25 18:48:08 +02:00
std::unordered_map<std::string, QFont> FONTS;
int font_size = 13,
font_size_big = 16,
font_size_small = 10;
2022-06-25 18:48:08 +02:00
// base font families, to build fonts from
QString main_font_family;
QString script_font_family;
// text browser related
struct LogFilesTB {
bool wide_lines;
int color_scheme;
int font_size;
QString font_family;
QFont font;
};
LogFilesTB TB;
void setTB_FontSize( int size );
void setTB_FontFamily( QString font_family );
void updateTB_Font();
int getTB_FontSize();
QString getTB_FontFamily();
2022-06-20 21:44:58 +02:00
};
2022-06-21 21:07:06 +02:00
#endif // MAINWINDOW_H