• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KUtils

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
KEmoticonsProvider Class Reference

#include <kemoticonsprovider.h>

Inheritance diagram for KEmoticonsProvider:
QObject AdiumEmoticons KdeEmoticons PidginEmoticons XmppEmoticons

List of all members.

Classes

struct  Emoticon

Public Types

enum  AddEmoticonOption { DoNotCopy, Copy }

Public Member Functions

 KEmoticonsProvider (QObject *parent=0)
virtual ~KEmoticonsProvider ()
virtual bool addEmoticon (const QString &emo, const QString &text, AddEmoticonOption option=DoNotCopy)
virtual void createNew ()
QHash< QChar, QList< Emoticon > > emoticonsIndex () const
QHash< QString, QStringList > emoticonsMap () const
QString fileName () const
virtual bool loadTheme (const QString &path)
virtual bool removeEmoticon (const QString &emo)
virtual void save ()
void setThemeName (const QString &name)
QString themeName () const
QString themePath () const

Protected Member Functions

void addEmoticonIndex (const QString &path, const QStringList &emoList)
void addEmoticonsMap (QString key, QStringList value)
void clearEmoticonsMap ()
void removeEmoticonIndex (const QString &path, const QStringList &emoList)
void removeEmoticonsMap (QString key)

Protected Attributes

KEmoticonsProviderPrivate *const d

Detailed Description

This is the base class for the emoticons provider plugins.

Definition at line 35 of file kemoticonsprovider.h.


Member Enumeration Documentation

enum KEmoticonsProvider::AddEmoticonOption

Options to pass to addEmoticon.

Enumerator:
DoNotCopy 

< Don't copy the emoticon file into the theme directory

Copy 

< Copy the emoticon file into the theme directory

Definition at line 53 of file kemoticonsprovider.h.


Constructor & Destructor Documentation

KEmoticonsProvider::KEmoticonsProvider ( QObject *  parent = 0)
explicit

Default constructor.

Definition at line 45 of file kemoticonsprovider.cpp.

KEmoticonsProvider::~KEmoticonsProvider ( )
virtual

Destructor.

Definition at line 50 of file kemoticonsprovider.cpp.


Member Function Documentation

bool KEmoticonsProvider::addEmoticon ( const QString &  emo,
const QString &  text,
AddEmoticonOption  option = DoNotCopy 
)
virtual

Add the emoticon emo with text text.

Parameters:
emopath to the emoticon image
textthe text of the emoticon separated by space for multiple text
copywhether or not copy emo into the theme directory
Returns:
true if it can add the emoticon

Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.

Definition at line 70 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::addEmoticonIndex ( const QString &  path,
const QStringList &  emoList 
)
protected

Add an emoticon to the index.

Parameters:
pathpath to the emoticon
emoListlist of text associated with this emoticon

Definition at line 135 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::addEmoticonsMap ( QString  key,
QStringList  value 
)
protected

Insert a new item in the emoticons map.

Definition at line 109 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::clearEmoticonsMap ( )
protected

Clears the emoticons map.

Definition at line 104 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::createNew ( )
virtual

Create a new theme.

Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.

Definition at line 126 of file kemoticonsprovider.cpp.

QHash< QChar, QList< KEmoticonsProvider::Emoticon > > KEmoticonsProvider::emoticonsIndex ( ) const

Returns a QHash that contains emoticons indexed by the first char.

Definition at line 130 of file kemoticonsprovider.cpp.

QHash< QString, QStringList > KEmoticonsProvider::emoticonsMap ( ) const

Returns a QHash that contains the emoticons path as keys and the text as values.

Definition at line 121 of file kemoticonsprovider.cpp.

QString KEmoticonsProvider::fileName ( ) const

Returns the file name of the theme.

Definition at line 99 of file kemoticonsprovider.cpp.

bool KEmoticonsProvider::loadTheme ( const QString &  path)
virtual

Load the theme inside the directory path.

Parameters:
pathpath to the directory

Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.

Definition at line 55 of file kemoticonsprovider.cpp.

bool KEmoticonsProvider::removeEmoticon ( const QString &  emo)
virtual

Remove the emoticon emo, this will not delete the image file too.

Parameters:
emothe emoticon text to remove
Returns:
true if it can delete the emoticon

Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.

Definition at line 64 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::removeEmoticonIndex ( const QString &  path,
const QStringList &  emoList 
)
protected

Remove an emoticon from the index.

Parameters:
pathpath to the emoticon
emoListlist of text associated with this emoticon

Definition at line 158 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::removeEmoticonsMap ( QString  key)
protected

Remove an item from the emoticons map.

Definition at line 116 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::save ( )
virtual

Save the emoticon theme.

Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.

Definition at line 80 of file kemoticonsprovider.cpp.

void KEmoticonsProvider::setThemeName ( const QString &  name)

Set the theme name.

Parameters:
namename of the theme

Definition at line 89 of file kemoticonsprovider.cpp.

QString KEmoticonsProvider::themeName ( ) const

Returns the theme name.

Definition at line 84 of file kemoticonsprovider.cpp.

QString KEmoticonsProvider::themePath ( ) const

Returns the theme path.

Definition at line 94 of file kemoticonsprovider.cpp.


Member Data Documentation

KEmoticonsProviderPrivate* const KEmoticonsProvider::d
protected

Private class.

Definition at line 164 of file kemoticonsprovider.h.


The documentation for this class was generated from the following files:
  • kemoticonsprovider.h
  • kemoticonsprovider.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 11:48:53 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KUtils

Skip menu "KUtils"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal