summaryrefslogtreecommitdiffstats
path: root/libk3b/projects/videocd/k3bvcdoptions.h
blob: 420e593b5135adaeeb7b41aa06b3fffef5770bc9 (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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
/*
*
* $Id: k3bvcdoptions.h 619556 2007-01-03 17:38:12Z trueg $
* Copyright (C) 2003-2004 Christian Kvasny <chris@k3b.org>
*
* This file is part of the K3b project.
* Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file "COPYING" for the exact licensing terms.
*/

#ifndef K3B_VCD_OPTIONS_H
#define K3B_VCD_OPTIONS_H

#include <tqstring.h>
#include "k3b_export.h"

class KConfigBase;

class LIBK3B_EXPORT K3bVcdOptions
{
    public:
        K3bVcdOptions();
        const TQString& volumeId() const
        {
            return m_volumeID;
        }
        const TQString& albumId() const
        {
            return m_albumID;
        }
        const TQString& volumeSetId() const
        {
            return m_volumeSetId;
        }
        const TQString& preparer() const
        {
            return m_preparer;
        }
        const TQString& publisher() const
        {
            return m_publisher;
        }

        const TQString& applicationId() const
        {
            return m_applicationId;
        }
        const TQString& systemId() const
        {
            return m_systemId;
        }

        const TQString& vcdClass() const
        {
            return m_vcdclass;
        }
        const TQString& vcdVersion() const
        {
            return m_vcdversion;
        }

        const int PreGapLeadout()
        {
            return m_pregapleadout;
        }
        const int PreGapTrack()
        {
            return m_pregaptrack;
        }
        const int FrontMarginTrack()
        {
            return m_frontmargintrack;
        }
        const int RearMarginTrack()
        {
            return m_rearmargintrack;
        }
        const int FrontMarginTrackSVCD()
        {
            return m_frontmargintrackSVCD;
        }
        const int RearMarginTrackSVCD()
        {
            return m_rearmargintrackSVCD;
        }

        const int mpegVersion() const
        {
            return m_mpegversion;
        }

        const int volumeCount() const
        {
            return m_volumeCount;
        }
        const int volumeNumber() const
        {
            return m_volumeNumber;
        }

        const bool AutoDetect() const
        {
            return m_autodetect;
        }
        const bool CdiSupport() const
        {
            return m_cdisupport;
        }
        const bool NonCompliantMode() const
        {
            return m_brokensvcdmode;
        }
        const bool VCD30interpretation() const
        {
            return m_VCD30interpretation;
        }
        const bool Sector2336() const
        {
            return m_sector2336;
        }
        const bool UpdateScanOffsets() const
        {
            return m_updatescanoffsets;
        }
        const bool RelaxedAps() const
        {
            return m_relaxedaps;
        }
        const bool UseGaps() const
        {
            return m_usegaps;
        }
        const unsigned long long CDIsize() const
        {
            return m_cdisize;
        }

        void setAlbumId( const TQString& s )
        {
            m_albumID = s;
        }
        void setVolumeId( const TQString& s )
        {
            m_volumeID = s;
        }
        void setVolumeSetId( const TQString& s )
        {
            m_volumeSetId = s;
        }
        void setPreparer( const TQString& s )
        {
            m_preparer = s;
        }
        void setPublisher( const TQString& s )
        {
            m_publisher = s;
        }

        void setVcdClass( const TQString& s )
        {
            m_vcdclass = s;
        }
        void setVcdVersion( const TQString& s )
        {
            m_vcdversion = s;
        }

        void setPreGapLeadout( const int i )
        {
            m_pregapleadout = i;
        }
        void setPreGapTrack( const int i )
        {
            m_pregaptrack = i;
        }
        void setFrontMarginTrack( const int i )
        {
            m_frontmargintrack = i;
        }
        void setRearMarginTrack( const int i )
        {
            m_rearmargintrack = i;
        }
        void setFrontMarginTrackSVCD( const int i )
        {
            m_frontmargintrackSVCD = i;
        }
        void setRearMarginTrackSVCD( const int i )
        {
            m_rearmargintrackSVCD = i;
        }

        void setMpegVersion( const int v )
        {
            m_mpegversion = v;
        }
        void setVolumeCount( const int c )
        {
            m_volumeCount = c;
        }
        void setVolumeNumber( const int n )
        {
            m_volumeNumber = n;
        }

        void setAutoDetect( const bool& b )
        {
            m_autodetect = b;
        }
        void setCdiSupport( const bool& b )
        {
            m_cdisupport = b;
        }
        void setNonCompliantMode( const bool& b )
        {
            m_brokensvcdmode = b;
        }
        void setVCD30interpretation( const bool& b )
        {
            m_VCD30interpretation = b;
        }
        void setSector2336( const bool& b )
        {
            m_sector2336 = b;
        }
        void setUpdateScanOffsets( const bool& b )
        {
            m_updatescanoffsets = b;
        }
        void setRelaxedAps( const bool& b )
        {
            m_relaxedaps = b;
        }
        void setUseGaps( const bool& b )
        {
            m_usegaps = b;
        }

        bool checkCdiFiles();
        void save( KConfigBase* c );

        static K3bVcdOptions load( KConfigBase* c );
        static K3bVcdOptions defaults();

        void setPbcEnabled( const bool& b )
        {
            m_pbcenabled = b;
        }
        bool PbcEnabled() const
        {
            return m_pbcenabled;
        };
        void setPbcNumkeysEnabled( const bool& b )
        {
            m_pbcnumkeysenabled = b;
        }
        bool PbcNumkeysEnabled() const
        {
            return m_pbcnumkeysenabled;
        };

        void setPbcPlayTime( const int i )
        {
            m_def_pbcplaytime = i;
        }
        int PbcPlayTime( )
        {
            return m_def_pbcplaytime;
        }

        void setPbcWaitTime( const int i )
        {
            m_def_pbcwaittime = i;
        }
        int PbcWaitTime( )
        {
            return m_def_pbcwaittime;
        }

        void setSegmentFolder( const bool& b )
        {
            m_segmentfolder = b;
        }
        bool SegmentFolder() const
        {
            return m_segmentfolder;
        };

        void setRestriction( const int i )
        {
            m_restriction = i;
        }
        int Restriction() const
        {
            return m_restriction;
        };
        void increaseSegments( )
        {
            m_segment += 1;
        }
        void decreaseSegments( )
        {
            m_segment -= 1;
        }
        bool haveSegments() const
        {
            return m_segment > 0;
        };
        void increaseSequence( )
        {
            m_sequence += 1;
        }
        void decreaseSequence( )
        {
            m_sequence -= 1;
        }

        bool haveSequence() const
        {
            return m_sequence > 0;
        };

    private:
        int m_restriction;
        int m_segment;
        int m_sequence;

        // pbc
        bool m_pbcenabled;
        bool m_pbcnumkeysenabled;

        // volume descriptor
        TQString m_volumeID;
        TQString m_albumID;
        TQString m_volumeSetId;

        TQString m_preparer;
        TQString m_publisher;

        TQString m_applicationId;
        TQString m_systemId;

        TQString m_vcdclass;
        TQString m_vcdversion;

        int m_pregapleadout;
        int m_pregaptrack;
        int m_frontmargintrack;
        int m_rearmargintrack;
        int m_frontmargintrackSVCD;
        int m_rearmargintrackSVCD;

        int m_mpegversion;
        int m_volumeCount;
        int m_volumeNumber;

        bool m_autodetect;
        bool m_cdisupport;
        bool m_brokensvcdmode;
        bool m_VCD30interpretation;
        bool m_sector2336;
        bool m_updatescanoffsets;
        bool m_relaxedaps;
        bool m_segmentfolder;
        bool m_usegaps;

        int m_def_pbcplaytime;
        int m_def_pbcwaittime;
        unsigned long long m_cdisize;
};

#endif