]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiToc.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiToc.cpp
index f01d9945dc9ba66a89f1957af7a1eb74a2b2bb4d..787bbb7058b458efddfa609794727b95ecb02925 100644 (file)
@@ -33,7 +33,7 @@ namespace lyx {
 namespace frontend {
 
 GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
-       : DockView(parent, "toc", qt_("Outline"), area, flags)
+       : DockView(parent, "toc", qt_("Outline"), area, flags), is_closing_(false)
 {
        widget_ = new TocWidget(parent, this);
        setWidget(widget_);
@@ -92,6 +92,27 @@ void GuiToc::enableView(bool enable)
 }
 
 
+void GuiToc::closeEvent(QCloseEvent * /*event*/)
+{
+       is_closing_ = true;
+       ((GuiView *)parent())->updateToolbars();
+       is_closing_ = false;
+}
+
+
+void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd)
+{
+       widget_->doDispatch(cur, cmd);
+}
+
+
+bool GuiToc::getStatus(Cursor & cur, FuncRequest const & cmd,
+       FuncStatus & status) const
+{
+       return widget_->getStatus(cur, cmd, status);
+}
+
+
 Dialog * createGuiToc(GuiView & lv)
 {
        GuiView & guiview = static_cast<GuiView &>(lv);