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

QString ThumbnailProvider::getImageTag ( const QString &  altText = QString::null) const

Return the HTML image tag.

Definition at line 160 of file thumbnailprovider.cpp.

References thumbnailData_, and thumbnailImage_.

Referenced by FileTransferP2P::userStarted1_gotThumbnailResult().

{
  if( thumbnailData_.isNull() || thumbnailImage_.isNull() )
  {
    return QString::null;
  }

  QString previewData( thumbnailData_.toBase64() );
  return "<img src=\"data:image/png;base64," + previewData + "\""
         " width=\""  + QString::number( thumbnailImage_.width() )  + "\""
         " height=\"" + QString::number( thumbnailImage_.height() ) + "\""
         " alt=\""    + Qt::escape( altText ) + "\" />";
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index