2001-08-19 13:25:15 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QToc.h
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon
|
2002-03-21 21:21:28 +00:00
|
|
|
* \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
|
2001-08-19 13:25:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QTOC_H
|
|
|
|
#define QTOC_H
|
|
|
|
|
2002-01-20 18:38:52 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2002-01-20 18:38:52 +00:00
|
|
|
#include "ControlToc.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
#include "Qt2Base.h"
|
|
|
|
|
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 :
|
|
|
|
public Qt2CB<ControlToc, Qt2DB<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
|
|
|
QToc(ControlToc &);
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2002-01-20 18:38:52 +00:00
|
|
|
friend class QTocDialog;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
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
|
|
|
|
void select(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-01-20 18:38:52 +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
|
2002-01-20 18:38:52 +00:00
|
|
|
Buffer::SingleList 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
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTOC_H
|