Filer
Public Member Functions | Static Public Member Functions | List of all members
VolumeWatcher Class Reference

The VolumeWatcher class monitors changes in a directory and manages symlinks to new directories. More...

#include <VolumeWatcher.h>

Inheritance diagram for VolumeWatcher:
Inheritance graph
[legend]
Collaboration diagram for VolumeWatcher:
Collaboration graph
[legend]

Public Member Functions

 VolumeWatcher (QObject *parent=nullptr)
 Constructs a VolumeWatcher object. More...
 

Static Public Member Functions

static QString getMediaPath ()
 
static QString getRootDiskName ()
 

Detailed Description

The VolumeWatcher class monitors changes in a directory and manages symlinks to new directories.

This class uses QFileSystemWatcher to keep track of changes in the /media directory. When a new subdirectory appears, it creates a symlink to that subdirectory on the user's desktop. If a subdirectory disappears, the corresponding symlink is removed. @Note This class should be replaced by a more appropriate solution, e.g., using a QProxyModel to display the contents of the /media directory alongside the contents of the user's home directory without the need to create symlinks.

Constructor & Destructor Documentation

◆ VolumeWatcher()

VolumeWatcher::VolumeWatcher ( QObject *  parent = nullptr)
explicit

Constructs a VolumeWatcher object.

Parameters
parentThe parent QObject.

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