KEmoticons 5.109.0
kemoticons.h
1/*
2 SPDX-FileCopyrightText: 2008 Carlo Segato <brandon.ml@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef KEMOTICONS_H
8#define KEMOTICONS_H
9
10#include "kemoticons_export.h"
11#include "kemoticonstheme.h"
12
13#include <QObject>
14
15#include <KServiceTypeTrader>
16
17class KEmoticonsPrivate;
18
31class KEMOTICONS_EXPORT KEmoticons : public QObject
32{
33 Q_OBJECT
34public:
35
40
44 ~KEmoticons() override;
45
51
57 KEmoticonsTheme theme(const QString &name) const;
58
62 static QString currentThemeName();
63
67 static QStringList themeList();
68
73 static void setTheme(const KEmoticonsTheme &theme);
74
79 static void setTheme(const QString &theme);
80
96 KEmoticonsTheme newTheme(const QString &name, const KService::Ptr &service);
97
103 QStringList installTheme(const QString &archiveName);
104
108 static void setParseMode(KEmoticonsTheme::ParseMode mode);
109
113 static KEmoticonsTheme::ParseMode parseMode();
114
122 void setPreferredEmoticonSize(const QSize &size);
123
133
134private:
138 const QScopedPointer<KEmoticonsPrivate> d;
139};
140
141#endif /* KEMOTICONS_H */
142
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
static void setTheme(const KEmoticonsTheme &theme)
Sets theme as the current emoticon theme.
KEmoticonsTheme theme() const
Retrieves the current emoticon theme.
static QStringList themeList()
Returns a list of installed emoticon themes.
static void setTheme(const QString &theme)
Sets theme as the current emoticon theme.
~KEmoticons() override
Destructor.
static KEmoticonsTheme::ParseMode parseMode()
Returns the current parse mode.
QStringList installTheme(const QString &archiveName)
Installs all emoticon themes inside the archive archiveName.
void setPreferredEmoticonSize(const QSize &size)
If a preferred size is set, all parsed emoticons will be returned with the size.
KEmoticons()
Default constructor.
static QString currentThemeName()
Retrieves the current emoticon theme name.
static void setParseMode(KEmoticonsTheme::ParseMode mode)
Sets the parse mode to mode.
QSize preferredEmoticonSize() const
Returns size in which parsed emoticons will be returned.
KEmoticonsTheme theme(const QString &name) const
Retrieves the emoticon theme with name name.
KEmoticonsTheme newTheme(const QString &name, const KService::Ptr &service)
Creates a new emoticon theme.