# class KEmoticonsProvider

###

Module | kutils
Namespace |
Class | KEmoticonsProvider
Inherits | QObject

This is the base class for the emoticons provider plugins

### enums

- AddEmoticonOption { DoNotCopy, Copy }

enum details

### methods

- KEmoticonsProvider (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Default constructor

- addEmoticon (emo, text, option)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  emo | QString |
  text | QString |
  option | KEmoticonsProvider.AddEmoticonOption | KEmoticonsProvider.DoNotCopy

  Add the emoticon emo with text text

  emo - path to the emoticon image

  text - the text of the emoticon separated by space for multiple text

  copy - whether or not copy emo into the theme directory Returns true if it can add the emoticon

- addEmoticonIndex (path, emoList)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  path | QString |
  emoList | QStringList |

  Add an emoticon to the index

  path - path to the emoticon

  emoList - list of text associated with this emoticon

- addEmoticonsMap (key, value)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  key | QString |
  value | QStringList |

  Insert a new item in the emoticons map

- clearEmoticonsMap ( )

  returns Nothing

  Clears the emoticons map

- createNew ( )

  returns Nothing

  Create a new theme

- emoticonsIndex ( )

  returns QHash<QChar,QList<KEmoticonsProvider::Emoticon>>
  KDE 4.1.0 and later only

  Returns a QHash that contains emoticons indexed by the first char

- emoticonsMap ( )

  returns QHash<QString,QStringList>

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

- fileName ( )

  returns QString

  Returns the file name of the theme

- loadTheme (path)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  path | QString |

  Load the theme inside the directory path

  path - path to the directory

- removeEmoticon (emo)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  emo | QString |

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

  emo - the emoticon text to remove Returns true if it can delete the emoticon

- removeEmoticonIndex (path, emoList)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  path | QString |
  emoList | QStringList |

  Remove an emoticon from the index

  path - path to the emoticon

  emoList - list of text associated with this emoticon

- removeEmoticonsMap (key)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  key | QString |

  Remove an item from the emoticons map

- save ( )

  returns Nothing

  Save the emoticon theme

- setThemeName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Set the theme name

  name - name of the theme

- themeName ( )

  returns QString

  Returns the theme name

- themePath ( )

  returns QString

  Returns the theme path

### enums - detail

- AddEmoticonOption { DoNotCopy, Copy }

  | DoNotCopy | - | - |
  | Copy | - | - |