initial functional file indexer, added Qt / C++ port of Cartographer
This commit is contained in:
parent
fae3d30dbd
commit
c52386abb4
19 changed files with 721 additions and 149 deletions
83
desktop/datalake/album.cpp
Normal file
83
desktop/datalake/album.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
#include "structs.hpp"
|
||||
|
||||
KotoAlbum::KotoAlbum() {
|
||||
this->uuid = QUuid::createUuid();
|
||||
this->tracks = QList<KotoTrack*>();
|
||||
}
|
||||
|
||||
KotoAlbum* KotoAlbum::fromDb() {
|
||||
return new KotoAlbum();
|
||||
}
|
||||
|
||||
KotoAlbum::~KotoAlbum() {
|
||||
for (auto track : this->tracks) { delete track; }
|
||||
this->tracks.clear();
|
||||
}
|
||||
|
||||
void KotoAlbum::addTrack(KotoTrack* track) {
|
||||
this->tracks.append(track);
|
||||
}
|
||||
|
||||
QString KotoAlbum::getAlbumArtPath() {
|
||||
return QString {this->album_art_path};
|
||||
}
|
||||
|
||||
QString KotoAlbum::getDescription() {
|
||||
return QString {this->description};
|
||||
}
|
||||
|
||||
QList<QString> KotoAlbum::getGenres() {
|
||||
return QList {this->genres};
|
||||
}
|
||||
|
||||
QString KotoAlbum::getPath() {
|
||||
return this->path;
|
||||
}
|
||||
|
||||
QString KotoAlbum::getNarrator() {
|
||||
return QString {this->narrator};
|
||||
}
|
||||
|
||||
QString KotoAlbum::getTitle() {
|
||||
return QString {this->title};
|
||||
}
|
||||
|
||||
QList<KotoTrack*> KotoAlbum::getTracks() {
|
||||
return QList {this->tracks};
|
||||
}
|
||||
|
||||
int KotoAlbum::getYear() {
|
||||
return this->year;
|
||||
}
|
||||
|
||||
void KotoAlbum::removeTrack(KotoTrack* track) {
|
||||
this->tracks.removeOne(track);
|
||||
}
|
||||
|
||||
void KotoAlbum::setAlbumArtPath(QString str) {
|
||||
this->album_art_path = QString {path};
|
||||
}
|
||||
|
||||
void KotoAlbum::setDescription(QString str) {
|
||||
this->description = QString {str};
|
||||
}
|
||||
|
||||
void KotoAlbum::setGenres(QList<QString> list) {
|
||||
this->genres = QList {list};
|
||||
}
|
||||
|
||||
void KotoAlbum::setNarrator(QString str) {
|
||||
this->narrator = QString {str};
|
||||
}
|
||||
|
||||
void KotoAlbum::setPath(QString str) {
|
||||
this->path = QString {str};
|
||||
}
|
||||
|
||||
void KotoAlbum::setTitle(QString str) {
|
||||
this->title = QString {str};
|
||||
}
|
||||
|
||||
void KotoAlbum::setYear(int num) {
|
||||
this->year = num;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue