SilentEye 0.4.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

SilentEyeFramework::Media Class Reference

Generic representation of Media which can load and hide specific data according to it's format. More...

#include <media.h>

Inheritance diagram for SilentEyeFramework::Media:
SilentEyeFramework::Audio SilentEyeFramework::Image SilentEyeFramework::Video SEFormatWAV::AudioWav SEFormatBMP::ImageBMP SEFormatJPEG::ImageJPEG SEFormatJPEG::ImageJPEG

List of all members.

Public Types

enum  Type { IMAGE, AUDIO, VIDEO, UNKNOW }

Public Member Functions

 Media ()
 ~Media ()
 Media (const QString &filepath)
 Media (const Media &img)
 Media (Media *img)
Type type () const
QPointer< EncodedDataencodedData () const
void setEncodedData (QPointer< EncodedData > data)
QString filePath () const
QString baseName () const
QString shortName () const
void setShortName (const QString shortName)
bool isDataLoaded () const
virtual quint32 capacity () const
virtual bool loadData ()
virtual bool saveToDir (QString &outputDirPath)

Protected Member Functions

QString fileName (QString filePath)
void computeNewFileName (QString extension)

Protected Attributes

Type m_type
 Media type (Image/Audio/Video)
QPointer< EncodedDatam_data
 Embedded data.
QString m_filePath
 Media file path.
QString m_shortName
 Media name.
bool m_isLoaded
 Indicate when Media contains some data.

Detailed Description

Generic representation of Media which can load and hide specific data according to it's format.

Definition at line 27 of file media.h.


Member Enumeration Documentation

Enumerator:
IMAGE 
AUDIO 
VIDEO 
UNKNOW 

Definition at line 30 of file media.h.


Constructor & Destructor Documentation

SilentEyeFramework::Media::Media ( )

Definition at line 20 of file media.cpp.

References m_filePath, m_isLoaded, m_shortName, m_type, SEFormatBMP::setObjectName(), and UNKNOW.

SilentEyeFramework::Media::~Media ( )

Definition at line 57 of file media.cpp.

SilentEyeFramework::Media::Media ( const QString &  filepath)
SilentEyeFramework::Media::Media ( const Media img)
SilentEyeFramework::Media::Media ( Media img)

Member Function Documentation

QString SilentEyeFramework::Media::baseName ( ) const

Definition at line 114 of file media.cpp.

References m_filePath.

Referenced by computeNewFileName().

quint32 SilentEyeFramework::Media::capacity ( ) const [virtual]
void SilentEyeFramework::Media::computeNewFileName ( QString  extension) [protected]

Definition at line 124 of file media.cpp.

References baseName(), m_filePath, and m_shortName.

QPointer< EncodedData > SilentEyeFramework::Media::encodedData ( ) const

Definition at line 66 of file media.cpp.

References m_data.

Referenced by Media().

QString SilentEyeFramework::Media::fileName ( QString  filePath) [protected]

Definition at line 119 of file media.cpp.

Referenced by Media().

QString SilentEyeFramework::Media::filePath ( ) const

Definition at line 88 of file media.cpp.

References m_filePath.

Referenced by Media(), SilentEye::MainWindow::playMedia(), and SilentEye::PropertyDialog::setMedia().

bool SilentEyeFramework::Media::isDataLoaded ( ) const

Definition at line 93 of file media.cpp.

References m_isLoaded.

bool SilentEyeFramework::Media::loadData ( ) [virtual]
bool SilentEyeFramework::Media::saveToDir ( QString &  outputDirPath) [virtual]
void SilentEyeFramework::Media::setEncodedData ( QPointer< EncodedData data)

Definition at line 71 of file media.cpp.

References m_data.

void SilentEyeFramework::Media::setShortName ( const QString  shortName)

Definition at line 83 of file media.cpp.

References m_shortName, and shortName().

QString SilentEyeFramework::Media::shortName ( ) const

Definition at line 78 of file media.cpp.

References m_shortName.

Referenced by Media(), and setShortName().

Media::Type SilentEyeFramework::Media::type ( ) const

Member Data Documentation

Indicate when Media contains some data.

Definition at line 42 of file media.h.

Referenced by isDataLoaded(), SEFormatWAV::AudioWav::loadData(), SEFormatBMP::ImageBMP::loadData(), Media(), and SEFormatBMP::ImageBMP::setNbBits().

Media type (Image/Audio/Video)

Definition at line 34 of file media.h.

Referenced by Media(), and type().


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