Represents the state of the song queue. More...
#include <state.hpp>
Public Member Functions | |
| void | clearQueue () |
| Clears the song queue. | |
| void | incrementQIndex () |
| Increments the queue index. | |
| void | decrementQIndex () |
| Decrements the queue index. | |
| void | insertSongToIndex (const Song &newSong) |
| Inserts a song at the current index in the queue. | |
| void | qPush (const Song &song) |
| Pushes a song to the end of the queue. | |
| void | qPopIndex () |
| Pops the song at the current screen index from the queue. | |
| auto | getQueueSize () -> int |
| Returns the current size of the song queue. | |
| auto | GetCurrentSongFromQueue () -> Song * |
| Retrieves the current song from the queue. | |
| void | UpdateSongQueueList () |
| Updates the list of song names in the queue. | |
Public Attributes | |
| vector< Song > | song_queue |
| vector< string > | song_queue_names |
| int | qIndex = 0 |
| int | qScreenIndex = 0 |
Represents the state of the song queue.
This structure holds the song queue and the indices for navigating and managing the queue.
|
inline |
Clears the song queue.
This method removes all songs from the queue and resets the queue index.
|
inline |
Decrements the queue index.
This method decrements the index to point to the previous song in the queue.
|
inline |
Retrieves the current song from the queue.
This method returns a pointer to the song currently selected in the queue.
|
inline |
Returns the current size of the song queue.
This method returns the number of songs currently in the queue.
|
inline |
Increments the queue index.
This method increments the index to point to the next song in the queue.
|
inline |
Inserts a song at the current index in the queue.
This method inserts a new song at the position immediately after the current queue index.
| newSong | The song to insert into the queue. |
|
inline |
Pops the song at the current screen index from the queue.
This method removes the song at the current screen index from the queue.
|
inline |
Pushes a song to the end of the queue.
This method appends a song to the end of the song queue.
| song | The song to add to the queue. |
|
inline |
Updates the list of song names in the queue.
This method updates the song_queue_names list with the names of the songs from the queue, marking the current song with an asterisk.
| int QueueState::qIndex = 0 |
Index of the current song in the queue
| int QueueState::qScreenIndex = 0 |
Index of the current song being displayed on the screen
| vector<Song> QueueState::song_queue |
The list of songs in the queue
| vector<string> QueueState::song_queue_names |
The list of song names in the queue