Changeset View
Changeset View
Standalone View
Standalone View
krusader/BookMan/krbookmarkhandler.h
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 54 | protected: | |||
---|---|---|---|---|---|
58 | bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg); | 58 | bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg); | ||
59 | void exportToFile(); | 59 | void exportToFile(); | ||
60 | void exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder); | 60 | void exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder); | ||
61 | void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); | 61 | void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); | ||
62 | void clearBookmarks(KrBookmark *root); | 62 | void clearBookmarks(KrBookmark *root); | ||
63 | void buildMenu(KrBookmark *parent, QMenu *menu, int depth = 0); | 63 | void buildMenu(KrBookmark *parent, QMenu *menu, int depth = 0); | ||
64 | 64 | | |||
65 | bool eventFilter(QObject *obj, QEvent *ev); | 65 | bool eventFilter(QObject *obj, QEvent *ev); | ||
66 | QString createShortcutUnderline(const QString &, int underlineEnd); | | |||
67 | void resetShortcuts(); | | |||
68 | void rightClicked(QMenu *menu, KrBookmark *bm); | 66 | void rightClicked(QMenu *menu, KrBookmark *bm); | ||
69 | void rightClickOnSpecialBookmark(); | 67 | void rightClickOnSpecialBookmark(); | ||
70 | 68 | | |||
71 | void removeReferences(KrBookmark *root, KrBookmark *bmToRemove); | 69 | void removeReferences(KrBookmark *root, KrBookmark *bmToRemove); | ||
72 | 70 | | |||
73 | protected slots: | 71 | protected slots: | ||
74 | void bookmarksChanged(const QString&, const QString&); | 72 | void bookmarksChanged(const QString&, const QString&); | ||
75 | void slotActivated(const QUrl &url); | 73 | void slotActivated(const QUrl &url); | ||
76 | 74 | | |||
77 | private: | 75 | private: | ||
78 | KrMainWindow *_mainWindow; | 76 | KrMainWindow *_mainWindow; | ||
79 | KActionCollection *_collection, *_privateCollection; | 77 | KActionCollection *_collection, *_privateCollection; | ||
80 | KrBookmark *_root; | 78 | KrBookmark *_root; | ||
81 | // the whole KBookmarkManager is an ugly hack. use it until we have our own | 79 | // the whole KBookmarkManager is an ugly hack. use it until we have our own | ||
82 | KBookmarkManager *manager; | 80 | KBookmarkManager *manager; | ||
83 | bool _middleClick; // if true, the user clicked the middle button to open the bookmark | 81 | bool _middleClick; // if true, the user clicked the middle button to open the bookmark | ||
84 | 82 | | |||
85 | QPointer<QMenu> _mainBookmarkPopup; // main bookmark popup menu | 83 | QPointer<QMenu> _mainBookmarkPopup; // main bookmark popup menu | ||
86 | QList<QAction *> _specialBookmarks; // the action list of the special bookmarks | 84 | QList<QAction *> _specialBookmarks; // the action list of the special bookmarks | ||
87 | QHash<QAction *, QString> _msNamesWithAccelerators; // List of changed shortcuts and their old values | | |||
88 | 85 | | |||
89 | QWidgetAction *_quickSearchAction; | 86 | QWidgetAction *_quickSearchAction; | ||
90 | QLineEdit *_quickSearchBar; | 87 | QLineEdit *_quickSearchBar; | ||
88 | QHash<QAction *, QString> _quickSearchOriginalActionTitles; ///< Saved original action text values to restore after search | ||||
91 | 89 | | |||
92 | void _setQuickSearchText(const QString &text); | 90 | void _setQuickSearchText(const QString &text); | ||
93 | QString _quickSearchText() const; | 91 | QString _quickSearchText() const; | ||
92 | static void _highlightAction(QAction *action, bool isMatched = true); | ||||
93 | void _resetActionTextAndHighlighting(); | ||||
94 | }; | 94 | }; | ||
95 | 95 | | |||
96 | Q_DECLARE_METATYPE(KrBookmark *) | 96 | Q_DECLARE_METATYPE(KrBookmark *) | ||
97 | 97 | | |||
98 | #endif // KRBOOKMARK_HANDLER_H | 98 | #endif // KRBOOKMARK_HANDLER_H |