The TagEdit class Metadata has to be added using the set_metadata(const MetaDataList&) method. Use update_track(int idx, const MetaData& md) to stage the changes you made to the track. commit() starts the thread and writes changes to HDD and the database. When finished the finished() signal is emitted.
More...
#include <Editor.h>
|
| enum | FailReason {
FileNotWriteable = 1
,
FileNotFound
,
TagLibError
,
NoError
} |
| |
|
|
void | commit () |
| | Commits changes to db.
|
| |
|
|
void | sigStarted () |
| |
|
void | sigFinished () |
| |
|
void | sigProgress (int) |
| |
|
void | sigMetadataReceived (const MetaDataList &tracks) |
| |
|
|
| Editor (QObject *parent=nullptr) |
| |
|
| Editor (const MetaDataList &tracks, QObject *parent=nullptr) |
| |
| void | undo (int index) |
| | undo changes for a specific track
|
| |
|
void | undoAll () |
| | undo changes for all tracks
|
| |
| MetaData | metadata (int index) const |
| | get the (changed) metadata for a specific index
|
| |
| MetaDataList | metadata () const |
| | get all (changed) metadata
|
| |
|
bool | applyRegularExpression (const QString ®ex, int index) |
| |
| void | addGenre (int index, const Genre &genre) |
| | Add a genre to all (changed) metdata.
|
| |
|
void | deleteGenre (int index, const Genre &genre) |
| |
|
void | renameGenre (int idx, const Genre &genre, const Genre &new_genre) |
| |
| int | count () const |
| | gets the number of tracks
|
| |
|
bool | hasChanges () const |
| | indicates if there are pending changes
|
| |
| void | updateTrack (int index, const MetaData &track) |
| | writes changes to (changed) metadata for a specific track
|
| |
| void | updateCover (int index, const QPixmap &cover) |
| | update the cover for a specific track.
|
| |
| bool | hasCoverReplacement (int index) const |
| | remove_cover for a specific track
|
| |
| void | setMetadata (const MetaDataList &tracks) |
| | initializes the TagEdit object with a MetaDataList
|
| |
|
bool | isCoverSupported (int index) const |
| |
|
bool | canLoadEntireAlbum () const |
| |
|
void | loadEntireAlbum () |
| |
|
QMap< QString, FailReason > | failedFiles () const |
| |
The TagEdit class Metadata has to be added using the set_metadata(const MetaDataList&) method. Use update_track(int idx, const MetaData& md) to stage the changes you made to the track. commit() starts the thread and writes changes to HDD and the database. When finished the finished() signal is emitted.
◆ addGenre()
| void Tagging::Editor::addGenre |
( |
int |
index, |
|
|
const Genre & |
genre |
|
) |
| |
Add a genre to all (changed) metdata.
- Parameters
-
◆ count()
| int Tagging::Editor::count |
( |
| ) |
const |
gets the number of tracks
- Returns
- number of tracks
◆ hasCoverReplacement()
| bool Tagging::Editor::hasCoverReplacement |
( |
int |
index | ) |
const |
remove_cover for a specific track
- Parameters
-
does the user want to replace/add a cover
- Parameters
-
- Returns
- false, if no new alternative cover is desired
◆ metadata() [1/2]
◆ metadata() [2/2]
| MetaData Tagging::Editor::metadata |
( |
int |
index | ) |
const |
get the (changed) metadata for a specific index
- Parameters
-
- Returns
- MetaData object
◆ setMetadata()
| void Tagging::Editor::setMetadata |
( |
const MetaDataList & |
tracks | ) |
|
initializes the TagEdit object with a MetaDataList
- Parameters
-
◆ undo()
| void Tagging::Editor::undo |
( |
int |
index | ) |
|
undo changes for a specific track
- Parameters
-
◆ updateCover()
| void Tagging::Editor::updateCover |
( |
int |
index, |
|
|
const QPixmap & |
cover |
|
) |
| |
update the cover for a specific track.
- Parameters
-
| index | track index |
| cover | new cover image |
◆ updateTrack()
| void Tagging::Editor::updateTrack |
( |
int |
index, |
|
|
const MetaData & |
track |
|
) |
| |
writes changes to (changed) metadata for a specific track
- Parameters
-
| index | track index |
| track | new MetaData replacing the old track |