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

tdenewstuff

knewstuff.cpp
00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include <tdeaction.h>
00022 #include <tdeapplication.h>
00023 #include <kdebug.h>
00024 #include <tdelocale.h>
00025 #include <kstandarddirs.h>
00026 
00027 #include "engine.h"
00028 
00029 #include "knewstuff.h"
00030 
00031 using namespace KNS;
00032 
00033 TDEAction* KNS::standardAction(const TQString& what,
00034                              const TQObject *recvr,
00035                              const char *slot, TDEActionCollection* parent,
00036                              const char *name)
00037 {
00038     return new TDEAction(i18n("Download New %1").arg(what), "knewstuff",
00039                        0, recvr, slot, parent, name);
00040 }
00041 
00042 TDENewStuff::TDENewStuff( const TQString &type, TQWidget *parentWidget )
00043 {
00044     mEngine = new Engine( this, type, parentWidget );
00045 }
00046 
00047 TDENewStuff::TDENewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget )
00048 {
00049   mEngine = new Engine( this, type, providerList, parentWidget );
00050 }
00051 
00052 TQString TDENewStuff::type() const
00053 {
00054   return mEngine->type();
00055 }
00056 
00057 TQWidget *TDENewStuff::parentWidget() const
00058 {
00059   return mEngine->parentWidget();
00060 }
00061 
00062 TDENewStuff::~TDENewStuff()
00063 {
00064   delete mEngine;
00065 }
00066 
00067 void TDENewStuff::download()
00068 {
00069   mEngine->download();
00070 }
00071 
00072 TQString TDENewStuff::downloadDestination( Entry * )
00073 {
00074   return TDEGlobal::dirs()->saveLocation( "tmp" ) +
00075          TDEApplication::randomString( 10 );
00076 }
00077 
00078 void TDENewStuff::upload()
00079 {
00080   mEngine->upload();
00081 }
00082 
00083 void TDENewStuff::upload( const TQString &fileName, const TQString previewName )
00084 {
00085   mEngine->upload(fileName, previewName);
00086 }

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.7.6.1
This website is maintained by Timothy Pearson.