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

void AddEmoticonDialog::choosePicture (  ) [private, slot]

Shows a File Selection dialog to choose an image for the new emoticon

Gets the emoticon picture location from the user, using a KFile dialog, putting the pictureEdit_ widget contents as a default, and then replaces the contents of said widget with the result of the file selection dialog.

Definition at line 110 of file addemoticondialog.cpp.

Referenced by AddEmoticonDialog().

{
  KUrl file( pictureEdit_->text() );

  // Choose a file, filtering out all files but the preselected image types
  file = KFileDialog::getImageOpenUrl( file, this );

  if( file.isEmpty() || ! file.isLocalFile() )
  {
    return;
  }

  // Update the text widget, so an update will be issued and the preview will be updated.
  pictureEdit_->setText( file.path() );
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index