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
55 form()->setCaption(toqstr(getTitle()));
57 if (form()->isVisible()) {
65 void QDialogView::hide()
67 if (form() && form()->isVisible())
72 bool QDialogView::isValid()
78 void QDialogView::changed()
82 bc().valid(isValid());
86 void QDialogView::slotWMHide()
88 dialog().CancelButton();
92 void QDialogView::slotApply()
94 dialog().ApplyButton();
98 void QDialogView::slotOK()
104 void QDialogView::slotClose()
106 dialog().CancelButton();
110 void QDialogView::slotRestore()
112 dialog().RestoreButton();
115 } // namespace frontend