#include "Toc.h"
-#include "support/shared_ptr.h"
-
#include <QHash>
#include <QSortFilterProxyModel>
class Buffer;
class BufferView;
class DocIterator;
+class FuncRequest;
namespace frontend {
///
TocModel(QObject * parent);
///
- void reset(shared_ptr<Toc const>);
+ void reset(std::shared_ptr<Toc const>);
///
void reset();
///
///
void populate(unsigned int & index, QModelIndex const & parent);
///
+ void setString(TocItem const & item, QModelIndex index);
+ ///
TocTypeModel * model_;
///
QSortFilterProxyModel * sorted_model_;
///
bool is_sorted_;
///
- shared_ptr<Toc const> toc_;
+ std::shared_ptr<Toc const> toc_;
///
int maxdepth_;
///
class TocModelSortProxyModel : public QSortFilterProxyModel
{
public:
- TocModelSortProxyModel(QObject * w)
+ TocModelSortProxyModel(QObject * w)
: QSortFilterProxyModel(w)
{}
///
QAbstractItemModel * nameModel();
///
- QModelIndex currentIndex(QString const & type) const;
- ///
- void goTo(QString const & type, QModelIndex const & index) const;
+ QModelIndex currentIndex(QString const & type,
+ DocIterator const & dit) const;
///
- void init(Buffer const & buffer);
+ FuncRequest goTo(QString const & type, QModelIndex const & index) const;
///
void updateItem(QString const & type, DocIterator const & dit);
///
TocItem const currentItem(QString const & type,
QModelIndex const & index) const;
-Q_SIGNALS:
- /// Signal that the internal toc_models_ has been reset.
- void modelReset();
-
private:
typedef QHash<QString, TocModel *>::const_iterator const_iterator;
typedef QHash<QString, TocModel *>::iterator iterator;
///
void clear();
///
- BufferView const * bv_;
- ///
QHash<QString, TocModel *> models_;
///
TocTypeModel * names_;