QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsDvdDirectory Class Reference

A class which describes a directory on DVD. More...

Inheritance diagram for QtsDvdDirectory:
QtsDvdFile

Public Member Functions

 QtsDvdDirectory (const QString &path=QString(), int startSector=-1, int sizeInBytes=0)
 Constructor. More...
 
virtual ~QtsDvdDirectory ()
 Virtual destructor. More...
 
virtual void clear () Q_DECL_OVERRIDE
 Clear the content of this object. More...
 
QList< QtsDvdFilePtrfiles () const
 Get the list of all files in this directory. More...
 
QtsDvdFile searchFile (const QString &fileName, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
 Search a file in the directory. More...
 
QtsDvdFile searchPath (const QString &path, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
 Search a file in the directory tree. More...
 
QtsDvdFile searchPath (const QStringList &path, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
 Search a file in the directory tree. More...
 
QtsDvdFile searchPath (QStringList::ConstIterator begin, QStringList::ConstIterator end, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
 Search a file in the directory tree. More...
 
QList< QtsDvdDirectoryPtrsubDirectories () const
 Get the list of all subdirectories in this directory. More...
 
- Public Member Functions inherited from QtsDvdFile
 QtsDvdFile (const QString &path=QString(), int startSector=-1, int sizeInBytes=0)
 Constructor. More...
 
virtual ~QtsDvdFile ()
 Virtual destructor. More...
 
QString description () const
 Get the file description. More...
 
int endSector () const
 Get the end sector (the one after the last sector) on DVD media. More...
 
bool isValid () const
 Check if this object contains a valid file description. More...
 
bool isVob () const
 Check if the file is a VOB one, possibly encrypted. More...
 
QString name () const
 Get the file name, without directory. More...
 
bool operator< (const QtsDvdFile &other)
 Operator "less than" to sort files. More...
 
QString path () const
 Get the file path with directory from DVD root. More...
 
int sectorCount () const
 Get the file size in sectors. More...
 
int sizeInBytes () const
 Get the file size in bytes. More...
 
int startSector () const
 Get the first sector on DVD media. More...
 

Private Attributes

QList< QtsDvdFilePtr_files
 All files in this directory. More...
 
QList< QtsDvdDirectoryPtr_subDirectories
 All subdirectories in this directory. More...
 

Friends

class QtsDvdMedia
 

Additional Inherited Members

- Protected Attributes inherited from QtsDvdFile
QString _path
 File name with directory from DVD root. More...
 
int _sector
 First sector on DVD media. More...
 
int _size
 Size in bytes. More...
 

Detailed Description

A class which describes a directory on DVD.

Constructor & Destructor Documentation

◆ QtsDvdDirectory()

QtsDvdDirectory::QtsDvdDirectory ( const QString &  path = QString(),
int  startSector = -1,
int  sizeInBytes = 0 
)

Constructor.

Parameters
[in]pathFile name with directory from DVD root.
[in]startSectorFirst sector on DVD media.
[in]sizeInBytesSize in bytes.

◆ ~QtsDvdDirectory()

QtsDvdDirectory::~QtsDvdDirectory ( )
virtual

Virtual destructor.

Member Function Documentation

◆ subDirectories()

QList<QtsDvdDirectoryPtr> QtsDvdDirectory::subDirectories ( ) const
inline

Get the list of all subdirectories in this directory.

Returns
The list of all subdirectories in this directory.

◆ files()

QList<QtsDvdFilePtr> QtsDvdDirectory::files ( ) const
inline

Get the list of all files in this directory.

Returns
The list of all files in this directory.

◆ searchFile()

QtsDvdFile QtsDvdDirectory::searchFile ( const QString &  fileName,
Qt::CaseSensitivity  cs = Qt::CaseInsensitive 
) const

Search a file in the directory.

Parameters
[in]fileNameName of the file to search. Must be a simple name (no directory).
[in]csCase sensitivity when looking for file names.
Returns
Description of the file. Return an invalid file if not found.

◆ searchPath() [1/3]

QtsDvdFile QtsDvdDirectory::searchPath ( const QString &  path,
Qt::CaseSensitivity  cs = Qt::CaseInsensitive 
) const

Search a file in the directory tree.

Parameters
[in]pathEither a simple file or a path with directory components.
[in]csCase sensitivity when looking for file names.
Returns
Description of the file. Return an invalid file if not found.

◆ searchPath() [2/3]

QtsDvdFile QtsDvdDirectory::searchPath ( const QStringList &  path,
Qt::CaseSensitivity  cs = Qt::CaseInsensitive 
) const

Search a file in the directory tree.

Parameters
[in]pathA list of directory components, ending with the file name.
[in]csCase sensitivity when looking for file names.
Returns
Description of the file. Return an invalid file if not found.

◆ searchPath() [3/3]

QtsDvdFile QtsDvdDirectory::searchPath ( QStringList::ConstIterator  begin,
QStringList::ConstIterator  end,
Qt::CaseSensitivity  cs = Qt::CaseInsensitive 
) const

Search a file in the directory tree.

Parameters
[in]beginIterator to a list of directory components, ending with the file name.
[in]endIterator past the end of the list.
[in]csCase sensitivity when looking for file names.
Returns
Description of the file. Return an invalid file if not found.

◆ clear()

void QtsDvdDirectory::clear ( )
virtual

Clear the content of this object.

Reimplemented from QtsDvdFile.

Friends And Related Function Documentation

◆ QtsDvdMedia

friend class QtsDvdMedia
friend

Member Data Documentation

◆ _subDirectories

QList<QtsDvdDirectoryPtr> QtsDvdDirectory::_subDirectories
private

All subdirectories in this directory.

◆ _files

QList<QtsDvdFilePtr> QtsDvdDirectory::_files
private

All files in this directory.


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