6 #ifndef SWIFT_MISC_DB_DISTRIBUTION_H
7 #define SWIFT_MISC_DB_DISTRIBUTION_H
11 #include <QVersionNumber>
23 namespace swift::misc::db
32 IndexChannel = CPropertyIndexRef::GlobalIndexCDistribution,
42 CDistribution(
const QString &channel,
int stability,
bool restricted);
48 void setChannel(
const QString &channel);
63 bool hasDownloadUrl()
const;
75 bool isStabilitySameOrBetter(
const CDistribution &otherDistribution)
const;
78 bool isStabilityBetter(
const CDistribution &otherDistribution)
const;
81 bool isEmpty()
const {
return m_channel.isEmpty(); }
84 QString convertToQString(
bool i18n =
false)
const;
87 QString convertToQString(
const QString &separator,
bool i18n =
false)
const;
102 static CDistribution fromDatabaseJson(
const QJsonObject &json,
const QString &prefix = {});
107 bool m_restricted =
false;
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Distributions for channel.
bool isRestricted() const
Restricted channel?
int getStability() const
Stability (higher is more stable)
void setStability(int stability)
Order.
const QString & getChannel() const
Version channel (Alpha, Beta, Stable ..)
bool isEmpty() const
Empty?
void setRestricted(bool r)
Restricted channel.
const network::CUrl & getDownloadUrl() const
Download URL, i.e. here one can download installer.
Class from which a derived class can inherit datastore-related functions.
ColumnIndex
Property index.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...