|
Freya
0.0.1
A Gtk3 MPD Client
|
This class manages the updating and merging of the Queue. More...
#include <QueueMerger.hh>
Public Member Functions | |
| QueueMerger (MPD::Client &client, Glib::RefPtr< Gtk::ListStore > &queue_model, QueueModelColumns &queue_columns) | |
| void | add_item (MPD::AbstractComposite *pSong) |
| Implemented from AbstractItemlist. | |
| void | disable_merge_once () |
| Disables automatic updating 1x. | |
| void | recalculate_positions (unsigned pos=0) |
| Recalculate the position row of the Queue. | |
This class manages the updating and merging of the Queue.
When an update needs to be done, and it's not the first start, or a serverchange, then fill_queue_changes() of MPD::Client is called, and the changes are merged in.
fill_queue_changes() delivers the correct list since the first position that changed.
Definition at line 53 of file QueueMerger.hh.
| Browser::QueueMerger::QueueMerger | ( | MPD::Client & | client, |
| Glib::RefPtr< Gtk::ListStore > & | queue_model, | ||
| QueueModelColumns & | queue_columns | ||
| ) |
| void Browser::QueueMerger::add_item | ( | MPD::AbstractComposite * | pSong | ) | [virtual] |
Disables automatic updating 1x.
This is useful when for example some rows need to be deleted from the Queue. Then, the rows are deleted from the model and the view, MPD is notified, but the next update is disabled with this method. Also positions in the row are calculated manually via recalculate_positions()
| void Browser::QueueMerger::recalculate_positions | ( | unsigned | pos = 0 | ) |
Recalculate the position row of the Queue.
In order for merging to work all rows need to be in subsequent order. This method rearranges the rows starting by pos or 0 if not given
| pos | Where to start or 0 if not given |
1.8.0