#include <qsong.h>
Public Member Functions | |
| void | setVector (Song **arr, int cnt) |
| void | addVector (Song **arr, int cnt) |
| virtual void | sort (int col, bool ascending) |
| QSong () | |
| virtual QVariant | headerData (int col, Qt::Orientation orientation, int role) const |
| virtual int | rowCount (const QModelIndex &) const |
| virtual int | columnCount (const QModelIndex &) const |
| virtual QVariant | data (const QModelIndex &, int) const |
| void | aSongChangedBehindQSongsBack (Song *song) |
Static Public Member Functions | |
| static void | Sort () |
| static Song * | songEssence (int i) |
| static Song * | songEssence (const QModelIndex &i) |
| static QColor | colorOfTempoCol (const Song *main, Song *song) |
| static QColor | colorOfAuthorCol (Song *song) |
| static QColor | colorOfPlaycount (Song *song) |
| static QColor | colorOfdColorCol (Song *song) |
| static QColor | normalColor (Song *song) |
| static QString | text (Song *song, int col) |
| static void | playedAuthorAtTime (int i, int t) |
| static QModelIndex | indexof (Song *song) |
| QSong::QSong | ( | ) |
| void QSong::addVector | ( | Song ** | arr, | |
| int | cnt | |||
| ) |
Will not sort the columns as to optimize the incremental reading.
References assert(), and bpmdj_reallocate.
| void QSong::aSongChangedBehindQSongsBack | ( | Song * | song | ) |
References i, and LIST_COLCOUNT.
Referenced by SongSelectorLogic::reread_and_repaint().
| QColor QSong::colorOfAuthorCol | ( | Song * | song | ) | [static] |
References Config::color_authorplayed, mixColor(), and normalColor().
Referenced by data(), HistorySong::HistorySong(), and QueuedSong::init().
| QColor QSong::colorOfdColorCol | ( | Song * | song | ) | [static] |
References Config::color_dcolor, mixColor(), and normalColor().
Referenced by data(), and HistorySong::HistorySong().
| QColor QSong::colorOfPlaycount | ( | Song * | song | ) | [static] |
References mixColor().
Referenced by normalColor().
References Config::color_range, SongMetriek::find_harmonic(), mixColor(), normalColor(), SongMetriek::std, and SongMetriek::tempo_diff().
Referenced by data(), and HistorySong::HistorySong().
| int QSong::columnCount | ( | const QModelIndex & | ) | const [virtual] |
References LIST_COLCOUNT.
| QVariant QSong::data | ( | const QModelIndex & | pos, | |
| int | role | |||
| ) | const [virtual] |
TODO: we might improve the performance here by directly passing a pointer as internal identification into each generated QModelIndex
Text is something we can quickly deal with
Color of the background is slightly more complicated
Images for echo, rhythm, composition
References assert(), Config::color_cues, Config::color_played, Config::color_spectrum, colorOfAuthorCol(), colorOfdColorCol(), colorOfTempoCol(), composition_prop_sx, echo_prop_sx, PixmapCache::find(), histogram_property< bandsize >::get_band(), smallhistogram_type< smallhistogram_size >::get_energy(), smallhistogram_type< smallhistogram_size >::get_probability(), LIST_AUTHOR, LIST_COMPOSITION, LIST_CUES, LIST_DCOLOR, LIST_FILE, LIST_HISTOGRAM, LIST_INDEX, LIST_MAX, LIST_MD5SUM, LIST_MEAN, LIST_MIN, LIST_ONDISK, LIST_POWER, LIST_RHYTHM, LIST_SPECTRUM, LIST_TAGS, LIST_TEMPO, LIST_TIME, LIST_TITLE, LIST_VERSION, main(), main_song, no_spectrum, normalColor(), rhythm_prop_sx, smallhistogram_type< smallhistogram_size >::scale, selector, target, and text().
| QVariant QSong::headerData | ( | int | col, | |
| Qt::Orientation | orientation, | |||
| int | role | |||
| ) | const [virtual] |
References LIST_AUTHOR, LIST_COMPOSITION, LIST_CUES, LIST_DCOLOR, LIST_FILE, LIST_HISTOGRAM, LIST_INDEX, LIST_MAX, LIST_MD5SUM, LIST_MEAN, LIST_MIN, LIST_ONDISK, LIST_POWER, LIST_RHYTHM, LIST_SPECTRUM, LIST_TAGS, LIST_TEMPO, LIST_TIME, LIST_TITLE, and LIST_VERSION.
| QModelIndex QSong::indexof | ( | Song * | song | ) | [static] |
References i, selector, and SongSelectorLogic::songList.
Referenced by set_current_song().
| QColor QSong::normalColor | ( | Song * | song | ) | [static] |
References Config::color_ondisk, Config::color_songs_based_on_history, and colorOfPlaycount().
Referenced by colorOfAuthorCol(), colorOfdColorCol(), colorOfTempoCol(), and data().
| static void QSong::playedAuthorAtTime | ( | int | i, | |
| int | t | |||
| ) | [inline, static] |
| int QSong::rowCount | ( | const QModelIndex & | ) | const [virtual] |
| void QSong::setVector | ( | Song ** | arr, | |
| int | cnt | |||
| ) |
References assert(), bpmdj_deallocate, and Sort().
| Song * QSong::songEssence | ( | const QModelIndex & | i | ) | [static] |
References songEssence().
| Song * QSong::songEssence | ( | int | i | ) | [static] |
| void QSong::Sort | ( | ) | [static] |
References i, LIST_COMPOSITION, LIST_HISTOGRAM, LIST_POWER, LIST_RHYTHM, and LIST_TEMPO.
Referenced by setVector(), and sort().
| void QSong::sort | ( | int | col, | |
| bool | ascending | |||
| ) | [virtual] |
References Sort().
Referenced by SongSelectorLogic::sortByColumn().
| QString QSong::text | ( | Song * | song, | |
| int | col | |||
| ) | [static] |
References assert(), EMPTY, FALSE_TEXT, Tags::full_string(), LIST_AUTHOR, LIST_COMPOSITION, LIST_CUES, LIST_DCOLOR, LIST_FILE, LIST_HISTOGRAM, LIST_INDEX, LIST_MAX, LIST_MD5SUM, LIST_MEAN, LIST_MIN, LIST_ONDISK, LIST_POWER, LIST_RHYTHM, LIST_SPECTRUM, LIST_TAGS, LIST_TEMPO, LIST_TIME, LIST_TITLE, LIST_VERSION, Song::tempo_str(), and TRUE_TEXT.
Referenced by data().
1.6.2