Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Components
Directories
DirectorySelectionHandler.h
1
/* DirectorySelectionHandler.h
2
*
3
* Copyright (C) 2011-2024 Michael Lugmair
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef DIRECTORYSELECTIONHANDLER_H
22
#define DIRECTORYSELECTIONHANDLER_H
23
24
#include "Utils/Pimpl.h"
25
#include <QObject>
26
27
namespace
Library
28
{
29
class
Info
;
30
class
Manager
;
31
}
32
33
class
FileOperations
;
34
class
LocalLibrary
;
35
class
QStringList;
36
37
class
DirectorySelectionHandler :
38
public
QObject
39
{
40
Q_OBJECT
41
PIMPL(DirectorySelectionHandler)
42
43
signals:
44
void
sigLibrariesChanged();
45
void
sigFileOperationStarted();
46
void
sigFileOperationFinished();
47
48
private
:
49
FileOperations
* createFileOperation();
50
51
public
:
52
explicit
DirectorySelectionHandler(
Library::Manager
* libraryManager, QObject* parent =
nullptr
);
53
~DirectorySelectionHandler()
override
;
54
55
void
playNext(
const
QStringList& paths)
const
;
56
void
createPlaylist(
const
QStringList& paths,
bool
createNewPlaylist)
const
;
57
void
appendTracks(
const
QStringList& paths)
const
;
58
void
prepareTracksForPlaylist(
const
QStringList& paths,
bool
createNewPlaylist)
const
;
59
60
void
requestImport(LibraryId libId,
const
QStringList& paths,
const
QString& targetDirectory)
const
;
61
62
void
setLibraryId(LibraryId libId);
63
[[nodiscard]] LibraryId libraryId()
const
;
64
65
[[nodiscard]]
Library::Info
libraryInfo()
const
;
66
[[nodiscard]]
LocalLibrary
* libraryInstance()
const
;
67
68
void
copyPaths(
const
QStringList& paths,
const
QString& target);
69
void
movePaths(
const
QStringList& paths,
const
QString& target);
70
void
renamePath(
const
QString& path,
const
QString& newName);
71
void
renameByExpression(
const
QString& path,
const
QString& expression);
72
void
deletePaths(
const
QStringList& paths);
73
74
private
slots:
75
void
librariesChanged();
76
};
77
78
#endif
// DIRECTORYSELECTIONHANDLER_H
FileOperations
Definition
FileOperations.h:36
Library::Info
The Info class.
Definition
LibraryInfo.h:38
Library::Manager
Definition
LibraryManager.h:50
LocalLibrary
Definition
LocalLibrary.h:38
Generated on
for Sayonara Player by
1.17.0