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 "GuiDialog.h"
16 #include "qt_helpers.h"
18 #include <QCloseEvent>
25 GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
26 : QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
31 void GuiDialog::closeEvent(QCloseEvent * ev)
38 void GuiDialog::setButtonsValid(bool valid)
44 void GuiDialog::slotApply()
51 void GuiDialog::slotAutoApply()
58 void GuiDialog::slotOK()
68 void GuiDialog::slotClose()
75 void GuiDialog::slotRestore()
77 // Tell the controller that a request to refresh the dialog's contents
78 // has been received. It's up to the controller to supply the necessary
79 // info by calling GuiDialog::updateView().
85 void GuiDialog::changed()
89 bc().setValid(isValid());
93 void GuiDialog::enableView(bool enable)
96 bc().setReadOnly(true);
99 Dialog::enableView(enable);
103 void GuiDialog::updateView()
105 setUpdatesEnabled(false);
107 bc().setReadOnly(isBufferReadonly());
108 // protect the BC from unwarranted state transitions
112 // The widgets may not be valid, so refresh the button controller
115 setUpdatesEnabled(true);
118 } // namespace frontend
121 #include "moc_GuiDialog.cpp"