Sayonara Player
src
Gui
Preferences
Library
ChangeOperations.h
1
/* ChangeOperations.h */
2
3
/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
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 CHANGEOPERATIONS_H
22
#define CHANGEOPERATIONS_H
23
24
#include "Utils/Pimpl.h"
25
26
namespace
Library
27
{
28
class
Manager;
29
}
30
31
class
ChangeOperation
32
{
33
public
:
34
ChangeOperation
();
35
virtual
~
ChangeOperation
();
36
virtual
bool
exec()=0;
37
38
Library::Manager
* manager()
const
;
39
};
40
41
class
MoveOperation
:
42
public
ChangeOperation
43
{
44
PIMPL(
MoveOperation
)
45
46
public
:
47
MoveOperation
(
int
from,
int
to);
48
~
MoveOperation
();
49
50
bool
exec()
override
;
51
};
52
53
54
class
RenameOperation
:
55
public
ChangeOperation
56
{
57
PIMPL(
RenameOperation
)
58
59
public
:
60
RenameOperation
(LibraryId
id
,
const
QString& new_name);
61
~
RenameOperation
();
62
63
bool
exec()
override
;
64
};
65
66
class
RemoveOperation
:
67
public
ChangeOperation
68
{
69
PIMPL(
RemoveOperation
)
70
71
public
:
72
RemoveOperation
(LibraryId
id
);
73
~
RemoveOperation
();
74
75
bool
exec()
override
;
76
};
77
78
class
AddOperation
:
79
public
ChangeOperation
80
{
81
PIMPL(
AddOperation
)
82
83
public
:
84
AddOperation
(
const
QString& name,
const
QString& path);
85
~
AddOperation
();
86
87
bool
exec()
override
;
88
};
89
90
class
ChangePathOperation
:
91
public
ChangeOperation
92
{
93
PIMPL(
ChangePathOperation
)
94
95
public
:
96
ChangePathOperation
(LibraryId
id
,
const
QString& new_path);
97
~
ChangePathOperation
();
98
99
bool
exec()
override
;
100
};
101
102
#endif // CHANGEOPERATIONS_H
MoveOperation
Definition:
ChangeOperations.h:43
ChangeOperation
Definition:
ChangeOperations.h:32
RenameOperation
Definition:
ChangeOperations.h:56
ChangePathOperation
Definition:
ChangeOperations.h:92
RemoveOperation
Definition:
ChangeOperations.h:68
Library
An interface class needed when implementing a library plugin.
Definition:
LocalLibraryWatcher.h:31
AddOperation
Definition:
ChangeOperations.h:80
Library::Manager
Definition:
LibraryManager.h:36
Generated on Wed Jan 6 2021 00:00:00 for Sayonara Player by
1.8.20