2001-08-19 13:25:15 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QToc.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-19 13:25:15 +00:00
|
|
|
*
|
|
|
|
* \author John Levon
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author Kalle Dalheimer
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-08-19 13:25:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QTOC_H
|
|
|
|
#define QTOC_H
|
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "QDialogView.h"
|
2002-09-24 13:57:09 +00:00
|
|
|
#include "toc.h"
|
2002-06-19 03:38:44 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2002-01-20 18:38:52 +00:00
|
|
|
class ControlToc;
|
2001-08-19 13:25:15 +00:00
|
|
|
class QTocDialog;
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
class QToc :
|
2003-02-25 14:51:38 +00:00
|
|
|
public QController<ControlToc, QView<QTocDialog> >
|
2002-01-20 18:38:52 +00:00
|
|
|
{
|
2001-08-19 13:25:15 +00:00
|
|
|
public:
|
2002-01-20 18:38:52 +00:00
|
|
|
friend class QTocDialog;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
QToc(Dialog &);
|
2001-08-19 13:25:15 +00:00
|
|
|
private:
|
2002-01-20 18:38:52 +00:00
|
|
|
/// update the listview
|
|
|
|
void updateToc(int newdepth);
|
|
|
|
|
|
|
|
/// update the float types
|
|
|
|
void updateType();
|
|
|
|
|
|
|
|
/// select an entry
|
2003-10-06 15:43:21 +00:00
|
|
|
void select(std::string const & text);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-01-20 18:38:52 +00:00
|
|
|
/// set the depth
|
|
|
|
void set_depth(int depth);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
virtual void apply() {}
|
2002-03-21 21:21:28 +00:00
|
|
|
|
|
|
|
/// update dialog
|
2002-01-20 18:38:52 +00:00
|
|
|
virtual void update_contents();
|
|
|
|
|
|
|
|
/// build dialog
|
|
|
|
virtual void build_dialog();
|
2001-08-19 13:25:15 +00:00
|
|
|
|
|
|
|
/// the toc list
|
2003-07-27 15:09:45 +00:00
|
|
|
lyx::toc::Toc toclist;
|
2001-08-19 13:25:15 +00:00
|
|
|
|
|
|
|
/// depth of list shown
|
2002-01-20 18:38:52 +00:00
|
|
|
int depth_;
|
2001-08-19 13:25:15 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#endif // QTOC_H
|