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
00044 class DownloadDialog : public KDialogBase
00045 {
00046 Q_OBJECT
00047 public:
00048 DownloadDialog(Engine *engine, QWidget *parent = 0);
00049 DownloadDialog(QWidget *parent = 0);
00050 ~DownloadDialog();
00051 void setType(QString type);
00052 void load();
00053
00054 void addProvider(Provider *p);
00055 void addEntry(Entry *entry);
00056 void clear();
00057
00058 static void open(QString type);
00059
00060 public slots:
00061 void slotProviders(Provider::List *list);
00062
00063 protected slots:
00064 void slotApply();
00065 void slotOk();
00066
00067 private slots:
00068 void slotResult(KIO::Job *job);
00069 void slotData(KIO::Job *job, const QByteArray &a);
00070 void slotInstall();
00071 void slotDetails();
00072 void slotInstalled(KIO::Job *job);
00073 void slotTab(int tab);
00074 void slotSelected();
00075 void slotPage(QWidget *w);
00076 void slotFinish();
00077
00078 private:
00079 void init(Engine *e);
00080 Entry *getEntry();
00081 void loadProvider(Provider *p);
00082 void install(Entry *e);
00083
00084 ProviderLoader *m_loader;
00085 QString m_entryname;
00086 KListView *lv_r, *lv_d, *lv_l;
00087 QTextBrowser *m_rt;
00088 QFrame *m_frame;
00089 QListViewItem *m_entryitem;
00090 QPtrList<Entry> m_entries;
00091 Entry *m_entry;
00092 KNewStuffGeneric *m_s;
00093 int m_curtab;
00094 QMap<QWidget*, QValueList<KListView*>* > m_map;
00095 QMap<QWidget*, Provider*> m_providers;
00096 QMap<QWidget*, QTextBrowser*> m_rts;
00097 QMap<KIO::Job*, Provider*> m_jobs;
00098 QMap<KIO::Job*, QString> m_data;
00099 QString m_filter;
00100 Engine *m_engine;
00101 };
00102
00103 }
00104
00105 #endif
00106
This file is part of the documentation for korganizer Library Version 3.2.2.