LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
audiostructs.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QStringList>
12 #include <QVariantMap>
13 #include <QUrl>
14 #include <util/sll/eitherfwd.h>
15 
16 namespace Media
17 {
20  struct AudioInfo
21  {
24  QString Artist_;
25 
28  QString Album_;
29 
32  QString Title_;
33 
36  QStringList Genres_;
37 
40  qint32 Length_ = 0;
41 
44  qint32 Year_ = 0;
45 
48  qint32 TrackNumber_ = 0;
49 
56  QVariantMap Other_;
57 
58  bool operator== (const AudioInfo& other) const = default;
59  bool operator!= (const AudioInfo& other) const = default;
60  };
61 
64  struct TagInfo
65  {
68  QString Name_;
69 
70  bool operator== (const TagInfo& other) const = default;
71  bool operator!= (const TagInfo& other) const = default;
72  };
73 
77 
80  struct ArtistInfo
81  {
84  QString Name_;
85 
88  QString ShortDesc_;
89 
92  QString FullDesc_;
93 
96  QUrl Image_;
97 
101 
110  QUrl Page_;
111 
115 
116  bool operator== (const ArtistInfo& other) const = default;
117  bool operator!= (const ArtistInfo& other) const = default;
118  };
119 
134  {
138 
144 
147  QStringList SimilarTo_;
148 
149  bool operator== (const SimilarityInfo& other) const = default;
150  bool operator!= (const SimilarityInfo& other) const = default;
151  };
152 
156 
158 }
159 
QString Name_
Name of the tag.
Definition: audiostructs.h:68
qint32 Length_
The length of this track in seconds.
Definition: audiostructs.h:40
bool operator==(const ArtistInfo &other) const =default
QList< TagInfo > TagInfos_t
A list of tags.
Definition: audiostructs.h:76
bool operator==(const AudioInfo &other) const =default
Describes a single audio track.
Definition: audiostructs.h:20
QUrl Page_
An URL to a page describing this artist.
Definition: audiostructs.h:110
bool operator!=(const TagInfo &other) const =default
bool operator!=(const AudioInfo &other) const =default
QString FullDesc_
Full artist description, not including the short description.
Definition: audiostructs.h:92
bool operator==(const SimilarityInfo &other) const =default
qint32 Year_
The year of the Album_ this track is on.
Definition: audiostructs.h:44
QString ShortDesc_
Short artist description.
Definition: audiostructs.h:88
Information about a tag like a genre.
Definition: audiostructs.h:64
QVariantMap Other_
Other fields of this audio info.
Definition: audiostructs.h:56
int Similarity_
Similarity in percents.
Definition: audiostructs.h:143
QUrl Image_
An URL of a thumbnail artist image.
Definition: audiostructs.h:96
qint32 TrackNumber_
The number of this track on the Album_.
Definition: audiostructs.h:48
QStringList SimilarTo_
Names of the artists similar to this one.
Definition: audiostructs.h:147
A structure describing an artist.
Definition: audiostructs.h:80
QString Title_
The title of this track.
Definition: audiostructs.h:32
Q_DECLARE_METATYPE(QVariantList *)
bool operator!=(const SimilarityInfo &other) const =default
QString Artist_
The artist performing this track.
Definition: audiostructs.h:24
TagInfos_t Tags_
Genres this artist plays in.
Definition: audiostructs.h:114
Describes similarty information of an artist.
Definition: audiostructs.h:133
bool operator!=(const ArtistInfo &other) const =default
QUrl LargeImage_
A bigger artist image.
Definition: audiostructs.h:100
QString Name_
The artist name.
Definition: audiostructs.h:84
QString Album_
The album this track is on.
Definition: audiostructs.h:28
bool operator==(const TagInfo &other) const =default
ArtistInfo Artist_
Information about artist this similary info is about.
Definition: audiostructs.h:137
QStringList Genres_
The genres of this track.
Definition: audiostructs.h:36