home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / konqsidebarplugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  3.1 KB  |  98 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2001,2002 Joseph Wenninger <jowenn@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19. #ifndef _konqsidebarplugin_h_
  20. #define _konqsidebarplugin_h_
  21. #include <qwidget.h>
  22. #include <qobject.h>
  23. #include <kurl.h>
  24. #include <qstring.h>
  25. #include <kparts/part.h>
  26. #include <kparts/browserextension.h>
  27. #include <kio/job.h>
  28. #include <qguardedptr.h>
  29. #include <kfileitem.h>
  30.  
  31. class KonqSidebarPluginPrivate;
  32.  
  33. class KDE_EXPORT KonqSidebarPlugin : public QObject
  34. {
  35.     Q_OBJECT
  36.     public:
  37.         KonqSidebarPlugin(KInstance *instance,QObject *parent,QWidget *widgetParent,QString &desktopName_, const char* name=0);
  38.         ~KonqSidebarPlugin();
  39.         virtual QWidget *getWidget()=0;
  40.         virtual void *provides(const QString &)=0;
  41.         KInstance *parentInstance();
  42.     protected:
  43.         virtual void handleURL(const KURL &url)=0;
  44.         virtual void handlePreview(const KFileItemList & items);
  45.         virtual void handlePreviewOnMouseOver(const KFileItem &items); //not used yet, perhaps in KDE 3.1
  46.         QString desktopName;
  47.         KInstance* m_parentInstance;
  48.  
  49.     private:
  50.         KonqSidebarPluginPrivate *d;
  51.  
  52.     signals:
  53.         void requestURL(KURL&);
  54.         void started(KIO::Job *);
  55.         void completed();
  56.         void setIcon(const QString& icon);
  57.         void setCaption(const QString& caption);
  58.  
  59.  
  60.     protected:
  61.         bool universalMode();
  62.     public slots:
  63.       void openURL(const KURL& url);
  64.  
  65.       void openPreview(const KFileItemList& items);
  66.  
  67.       void openPreviewOnMouseOver(const KFileItem& item); // not used yet, perhaps KDE 3.1
  68.     /*
  69.         if your plugin supports a setup dialog, instead (replaces the url menu entry in the popup) (not supported yet)
  70.             void setup(QWidget *parent);
  71.  
  72.      */
  73.  
  74.  
  75.     /* signals, which could be, but need not to be added
  76.  
  77.         void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
  78.           void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
  79.  
  80.         void enableAction( const char * name, bool enabled );
  81.  
  82.         void popupMenu( const QPoint &global, const KFileItemList &items );
  83.           void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items );
  84.         void popupMenu( const QPoint &global, const KURL &url,
  85.             const QString &mimeType, mode_t mode = (mode_t)-1 );
  86.         void popupMenu( KXMLGUIClient *client,
  87.             const QPoint &global, const KURL &url,
  88.             const QString &mimeType, mode_t mode = (mode_t)-1 );
  89.  
  90.         void showError(QString &);    //for later extension
  91.         void showMessage(QString &);    //for later extension
  92.  
  93.     */
  94.  
  95. };
  96.  
  97. #endif
  98.