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

KMessViewDelegate::KMessViewDelegate ( QWidget *  parent = 0)

Constructor

Creates two labels which will be used to paint the contact list elements at the location of every item

Parameters:
parentThe parent object, usually a QTreeView

Definition at line 52 of file kmessviewdelegate.cpp.

References EmoticonManager::getReplacement(), and EmoticonManager::instance().

    : QStyledItemDelegate( parent )
{
  // Set up the group label style
  fontBold_.setBold( true );

  // create the text document used to render HTML text labels.
  textDocument_ = new QTextDocument();
  textDocument_->setDocumentMargin( 0.0 );

  QTextOption noWrap;
  noWrap.setWrapMode( QTextOption::NoWrap );
  noWrap.setAlignment( Qt::AlignTop );

  textDocument_->setDefaultTextOption( noWrap );

  // Save the current account's reference
  currentAccount_ = CurrentAccount::instance();

  // Cache the icons for the various media types
  mediaEmoticonMusic_  = EmoticonManager::instance()->getReplacement( "(8)",  true );
  mediaEmoticonGaming_ = EmoticonManager::instance()->getReplacement( "(xx)", true );
  
  KIconLoader *loader = KIconLoader::global();
  
  arrowUp_ = loader->loadIcon( "arrow-up", KIconLoader::Small );
  arrowDown_ = loader->loadIcon( "arrow-down", KIconLoader::Small );
  arrowLeft_ = loader->loadIcon( "arrow-left", KIconLoader::Small );
  arrowRight_ = loader->loadIcon( "arrow-right", KIconLoader::Small );
  
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index