downloaddialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00093
00098 void load();
00099
00108 void setProviderList(const QString& providerList);
00109
00118 void load(QString providerList);
00119
00126 void addProvider(Provider *p);
00127
00134 void addEntry(Entry *entry);
00135
00140 void clear();
00141
00151 static void open(const QString& type, const QString& caption);
00152
00160 DownloadDialog(Engine *engine, QWidget *parent = 0);
00161
00162
00169 DownloadDialog(QWidget *parent = 0);
00170
00171
00180 static void open(QString type);
00181
00182
00183 public slots:
00189 void slotProviders(Provider::List *list);
00190
00191 protected slots:
00192 void slotApply();
00193 void slotOk();
00194
00195 private slots:
00196 void slotResult(KIO::Job *job);
00197 void slotData(KIO::Job *job, const QByteArray &a);
00198 void slotInstall();
00199 void slotDetails();
00200 void slotInstalled(KIO::Job *job);
00201 void slotTab(int tab);
00202 void slotSelected();
00203 void slotPage(QWidget *w);
00204 void slotFinish();
00205
00206 private:
00207 void init(Engine *e);
00208 Entry *getEntry();
00209 void loadProvider(Provider *p);
00210 void install(Entry *e);
00211 int installStatus(Entry *e);
00212
00213 ProviderLoader *m_loader;
00214 QString m_entryname;
00215 KListView *lv_r, *lv_d, *lv_l;
00216 QTextBrowser *m_rt;
00217 QFrame *m_frame;
00218 QListViewItem *m_entryitem;
00219 QPtrList<Entry> m_entries;
00220 Entry *m_entry;
00221 KNewStuffGeneric *m_s;
00222 int m_curtab;
00223 QMap<QWidget*, QValueList<KListView*>* > m_map;
00224 QMap<QWidget*, Provider*> m_providers;
00225 QMap<QWidget*, QTextBrowser*> m_rts;
00226 QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
00227 QMap<KIO::Job*, Provider*> m_jobs;
00228 QMap<KIO::Job*, QString> m_data;
00229 QString m_filter;
00230 Engine *m_engine;
00231 Private *d;
00232 };
00233
00234 }
00235
00236 #endif
00237
This file is part of the documentation for knewstuff Library Version 3.4.3.