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.
24 DockView::DockView(GuiView & parent, QString const & name,
25 QString const & title, Qt::DockWidgetArea area,
26 Qt::WindowFlags flags)
27 : QDockWidget(&parent, flags), Dialog(parent, name, title)
30 parent.addDockWidget(area, this);
32 connect(&parent, SIGNAL(bufferViewChanged()),
33 this, SLOT(onBufferViewChanged()));
35 // Make dock widgets sub windows to prevent focusNextPrevChild
36 // (Tab key) switching to the parent rather than to the next
37 // widget in the pane (#12170)
38 setWindowFlags(Qt::SubWindow);
42 void DockView::keyPressEvent(QKeyEvent * ev)
44 if (ev->key() == Qt::Key_Escape) {
45 QMainWindow * mw = static_cast<QMainWindow *>(parent());
59 } // namespace frontend
62 #include "moc_DockView.cpp"