Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CGUIViewState Class Referenceabstract

#include <GUIViewState.h>

Inheritance diagram for CGUIViewState:
CGUIViewStateAddonBrowser CGUIViewStateEventLog CGUIViewStateFavourites CGUIViewStateFromItems CGUIViewStateGeneral CGUIViewStateLibrary CGUIViewStateWindowMusic CGUIViewStateWindowPictures CGUIViewStateWindowPrograms CGUIViewStateWindowVideo KODI::GAME::CGUIViewStateWindowGames PVR::CGUIViewStatePVR

Public Member Functions

virtual ~CGUIViewState ()
 
void SetViewAsControl (int viewAsControl)
 
void SaveViewAsControl (int viewAsControl)
 
int GetViewAsControl () const
 
bool ChooseSortMethod ()
 
SortDescription SetNextSortMethod (int direction=1)
 
void SetCurrentSortMethod (int method)
 
SortDescription GetSortMethod () const
 
bool HasMultipleSortMethods () const
 
int GetSortMethodLabel () const
 
int GetSortOrderLabel () const
 
void GetSortMethodLabelMasks (LABEL_MASKS &masks) const
 
std::vector< SortDescriptionGetSortDescriptions () const
 
SortOrder SetNextSortOrder ()
 
SortOrder GetSortOrder () const
 
virtual bool HideExtensions ()
 
virtual bool HideParentDirItems ()
 
virtual bool DisableAddSourceButtons ()
 
virtual KODI::PLAYLIST::Id GetPlaylist () const
 
const std::string & GetPlaylistDirectory ()
 
void SetPlaylistDirectory (const std::string &strDirectory)
 
bool IsCurrentPlaylistDirectory (const std::string &strDirectory)
 
virtual bool AutoPlayNextItem ()
 
virtual std::string GetLockType ()
 
virtual std::string GetExtensions ()
 
virtual VECSOURCESGetSources ()
 

Static Public Member Functions

static CGUIViewStateGetViewState (int windowId, const CFileItemList &items)
 

Protected Member Functions

 CGUIViewState (const CFileItemList &items)
 
virtual void SaveViewState ()=0
 
virtual void SaveViewToDb (const std::string &path, int windowID, CViewState *viewState=NULL)
 
void LoadViewState (const std::string &path, int windowID)
 
void AddLiveTVSources ()
 
void AddPlaylistOrder (const CFileItemList &items, const LABEL_MASKS &label_masks)
 Add the sort order defined in a smartplaylist Defaults to SORT_METHOD_PLAYLIST_ORDER if no order is defined.
 
void AddSortMethod (SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes=SortAttributeNone, SortOrder sortOrder=SortOrderNone)
 
void AddSortMethod (SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks, SortOrder sortOrder=SortOrderNone)
 
void AddSortMethod (SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks)
 
void SetSortMethod (SortBy sortBy, SortOrder sortOrder=SortOrderNone)
 
void SetSortMethod (SortDescription sortDescription)
 
void SetSortOrder (SortOrder sortOrder)
 
bool AutoPlayNextVideoItem () const
 

Protected Attributes

const CFileItemListm_items
 
int m_currentViewAsControl
 
KODI::PLAYLIST::Id m_playlist
 
std::vector< GUIViewSortDetailsm_sortMethods
 
int m_currentSortMethod
 

Static Protected Attributes

static VECSOURCES m_sources
 
static std::string m_strPlaylistDirectory
 

Constructor & Destructor Documentation

◆ ~CGUIViewState()

CGUIViewState::~CGUIViewState ( )
virtualdefault

◆ CGUIViewState()

CGUIViewState::CGUIViewState ( const CFileItemList & items)
explicitprotected

Member Function Documentation

◆ AddLiveTVSources()

void CGUIViewState::AddLiveTVSources ( )
protected

◆ AddPlaylistOrder()

void CGUIViewState::AddPlaylistOrder ( const CFileItemList & items,
const LABEL_MASKS & label_masks )
protected

Add the sort order defined in a smartplaylist Defaults to SORT_METHOD_PLAYLIST_ORDER if no order is defined.

Parameters
itemsthe list of items for the view state.
label_maskthe label masks for formatting items.

◆ AddSortMethod() [1/3]

void CGUIViewState::AddSortMethod ( SortBy sortBy,
int buttonLabel,
const LABEL_MASKS & labelMasks,
SortAttribute sortAttributes = SortAttributeNone,
SortOrder sortOrder = SortOrderNone )
protected

◆ AddSortMethod() [2/3]

void CGUIViewState::AddSortMethod ( SortBy sortBy,
SortAttribute sortAttributes,
int buttonLabel,
const LABEL_MASKS & labelMasks,
SortOrder sortOrder = SortOrderNone )
protected

◆ AddSortMethod() [3/3]

void CGUIViewState::AddSortMethod ( SortDescription sortDescription,
int buttonLabel,
const LABEL_MASKS & labelMasks )
protected

◆ AutoPlayNextItem()

◆ AutoPlayNextVideoItem()

bool CGUIViewState::AutoPlayNextVideoItem ( ) const
protected

◆ ChooseSortMethod()

bool CGUIViewState::ChooseSortMethod ( )

◆ DisableAddSourceButtons()

bool CGUIViewState::DisableAddSourceButtons ( )
virtual

Reimplemented in CGUIViewStateEventLog.

◆ GetExtensions()

◆ GetLockType()

◆ GetPlaylist()

PLAYLIST::Id CGUIViewState::GetPlaylist ( ) const
virtual

◆ GetPlaylistDirectory()

const std::string & CGUIViewState::GetPlaylistDirectory ( )

◆ GetSortDescriptions()

std::vector< SortDescription > CGUIViewState::GetSortDescriptions ( ) const

◆ GetSortMethod()

SortDescription CGUIViewState::GetSortMethod ( ) const

◆ GetSortMethodLabel()

int CGUIViewState::GetSortMethodLabel ( ) const

◆ GetSortMethodLabelMasks()

void CGUIViewState::GetSortMethodLabelMasks ( LABEL_MASKS & masks) const

◆ GetSortOrder()

SortOrder CGUIViewState::GetSortOrder ( ) const

◆ GetSortOrderLabel()

int CGUIViewState::GetSortOrderLabel ( ) const

◆ GetSources()

◆ GetViewAsControl()

int CGUIViewState::GetViewAsControl ( ) const

◆ GetViewState()

CGUIViewState * CGUIViewState::GetViewState ( int windowId,
const CFileItemList & items )
static

◆ HasMultipleSortMethods()

bool CGUIViewState::HasMultipleSortMethods ( ) const

◆ HideExtensions()

bool CGUIViewState::HideExtensions ( )
virtual

◆ HideParentDirItems()

◆ IsCurrentPlaylistDirectory()

bool CGUIViewState::IsCurrentPlaylistDirectory ( const std::string & strDirectory)

◆ LoadViewState()

void CGUIViewState::LoadViewState ( const std::string & path,
int windowID )
protected

◆ SaveViewAsControl()

void CGUIViewState::SaveViewAsControl ( int viewAsControl)

◆ SaveViewState()

◆ SaveViewToDb()

void CGUIViewState::SaveViewToDb ( const std::string & path,
int windowID,
CViewState * viewState = NULL )
protectedvirtual

◆ SetCurrentSortMethod()

void CGUIViewState::SetCurrentSortMethod ( int method)

◆ SetNextSortMethod()

SortDescription CGUIViewState::SetNextSortMethod ( int direction = 1)

◆ SetNextSortOrder()

SortOrder CGUIViewState::SetNextSortOrder ( )

◆ SetPlaylistDirectory()

void CGUIViewState::SetPlaylistDirectory ( const std::string & strDirectory)

◆ SetSortMethod() [1/2]

void CGUIViewState::SetSortMethod ( SortBy sortBy,
SortOrder sortOrder = SortOrderNone )
protected

◆ SetSortMethod() [2/2]

void CGUIViewState::SetSortMethod ( SortDescription sortDescription)
protected

◆ SetSortOrder()

void CGUIViewState::SetSortOrder ( SortOrder sortOrder)
protected

◆ SetViewAsControl()

void CGUIViewState::SetViewAsControl ( int viewAsControl)

Member Data Documentation

◆ m_currentSortMethod

int CGUIViewState::m_currentSortMethod
protected

◆ m_currentViewAsControl

int CGUIViewState::m_currentViewAsControl
protected

◆ m_items

const CFileItemList& CGUIViewState::m_items
protected

◆ m_playlist

KODI::PLAYLIST::Id CGUIViewState::m_playlist
protected

◆ m_sortMethods

std::vector<GUIViewSortDetails> CGUIViewState::m_sortMethods
protected

◆ m_sources

VECSOURCES CGUIViewState::m_sources
staticprotected

◆ m_strPlaylistDirectory

std::string CGUIViewState::m_strPlaylistDirectory
staticprotected

The documentation for this class was generated from the following files: