• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Applets

urlitemlauncher.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2007 Robert Knight <robertknight@gmail.com>
00003     Copyright 2007 Kevin Ottens <ervin@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef URLITEMLAUNCHER_H
00022 #define URLITEMLAUNCHER_H
00023 
00024 #include "core/kickoff_export.h"
00025 
00026 #include <QObject>
00027 #include <solid/storageaccess.h>
00028 
00029 class QModelIndex;
00030 class KUrl;
00031 
00032 namespace Kickoff
00033 {
00034 
00041 class UrlItemHandler
00042 {
00043 public:
00044     virtual ~UrlItemHandler() {}
00045     virtual bool openUrl(const KUrl& url) = 0;
00046 };
00047 
00056 class KICKOFF_EXPORT UrlItemLauncher : public QObject
00057 {
00058     Q_OBJECT
00059 
00060 public:
00061     UrlItemLauncher(QObject *parent = 0);
00062     virtual ~UrlItemLauncher();
00063 
00064     enum HandlerType {
00065         ProtocolHandler,
00066         ExtensionHandler
00067     };
00068     static void addGlobalHandler(HandlerType type,
00069                                  const QString& name,
00070                                  UrlItemHandler *handler);
00071 
00072 public Q_SLOTS:
00074     bool openItem(const QModelIndex& index);
00076     bool openUrl(const QString& url);
00077 
00078 private Q_SLOTS:
00079     void onSetupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
00080 
00081 private:
00082     class Private;
00083     Private * const d;
00084 };
00085 
00086 }
00087 
00088 #endif // URLITEMLAUNCHER_H
00089 

Applets

Skip menu "Applets"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal