PluginMetadata
This container class might be filled with plugin metadata such as:
Authors (and affiliations)
References to publications
Copyright information
License text
Qualified name: mv::plugin::PluginMetadata
-
class PluginMetadata : public QObject
Plugin metadata plugin class.
Contains plugin properties
- Author
T. Kroes
Public Functions
-
PluginMetadata(const PluginFactory &pluginFactory)
Construct with reference to parent
pluginFactory.- Parameters:
pluginFactory – Reference to parent plugin factory
-
QString getGuiName() const
Get the menu name of the plugin.
-
void setGuiName(const QString &guiName)
Set the GUI name of the plugin.
- Parameters:
guiName – GUI name of the plugin
-
void setVersion(const util::Version &version)
Set the plugin version to
version.- Parameters:
version – Plugin semantic version
-
QString getDescription() const
Get description.
- Returns:
String that shortly describes the plugin
-
void setDescription(const QString &description)
Set description to
description.- Parameters:
description – String that shortly describes the plugin
-
bool hasDescription() const
Get whether the plugin has a description or not.
- Returns:
Boolean determining whether the plugin has a description or not
-
QString getSummary() const
Get summary.
- Returns:
Elaborate description of the plugin
-
void setSummary(const QString &summary)
Set summary to
summary.- Parameters:
summary – Elaborate description of the plugin
-
bool hasSummary() const
Get whether the plugin has a summary or not.
- Returns:
Boolean determining whether the plugin has a summary or not
-
Authors getAuthors() const
Get authors.
- Returns:
Authors that created and maintain the plugin
-
void setAuthors(const Authors &authors)
Set authors to
authors.- Parameters:
authors – Authors that created and maintain the plugin
-
bool hasAuthors() const
Get whether the plugin has authors assigned or not.
- Returns:
Boolean determining whether the plugin has authors assigned or not
-
Organizations getOrganizations() const
Get organizations.
- Returns:
Organizations that created and maintain the plugin
-
void setOrganizations(const Organizations &organizations)
Set organizations to
organizations.- Parameters:
organizations – Organizations that created and maintain the plugin
-
bool hasOrganizations() const
Get whether the plugin has organizations assigned or not.
- Returns:
Boolean determining whether the plugin has organizations assigned or not
-
QString getCopyrightHolder() const
Get copyright holder.
- Returns:
Copyright holder
-
void setCopyrightHolder(const QString ©rightHolder)
Set copyright holder to
copyrightHolder.- Parameters:
copyrightHolder – Copyright holder
-
bool hasCopyrightHolder() const
Get whether the plugin has a copyright holder or not.
- Returns:
Boolean determining whether the plugin has a copyright holder or not
-
QString getLicenseText() const
Get license text.
- Returns:
License text
-
void setLicenseText(const QString &licenseText)
Set license text to
licenseText.- Parameters:
licenseText – License text
-
bool hasLicenseText() const
Get whether the plugin has a license text or not.
- Returns:
Boolean determining whether the plugin has a license text or not
-
QString getAboutMarkdown() const
Get about text in Markdown format.
- Returns:
About text in Markdown format. When set, it overrides the standardized about Markdown generated from summary, authors and copyright notice.
-
void setAboutMarkdown(const QString &aboutMarkdown)
Set about text to
aboutMarkdown.- Parameters:
aboutMarkdown – About text in Markdown format. When set, it overrides the standardized about Markdown generated from summary, authors and copyright notice.
-
bool hasAboutMarkdown() const
Get whether the plugin has about Markdown or not.
- Returns:
Boolean determining whether the plugin has about Markdown or not
-
util::ShortcutMap &getShortcutMap()
Get shortcut map.
- Returns:
Reference to the shortcut map
-
const util::ShortcutMap &getShortcutMap() const
Get shortcut map.
- Returns:
Const reference to the shortcut map
-
void guiNameChanged(const QString &previousGuiName, const QString ¤tGuiName)
Signals that the plugin GUI name changed from
previousGuiNametocurrentGuiName.- Parameters:
previousGuiName – Previous GUI name
currentGuiName – Current GUI name
-
void versionChanged(const util::Version &previousVersion, const util::Version ¤tVersion)
Signals that the version changed from
previousVersiontocurrentVersion.- Parameters:
previousVersion – Previous version
currentVersion – Current version
-
void descriptionChanged(const QString &previousDescription, const QString ¤tDescription)
Signals that the description changed from
previousDescriptiontocurrentDescription.- Parameters:
previousDescription – Previous description
currentDescription – Current description
-
void summaryChanged(const QString &previousSummary, const QString ¤tSummary)
Signals that the summary changed from
previousSummarytocurrentSummary.- Parameters:
previousSummary – Previous summary
currentSummary – Current summary
-
void authorsChanged(const Authors &previousAuthors, const Authors ¤tAuthors)
Signals that the authors changed from
previousAuthorstocurrentAuthors.- Parameters:
previousAuthors – Previous authors
currentAuthors – Current authors
-
void organizationsChanged(const Organizations &previousOrganizations, const Organizations ¤tOrganizations)
Signals that the organizations changed from
previousOrganizationstocurrentOrganizations.- Parameters:
previousOrganizations – Previous organizations
currentOrganizations – Current organizations
-
void copyrightHolderChanged(const QString &previousCopyrightHolder, const QString ¤tCopyrightHolder)
Signals that the copyright holder changed from
previousCopyrightHoldertocurrentCopyrightHolder.- Parameters:
previousCopyrightHolder – Previous copyright holder
currentCopyrightHolder – Current copyright holder
-
void licenseTextChanged(const QString &previousLicenseText, const QString ¤tLicenseText)
Signals that the license text changed from
previousLicenseTexttocurrentLicenseText.- Parameters:
previousLicenseText – Previous license text
currentLicenseText – Current license text
-
void aboutMarkdownChanged(const QString &previousAboutMarkdown, const QString ¤tAboutMarkdown)
Signals that the about text in Markdown format changed from
previousAboutMarkdowntocurrentAboutMarkdown.- Parameters:
previousAboutMarkdown – Previous about text in Markdown format
currentAboutMarkdown – Current about text in Markdown format
-
struct Author : protected mv::plugin::PluginMetadata::FormattedItem
Author formatted item for use in auto-generated about Markdown.
Public Functions
-
inline Author(const QString &name, const QStringList &roles = QStringList(), const QStringList &organizationNames = QStringList(), const QString &externalLink = QString())
Construct with
name,description,externalLinkandorganizations.- Parameters:
name – Item name
roles – Assumed roles
organizationNames – Names of the affiliated organizations
externalLink – External link (e.g. profile website or e-mail address)
-
inline QString toString(const Organizations &organizations) const
Convert to string.
- Parameters:
organizations – Organizations list
- Returns:
Markdown formatted string
Public Members
-
QStringList _roles
Affiliated organizations.
-
inline Author(const QString &name, const QStringList &roles = QStringList(), const QStringList &organizationNames = QStringList(), const QString &externalLink = QString())
-
struct FormattedItem
Formatted item for use in auto-generated about Markdown.
Subclassed by mv::plugin::PluginMetadata::Author, mv::plugin::PluginMetadata::Organization
Public Functions
-
inline FormattedItem(const QString &name, const QString &description, const QString &externalLink)
Construct with
name,descriptionandexternalLink.- Parameters:
name – Item name
description – Item description
externalLink – External link
-
inline QString toString() const
Convert to string.
- Returns:
Markdown formatted string
-
inline bool operator==(const FormattedItem &rhs) const
Equality operator.
- Parameters:
rhs – Right-hand-side formatted item
- Returns:
Whether this formatted item and
rhsformatted item are the same
-
inline bool operator!=(const FormattedItem &rhs) const
Inequality operator.
- Parameters:
rhs – Right-hand-side formatted item
- Returns:
Whether this formatted item and
rhsformatted item are not the same
-
inline FormattedItem(const QString &name, const QString &description, const QString &externalLink)
-
struct Organization : public mv::plugin::PluginMetadata::FormattedItem
Organization formatted item for use in auto-generated about Markdown.