#include <selector.h>

Public Slots | |
| virtual void | updateItemList () |
| virtual void | startExistenceCheck () |
| virtual void | selectAllButTagged () |
| virtual void | selectAllTags () |
| virtual void | switchMonitorToMain () |
| virtual void | timerTick () |
| virtual void | startSong (const QModelIndex &i) |
| virtual void | doPreferences () |
| virtual void | openLogDialog () |
| virtual void | doAbout () |
| virtual void | doLicense () |
| virtual void | searchLineEntered () |
| virtual void | exportPlayList () |
| virtual void | doSpectrumPca (bool fulldatabase=false, bool update_process_view=true) |
| virtual void | exportTempoList () |
| virtual void | doBackup () |
| virtual void | selectionAddTags () |
| virtual void | selectionSetAuthor () |
| virtual void | selectionSetMainSong () |
| virtual void | selectionDelTags () |
| virtual void | selectionAddQueue () |
| virtual void | selectionEditInfo () |
| virtual void | selectionInsertInAlbum () |
| virtual void | quitButton () |
| virtual void | avoidNoSongs () |
| virtual void | avoidSongs () |
| virtual void | toggle_temporange () |
| virtual void | show_freq_shaping_dialog () |
| virtual void | importSongs () |
| virtual void | queueAnalysis () |
| virtual void | clearMetaData () |
| virtual void | toAnalyzeOrNot () |
| virtual void | doOnlineHelp () |
| virtual void | doAutoMix () |
| virtual void | selectionMenu (const QPoint &) |
| virtual void | openQueueMenu () |
| virtual void | openStatistics () |
| virtual void | startRenamerOnSongs () |
| virtual void | startRenamerOnIndices () |
| virtual void | playTreeSong (QTreeWidgetItem *) |
| virtual void | queueShiftUp () |
| virtual void | queueShiftDown () |
| virtual void | queueDelete () |
| virtual void | queueInsert () |
| void | queueInsert (int count) |
| virtual void | queueRandom (bool) |
| virtual void | queueRandom () |
| bool | rejectQueueProposal (Song *song, int position) |
| void | filterProposedList (Song **list, int &count, int position) |
| virtual void | queueSelectSong () |
| virtual void | queueCopySongs () |
| virtual void | queueAnker () |
| virtual void | savePlayHistory () |
| virtual void | clearPlayHistory () |
| virtual void | albumItemChanged (QTreeWidgetItem *, int col) |
| virtual void | selectAlbumItem (QTreeWidgetItem *) |
| virtual void | keyPressEvent (QKeyEvent *) |
| virtual bool | eventFilter (QObject *, QEvent *) |
| virtual void | sortByColumn (int col, Qt::SortOrder) |
| virtual void | changeTagList (QTreeWidgetItem *item, int col) |
| virtual void | playFragment (const QModelIndex &) |
| void | fragmentCreated (FragmentCreated *fc) |
| void | customEvent (QEvent *e) |
Public Member Functions | |
| SongSelectorLogic (QWidget *parent=0) | |
| virtual | ~SongSelectorLogic () |
| void | initialize_extras () |
| void | acceptNewSong (Song *song) |
| void | addTag (const QString tag) |
| virtual void | resetCounter () |
| virtual void | updateProcessView (bool main_changed) |
| virtual void | startAnotherAnalyzer (Song *finished_analyzing, int on_slot) |
| void | start_reading_indices () |
| void | step_reading_indices (vector< Song * > *newsongs) |
| void | stop_reading_indices (unsigned4 total) |
| void | reread_and_repaint (Song *song) |
Public Attributes | |
| QSong * | songList |
| DataBase * | database |
| SongSelectorLogic::SongSelectorLogic | ( | QWidget * | parent = 0 |
) |
link with the process manager
initialize fields
create menu structure
main menu
file menu
Lovely Qt4 crap with separators
help menu
before menu
view color menu
view display part
view dialog part
auto menu
selection menu
queue menu
Create player views
create analyzer views
Which tags were marked in the previous session
Queue
Analysis Queue
Copy the header information from the configuration file
Will fetch the tags we already know so that the database can filter incoming songs immediately
References Tags::add_tag(), addTag(), Config::analyzers, Config::ask_mix, assert(), Config::auto_popqueue, clearMetaData(), Config::color_authorplayed, Config::color_cues, Config::color_dcolor, Config::color_ondisk, Config::color_played, Config::color_range, Config::color_songs_based_on_history, Config::color_spectrum, database, doAbout(), doBackup(), doLicense(), doOnlineHelp(), doPreferences(), doSpectrumPca(), EMPTY, exportPlayList(), exportTempoList(), extensionList(), findOneStdItem(), i, importSongs(), History::init(), Config::limit_authornonplayed, Config::limit_downrange, Config::limit_indistance, Config::limit_nonplayed, Config::limit_ondisk, Config::limit_uprange, LIST_COMPOSITION, LIST_HISTOGRAM, LIST_RHYTHM, main(), OneSpace, openLogDialog(), openStatistics(), Config::play_fragments, Config::players, playFragment(), queueAnalysis(), queueAnker(), queueCopySongs(), queueDelete(), queueInsert(), queueRandom(), queueSelectSong(), queueShiftDown(), queueShiftUp(), quitButton(), selectAllButTagged(), selectAllTags(), selectionAddQueue(), selectionAddTags(), selectionDelTags(), selectionEditInfo(), selectionInsertInAlbum(), selectionMenu(), selectionSetAuthor(), selectionSetMainSong(), show_freq_shaping_dialog(), songList, sortByColumn(), startExistenceCheck(), startRenamerOnIndices(), startRenamerOnSongs(), startSong(), status, switchMonitorToMain(), tag, TAG_TRUE, TAGS_TEXT, timerTick(), toAnalyzeOrNot(), toggle_temporange(), and DataBase::updateCache().
| SongSelectorLogic::~SongSelectorLogic | ( | ) | [virtual] |
References database.
| void SongSelectorLogic::acceptNewSong | ( | Song * | song | ) |
References DataBase::add(), and database.
| void SongSelectorLogic::addTag | ( | const QString | tag | ) |
References findStdItem(), TAG_FALSE, and TAGS_TEXT.
Referenced by SongSelectorLogic().
| void SongSelectorLogic::albumItemChanged | ( | QTreeWidgetItem * | i, | |
| int | col | |||
| ) | [virtual, slot] |
We only allow editing of the rank
References Error(), Index::find_album(), TreeWidgetSong::getSong(), AlbumItem::init(), AlbumField::nr, and qtos4().
| void SongSelectorLogic::avoidNoSongs | ( | ) | [virtual, slot] |
References songs_to_avoid, and updateItemList().
| void SongSelectorLogic::avoidSongs | ( | ) | [virtual, slot] |
References ITERATE_OVER, songs_to_avoid, svi, and selectedSongIterator::val().
| void SongSelectorLogic::changeTagList | ( | QTreeWidgetItem * | item, | |
| int | col | |||
| ) | [virtual, slot] |
References TAG_FALSE, TAG_TRUE, TAGS_NOT, and updateItemList().
| void SongSelectorLogic::clearMetaData | ( | ) | [virtual, slot] |
References EMPTY, ITERATE_OVER, reread_and_repaint(), svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::clearPlayHistory | ( | ) | [virtual, slot] |
References History::clear_history(), and database.
| void SongSelectorLogic::customEvent | ( | QEvent * | e | ) | [slot] |
References BpmDjCustom, and BpmDjEvent::run().
| void SongSelectorLogic::doAbout | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| void SongSelectorLogic::doAutoMix | ( | ) | [virtual, slot] |
| void SongSelectorLogic::doBackup | ( | ) | [virtual, slot] |
References vexecute().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::doLicense | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| void SongSelectorLogic::doOnlineHelp | ( | ) | [virtual, slot] |
data location
code location
References checkDocsAt(), data, exists(), programname, and spawn().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::doPreferences | ( | ) | [virtual, slot] |
References Config::open_ui(), and updateItemList().
Referenced by SongSelectorLogic(), and startSong().
| void SongSelectorLogic::doSpectrumPca | ( | bool | fulldatabase = false, |
|
| bool | update_process_view = true | |||
| ) | [virtual, slot] |
References database, DataBase::getAllSongs(), ITERATE_OVER, no_spectrum, and selectedSongIterator::val().
Referenced by SongSelectorLogic(), and stop_reading_indices().
| bool SongSelectorLogic::eventFilter | ( | QObject * | o, | |
| QEvent * | e | |||
| ) | [virtual, slot] |
References queueDelete(), queueInsert(), TABS_ALBUMS, and TABS_QUEUE.
| void SongSelectorLogic::exportPlayList | ( | ) | [virtual, slot] |
References bpmdj_allocate, TreeWidgetSong::getSong(), ITERATE_OVER, svi, and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::exportTempoList | ( | ) | [virtual, slot] |
References assert(), FILE, ITERATE_OVER, svi, tempo_type::tempo, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::filterProposedList | ( | Song ** | list, | |
| int & | count, | |||
| int | position | |||
| ) | [slot] |
References assert(), i, and rejectQueueProposal().
Referenced by queueRandom().
| void SongSelectorLogic::fragmentCreated | ( | FragmentCreated * | fc | ) | [slot] |
References fragmentPlayer, FragmentCreated::get_song(), FragmentCreated::getFragment(), Config::play_fragments, and FragmentPlayer::playWave().
Referenced by FragmentCreated::run().
| void SongSelectorLogic::importSongs | ( | ) | [virtual, slot] |
References database, DataBase::flush_cache(), DirectoryScanner::scan(), and updateItemList().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::initialize_extras | ( | ) |
References EMPTY, ITERATE_OVER, TAG_TRUE, TAGS_OR, TAGS_TEXT, and treeWidgetIterator< T >::val().
Referenced by stop_reading_indices().
| void SongSelectorLogic::keyPressEvent | ( | QKeyEvent * | e | ) | [virtual, slot] |
The keypress slot will check whether a delete is pressed while viewing the albumList. If so, it will delete that song from the album.
| void SongSelectorLogic::openLogDialog | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| void SongSelectorLogic::openQueueMenu | ( | ) | [virtual, slot] |
| void SongSelectorLogic::openStatistics | ( | ) | [virtual, slot] |
References database.
Referenced by SongSelectorLogic().
| void SongSelectorLogic::playFragment | ( | const QModelIndex & | idx | ) | [virtual, slot] |
References fragmentCache, FragmentCache::get(), Config::play_fragments, and QSong::songEssence().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::playTreeSong | ( | QTreeWidgetItem * | song | ) | [virtual, slot] |
References TreeWidgetSong::getSong(), and ProcessManager::startSong().
| void SongSelectorLogic::queueAnalysis | ( | ) | [virtual, slot] |
This method queues all the selected songs in the analysis queue If no analyzer is enabled we suggest the possibility to enable one.
References ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::queueAnker | ( | ) | [virtual, slot] |
References QueuedSong::ankered(), ITERATE_OVER, QueuedSong::setAnkered(), and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::queueCopySongs | ( | ) | [virtual, slot] |
References SongCopier::fetch(), TreeWidgetSong::getSong(), ITERATE_OVER, SongCopier::setTarget(), target, and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::queueDelete | ( | ) | [virtual, slot] |
References ITERATE_OVER, and treeWidgetIterator< T >::val().
Referenced by eventFilter(), and SongSelectorLogic().
| void SongSelectorLogic::queueInsert | ( | int | count | ) | [slot] |
First we run through the complete list to asisgn to each element a rank which is a multiple of the count. We start at count+1. This is useful if we want to insert songs directly after the main or monitor song
References ITERATE_OVER, QueuedSong::setPos(), and treeWidgetIterator< T >::val().
| void SongSelectorLogic::queueInsert | ( | ) | [virtual, slot] |
References queueInsert().
Referenced by eventFilter(), and SongSelectorLogic().
| void SongSelectorLogic::queueRandom | ( | ) | [virtual, slot] |
Referenced by queueSelectSong(), and SongSelectorLogic().
| void SongSelectorLogic::queueRandom | ( | bool | userChoice | ) | [virtual, slot] |
This loop will in every iteration try to find an undefined element and then assign a value to it if there are no longer undefined elements, the loop breaks.
Run through the proposed list and remove anything duplicate depending on the users preferences
References QueuedSong::ankered(), bpmdj_deallocate, DataBase::closestSongs(), database, Song::distance(), filterProposedList(), i, ITERATE_OVER, main_song, monitor_song, SongMetriek::std, and treeWidgetIterator< T >::val().
| void SongSelectorLogic::queueSelectSong | ( | ) | [virtual, slot] |
References queueRandom().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::queueShiftDown | ( | ) | [virtual, slot] |
References ITERATE_OVER, and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::queueShiftUp | ( | ) | [virtual, slot] |
References QueuedSong::getPos(), ITERATE_OVER, QueuedSong::setPos(), and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::quitButton | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| bool SongSelectorLogic::rejectQueueProposal | ( | Song * | song, | |
| int | position | |||
| ) | [slot] |
References QueuedSong::getPos(), TreeWidgetSong::getSong(), ITERATE_OVER, main_song, monitor_song, and treeWidgetIterator< T >::val().
Referenced by filterProposedList().
| void SongSelectorLogic::reread_and_repaint | ( | Song * | song | ) |
References QSong::aSongChangedBehindQSongsBack(), assert(), Song::reread(), and songList.
Referenced by clearMetaData(), and startAnotherAnalyzer().
| void SongSelectorLogic::resetCounter | ( | ) | [virtual] |
Referenced by ProcessManager::startSong(), and ProcessManager::switchMonitorToMain().
| void SongSelectorLogic::savePlayHistory | ( | ) | [virtual, slot] |
References History::save_history().
| void SongSelectorLogic::searchLineEntered | ( | ) | [virtual, slot] |
References updateItemList().
| void SongSelectorLogic::selectAlbumItem | ( | QTreeWidgetItem * | i | ) | [virtual, slot] |
| void SongSelectorLogic::selectAllButTagged | ( | ) | [virtual, slot] |
References EMPTY, ITERATE_OVER, TAG_FALSE, TAG_TRUE, TAGS_AND, TAGS_NOT, TAGS_TEXT, and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectAllTags | ( | ) | [virtual, slot] |
References EMPTY, ITERATE_OVER, TAG_FALSE, TAG_TRUE, TAGS_AND, TAGS_NOT, TAGS_OR, TAGS_TEXT, and treeWidgetIterator< T >::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionAddQueue | ( | ) | [virtual, slot] |
References ITERATE_OVER, selectAll(), svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionAddTags | ( | ) | [virtual, slot] |
References ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionDelTags | ( | ) | [virtual, slot] |
References ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionEditInfo | ( | ) | [virtual, slot] |
References ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionInsertInAlbum | ( | ) | [virtual, slot] |
References ITERATE_OVER, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionMenu | ( | const QPoint & | pos | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionSetAuthor | ( | ) | [virtual, slot] |
References ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::selectionSetMainSong | ( | ) | [virtual, slot] |
References ITERATE_OVER, ProcessManager::setMainSong(), svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::show_freq_shaping_dialog | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic().
| void SongSelectorLogic::sortByColumn | ( | int | col, | |
| Qt::SortOrder | so | |||
| ) | [virtual, slot] |
References songList, and QSong::sort().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::start_reading_indices | ( | ) |
Will start the indexreader active object, which will go through all the index files in the index directory and read them in memory. During this process step_reading_indices will be called regularly. At the end of the process stop_reading_indices will be called.
References IndexReader::start(), and updateProcessView().
Referenced by main().
| void SongSelectorLogic::startAnotherAnalyzer | ( | Song * | finished_analyzing, | |
| int | on_slot | |||
| ) | [virtual] |
This function is called by the analyzer manager when a slot comes free either due to a timeout or due to a descent stop. In any case we need to start a new one here.
References Config::analyzers, Song::contains_tag(), Tags::find_tag_create_if_necessary(), TreeWidgetSong::getSong(), i, ITERATE_OVER, Song::needs_analysis(), reread_and_repaint(), SongSlot::songs_per_second(), tag, and treeWidgetIterator< T >::val().
| void SongSelectorLogic::startExistenceCheck | ( | ) | [virtual, slot] |
References database, existenceScanner, DataBase::getAllSongs(), and ExistenceScanner::start().
Referenced by SongSelectorLogic(), and stop_reading_indices().
| void SongSelectorLogic::startRenamerOnIndices | ( | ) | [virtual, slot] |
References RenamerLogic::add(), ITERATE_OVER, svi, and selectedSongIterator::val().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::startRenamerOnSongs | ( | ) | [virtual, slot] |
References RenamerLogic::scan(), and RenamerLogic::start_dialog().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::startSong | ( | const QModelIndex & | i | ) | [virtual, slot] |
References doPreferences(), Config::players, QSong::songEssence(), and ProcessManager::startSong().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::step_reading_indices | ( | vector< Song * > * | new_songs | ) |
Executed as the response to an event posted by indexreader. The newsongs vector contains all the newly indexed songs. In return this function must contact the database which will actually add the songs to the full database, the cache if appropriate and the visualization collection if appropriate.
This version of the item list updater is used from within the index scanner It will not sort the data it retrieves from the database and will also not report on the lack of exiting songs at the moment. The history view is also not updated here.
References DataBase::addNewSongs(), database, Config::limit_downrange, Config::limit_indistance, Config::limit_uprange, main_song, monitor_song, ConfigState::set(), and songList.
Referenced by CollectionOfSongs::run().
| void SongSelectorLogic::stop_reading_indices | ( | unsigned4 | total | ) |
Executed as the response to an event posted by the indexReader. It signals the finishing of reading the current index collection.
References doSpectrumPca(), initialize_extras(), and startExistenceCheck().
Referenced by CollectionOfSongs::run().
| void SongSelectorLogic::switchMonitorToMain | ( | ) | [virtual, slot] |
References ProcessManager::switchMonitorToMain().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::timerTick | ( | ) | [virtual, slot] |
The timer thread will periodically call this function. Since it is the same thread it will be able to continue below. We don' want that because then we might have race conditions.
We can now check whether any button has been check to start an analyzer. We do this after the signal check because this function will also redraw the colors for the analyzer and will ensure an immediate color change when the text is updated in the signal checking round.
References Config::auto_popqueue, SongProcess::checkSignals(), TreeWidgetSong::getSong(), monitor_song, poll_death(), queueOrder(), ConfigState::setOn(), ProcessManager::startSong(), and toAnalyzeOrNot().
Referenced by SongSelectorLogic().
| virtual void SongSelectorLogic::toAnalyzeOrNot | ( | ) | [virtual, slot] |
Referenced by SongSelectorLogic(), and timerTick().
| void SongSelectorLogic::toggle_temporange | ( | ) | [virtual, slot] |
References ConfigState::isOn(), Config::limit_downrange, Config::limit_uprange, and ConfigState::setOn().
Referenced by SongSelectorLogic().
| void SongSelectorLogic::updateItemList | ( | ) | [virtual, slot] |
References database, DataBase::file_to_song(), Song::get_distance_to_main(), DataBase::getSelection(), itemcount, Config::limit_downrange, Config::limit_indistance, Config::limit_uprange, main(), main_song, monitor_song, ConfigState::set(), and songList.
Referenced by avoidNoSongs(), changeTagList(), doPreferences(), importSongs(), UserNotification::run(), searchLineEntered(), and updateProcessView().
| void SongSelectorLogic::updateProcessView | ( | bool | main_changed | ) | [virtual] |
References updateItemList().
Referenced by UserNotification::run(), ProcessManager::setMainSong(), start_reading_indices(), ProcessManager::startSong(), and ProcessManager::switchMonitorToMain().
Referenced by acceptNewSong(), clearPlayHistory(), doSpectrumPca(), importSongs(), MusicScanner::MusicScanner(), openStatistics(), queueRandom(), selectAlbumItem(), SongSelectorLogic(), startExistenceCheck(), step_reading_indices(), UpdateIndexedSong::UpdateIndexedSong(), updateItemList(), and ~SongSelectorLogic().
Referenced by QSong::indexof(), reread_and_repaint(), SongSelectorLogic(), sortByColumn(), step_reading_indices(), and updateItemList().
1.6.2