]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocModel.h
Amend f441590c
[lyx.git] / src / frontends / qt4 / TocModel.h
index 77ada21f4b6c38145bd011f3669016a560b1df0c..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_;
        ///