2016-09-28 19:33:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file DialogView.cpp
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "DialogView.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
DialogView::DialogView(GuiView & lv, QString const & name, QString const & title)
|
|
|
|
: QDialog(&lv), Dialog(lv, name, "LyX: " + title)
|
|
|
|
{
|
|
|
|
connect(&lv, SIGNAL(bufferViewChanged()),
|
2016-11-09 22:37:35 +00:00
|
|
|
this, SLOT(onBufferViewChanged()));
|
2016-09-28 19:33:44 +00:00
|
|
|
|
|
|
|
// remove question marks from Windows dialogs
|
|
|
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DialogView::closeEvent(QCloseEvent * ev)
|
|
|
|
{
|
|
|
|
clearParams();
|
|
|
|
Dialog::disconnect();
|
|
|
|
ev->accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DialogView::hideEvent(QHideEvent * ev)
|
|
|
|
{
|
|
|
|
if (!ev->spontaneous()) {
|
|
|
|
clearParams();
|
|
|
|
Dialog::disconnect();
|
|
|
|
ev->accept();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#include "moc_DialogView.cpp"
|