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.
13 #include "QDialogView.h"
15 #include "qt_helpers.h"
17 #include "controllers/ButtonController.h"
22 QDialogView::QDialogView(Dialog & parent, std::string const & t)
23 : Dialog::View(parent,t), updating_(false)
27 Qt2BC & QDialogView::bcview()
29 return static_cast<Qt2BC &>(dialog().bc().view());
33 bool QDialogView::isVisible() const
35 return form() && form()->isVisible();
39 bool QDialogView::readOnly() const
41 return kernel().isBufferReadonly();
45 void QDialogView::show()
51 form()->setMinimumSize(form()->sizeHint());
53 update(); // make sure its up-to-date
54 if (dialog().controller().exitEarly())
57 form()->setCaption(toqstr("LyX: " + getTitle()));
59 if (form()->isVisible()) {
67 void QDialogView::hide()
69 if (form() && form()->isVisible())
74 bool QDialogView::isValid()
80 void QDialogView::changed()
84 bc().valid(isValid());
88 void QDialogView::slotWMHide()
90 dialog().CancelButton();
94 void QDialogView::slotApply()
96 dialog().ApplyButton();
100 void QDialogView::slotOK()
106 void QDialogView::slotClose()
108 dialog().CancelButton();
112 void QDialogView::slotRestore()
114 dialog().RestoreButton();
117 } // namespace frontend