Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <GUIListItem.h>
Classes | |
struct | icompare |
Public Types | |
enum | GUIIconOverlay { ICON_OVERLAY_NONE = 0 , ICON_OVERLAY_RAR , ICON_OVERLAY_ZIP , ICON_OVERLAY_LOCKED , ICON_OVERLAY_UNWATCHED , ICON_OVERLAY_WATCHED , ICON_OVERLAY_HD } |
typedef std::map< std::string, std::string > | ArtMap |
Public Member Functions | |
CGUIListItem (void) | |
CGUIListItem (const CGUIListItem &item) | |
CGUIListItem (const std::string &strLabel) | |
virtual | ~CGUIListItem (void) |
virtual CGUIListItem * | Clone () const |
CGUIListItem & | operator= (const CGUIListItem &item) |
virtual void | SetLabel (const std::string &strLabel) |
const std::string & | GetLabel () const |
void | SetLabel2 (const std::string &strLabel) |
const std::string & | GetLabel2 () const |
void | SetOverlayImage (GUIIconOverlay icon) |
std::string | GetOverlayImage () const |
void | SetArt (const std::string &type, const std::string &url) |
Set a particular art type for an item. | |
void | SetArt (const ArtMap &art) |
set artwork for an item | |
void | AppendArt (const ArtMap &art, const std::string &prefix="") |
append artwork to an item | |
void | SetArtFallback (const std::string &from, const std::string &to) |
set a fallback image for art | |
void | ClearArt () |
clear art on an item | |
std::string | GetArt (const std::string &type) const |
Get a particular art type for an item. | |
const ArtMap & | GetArt () const |
get artwork for an item Retrieves artwork in a type:url map | |
bool | HasArt (const std::string &type) const |
Check whether an item has a particular piece of art Equivalent to !GetArt(type).empty() | |
void | SetSortLabel (const std::string &label) |
void | SetSortLabel (const std::wstring &label) |
const std::wstring & | GetSortLabel () const |
void | Select (bool bOnOff) |
bool | IsSelected () const |
bool | HasOverlay () const |
virtual bool | IsFileItem () const |
void | SetLayout (std::unique_ptr< CGUIListItemLayout > layout) |
CGUIListItemLayout * | GetLayout () |
void | SetFocusedLayout (std::unique_ptr< CGUIListItemLayout > layout) |
CGUIListItemLayout * | GetFocusedLayout () |
void | FreeIcons () |
void | FreeMemory (bool immediately=false) |
void | SetInvalid () |
void | SetProperty (const std::string &strKey, const CVariant &value) |
void | IncrementProperty (const std::string &strKey, int nVal) |
void | IncrementProperty (const std::string &strKey, int64_t nVal) |
void | IncrementProperty (const std::string &strKey, double dVal) |
void | ClearProperties () |
void | AppendProperties (const CGUIListItem &item) |
Append the properties of one CGUIListItem to another. Any existing properties in the current item will be overridden if they are set in the passed in item. | |
void | Archive (CArchive &ar) |
void | Serialize (CVariant &value) |
bool | HasProperty (const std::string &strKey) const |
bool | HasProperties () const |
void | ClearProperty (const std::string &strKey) |
const CVariant & | GetProperty (const std::string &strKey) const |
void | SetCurrentItem (unsigned int position) |
Set the current item number within it's container Our container classes will set this member with the items position in the container starting at 1. | |
unsigned int | GetCurrentItem () const |
Get the current item number within it's container Retrieve the items position in a container, this is useful to show for example numbering in front of entities in an arbitrary list of entities, like songs of a playlist. | |
Public Attributes | |
bool | m_bIsFolder |
is item a folder or a file | |
Protected Types | |
typedef std::map< std::string, CVariant, icompare > | PropertyMap |
Protected Attributes | |
std::string | m_strLabel2 |
GUIIconOverlay | m_overlayIcon |
std::unique_ptr< CGUIListItemLayout > | m_layout |
std::unique_ptr< CGUIListItemLayout > | m_focusedLayout |
bool | m_bSelected |
unsigned int | m_currentItem |
PropertyMap | m_mapProperties |
std::map<std::string, std::string> CGUIListItem::ArtMap |
|
protected |
CGUIListItem::CGUIListItem | ( | void | ) |
|
explicit |
|
explicit |
|
virtual |
append artwork to an item
art | a type:url map for artwork |
prefix | a prefix for the art, if applicable. |
void CGUIListItem::AppendProperties | ( | const CGUIListItem & | item | ) |
Append the properties of one CGUIListItem to another. Any existing properties in the current item will be overridden if they are set in the passed in item.
item | the item containing the properties to append. |
void CGUIListItem::ClearProperties | ( | ) |
void CGUIListItem::ClearProperty | ( | const std::string & | strKey | ) |
|
inlinevirtual |
Reimplemented in CFileItem, and CGUIStaticItem.
void CGUIListItem::FreeIcons | ( | ) |
const CGUIListItem::ArtMap & CGUIListItem::GetArt | ( | ) | const |
get artwork for an item Retrieves artwork in a type:url map
std::string CGUIListItem::GetArt | ( | const std::string & | type | ) | const |
Get a particular art type for an item.
type | type of art to fetch. |
unsigned int CGUIListItem::GetCurrentItem | ( | ) | const |
Get the current item number within it's container Retrieve the items position in a container, this is useful to show for example numbering in front of entities in an arbitrary list of entities, like songs of a playlist.
CGUIListItemLayout * CGUIListItem::GetFocusedLayout | ( | ) |
const std::string & CGUIListItem::GetLabel | ( | ) | const |
const std::string & CGUIListItem::GetLabel2 | ( | ) | const |
CGUIListItemLayout * CGUIListItem::GetLayout | ( | ) |
std::string CGUIListItem::GetOverlayImage | ( | ) | const |
const CVariant & CGUIListItem::GetProperty | ( | const std::string & | strKey | ) | const |
const std::wstring & CGUIListItem::GetSortLabel | ( | ) | const |
bool CGUIListItem::HasArt | ( | const std::string & | type | ) | const |
Check whether an item has a particular piece of art Equivalent to !GetArt(type).empty()
type | type of art to set. |
bool CGUIListItem::HasOverlay | ( | ) | const |
|
inline |
bool CGUIListItem::HasProperty | ( | const std::string & | strKey | ) | const |
void CGUIListItem::IncrementProperty | ( | const std::string & | strKey, |
double | dVal ) |
bool CGUIListItem::IsSelected | ( | ) | const |
CGUIListItem & CGUIListItem::operator= | ( | const CGUIListItem & | item | ) |
void CGUIListItem::SetArt | ( | const std::string & | type, |
const std::string & | url ) |
Set a particular art type for an item.
type | type of art to set. |
url | the url of the art. |
void CGUIListItem::SetArtFallback | ( | const std::string & | from, |
const std::string & | to ) |
set a fallback image for art
from | the type to fallback from |
to | the type to fallback to |
Set the current item number within it's container Our container classes will set this member with the items position in the container starting at 1.
position | Position of the item in the container starting at 1. |
void CGUIListItem::SetFocusedLayout | ( | std::unique_ptr< CGUIListItemLayout > | layout | ) |
void CGUIListItem::SetInvalid | ( | ) |
void CGUIListItem::SetLabel2 | ( | const std::string & | strLabel | ) |
void CGUIListItem::SetLayout | ( | std::unique_ptr< CGUIListItemLayout > | layout | ) |
void CGUIListItem::SetOverlayImage | ( | GUIIconOverlay | icon | ) |
void CGUIListItem::SetSortLabel | ( | const std::string & | label | ) |
void CGUIListItem::SetSortLabel | ( | const std::wstring & | label | ) |
bool CGUIListItem::m_bIsFolder |
is item a folder or a file
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |