6#include <score_lib_base_export.h>
46 static QString folder();
48 static int installedVersion();
56 double progress() const noexcept {
return m_progress; }
57 const QString& error() const noexcept {
return m_error; }
60 void setAvailable(
int version, qint64 bytes);
62 void setInstaller(std::function<
void()> installer);
64 bool canInstall() const noexcept {
return bool(m_installer); }
69 void setProgress(qint64 received, qint64 total);
70 void setFinished(
bool ok,
const QString& error = {});
75 void addView() noexcept { m_views++; }
76 void removeView() noexcept { m_views--; }
80 bool reportedInView() const noexcept {
return m_installing && m_fromView && m_views > 0; }
82 void changed() E_SIGNAL(SCORE_LIB_BASE_EXPORT, changed)
87 std::function<
void()> m_installer;
90 double m_progress{-1.};
Whether the default library package is installed, and up to date.
Definition DefaultLibrary.hpp:28
bool reportedInView() const noexcept
Definition DefaultLibrary.hpp:80
qint64 downloadSize() const noexcept
In bytes, 0 when unknown.
Definition DefaultLibrary.hpp:54
int availableVersion() const noexcept
-1 until the package list has been fetched.
Definition DefaultLibrary.hpp:52
double progress() const noexcept
Between 0 and 1 while installing, negative when the total is unknown.
Definition DefaultLibrary.hpp:56
bool offeredInView() const noexcept
Definition DefaultLibrary.hpp:74
Utilities for OSSIA data structures.
Definition DeviceInterface.hpp:35
Base toolkit upon which the software is built.
Definition Application.cpp:83