![]() |
LeechCraft 0.6.70-19424-g027e980fd1
Modular cross-platform feature rich live environment.
|
A change of a tags list, described by its old and new versions. More...
#include "tagschange.h"
Public Member Functions | |
| QStringList | Added () const |
| Returns the tags of After_ missing from Before_. | |
| QStringList | Removed () const |
| Returns the tags of Before_ missing from After_. | |
| bool | IsEmpty () const |
| Returns whether this change neither adds nor removes tags. | |
| QStringList | ApplyTo (QStringList tags) const |
| Applies this change to another tags list. | |
Public Attributes | |
| QStringList | Before_ |
| QStringList | After_ |
A change of a tags list, described by its old and new versions.
The versions are compared as sets: neither the order of the tags nor their repetitions matter.
Definition at line 21 of file tagschange.h.
| QStringList LC::Util::TagsChange::Added | ( | ) | const |
Returns the tags of After_ missing from Before_.
Definition at line 31 of file tagschange.cpp.
References After_, and Before_.
Referenced by ApplyTo().
| QStringList LC::Util::TagsChange::ApplyTo | ( | QStringList | tags | ) | const |
Applies this change to another tags list.
The removed tags are removed from tags, and the added tags are appended to it unless it already has them. The rest of tags keeps its order.
| [in] | tags | The tags to change. |
Definition at line 46 of file tagschange.cpp.
References Added(), and Removed().
| bool LC::Util::TagsChange::IsEmpty | ( | ) | const |
Returns whether this change neither adds nor removes tags.
Definition at line 41 of file tagschange.cpp.
References After_, and Before_.
Referenced by LC::Util::TagsEditorAddon::UpdateTags().
| QStringList LC::Util::TagsChange::Removed | ( | ) | const |
Returns the tags of Before_ missing from After_.
Definition at line 36 of file tagschange.cpp.
References After_, and Before_.
Referenced by ApplyTo().
| QStringList LC::Util::TagsChange::After_ |
Definition at line 24 of file tagschange.h.
| QStringList LC::Util::TagsChange::Before_ |
Definition at line 23 of file tagschange.h.