22 using CGUIListItemLayoutPtr = std::unique_ptr<CGUIListItemLayout>;
33 typedef std::map<std::string, std::string> ArtMap;
58 virtual void SetLabel(
const std::string& strLabel);
59 const std::string& GetLabel()
const;
61 void SetLabel2(
const std::string& strLabel);
62 const std::string& GetLabel2()
const;
65 std::string GetOverlayImage()
const;
71 void SetArt(
const std::string &type,
const std::string &url);
77 void SetArt(
const ArtMap &art);
84 void AppendArt(
const ArtMap &art,
const std::string &prefix =
"");
91 void SetArtFallback(
const std::string &from,
const std::string &to);
102 std::string
GetArt(
const std::string &type)
const;
109 const ArtMap &
GetArt()
const;
116 bool HasArt(
const std::string &type)
const;
118 void SetSortLabel(
const std::string &label);
119 void SetSortLabel(
const std::wstring &label);
120 const std::wstring &GetSortLabel()
const;
122 void Select(
bool bOnOff);
123 bool IsSelected()
const;
125 bool HasOverlay()
const;
126 virtual bool IsFileItem()
const {
return false; }
128 void SetLayout(CGUIListItemLayoutPtr layout);
131 void SetFocusedLayout(CGUIListItemLayoutPtr layout);
135 void FreeMemory(
bool immediately =
false);
140 void SetProperty(
const std::string &strKey,
const CVariant &value);
142 void IncrementProperty(
const std::string &strKey,
int nVal);
143 void IncrementProperty(
const std::string& strKey, int64_t nVal);
144 void IncrementProperty(
const std::string &strKey,
double dVal);
146 void ClearProperties();
158 bool HasProperty(
const std::string &strKey)
const;
159 bool HasProperties()
const {
return !m_mapProperties.empty(); }
160 void ClearProperty(
const std::string &strKey);
162 const CVariant &GetProperty(
const std::string &strKey)
const;
179 std::string m_strLabel2;
182 CGUIListItemLayoutPtr m_layout;
183 CGUIListItemLayoutPtr m_focusedLayout;
185 unsigned int m_currentItem;
189 bool operator()(
const std::string &s1,
const std::string &s2)
const;
192 typedef std::map<std::string, CVariant, icompare> PropertyMap;
193 PropertyMap m_mapProperties;
195 std::wstring m_sortLabel;
196 std::string m_strLabel;
199 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:40
Value 4 - For not watched files.
Definition: GUIListItem.h:44
Definition: GUIListItem.h:30
unsigned int GetCurrentItem() const
Get the current item number within it's container Retrieve the items position in a container...
Definition: GUIListItem.cpp:438
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:433
Value 1 - Compressed *.rar files.
Definition: GUIListItem.h:41
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:45
Value 6 - Is on hard disk stored.
Definition: GUIListItem.h:46
Definition: GUIListItem.h:187
bool m_bIsFolder
is item a folder or a file
Definition: GUIListItem.h:138
Value 2 - Compressed *.zip files.
Definition: GUIListItem.h:42
void AppendProperties(const CGUIListItem &item)
Append the properties of one CGUIListItem to another. Any existing properties in the current item wil...
Definition: GUIListItem.cpp:427
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:43
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:40