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

KNewStuff

provider.h

Go to the documentation of this file.
00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@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 #ifndef KNEWSTUFF_PROVIDER_H
00021 #define KNEWSTUFF_PROVIDER_H
00022 
00023 #include <qcstring.h>
00024 #include <qdom.h>
00025 #include <qobject.h>
00026 #include <qptrlist.h>
00027 #include <qstring.h>
00028 
00029 #include <kurl.h>
00030 
00031 namespace KIO { class Job; }
00032 
00033 namespace KNS {
00034 
00046 class KDE_EXPORT Provider
00047 {
00048   public:
00049     typedef QPtrList<Provider> List;
00050 
00054     Provider();
00055 
00059     Provider( const QDomElement & );
00060 
00064     ~Provider();
00065 
00069     void setName( const QString & );
00070 
00076     QString name() const;
00077 
00081     void setDownloadUrl( const KURL & );
00082 
00088     KURL downloadUrl() const;
00089 
00096     KURL downloadUrlVariant( QString variant ) const;
00097 
00101     void setUploadUrl( const KURL & );
00102 
00108     KURL uploadUrl() const;
00109 
00116     void setNoUploadUrl( const KURL & );
00117 
00124     KURL noUploadUrl() const;
00125 
00129     void setNoUpload( bool );
00130 
00136     bool noUpload() const;
00137 
00143     void setIcon( const KURL & );
00144 
00150     KURL icon() const;
00151 
00152   protected:
00153     void parseDomElement( const QDomElement & );
00154 
00155     QDomElement createDomElement( QDomDocument &, QDomElement &parent );
00156 
00157   private:
00158     QString mName;
00159     KURL mDownloadUrl;
00160     KURL mUploadUrl;
00161     KURL mNoUploadUrl;
00162     KURL mIcon;
00163     bool mNoUpload;
00164 };
00165 
00172 class KDE_EXPORT ProviderLoader : public QObject
00173 {
00174     Q_OBJECT
00175   public:
00181     ProviderLoader( QWidget *parentWidget );
00182 
00192     void load( const QString &type, const QString &providerList = QString::null );
00193 
00194   signals:
00198     void providersLoaded( Provider::List * );
00199 
00200   protected slots:
00201     void slotJobData( KIO::Job *, const QByteArray & );
00202     void slotJobResult( KIO::Job * );
00203 
00204   private:
00205     QWidget *mParentWidget;
00206 
00207     QString mJobData;
00208 
00209     Provider::List mProviders;
00210 };
00211 
00212 }
00213 
00214 #endif

KNewStuff

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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