blob: cb7cd4a77f85c648e50af8cfb62b9d26709d7f61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef TRACKDROPTARGET_H
#define TRACKDROPTARGET_H
#include <QString>
/// Mixin to mark a widget as a drop target for tracks.
///
/// This class is *not* derived from QObject (inheriting from 2 QObject classes
/// is not possible). Therefore, the signals are marked as pure-virtual and
/// you need to use the `emitFoo` methods to emit a signal.
class TrackDropTarget {
public:
virtual ~TrackDropTarget() {
}
void emitCloneDeck(const QString& sourceGroup, const QString& targetGroup) {
emit cloneDeck(sourceGroup, targetGroup); // clazy:exclude=incorrect-emit
}
void emitTrackDropped(const QString& filename, const QString& group) {
emit trackDropped(filename, group); // clazy:exclude=incorrect-emit
}
signals:
virtual void trackDropped(QString filename, QString group) = 0;
virtual void cloneDeck(QString sourceGroup, QString targetGroup) = 0;
};
#endif // TRACKDROPTARGET
|