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.
18 #include <QDockWidget>
24 /// Dock Widget container for LyX dialogs.
26 * This template class that encapsulates a given Widget inside a
27 * QDockWidget and presents a Dialog interface
28 * FIXME: create a DockView.cpp file
30 class DockView : public QDockWidget, public Dialog
35 DockView(GuiView & parent, ///< the main window where to dock.
36 QString const & name, ///< dialog identifier.
37 QString const & title, ///< dialog title.
38 Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of
41 Qt::WindowFlags flags = 0);
43 virtual ~DockView() {}
45 virtual QWidget * asQWidget() { return this; }
46 virtual QWidget const * asQWidget() const { return this; }
48 /// We don't want to restore geometry session for dock widgets.
49 void restoreSession() {}
51 void keyPressEvent(QKeyEvent * ev);
53 /// Dialog inherited methods
56 bool isClosing() const { return false; }
57 bool needBufferOpen() const { return false; }
61 void onBufferViewChanged() {} //override