hydrogen 1.2.6
SoundLibraryInfo.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef SOUNDLIBRARYINFO_H
24#define SOUNDLIBRARYINFO_H
25
26#include <core/License.h>
27#include <core/Object.h>
28#include <vector>
29
30namespace H2Core
31{
32
44
46class SoundLibraryInfo : public H2Core::Object<SoundLibraryInfo>
47{
49 public:
52
59 bool load( const QString& sPath );
60
61 QString getName() const {
62 return m_sName;
63 }
64
65 QString getUrl() const{
66 return m_sURL;
67 }
68
69 QString getInfo() const {
70 return m_sInfo;
71 }
72
73 QString getAuthor() const {
74 return m_sAuthor;
75 }
76
77 QString getCategory() const {
78 return m_sCategory;
79 }
80
81 QString getType() const {
82 return m_sType;
83 }
84
86 return m_license;
87 }
88
89 QString getImage() const {
90 return m_sImage;
91 }
92
96
97 void setName( const QString& name ){
98 m_sName = name;
99 }
100
101 void setUrl(const QString& url){
102 m_sURL = url;
103 }
104
105 void setInfo( const QString& info){
106 m_sInfo = info;
107 }
108
109 void setAuthor( const QString& author ){
110 m_sAuthor = author;
111 }
112
113 void setType( const QString& type){
114 m_sType = type;
115 }
116
117 void setCategory( const QString& category){
118 m_sCategory = category;
119 }
120
121 void setLicense( const H2Core::License& license ){
122 m_license = license;
123 }
124
125 void setImage( const QString& image ){
126 m_sImage = image;
127 }
128
129 void setImageLicense( const H2Core::License& imageLicense ){
130 m_imageLicense = imageLicense;
131 }
132
133 void setPath( const QString& path){
134 m_sPath = path;
135 }
136
137 QString getPath(){
138 return m_sPath;
139 }
140
141 void setDrumkitName( const QString& sDrumkitName ){
142 m_sDrumkitName = sDrumkitName;
143 }
144 QString getDrumkitName(){
145 return m_sDrumkitName;
146 }
147
156 QString toQString( const QString& sPrefix = "", bool bShort = true ) const override;
157
158 private:
159 QString m_sName;
160 QString m_sURL;
161 QString m_sInfo;
162 QString m_sAuthor;
163 QString m_sCategory;
164 QString m_sType;
166 QString m_sImage;
168 QString m_sPath;
169
172};
173}; // namespace H2Core
174
175#endif // SOUNDLIBRARYINFO_H
#define H2_OBJECT(name)
Definition Object.h:227
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
Definition License.h:48
void setDrumkitName(const QString &sDrumkitName)
bool load(const QString &sPath)
Reads the content found in sPath.
void setAuthor(const QString &author)
void setCategory(const QString &category)
void setInfo(const QString &info)
void setUrl(const QString &url)
H2Core::License getLicense() const
void setImage(const QString &image)
QString m_sDrumkitName
Drumkit the pattern was created with.
void setLicense(const H2Core::License &license)
void setName(const QString &name)
void setImageLicense(const H2Core::License &imageLicense)
QString toQString(const QString &sPrefix="", bool bShort=true) const override
Formatted string version for debugging purposes.
H2Core::License getImageLicense() const
void setType(const QString &type)
void setPath(const QString &path)