File indexing completed on 2024-05-19 05:19:20

0001 /*
0002     This file is part of KJots.
0003 
0004     SPDX-FileCopyrightText: 1997 Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
0005                   2002, 2003 Aaron J. Seigo <aseigo@kde.org>
0006                   2003 Stanislav Kljuhhin <crz@hot.ee>
0007                   2005-2006 Jaison Lee <lee.jaison@gmail.com>
0008                   2020 Igor Poboiko <igor.poboiko@gmail.com>
0009 
0010     SPDX-License-Identifier: GPL-2.0-or-later
0011 */
0012 
0013 #ifndef KJOTSBOOKMARKS
0014 #define KJOTSBOOKMARKS
0015 
0016 #include <KBookmarkManager>
0017 #include <KBookmarkOwner>
0018 
0019 class QItemSelectionModel;
0020 
0021 class KJotsBookmarks : public QObject, public KBookmarkOwner
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit KJotsBookmarks(QItemSelectionModel *model, QObject *parent = nullptr);
0027 
0028     QUrl currentUrl() const override;
0029     QString currentIcon() const override;
0030     QString currentTitle() const override;
0031     void openBookmark(const KBookmark &bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km) override;
0032 
0033 Q_SIGNALS:
0034     void openLink(const QUrl &url);
0035 
0036 private:
0037     QItemSelectionModel *m_model = nullptr;
0038 };
0039 
0040 #endif
0041 /* ex: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab: */