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.
16 #include "ButtonController.h"
17 #include "qt_helpers.h"
18 #include "QDialogView.h"
21 QDialogView::QDialogView(Dialog & parent, std::string const & t)
22 : Dialog::View(parent,t), updating_(false)
26 Qt2BC & QDialogView::bcview()
28 return static_cast<Qt2BC &>(dialog().bc().view());
32 bool QDialogView::isVisible() const
34 return form() && form()->isVisible();
38 bool QDialogView::readOnly() const
40 return kernel().isBufferReadonly();
44 void QDialogView::show()
50 form()->setMinimumSize(form()->sizeHint());
52 update(); // make sure its up-to-date
54 form()->setCaption(toqstr(getTitle()));
56 if (form()->isVisible()) {
64 void QDialogView::hide()
66 if (form() && form()->isVisible())
71 bool QDialogView::isValid()
77 void QDialogView::changed()
81 bc().valid(isValid());
85 void QDialogView::slotWMHide()
87 dialog().CancelButton();
91 void QDialogView::slotApply()
93 dialog().ApplyButton();
97 void QDialogView::slotOK()
103 void QDialogView::slotClose()
105 dialog().CancelButton();
109 void QDialogView::slotRestore()
111 dialog().RestoreButton();