LeechCraft  0.6.70-15082-g543737046d
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 
76  typedef QList<TagInfo> TagInfos_t;
77 
80  struct ArtistInfo
81  {
84  QString Name_;
85 
88  QString ShortDesc_;
89 
92  QString FullDesc_;
93 
96  QUrl Image_;
97 
100  QUrl LargeImage_;
101 
110  QUrl Page_;
111 
115 
116  bool operator== (const ArtistInfo& other) const = default;
117  bool operator!= (const ArtistInfo& other) const = default;
118  };
119 
133  struct SimilarityInfo
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 
Media::TagInfo::Name_
QString Name_
Name of the tag.
Definition: audiostructs.h:74
Media::AudioInfo::Other_
QVariantMap Other_
Other fields of this audio info.
Definition: audiostructs.h:68
Media::SimilarityInfo::SimilarTo_
QStringList SimilarTo_
Names of the artists similar to this one.
Definition: audiostructs.h:153
Media::TagInfo::operator!=
bool operator!=(const TagInfo &other) const =default
QList< TagInfo >
Media::AudioInfo::Artist_
QString Artist_
The artist performing this track.
Definition: audiostructs.h:36
Media::ArtistInfo
A structure describing an artist.
Definition: audiostructs.h:86
LC::Util::Either
Definition: either.h:33
Media::ArtistInfo::Tags_
TagInfos_t Tags_
Genres this artist plays in.
Definition: audiostructs.h:120
Media::ArtistInfo::FullDesc_
QString FullDesc_
Full artist description, not including the short description.
Definition: audiostructs.h:98
Media::ArtistInfo::Page_
QUrl Page_
An URL to a page describing this artist.
Definition: audiostructs.h:116
Media::AudioInfo::Title_
QString Title_
The title of this track.
Definition: audiostructs.h:44
Media::ArtistInfo::Name_
QString Name_
The artist name.
Definition: audiostructs.h:90
Media::ArtistInfo::ShortDesc_
QString ShortDesc_
Short artist description.
Definition: audiostructs.h:94
Media::SimilarityInfo::Artist_
ArtistInfo Artist_
Information about artist this similary info is about.
Definition: audiostructs.h:143
Media::ArtistInfo::LargeImage_
QUrl LargeImage_
A bigger artist image.
Definition: audiostructs.h:106
Media::ArtistInfo::operator!=
bool operator!=(const ArtistInfo &other) const =default
Media::AudioInfo
Describes a single audio track.
Definition: audiostructs.h:26
Media::ArtistInfo::operator==
bool operator==(const ArtistInfo &other) const =default
Media
Definition: audiostructs.h:16
Media::TagInfo::operator==
bool operator==(const TagInfo &other) const =default
Media::AudioInfo::Album_
QString Album_
The album this track is on.
Definition: audiostructs.h:40
Media::SimilarityInfo::operator!=
bool operator!=(const SimilarityInfo &other) const =default
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QVariantList *)
Media::AudioInfo::Year_
qint32 Year_
The year of the Album_ this track is on.
Definition: audiostructs.h:56
Media::TagInfos_t
QList< TagInfo > TagInfos_t
A list of tags.
Definition: audiostructs.h:82
Media::AudioInfo::Length_
qint32 Length_
The length of this track in seconds.
Definition: audiostructs.h:52
Media::AudioInfo::Genres_
QStringList Genres_
The genres of this track.
Definition: audiostructs.h:48
Media::ArtistInfo::Image_
QUrl Image_
An URL of a thumbnail artist image.
Definition: audiostructs.h:102
Media::AudioInfo::operator==
bool operator==(const AudioInfo &other) const =default
Media::SimilarityInfo
Describes similarty information of an artist.
Definition: audiostructs.h:139
Media::SimilarityInfo::operator==
bool operator==(const SimilarityInfo &other) const =default
Media::TagInfo
Information about a tag like a genre.
Definition: audiostructs.h:70
Media::AudioInfo::operator!=
bool operator!=(const AudioInfo &other) const =default
Media::AudioInfo::TrackNumber_
qint32 TrackNumber_
The number of this track on the Album_.
Definition: audiostructs.h:60
Media::SimilarityInfo::Similarity_
int Similarity_
Similarity in percents.
Definition: audiostructs.h:149
eitherfwd.h