MythTV
master
mythtv
libs
libmythui
mythterminal.h
Go to the documentation of this file.
1
// -*- Mode: c++ -*-
2
3
#ifndef MYTH_TERMINAL_H
4
#define MYTH_TERMINAL_H
5
6
// Qt headers
7
#include <QObject>
8
#include <QString>
9
#include <QProcess>
10
#include <QRecursiveMutex>
11
12
// MythTV headers
13
#include "
mythuiexp.h
"
14
#include "
libmythui/mythscreentype.h
"
15
16
class
MythUIButton
;
17
class
MythUIButtonList
;
18
class
MythUIButtonListItem
;
19
class
MythUITextEdit
;
20
21
class
MUI_PUBLIC
MythTerminal
:
public
MythScreenType
22
{
23
Q_OBJECT
24
25
public
:
26
MythTerminal
(
MythScreenStack
*parent, QString program,
27
QStringList arguments);
28
virtual
void
deleteLater
(
void
)
29
{ TeardownAll(); MythScreenType::deleteLater(); }
30
void
Init
(
void
)
override
;
// MythScreenType
31
bool
Create
(
void
)
override
;
// MythScreenType
32
bool
IsDone(
void
)
const
;
33
34
public
slots:
35
void
Start(
void
);
36
void
Kill(
void
);
37
void
AddText(
const
QString& _str);
38
39
protected
slots:
40
void
ProcessHasText(
void
);
// connected to from process' readyRead signal
41
void
ProcessFinished(
int
exitCode, QProcess::ExitStatus exitStatus);
42
43
protected
:
44
~MythTerminal
()
override
{ TeardownAll(); }
45
void
TeardownAll(
void
);
46
47
mutable
QRecursiveMutex
m_lock
;
48
bool
m_running {
false
};
49
QProcess *m_process {
nullptr
};
50
QString
m_program
;
51
QStringList
m_arguments
;
52
MythUIButtonListItem
*m_currentLine {
nullptr
};
53
MythUIButtonList
*m_output {
nullptr
};
54
MythUITextEdit
*m_textEdit {
nullptr
};
55
MythUIButton
*m_enterButton {
nullptr
};
56
};
57
58
#endif
// MYTH_TERMINAL_H
MythScreenStack
Definition:
mythscreenstack.h:17
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:46
MythScreenType::Create
virtual bool Create(void)
Definition:
mythscreentype.cpp:269
MythScreenType::Init
virtual void Init(void)
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition:
mythscreentype.cpp:384
MythTerminal
Definition:
mythterminal.h:22
MythTerminal::m_program
QString m_program
Definition:
mythterminal.h:50
MythTerminal::m_lock
QRecursiveMutex m_lock
Definition:
mythterminal.h:47
MythTerminal::~MythTerminal
~MythTerminal() override
Definition:
mythterminal.h:44
MythTerminal::deleteLater
virtual void deleteLater(void)
Definition:
mythterminal.h:28
MythTerminal::m_arguments
QStringList m_arguments
Definition:
mythterminal.h:51
MythUIButtonListItem
Definition:
mythuibuttonlist.h:43
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition:
mythuibuttonlist.h:193
MythUIButton
A single button widget.
Definition:
mythuibutton.h:22
MythUITextEdit
A text entry and edit widget.
Definition:
mythuitextedit.h:35
mythscreentype.h
mythuiexp.h
MUI_PUBLIC
#define MUI_PUBLIC
Definition:
mythuiexp.h:9
Generated on Sun Dec 7 2025 03:16:58 for MythTV by
1.9.4