first re-commit.
This commit is contained in:
65
swusbcontrol.h
Normal file
65
swusbcontrol.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
|
||||
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
|
Reference in New Issue
Block a user