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 public:
00068 DownloadDialog(Engine *engine, QWidget *parent = 0);
00069
00076 DownloadDialog(QWidget *parent = 0);
00077
00081 ~DownloadDialog();
00082
00088 void setType(QString type);
00089
00094 void load();
00095
00102 void addProvider(Provider *p);
00103
00110 void addEntry(Entry *entry);
00111
00116 void clear();
00117
00126 static void open(QString type);
00127
00128 public slots:
00134 void slotProviders(Provider::List *list);
00135
00136 protected slots:
00137 void slotApply();
00138 void slotOk();
00139
00140 private slots:
00141 void slotResult(KIO::Job *job);
00142 void slotData(KIO::Job *job, const QByteArray &a);
00143 void slotInstall();
00144 void slotDetails();
00145 void slotInstalled(KIO::Job *job);
00146 void slotTab(int tab);
00147 void slotSelected();
00148 void slotPage(QWidget *w);
00149 void slotFinish();
00150
00151 private:
00152 void init(Engine *e);
00153 Entry *getEntry();
00154 void loadProvider(Provider *p);
00155 void install(Entry *e);
00156 int installStatus(Entry *e);
00157
00158 ProviderLoader *m_loader;
00159 QString m_entryname;
00160 KListView *lv_r, *lv_d, *lv_l;
00161 QTextBrowser *m_rt;
00162 QFrame *m_frame;
00163 QListViewItem *m_entryitem;
00164 QPtrList<Entry> m_entries;
00165 Entry *m_entry;
00166 KNewStuffGeneric *m_s;
00167 int m_curtab;
00168 QMap<QWidget*, QValueList<KListView*>* > m_map;
00169 QMap<QWidget*, Provider*> m_providers;
00170 QMap<QWidget*, QTextBrowser*> m_rts;
00171 QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
00172 QMap<KIO::Job*, Provider*> m_jobs;
00173 QMap<KIO::Job*, QString> m_data;
00174 QString m_filter;
00175 Engine *m_engine;
00176 QWidget *m_page;
00177 };
00178
00179 }
00180
00181 #endif
00182
This file is part of the documentation for knewstuff Library Version 3.3.90.