• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • viewer
urlhandlermanager.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  urlhandlermanager.h
3 
4  This file is part of KMail, the KDE mail client.
5  Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6  Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7  Copyright (c) 2009 Andras Mantia <andras@kdab.net>
8 
9  KMail is free software; you can redistribute it and/or modify it
10  under the terms of the GNU General Public License, version 2, as
11  published by the Free Software Foundation.
12 
13  KMail is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22  In addition, as a special exception, the copyright holders give
23  permission to link the code of this program with any edition of
24  the Qt library by Trolltech AS, Norway (or with modified versions
25  of Qt that use the same license as Qt), and distribute linked
26  combinations including the two. You must obey the GNU General
27  Public License in all respects for all of the code used other than
28  Qt. If you modify this file, you may extend this exception to
29  your version of the file, but you are not obligated to do so. If
30  you do not wish to do so, delete this exception statement from
31  your version.
32 */
33 
34 #ifndef __MESSAGEVIEWER_URLHANDLERMANAGER_H__
35 #define __MESSAGEVIEWER_URLHANDLERMANAGER_H__
36 
37 #include <QVector>
38 
39 class KUrl;
40 
41 class QString;
42 class QPoint;
43 
44 namespace MessageViewer {
45  namespace Interface {
46  class BodyPartURLHandler;
47  }
48 
49  class ViewerPrivate;
50  class URLHandler;
51 }
52 
53 namespace MessageViewer {
54 
59 class URLHandlerManager {
60  static URLHandlerManager * self;
61 
62  URLHandlerManager();
63 public:
64  ~URLHandlerManager();
65 
66  static URLHandlerManager * instance() {
67  if ( !self )
68  self = new URLHandlerManager();
69  return self;
70  }
71 
72  void registerHandler( const URLHandler * handler );
73  void unregisterHandler( const URLHandler * handler );
74 
75  void registerHandler( const Interface::BodyPartURLHandler * handler );
76  void unregisterHandler( const Interface::BodyPartURLHandler * handler );
77 
78  bool handleClick( const KUrl & url, ViewerPrivate * w = 0 ) const;
79  bool handleShiftClick( const KUrl &url, ViewerPrivate *window = 0 ) const;
80  bool handleContextMenuRequest( const KUrl & url, const QPoint & p, ViewerPrivate * w = 0 ) const;
81  bool willHandleDrag( const KUrl &url, ViewerPrivate *window = 0 ) const;
82  bool handleDrag( const KUrl &url, ViewerPrivate *window = 0 ) const;
83  QString statusBarMessage( const KUrl & url, ViewerPrivate * w = 0 ) const;
84 
85 private:
86  typedef QVector<const URLHandler*> HandlerList;
87  HandlerList mHandlers;
88  class BodyPartURLHandlerManager;
89  BodyPartURLHandlerManager * mBodyPartURLHandlerManager;
90 };
91 }
92 
93 #endif // __MESSAGEVIEWER_URLHANDLERMANAGER_H__
94 
MessageViewer::URLHandlerManager::statusBarMessage
QString statusBarMessage(const KUrl &url, ViewerPrivate *w=0) const
Definition: urlhandlermanager.cpp:415
MessageViewer::URLHandlerManager::registerHandler
void registerHandler(const URLHandler *handler)
Definition: urlhandlermanager.cpp:348
MessageViewer::URLHandlerManager::handleShiftClick
bool handleShiftClick(const KUrl &url, ViewerPrivate *window=0) const
Definition: urlhandlermanager.cpp:378
MessageViewer::URLHandlerManager::~URLHandlerManager
~URLHandlerManager()
Definition: urlhandlermanager.cpp:343
MessageViewer::URLHandlerManager::instance
static URLHandlerManager * instance()
Definition: urlhandlermanager.h:66
MessageViewer::ViewerPrivate
Private class for the Viewer, the main widget in the messageviewer library.
Definition: viewer_p.h:182
MessageViewer::Interface::BodyPartURLHandler
An interface to body part reader link handlers.
Definition: bodyparturlhandler.h:71
MessageViewer::URLHandlerManager
Singleton to manage the list of URLHandlers.
Definition: urlhandlermanager.h:59
MessageViewer::URLHandlerManager::handleContextMenuRequest
bool handleContextMenuRequest(const KUrl &url, const QPoint &p, ViewerPrivate *w=0) const
Definition: urlhandlermanager.cpp:406
MessageViewer::URLHandler
An interface to reader link handlers.
Definition: urlhandler.h:51
MessageViewer::URLHandlerManager::handleDrag
bool handleDrag(const KUrl &url, ViewerPrivate *window=0) const
Definition: urlhandlermanager.cpp:397
MessageViewer::URLHandlerManager::handleClick
bool handleClick(const KUrl &url, ViewerPrivate *w=0) const
Definition: urlhandlermanager.cpp:370
MessageViewer::URLHandlerManager::unregisterHandler
void unregisterHandler(const URLHandler *handler)
Definition: urlhandlermanager.cpp:355
MessageViewer::URLHandlerManager::willHandleDrag
bool willHandleDrag(const KUrl &url, ViewerPrivate *window=0) const
Definition: urlhandlermanager.cpp:387
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal