LeechCraft 0.6.70-19424-g027e980fd1
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::TagsChange Struct Reference

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_

Detailed Description

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.

Member Function Documentation

◆ Added()

QStringList LC::Util::TagsChange::Added ( ) const

Returns the tags of After_ missing from Before_.

Returns
The added tags, each one once, in the order of After_.

Definition at line 31 of file tagschange.cpp.

References After_, and Before_.

Referenced by ApplyTo().

Here is the caller graph for this function:

◆ 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.

Parameters
[in]tagsThe tags to change.
Returns
The changed tags.

Definition at line 46 of file tagschange.cpp.

References Added(), and Removed().

Here is the call graph for this function:

◆ IsEmpty()

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().

Here is the caller graph for this function:

◆ Removed()

QStringList LC::Util::TagsChange::Removed ( ) const

Returns the tags of Before_ missing from After_.

Returns
The removed tags, each one once, in the order of Before_.

Definition at line 36 of file tagschange.cpp.

References After_, and Before_.

Referenced by ApplyTo().

Here is the caller graph for this function:

Member Data Documentation

◆ After_

QStringList LC::Util::TagsChange::After_

Definition at line 24 of file tagschange.h.

Referenced by Added(), IsEmpty(), and Removed().

◆ Before_

QStringList LC::Util::TagsChange::Before_

Definition at line 23 of file tagschange.h.

Referenced by Added(), IsEmpty(), and Removed().


The documentation for this struct was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.19424.g027e980fd1-build/leechcraft-0.6.70-19424-g027e980fd1/src/util/tags/tagschange.h
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.19424.g027e980fd1-build/leechcraft-0.6.70-19424-g027e980fd1/src/util/tags/tagschange.cpp