korganizer Library API Documentation

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 00035 class Provider 00036 { 00037 public: 00038 typedef QPtrList<Provider> List; 00039 00040 Provider(); 00041 Provider( const QDomElement & ); 00042 ~Provider(); 00043 00044 void setName( const QString & ); 00045 QString name() const; 00046 00047 void setDownloadUrl( const KURL & ); 00048 KURL downloadUrl() const; 00049 00050 void setUploadUrl( const KURL & ); 00051 KURL uploadUrl() const; 00052 00053 void setNoUploadUrl( const KURL & ); 00054 KURL noUploadUrl() const; 00055 00056 void setNoUpload( bool ); 00057 bool noUpload() const; 00058 00059 void setIcon( const KURL & ); 00060 KURL icon() const; 00061 00062 protected: 00063 void parseDomElement( const QDomElement & ); 00064 00065 QDomElement createDomElement( QDomDocument &, QDomElement &parent ); 00066 00067 private: 00068 QString mName; 00069 KURL mDownloadUrl; 00070 KURL mUploadUrl; 00071 KURL mNoUploadUrl; 00072 KURL mIcon; 00073 bool mNoUpload; 00074 }; 00075 00076 class ProviderLoader : public QObject 00077 { 00078 Q_OBJECT 00079 public: 00080 ProviderLoader( QWidget *parentWidget ); 00081 00082 void load( const QString &type ); 00083 00084 signals: 00085 void providersLoaded( Provider::List * ); 00086 00087 protected slots: 00088 void slotJobData( KIO::Job *, const QByteArray & ); 00089 void slotJobResult( KIO::Job * ); 00090 00091 private: 00092 QWidget *mParentWidget; 00093 00094 QString mJobData; 00095 00096 Provider::List mProviders; 00097 }; 00098 00099 } 00100 00101 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003