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
15 #include <qapplication.h>
18 #include "qt_helpers.h"
19 #include "QtLyXView.h"
20 #include "QDialogView.h"
22 #include "ButtonController.h"
23 #include "support/LAssert.h"
26 QDialogView::QDialogView(Dialog & parent, string const & t)
27 : Dialog::View(parent,t), updating_(false)
31 Qt2BC & QDialogView::bcview()
33 return static_cast<Qt2BC &>(dialog().bc().view());
37 bool QDialogView::isVisible() const
39 return form() && form()->isVisible();
43 bool QDialogView::readOnly() const
45 return kernel().isBufferReadonly();
49 void QDialogView::show()
55 form()->setMinimumSize(form()->sizeHint());
57 update(); // make sure its up-to-date
59 form()->setCaption(toqstr(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();