Changeset View
Changeset View
Standalone View
Standalone View
krusader/BookMan/krbookmark.h
Show All 30 Lines | |||||
31 | class KActionCollection; | 31 | class KActionCollection; | ||
32 | class ListPanelActions; | 32 | class ListPanelActions; | ||
33 | 33 | | |||
34 | 34 | | |||
35 | class KrBookmark: public QAction | 35 | class KrBookmark: public QAction | ||
36 | { | 36 | { | ||
37 | Q_OBJECT | 37 | Q_OBJECT | ||
38 | public: | 38 | public: | ||
39 | KrBookmark(QString name, QUrl url, KActionCollection *parent, QString iconName = "", QString actionName = QString()); | 39 | KrBookmark(const QString& name, QUrl url, KActionCollection *parent, const QString& iconName = "", const QString& actionName = QString()); | ||
40 | explicit KrBookmark(QString name, QString iconName = ""); // creates a folder | 40 | explicit KrBookmark(const QString& name, const QString& iconName = ""); // creates a folder | ||
41 | ~KrBookmark(); | 41 | ~KrBookmark() override; | ||
42 | 42 | | |||
43 | // text() and setText() to change the name of the bookmark | 43 | // text() and setText() to change the name of the bookmark | ||
44 | // icon() and setIcon() to change icons | 44 | // icon() and setIcon() to change icons | ||
45 | 45 | | |||
46 | void setIconName(QString iconName); | 46 | void setIconName(const QString& iconName); | ||
47 | 47 | | |||
48 | inline const QString& iconName() const { | 48 | inline const QString& iconName() const { | ||
49 | return _iconName; | 49 | return _iconName; | ||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | inline const QUrl &url() const { | 52 | inline const QUrl &url() const { | ||
53 | return _url; | 53 | return _url; | ||
54 | } | 54 | } | ||
55 | inline void setURL(const QUrl &url) { | 55 | inline void setURL(const QUrl &url) { | ||
56 | _url = url; | 56 | _url = url; | ||
57 | } | 57 | } | ||
58 | inline bool isFolder() const { | 58 | inline bool isFolder() const { | ||
59 | return _folder; | 59 | return _folder; | ||
60 | } | 60 | } | ||
61 | inline bool isSeparator() const { | 61 | inline bool isSeparator() const { | ||
62 | return _separator; | 62 | return _separator; | ||
63 | } | 63 | } | ||
64 | QList<KrBookmark *>& children() { | 64 | QList<KrBookmark *>& children() { | ||
65 | return _children; | 65 | return _children; | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | static KrBookmark * getExistingBookmark(QString actionName, KActionCollection *collection); | 68 | static KrBookmark * getExistingBookmark(const QString& actionName, KActionCollection *collection); | ||
69 | 69 | | |||
70 | // ----- special bookmarks | 70 | // ----- special bookmarks | ||
71 | static KrBookmark * trash(KActionCollection *collection); | 71 | static KrBookmark * trash(KActionCollection *collection); | ||
72 | static KrBookmark * virt(KActionCollection *collection); | 72 | static KrBookmark * virt(KActionCollection *collection); | ||
73 | static KrBookmark * lan(KActionCollection *collection); | 73 | static KrBookmark * lan(KActionCollection *collection); | ||
74 | static QAction * jumpBackAction(KActionCollection *collection, bool isSetter = false, ListPanelActions *sourceActions = 0); | 74 | static QAction * jumpBackAction(KActionCollection *collection, bool isSetter = false, ListPanelActions *sourceActions = nullptr); | ||
75 | static KrBookmark * separator(); | 75 | static KrBookmark * separator(); | ||
76 | 76 | | |||
77 | signals: | 77 | signals: | ||
78 | void activated(const QUrl &url); | 78 | void activated(const QUrl &url); | ||
79 | 79 | | |||
80 | protected slots: | 80 | protected slots: | ||
81 | void activatedProxy(); | 81 | void activatedProxy(); | ||
82 | 82 | | |||
Show All 11 Lines |