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
39 Qt::WindowFlags flags = 0);
41 virtual ~DockView() {}
43 QWidget * asQWidget() override { return this; }
44 QWidget const * asQWidget() const override { return this; }
46 /// We don't want to restore geometry session for dock widgets.
47 void restoreSession() override {}
49 void keyPressEvent(QKeyEvent * ev) override;
51 /// Dialog inherited methods
53 void applyView() override {}
54 bool isClosing() const override { return false; }
55 bool needBufferOpen() const override { return false; }
59 void onBufferViewChanged() override {}
62 } // namespace frontend