Changeset View
Changeset View
Standalone View
Standalone View
messageviewer/src/viewer/urlhandlermanager.h
Show All 34 Lines | |||||
35 | #define __MESSAGEVIEWER_URLHANDLERMANAGER_H__ | 35 | #define __MESSAGEVIEWER_URLHANDLERMANAGER_H__ | ||
36 | 36 | | |||
37 | #include <QVector> | 37 | #include <QVector> | ||
38 | 38 | | |||
39 | class QUrl; | 39 | class QUrl; | ||
40 | class QString; | 40 | class QString; | ||
41 | class QPoint; | 41 | class QPoint; | ||
42 | 42 | | |||
43 | namespace MessageViewer { | 43 | namespace MimeTreeParser { | ||
44 | class ViewerPrivate; | 44 | class URLHandler; | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | namespace MimeTreeParser { | 47 | namespace MessageViewer { | ||
48 | namespace Interface { | 48 | namespace Interface { | ||
49 | class BodyPartURLHandler; | 49 | class BodyPartURLHandler; | ||
50 | } | 50 | } | ||
51 | class URLHandler; | 51 | class ViewerPrivate; | ||
52 | } | | |||
53 | 52 | | |||
54 | namespace MessageViewer { | | |||
55 | /** | 53 | /** | ||
56 | * @short Singleton to manage the list of URLHandlers | 54 | * @short Singleton to manage the list of URLHandlers | ||
57 | * @author Marc Mutz <mutz@kde.org> | 55 | * @author Marc Mutz <mutz@kde.org> | ||
58 | */ | 56 | */ | ||
59 | class URLHandlerManager | 57 | class URLHandlerManager | ||
60 | { | 58 | { | ||
61 | static URLHandlerManager *self; | 59 | static URLHandlerManager *self; | ||
62 | 60 | | |||
63 | URLHandlerManager(); | 61 | URLHandlerManager(); | ||
64 | public: | 62 | public: | ||
65 | ~URLHandlerManager(); | 63 | ~URLHandlerManager(); | ||
66 | 64 | | |||
67 | static URLHandlerManager *instance(); | 65 | static URLHandlerManager *instance(); | ||
68 | 66 | | |||
69 | void registerHandler(const MimeTreeParser::URLHandler *handler); | 67 | void registerHandler(const MimeTreeParser::URLHandler *handler); | ||
70 | void unregisterHandler(const MimeTreeParser::URLHandler *handler); | 68 | void unregisterHandler(const MimeTreeParser::URLHandler *handler); | ||
71 | 69 | | |||
72 | void registerHandler(const MimeTreeParser::Interface::BodyPartURLHandler *handler); | 70 | void registerHandler(const Interface::BodyPartURLHandler *handler); | ||
73 | void unregisterHandler(const MimeTreeParser::Interface::BodyPartURLHandler *handler); | 71 | void unregisterHandler(const Interface::BodyPartURLHandler *handler); | ||
74 | 72 | | |||
75 | bool handleClick(const QUrl &url, ViewerPrivate *w = nullptr) const; | 73 | bool handleClick(const QUrl &url, ViewerPrivate *w = nullptr) const; | ||
76 | bool handleShiftClick(const QUrl &url, ViewerPrivate *window = nullptr) const; | 74 | bool handleShiftClick(const QUrl &url, ViewerPrivate *window = nullptr) const; | ||
77 | bool handleContextMenuRequest(const QUrl &url, const QPoint &p, ViewerPrivate *w = nullptr) const; | 75 | bool handleContextMenuRequest(const QUrl &url, const QPoint &p, ViewerPrivate *w = nullptr) const; | ||
78 | bool willHandleDrag(const QUrl &url, ViewerPrivate *window = nullptr) const; | 76 | bool willHandleDrag(const QUrl &url, ViewerPrivate *window = nullptr) const; | ||
79 | bool handleDrag(const QUrl &url, ViewerPrivate *window = nullptr) const; | 77 | bool handleDrag(const QUrl &url, ViewerPrivate *window = nullptr) const; | ||
80 | QString statusBarMessage(const QUrl &url, ViewerPrivate *w = nullptr) const; | 78 | QString statusBarMessage(const QUrl &url, ViewerPrivate *w = nullptr) const; | ||
81 | 79 | | |||
Show All 9 Lines |