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()) {
63 form()->activateWindow();
72 void QDialogView::hide()
74 if (form() && form()->isVisible())
79 bool QDialogView::isValid()
85 void QDialogView::changed()
89 bc().valid(isValid());
93 void QDialogView::slotWMHide()
95 dialog().CancelButton();
99 void QDialogView::slotApply()
101 dialog().ApplyButton();
105 void QDialogView::slotOK()
111 void QDialogView::slotClose()
113 dialog().CancelButton();
117 void QDialogView::slotRestore()
119 dialog().RestoreButton();
122 } // namespace frontend
125 #include "QDialogView_moc.cpp"