本文整理汇总了C++中kopete::Message::setManager方法的典型用法代码示例。如果您正苦于以下问题:C++ Message::setManager方法的具体用法?C++ Message::setManager怎么用?C++ Message::setManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kopete::Message
的用法示例。
在下文中一共展示了Message::setManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: messageReceived
void Kopete::ChatSession::appendMessage( Kopete::Message &msg )
{
msg.setManager( this );
if ( msg.direction() == Kopete::Message::Inbound )
{
const QString nick = myself()->nickName();
if ( Kopete::BehaviorSettings::self()->highlightEnabled() && !nick.isEmpty() )
{
const QString nickNameRegExp = QString::fromLatin1( "(^|[\\W])(%1)([\\W]|$)" ).arg( QRegExp::escape( nick ) );
if ( msg.plainBody().contains( QRegExp( nickNameRegExp, Qt::CaseInsensitive ) ) )
{
msg.setImportance( Kopete::Message::Highlight );
}
}
emit messageReceived( msg, this );
}
// outbound messages here are ones the user has sent that are now
// getting reflected back to the chatwindow. they should go down
// the incoming chain.
Kopete::Message::MessageDirection chainDirection = msg.direction();
if( chainDirection == Kopete::Message::Outbound )
chainDirection = Kopete::Message::Inbound;
chainForDirection( chainDirection )->processMessage( msg );
//looking for urls in the message
urlSearch( msg );
// emit messageAppended( msg, this );
}
示例2: messageReceived
void Kopete::ChatSession::appendMessage( Kopete::Message &msg )
{
msg.setManager( this );
if ( msg.direction() == Kopete::Message::Inbound )
{
QString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString();
if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() &&
msg.plainBody().contains( QRegExp( QString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) )
{
msg.setImportance( Kopete::Message::Highlight );
}
emit messageReceived( msg, this );
}
// outbound messages here are ones the user has sent that are now
// getting reflected back to the chatwindow. they should go down
// the incoming chain.
Kopete::Message::MessageDirection chainDirection = msg.direction();
if( chainDirection == Kopete::Message::Outbound )
chainDirection = Kopete::Message::Inbound;
chainForDirection( chainDirection )->processMessage( msg );
// emit messageAppended( msg, this );
}
示例3: messageSent
void Kopete::ChatSession::sendMessage( Kopete::Message &message )
{
message.setManager( this );
Kopete::Message sentMessage = message;
if ( !Kopete::CommandHandler::commandHandler()->processMessage( message, this ) )
{
emit messageSent( sentMessage, this );
if ( ( !account()->isAway() || Kopete::BehaviorSettings::self()->enableEventsWhileAway() ) && !account()->isBusy() )
{
KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) );
}
}
else
{
messageSucceeded();
}
}
示例4: messageSent
void Kopete::ChatSession::sendMessage( Kopete::Message &message )
{
message.setManager( this );
Kopete::Message sentMessage = message;
if ( !Kopete::CommandHandler::commandHandler()->processMessage( message, this ) )
{
emit messageSent( sentMessage, this );
if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() )
{
KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) );
}
}
else
{
messageSucceeded();
}
}