knewstuff Library: provider.h Source File (knewstuff Library)

| # knewstuff Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# provider.h

    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., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, 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
    00093     void setUploadUrl( const KURL & );
    00094
    00100     KURL uploadUrl() const;
    00101
    00108     void setNoUploadUrl( const KURL & );
    00109
    00116     KURL noUploadUrl() const;
    00117
    00121     void setNoUpload( bool );
    00122
    00128     bool noUpload() const;
    00129
    00135     void setIcon( const KURL & );
    00136
    00142     KURL icon() const;
    00143
    00144   protected:
    00145     void parseDomElement( const QDomElement & );
    00146
    00147     QDomElement createDomElement( QDomDocument &, QDomElement &parent );
    00148
    00149   private:
    00150     QString mName;
    00151     KURL mDownloadUrl;
    00152     KURL mUploadUrl;
    00153     KURL mNoUploadUrl;
    00154     KURL mIcon;
    00155     bool mNoUpload;
    00156 };
    00157
    00164 class KDE_EXPORT ProviderLoader : public QObject
    00165 {
    00166     Q_OBJECT
    00167   public:
    00173     ProviderLoader( QWidget *parentWidget );
    00174
    00184     void load( const QString &type, const QString &providerList = QString::null );
    00185
    00186   signals:
    00190     void providersLoaded( Provider::List * );
    00191
    00192   protected slots:
    00193     void slotJobData( KIO::Job *, const QByteArray & );
    00194     void slotJobResult( KIO::Job * );
    00195
    00196   private:
    00197     QWidget *mParentWidget;
    00198
    00199     QString mJobData;
    00200
    00201     Provider::List mProviders;
    00202 };
    00203
    00204 }
    00205
    00206 #endif

This file is part of the documentation for knewstuff Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:28:34 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003