18#include <QStandardPaths>
20#include <swsongscontrol.h>
21#include <swradiyomainwidget.h>
28 _header->setText(
"Playlist" );
29 _itemList->setFocus();
30 _sourceType = SWPlayableItem::SWLOCALFILE;
34SWSongsControl::~SWSongsControl()
40void SWSongsControl::loadEntryList(
const QString& folderHint )
42 QDir songs( folderHint );
44 songs.setFilter( QDir::Files );
45 QFileInfoList list = songs.entryInfoList();
46 for(
auto& entry : list )
49 QListWidgetItem* item =
new QListWidgetItem( entry.fileName() );
51 item->setData( SWListControlRole,
"file:" + entry.absoluteFilePath() );
52 _itemList->addItem( item );
55 if( _itemList->count() > 0 )
58 _itemList->setCurrentRow( _idx );
67void SWSongsControl::loadSettings()
73void SWSongsControl::saveSettings()