diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 20:57:56 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 20:57:56 +0200 |
| commit | eb283439a68dfb70a075205859d891dca831626b (patch) | |
| tree | b54923af31c8e05e804b36860ef9bb968f1aee99 /tabbrowsinghistory.cpp | |
| parent | 304bed8a1f567e7ba247d19ecbeeecd40833db04 (diff) | |
| download | kristall-eb283439a68dfb70a075205859d891dca831626b.tar.gz | |
Improves navigation with hotkeys, adds sane default theme, adds page margin settings.
Diffstat (limited to 'tabbrowsinghistory.cpp')
| -rw-r--r-- | tabbrowsinghistory.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tabbrowsinghistory.cpp b/tabbrowsinghistory.cpp index 289d529..435bca7 100644 --- a/tabbrowsinghistory.cpp +++ b/tabbrowsinghistory.cpp @@ -41,6 +41,24 @@ QUrl TabBrowsingHistory::get(const QModelIndex &index) const return history.at(index.row()); } +QModelIndex TabBrowsingHistory::oneForward(QModelIndex index) const +{ + if(not index.isValid()) + return QModelIndex{}; + if(index.row() >= history.size() - 1) + return QModelIndex{}; + return createIndex(index.row() + 1, index.column()); +} + +QModelIndex TabBrowsingHistory::oneBackward(QModelIndex index) const +{ + if(not index.isValid()) + return QModelIndex{}; + if(index.row() == 0) + return QModelIndex{}; + return createIndex(index.row() - 1, index.column()); +} + int TabBrowsingHistory::rowCount(const QModelIndex &parent) const { return history.size(); |
