KMahjonggBackground Class

The KMahjonggBackground class represents a background. More...

Header: #include <KMahjonggBackground>

Public Functions

QString authorEmailAddress() const
QString authorName() const
QString bugReportUrl() const
QString copyrightText() const
QString description() const
QBrush &getBackground()
bool isPlain() const
QString license() const
bool load(const QString &file, short width, short height)
bool loadDefault()
bool loadGraphics()
QString name() const
QString path() const
void sizeChanged(int newW, int newH)
QString version() const
QString website() const

Detailed Description

This class contains a background and its associated metadata.

Member Function Documentation

QString KMahjonggBackground::authorEmailAddress() const

Returns the email address of the author of this background.

QString KMahjonggBackground::authorName() const

Returns the name of the author of this background.

QString KMahjonggBackground::bugReportUrl() const

Returns the bug report URL of this background.

QString KMahjonggBackground::copyrightText() const

Returns the copyright text of this background.

QString KMahjonggBackground::description() const

Returns the description of this background.

QBrush &KMahjonggBackground::getBackground()

Returns a QBrush created with the background image as its pixmap, or an empty QBrush if isPlain.

bool KMahjonggBackground::isPlain() const

Returns whether this background is plain, that is, whether it has a background image.

QString KMahjonggBackground::license() const

Returns the license of this background.

bool KMahjonggBackground::load(const QString &file, short width, short height)

Loads the background from the filepath file, with width and height unless the configuration specifies a tiled width and height, and returns whether it was successful.

bool KMahjonggBackground::loadDefault()

Loads the default background, QStandardPaths::GenericDataLocation/kmahjongglib/backgrounds/egyptian.desktop, and returns whether it was successful.

bool KMahjonggBackground::loadGraphics()

Loads the graphics from the configured location unless the background isPlain or the graphics were already loaded, and returns whether it was successful.

QString KMahjonggBackground::name() const

Returns the name of this background.

QString KMahjonggBackground::path() const

Returns the file path of this background.

void KMahjonggBackground::sizeChanged(int newW, int newH)

Sets the width and height to newW and newH, unless the background is configured to be tiled or isPlain.

QString KMahjonggBackground::version() const

Returns the version string of this background.

QString KMahjonggBackground::website() const

Returns the website of this background.