2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QToc.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
* \author Kalle Dalheimer
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QTOC_H
|
|
|
|
#define QTOC_H
|
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
#include "ControlToc.h"
|
|
|
|
|
|
|
|
#include <QStandardItemModel>
|
|
|
|
#include <QStringListModel>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class ControlToc;
|
2006-04-18 09:57:47 +00:00
|
|
|
class TocModel;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
class QToc : public ControlToc
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
QToc(Dialog &);
|
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
void update();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
void updateToc(int type);
|
2006-03-29 16:57:47 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
bool canOutline();
|
|
|
|
|
|
|
|
QStandardItemModel * tocModel();
|
|
|
|
QStandardItemModel * setTocModel(int type);
|
|
|
|
|
|
|
|
QStringListModel * typeModel()
|
|
|
|
{ return &type_model_; }
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-19 14:48:22 +00:00
|
|
|
///
|
|
|
|
QModelIndex const getCurrentIndex();
|
|
|
|
///
|
2006-04-18 09:57:47 +00:00
|
|
|
void goTo(QModelIndex const & index);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
private:
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
std::vector<TocModel *> toc_models_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
QStringListModel type_model_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-18 09:57:47 +00:00
|
|
|
int type_;
|
|
|
|
int outline_type_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // QTOC_H
|