本文整理汇总了C++中KviWindow::outputNoFmt方法的典型用法代码示例。如果您正苦于以下问题:C++ KviWindow::outputNoFmt方法的具体用法?C++ KviWindow::outputNoFmt怎么用?C++ KviWindow::outputNoFmt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KviWindow
的用法示例。
在下文中一共展示了KviWindow::outputNoFmt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internalOutput
void KviWindow::internalOutput(KviIrcView * pView, int iMsgType, const kvi_wchar_t * pwText, int iFlags)
{
// all roads lead to Rome :)
if(pView)
{
if(!hasAttention())
{
iFlags |= KviIrcView::TriggersNotification;
if(!pView->hasLineMark())
{
iFlags |= KviIrcView::SetLineMark;
}
}
pView->appendText(iMsgType,pwText,iFlags);
} else {
// Redirect to the output proxy
KviWindow * pWnd = outputProxy();
if(pWnd)
pWnd->outputNoFmt(iMsgType,pwText,iFlags);
}
if(!m_pWindowListItem)
return;
// if this option is checked we don't highlight other than channel msg
if(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg))
{
if((iMsgType != KVI_OUT_CHANPRIVMSG) && (iMsgType != KVI_OUT_CHANPRIVMSGCRYPTED))
{
if(!(
(
KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsgQueryToo) &&
(
(iMsgType == KVI_OUT_QUERYPRIVMSG) || (iMsgType == KVI_OUT_QUERYTRACE) ||
(iMsgType == KVI_OUT_QUERYPRIVMSGCRYPTED) || (iMsgType == KVI_OUT_QUERYNOTICE) || (iMsgType == KVI_OUT_QUERYNOTICECRYPTED)
)
)
||
(
KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo) && (iMsgType == KVI_OUT_HIGHLIGHT)
)
)
)
return;
}
}
if(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel) &&
(KVI_OPTION_MSGTYPE(iMsgType).level() < ((int)(KVI_OPTION_UINT(KviOption_uintMinHighlightLevel)))))
{
return;
}
m_pWindowListItem->highlight(KVI_OPTION_MSGTYPE(iMsgType).level());
}
示例2: notifyOffLine
void KviNotifyListManager::notifyOffLine(const QString & szNick, const QString & szUser, const QString & szHost, const QString & szReason)
{
KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolNotifyListChangesToActiveWindow) ? m_pConsole->activeWindow() : m_pConsole;
if(!KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnNotifyOffLine, pOut, szNick))
{
QString szWho;
if(!(szUser.isEmpty() || szHost.isEmpty()))
szWho = QString("\r!n\r%1\r [%[email protected]\r!h\r%3\r]").arg(szNick, szUser, szHost);
else
szWho = QString("\r!n\r%1\r").arg(szNick);
QString szMsg;
KviPointerHashTable<QString, KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
KviPointerHashTableIterator<QString, KviRegisteredUser> it(*d);
while(KviRegisteredUser * pUser = it.current())
{
QString szProp = pUser->getProperty("notify");
if(!szProp.isEmpty())
{
if(szProp.split(",", QString::SkipEmptyParts).indexOf(szNick) != -1)
{
QString szComment = pUser->getProperty("comment");
if(!szComment.isEmpty())
szMsg = QString("%1 (%2), Group \"%3\" has left IRC as (%4)").arg(pUser->name(), szComment, pUser->group(), szWho);
else
szMsg = QString("%1, Group \"%2\" has left IRC as (%3)").arg(pUser->name(), pUser->group(), szWho);
break;
}
}
++it;
}
if(szMsg.isEmpty())
szMsg = QString(__tr2qs("%1 has left IRC")).arg(szWho);
if((!szReason.isEmpty()) && (_OUTPUT_VERBOSE))
{
szMsg += "(";
szMsg += szReason;
szMsg += ")";
}
pOut->outputNoFmt(KVI_OUT_NOTIFYOFFLINE, szMsg);
}
m_pConsole->notifyListView()->part(szNick);
}
示例3: notifyOnLine
void KviNotifyListManager::notifyOnLine(const QString & szNick, const QString & szUser, const QString & szHost, const QString & szReason, bool bJoin)
{
if(bJoin)
m_pConsole->notifyListView()->join(szNick, szUser, szHost);
KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolNotifyListChangesToActiveWindow) ? m_pConsole->activeWindow() : m_pConsole;
if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnNotifyOnLine, pOut, szNick))
return;
QString szWho;
QString szMsg;
if(!(szUser.isEmpty() || szHost.isEmpty()))
szWho = QString("\r!n\r%1\r [%[email protected]\r!h\r%3\r]").arg(szNick, szUser, szHost);
else
szWho = QString("\r!n\r%1\r").arg(szNick);
KviPointerHashTable<QString, KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
KviPointerHashTableIterator<QString, KviRegisteredUser> it(*d);
while(KviRegisteredUser * pUser = it.current())
{
QString szProp = pUser->getProperty("notify");
if(!szProp.isEmpty())
{
if(szProp.split(",", QString::SkipEmptyParts).indexOf(szNick) != -1)
{
QString szComment = pUser->getProperty("comment");
if(!szComment.isEmpty())
szMsg = QString("%1 (%2), Group \"%3\" is on IRC as (%4)").arg(pUser->name(), szComment, pUser->group(), szWho);
else
szMsg = QString("%1, Group \"%2\" is on IRC as (%3)").arg(pUser->name(), pUser->group(), szWho);
break;
}
}
++it;
}
QString szFmt = __tr2qs("%1 is on IRC");
if(szMsg.isEmpty())
szMsg = QString(szFmt).arg(szWho);
if((!szReason.isEmpty()) && (_OUTPUT_VERBOSE))
{
szMsg += "(";
szMsg += szReason;
szMsg += ")";
}
pOut->outputNoFmt(KVI_OUT_NOTIFYONLINE, szMsg);
if(!(pOut->hasAttention(KviWindow::MainWindowIsVisible)))
{
if(KVI_OPTION_BOOL(KviOption_boolFlashWindowOnNotifyOnLine))
pOut->demandAttention();
if(KVI_OPTION_BOOL(KviOption_boolPopupNotifierOnNotifyOnLine))
{
szWho = "<b>";
szWho += szNick;
szWho += "</b>";
szMsg = QString(szFmt).arg(szWho);
g_pApp->notifierMessage(pOut, KVI_OPTION_MSGTYPE(KVI_OUT_NOTIFYONLINE).pixId(), szMsg, KVI_OPTION_UINT(KviOption_uintNotifierAutoHideTime));
}
}
}