Logo Search packages:      
Sourcecode: kmess version File versions

void EmoticonTheme::addEmoticon ( const QString &  pictureFile,
const QStringList &  shortcuts 

Create a new emoticon and add it to the theme

Finds out by itself if we're adding a custom emoticon or a standard one.

pictureFile The file name of the emoticon, without path and without extension (will be guessed)
shortcuts A list of text shortcuts which will be translated to the pictureFile image

Definition at line 101 of file emoticontheme.cpp.

References Emoticon::setShortcuts(), and updateCache().

Referenced by createTheme(), and AddEmoticonDialog::slotButtonClicked().

  Emoticon *emoticon;

  if( isCustomTheme_ )
    emoticon = new Emoticon( pictureFile, shortcuts.first(), themePath_ );
    emoticon = new Emoticon( pictureFile, shortcuts.first() );

  emoticon->setShortcuts( shortcuts );

  emoticons_.append( emoticon );

  // Only update the caches if we're adding a new custom emoticon
  if( ! loadingTheme_ && isCustomTheme_ )

Generated by  Doxygen 1.6.0   Back to index