Debian Codegraph @

components/decoder/mad/config.cpp

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2017 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #include "config.h"
14
15 const String BoCA::ConfigureMAD::ConfigID = "MAD";
16
17 BoCA::ConfigureMAD::ConfigureMAD()
18 {
19 const Config *config = Config::Get();
20 I18n *i18n = I18n::Get();
21
22 i18n->SetContext("Decoders::MAD");
23
24 enable24bit = config->GetIntValue(ConfigID, "Enable24Bit", False);
25
26 group_decoding = new GroupBox(i18n->TranslateString("Decoding"), Point(7, 11), Size(200, 41));
27
28 check_enable24bit = new CheckBox(i18n->TranslateString("Enable 24 bit decoding"), Point(10, 14), Size(180, 0), &enable24bit);
29
30 group_decoding->Add(check_enable24bit);
31
32 Add(group_decoding);
33
34 SetSize(Size(214, 169));
35 }
36
37 BoCA::ConfigureMAD::~ConfigureMAD()
38 {
39 DeleteObject(group_decoding);
40 DeleteObject(check_enable24bit);
41 }
42
43 Int BoCA::ConfigureMAD::SaveSettings()
44 {
45 Config *config = Config::Get();
46
47 config->SetIntValue(ConfigID, "Enable24Bit", enable24bit);
48
49 return Success();
50 }