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 "ControlSendto.h"
23 #include "ControlSpellchecker.h"
25 #include "QDocument.h"
26 #include "QDocumentDialog.h"
28 // Here would be an appropriate point to lecture on the evils
29 // of the Qt headers, those most fucked up of disgusting ratholes.
33 #include "QPrefsDialog.h"
35 #include "QLPrintDialog.h"
37 #include "QSendtoDialog.h"
38 #include "QSpellchecker.h"
39 #include "QSpellcheckerDialog.h"
44 typedef GUI<ControlDocument, QDocument, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
47 typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
50 typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
53 typedef GUI<ControlSendto, QSendto, OkApplyCancelPolicy, Qt2BC>
56 typedef GUI<ControlSpellchecker, QSpellchecker, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
59 struct Dialogs::Impl {
60 Impl(LyXView & lv, Dialogs & d);
62 DocumentDialog document;
66 SpellcheckerDialog spellchecker;
70 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
79 void Dialogs::init_pimpl()
81 pimpl_ = new Impl(lyxview_, *this);
91 void Dialogs::showDocument()
93 pimpl_->document.controller().show();
97 void Dialogs::showForks()
101 void Dialogs::showPreamble()
103 pimpl_->document.controller().show();
104 // Oh Angus, won't you help a poor child ?
105 //pimpl_->document.view()->showPreamble();
109 void Dialogs::showPreferences()
111 pimpl_->prefs.controller().show();
115 void Dialogs::showPrint()
117 pimpl_->print.controller().show();
121 void Dialogs::showSendto()
123 pimpl_->sendto.controller().show();
127 void Dialogs::showSpellchecker()
129 pimpl_->spellchecker.controller().show();