Files
raDIYo/swusbcontrol.h
2025-08-05 22:36:00 +02:00

66 lines
1.3 KiB
C++

/***************************************************************************
source::worx raDIYo
Copyright © 2020-2022 c.holzheuer
chris@sourceworx.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef SWUSBControlCONTROL_H
#define SWUSBControlCONTROL_H
#include <QFileSystemWatcher>
#include <QDirIterator>
#include <QSet>
#include <swsongscontrol.h>
/**
* @brief Control, das PlayLists von USB-Speichern darstellt.
*/
class SWUSBControl : public SWSongsControl
{
Q_OBJECT
public:
explicit SWUSBControl( QWidget* parent, QSettings* settings );
virtual ~SWUSBControl() = default;
signals:
void driveMounted(int);
public slots:
void onItemActivated( QListWidgetItem* item ) override;
void onShow() override;
void onUSBMount( const QString& path );
protected:
void showDirs();
void fetchDirs();
void loadFiles( const QString& fullPath );
QStringList _mediaDirs;
QString _mountDir;
QString _currentDir;
QFileSystemWatcher _watcher;
};
#endif // SWUSBControlCONTROL_H