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"
24 QDialogView::QDialogView(Dialog & parent, docstring const & t)
25 : Dialog::View(parent,t), updating_(false)
29 Qt2BC & QDialogView::bcview()
31 return static_cast<Qt2BC &>(dialog().bc().view());
35 bool QDialogView::isVisible() const
37 return form() && form()->isVisible();
41 bool QDialogView::readOnly() const
43 return kernel().isBufferReadonly();
47 void QDialogView::show()
53 form()->setMinimumSize(form()->sizeHint());
55 update(); // make sure its up-to-date
56 if (dialog().controller().exitEarly())
59 form()->setWindowTitle(toqstr("LyX: " + getTitle()));
61 if (form()->isVisible()) {
69 void QDialogView::hide()
71 if (form() && form()->isVisible())
76 bool QDialogView::isValid()
82 void QDialogView::changed()
86 bc().valid(isValid());
90 void QDialogView::slotWMHide()
92 dialog().CancelButton();
96 void QDialogView::slotApply()
98 dialog().ApplyButton();
102 void QDialogView::slotOK()
108 void QDialogView::slotClose()
110 dialog().CancelButton();
114 void QDialogView::slotRestore()
116 dialog().RestoreButton();
119 } // namespace frontend
122 #include "QDialogView_moc.cpp"