3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
14 #include <qapplication.h>
17 #include "qt_helpers.h"
18 #include "QtLyXView.h"
21 #include "ButtonController.h"
22 #include "ControlButtons.h"
23 #include "support/LAssert.h"
26 Qt2Base::Qt2Base(string const & t)
27 : ViewBase(t), updating_(false)
31 Qt2BC & Qt2Base::bcview()
33 return static_cast<Qt2BC &>(bc().view());
34 // return dynamic_cast<Qt2BC &>(bc());
38 bool Qt2Base::isVisible() const
40 return form() && form()->isVisible();
50 form()->setMinimumSize(form()->sizeHint());
52 update(); // make sure its up-to-date
54 form()->setCaption(toqstr(getTitle()));
56 if (form()->isVisible()) {
66 if (form() && form()->isVisible())
71 bool Qt2Base::isValid()
77 void Qt2Base::changed()
81 bc().valid(isValid());
85 void Qt2Base::slotWMHide()
87 getController().CancelButton();
91 void Qt2Base::slotApply()
93 getController().ApplyButton();
97 void Qt2Base::slotOK()
99 getController().OKButton();
103 void Qt2Base::slotClose()
105 getController().CancelButton();
109 void Qt2Base::slotRestore()
111 getController().RestoreButton();