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

knewstuff

  • knewstuff
knewstuff.cpp
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 
21 #include <kaction.h>
22 #include <kapplication.h>
23 #include <kdebug.h>
24 #include <klocale.h>
25 #include <kstandarddirs.h>
26 
27 #include "engine.h"
28 
29 #include "knewstuff.h"
30 
31 using namespace KNS;
32 
33 KAction* KNS::standardAction(const TQString& what,
34  const TQObject *recvr,
35  const char *slot, KActionCollection* parent,
36  const char *name)
37 {
38  return new KAction(i18n("Download New %1").arg(what), "knewstuff",
39  0, recvr, slot, parent, name);
40 }
41 
42 KNewStuff::KNewStuff( const TQString &type, TQWidget *parentWidget )
43 {
44  mEngine = new Engine( this, type, parentWidget );
45 }
46 
47 KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget )
48 {
49  mEngine = new Engine( this, type, providerList, parentWidget );
50 }
51 
52 TQString KNewStuff::type() const
53 {
54  return mEngine->type();
55 }
56 
57 TQWidget *KNewStuff::parentWidget() const
58 {
59  return mEngine->parentWidget();
60 }
61 
62 KNewStuff::~KNewStuff()
63 {
64  delete mEngine;
65 }
66 
67 void KNewStuff::download()
68 {
69  mEngine->download();
70 }
71 
72 TQString KNewStuff::downloadDestination( Entry * )
73 {
74  return KGlobal::dirs()->saveLocation( "tmp" ) +
75  KApplication::randomString( 10 );
76 }
77 
78 void KNewStuff::upload()
79 {
80  mEngine->upload();
81 }
82 
83 void KNewStuff::upload( const TQString &fileName, const TQString previewName )
84 {
85  mEngine->upload(fileName, previewName);
86 }

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.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |