This class can be used to retrieve, install, create emoticons theme.
More...
#include <kemoticons.h>
|
static QString | currentThemeName () |
| Retrieves the current emoticon theme name.
|
|
static KEmoticonsTheme::ParseMode | parseMode () |
| Returns the current parse mode.
|
|
static void | setParseMode (KEmoticonsTheme::ParseMode mode) |
| Sets the parse mode to mode .
|
|
static void | setTheme (const KEmoticonsTheme &theme) |
| Sets theme as the current emoticon theme.
|
|
static void | setTheme (const QString &theme) |
| Sets theme as the current emoticon theme.
|
|
static QStringList | themeList () |
| Returns a list of installed emoticon themes.
|
|
This class can be used to retrieve, install, create emoticons theme.
For example, if you want to get the current emoticon theme
This class contains the emoticons theme.
Definition kemoticonstheme.h:23
This class can be used to retrieve, install, create emoticons theme.
Definition kemoticons.h:32
KEmoticonsTheme theme() const
Retrieves the current emoticon theme.
It can also be used to set the emoticon theme and the parse mode in the config file
- Author
- Carlo Segato (brand.nosp@m.on.m.nosp@m.l@gma.nosp@m.il.c.nosp@m.om)
◆ KEmoticons()
KEmoticons::KEmoticons |
( |
| ) |
|
◆ ~KEmoticons()
KEmoticons::~KEmoticons |
( |
| ) |
|
|
override |
◆ currentThemeName()
static QString KEmoticons::currentThemeName |
( |
| ) |
|
|
static |
Retrieves the current emoticon theme name.
◆ installTheme()
QStringList KEmoticons::installTheme |
( |
const QString & |
archiveName | ) |
|
Installs all emoticon themes inside the archive archiveName
.
- Parameters
-
archiveName | path to the archive |
- Returns
- a list of installed themes
◆ newTheme()
KEmoticonsTheme KEmoticons::newTheme |
( |
const QString & |
name, |
|
|
const KService::Ptr & |
service |
|
) |
| |
Creates a new emoticon theme.
KService::List srv = KServiceTypeTrader::self()->query("KEmoticons");
for (int i = 0; i < srv.size(); ++i) {
if (srv.at(i)->property("X-KDE-EmoticonsFileName").toString() == "emoticons.xml") {
}
}
KEmoticonsTheme newTheme(const QString &name, const KService::Ptr &service)
Creates a new emoticon theme.
- Parameters
-
name | the name of the new emoticon theme |
service | the kind of emoticon theme to create |
◆ parseMode()
static KEmoticonsTheme::ParseMode KEmoticons::parseMode |
( |
| ) |
|
|
static |
Returns the current parse mode.
◆ preferredEmoticonSize()
QSize KEmoticons::preferredEmoticonSize |
( |
| ) |
const |
Returns size in which parsed emoticons will be returned.
If the QSize returned is not valid (isValid() == false), then the default will be used, that is the actual file size.
- Since
- 5.23
◆ setParseMode()
static void KEmoticons::setParseMode |
( |
KEmoticonsTheme::ParseMode |
mode | ) |
|
|
static |
Sets the parse mode to mode
.
◆ setPreferredEmoticonSize()
void KEmoticons::setPreferredEmoticonSize |
( |
const QSize & |
size | ) |
|
If a preferred size is set, all parsed emoticons will be returned with the size
.
- Parameters
-
size | The desired QSize of parsed emoticons |
- Since
- 5.23
◆ setTheme() [1/2]
Sets theme
as the current emoticon theme.
- Parameters
-
◆ setTheme() [2/2]
static void KEmoticons::setTheme |
( |
const QString & |
theme | ) |
|
|
static |
Sets theme
as the current emoticon theme.
- Parameters
-
◆ theme() [1/2]
◆ theme() [2/2]
Retrieves the emoticon theme with name name
.
- Parameters
-
- Returns
- the KEmoticonsTheme with name
name
◆ themeList()
static QStringList KEmoticons::themeList |
( |
| ) |
|
|
static |
Returns a list of installed emoticon themes.