MythTV
master
mythplugins
mytharchive
mytharchive
logviewer.h
Go to the documentation of this file.
1
#ifndef LOGVIEWER_H_
2
#define LOGVIEWER_H_
3
4
// qt
5
#include <QTimer>
6
7
// myth
8
#include <
libmythui/mythscreentype.h
>
9
10
static
constexpr std::chrono::seconds
DEFAULT_UPDATE_TIME
{ 5s };
11
12
class
MythUIButton
;
13
class
MythUIButtonList
;
14
class
MythUIText
;
15
16
void
showLogViewer
(
void
);
17
18
class
LogViewer
:
public
MythScreenType
19
{
20
Q_OBJECT
21
22
public
:
23
24
explicit
LogViewer
(
MythScreenStack
*parent);
25
~LogViewer
(
void
)
override
;
26
27
bool
Create
(
void
)
override
;
// MythScreenType
28
bool
keyPressEvent
(QKeyEvent *e)
override
;
// MythScreenType
29
30
void
setFilenames
(
const
QString &progressLog,
const
QString &fullLog);
31
32
protected
slots:
33
static
void
cancelClicked
(
void
);
34
void
updateClicked
(
void
);
35
void
updateTimerTimeout
(
void
);
36
void
toggleAutoUpdate
(
void
);
37
static
bool
loadFile
(
const
QString&
filename
, QStringList &list,
int
startline);
38
void
showProgressLog
(
void
);
39
void
showFullLog
(
void
);
40
void
ShowMenu
(
void
)
override
;
// MythScreenType
41
void
updateLogItem
(
MythUIButtonListItem
*item);
42
43
private
:
44
void
Init
(
void
)
override
;
// MythScreenType
45
static
QString
getSetting
(
const
QString &key);
46
47
bool
m_autoUpdate
{
false
};
48
std::chrono::seconds
m_updateTime
{
DEFAULT_UPDATE_TIME
};
49
QTimer *
m_updateTimer
{
nullptr
};
50
51
QString
m_currentLog
;
52
QString
m_progressLog
;
53
QString
m_fullLog
;
54
55
MythUIButtonList
*
m_logList
{
nullptr
};
56
MythUIText
*
m_logText
{
nullptr
};
57
58
MythUIButton
*
m_exitButton
{
nullptr
};
59
MythUIButton
*
m_cancelButton
{
nullptr
};
60
MythUIButton
*
m_updateButton
{
nullptr
};
61
};
62
63
#endif
LogViewer::toggleAutoUpdate
void toggleAutoUpdate(void)
Definition:
logviewer.cpp:173
LogViewer::~LogViewer
~LogViewer(void) override
Definition:
logviewer.cpp:91
showLogViewer
void showLogViewer(void)
Definition:
logviewer.cpp:26
LogViewer::setFilenames
void setFilenames(const QString &progressLog, const QString &fullLog)
Definition:
logviewer.cpp:318
DEFAULT_UPDATE_TIME
static constexpr std::chrono::seconds DEFAULT_UPDATE_TIME
Definition:
logviewer.h:10
LogViewer::updateLogItem
void updateLogItem(MythUIButtonListItem *item)
Definition:
logviewer.cpp:183
MythScreenStack
Definition:
mythscreenstack.h:16
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:45
LogViewer
Definition:
logviewer.h:18
LogViewer::cancelClicked
static void cancelClicked(void)
Definition:
logviewer.cpp:189
LogViewer::Create
bool Create(void) override
Definition:
logviewer.cpp:98
MythUIButtonListItem
Definition:
mythuibuttonlist.h:41
LogViewer::getSetting
static QString getSetting(const QString &key)
Definition:
logviewer.cpp:242
LogViewer::m_autoUpdate
bool m_autoUpdate
Definition:
logviewer.h:47
LogViewer::m_exitButton
MythUIButton * m_exitButton
Definition:
logviewer.h:58
LogViewer::m_updateButton
MythUIButton * m_updateButton
Definition:
logviewer.h:60
LogViewer::m_updateTimer
QTimer * m_updateTimer
Definition:
logviewer.h:49
LogViewer::ShowMenu
void ShowMenu(void) override
Definition:
logviewer.cpp:339
MythUIButton
A single button widget.
Definition:
mythuibutton.h:21
LogViewer::m_logText
MythUIText * m_logText
Definition:
logviewer.h:56
LogViewer::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition:
logviewer.cpp:136
LogViewer::m_cancelButton
MythUIButton * m_cancelButton
Definition:
logviewer.h:59
LogViewer::showFullLog
void showFullLog(void)
Definition:
logviewer.cpp:332
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:28
LogViewer::LogViewer
LogViewer(MythScreenStack *parent)
Definition:
logviewer.cpp:83
LogViewer::showProgressLog
void showProgressLog(void)
Definition:
logviewer.cpp:325
LogViewer::updateTimerTimeout
void updateTimerTimeout(void)
Definition:
logviewer.cpp:168
LogViewer::m_progressLog
QString m_progressLog
Definition:
logviewer.h:52
LogViewer::loadFile
static bool loadFile(const QString &filename, QStringList &list, int startline)
Definition:
logviewer.cpp:269
LogViewer::updateClicked
void updateClicked(void)
Definition:
logviewer.cpp:205
LogViewer::m_updateTime
std::chrono::seconds m_updateTime
Definition:
logviewer.h:48
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition:
mythuibuttonlist.h:191
LogViewer::m_logList
MythUIButtonList * m_logList
Definition:
logviewer.h:55
build_compdb.filename
filename
Definition:
build_compdb.py:21
LogViewer::m_currentLog
QString m_currentLog
Definition:
logviewer.h:51
LogViewer::m_fullLog
QString m_fullLog
Definition:
logviewer.h:53
mythscreentype.h
LogViewer::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition:
logviewer.cpp:143
Generated on Wed Feb 26 2025 03:17:51 for MythTV by
1.8.17