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::Engine | ( | QObject * | parent = 0 | ) |
Constructor.
Definition at line 65 of file knewstuff3/core/engine.cpp.
§ ~Engine()
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
§ becomeFan()
void Engine::becomeFan | ( | const EntryInternal & | entry | ) |
Definition at line 520 of file knewstuff3/core/engine.cpp.
§ categories()
QStringList Engine::categories | ( | ) | const |
Definition at line 156 of file knewstuff3/core/engine.cpp.
§ categoriesFilter()
QStringList Engine::categoriesFilter | ( | ) | const |
Definition at line 161 of file knewstuff3/core/engine.cpp.
§ checkForUpdates()
void Engine::checkForUpdates | ( | ) |
Definition at line 539 of file knewstuff3/core/engine.cpp.
§ contactAuthor()
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.
§ init()
bool Engine::init | ( | const QString & | configfile | ) |
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.
§ install()
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.
§ jobStarted
|
signal |
§ loadDetails()
void Engine::loadDetails | ( | const KNS3::EntryInternal & | entry | ) |
Definition at line 463 of file knewstuff3/core/engine.cpp.
§ loadPreview()
void Engine::loadPreview | ( | const KNS3::EntryInternal & | entry, |
EntryInternal::PreviewType | type | ||
) |
Definition at line 469 of file knewstuff3/core/engine.cpp.
§ reloadEntries()
void Engine::reloadEntries | ( | ) |
Definition at line 287 of file knewstuff3/core/engine.cpp.
§ requestData()
void Engine::requestData | ( | int | page, |
int | pageSize | ||
) |
Definition at line 372 of file knewstuff3/core/engine.cpp.
§ requestMoreData()
void Engine::requestMoreData | ( | ) |
Definition at line 360 of file knewstuff3/core/engine.cpp.
§ setCategoriesFilter()
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.
§ setSearchTerm()
void Engine::setSearchTerm | ( | const QString & | searchString | ) |
Definition at line 343 of file knewstuff3/core/engine.cpp.
§ setSortMode()
void Engine::setSortMode | ( | Provider::SortMode | mode | ) |
Definition at line 334 of file knewstuff3/core/engine.cpp.
§ signalBusy
|
signal |
§ signalDownloadDialogDone
|
signal |
§ signalEntriesLoaded
|
signal |
§ signalEntryChanged
|
signal |
§ signalEntryDetailsLoaded
|
signal |
§ signalEntryPreviewLoaded
|
signal |
§ signalEntryUploadFailed
|
signal |
§ signalEntryUploadFinished
|
signal |
§ signalError
|
signal |
§ signalIdle
|
signal |
§ signalMessage
|
signal |
Indicates a message to be added to the ui's log, or sent to a messagebox.
§ signalPreviewFailed
|
signal |
§ signalProvidersLoaded
|
signal |
§ signalResetView
|
signal |
§ signalUpdateableEntriesLoaded
|
signal |
§ uninstall()
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.
§ userCanBecomeFan()
bool Engine::userCanBecomeFan | ( | const EntryInternal & | entry | ) |
Definition at line 514 of file knewstuff3/core/engine.cpp.
§ userCanVote()
bool Engine::userCanVote | ( | const EntryInternal & | entry | ) |
Definition at line 502 of file knewstuff3/core/engine.cpp.
§ vote()
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-2016 The KDE developers.
Generated on Wed Oct 19 2016 23:29:20 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.