kodi
AutoSwitch.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 class CFileItemList;
12 
14 {
15 public:
16 
17  CAutoSwitch(void);
18  virtual ~CAutoSwitch(void);
19 
20  static int GetView(const CFileItemList& vecItems);
21 
22  static bool ByFolders(const CFileItemList& vecItems);
23  static bool ByFiles(bool bHideParentDirItems, const CFileItemList& vecItems);
24  static bool ByThumbPercent(bool bHideParentDirItems, int iPercent, const CFileItemList& vecItems);
25  static bool ByFileCount(const CFileItemList& vecItems);
26  static bool ByFolderThumbPercentage(bool hideParentDirItems, int percent, const CFileItemList &vecItems);
27  static float MetadataPercentage(const CFileItemList &vecItems);
28 protected:
29 
30 };
Definition: AutoSwitch.h:13
Represents a list of files.
Definition: FileItem.h:702
static int GetView(const CFileItemList &vecItems)
Generic function to add a layer of transparency to the calling window.
Definition: AutoSwitch.cpp:32
static bool ByFolders(const CFileItemList &vecItems)
Auto Switch method based on the current directory containing ALL folders and atleast one non-default ...
Definition: AutoSwitch.cpp:94
static bool ByFileCount(const CFileItemList &vecItems)
Auto Switch method based on whether there is more than 25% files.
Definition: AutoSwitch.cpp:181
static bool ByThumbPercent(bool bHideParentDirItems, int iPercent, const CFileItemList &vecItems)
Auto Switch method based on the percentage of non-default thumbs in the current directory.
Definition: AutoSwitch.cpp:149
static bool ByFiles(bool bHideParentDirItems, const CFileItemList &vecItems)
Auto Switch method based on the current directory not containing ALL files and atleast one non-defaul...
Definition: AutoSwitch.cpp:117