Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void AddEmoticonDialog::preSelect ( QString  pictureName,
QString  shortcut 

Preselects a file name and an emoticon shortcut in the dialog

pictureName Full path to the file that will be added
code Emoticon shortcut to preselect

Definition at line 164 of file addemoticondialog.cpp.

Referenced by ChatView::slotAddNewEmoticon().

  // Select the image. Disable the field also to avoid messing up with the name.
  interface_->pictureEdit_->setText( pictureName );
  interface_->pictureEdit_->setEnabled( false );
  interface_->browseButton_->setEnabled( false );

  // Select the shortcut, and save it so later we can tell everyone we've added this particular emoticon
  preselectedShortcut_ = shortcut;

  // HTML-Decode the shortcut, more thoroughly as possible, to show it to the user like the original one was.
  // Neither KDE nor Qt have HTML to text decoding methods. Annoying.
  shortcut.replace( """, "\"" )
          .replace( "'", "'" )
          .replace( ">", ">" )
          .replace( "&lt;", "<" )
          .replace( "&amp;", "&" );

  // Select the shortcut
  interface_->shortcutEdit_->setText( shortcut );

Generated by  Doxygen 1.6.0   Back to index