GrantleeTheme::Theme Class

The Theme class. More...

Header: #include <GrantleeTheme/Theme>
CMake: find_package(KPim6 REQUIRED COMPONENTS GrantleeTheme)
target_link_libraries(mytarget PRIVATE KPim6::GrantleeTheme)

Public Functions

Theme()
Theme(const GrantleeTheme::Theme &other)
~Theme()
QString absolutePath() const
void addThemePath(const QString &path)
QString author() const
QString authorEmail() const
QString description() const
QString dirName() const
QStringList displayExtraVariables() const
bool isValid() const
QString name() const
QString render(const QString &templateName, const QVariantHash &data, const QByteArray &applicationDomain = QByteArray())
QString themeFilename() const
GrantleeTheme::Theme &operator=(const GrantleeTheme::Theme &other)
bool operator==(const GrantleeTheme::Theme &other) const

Static Public Members

void addPluginPath(const QString &path)

Detailed Description

Member Function Documentation

[explicit] Theme::Theme()

Constructs an empty Theme object.

Theme::Theme(const GrantleeTheme::Theme &other)

Copy constructor. other The Theme to copy

[noexcept] Theme::~Theme()

Destroys the Theme object.

QString Theme::absolutePath() const

Returns the absolute path to the theme directory. Returns The absolute path

[static] void Theme::addPluginPath(const QString &path)

Adds a plugin path for theme plugins. path The plugin path to add

void Theme::addThemePath(const QString &path)

Adds a path where theme files are located. path The theme path to add

QString Theme::author() const

Returns the author of the theme. Returns The author name

QString Theme::authorEmail() const

Returns the email address of the theme author. Returns The author's email address

QString Theme::description() const

Returns the description of the theme. Returns The theme description

QString Theme::dirName() const

Returns the directory name of the theme. Returns The directory name

QStringList Theme::displayExtraVariables() const

Returns a list of extra variables displayed by the theme. Returns A list of extra variable names

bool Theme::isValid() const

Checks if this Theme object is valid. Returns true if the theme is valid, false otherwise

QString Theme::name() const

Returns the name of the theme. Returns The theme name

QString Theme::render(const QString &templateName, const QVariantHash &data, const QByteArray &applicationDomain = QByteArray())

Renders the specified template with the given data. templateName The name of the template to render data A hash of variable names and their values applicationDomain Optional translation domain for localization Returns The rendered template output

QString Theme::themeFilename() const

Returns the filename of the theme desktop file. Returns The theme filename

GrantleeTheme::Theme &Theme::operator=(const GrantleeTheme::Theme &other)

Assigns the given Theme to this object. other The Theme to assign Returns A reference to this Theme object

bool Theme::operator==(const GrantleeTheme::Theme &other) const

Compares two Theme objects for equality. other The Theme to compare with Returns true if themes are equal, false otherwise