MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
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 "mythexp.h"
9 #include "mythscreentype.h"
10 
11 #include "mythuibutton.h"
12 #include "mythuishape.h"
13 #include "mythuitextedit.h"
14 
15 class MythUIButtonList;
17 class MythUIText;
18 class MythUITextEdit;
19 class MythUIButton;
20 
28 class MPUBLIC RawSettingsEditor : public MythScreenType
29 {
30  Q_OBJECT
31 
32  public:
33  // Constructor
34  RawSettingsEditor(MythScreenStack *parent, const char *name = 0);
35 
36  // Destructor
38 
39  // MythScreenType overrides
40  bool Create(void);
41  void Load(void);
42  void Init(void);
43 
44  private slots:
45  // Saves changes
46  void Save(void);
47 
48  // Helpers for keeping track of current value and updating the screen
49  void selectionChanged(MythUIButtonListItem *item);
50  void valueChanged(void);
51 
52  protected:
53  // Protected data, directly accessed by inheritting classes
54  QString m_title;
55  QMap <QString, QString> m_settings;
56 
57  private:
58  // Helper for updating prev/next values on screen
59  void updatePrevNextTexts(void);
60 
61  // UI Widgets on screen
64 
67 
69 
70  // Prev/Next text areas on screen
71  QHash <int, MythUIText*> m_prevNextTexts;
72  QHash <int, MythUIShape*> m_prevNextShapes;
73 
74  // Original and current settings values used for selective saving
75  QHash <QString, QString> m_origValues;
76  QHash <QString, QString> m_settingValues;
77 };
78 
79 #endif
80 
81 /* vim: set expandtab tabstop=4 shiftwidth=4: */