The Bookmarks logic class.
More...
#include <Bookmarks.h>
|
enum | CreationStatus : unsigned char {
Success,
AlreadyThere,
NoDBTrack,
DBError,
OtherError
} |
|
|
| Bookmarks (QObject *parent) |
|
bool | jump_to (int idx) |
| Jump to specific bookmark. More...
|
|
bool | jump_next () |
| Jump to next bookmark. More...
|
|
bool | jump_prev () |
| Jump to previous bookmark. More...
|
|
bool | set_loop (bool b) |
| tries to set the loop between the current two indices More...
|
|
BookmarksBase::CreationStatus | create () |
|
bool | remove (int idx) override |
| remove single bookmark from database for current track More...
|
|
virtual CreationStatus | create (Seconds timestamp) |
| create a new bookmark for current track and current position More...
|
|
MetaData | metadata () const |
| get the current track More...
|
|
void | set_metadata (const MetaData &md) |
|
const QList< Bookmark > | bookmarks () const |
|
void | set_bookmarks (const QList< Bookmark > bookmarks) |
|
int | count () |
|
void | add (const Bookmark &bookmark) |
|
void | clear () |
|
const Bookmark & | bookmark (int idx) const |
|
Bookmark & | bookmark (int idx) |
|
void | sort () |
|
The Bookmarks logic class.
◆ create()
virtual CreationStatus BookmarksBase::create |
( |
Seconds |
timestamp | ) |
|
|
virtualinherited |
create a new bookmark for current track and current position
- Returns
- true if successful, else false
◆ jump_next()
bool Bookmarks::jump_next |
( |
| ) |
|
Jump to next bookmark.
- Returns
- true if successful, false else
◆ jump_prev()
bool Bookmarks::jump_prev |
( |
| ) |
|
Jump to previous bookmark.
- Returns
- true if successful, false else
◆ jump_to()
bool Bookmarks::jump_to |
( |
int |
idx | ) |
|
Jump to specific bookmark.
- Parameters
-
- Returns
- true if index was valid
◆ metadata()
MetaData BookmarksBase::metadata |
( |
| ) |
const |
|
inherited |
get the current track
- Returns
◆ remove()
bool Bookmarks::remove |
( |
int |
idx | ) |
|
|
overridevirtual |
remove single bookmark from database for current track
- Parameters
-
- Returns
Reimplemented from BookmarksBase.
◆ set_loop()
bool Bookmarks::set_loop |
( |
bool |
b | ) |
|
tries to set the loop between the current two indices
- Parameters
-
- Returns
- false if the two current indices are invalid or if b == false. True else
◆ sig_bookmarks_changed
void Bookmarks::sig_bookmarks_changed |
( |
| ) |
|
|
signal |
emitted when bookmarks have changed
- Parameters
-
◆ sig_next_changed
void Bookmarks::sig_next_changed |
( |
const Bookmark & |
bm | ) |
|
|
signal |
next bookmark has changed
- Parameters
-
bm | new bookmark. Check for Bookmark::is_valid() |
◆ sig_prev_changed
void Bookmarks::sig_prev_changed |
( |
const Bookmark & |
bm | ) |
|
|
signal |
previous bookmark has changed
- Parameters
-
bm | new bookmark. Check for Bookmark::is_valid() |