diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
| commit | 3aed883402dc8da829fc304434c5efd0570cbb97 (patch) | |
| tree | 48c46ab087a950d80f78819ceb609e93d246b040 /src/tabbrowsinghistory.hpp | |
| parent | 44e85dce678e7e36f436a6d0a25c212c9a2d3657 (diff) | |
| download | kristall-3aed883402dc8da829fc304434c5efd0570cbb97.tar.gz | |
Moves source code into subdirectory.
Diffstat (limited to 'src/tabbrowsinghistory.hpp')
| -rw-r--r-- | src/tabbrowsinghistory.hpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/tabbrowsinghistory.hpp b/src/tabbrowsinghistory.hpp new file mode 100644 index 0000000..4305218 --- /dev/null +++ b/src/tabbrowsinghistory.hpp @@ -0,0 +1,39 @@ +#ifndef TABBROWSINGHISTORY_HPP +#define TABBROWSINGHISTORY_HPP + +#include <QAbstractListModel> +#include <QVector> +#include <QUrl> + +class TabBrowsingHistory : + public QAbstractListModel +{ + Q_OBJECT +public: + TabBrowsingHistory(); + + bool canGoBack() const; + + bool canGoForward() const; + + QModelIndex pushUrl(QModelIndex const & position, QUrl const & url); + + QUrl get(QModelIndex const & index) const; + + QModelIndex oneForward(QModelIndex index) const; + + QModelIndex oneBackward(QModelIndex index) const; + +public: + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + + +private: + QVector<QUrl> history; +}; + +#endif // TABBROWSINGHISTORY_HPP |
