]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QPrefs.C
enable Font cache only for MacOSX and inline width() for other platform.
[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 #include "frontends/lyx_gui.h"
31
32 using namespace Ui;
33
34 namespace lyx {
35 namespace frontend {
36
37 typedef QController<ControlPrefs, QView<QPrefsDialog> > base_class;
38
39 QPrefs::QPrefs(Dialog & parent)
40         : base_class(parent, lyx::to_utf8(_("Preferences")))
41 {
42
43 }
44
45 Converters & QPrefs::converters()
46 {
47         return controller().converters();
48 }
49
50 Formats & QPrefs::formats()
51 {
52         return controller().formats();
53 }
54
55 Movers & QPrefs::movers()
56 {
57         return controller().movers();
58 }
59
60 void QPrefs::build_dialog()
61 {
62         dialog_.reset(new QPrefsDialog(this));
63 }
64
65 void QPrefs::apply()
66 {
67         dialog_->apply(controller().rc());
68 }
69
70 void QPrefs::update_contents()
71 {
72         dialog_->update(controller().rc());
73 }
74
75 } // namespace frontend
76 } // namespace lyx