Pages
API Documentation
On this page

KNSCore::Provider Class

Base Provider class. This class is deprecated since 6.9. We strongly advise against using it in new code. More...

  • Header: #include <KNewStuff/Provider>
  • CMake: find_package(KF6 REQUIRED COMPONENTS NewStuff)
    target_link_libraries(mytarget PRIVATE KF6::NewStuff)
  • Inherits: QObject
  • Status: Deprecated since 6.9

List of all members, including inherited members
Deprecated members

Public Types

Properties

Public Functions

Signals

Protected Functions

This class is deprecated since 6.9. We strongly advise against using it in new code.

Detailed Description

This class provides accessors for the provider object.

Note: This class should not be used directly by the application. This class is the base class and will be instantiated for static website providers.

Use ProviderBase to implement providers (only in-tree supported). Use ProviderCore to manage instances of base.

Member Type Documentation

enum Provider::Filter

KNSCore::Provider::Filter

Constant
KNSCore::Provider::None 0
KNSCore::Provider::Installed 1
KNSCore::Provider::Updates 2
KNSCore::Provider::ExactEntryId 3

enum Provider::SortMode

Constant
KNSCore::Provider::Newest 0
KNSCore::Provider::Alphabetical 1
KNSCore::Provider::Rating 2
KNSCore::Provider::Downloads 3

Property Documentation

contactEmail : QString

Access functions:

Notifier signal:

host : QUrl

Access functions:

Notifier signal:

supportsSsl : bool

Access functions:

Notifier signal:

version : QString

Access functions:

Notifier signal:

website : QUrl

Access functions:

Notifier signal:

Member Function Documentation

Provider::Provider()

Constructor.

[signal] void Provider::basicsLoaded()

Fired when the provider's basic information has been fetched and updated

Note: Notifier signal for properties contactEmail, host, supportsSsl, version, and website.

[virtual] void Provider::becomeFan(const KNSCore::Entry &)

[signal] void Provider::categoriesMetadataLoded(const QList<KNSCore::Provider::CategoryMetadata> &categories)

[signal] void Provider::commentsLoaded(const QList<std::shared_ptr<KNSCore::Comment>> comments)

Fired when new comments have been loaded

comments The list of newly loaded comments, in a depth-first order

QString Provider::contactEmail() const

Returns The general contact email for this provider.

Note: Getter function for property contactEmail.

See also setContactEmail()

QStringList Provider::downloadTagFilter() const

Returns the tag filter used for downloads by this provider.

See also EngineBase::setDownloadTagFilter

[signal] void Provider::downloadTagFilterChanged()

[signal] void Provider::entryDetailsLoaded(const KNSCore::Entry &)

QUrl Provider::host() const

Note: Getter function for property host.

See also setHost()

[virtual] QUrl Provider::icon() const

Returns the icon URL for this provider.

See also setIcon()

[pure virtual] QString Provider::id() const

A unique Id for this provider (the url in most cases)

[pure virtual] bool Provider::isInitialized() const

[virtual] void Provider::loadBasics()

Request loading of the basic information for this provider. The engine listens to the basicsLoaded() signal for the result, which is also the signal the respective properties listen to.

This is fired automatically on the first attempt to read one of the properties which contain this basic information, and you will not need to call it as a user of the class (just listen to the properties, which will update when the information has been fetched).

Note: Implementation detail: All subclasses should connect to this signal and point it at a slot which does the actual work, if they support fetching this basic information (if the information is set during construction, you will not need to worry about this).

See also version(), website(), host(), contactEmail(), supportsSsl()

[virtual] void Provider::loadComments(const KNSCore::Entry &, int, int)

Request a loading of comments from this provider. The engine listens to the commentsLoaded() signal for the result

Note: Implementation detail: All subclasses should connect to this signal and point it at a slot which does the actual work, if they support comments.

See also commentsLoaded

[pure virtual] void Provider::loadEntries(const KNSCore::Provider::SearchRequest &request)

Loads the given search and return given page

request defines the search parameters

Note: the engine connects to loadingFinished() signal to get the result

[virtual] void Provider::loadEntryDetails(const KNSCore::Entry &)

[virtual] void Provider::loadPerson(const QString &)

Request loading of the details for a specific person with the given username. The engine listens to the personLoaded() for the result

Note: Implementation detail: All subclasses should connect to this signal and point it at a slot which does the actual work, if they support comments.

[signal] void Provider::loadingFailed(const KNSCore::Provider::SearchRequest &)

[signal] void Provider::loadingFinished(const KNSCore::Provider::SearchRequest &, const KNSCore::Entry::List &)

[virtual] QString Provider::name() const

Returns the common name of the provider.

See also setName()

[signal] void Provider::payloadLinkLoaded(const KNSCore::Entry &)

[signal] void Provider::personLoaded(const std::shared_ptr<KNSCore::Author> author)

Fired when the details of a person have been loaded

author The person we've just loaded data for

[signal] void Provider::providerInitialized(KNSCore::Provider *)

[signal] void Provider::searchPresetsLoaded(const QList<KNSCore::Provider::SearchPreset> &presets)

Fires when the provider has loaded search presets. These represent interesting searches for the user, such as recommendations.

[pure virtual] void Provider::setCachedEntries(const KNSCore::Entry::List &cachedEntries)

void Provider::setContactEmail(const QString &contactEmail)

Sets the general contact email address for this provider.

contactEmail The general contact email for this provider

Note: Setter function for property contactEmail.

See also contactEmail()

void Provider::setDownloadTagFilter(const QStringList &downloadTagFilter)

Sets the tag filter used for download items by this provider

downloadTagFilter The new list of filters

See also downloadTagFilter(), EngineBase::setDownloadTagFilter

void Provider::setHost(const QUrl &host)

Sets the host used for this provider to host.

Note: Setter function for property host.

See also host()

[protected] void Provider::setIcon(const QUrl &icon)

See also icon()

[protected] void Provider::setName(const QString &name)

See also name()

[pure virtual] bool Provider::setProviderXML(const QDomElement &xmldata)

Sets the provider xmldata to initialize the provider. The Provider needs to have it's ID set in this function and cannot change it from there on.

Returns true if successful, or false if the XML data is invalid

void Provider::setSupportsSsl(bool supportsSsl)

Sets whether or not the provider supports SSL connections.

supportsSsl True if the server supports SSL connections, false if not

Note: Setter function for property supportsSsl.

See also supportsSsl()

void Provider::setTagFilter(const QStringList &tagFilter)

Sets the tag filter used for entries by this provider.

tagFilter The new list of filters

See also tagFilter(), EngineBase::setTagFilter

void Provider::setVersion(const QString &version)

Sets the version.

Note: Setter function for property version.

See also version()

void Provider::setWebsite(const QUrl &website)

Sets the website URL.

Note: Setter function for property website.

See also website()

[signal] void Provider::signalError(const QString &)

[signal] void Provider::signalErrorCode(KNSCore::ErrorCode::ErrorCode errorCode, const QString &message, const QVariant &metadata)

[signal] void Provider::signalInformation(const QString &)

bool Provider::supportsSsl() const

Returns True if the server supports SSL connections, false if not

Note: Getter function for property supportsSsl.

See also setSupportsSsl()

QStringList Provider::tagFilter() const

Returns the tag filter used for downloads by this provider.

See also EngineBase::setTagFilter

[signal] void Provider::tagFilterChanged()

[virtual] bool Provider::userCanBecomeFan()

[virtual] bool Provider::userCanVote()

QString Provider::version() const

Note: Getter function for property version.

See also setVersion()

[virtual] void Provider::vote(const KNSCore::Entry &, uint)

QUrl Provider::website() const

Note: Getter function for property website.

See also setWebsite()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.