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

KNewStuff

downloaddialog.h

Go to the documentation of this file.
00001 /*
00002     This file is part of KNewStuff.
00003     Copyright (c) 2003 Josef Spillner <spillner@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_DOWNLOADDIALOG_H
00021 #define KNEWSTUFF_DOWNLOADDIALOG_H
00022 
00023 #include <kdialogbase.h>
00024 #include <knewstuff/provider.h>
00025 
00026 namespace KIO
00027 {
00028   class Job;
00029 }
00030 
00031 class KListView;
00032 class QTextBrowser;
00033 class QFrame;
00034 class KNewStuffGeneric;
00035 
00036 namespace KNS
00037 {
00038 
00039 class ProviderLoader;
00040 class Entry;
00041 class Provider;
00042 class Engine;
00043 
00057 class KDE_EXPORT DownloadDialog : public KDialogBase
00058 {
00059     Q_OBJECT
00060     struct Private;
00061   public:
00070     DownloadDialog(Engine *engine, QWidget *parent, const QString& caption);
00071 
00079     DownloadDialog(QWidget *parent, const QString& caption);
00080 
00084     ~DownloadDialog();
00085 
00091     void setType(QString type);
00092     // ### KDE 4.0: use const QString&
00093 
00098     void load();
00099 
00108     void setProviderList(const QString& providerList);
00109 
00118     void load(QString providerList); // KDE4: merge with load() above
00119 
00126     void addProvider(Provider *p);
00127 
00134     void addEntry(Entry *entry);
00135 
00144     void addEntry(Entry *entry, const QStringList& variants);
00145 
00150     void clear();
00151 
00159     DownloadDialog(Engine *engine, QWidget *parent = 0);
00160     // ### KDE 4.0: remove and make caption/parent argument optional
00161 
00168     DownloadDialog(QWidget *parent = 0);
00169     // ### KDE 4.0: remove and make caption/parent argument optional
00170 
00180     static void open(const QString& type, const QString& caption);
00181 
00191     static void open(QString type) KDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
00192 
00198     QPtrList<Entry> installedEntries();
00199     // ### KDE 4.0: the open() method should return this
00200 
00201   public slots:
00207     void slotProviders(Provider::List *list);
00208 
00209   protected slots:
00210     void slotApply();
00211     void slotOk();
00212 
00213   private slots:
00214     void slotResult(KIO::Job *job);
00215     void slotData(KIO::Job *job, const QByteArray &a);
00216     void slotInstall();
00217     void slotDetails();
00218     void slotInstalled(KIO::Job *job);
00219     void slotTab();
00220     void slotSelected();
00221     void slotPage(QWidget *w);
00222     void slotFinish();
00223     void slotEmail(const QString& link);
00224 
00225   private:
00226     void init(Engine *e);
00227     Entry *getEntry();
00228     void loadProvider(Provider *p);
00229     void install(Entry *e);
00230     int installStatus(Entry *e);
00231     QListViewItem *currentEntryItem();
00232 
00233     ProviderLoader *m_loader;
00234     QString m_entryname;
00235     KListView *lv_r, *lv_d, *lv_l;
00236     QTextBrowser *m_rt;
00237     QFrame *m_frame;
00238     QListViewItem *m_entryitem;
00239     QPtrList<Entry> m_entries;
00240     Entry *m_entry;
00241     KNewStuffGeneric *m_s;
00242     int m_curtab;
00243     QMap<QWidget*, QValueList<KListView*>* > m_map;
00244     QMap<QWidget*, Provider*> m_providers;
00245     QMap<QWidget*, QTextBrowser*> m_rts;
00246     QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
00247     QMap<KIO::Job*, Provider*> m_jobs;
00248     QMap<KIO::Job*, QString> m_data;
00249     QString m_filter;
00250     Engine *m_engine;
00251     Private *d;
00252 };
00253 
00254 }
00255 
00256 #endif
00257 

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