Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SoundClip Class Reference
+ Inheritance diagram for SoundClip:
Inheritance graph
[legend]
+ Collaboration diagram for SoundClip:
Collaboration graph
[legend]

Public Member Functions

 SoundClip (const SoundClip &)
 
SoundClip & operator= (const SoundClip &a)
 
SoundClip * clone () const override
 
Status init (const QString &strSoundFile)
 
bool isValid () const
 
void setSoundClipName (const QString &sName)
 
QString soundClipName () const
 
void attachPlayer (SoundPlayer *player)
 
void detachPlayer ()
 
SoundPlayer * player () const
 
void play ()
 
void playFromPosition (int frameNumber, int fps)
 
void pause ()
 
void stop ()
 
int64_t duration () const
 
void setDuration (const int64_t &duration)
 
void updateLength (int fps)
 
- Public Member Functions inherited from KeyFrame
 KeyFrame (const KeyFrame &k2)
 
KeyFrame & operator= (const KeyFrame &k2)
 
int pos () const
 
void setPos (int position)
 
int length () const
 
void setLength (int len)
 
void modification ()
 
void setModified (bool b)
 
bool isModified () const
 
void setSelected (bool b)
 
bool isSelected () const
 
QString fileName () const
 
void setFileName (QString strFileName)
 
void addEventListener (KeyFrameEventListener *)
 
void removeEventListner (KeyFrameEventListener *)
 
virtual KeyFrame * clone () const
 
virtual void loadFile ()
 
virtual void unloadFile ()
 
virtual bool isLoaded () const
 
virtual quint64 memoryUsage ()
 

Private Attributes

std::shared_ptr< SoundPlayer > mPlayer
 
QString mOriginalSoundClipName
 
int64_t mDuration = 0
 

Detailed Description

Definition at line 26 of file soundclip.h.

Constructor & Destructor Documentation

◆ SoundClip() [1/2]

SoundClip::SoundClip ( )
explicit

Definition at line 25 of file soundclip.cpp.

◆ SoundClip() [2/2]

SoundClip::SoundClip ( const SoundClip &  s2)
explicit

Definition at line 29 of file soundclip.cpp.

◆ ~SoundClip()

SoundClip::~SoundClip ( )
override

Definition at line 34 of file soundclip.cpp.

Member Function Documentation

◆ attachPlayer()

void SoundClip::attachPlayer ( SoundPlayer *  player)

Definition at line 83 of file soundclip.cpp.

◆ clone()

SoundClip * SoundClip::clone ( ) const
overridevirtual

Reimplemented from KeyFrame.

Definition at line 51 of file soundclip.cpp.

◆ detachPlayer()

void SoundClip::detachPlayer ( )

Definition at line 89 of file soundclip.cpp.

◆ duration()

int64_t SoundClip::duration ( ) const

Definition at line 134 of file soundclip.cpp.

◆ init()

Status SoundClip::init ( const QString &  strSoundFile)

Definition at line 58 of file soundclip.cpp.

◆ isValid()

bool SoundClip::isValid ( ) const

Definition at line 68 of file soundclip.cpp.

◆ operator=()

SoundClip & SoundClip::operator= ( const SoundClip &  a)

Definition at line 39 of file soundclip.cpp.

◆ pause()

void SoundClip::pause ( )

Definition at line 118 of file soundclip.cpp.

◆ play()

void SoundClip::play ( )

Definition at line 94 of file soundclip.cpp.

◆ player()

SoundPlayer * SoundClip::player ( ) const
inline

Definition at line 44 of file soundclip.h.

◆ playFromPosition()

void SoundClip::playFromPosition ( int  frameNumber,
int  fps 
)

Definition at line 102 of file soundclip.cpp.

◆ setDuration()

void SoundClip::setDuration ( const int64_t &  duration)

Definition at line 139 of file soundclip.cpp.

◆ setSoundClipName()

void SoundClip::setSoundClipName ( const QString &  sName)
inline

Definition at line 39 of file soundclip.h.

◆ soundClipName()

QString SoundClip::soundClipName ( ) const
inline

Definition at line 40 of file soundclip.h.

◆ stop()

void SoundClip::stop ( )

Definition at line 126 of file soundclip.cpp.

◆ updateLength()

void SoundClip::updateLength ( int  fps)

Definition at line 144 of file soundclip.cpp.

Member Data Documentation

◆ mDuration

int64_t SoundClip::mDuration = 0
private

Definition at line 63 of file soundclip.h.

◆ mOriginalSoundClipName

QString SoundClip::mOriginalSoundClipName
private

Definition at line 59 of file soundclip.h.

◆ mPlayer

std::shared_ptr<SoundPlayer> SoundClip::mPlayer
private

Definition at line 57 of file soundclip.h.


The documentation for this class was generated from the following files:
  • core_lib/src/structure/soundclip.h
  • core_lib/src/structure/soundclip.cpp
Generated on Thu May 8 2025 04:47:54 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39