tooltip for playlist model
[jkt-jerboa.git] / include / Types.h
blob5e4a95d24adbd0c8ba2304a5c377a63fa094267c
1 /* LICENSE NOTICE
2 This file is part of Jerboa.
4 Jerboa is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option), version 3 of the license.
9 Jerboa is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Jerboa. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef _JERBOA_TYPES_H
18 #define _JERBOA_TYPES_H
20 #include <QFlags>
21 #include <QMap>
22 #include <QObject>
24 /// All-containing namespace for Jerboa.
25 namespace Jerboa
27 /// List of supported looping modes.
28 enum LoopMode
30 /// No looping at all.
31 LoopNone,
32 /// Loop the current track.
33 LoopTrack,
34 /// Loop the entire playlist.
35 LoopPlaylist
38 /// List of supported shuffle modes.
39 enum ShuffleMode
41 /// No shuffling.
42 ShuffleNone,
43 /// Shuffle next track.
44 ShuffleTracks,
45 /** Shuffle albums.
46 * Plays continuously until the end of an album, then jumps to a random
47 * track in the playlist. The player then goes backwards until it gets
48 * to a track which is in a different album, then goes forwards one more.
50 ShuffleAlbums
53 /// Possible ReplayGain modes
54 enum ReplayGainMode {
55 /// Normalise volume across a whole album; relative volume differences are kept
56 AlbumMode,
57 /// Normalise each track separately - relative differences between tracks in the album are lost
58 TrackMode
61 /** List of component types.
62 * A plugin can provide zero or more components, each implementing
63 * one of these interfaces. These should be returned by
64 * Plugin::components()
66 enum ComponentInterface
68 /** A music player.
69 * This should be qobject_cast'able to a PlayerInterface.
71 PlayerCompoment,
73 /** A playlist.
74 * This should be qobject_cast'able to a PlaylistInterface.
76 PlaylistComponent
78 /// A component list
79 typedef QMap<ComponentInterface, QObject*> ComponentMap;
81 /** List of possible actions on the player.
82 * The values specified are compatible with MPRIS.
83 * All of these are supported at some time or another, in varying
84 * combinations.
86 * There is also a QFlags<Action> class, `Actions'.
88 enum Action
90 /// Base action.
91 NoAction = 0,
92 /// Skip to next track.
93 SkipNextAction = 1 << 0,
94 /// Skip previous track.
95 SkipPreviousAction = 1 << 1,
96 /// Pause track
97 PauseAction = 1 << 2,
98 /// Play/unpause track
99 PlayAction = 1 << 3,
100 /** Seek to a position in the current track.
101 * This is not used internally, and exists only because it's in
102 * MPRIS.
104 SeekAction = 1 << 4,
105 /** Get metadata for the current track.
106 * This is not used internally, and exists only because it's in
107 * MPRIS.
109 GetMetadataAction = 1 << 5,
110 /** Get a list of tracks in the current playlist.
111 * This is not used internally, and exists only because it's in
112 * MPRIS.
114 GetTracklistAction = 1 << 6,
115 /** Stop the current track.
116 * This is only used internally, and is *NOT* part of MPRIS.
118 StopAction = 1 << 7
121 Q_DECLARE_FLAGS(Actions, Action);
124 Q_DECLARE_OPERATORS_FOR_FLAGS(Jerboa::Actions);
125 #endif