LibrePCB Developers Documentation
|
Parts information provider & cache. More...
#include <partinformationprovider.h>
Inherits QObject.
Classes | |
struct | Part |
struct | PartInformation |
struct | PartResource |
Signals | |
void | serviceOperational () |
void | providerInfoChanged () |
void | newPartsInformationAvailable () |
Public Member Functions | |
PartInformationProvider (const PartInformationProvider &other) noexcept=delete | |
PartInformationProvider (QObject *parent=nullptr) noexcept | |
~PartInformationProvider () noexcept | |
bool | isOperational () const noexcept |
const QString & | getProviderName () const noexcept |
const QUrl & | getProviderUrl () const noexcept |
const QUrl & | getProviderLogoUrl () const noexcept |
const QPixmap | getProviderLogo () const noexcept |
const QUrl & | getInfoUrl () const noexcept |
void | setCacheDir (const FilePath &dir) noexcept |
void | setApiEndpoint (const QUrl &url) noexcept |
bool | startOperation (int timeoutMs=0) noexcept |
std::shared_ptr< PartInformation > | getPartInfo (const Part &part) noexcept |
std::shared_ptr< PartInformation > | waitForPartInfo (const Part &part, int timeoutMs) noexcept |
bool | isOngoing (const Part &part) const noexcept |
void | scheduleRequest (const Part &part) noexcept |
void | requestScheduledParts () noexcept |
PartInformationProvider & | operator= (const PartInformationProvider &rhs) noexcept=delete |
Static Public Member Functions | |
static PartInformationProvider & | instance () noexcept |
Private Member Functions | |
void | reset () noexcept |
void | requestStatus () noexcept |
void | statusReceived (const QJsonObject &json) noexcept |
void | errorWhileFetchingStatus (const QString &errorMsg) noexcept |
void | partsInformationReceived (const QJsonObject &json) noexcept |
void | errorWhileFetchingPartsInformation (const QString &errorMsg) noexcept |
void | removeOutdatedInformation () noexcept |
void | loadCacheFromDisk () noexcept |
void | saveCacheToDisk () noexcept |
Private Attributes | |
FilePath | mCacheFp |
QScopedPointer< ApiEndpoint > | mEndpoint |
int | mErrorCounter |
bool | mDisabledDueToErrors |
qint64 | mStatusRequestedTimestamp |
bool | mStatusReceived |
QString | mProviderName |
Valid only if mStatusReceived is true More... | |
QUrl | mProviderUrl |
Valid only if mStatusReceived is true More... | |
QUrl | mProviderLogoUrl |
Valid only if mStatusReceived is true More... | |
QPixmap | mProviderLogo |
Requested asynchronously. More... | |
QUrl | mInfoUrl |
Valid only if mStatusReceived is true More... | |
QUrl | mQueryUrl |
Valid only if mStatusReceived is true More... | |
int | mQueryMaxPartCount |
Valid only if mStatusReceived is true More... | |
QVector< Part > | mScheduledParts |
QSet< Part > | mRequestedParts |
QMap< Part, std::shared_ptr< PartInformation > > | mCache |
bool | mCacheModified |
Parts information provider & cache.
To avoid duplicate API requests, received information is cached in the global instance instance().
|
deletenoexcept |
|
explicitnoexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inlinestaticnoexcept |
|
deletenoexcept |
|
signal |
|
signal |
|
signal |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Valid only if mStatusReceived is true
|
private |
Valid only if mStatusReceived is true
|
private |
Valid only if mStatusReceived is true
|
private |
Requested asynchronously.
|
private |
Valid only if mStatusReceived is true
|
private |
Valid only if mStatusReceived is true
|
private |
Valid only if mStatusReceived is true
|
private |
|
private |
|
private |
|
private |