• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KNewStuff

downloadmanager.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2010 Frederik Gladhorn <gladhorn@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Lesser General Public
00006     License as published by the Free Software Foundation; either
00007     version 2.1 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public
00015     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00018 #ifndef KNEWSTUFF3_UI_DownloadManager_H
00019 #define KNEWSTUFF3_UI_DownloadManager_H
00020 
00021 #include "knewstuff_export.h"
00022 #include "entry.h"
00023 
00024 namespace KNS3
00025 {
00026 
00034 class KNEWSTUFF_EXPORT DownloadManager :public QObject
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039     enum SortOrder {
00040         Newest,
00041         Alphabetical,
00042         Rating,
00043         Downloads
00044     };
00045 
00053     explicit DownloadManager(QObject * parent = 0);
00054 
00061     explicit DownloadManager(const QString& configFile, QObject * parent = 0);
00062 
00066     ~DownloadManager();
00067 
00071     void search(int page = 0, int pageSize = 100);
00072     
00077     void checkForUpdates();
00078 
00083     void installEntry(const KNS3::Entry& entry);
00084 
00090     void uninstallEntry(const KNS3::Entry& entry);
00091 
00097     void setSearchTerm(const QString& searchTerm);
00098     
00105     void setSearchOrder(SortOrder order);
00106     
00107 Q_SIGNALS:
00113     void searchResult(const KNS3::Entry::List& entries);
00114     
00120     void entryStatusChanged(const KNS3::Entry& entry);
00121 
00122 private:
00123     Q_PRIVATE_SLOT( d, void _k_slotProvidersLoaded() )
00124     Q_PRIVATE_SLOT( d, void _k_slotEntryStatusChanged(const KNS3::EntryInternal& entry) )
00125     Q_PRIVATE_SLOT( d, void _k_slotEntriesLoaded(const KNS3::EntryInternal::List& entries) )
00126     class Private;
00127     Private *const d;
00128     Q_DISABLE_COPY(DownloadManager)
00129 };
00130 
00131 }
00132 
00133 #endif

KNewStuff

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal