KNewStuff
#include <engine.h>
Signals | |
void | jobStarted (KJob *, const QString &) |
void | signalBusy (const QString &) |
void | signalDownloadDialogDone (KNS3::EntryInternal::List) |
void | signalEntriesLoaded (const KNS3::EntryInternal::List &entries) |
void | signalEntryChanged (const KNS3::EntryInternal &entry) |
void | signalEntryDetailsLoaded (const KNS3::EntryInternal &entry) |
void | signalEntryPreviewLoaded (const KNS3::EntryInternal &, KNS3::EntryInternal::PreviewType) |
void | signalEntryUploadFailed () |
void | signalEntryUploadFinished () |
void | signalError (const QString &) |
void | signalIdle (const QString &) |
void | signalMessage (const QString &message) |
void | signalPreviewFailed () |
void | signalProvidersLoaded () |
void | signalResetView () |
void | signalUpdateableEntriesLoaded (const KNS3::EntryInternal::List &entries) |
Public Member Functions | |
Engine (QObject *parent=0) | |
~Engine () | |
void | becomeFan (const EntryInternal &entry) |
QStringList | categories () const |
QStringList | categoriesFilter () const |
void | checkForUpdates () |
void | contactAuthor (const EntryInternal &entry) |
bool | init (const QString &configfile) |
void | install (KNS3::EntryInternal entry, int linkId=1) |
void | loadDetails (const KNS3::EntryInternal &entry) |
void | loadPreview (const KNS3::EntryInternal &entry, EntryInternal::PreviewType type) |
void | reloadEntries () |
void | requestData (int page, int pageSize) |
void | requestMoreData () |
void | setCategoriesFilter (const QStringList &categories) |
void | setSearchTerm (const QString &searchString) |
void | setSortMode (Provider::SortMode mode) |
void | uninstall (KNS3::EntryInternal entry) |
bool | userCanBecomeFan (const EntryInternal &entry) |
bool | userCanVote (const EntryInternal &entry) |
void | vote (const EntryInternal &entry, uint rating) |
Detailed Description
KNewStuff engine.
An engine keeps track of data which is available locally and remote and offers high-level synchronization calls as well as upload and download primitives using an underlying GHNS protocol.
Definition at line 52 of file knewstuff3/core/engine.h.
Constructor & Destructor Documentation
Engine::Engine | ( | QObject * | parent = 0 | ) |
Constructor.
Definition at line 65 of file knewstuff3/core/engine.cpp.
Engine::~Engine | ( | ) |
Destructor.
Frees up all the memory again which might be taken by cached entries and providers.
Definition at line 86 of file knewstuff3/core/engine.cpp.
Member Function Documentation
void Engine::becomeFan | ( | const EntryInternal & | entry | ) |
Definition at line 520 of file knewstuff3/core/engine.cpp.
QStringList Engine::categories | ( | ) | const |
Definition at line 156 of file knewstuff3/core/engine.cpp.
QStringList Engine::categoriesFilter | ( | ) | const |
Definition at line 161 of file knewstuff3/core/engine.cpp.
void Engine::checkForUpdates | ( | ) |
Definition at line 539 of file knewstuff3/core/engine.cpp.
void Engine::contactAuthor | ( | const EntryInternal & | entry | ) |
Try to contact the author of the entry by email or showing their homepage.
Definition at line 487 of file knewstuff3/core/engine.cpp.
Initializes the engine.
This step is application-specific and relies on an external configuration file, which determines all the details about the initialization.
- Parameters
-
configfile KNewStuff2 configuration file (*.knsrc)
- Returns
- true if any valid configuration was found, false otherwise
Definition at line 96 of file knewstuff3/core/engine.cpp.
void Engine::install | ( | KNS3::EntryInternal | entry, |
int | linkId = 1 |
||
) |
Installs an entry's payload file.
This includes verification, if necessary, as well as decompression and other steps according to the application's *.knsrc file.
- Parameters
-
entry Entry to be installed
- Returns
- Whether or not installation was started successfully
- See also
- signalInstallationFinished
- signalInstallationFailed
Definition at line 390 of file knewstuff3/core/engine.cpp.
void Engine::loadDetails | ( | const KNS3::EntryInternal & | entry | ) |
Definition at line 463 of file knewstuff3/core/engine.cpp.
void Engine::loadPreview | ( | const KNS3::EntryInternal & | entry, |
EntryInternal::PreviewType | type | ||
) |
Definition at line 469 of file knewstuff3/core/engine.cpp.
void Engine::reloadEntries | ( | ) |
Definition at line 287 of file knewstuff3/core/engine.cpp.
void Engine::requestData | ( | int | page, |
int | pageSize | ||
) |
Definition at line 372 of file knewstuff3/core/engine.cpp.
void Engine::requestMoreData | ( | ) |
Definition at line 360 of file knewstuff3/core/engine.cpp.
void Engine::setCategoriesFilter | ( | const QStringList & | categories | ) |
Set the categories that will be included in searches.
Definition at line 328 of file knewstuff3/core/engine.cpp.
void Engine::setSearchTerm | ( | const QString & | searchString | ) |
Definition at line 343 of file knewstuff3/core/engine.cpp.
void Engine::setSortMode | ( | Provider::SortMode | mode | ) |
Definition at line 334 of file knewstuff3/core/engine.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
Indicates a message to be added to the ui's log, or sent to a messagebox.
|
signal |
|
signal |
|
signal |
|
signal |
void Engine::uninstall | ( | KNS3::EntryInternal | entry | ) |
Uninstalls an entry.
It reverses the steps which were performed during the installation.
- Parameters
-
entry The entry to deinstall
Definition at line 432 of file knewstuff3/core/engine.cpp.
bool Engine::userCanBecomeFan | ( | const EntryInternal & | entry | ) |
Definition at line 514 of file knewstuff3/core/engine.cpp.
bool Engine::userCanVote | ( | const EntryInternal & | entry | ) |
Definition at line 502 of file knewstuff3/core/engine.cpp.
void Engine::vote | ( | const EntryInternal & | entry, |
uint | rating | ||
) |
Definition at line 508 of file knewstuff3/core/engine.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.