]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/DialogView.cpp
rename buffer parameter math_number_before to math_numbering_side
[lyx.git] / src / frontends / qt4 / DialogView.cpp
1 // -*- C++ -*-
2 /**
3  * \file DialogView.cpp
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "DialogView.h"
15
16
17 namespace lyx {
18 namespace frontend {
19
20 DialogView::DialogView(GuiView & lv, QString const & name, QString const & title)
21         : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
22 {
23         connect(&lv, SIGNAL(bufferViewChanged()),
24                 this, SLOT(onBufferViewChanged()));
25
26         // remove question marks from Windows dialogs
27         setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
28 }
29
30
31 void DialogView::closeEvent(QCloseEvent * ev)
32 {
33         clearParams();
34         Dialog::disconnect();
35         ev->accept();
36 }
37
38
39 void DialogView::hideEvent(QHideEvent * ev)
40 {
41         if (!ev->spontaneous()) {
42                 clearParams();
43                 Dialog::disconnect();
44                 ev->accept();
45         }
46 }
47
48 } // namespace frontend
49 } // namespace lyx
50
51 #include "moc_DialogView.cpp"