32 typedef std::map<std::string, std::string> ArtMap;
57 virtual void SetLabel(
const std::string& strLabel);
58 const std::string& GetLabel()
const;
60 void SetLabel2(
const std::string& strLabel);
61 const std::string& GetLabel2()
const;
64 std::string GetOverlayImage()
const;
70 void SetArt(
const std::string &type,
const std::string &url);
76 void SetArt(
const ArtMap &art);
83 void AppendArt(
const ArtMap &art,
const std::string &prefix =
"");
90 void SetArtFallback(
const std::string &from,
const std::string &to);
101 std::string
GetArt(
const std::string &type)
const;
108 const ArtMap &
GetArt()
const;
115 bool HasArt(
const std::string &type)
const;
117 void SetSortLabel(
const std::string &label);
118 void SetSortLabel(
const std::wstring &label);
119 const std::wstring &GetSortLabel()
const;
121 void Select(
bool bOnOff);
122 bool IsSelected()
const;
124 bool HasOverlay()
const;
125 virtual bool IsFileItem()
const {
return false; }
127 void SetLayout(std::unique_ptr<CGUIListItemLayout> layout);
130 void SetFocusedLayout(std::unique_ptr<CGUIListItemLayout> layout);
134 void FreeMemory(
bool immediately =
false);
139 void SetProperty(
const std::string &strKey,
const CVariant &value);
141 void IncrementProperty(
const std::string &strKey,
int nVal);
142 void IncrementProperty(
const std::string& strKey, int64_t nVal);
143 void IncrementProperty(
const std::string &strKey,
double dVal);
145 void ClearProperties();
157 bool HasProperty(
const std::string &strKey)
const;
158 bool HasProperties()
const {
return !m_mapProperties.empty(); }
159 void ClearProperty(
const std::string &strKey);
161 const CVariant &GetProperty(
const std::string &strKey)
const;
178 std::string m_strLabel2;
181 std::unique_ptr<CGUIListItemLayout> m_layout;
182 std::unique_ptr<CGUIListItemLayout> m_focusedLayout;
184 unsigned int m_currentItem;
188 bool operator()(
const std::string &s1,
const std::string &s2)
const;
191 typedef std::map<std::string, CVariant, icompare> PropertyMap;
192 PropertyMap m_mapProperties;
194 std::wstring m_sortLabel;
195 std::string m_strLabel;
198 ArtMap m_artFallbacks;
void AppendArt(const ArtMap &art, const std::string &prefix="")
append artwork to an item
Definition: GUIListItem.cpp:126
Value 0 - No overlay icon.
Definition: GUIListItem.h:39
Value 4 - For not watched files.
Definition: GUIListItem.h:43
Definition: GUIListItem.h:29
unsigned int GetCurrentItem() const
Get the current item number within it's container Retrieve the items position in a container...
Definition: GUIListItem.cpp:437
void ClearArt()
clear art on an item
Definition: GUIListItem.cpp:119
void SetCurrentItem(unsigned int position)
Set the current item number within it's container Our container classes will set this member with the...
Definition: GUIListItem.cpp:432
Value 1 - Compressed *.rar files.
Definition: GUIListItem.h:40
void SetArt(const std::string &type, const std::string &url)
Set a particular art type for an item.
Definition: GUIListItem.cpp:98
const ArtMap & GetArt() const
get artwork for an item Retrieves artwork in a type:url map
Definition: GUIListItem.cpp:147
Definition: GUIListItemLayout.h:20
Value 5 - For seen files.
Definition: GUIListItem.h:44
Value 6 - Is on hard disk stored.
Definition: GUIListItem.h:45
Definition: GUIListItem.h:186
bool m_bIsFolder
is item a folder or a file
Definition: GUIListItem.h:137
Value 2 - Compressed *.zip files.
Definition: GUIListItem.h:41
void AppendProperties(const CGUIListItem &item)
Append the properties of one CGUIListItem to another. Any existing properties in the current item wil...
Definition: GUIListItem.cpp:426
void SetArtFallback(const std::string &from, const std::string &to)
set a fallback image for art
Definition: GUIListItem.cpp:114
Value 3 - Locked files.
Definition: GUIListItem.h:42
bool HasArt(const std::string &type) const
Check whether an item has a particular piece of art Equivalent to !GetArt(type).empty() ...
Definition: GUIListItem.cpp:152
GUIIconOverlay
Definition: GUIListItem.h:39