]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocModel.h
Support for CJK quotation marks
[lyx.git] / src / frontends / qt4 / TocModel.h
index 6b4315b36bdbb538a81bf0b1c2f9e75e9379d40d..f7d54e822ac5086183a9285b66d6ea33d911874e 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef TOCMODEL_H
 #define TOCMODEL_H
 
-#include "support/shared_ptr.h"
+#include "Toc.h"
 
 #include <QHash>
 #include <QSortFilterProxyModel>
@@ -22,8 +22,6 @@ namespace lyx {
 class Buffer;
 class BufferView;
 class DocIterator;
-class Toc;
-class TocItem;
 
 namespace frontend {
 
@@ -34,11 +32,14 @@ class TocTypeModel;
 /// There is one TocModel per list in the TocBackend.
 class TocModel
 {
+       /// noncopyable
+       TocModel(TocModel const &);
+       void operator=(TocModel const &);
 public:
        ///
        TocModel(QObject * parent);
        ///
-       void reset(shared_ptr<Toc const>);
+       void reset(std::shared_ptr<Toc const>);
        ///
        void reset();
        ///
@@ -64,13 +65,15 @@ private:
        ///
        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_;
        ///
@@ -133,10 +136,6 @@ public:
        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;