15 _seek_scale = builder->get_widget<Gtk::Scale>(
"seekScale");
16 _seek_scale = builder->get_widget<Gtk::Scale>(
"seekScale");
17 _prev_button = builder->get_widget<Gtk::Button>(
"prevButton");
19 _stop_button = builder->get_widget<Gtk::Button>(
"stopButton");
20 _next_button = builder->get_widget<Gtk::Button>(
"nextButton");
49 _seek_scale->get_adjustment()->set_upper(disc.track_length(track));
virtual std::vector< AlbumArt > album_art(const std::string &artist, const std::string &title, const int width, const int height)=0
Return all album art matching the criteria, at a specific width and height.
static AlbumArtProvider * instance()
Factory method to return the album art provider. It may be called one or more times....
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.
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.
An album art image and its URL.
Glib::RefPtr< Gdk::Pixbuf > art
Thrown when the provider cannot find album art images.