KDE 4.2 PyKDE API Reference

- KDE's Python API

# KEmoticons Class Reference

`from PyKDE4.kutils import *`

Inherits: QObject

## Detailed Description

This class can be used to retrieve, install, create emoticons theme. For example if you want to get the current emoticon theme

     KEmoticons ke;
     KEmoticonsTheme et = ke.theme();
     //do whatever you want with the theme

it can also be used to set the emoticon theme and the parse mode in the config file

Author:
  Carlo Segato (brandon.ml@gmail.com)

## Methods

| __init__ (self)
QStringList | installTheme (self, QString archiveName)
KEmoticonsTheme | newTheme (self, QString name, KService.Ptr service)
KEmoticonsTheme | theme (self)
KEmoticonsTheme | theme (self, QString name)

## Static Methods

QString | currentThemeName ()
KEmoticonsTheme.ParseMode | parseMode ()
| setParseMode (KEmoticonsTheme.ParseMode mode)
| setTheme (KEmoticonsTheme theme)
| setTheme (QString theme)
QStringList | themeList ()

## Method Documentation

__init__ | ( |  | self ) |

Default constructor

QString currentThemeName | ( |  | ) |

Retrieve the current emoticon theme name

QStringList installTheme | ( | self, |
|  | QString | archiveName
| ) |  |  |

Install all themes inside the archive archiveName

Parameters:

  | archiveName | path to the archive

Returns:
  a list of installed themes

KEmoticonsTheme newTheme | ( | self, |
|  | QString | name,
|  | KService.Ptr | service
| ) |  |  |

Create a new emoticons theme

     KEmoticonsTheme theme;
     KService.List srv = KServiceTypeTrader.self()->query("KEmoticons");
     for (int i = 0; i < srv.size(); ++i) {
         // we want to create a kde emoticons theme
         if (srv.at(i)->property("X-KDE-EmoticonsFileName").toString() == "emoticons.xml") {
             theme = KEmoticons().newTheme("test", srv.at(i));
         }
     }

Parameters:

  | name | the name of the new emoticons theme
  | service | the kind of emoticon theme to create

KEmoticonsTheme.ParseMode parseMode | ( |  | ) |

Returns the current parse mode

setParseMode | ( | KEmoticonsTheme.ParseMode | mode
| ) |  |  |

Set the parse mode to mode

setTheme | ( | KEmoticonsTheme | theme
| ) |  |  |

Set theme as the current theme

Parameters:

  | theme | a pointer to a KEmoticonsTheme object

setTheme | ( | QString | theme
| ) |  |  |

Set theme as the current theme

Parameters:

  | theme | the name of a theme

KEmoticonsTheme theme | ( |  | self ) |

Retrieve the current emoticons theme

Returns:
  the current KEmoticonsTheme

KEmoticonsTheme theme | ( | self, |
|  | QString | name
| ) |  |  |

Retrieve the theme with name name

Parameters:

  | name | name of the theme

Returns:
  the KEmoticonsTheme name

QStringList themeList | ( |  | ) |

Returns a list of installed theme