Messagelib

urlhandler.h
1 /* -*- c++ -*-
2  interfaces/urlhandler.h
3 
4  This file is part of KMail, the KDE mail client.
5  SPDX-FileCopyrightText: 2003 Marc Mutz <[email protected]>
6 
7  SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 
10 #ifndef KMAIL_INTERFACES_URLHANDLER_H
11 #define KMAIL_INTERFACES_URLHANDLER_H
12 
13 #include <QUrl>
14 
15 class QString;
16 class QPoint;
17 
18 namespace MessasgeViewer {
19 class ViewerPrivate;
20 }
21 
22 namespace MimeTreeParser {
29 {
30 public:
31  virtual ~URLHandler()
32  {
33  }
34 
42  virtual bool handleClick(const QUrl &url, MessageViewer::ViewerPrivate *w) const = 0;
43 
52  virtual bool handleContextMenuRequest(const QUrl &url, const QPoint &p, MessageViewer::ViewerPrivate *w) const = 0;
53 
60  virtual Q_REQUIRED_RESULT QString statusBarMessage(const QUrl &url, MessageViewer::ViewerPrivate *w) const = 0;
61 
66  virtual Q_REQUIRED_RESULT bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
67  {
68  Q_UNUSED(url)
69  Q_UNUSED(window)
70  return false;
71  }
72 
76  virtual Q_REQUIRED_RESULT bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
77  {
78  Q_UNUSED(url)
79  Q_UNUSED(window)
80  return false;
81  }
82 
88  virtual Q_REQUIRED_RESULT bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
89  {
90  Q_UNUSED(url)
91  Q_UNUSED(window)
92  return false;
93  }
94 };
95 }
96 
97 #endif // KMAIL_INTERFACES_URLHANDLER_H
virtual bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Called when starting a drag with the given URL.
Definition: urlhandler.h:88
virtual bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Definition: urlhandler.h:76
virtual bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Called when shift-clicking the link in the reader.
Definition: urlhandler.h:66
An interface to reader link handlers.
Definition: urlhandler.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Nov 27 2020 23:15:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.