本文整理汇总了C++中CFileItem::GetIndent方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItem::GetIndent方法的具体用法?C++ CFileItem::GetIndent怎么用?C++ CFileItem::GetIndent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItem
的用法示例。
在下文中一共展示了CFileItem::GetIndent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGetItemText
wxString CQueueViewBase::OnGetItemText(long item, long column) const
{
CQueueViewBase* pThis = const_cast<CQueueViewBase*>(this);
CQueueItem* pItem = pThis->GetQueueItem(item);
if (!pItem)
return _T("");
switch (pItem->GetType())
{
case QueueItemType_Server:
{
CServerItem* pServerItem = reinterpret_cast<CServerItem*>(pItem);
if (!column)
return pServerItem->GetName();
}
break;
case QueueItemType_File:
{
CFileItem* pFileItem = reinterpret_cast<CFileItem*>(pItem);
switch (column)
{
case 0:
return pFileItem->GetIndent() + pFileItem->GetLocalFile();
case 1:
if (pFileItem->Download())
if (pFileItem->Queued())
return _T("<--");
else
return _T("<<--");
else
if (pFileItem->Queued())
return _T("-->");
else
return _T("-->>");
break;
case 2:
return pFileItem->GetRemotePath().FormatFilename(pFileItem->GetRemoteFile());
case 3:
{
const wxLongLong& size = pFileItem->GetSize();
if (size >= 0)
return FormatSize(size);
else
return _T("?");
}
case 4:
switch (pFileItem->GetPriority())
{
case 0:
return _("Lowest");
case 1:
return _("Low");
default:
case 2:
return _("Normal");
case 3:
return _("High");
case 4:
return _("Highest");
}
break;
case 5:
return pFileItem->m_statusMessage;
default:
break;
}
}
break;
case QueueItemType_FolderScan:
{
CFolderScanItem* pFolderItem = reinterpret_cast<CFolderScanItem*>(pItem);
switch (column)
{
case 0:
return _T(" ") + pFolderItem->GetLocalPath();
case 1:
if (pFolderItem->Download())
if (pFolderItem->Queued())
return _T("<--");
else
return _T("<<--");
else
if (pFolderItem->Queued())
return _T("-->");
else
return _T("-->>");
break;
case 2:
return pFolderItem->GetRemotePath().GetPath();
case 5:
return pFolderItem->m_statusMessage;
default:
break;
}
}
break;
case QueueItemType_Folder:
{
CFileItem* pFolderItem = reinterpret_cast<CFolderItem*>(pItem);
//.........这里部分代码省略.........
示例2: OnGetItemText
wxString CQueueViewBase::OnGetItemText(CQueueItem* pItem, ColumnId column) const
{
switch (pItem->GetType())
{
case QueueItemType::Server:
{
CServerItem* pServerItem = reinterpret_cast<CServerItem*>(pItem);
if (!column)
return pServerItem->GetName();
}
break;
case QueueItemType::File:
{
CFileItem* pFileItem = reinterpret_cast<CFileItem*>(pItem);
switch (column)
{
case colLocalName:
return pFileItem->GetIndent() + pFileItem->GetLocalPath().GetPath() + pFileItem->GetLocalFile();
case colDirection:
if (pFileItem->Download())
if (pFileItem->queued())
return _T("<--");
else
return _T("<<--");
else
if (pFileItem->queued())
return _T("-->");
else
return _T("-->>");
break;
case colRemoteName:
return pFileItem->GetRemotePath().FormatFilename(pFileItem->GetRemoteFile());
case colSize:
{
const wxLongLong& size = pFileItem->GetSize();
if (size >= 0)
return CSizeFormat::Format(size);
else
return _T("?");
}
case colPriority:
switch (pFileItem->GetPriority())
{
case QueuePriority::lowest:
return _("Lowest");
case QueuePriority::low:
return _("Low");
default:
case QueuePriority::normal:
return _("Normal");
case QueuePriority::high:
return _("High");
case QueuePriority::highest:
return _("Highest");
}
break;
case colTransferStatus:
case colErrorReason:
return pFileItem->m_statusMessage;
case colTime:
return CTimeFormat::FormatDateTime(pItem->GetTime());
default:
break;
}
}
break;
case QueueItemType::FolderScan:
{
CFolderScanItem* pFolderItem = reinterpret_cast<CFolderScanItem*>(pItem);
switch (column)
{
case colLocalName:
return _T(" ") + pFolderItem->GetLocalPath().GetPath();
case colDirection:
if (pFolderItem->Download())
if (pFolderItem->queued())
return _T("<--");
else
return _T("<<--");
else
if (pFolderItem->queued())
return _T("-->");
else
return _T("-->>");
break;
case colRemoteName:
return pFolderItem->GetRemotePath().GetPath();
case colTransferStatus:
case colErrorReason:
return pFolderItem->m_statusMessage;
case colTime:
return CTimeFormat::FormatDateTime(pItem->GetTime());
default:
break;
}
}
break;
case QueueItemType::Folder:
{
CFileItem* pFolderItem = reinterpret_cast<CFolderItem*>(pItem);
//.........这里部分代码省略.........