]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QPrefs.C
Fix unreported bug related to 3246 by Richard Heck:
[lyx.git] / src / frontends / qt4 / QPrefs.C
1 /**
2  * \file QPrefs.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QPrefs.h"
14 #include "QPrefsDialog.h"
15
16 #include "Qt2BC.h"
17 #include "qt_helpers.h"
18
19 #include "debug.h"
20 #include "LColor.h"
21 #include "lyxfont.h"
22
23 #include "support/lstrings.h"
24 #include "support/os.h"
25
26 #include "controllers/ControlPrefs.h"
27 #include "controllers/frnt_lang.h"
28 #include "controllers/helper_funcs.h"
29
30 using namespace Ui;
31
32 namespace lyx {
33 namespace frontend {
34
35 typedef QController<ControlPrefs, QView<QPrefsDialog> > prefs_base_class;
36
37 QPrefs::QPrefs(Dialog & parent)
38         : prefs_base_class(parent, _("Preferences"))
39 {
40
41 }
42
43 Converters & QPrefs::converters()
44 {
45         return controller().converters();
46 }
47
48 Formats & QPrefs::formats()
49 {
50         return controller().formats();
51 }
52
53 Movers & QPrefs::movers()
54 {
55         return controller().movers();
56 }
57
58 void QPrefs::build_dialog()
59 {
60         dialog_.reset(new QPrefsDialog(this));
61 }
62
63 void QPrefs::apply()
64 {
65         dialog_->apply(controller().rc());
66 }
67
68 void QPrefs::update_contents()
69 {
70         dialog_->updateRc(controller().rc());
71 }
72
73 } // namespace frontend
74 } // namespace lyx