MythTV  master
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
VideoFilterSettings Class Reference

#include <videofilter.h>

Public Types

enum  FilterChanges {
  kSortOrderChanged = (1 << 0), kFilterCategoryChanged = (1 << 1), kFilterGenreChanged = (1 << 2), kFilterCountryChanged = (1 << 3),
  kFilterYearChanged = (1 << 4), kFilterRuntimeChanged = (1 << 5), kFilterUserRatingChanged = (1 << 6), kFilterBrowseChanged = (1 << 7),
  kFilterInetRefChanged = (1 << 8), kFilterCoverFileChanged = (1 << 9), kFilterParentalLevelChanged = (1 << 10), kFilterCastChanged = (1 << 11),
  kFilterWatchedChanged = (1 << 12), kFilterTextFilterChanged = (1 << 13)
}
 
enum  ordering {
  kOrderByTitle = 0, kOrderByYearDescending = 1, kOrderByUserRatingDescending = 2, kOrderByLength = 3,
  kOrderByFilename = 4, kOrderByID = 5, kOrderBySeasonEp = 6, kOrderByDateAddedDescending = 7
}
 

Public Member Functions

 VideoFilterSettings (bool loaddefaultsettings=true, const QString &_prefix="")
 
 VideoFilterSettings (const VideoFilterSettings &rhs)
 
VideoFilterSettingsoperator= (const VideoFilterSettings &rhs)
 
bool matches_filter (const VideoMetadata &mdata) const
 
bool meta_less_than (const VideoMetadata &lhs, const VideoMetadata &rhs) const
 Compares two VideoMetadata instances. More...
 
void saveAsDefault ()
 
int GetCategory () const
 
void SetCategory (int lcategory)
 
int getGenre () const
 
void setGenre (int lgenre)
 
int GetCast () const
 
void SetCast (int lcast)
 
int getCountry () const
 
void setCountry (int lcountry)
 
int getYear () const
 
void SetYear (int lyear)
 
int getRuntime () const
 
void setRuntime (int lruntime)
 
int GetUserRating () const
 
void SetUserRating (int luserrating)
 
int GetBrowse () const
 
void SetBrowse (int lbrowse)
 
int GetWatched () const
 
void SetWatched (int lwatched)
 
ordering getOrderby () const
 
void setOrderby (ordering lorderby)
 
QString getTextFilter () const
 
void setTextFilter (const QString &val)
 
ParentalLevel::Level getParentalLevel () const
 
void setParentalLevel (ParentalLevel::Level parental_level)
 
int getInteRef () const
 
void SetInetRef (int inetref)
 
int GetCoverFile () const
 
void SetCoverFile (int coverfile)
 
unsigned int getChangedState ()
 

Static Public Attributes

static const unsigned int FILTER_MASK = 0xFFFE
 
static const unsigned int SORT_MASK = 0x1
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (VideoFilterSettings)
 

Private Attributes

int m_category {kCategoryFilterAll}
 
int m_genre {kGenreFilterAll}
 
int m_country {kCountryFilterAll}
 
int m_cast {kCastFilterAll}
 
int m_year {kYearFilterAll}
 
int m_runtime {kRuntimeFilterAll}
 
int m_userrating {kUserRatingFilterAll}
 
int m_browse {kBrowseFilterAll}
 
int m_watched {kWatchedFilterAll}
 
int m_inetref {kInetRefFilterAll}
 
int m_coverfile {kCoverFileFilterAll}
 
ordering m_orderby {kOrderByTitle}
 
ParentalLevel::Level m_parental_level {ParentalLevel::plNone}
 
QString m_prefix
 
QString m_textfilter
 
int m_season {-1}
 
int m_episode {-1}
 
QDate m_insertdate
 
const QRegExp m_re_season {"(\\d+)[xX](\\d*)"}
 
const QRegExp m_re_date {"-(\\d+)([dmw])"}
 
unsigned int m_changed_state {0}
 

Detailed Description

Definition at line 72 of file videofilter.h.

Member Enumeration Documentation

◆ FilterChanges

Enumerator
kSortOrderChanged 
kFilterCategoryChanged 
kFilterGenreChanged 
kFilterCountryChanged 
kFilterYearChanged 
kFilterRuntimeChanged 
kFilterUserRatingChanged 
kFilterBrowseChanged 
kFilterInetRefChanged 
kFilterCoverFileChanged 
kFilterParentalLevelChanged 
kFilterCastChanged 
kFilterWatchedChanged 
kFilterTextFilterChanged 

Definition at line 79 of file videofilter.h.

◆ ordering

Enumerator
kOrderByTitle 
kOrderByYearDescending 
kOrderByUserRatingDescending 
kOrderByLength 
kOrderByFilename 
kOrderByID 
kOrderBySeasonEp 
kOrderByDateAddedDescending 

Definition at line 107 of file videofilter.h.

Constructor & Destructor Documentation

◆ VideoFilterSettings() [1/2]

VideoFilterSettings::VideoFilterSettings ( bool  loaddefaultsettings = true,
const QString &  _prefix = "" 
)

Definition at line 19 of file videofilter.cpp.

◆ VideoFilterSettings() [2/2]

VideoFilterSettings::VideoFilterSettings ( const VideoFilterSettings rhs)

Definition at line 59 of file videofilter.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

VideoFilterSettings::Q_DECLARE_TR_FUNCTIONS ( VideoFilterSettings  )
private

◆ operator=()

VideoFilterSettings & VideoFilterSettings::operator= ( const VideoFilterSettings rhs)

Definition at line 66 of file videofilter.cpp.

◆ matches_filter()

bool VideoFilterSettings::matches_filter ( const VideoMetadata mdata) const

◆ meta_less_than()

bool VideoFilterSettings::meta_less_than ( const VideoMetadata lhs,
const VideoMetadata rhs 
) const

Compares two VideoMetadata instances.

Definition at line 329 of file videofilter.cpp.

Referenced by metadata_sort::operator()().

◆ saveAsDefault()

void VideoFilterSettings::saveAsDefault ( )

Definition at line 168 of file videofilter.cpp.

Referenced by VideoFilterDialog::saveAsDefault().

◆ GetCategory()

int VideoFilterSettings::GetCategory ( void  ) const
inline

Definition at line 121 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetCategory()

void VideoFilterSettings::SetCategory ( int  lcategory)
inline

Definition at line 122 of file videofilter.h.

Referenced by VideoFilterDialog::SetCategory().

◆ getGenre()

int VideoFilterSettings::getGenre ( ) const
inline

Definition at line 128 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ setGenre()

void VideoFilterSettings::setGenre ( int  lgenre)
inline

Definition at line 129 of file videofilter.h.

Referenced by VideoFilterDialog::setGenre().

◆ GetCast()

int VideoFilterSettings::GetCast ( ) const
inline

Definition at line 135 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetCast()

void VideoFilterSettings::SetCast ( int  lcast)
inline

Definition at line 136 of file videofilter.h.

Referenced by VideoFilterDialog::SetCast().

◆ getCountry()

int VideoFilterSettings::getCountry ( ) const
inline

Definition at line 142 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ setCountry()

void VideoFilterSettings::setCountry ( int  lcountry)
inline

◆ getYear()

int VideoFilterSettings::getYear ( ) const
inline

Definition at line 149 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetYear()

void VideoFilterSettings::SetYear ( int  lyear)
inline

Definition at line 150 of file videofilter.h.

Referenced by VideoFilterDialog::SetYear().

◆ getRuntime()

int VideoFilterSettings::getRuntime ( ) const
inline

Definition at line 156 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ setRuntime()

void VideoFilterSettings::setRuntime ( int  lruntime)
inline

Definition at line 157 of file videofilter.h.

Referenced by VideoFilterDialog::setRunTime().

◆ GetUserRating()

int VideoFilterSettings::GetUserRating ( ) const
inline

Definition at line 163 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetUserRating()

void VideoFilterSettings::SetUserRating ( int  luserrating)
inline

Definition at line 164 of file videofilter.h.

Referenced by VideoFilterDialog::SetUserRating().

◆ GetBrowse()

int VideoFilterSettings::GetBrowse ( ) const
inline

Definition at line 170 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetBrowse()

void VideoFilterSettings::SetBrowse ( int  lbrowse)
inline

Definition at line 171 of file videofilter.h.

Referenced by VideoFilterDialog::SetBrowse().

◆ GetWatched()

int VideoFilterSettings::GetWatched ( ) const
inline

Definition at line 177 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetWatched()

void VideoFilterSettings::SetWatched ( int  lwatched)
inline

Definition at line 178 of file videofilter.h.

Referenced by VideoFilterDialog::SetWatched().

◆ getOrderby()

ordering VideoFilterSettings::getOrderby ( ) const
inline

Definition at line 184 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ setOrderby()

void VideoFilterSettings::setOrderby ( ordering  lorderby)
inline

Definition at line 185 of file videofilter.h.

Referenced by VideoFilterDialog::setOrderby().

◆ getTextFilter()

QString VideoFilterSettings::getTextFilter ( ) const
inline

Definition at line 191 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ setTextFilter()

void VideoFilterSettings::setTextFilter ( const QString &  val)

Definition at line 400 of file videofilter.cpp.

Referenced by VideoFilterDialog::setTextFilter().

◆ getParentalLevel()

ParentalLevel::Level VideoFilterSettings::getParentalLevel ( ) const
inline

Definition at line 194 of file videofilter.h.

◆ setParentalLevel()

void VideoFilterSettings::setParentalLevel ( ParentalLevel::Level  parental_level)
inline

Definition at line 195 of file videofilter.h.

Referenced by VideoListImp::refreshList().

◆ getInteRef()

int VideoFilterSettings::getInteRef ( ) const
inline

Definition at line 201 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetInetRef()

void VideoFilterSettings::SetInetRef ( int  inetref)
inline

Definition at line 202 of file videofilter.h.

Referenced by VideoFilterDialog::SetInetRef().

◆ GetCoverFile()

int VideoFilterSettings::GetCoverFile ( ) const
inline

Definition at line 208 of file videofilter.h.

Referenced by VideoFilterDialog::fillWidgets().

◆ SetCoverFile()

void VideoFilterSettings::SetCoverFile ( int  coverfile)
inline

Definition at line 209 of file videofilter.h.

Referenced by VideoFilterDialog::SetCoverFile().

◆ getChangedState()

unsigned int VideoFilterSettings::getChangedState ( )
inline

Member Data Documentation

◆ FILTER_MASK

const unsigned int VideoFilterSettings::FILTER_MASK = 0xFFFE
static

Definition at line 77 of file videofilter.h.

◆ SORT_MASK

const unsigned int VideoFilterSettings::SORT_MASK = 0x1
static

Definition at line 78 of file videofilter.h.

◆ m_category

int VideoFilterSettings::m_category {kCategoryFilterAll}
private

◆ m_genre

int VideoFilterSettings::m_genre {kGenreFilterAll}
private

◆ m_country

int VideoFilterSettings::m_country {kCountryFilterAll}
private

◆ m_cast

int VideoFilterSettings::m_cast {kCastFilterAll}
private

◆ m_year

int VideoFilterSettings::m_year {kYearFilterAll}
private

◆ m_runtime

int VideoFilterSettings::m_runtime {kRuntimeFilterAll}
private

◆ m_userrating

int VideoFilterSettings::m_userrating {kUserRatingFilterAll}
private

◆ m_browse

int VideoFilterSettings::m_browse {kBrowseFilterAll}
private

◆ m_watched

int VideoFilterSettings::m_watched {kWatchedFilterAll}
private

◆ m_inetref

int VideoFilterSettings::m_inetref {kInetRefFilterAll}
private

◆ m_coverfile

int VideoFilterSettings::m_coverfile {kCoverFileFilterAll}
private

◆ m_orderby

ordering VideoFilterSettings::m_orderby {kOrderByTitle}
private

◆ m_parental_level

ParentalLevel::Level VideoFilterSettings::m_parental_level {ParentalLevel::plNone}
private

Definition at line 235 of file videofilter.h.

Referenced by getParentalLevel(), matches_filter(), operator=(), and setParentalLevel().

◆ m_prefix

QString VideoFilterSettings::m_prefix
private

Definition at line 236 of file videofilter.h.

Referenced by operator=(), saveAsDefault(), and VideoFilterSettings().

◆ m_textfilter

QString VideoFilterSettings::m_textfilter
private

Definition at line 237 of file videofilter.h.

Referenced by getTextFilter(), matches_filter(), operator=(), saveAsDefault(), and setTextFilter().

◆ m_season

int VideoFilterSettings::m_season {-1}
private

Definition at line 238 of file videofilter.h.

Referenced by matches_filter(), operator=(), and setTextFilter().

◆ m_episode

int VideoFilterSettings::m_episode {-1}
private

Definition at line 239 of file videofilter.h.

Referenced by matches_filter(), operator=(), and setTextFilter().

◆ m_insertdate

QDate VideoFilterSettings::m_insertdate
private

Definition at line 240 of file videofilter.h.

Referenced by matches_filter(), operator=(), and setTextFilter().

◆ m_re_season

const QRegExp VideoFilterSettings::m_re_season {"(\\d+)[xX](\\d*)"}
private

Definition at line 241 of file videofilter.h.

Referenced by setTextFilter().

◆ m_re_date

const QRegExp VideoFilterSettings::m_re_date {"-(\\d+)([dmw])"}
private

Definition at line 242 of file videofilter.h.

Referenced by setTextFilter().

◆ m_changed_state

unsigned int VideoFilterSettings::m_changed_state {0}
private

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