summaryrefslogtreecommitdiff
path: root/config.h
blob: 6025750d352238b2d4c8068ad2caf9f639778e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#pragma once

#include <string>
#include <vector>

#include <vdr/plugin.h>
#include "flat.h"

#define PLUGINCONFIGPATH (cPlugin::ConfigDirectory(PLUGIN_NAME_I18N))
#define PLUGINRESOURCEPATH (cPlugin::ResourceDirectory(PLUGIN_NAME_I18N))

class cFlatConfig
{
    private:
        cString checkSlashAtEnd(std::string path);

        int DecorCurrent;
    public:
        cFlatConfig(void);
        ~cFlatConfig(void);

        void Init(void);
        void SetLogoPath(cString path);
        bool SetupParse(const char *Name, const char *Value);

        void ThemeCheckAndInit(void);
        void ThemeInit(void);
        void DecorDescriptions(cStringList &Decors);
        cString DecorDescription(cString File);
        void DecorLoadFile(cString File);
        void DecorLoadCurrent(void);
        void DecorCheckAndInit(void);
    public:

        cString ThemeCurrent;
        cString logoPath;
        cString iconPath;

        // BORDER TYPES
        // 0 = none
        // 1 = rect
        // 2 = round
        // 3 = invert round
        // 4 = rect + alpha blend
        // 5 = round + alpha blend
        // 6 = invert round + alpha blend

        int decorBorderChannelByTheme;
        int decorBorderChannelTypeTheme, decorBorderChannelSizeTheme;
        int decorBorderChannelTypeUser, decorBorderChannelSizeUser;
        int decorBorderChannelType, decorBorderChannelSize;
        tColor decorBorderChannelFg, decorBorderChannelBg;

        int decorBorderChannelEPGByTheme;
        int decorBorderChannelEPGTypeTheme, decorBorderChannelEPGSizeTheme;
        int decorBorderChannelEPGTypeUser, decorBorderChannelEPGSizeUser;
        int decorBorderChannelEPGType, decorBorderChannelEPGSize;
        tColor decorBorderChannelEPGFg, decorBorderChannelEPGBg;

        int decorBorderTopBarByTheme;
        int decorBorderTopBarTypeTheme, decorBorderTopBarSizeTheme;
        int decorBorderTopBarTypeUser, decorBorderTopBarSizeUser;
        int decorBorderTopBarType, decorBorderTopBarSize;
        tColor decorBorderTopBarFg, decorBorderTopBarBg;

        int decorBorderMessageByTheme;
        int decorBorderMessageTypeTheme, decorBorderMessageSizeTheme;
        int decorBorderMessageTypeUser, decorBorderMessageSizeUser;
        int decorBorderMessageType, decorBorderMessageSize;
        tColor decorBorderMessageFg, decorBorderMessageBg;

        int decorBorderVolumeByTheme;
        int decorBorderVolumeTypeTheme, decorBorderVolumeSizeTheme;
        int decorBorderVolumeTypeUser, decorBorderVolumeSizeUser;
        int decorBorderVolumeType, decorBorderVolumeSize;
        tColor decorBorderVolumeFg, decorBorderVolumeBg;

        int decorBorderTrackByTheme;
        int decorBorderTrackTypeTheme, decorBorderTrackSizeTheme;
        int decorBorderTrackTypeUser, decorBorderTrackSizeUser;
        int decorBorderTrackType, decorBorderTrackSize;
        tColor decorBorderTrackFg, decorBorderTrackBg;
        tColor decorBorderTrackSelFg, decorBorderTrackSelBg;
        tColor decorBorderTrackCurFg, decorBorderTrackCurBg;

        int decorBorderReplayByTheme;
        int decorBorderReplayTypeTheme, decorBorderReplaySizeTheme;
        int decorBorderReplayTypeUser, decorBorderReplaySizeUser;
        int decorBorderReplayType, decorBorderReplaySize;
        tColor decorBorderReplayFg, decorBorderReplayBg;

        int decorBorderMenuItemByTheme;
        int decorBorderMenuItemTypeTheme, decorBorderMenuItemSizeTheme;
        int decorBorderMenuItemTypeUser, decorBorderMenuItemSizeUser;
        int decorBorderMenuItemType, decorBorderMenuItemSize;
        tColor decorBorderMenuItemFg, decorBorderMenuItemBg;
        tColor decorBorderMenuItemSelFg, decorBorderMenuItemSelBg;
        tColor decorBorderMenuItemCurFg, decorBorderMenuItemCurBg;

        int decorBorderMenuContentHeadByTheme;
        int decorBorderMenuContentHeadTypeTheme, decorBorderMenuContentHeadSizeTheme;
        int decorBorderMenuContentHeadTypeUser, decorBorderMenuContentHeadSizeUser;
        int decorBorderMenuContentHeadType, decorBorderMenuContentHeadSize;
        tColor decorBorderMenuContentHeadFg, decorBorderMenuContentHeadBg;

        int decorBorderMenuContentByTheme;
        int decorBorderMenuContentTypeTheme, decorBorderMenuContentSizeTheme;
        int decorBorderMenuContentTypeUser, decorBorderMenuContentSizeUser;
        int decorBorderMenuContentType, decorBorderMenuContentSize;
        tColor decorBorderMenuContentFg, decorBorderMenuContentBg;

        int decorBorderButtonByTheme;
        int decorBorderButtonTypeTheme, decorBorderButtonSizeTheme;
        int decorBorderButtonTypeUser, decorBorderButtonSizeUser;
        int decorBorderButtonType, decorBorderButtonSize;
        tColor decorBorderButtonFg, decorBorderButtonBg;

        // PROGRESS TYPES
        // 0 = small line + big line
        // 1 = big line
        // 2 = big line + outline
        // 3 = small line + big line + dot
        // 4 = big line + dot
        // 5 = big line + outline + dot
        // 6 = small line + dot
        // 7 = outline + dot
        // 8 = small line + big line + alpha blend
        // 9 = big line + alpha blend
        int decorProgressChannelByTheme;
        int decorProgressChannelTypeTheme, decorProgressChannelSizeTheme;
        int decorProgressChannelTypeUser, decorProgressChannelSizeUser;
        int decorProgressChannelType, decorProgressChannelSize;
        tColor decorProgressChannelFg, decorProgressChannelBarFg, decorProgressChannelBg;

        int decorProgressVolumeByTheme;
        int decorProgressVolumeTypeTheme, decorProgressVolumeSizeTheme;
        int decorProgressVolumeTypeUser, decorProgressVolumeSizeUser;
        int decorProgressVolumeType, decorProgressVolumeSize;
        tColor decorProgressVolumeFg, decorProgressVolumeBarFg, decorProgressVolumeBg;

        int decorProgressMenuItemByTheme;
        int decorProgressMenuItemTypeTheme, decorProgressMenuItemSizeTheme;
        int decorProgressMenuItemTypeUser, decorProgressMenuItemSizeUser;
        int decorProgressMenuItemType, decorProgressMenuItemSize;
        tColor decorProgressMenuItemFg, decorProgressMenuItemBarFg, decorProgressMenuItemBg;
        tColor decorProgressMenuItemCurFg, decorProgressMenuItemCurBarFg, decorProgressMenuItemCurBg;

        int decorProgressReplayByTheme;
        int decorProgressReplayTypeTheme, decorProgressReplaySizeTheme;
        int decorProgressReplayTypeUser, decorProgressReplaySizeUser;
        int decorProgressReplayType, decorProgressReplaySize;
        tColor decorProgressReplayFg, decorProgressReplayBarFg, decorProgressReplayBg;

        int decorProgressSignalByTheme;
        int decorProgressSignalTypeTheme, decorProgressSignalSizeTheme;
        int decorProgressSignalTypeUser, decorProgressSignalSizeUser;
        int decorProgressSignalType, decorProgressSignalSize;
        tColor decorProgressSignalFg, decorProgressSignalBarFg, decorProgressSignalBg;

        // General Config
        int ButtonsShowEmpty;
        int ChannelIconsShow;
        int SignalQualityShow;
        int SignalQualityUseColors;
        int DiskUsageShow;

        int MenuItemPadding;
        int marginOsdVer, marginOsdHor;
        int MessageOffset;

        int MenuContentFullSize;
        double TopBarFontSize;

        int ChannelResolutionAspectShow;
        int ChannelFormatShow;
        int ChannelSimpleAspectFormat;
        int RecordingResolutionAspectShow;
        int RecordingFormatShow;
        int RecordingSimpleAspectFormat;
        int RecordingAdditionalInfoShow;
        int EpgRerunsShow;
        int EpgAdditionalInfoShow;
        int TopBarRecordingShow;
        int TopBarRecConflictsShow;
        int TopBarRecConflictsHigh;
        int MenuItemIconsShow;
        int TopBarMenuIconShow;

        double MainMenuItemScale;

        int MenuChannelView;
        int MenuTimerView;
        int MenuEventView;
        int MenuRecordingView;

        // 0 = vertikal
        // 1 = horizontal
        int MessageColorPosition;

        /* hidden configs (only in setup.conf, no osd menu) */
        int MenuItemRecordingClearPercent;
        int MenuItemRecordingShowFolderDate;    // 0 = disable, 1 = newest recording date, 2 = oldest recording date
        int MenuItemParseTilde;
        /* hidden configs (only in setup.conf, no osd menu) */

        // TVScraper
        int TVScraperChanInfoShowPoster;
        double TVScraperChanInfoPosterSize;

        int TVScraperEPGInfoShowPoster;
        int TVScraperRecInfoShowPoster;

        int TVScraperEPGInfoShowActors;
        int TVScraperRecInfoShowActors;

        int DecorIndex;
};