• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdenewstuff
 

tdenewstuff

  • tdenewstuff
downloaddialog.h
1/*
2 This file is part of TDENewStuff.
3 Copyright (c) 2003 Josef Spillner <spillner@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef KNEWSTUFF_DOWNLOADDIALOG_H
21#define KNEWSTUFF_DOWNLOADDIALOG_H
22
23#include <kdialogbase.h>
24#include <tdenewstuff/provider.h>
25
26namespace TDEIO
27{
28 class Job;
29}
30
31class TDEListView;
32class TQTextBrowser;
33class TQFrame;
34class TDENewStuffGeneric;
35
36namespace KNS
37{
38
39class ProviderLoader;
40class Entry;
41class Provider;
42class Engine;
43
57class TDE_EXPORT DownloadDialog : public KDialogBase
58{
59 TQ_OBJECT
60 struct Private;
61 public:
70 DownloadDialog(Engine *engine, TQWidget *parent, const TQString& caption);
71
79 DownloadDialog(TQWidget *parent, const TQString& caption);
80
84 ~DownloadDialog();
85
91 void setType(TQString type);
92 // ### KDE 4.0: use const TQString&
93
98 void load();
99
108 void setProviderList(const TQString& providerList);
109
118 void load(TQString providerList); // KDE4: merge with load() above
119
126 void addProvider(Provider *p);
127
134 void addEntry(Entry *entry);
135
144 void addEntry(Entry *entry, const TQStringList& variants);
145
150 void clear();
151
159 DownloadDialog(Engine *engine, TQWidget *parent = 0);
160 // ### KDE 4.0: remove and make caption/parent argument optional
161
168 DownloadDialog(TQWidget *parent = 0);
169 // ### KDE 4.0: remove and make caption/parent argument optional
170
180 static void open(const TQString& type, const TQString& caption);
181
191 static void open(TQString type) TDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
192
198 TQPtrList<Entry> installedEntries();
199 // ### KDE 4.0: the open() method should return this
200
201 public slots:
207 void slotProviders(Provider::List *list);
208
209 protected slots:
210 void slotApply();
211 void slotOk();
212
213 private slots:
214 void slotResult(TDEIO::Job *job);
215 void slotData(TDEIO::Job *job, const TQByteArray &a);
216 void slotJobData( TDEIO::Job *, const TQByteArray & );
217 void slotJobResult( TDEIO::Job * );
218 void slotInstall();
219 void slotInstallPhase2();
220 void slotDetails();
221 void slotInstalled(TDEIO::Job *job);
222 void slotTab();
223 void slotSelected();
224 void slotPage(TQWidget *w);
225 void slotFinish();
226 void slotEmail(const TQString& link);
227
228 private:
229 void init(Engine *e);
230 Entry *getEntry();
231 void loadProvider(Provider *p);
232 void install(Entry *e);
233 int installStatus(Entry *e);
234 TQListViewItem *currentEntryItem();
235
236 ProviderLoader *m_loader;
237 TQString m_entryname;
238 TDEListView *lv_r, *lv_d, *lv_l;
239 TQTextBrowser *m_rt;
240 TQFrame *m_frame;
241 TQListViewItem *m_entryitem;
242 TQPtrList<Entry> m_entries;
243 Entry *m_entry;
244 TDENewStuffGeneric *m_s;
245 int m_curtab;
246 TQMap<TQWidget*, TQValueList<TDEListView*>* > m_map;
247 TQMap<TQWidget*, Provider*> m_providers;
248 TQMap<TQWidget*, TQTextBrowser*> m_rts;
249 TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
250 TQMap<TDEIO::Job*, Provider*> m_jobs;
251 TQMap<TDEIO::Job*, TQString> m_data;
252 TQString m_filter;
253 TQString mJobData;
254 Engine *m_engine;
255 Private *d;
256};
257
258}
259
260#endif
261
KNS::DownloadDialog
Common download dialog for data browsing and installation.
Definition: downloaddialog.h:58
KNS::Engine
Central class combining all possible TDENewStuff operations.
Definition: engine.h:53
KNS::Entry
TDENewStuff data entry container.
Definition: entry.h:46
KNS::ProviderLoader
TDENewStuff provider loader.
Definition: provider.h:192
KNS::Provider
TDENewStuff provider container.
Definition: provider.h:48
TDENewStuffGeneric
Basic TDENewStuff class with predefined actions.
Definition: knewstuffgeneric.h:43
KNS
Handles security releated issues, like signing, verifying.
Definition: downloaddialog.h:37

tdenewstuff

Skip menu "tdenewstuff"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdenewstuff

Skip menu "tdenewstuff"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdenewstuff by doxygen 1.9.4
This website is maintained by Timothy Pearson.