Debian Codegraph @

src/core/capabilities/SourceInfoCapability.h

raw
1 /****************************************************************************************
2 * Copyright (c) 2008 Nikolaj Hald Nielsen <[email protected]> *
3 * *
4 * This program is free software; you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free Software *
6 * Foundation; either version 2 of the License, or (at your option) any later *
7 * version. *
8 * *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
11 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
12 * *
13 * You should have received a copy of the GNU General Public License along with *
14 * this program. If not, see <http://www.gnu.org/licenses/>. *
15 ****************************************************************************************/
16
17 #ifndef SOURCEINFOCAPABILITY_H
18 #define SOURCEINFOCAPABILITY_H
19
20 #include "core/amarokcore_export.h"
21 #include "core/capabilities/Capability.h"
22
23 class QPixmap;
24
25 namespace Capabilities
26 {
27
28 /**
29 This capability allows getting additional information about the source of a meta item. For now, it is intended for allowing the playlist to display a little emblem to let users know if a track is a Magnatune preview track, a lastfm stream or so on...
30
31 @author Nikolaj Hald Nielsen <[email protected]>
32 */
33 class AMAROKCORE_EXPORT SourceInfoCapability : public Capabilities::Capability{
34 public:
35 Q_OBJECT
36 public:
37 /**
38 * Constructor
39 */
40 SourceInfoCapability();
41 /**
42 * Destructor
43 */
44 ~SourceInfoCapability() override;
45
46 /**
47 * Get the human readable name of the source, for instance "Magnatune.com"
48 * @return The name of the source
49 */
50 virtual QString sourceName() = 0;
51 /**
52 * Get a brief human readable description or the source
53 * @return The source description
54 */
55 virtual QString sourceDescription() = 0;
56 /**
57 * Get a small 16x16 pixle emblem that represents the source.
58 * @return The source emblem
59 */
60 virtual QPixmap emblem() = 0;
61
62 /**
63 * Get a path to a scalable (svg) version of the source emblem.
64 */
65 virtual QString scalableEmblem() = 0;
66
67 /**
68 * Get the capabilityInterfaceType of this capability
69 * @return The capabilityInterfaceType ( always Capabilities::Capability::SourceInfo; )
70 */
71 static Type capabilityInterfaceType() { return Capabilities::Capability::SourceInfo; }
72
73 };
74
75 }
76
77 #endif