Sayonara Player
src
Gui
Player
GUI_Logger.h
1
/* GUI_Logger.h */
2
3
/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef GUI_LOGGER_H
22
#define GUI_LOGGER_H
23
24
#include "Utils/Logger/LogListener.h"
25
#include "Gui/Utils/Widgets/Dialog.h"
26
#include "Utils/Pimpl.h"
27
28
#include <QStringList>
29
#include <QWidget>
30
31
class
QShowEvent;
32
33
UI_FWD(
GUI_Logger
)
34
35
class
LogObject
:
36
public QObject,
37
public
LogListener
38
{
39
Q_OBJECT
40
41
signals:
42
void
sigNewLog(
const
QDateTime& t, Log logType,
const
QString& className,
const
QString& str);
43
44
public
:
45
[[maybe_unused]]
explicit
LogObject
(QObject* parent =
nullptr
);
46
~LogObject
()
override
;
47
48
void
addLogLine(
const
LogEntry
& le)
override
;
49
};
50
51
class
GUI_Logger
:
52
public
Gui::Dialog
53
{
54
Q_OBJECT
55
UI_CLASS_SHARED_PTR(
GUI_Logger
)
56
PIMPL(
GUI_Logger
)
57
58
public
:
59
explicit
GUI_Logger
(QWidget* parent =
nullptr
);
60
~GUI_Logger
()
override
;
61
62
static
LogListener
* logListener();
63
64
private
:
65
void
initUi();
66
67
private
slots:
// NOLINT(readability-redundant-access-specifiers)
68
void
currentModuleChanged(
const
QString& module);
69
void
logReady(
const
QDateTime& dateTime, Log log_type,
const
QString& class_name,
const
QString& str);
70
void
loglevelChanged(
int
index);
71
void
saveClicked();
72
73
protected
:
74
void
showEvent(QShowEvent* e)
override
;
75
void
languageChanged()
override
;
76
};
77
78
#endif
// GUI_LOGGER_H
GUI_Logger
Definition:
GUI_Logger.h:53
Gui::Dialog
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()....
Definition:
Dialog.h:37
LogListener
Definition:
LogListener.h:33
LogObject
Definition:
GUI_Logger.h:38
LogEntry
Definition:
LoggerUtils.h:33
Generated on Wed Aug 31 2022 00:00:00 for Sayonara Player by
1.9.4