#include "GuiView.h"
#include "qt_helpers.h"
-#include "FuncRequest.h"
#include "support/debug.h"
namespace frontend {
GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
- : QDialog(&lv), Dialog(lv, name, "LyX: " + title), is_closing_(false)
-{}
+ : QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
+ is_closing_(false)
+{
+ connect(&lv, SIGNAL(bufferViewChanged()),
+ this, SLOT(onBufferViewChanged()));
+
+ // remove question marks from Windows dialogs
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
+}
void GuiDialog::closeEvent(QCloseEvent * ev)
}
+void GuiDialog::slotAutoApply()
+{
+ apply();
+ bc().autoApply();
+}
+
+
void GuiDialog::slotOK()
{
is_closing_ = true;
void GuiDialog::enableView(bool enable)
{
- bc().setReadOnly(!enable);
- bc().setValid(enable);
+ if (!enable) {
+ bc().setReadOnly(true);
+ bc().setValid(false);
+ }
Dialog::enableView(enable);
}
} // namespace frontend
} // namespace lyx
-#include "GuiDialog_moc.cpp"
+#include "moc_GuiDialog.cpp"