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

knewstuff

  • knewstuff
engine.h
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2002 Cornelius Schumacher <schumacher@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_ENGINE_H
21 #define KNEWSTUFF_ENGINE_H
22 
23 #include <tqmap.h>
24 #include <tqobject.h>
25 #include <tqstring.h>
26 
27 #include "entry.h"
28 #include "provider.h"
29 
30 namespace TDEIO { class Job; }
31 
32 class KNewStuff;
33 
34 namespace KNS {
35 
36 class DownloadDialog;
37 class UploadDialog;
38 class ProviderDialog;
39 
51 class KDE_EXPORT Engine : public TQObject
52 {
53  Q_OBJECT
54  struct Private;
55  public:
63  Engine( KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 );
72  Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
73 
77  virtual ~Engine();
78 
84  TQString type() const { return mType; }
85 
91  TQWidget *parentWidget() const { return mParentWidget; }
92 
97  void download();
98 
106  void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null );
107 
113  void download( Entry *entry );
114 
121  void requestMetaInformation( Provider *provider );
122 
128  void upload( Entry *entry );
129 
135  void ignoreInstallResult(bool ignore);
136 
137  signals:
141  void uploadFinished( bool result );
142  protected slots:
143  void getMetaInformation( Provider::List *providers );
144  void selectUploadProvider( Provider::List *providers );
145 
146  void slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data );
147  void slotNewStuffJobResult( TDEIO::Job *job );
148 
149  void slotDownloadJobResult( TDEIO::Job *job );
150 
151  void slotUploadPayloadJobResult( TDEIO::Job *job );
152  void slotUploadPreviewJobResult (TDEIO::Job *job );
153  void slotUploadMetaJobResult( TDEIO::Job *job );
154 
155  protected:
156  bool createMetaFile( Entry * );
157 
158  private:
159  TQWidget *mParentWidget;
160 
161  ProviderLoader *mProviderLoader;
162 
163  TQMap<TDEIO::Job *,TQString> mNewStuffJobData;
164  TQMap<TDEIO::Job *,Provider *> mProviderJobs;
165 
166  TQPtrList<Entry> mNewStuffList;
167 
168  DownloadDialog *mDownloadDialog;
169  UploadDialog *mUploadDialog;
170  ProviderDialog *mProviderDialog;
171 
172  TQString mDownloadDestination;
173 
174  Provider *mUploadProvider;
175 
176  TQString mUploadMetaFile;
177  TQString mUploadFile;
178  TQString mPreviewFile;
179  TQString mProviderList;
180 
181  Private* d;
182 
183  TQString mType;
184 };
185 
186 }
187 
188 #endif

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
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • knewstuff
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for knewstuff by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.