3 * Copyright 1995 Matthias Ettrich
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
17 #include "controllers/GUI.h"
18 #include "ButtonController.h"
20 #include "ControlDocument.h"
21 #include "ControlPrint.h"
22 #include "ControlSpellchecker.h"
24 #include "QDocument.h"
25 #include "QDocumentDialog.h"
26 // Here would be an appropriate point to lecture on the evils
27 // of the Qt headers, those most fucked up of disgusting ratholes.
31 #include "QPrefsDialog.h"
33 #include "QLPrintDialog.h"
34 #include "QSpellchecker.h"
35 #include "QSpellcheckerDialog.h"
40 typedef GUI<ControlDocument, QDocument, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
43 typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
46 typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
49 typedef GUI<ControlSpellchecker, QSpellchecker, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
52 struct Dialogs::Impl {
53 Impl(LyXView & lv, Dialogs & d);
55 DocumentDialog document;
58 SpellcheckerDialog spellchecker;
62 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
70 void Dialogs::init_pimpl()
72 pimpl_ = new Impl(lyxview_, *this);
82 void Dialogs::showDocument()
84 pimpl_->document.controller().show();
88 void Dialogs::showPreamble()
90 pimpl_->document.controller().show();
91 // Oh Angus, won't you help a poor child ?
92 //pimpl_->document.view()->showPreamble();
96 void Dialogs::showPreferences()
98 pimpl_->prefs.controller().show();
102 void Dialogs::showPrint()
104 pimpl_->print.controller().show();
108 void Dialogs::showSpellchecker()
110 pimpl_->spellchecker.controller().show();