diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 22:23:20 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 22:23:20 +0200 |
| commit | d9e105e6e0accf5def8681334341069117cab213 (patch) | |
| tree | 68764c76f67326aaa3f731ce70726e821c00e11a /documentoutlinemodel.hpp | |
| parent | 87d787bc2c50eb00c6b86957efaa71e07f9acc07 (diff) | |
| download | kristall-d9e105e6e0accf5def8681334341069117cab213.tar.gz | |
Navigation via outline is now possible. Sexy!
Diffstat (limited to 'documentoutlinemodel.hpp')
| -rw-r--r-- | documentoutlinemodel.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/documentoutlinemodel.hpp b/documentoutlinemodel.hpp index 52e5f48..0476892 100644 --- a/documentoutlinemodel.hpp +++ b/documentoutlinemodel.hpp @@ -15,14 +15,17 @@ public: void beginBuild(); - void appendH1(QString const & title); + void appendH1(QString const & title, QString const & anchor); - void appendH2(QString const & title); + void appendH2(QString const & title, QString const & anchor); - void appendH3(QString const & title); + void appendH3(QString const & title, QString const & anchor); void endBuild(); + QString getTitle(QModelIndex const & index) const; + QString getAnchor(QModelIndex const & index) const; + public: QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; @@ -39,6 +42,7 @@ private: { Node * parent; QString title; + QString anchor; int depth = 0; int index = 0; QList<Node> children; |
