|
Discman
|
Handles the interactions with the album art selection screen. More...
#include <album_art_component.h>


Public Types | |
| typedef sigc::signal< void()> | sig_done |
| "Done with screen" signal type. | |
| typedef sigc::signal< void(const std::string)> | sig_art |
| "Art selected" signal type. | |
Public Member Functions | |
| AlbumArtComponent (Glib::RefPtr< Gtk::Builder > builder) | |
| AlbumArtComponent constructor. | |
| ~AlbumArtComponent () | |
| AlbumArtComponent destructior. | |
| sig_done | signal_done () |
| Getter for _signal_done. | |
| sig_art | signal_art () |
| Getter for _signal_art. | |
| void | set_album_arts (const std::vector< AlbumArtProvider::AlbumArt > &arts, const int window_width) |
| Set the album art images to show on the selection screen. | |
Static Public Attributes | |
| static constexpr int | ART_SIZE = 128 |
| The width and height of art displayed on the album art selection screen. | |
Private Member Functions | |
| void | on_done_button_clicked () |
| Called when the "done" button is clicked. | |
Private Attributes | |
| sig_done | _signal_done |
| Emitted when the user leaves the art selection screen. | |
| sig_art | _signal_art |
| Emitted when the user selects an album art image. | |
| Gtk::Button * | _done_button |
| Done button on the art selection screen. | |
| Gtk::Viewport * | _viewport |
| Viewport that displays the grid of album art. | |
| Gtk::Grid * | _grid |
| Grid of album art. | |
Static Private Attributes | |
| static constexpr int | SPACING = 16 |
| The spacing between images. | |
Additional Inherited Members | |
Protected Member Functions inherited from Component | |
| Component () | |
| virtual | ~Component ()=0 |
Handles the interactions with the album art selection screen.
Definition at line 25 of file album_art_component.h.
| typedef sigc::signal<void(const std::string)> AlbumArtComponent::sig_art |
"Art selected" signal type.
Definition at line 33 of file album_art_component.h.
| typedef sigc::signal<void()> AlbumArtComponent::sig_done |
"Done with screen" signal type.
Definition at line 30 of file album_art_component.h.
| AlbumArtComponent::AlbumArtComponent | ( | Glib::RefPtr< Gtk::Builder > | builder | ) |
AlbumArtComponent constructor.
| [in] | builder | The builder initialized with the widgets on the album art selection screen. |
Definition at line 9 of file album_art_component.cc.
| AlbumArtComponent::~AlbumArtComponent | ( | ) |
AlbumArtComponent destructior.
Definition at line 17 of file album_art_component.cc.
|
private |
Called when the "done" button is clicked.
Definition at line 83 of file album_art_component.cc.
| void AlbumArtComponent::set_album_arts | ( | const std::vector< AlbumArtProvider::AlbumArt > & | arts, |
| const int | window_width ) |
Set the album art images to show on the selection screen.
| [in] | arts | Album art images. |
| [in] | window_width | The current width of the application window. This is used to compute how many image columns to display. |
Definition at line 31 of file album_art_component.cc.
| AlbumArtComponent::sig_art AlbumArtComponent::signal_art | ( | ) |
Getter for _signal_art.
Definition at line 27 of file album_art_component.cc.
| AlbumArtComponent::sig_done AlbumArtComponent::signal_done | ( | ) |
Getter for _signal_done.
Definition at line 23 of file album_art_component.cc.
|
private |
Done button on the art selection screen.
Definition at line 61 of file album_art_component.h.
|
private |
Grid of album art.
Definition at line 63 of file album_art_component.h.
|
private |
Emitted when the user selects an album art image.
Definition at line 59 of file album_art_component.h.
|
private |
Emitted when the user leaves the art selection screen.
Definition at line 58 of file album_art_component.h.
|
private |
Viewport that displays the grid of album art.
Definition at line 62 of file album_art_component.h.
|
staticconstexpr |
The width and height of art displayed on the album art selection screen.
Definition at line 36 of file album_art_component.h.
|
staticconstexprprivate |
The spacing between images.
Definition at line 56 of file album_art_component.h.