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 "QtLyXView.h"
20 #include "ButtonController.h"
21 #include "ControlButtons.h"
22 #include "support/LAssert.h"
25 Qt2Base::Qt2Base(QString const & t)
26 : ViewBase(), updating_(false), title_(t)
30 Qt2BC & Qt2Base::bcview()
32 return static_cast<Qt2BC &>(bc().view());
33 // return dynamic_cast<Qt2BC &>(bc());
37 bool Qt2Base::isVisible() const
39 return form() && form()->isVisible();
49 form()->setMinimumSize(form()->sizeHint());
51 update(); // make sure its up-to-date
53 if (form()->isVisible()) {
56 form()->setCaption(title_);
64 if (form() && form()->isVisible())
69 bool Qt2Base::isValid()
75 void Qt2Base::changed()
79 bc().valid(isValid());
83 void Qt2Base::slotWMHide()
85 getController().CancelButton();
89 void Qt2Base::slotApply()
91 getController().ApplyButton();
95 void Qt2Base::slotOK()
97 getController().OKButton();
101 void Qt2Base::slotClose()
103 getController().CancelButton();
107 void Qt2Base::slotRestore()
109 getController().RestoreButton();