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

knewstuff

  • knewstuff
downloaddialog.h
1 /*
2  This file is part of KNewStuff.
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 <knewstuff/provider.h>
25 
26 namespace KIO
27 {
28  class Job;
29 }
30 
31 class KListView;
32 class TQTextBrowser;
33 class TQFrame;
34 class KNewStuffGeneric;
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(KIO::Job *job);
215  void slotData(KIO::Job *job, const TQByteArray &a);
216  void slotInstall();
217  void slotDetails();
218  void slotInstalled(KIO::Job *job);
219  void slotTab();
220  void slotSelected();
221  void slotPage(TQWidget *w);
222  void slotFinish();
223  void slotEmail(const TQString& link);
224 
225  private:
226  void init(Engine *e);
227  Entry *getEntry();
228  void loadProvider(Provider *p);
229  void install(Entry *e);
230  int installStatus(Entry *e);
231  TQListViewItem *currentEntryItem();
232 
233  ProviderLoader *m_loader;
234  TQString m_entryname;
235  KListView *lv_r, *lv_d, *lv_l;
236  TQTextBrowser *m_rt;
237  TQFrame *m_frame;
238  TQListViewItem *m_entryitem;
239  TQPtrList<Entry> m_entries;
240  Entry *m_entry;
241  KNewStuffGeneric *m_s;
242  int m_curtab;
243  TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
244  TQMap<TQWidget*, Provider*> m_providers;
245  TQMap<TQWidget*, TQTextBrowser*> m_rts;
246  TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
247  TQMap<KIO::Job*, Provider*> m_jobs;
248  TQMap<KIO::Job*, TQString> m_data;
249  TQString m_filter;
250  Engine *m_engine;
251  Private *d;
252 };
253 
254 }
255 
256 #endif
257 

knewstuff

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

knewstuff

Skip menu "knewstuff"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for knewstuff by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |