2020-08-25 17:07:38 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2019 David Hallas <david@davidhallas.dk>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.
Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]
FEATURE: 171366
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel
Tags: #dolphin
Maniphest Tasks: T5408
Differential Revision: https://phabricator.kde.org/D19926
2019-03-20 19:29:20 +00:00
|
|
|
|
|
|
|
#ifndef DOLPHINBOOKMARKHANDLER_H
|
|
|
|
#define DOLPHINBOOKMARKHANDLER_H
|
|
|
|
|
|
|
|
#include <KBookmarkManager>
|
2021-02-08 23:40:37 +00:00
|
|
|
#include <KBookmarkOwner>
|
Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.
Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]
FEATURE: 171366
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel
Tags: #dolphin
Maniphest Tasks: T5408
Differential Revision: https://phabricator.kde.org/D19926
2019-03-20 19:29:20 +00:00
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class DolphinMainWindow;
|
|
|
|
class DolphinViewContainer;
|
|
|
|
class KActionCollection;
|
|
|
|
class KBookmarkMenu;
|
|
|
|
class QMenu;
|
|
|
|
|
|
|
|
class DolphinBookmarkHandler : public QObject, public KBookmarkOwner
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
DolphinBookmarkHandler(DolphinMainWindow *mainWindow, KActionCollection *collection, QMenu *menu, QObject *parent);
|
|
|
|
~DolphinBookmarkHandler() override;
|
2019-11-25 19:54:08 +00:00
|
|
|
|
Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.
Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]
FEATURE: 171366
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel
Tags: #dolphin
Maniphest Tasks: T5408
Differential Revision: https://phabricator.kde.org/D19926
2019-03-20 19:29:20 +00:00
|
|
|
private:
|
|
|
|
QString currentTitle() const override;
|
|
|
|
QUrl currentUrl() const override;
|
|
|
|
QString currentIcon() const override;
|
|
|
|
bool supportsTabs() const override;
|
|
|
|
QList<FutureBookmark> currentBookmarkList() const override;
|
|
|
|
bool enableOption(BookmarkOption option) const override;
|
|
|
|
void openBookmark(const KBookmark &bookmark, Qt::MouseButtons, Qt::KeyboardModifiers) override;
|
|
|
|
void openFolderinTabs(const KBookmarkGroup &bookmarkGroup) override;
|
|
|
|
void openInNewTab(const KBookmark &bookmark) override;
|
|
|
|
void openInNewWindow(const KBookmark &bookmark) override;
|
2023-02-03 17:14:53 +00:00
|
|
|
static QString title(DolphinViewContainer *viewContainer);
|
|
|
|
static QUrl url(DolphinViewContainer *viewContainer);
|
|
|
|
static QString icon(DolphinViewContainer *viewContainer);
|
|
|
|
|
Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.
Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]
FEATURE: 171366
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel
Tags: #dolphin
Maniphest Tasks: T5408
Differential Revision: https://phabricator.kde.org/D19926
2019-03-20 19:29:20 +00:00
|
|
|
private:
|
2023-02-03 17:14:53 +00:00
|
|
|
DolphinMainWindow *m_mainWindow;
|
Add Bookmark Handling
Summary:
Add Bookmark Handling. Adds complete bookmark support as provided by
other KDE applications like Konsole and Konqueror. This allows you to
bookmark individual folders, create bookmark folders and open them.
Test Plan:
Go -> Bookmark -> Add Bookmark
Go -> Bookmark -> [Open the bookmark you selected]
FEATURE: 171366
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: ognarb, meven, loh.tar, cfeck, hein, kfm-devel
Tags: #dolphin
Maniphest Tasks: T5408
Differential Revision: https://phabricator.kde.org/D19926
2019-03-20 19:29:20 +00:00
|
|
|
KBookmarkManager *m_bookmarkManager;
|
|
|
|
QScopedPointer<KBookmarkMenu> m_bookmarkMenu;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DOLPHINBOOKMARKHANDLER_H
|