This is the function that populates the list:
void MainWindow
::DropToPlayList(QStringList list,
int row
) // row is the location of the row where the files are dropped {
if (row < 0)
row = 0;
for (int c=0;c<list.count();c++)
{
ui.tablePlaylist->insertRow(row+c);
// create all items for the row
uint32_t duration = 0;
for (int i=0;i<ui.tablePlaylist->columnCount();i++)
{
ui.
tablePlaylist->setItem
(row
+c,i,
new QTableWidgetItem(""));
// create all column items for row }
ui.tablePlaylist->item(row+c,COLUMN_START_TIME)->setText("00:00:00:00");
ui.tablePlaylist->item(row+c,COLUMN_DURATION)->setText("duration");
ui.tablePlaylist->item(row+c,COLUMN_TITLE)->setText("title");
ui.tablePlaylist->item(row+c,COLUMN_LOCATION)->setText("location");
ui.tablePlaylist->item(row+c,COLUMN_CATEGORY)->setText("category");
}
}
void MainWindow::DropToPlayList(QStringList list, int row) // row is the location of the row where the files are dropped
{
if (row < 0)
row = 0;
for (int c=0;c<list.count();c++)
{
ui.tablePlaylist->insertRow(row+c);
// create all items for the row
uint32_t duration = 0;
for (int i=0;i<ui.tablePlaylist->columnCount();i++)
{
ui.tablePlaylist->setItem(row+c,i, new QTableWidgetItem("")); // create all column items for row
}
ui.tablePlaylist->item(row+c,COLUMN_START_TIME)->setText("00:00:00:00");
ui.tablePlaylist->item(row+c,COLUMN_DURATION)->setText("duration");
ui.tablePlaylist->item(row+c,COLUMN_TITLE)->setText("title");
ui.tablePlaylist->item(row+c,COLUMN_LOCATION)->setText("location");
ui.tablePlaylist->item(row+c,COLUMN_CATEGORY)->setText("category");
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks