MythTV  master
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Device Class Reference

A device containing images (ie. USB stick, CD, storage group etc) More...

Collaboration diagram for Device:
Collaboration graph
[legend]

Public Member Functions

 Device (QString name, QString mount, MythMediaDevice *media=nullptr, QTemporaryDir *import=nullptr)
 
 ~Device ()
 Delete device, its thumbnails and any imported images. More...
 
void Close (bool eject=false)
 Releases device. More...
 
void RemoveThumbs (void)
 Delete thumbnails associated with device. More...
 
bool isImport () const
 
bool isPresent () const
 
void setPresent (MythMediaDevice *media)
 

Static Public Member Functions

static void RemoveDirContents (const QString &path)
 Clears all files and sub-dirs within a directory. More...
 

Public Attributes

bool m_present
 True when gallery UI is running & device is useable. Always true for imports. More...
 
QString m_name
 Device model/volume/id. More...
 
QString m_mount
 Mountpoint. More...
 
QString m_thumbs
 Dir sub-path of device thumbnails. More...
 
MythMediaDevicem_media
 Set for MediaMonitor devices only. More...
 
QTemporaryDir * m_dir
 Dir path of images: import devices only. More...
 

Detailed Description

A device containing images (ie. USB stick, CD, storage group etc)

Definition at line 33 of file imagemanager.cpp.

Constructor & Destructor Documentation

◆ Device()

Device::Device ( QString  name,
QString  mount,
MythMediaDevice media = nullptr,
QTemporaryDir *  import = nullptr 
)
inline

Definition at line 36 of file imagemanager.cpp.

◆ ~Device()

Device::~Device ( )
inline

Delete device, its thumbnails and any imported images.

Definition at line 47 of file imagemanager.cpp.

Member Function Documentation

◆ Close()

void Device::Close ( bool  eject = false)
inline

Releases device.

Definition at line 61 of file imagemanager.cpp.

Referenced by DeviceManager::CloseDevices(), and ~Device().

◆ RemoveDirContents()

static void Device::RemoveDirContents ( const QString &  path)
inlinestatic

Clears all files and sub-dirs within a directory.

Parameters
pathDir to clear

Definition at line 88 of file imagemanager.cpp.

Referenced by RemoveThumbs().

◆ RemoveThumbs()

void Device::RemoveThumbs ( void  )
inline

Delete thumbnails associated with device.

Definition at line 95 of file imagemanager.cpp.

Referenced by DeviceManager::CloseDevices(), and ~Device().

◆ isImport()

bool Device::isImport ( ) const
inline

Definition at line 105 of file imagemanager.cpp.

Referenced by Close().

◆ isPresent()

bool Device::isPresent ( ) const
inline

Definition at line 106 of file imagemanager.cpp.

Referenced by DeviceManager::GetAbsentees().

◆ setPresent()

void Device::setPresent ( MythMediaDevice media)
inline

Definition at line 107 of file imagemanager.cpp.

Member Data Documentation

◆ m_present

bool Device::m_present

True when gallery UI is running & device is useable. Always true for imports.

Definition at line 110 of file imagemanager.cpp.

Referenced by Close(), isPresent(), and setPresent().

◆ m_name

QString Device::m_name

Device model/volume/id.

Definition at line 111 of file imagemanager.cpp.

Referenced by Close(), and Device().

◆ m_mount

QString Device::m_mount

Mountpoint.

Definition at line 112 of file imagemanager.cpp.

Referenced by Close(), DeviceManager::CloseDevices(), DeviceManager::GetDeviceDirs(), and ~Device().

◆ m_thumbs

QString Device::m_thumbs

Dir sub-path of device thumbnails.

Definition at line 113 of file imagemanager.cpp.

Referenced by Device(), and RemoveThumbs().

◆ m_media

MythMediaDevice* Device::m_media

Set for MediaMonitor devices only.

Definition at line 114 of file imagemanager.cpp.

Referenced by Close(), and setPresent().

◆ m_dir

QTemporaryDir* Device::m_dir

Dir path of images: import devices only.

Definition at line 115 of file imagemanager.cpp.

Referenced by isImport(), and ~Device().


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