]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/QToc.h
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / QToc.h
index 278931ea3bf283d2778f0c21804d9aa690d4ca80..abee279bfb79874e5ed0117e513783e49c31455c 100644 (file)
 #ifndef QTOC_H
 #define QTOC_H
 
-#include "QDialogView.h"
-#include "toc.h"
+#include "ControlToc.h"
+
+#include <QStandardItemModel>
+#include <QStringListModel>
 
 namespace lyx {
 namespace frontend {
 
 class ControlToc;
-class QTocDialog;
+class TocModel;
 
-//template<class W>
-class QToc :
-       public QController<ControlToc, QView<QTocDialog> >
+class QToc : public ControlToc
 {
 public:
-       friend class QTocDialog;
 
        QToc(Dialog &);
 
-       /// return the toc list
-       lyx::toc::Toc & get_toclist() { return toclist;}
+       void update();
 
-       void moveUp();
-       void moveDown();
-       void moveIn();
-       void moveOut();
+       void updateToc(int type);
 
-private:
+       bool canOutline();
+       
+       QStandardItemModel * tocModel();
+       QStandardItemModel * setTocModel(int type);
 
-       /// select an entry
-       void select(std::string const & text);
+       QStringListModel * typeModel()
+       { return &type_model_; }
 
-       virtual void apply() {}
+       ///
+       QModelIndex const getCurrentIndex();
+       ///
+       void goTo(QModelIndex const & index);
+
+private:
 
-       /// update dialog
-       virtual void update_contents();
+       std::vector<TocModel *> toc_models_;
 
-       /// build dialog
-       virtual void build_dialog();
+       QStringListModel type_model_;
 
-       /// the toc list
-       lyx::toc::Toc toclist;
+       int type_;
+       int outline_type_;
 };
 
 } // namespace frontend