2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiToc.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
* \author Kalle Dalheimer
|
2007-10-06 20:35:44 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUITOC_H
|
|
|
|
#define GUITOC_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
#include "DockView.h"
|
|
|
|
|
2007-10-07 18:58:47 +00:00
|
|
|
#include "insets/InsetCommandParams.h"
|
2006-04-18 09:57:47 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
#include "TocBackend.h"
|
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
#include <QStandardItemModel>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-06 20:35:44 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
class TocModel;
|
2007-10-08 20:14:58 +00:00
|
|
|
class TocWidget;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
class GuiToc : public DockView
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
2007-03-12 14:23:44 +00:00
|
|
|
Q_OBJECT
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
public:
|
|
|
|
///
|
2007-10-08 20:14:58 +00:00
|
|
|
GuiToc(
|
2007-11-05 13:52:37 +00:00
|
|
|
GuiView & parent, ///< the main window where to dock.
|
2007-10-08 20:14:58 +00:00
|
|
|
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
|
|
|
|
Qt::WindowFlags flags = 0);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-09 09:29:27 +00:00
|
|
|
~GuiToc();
|
|
|
|
|
2007-04-03 13:07:38 +00:00
|
|
|
///
|
2007-10-06 20:35:44 +00:00
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
void updateView();
|
2008-05-02 12:09:51 +00:00
|
|
|
void enableView(bool enable);
|
2007-10-06 20:35:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
public:
|
2007-10-07 18:58:47 +00:00
|
|
|
/// clean-up on hide.
|
2008-02-12 07:47:16 +00:00
|
|
|
void clearParams() {}
|
2007-10-07 18:58:47 +00:00
|
|
|
///
|
|
|
|
void dispatchParams();
|
|
|
|
///
|
|
|
|
bool isBufferDependent() const { return true; }
|
2008-03-06 19:39:52 +00:00
|
|
|
|
2008-05-02 12:09:51 +00:00
|
|
|
private:
|
2008-03-06 19:39:52 +00:00
|
|
|
///
|
2008-05-02 12:09:51 +00:00
|
|
|
TocWidget * widget_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUITOC_H
|