7#ifndef NOW_PLAYING_COMPONENT
8#define NOW_PLAYING_COMPONENT
11#include <gtkmm/builder.h>
12#include <gtkmm/image.h>
13#include <gtkmm/label.h>
14#include <gtkmm/scale.h>
15#include <gtkmm/adjustment.h>
16#include <gtkmm/button.h>
17#include <gdkmm/pixbuf.h>
18#include <sigc++/signal.h>
20#include <discdb/disc.h>
65 void set_track(
const DiscDB::Disc& disc,
unsigned int track,
const bool first,
const bool last);
void set_state(const State state)
Sets the state of the component.
sigc::signal< void(const Button)> sig_button
"Playback button clicked" signal type.
sig_album_art signal_album_art()
Getter for _signal_album_art.
NowPlayingComponent(Glib::RefPtr< Gtk::Builder > builder)
NowPlayingComponent constructor.
Gtk::Image * _play_pause_image
The current image displayed on the play/pause button. It will either be a "play" icon or a "pause" ic...
Gtk::Scale * _seek_scale
Display for elapsed time.
Gtk::Button * _album_art_button
Button that shows the album art.
~NowPlayingComponent()
NowPlayingComponent destructor.
Gtk::Image * _album_art_image
Album art image.
sig_album_art _signal_album_art
Emitted when the album art button is clicked.
void on_playpause_button_clicked()
Called when the play/pause button is clicked.
sigc::signal< void(void)> sig_album_art
"Album art clicked" signal type.
Button
Playback control button identifiers.
void on_prev_button_clicked()
Called when the previous track button is clicked.
Gtk::Button * _stop_button
Stop button.
void set_seconds(const float seconds)
Sets the elapsed seconds.
void set_track(const DiscDB::Disc &disc, unsigned int track, const bool first, const bool last)
Sets the information for the track currently playing.
Gtk::Label * _track_title_label
Track title label.
void on_album_art_button_clicked()
Called when the album art button is clicked.
Gtk::Button * _next_button
Next track button.
State get_state() const
Returns the state of the component.
Gtk::Button * _prev_button
Previous track button.
void on_stop_button_clicked()
Called when the stop button is clicked.
sig_button _signal_button
Emitted when a playback control button is clicked.
void set_album(const std::string &url)
Sets the album art image.
void on_next_button_clicked()
Called when the next track button is clicked.
Gtk::Button * _play_pause_button
Play/pause button.
State
The component has several states it can be put into.
State _state
State of the component.
Gtk::Label * _track_artist_label
Track artist label.
sig_button signal_button()
Getter for _signal_button.