本文整理汇总了C++中LogFile::date方法的典型用法代码示例。如果您正苦于以下问题:C++ LogFile::date方法的具体用法?C++ LogFile::date怎么用?C++ LogFile::date使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogFile
的用法示例。
在下文中一共展示了LogFile::date方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filterNext
void LogViewWindow::filterNext()
{
QString szCurGroup;
LogFile * pFile = m_logList.current();
if(!pFile)
goto filter_last;
if(pFile->type() == LogFile::Channel && !m_pShowChannelsCheck->isChecked())
goto filter_next;
if(pFile->type() == LogFile::Console && !m_pShowConsolesCheck->isChecked())
goto filter_next;
if(pFile->type() == LogFile::DccChat && !m_pShowDccChatCheck->isChecked())
goto filter_next;
if(pFile->type() == LogFile::Other && !m_pShowOtherCheck->isChecked())
goto filter_next;
if(pFile->type() == LogFile::Query && !m_pShowQueryesCheck->isChecked())
goto filter_next;
if(m_pEnableFromFilter->isChecked())
if(pFile->date() > m_pFromDateEdit->date())
goto filter_next;
if(m_pEnableToFilter->isChecked())
if(pFile->date() < m_pToDateEdit->date())
goto filter_next;
if(!m_pFileNameMask->text().isEmpty())
if(!KviQString::matchString(m_pFileNameMask->text(),pFile->name()))
goto filter_next;
if(!m_pContentsMask->text().isEmpty())
{
QString szBuffer;
pFile->getText(szBuffer);
if(!KviQString::matchString(m_pContentsMask->text(),szBuffer))
goto filter_next;
}
if(m_pLastCategory)
{
if(m_pLastCategory->m_eType != pFile->type())
{
m_pLastCategory = 0;
for(int i=0; i < m_pListView->topLevelItemCount(); ++i)
{
LogListViewItemType * pTmp = (LogListViewItemType *)m_pListView->topLevelItem(i);
if(pTmp->m_eType == pFile->type())
{
m_pLastCategory = pTmp;
break;
}
}
if(!m_pLastCategory)
m_pLastCategory = new LogListViewItemType(m_pListView,pFile->type());
}
} else {
m_pLastCategory = new LogListViewItemType(m_pListView,pFile->type());
}
szCurGroup = __tr2qs_ctx("%1 on %2","log").arg(pFile->name(),pFile->network());
if(m_szLastGroup != szCurGroup)
{
m_szLastGroup = szCurGroup;
m_pLastGroupItem = 0;
for(int i=0; i < m_pLastCategory->childCount(); ++i)
{
LogListViewItemFolder * pTmp = (LogListViewItemFolder *)m_pLastCategory->child(i);
if(pTmp->text(0) == m_szLastGroup)
{
m_pLastGroupItem = pTmp;
break;
}
}
if(!m_pLastGroupItem)
m_pLastGroupItem = new LogListViewItemFolder(m_pLastCategory,m_szLastGroup);
}
new LogListViewLog(m_pLastGroupItem,pFile->type(),pFile);
filter_next:
pFile = m_logList.next();
filter_last:
if(pFile && !m_bAborted)
{
m_pProgressBar->setValue(m_pProgressBar->value() + 1);
m_pTimer->start(); //singleshot
} else {
m_pBottomLayout->setVisible(false);
m_pListView->sortItems(0,Qt::AscendingOrder);
m_pProgressBar->setValue(0);
m_pFilterButton->setEnabled(true);
}
}