]> git.lyx.org Git - features.git/blob - src/frontends/qt/DialogView.h
Fix broken Apple speller interface
[features.git] / src / frontends / qt / DialogView.h
1 // -*- C++ -*-
2 /**
3  * \file DialogView.h
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 #ifndef DIALOGVIEW_H
13 #define DIALOGVIEW_H
14
15 #include "Dialog.h"
16
17 #include <QDialog>
18
19 namespace lyx {
20 namespace frontend {
21
22 class DialogView : public QDialog, public Dialog
23 {
24         Q_OBJECT
25
26 public:
27         /// \param lv is the access point for the dialog to the LyX kernel.
28         /// \param name is the identifier given to the dialog by its parent
29         /// container.
30         /// \param title is the window title used for decoration.
31         DialogView(GuiView & lv, QString const & name, QString const & title);
32
33         QWidget * asQWidget() override { return this; }
34         QWidget const * asQWidget() const override { return this; }
35
36 protected:
37         /// \name Dialog inherited methods
38         //@{
39         void applyView() override {}
40         bool initialiseParams(std::string const & /*data*/) override { return true; }
41         void clearParams() override {}
42         bool needBufferOpen() const override { return isBufferDependent(); }
43         //@}
44         /// Any dialog that overrides this method should make sure to call it.
45         void closeEvent(QCloseEvent * ev) override;
46         /// Any dialog that overrides this method should make sure to call it.
47         void hideEvent(QHideEvent * ev) override;
48
49 protected Q_SLOTS:
50         void onBufferViewChanged() override {}
51 };
52
53 } // namespace frontend
54 } // namespace lyx
55
56 #endif // DIALOGVIEW_H