• 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 
26 namespace TDEIO
27 {
28  class Job;
29 }
30 
31 class TDEListView;
32 class TQTextBrowser;
33 class TQFrame;
34 class TDENewStuffGeneric;
35 
36 namespace KNS
37 {
38 
39 class ProviderLoader;
40 class Entry;
41 class Provider;
42 class Engine;
43 
57 class KDE_EXPORT DownloadDialog : public KDialogBase
58 {
59  Q_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) KDE_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::Entry
TDENewStuff data entry container.
Definition: entry.h:45
TDEIO
Definition: downloaddialog.h:26
TDENewStuffGeneric
Basic TDENewStuff class with predefined actions.
Definition: knewstuffgeneric.h:42
KNS::ProviderLoader
TDENewStuff provider loader.
Definition: provider.h:191
KNS
Handles security releated issues, like signing, verifying.
Definition: downloaddialog.h:36
KNS::Engine
Central class combining all possible TDENewStuff operations.
Definition: engine.h:52
KNS::Provider
TDENewStuff provider container.
Definition: provider.h:47
KNS::DownloadDialog
Common download dialog for data browsing and installation.
Definition: downloaddialog.h:57

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdenewstuff by doxygen 1.8.8
This website is maintained by Timothy Pearson.