3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "QDocument.h"
14 #include "QDocumentDialog.h"
16 #include "qt_helpers.h"
18 #include "bufferparams.h"
19 #include "floatplacement.h"
21 #include "helper_funcs.h" // getSecond()
23 #include "lyxrc.h" // defaultUnit
24 #include "lyxtextclasslist.h"
26 #include "support/lstrings.h"
28 #include "controllers/ControlDocument.h"
29 #include "controllers/frnt_lang.h"
31 #include "lengthcombo.h"
34 using lyx::support::bformat;
35 using lyx::support::getVectorFromString;
44 typedef QController<ControlDocument, QView<QDocumentDialog> > base_class;
47 QDocument::QDocument(Dialog & parent)
48 : base_class(parent, _("Document Settings"))
52 void QDocument::build_dialog()
54 dialog_.reset(new QDocumentDialog(this));
58 void QDocument::showPreamble()
60 dialog_->showPreamble();
64 void QDocument::apply()
69 dialog_->apply(controller().params());
73 void QDocument::update_contents()
78 dialog_->update(controller().params());
81 void QDocument::saveDocDefault()
83 // we have to apply the params first
85 controller().saveAsDefault();
89 void QDocument::useClassDefaults()
91 BufferParams & params = controller().params();
93 ///\todo verify the use of below with lyx-devel:
94 params.textclass = dialog_->latexModule->classCO->currentItem();
96 params.useClassDefaults();
100 } // namespace frontend