]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/DockView.h
GuiBibtex: Use appropriate title when using Biblatex
[lyx.git] / src / frontends / qt4 / DockView.h
index 4b056789c4555661e27f261818c967dbda5567ab..3c54c2ad20c0dbc06963abe972e5bfcffc926dee 100644 (file)
@@ -16,6 +16,7 @@
 #include "GuiView.h"
 
 #include <QDockWidget>
+#include <QKeyEvent>
 
 namespace lyx {
 namespace frontend {
@@ -28,33 +29,39 @@ namespace frontend {
  **/
 class DockView : public QDockWidget, public Dialog
 {
+       Q_OBJECT
+
 public:
-       DockView(
-               GuiView & parent, ///< the main window where to dock.
-               std::string const & name, ///< dialog identifier.
-               Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
-               Qt::WindowFlags flags = 0
-       )
-               : QDockWidget(&parent, flags), Dialog(parent, name)
-       {
-               if (flags & Qt::Drawer)
-                       setFeatures(QDockWidget::NoDockWidgetFeatures);
-               parent.addDockWidget(area, this);
-       }
+       DockView(GuiView & parent, ///< the main window where to dock.
+                QString const & name, ///< dialog identifier.
+                QString const & title, ///< dialog title.
+                Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of
+                                                                                                                          ///the dock (and
+                                                                                                                          ///also drawer)
+                Qt::WindowFlags flags = 0);
 
        virtual ~DockView() {}
 
        virtual QWidget * asQWidget() { return this; }
        virtual QWidget const * asQWidget() const { return this; }
 
+       /// We don't want to restore geometry session for dock widgets.
+       void restoreSession() {}
+
+       void keyPressEvent(QKeyEvent * ev);
+
        /// Dialog inherited methods
        //@{
        void applyView() {}
        bool isClosing() const { return false; }
+       bool needBufferOpen() const { return false; }
        //@}
+
+protected Q_SLOTS:
+       void onBufferViewChanged() {} //override
 };
 
-} // frontend
-} // lyx
+} // namespace frontend
+} // namespace lyx
 
 #endif // DOCK_VIEW_H