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

tdenewstuff

  • tdenewstuff
engine.h
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (c) 2014 Timothy Pearson <kb9vqf@pearsoncomputing.net>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#ifndef KNEWSTUFF_ENGINE_H
22#define KNEWSTUFF_ENGINE_H
23
24#include <tqmap.h>
25#include <tqobject.h>
26#include <tqstring.h>
27
28#include "entry.h"
29#include "provider.h"
30
31namespace TDEIO { class Job; }
32
33class TDENewStuff;
34
35namespace KNS {
36
37class DownloadDialog;
38class UploadDialog;
39class ProviderDialog;
40
52class TDE_EXPORT Engine : public TQObject
53{
54 TQ_OBJECT
55 struct Private;
56 public:
64 Engine( TDENewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 );
73 Engine( TDENewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
74
78 virtual ~Engine();
79
85 TQString type() const { return mType; }
86
92 TQWidget *parentWidget() const { return mParentWidget; }
93
98 void download();
99
107 void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null );
108
114 void download( Entry *entry );
115
122 void requestMetaInformation( Provider *provider );
123
129 void upload( Entry *entry );
130
136 void ignoreInstallResult(bool ignore);
137
138 signals:
142 void uploadFinished( bool result );
143 protected slots:
144 void getMetaInformation( Provider::List *providers );
145 void selectUploadProvider( Provider::List *providers );
146
147 void slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data );
148 void slotNewStuffJobResult( TDEIO::Job *job );
149
150 void slotDownloadJobResult( TDEIO::Job *job );
151
152 void slotUploadPayloadJobResult( TDEIO::Job *job );
153 void slotUploadPreviewJobResult (TDEIO::Job *job );
154 void slotUploadMetaJobResult( TDEIO::Job *job );
155
156 protected:
157 bool createMetaFile( Entry * );
158
159 private:
160 TQWidget *mParentWidget;
161
162 ProviderLoader *mProviderLoader;
163
164 TQMap<TDEIO::Job *,TQString> mNewStuffJobData;
165 TQMap<TDEIO::Job *,Provider *> mProviderJobs;
166
167 TQPtrList<Entry> mNewStuffList;
168
169 DownloadDialog *mDownloadDialog;
170 UploadDialog *mUploadDialog;
171 ProviderDialog *mProviderDialog;
172
173 TQString mDownloadDestination;
174
175 Provider *mUploadProvider;
176
177 TQString mUploadMetaFile;
178 TQString mUploadFile;
179 TQString mPreviewFile;
180 TQString mProviderList;
181
182 Private* d;
183
184 TQString mType;
185};
186
187}
188
189#endif
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::Engine::type
TQString type() const
Returns the previously set data type.
Definition: engine.h:85
KNS::Engine::parentWidget
TQWidget * parentWidget() const
Returns the previously set parent widget.
Definition: engine.h:92
KNS::Engine::uploadFinished
void uploadFinished(bool result)
Emitted when the upload has finished.
KNS::Entry
TDENewStuff data entry container.
Definition: entry.h:46
KNS::ProviderDialog
Dialog displaying a list of Hotstuff providers.
Definition: providerdialog.h:44
KNS::ProviderLoader
TDENewStuff provider loader.
Definition: provider.h:192
KNS::Provider
TDENewStuff provider container.
Definition: provider.h:48
KNS::UploadDialog
TDENewStuff file upload dialog.
Definition: uploaddialog.h:48
TDENewStuff
This class provides the functionality to download and upload "new stuff".
Definition: knewstuff.h:70
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.