]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocModel.h
Amend f441590c
[lyx.git] / src / frontends / qt4 / TocModel.h
index 4e557ccbac1b4e4395897710e5b5ee4192c37534..4d4d442719bb86d8fef5c7e7141e5fbd48cdfc67 100644 (file)
 #ifndef TOCMODEL_H
 #define TOCMODEL_H
 
-#include "qt_helpers.h"
+#include "support/shared_ptr.h"
 
 #include <QHash>
 #include <QSortFilterProxyModel>
-#include <QStandardItemModel>
 
 namespace lyx {
 
@@ -35,11 +34,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(Toc const & toc);
+       void reset(shared_ptr<Toc const>);
        ///
        void reset();
        ///
@@ -71,7 +73,7 @@ private:
        ///
        bool is_sorted_;
        ///
-       Toc const * toc_;
+       shared_ptr<Toc const> toc_;
        ///
        int maxdepth_;
        ///
@@ -125,8 +127,6 @@ public:
        ///
        void init(Buffer const & buffer);
        ///
-       void updateBackend() const;
-       ///
        void updateItem(QString const & type, DocIterator const & dit);
        ///
        void sort(QString const & type, bool sort_it);