~ubuntu-branches/debian/sid/kmess/sid

« back to all changes in this revision

Viewing changes to src/emoticonmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-05-26 22:58:41 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090526225841-yx7029u4euscd0f5
Tags: 2.0~beta2-1
* New upstream release 
  - Fixes "the '">' characters appears" (Closes: #530358)
* Add Build-Depends: libgif-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 *
31
31
 * This class maintains the list of the global/standard emoticons.
32
32
 * MSN Messenger uses a fixed set of emoticon/smiley codes and replacements.
33
 
 * The parseEmoticons() method can be used to replace all emoticons in a message.
 
33
 * The rich text parser can be used to replace all emoticons in a message.
34
34
 * To implement a custom search-replace algorithm, use the getPattern() / getReplacements() methods
35
35
 * to retrieve all needed data.
36
36
 *
44
44
  public:  // Public methods
45
45
    // Return the picture file names of all emoticons
46
46
    const QHash<QString,QString> &getFileNames( bool getCustomTheme = false );
 
47
    // Return a QHash to map shortcut to data hash
 
48
    const QHash<QString,QString> &getHashes();
47
49
    // Return the search pattern to find emoticons in an HTML document
48
50
    const QRegExp                &getHtmlPattern( bool getCustomTheme = false );
49
51
    // Return the HTML replacement codes for all emoticons in a theme
50
 
    const QHash<QString,QString> &getHtmlReplacements( bool small = false, bool getCustomTheme = false );
 
52
    const QHash<QString,QString> &getHtmlReplacements( bool isSmall = false, bool getCustomTheme = false );
51
53
    // Return a QStringList of emoticons
52
54
    const QStringList            &getList( bool getCustomTheme );
53
55
    // Return the search pattern to find emoticons in a text
54
56
    const QRegExp                &getPattern( bool getCustomTheme = false );
55
57
    // Return one replacement code for the given emoticon
56
 
    QString                      getReplacement( const QString &code, bool small = false, bool getCustomTheme = false );
 
58
    QString                      getReplacement( const QString &code, bool isSmall = false, bool getCustomTheme = false );
57
59
    // Return the replacement codes for all emoticons in a theme
58
 
    const QHash<QString,QString> &getReplacements( bool small = false, bool getCustomTheme = false );
 
60
    const QHash<QString,QString> &getReplacements( bool isSmall = false, bool getCustomTheme = false );
59
61
    // Return a pointer to the emoticons theme
60
62
    EmoticonTheme                *getTheme( bool getCustomTheme = false );
61
63
    // Return the path where the theme's emoticons are located
62
64
    const QString                &getThemePath( bool getCustomTheme = false );
63
 
    // Replace the standard emoticons in the text with the urls to the emoticon pngs.
64
 
    void                         parseEmoticons( QString &text, bool small = false, bool useCustomTheme = false );
 
65
    // Returns true if a custom emoticon has already been added
 
66
    bool                         emoticonIsAdded( QString dataHash );
65
67
    // Replace the custom emoticon theme with a new one
66
68
    void                         replaceCustomTheme( EmoticonTheme *newTheme );
67
69