3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
18 #include "TocWidget.h"
19 #include "qt_helpers.h"
22 #include "BufferView.h"
23 #include "BufferParams.h"
24 #include "FuncRequest.h"
26 #include "support/debug.h"
27 #include "support/gettext.h"
28 #include "support/lassert.h"
35 GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
36 : DockView(parent, "toc", qt_("Outline"), area, flags), is_closing_(false)
38 widget_ = new TocWidget(parent, this);
40 setFocusProxy(widget_);
50 void GuiToc::updateView()
52 widget_->updateView();
57 bool GuiToc::initialiseParams(string const & data)
59 widget_->init(toqstr(data));
64 void GuiToc::dispatchParams()
69 void GuiToc::enableView(bool /*enable*/)
71 widget_->updateViewForce();
75 void GuiToc::closeEvent(QCloseEvent * /*event*/)
78 static_cast<GuiView *>(parent())->updateToolbars();
83 void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd)
85 widget_->doDispatch(cur, cmd);
89 bool GuiToc::getStatus(Cursor & cur, FuncRequest const & cmd,
90 FuncStatus & status) const
92 return widget_->getStatus(cur, cmd, status);
96 Dialog * createGuiToc(GuiView & lv)
98 return new GuiToc(lv);
102 } // namespace frontend
105 #include "moc_GuiToc.cpp"