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 "support/debug.h"
20 #include <QCloseEvent>
27 GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
28 : QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
33 void GuiDialog::closeEvent(QCloseEvent * ev)
40 void GuiDialog::setButtonsValid(bool valid)
46 void GuiDialog::slotApply()
53 void GuiDialog::slotAutoApply()
60 void GuiDialog::slotOK()
70 void GuiDialog::slotClose()
77 void GuiDialog::slotRestore()
79 // Tell the controller that a request to refresh the dialog's contents
80 // has been received. It's up to the controller to supply the necessary
81 // info by calling GuiDialog::updateView().
87 void GuiDialog::changed()
91 bc().setValid(isValid());
95 void GuiDialog::enableView(bool enable)
98 bc().setReadOnly(true);
101 Dialog::enableView(enable);
105 void GuiDialog::updateView()
107 setUpdatesEnabled(false);
109 bc().setReadOnly(isBufferReadonly());
110 // protect the BC from unwarranted state transitions
114 // The widgets may not be valid, so refresh the button controller
117 setUpdatesEnabled(true);
120 } // namespace frontend
123 #include "moc_GuiDialog.cpp"