4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
17 #include <QDockWidget>
22 /// Dock Widget container for LyX dialogs.
24 * This template class that encapsulates a given Widget inside a
25 * QDockWidget and presents a Dialog interface
26 * FIXME: create a DockView.cpp file
28 class DockView : public QDockWidget, public Dialog
33 DockView(GuiView & parent, ///< the main window where to dock.
34 QString const & name, ///< dialog identifier.
35 QString const & title, ///< dialog title.
36 Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock
38 Qt::WindowFlags flags = {});
40 virtual ~DockView() {}
42 QWidget * asQWidget() override { return this; }
43 QWidget const * asQWidget() const override { return this; }
45 /// We don't want to restore geometry session for dock widgets.
46 void restoreSession() override {}
48 void keyPressEvent(QKeyEvent * ev) override;
50 /// Dialog inherited methods
52 void applyView() override {}
53 bool isClosing() const override { return false; }
54 bool needBufferOpen() const override { return false; }
58 void onBufferViewChanged() override {}
61 } // namespace frontend