|
Discman
|
Handles the interactions with the album labels, track listing and ipod/eject buttons. More...
#include <disc_component.h>


Classes | |
| class | TracksListColumnRecord |
| Track list columns. More... | |
Public Types | |
| typedef sigc::signal< void(DriveManager::Drive)> | sig_eject_requested |
| "Drive eject requested" signal type. | |
| typedef sigc::signal< void(unsigned int)> | sig_track_selected |
| "Track selected" signal type. | |
| typedef sigc::signal< void(unsigned int)> | sig_rip_requested |
| "Rip requested" signal type. | |
Public Member Functions | |
| DiscComponent (DriveManager &drive_manager, Glib::RefPtr< Gtk::Builder > builder) | |
| DiscComponent constructor. | |
| ~DiscComponent () | |
| DiscComponent destructor. | |
| void | set_disc (const DiscDB::Disc *const disc) |
| Sets the DiscDB::Disc containing all information about the inserted disc. | |
| void | clear_selection () |
| Clears the selection in the track listing. | |
| void | set_selection (unsigned int track) |
| Sets the selection in the track listing. | |
| void | show_progress (const bool show) |
| Shows or hides the rip progress column in the track listing. | |
| void | update_track_progress (unsigned int track, unsigned int progress) |
| Updates the percentage completion in the track listing for a given track with a given percentage. | |
| void | show_ipod_button (const bool show) |
| Shows or hides the iPod button (rip button). | |
| void | enable_ipod_button (const bool enable) |
| Enables or disables the iPod button (rip button). | |
| void | enable_eject_button (const bool enable) |
| Enables or disables the normal eject button. | |
| void | show_double_eject_button (const bool show) |
| Switches between the normal eject button and the eject button with disc/iPod selection. | |
| sig_eject_requested | signal_eject_requested () |
| Getter for _signal_eject_requested. | |
| sig_rip_requested | signal_rip_requested () |
| Getter for _signal_rip_requested. | |
| sig_track_selected | signal_track_selected () |
| Getter for _signal_track_selected. | |
Private Member Functions | |
| void | on_eject (const DriveManager::Drive drive) |
| Called after successful ejection of a drive. | |
| void | on_eject_button_clicked () |
| Called when the normal eject button is clicked. | |
| void | on_ipod_button_clicked () |
| Called when the iPod (rip) button is clicked. | |
| void | on_row_activated (const Gtk::TreeModel::Path &path, Gtk::TreeView::Column *) |
| Called when a track is double-clicked in the track list. | |
Private Attributes | |
| DriveManager & | _drive_manager |
| Used to eject the disc. | |
| Gtk::Label * | _album_label |
| Label displaying the album title. | |
| Gtk::Label * | _album_artist_label |
| Label displaying the album artist. | |
| Gtk::Button * | _eject_button |
| Normal eject button. | |
| Gtk::Stack * | _eject_button_stack |
| Stack that switches between eject buttons. | |
| Gtk::MenuButton * | _double_eject_button |
| Eject button with disc/iPod selection. | |
| Glib::RefPtr< Gio::Menu > | _double_eject_button_menu |
| Disc/iPod eject button selection menu. | |
| Glib::RefPtr< Gio::SimpleActionGroup > | _eject_action_group |
| Action group for disc/iPod eject button menu. | |
| Gtk::Button * | _ipod_button |
| Shown when the iPod is connected, enabled when ripping is possible. | |
| Gtk::TreeView * | _tracks_tree_view |
| Shows the track list. | |
| Glib::RefPtr< Gtk::ListStore > | _tracks_list_store |
| Track list model. | |
| sig_eject_requested | _signal_eject_requested |
| Emitted when an eject button is used. | |
| sig_rip_requested | _signal_rip_requested |
| Emitted when the iPod (rip) button is clicked. | |
| sig_track_selected | _signal_track_selected |
| Emitted when a track is double-clicked in the track list. | |
Additional Inherited Members | |
Protected Member Functions inherited from Component | |
| Component () | |
| virtual | ~Component ()=0 |
Handles the interactions with the album labels, track listing and ipod/eject buttons.
Definition at line 35 of file disc_component.h.
| typedef sigc::signal<void(DriveManager::Drive)> DiscComponent::sig_eject_requested |
"Drive eject requested" signal type.
Definition at line 38 of file disc_component.h.
| typedef sigc::signal<void(unsigned int)> DiscComponent::sig_rip_requested |
"Rip requested" signal type.
Definition at line 44 of file disc_component.h.
| typedef sigc::signal<void(unsigned int)> DiscComponent::sig_track_selected |
"Track selected" signal type.
Definition at line 41 of file disc_component.h.
| DiscComponent::DiscComponent | ( | DriveManager & | drive_manager, |
| Glib::RefPtr< Gtk::Builder > | builder ) |
DiscComponent constructor.
| [in] | drive_manager | Used to eject the disc . |
| [in] | builder | The builder initialized with the widgets managed by this component. |
Definition at line 9 of file disc_component.cc.
| DiscComponent::~DiscComponent | ( | ) |
DiscComponent destructor.
Definition at line 57 of file disc_component.cc.
| void DiscComponent::clear_selection | ( | ) |
Clears the selection in the track listing.
Definition at line 99 of file disc_component.cc.
| void DiscComponent::enable_eject_button | ( | const bool | enable | ) |
Enables or disables the normal eject button.
| [in] | enable | Wnable (true) or disable (false). |
Definition at line 143 of file disc_component.cc.
| void DiscComponent::enable_ipod_button | ( | const bool | enable | ) |
Enables or disables the iPod button (rip button).
| [in] | enable | Wnable (true) or disable (false). |
Definition at line 139 of file disc_component.cc.
|
private |
Called after successful ejection of a drive.
| [in] | drive | The drive that was ejected (disc or iPod) . |
Definition at line 160 of file disc_component.cc.
|
private |
Called when the normal eject button is clicked.
Definition at line 151 of file disc_component.cc.
|
private |
Called when the iPod (rip) button is clicked.
Definition at line 167 of file disc_component.cc.
|
private |
Called when a track is double-clicked in the track list.
| [in] | path | Tree path to the track row double-clicked. |
Definition at line 181 of file disc_component.cc.
| void DiscComponent::set_disc | ( | const DiscDB::Disc *const | disc | ) |
Sets the DiscDB::Disc containing all information about the inserted disc.
| [in] | disc | The album information. |
Definition at line 68 of file disc_component.cc.
| void DiscComponent::set_selection | ( | unsigned int | track | ) |
Sets the selection in the track listing.
| [in] | track | The 1-based index of the track to select. |
Definition at line 103 of file disc_component.cc.
| void DiscComponent::show_double_eject_button | ( | const bool | show | ) |
Switches between the normal eject button and the eject button with disc/iPod selection.
| [in] | show | Show (true) or hide (false). |
Definition at line 147 of file disc_component.cc.
| void DiscComponent::show_ipod_button | ( | const bool | show | ) |
Shows or hides the iPod button (rip button).
| [in] | show | Show (true) or hide (false). |
Definition at line 135 of file disc_component.cc.
| void DiscComponent::show_progress | ( | const bool | show | ) |
Shows or hides the rip progress column in the track listing.
| [in] | show | Show (true) or hide (false). |
Definition at line 64 of file disc_component.cc.
| DiscComponent::sig_eject_requested DiscComponent::signal_eject_requested | ( | ) |
Getter for _signal_eject_requested.
Definition at line 111 of file disc_component.cc.
| DiscComponent::sig_rip_requested DiscComponent::signal_rip_requested | ( | ) |
Getter for _signal_rip_requested.
Definition at line 115 of file disc_component.cc.
| DiscComponent::sig_track_selected DiscComponent::signal_track_selected | ( | ) |
Getter for _signal_track_selected.
Definition at line 120 of file disc_component.cc.
| void DiscComponent::update_track_progress | ( | unsigned int | track, |
| unsigned int | progress ) |
Updates the percentage completion in the track listing for a given track with a given percentage.
| [in] | track | 1-based index of the track to update. |
| [in] | progress | New percentage completion. |
Definition at line 124 of file disc_component.cc.
|
private |
Label displaying the album artist.
Definition at line 118 of file disc_component.h.
|
private |
Label displaying the album title.
Definition at line 117 of file disc_component.h.
|
private |
Eject button with disc/iPod selection.
Definition at line 122 of file disc_component.h.
|
private |
Disc/iPod eject button selection menu.
Definition at line 123 of file disc_component.h.
|
private |
Used to eject the disc.
Definition at line 115 of file disc_component.h.
|
private |
Action group for disc/iPod eject button menu.
Definition at line 124 of file disc_component.h.
|
private |
Normal eject button.
Definition at line 120 of file disc_component.h.
|
private |
Stack that switches between eject buttons.
Definition at line 121 of file disc_component.h.
|
private |
Shown when the iPod is connected, enabled when ripping is possible.
Definition at line 126 of file disc_component.h.
|
private |
Emitted when an eject button is used.
Definition at line 130 of file disc_component.h.
|
private |
Emitted when the iPod (rip) button is clicked.
Definition at line 131 of file disc_component.h.
|
private |
Emitted when a track is double-clicked in the track list.
Definition at line 132 of file disc_component.h.
|
private |
Track list model.
Definition at line 128 of file disc_component.h.
|
private |
Shows the track list.
Definition at line 127 of file disc_component.h.