MythTV
master
mythtv
libs
libmythui
rawsettingseditor.h
Go to the documentation of this file.
1
#ifndef RAW_SETTINGS_EDITOR_H_
2
#define RAW_SETTINGS_EDITOR_H_
3
4
#include <QEvent>
5
#include <QHash>
6
#include <QObject>
7
8
#include "
mythuiexp.h
"
9
#include "
libmythui/mythscreentype.h
"
10
#include "
mythuibuttonlist.h
"
11
12
class
MythUIText
;
13
class
MythUITextEdit
;
14
class
MythUIButton
;
15
class
MythUIShape
;
16
24
class
MUI_PUBLIC
RawSettingsEditor
:
public
MythScreenType
25
{
26
Q_OBJECT
27
28
public
:
29
// Constructor
30
explicit
RawSettingsEditor
(
MythScreenStack
*parent,
const
char
*name =
nullptr
);
31
32
// Destructor
33
~RawSettingsEditor
()
override
=
default
;
34
35
// MythScreenType overrides
36
bool
Create
(
void
)
override
;
// MythScreenType
37
38
protected
:
39
void
Load
(
void
)
override
;
// MythScreenType
40
void
Init
(
void
)
override
;
// MythScreenType
41
42
private
slots:
43
// Saves changes
44
void
Save(
void
);
45
46
// Helpers for keeping track of current value and updating the screen
47
void
selectionChanged(
MythUIButtonListItem
*item);
48
void
valueChanged(
void
);
49
50
protected
:
51
// Protected data, directly accessed by inheritting classes
52
QString
m_title
;
53
QMap <QString, QString>
m_settings
;
54
55
private
:
56
// Helper for updating prev/next values on screen
57
void
updatePrevNextTexts(
void
);
58
59
// UI Widgets on screen
60
MythUIButtonList
*m_settingsList {
nullptr
};
61
MythUITextEdit
*m_settingValue {
nullptr
};
62
63
MythUIButton
*m_saveButton {
nullptr
};
64
MythUIButton
*m_cancelButton {
nullptr
};
65
66
MythUIText
*m_textLabel {
nullptr
};
67
68
// Prev/Next text areas on screen
69
QHash <int, MythUIText*>
m_prevNextTexts
;
70
QHash <int, MythUIShape*>
m_prevNextShapes
;
71
72
// Original and current settings values used for selective saving
73
QHash <QString, QString>
m_origValues
;
74
QHash <QString, QString>
m_settingValues
;
75
};
76
77
#endif
78
79
/* vim: set expandtab tabstop=4 shiftwidth=4: */
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
MythScreenType::Load
virtual void Load(void)
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition:
mythscreentype.cpp:284
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:195
MythUIButton
A single button widget.
Definition:
mythuibutton.h:22
MythUIShape
A widget for rendering primitive shapes and lines.
Definition:
mythuishape.h:22
MythUITextEdit
A text entry and edit widget.
Definition:
mythuitextedit.h:35
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:29
RawSettingsEditor
An editor screen that allows manipulation of raw settings values.
Definition:
rawsettingseditor.h:25
RawSettingsEditor::m_origValues
QHash< QString, QString > m_origValues
Definition:
rawsettingseditor.h:73
RawSettingsEditor::m_title
QString m_title
Definition:
rawsettingseditor.h:52
RawSettingsEditor::m_prevNextTexts
QHash< int, MythUIText * > m_prevNextTexts
Definition:
rawsettingseditor.h:69
RawSettingsEditor::m_settingValues
QHash< QString, QString > m_settingValues
Definition:
rawsettingseditor.h:74
RawSettingsEditor::~RawSettingsEditor
~RawSettingsEditor() override=default
RawSettingsEditor::m_settings
QMap< QString, QString > m_settings
Definition:
rawsettingseditor.h:53
RawSettingsEditor::m_prevNextShapes
QHash< int, MythUIShape * > m_prevNextShapes
Definition:
rawsettingseditor.h:70
mythscreentype.h
mythuibuttonlist.h
mythuiexp.h
MUI_PUBLIC
#define MUI_PUBLIC
Definition:
mythuiexp.h:9
Generated on Mon Jul 20 2026 03:17:16 for MythTV by
1.9.4