Sayonara Player
MetaDataList.h
1  /* MetaDataList.h */
2 
3 /* Copyright (C) 2011-2017 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 METADATALIST_H
22 #define METADATALIST_H
23 
24 #include "MetaData.h"
25 #include "MetaDataFwd.h"
26 #include "Helper/typedefs.h"
27 
33 namespace SP
34 {
35  template<typename T>
36  class Set;
37 }
38 
39 class MetaDataList :
40  public QList<MetaData>
41 {
42 private:
43  int _cur_played_track;
44 
45 public:
46 
47  MetaDataList();
48  MetaDataList(const MetaDataList&);
49 
50  ~MetaDataList();
51 
52  void set_cur_play_track(int idx);
53  int get_cur_play_track() const;
54 
55 
56  bool contains(const MetaData& md) const;
57  MetaDataList& remove_track(int idx);
58  MetaDataList& remove_tracks(const SP::Set<int>& rows);
59  MetaDataList& remove_tracks(int first, int last);
60 
61  MetaDataList& move_tracks(const SP::Set<int>& indexes, int tgt_idx);
62  MetaDataList& copy_tracks(const SP::Set<int>& indexes, int tgt_idx);
63  MetaDataList& insert_tracks(const MetaDataList& v_md, int tgt_idx);
64 
65  IdxList findTracks(int id) const;
66  IdxList findTracks(const QString&) const;
67 
68  QStringList toStringList() const;
69 
70  MetaDataList& operator <<(const MetaDataList& v_md);
71  MetaDataList& operator <<(const MetaData& md);
72 
73  bool contains(qint32 id) const;
74  void remove_duplicates();
75 };
76 
77 #endif // METADATALIST_H
The MetaDataList class.
Definition: AbstractPlaylist.h:34
The MetaData class MetaDataHelper.
Definition: MetaData.h:55
Definition: MetaDataList.h:39
Set namespace defines the setting: Which key and which type.
Definition: SettingKey.h:200
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: AbstractPlaylist.h:37
Definition: org_mpris_media_player2_adaptor.h:20