various improvements to import process and project management

This commit is contained in:
itsmattkc
2019-07-01 15:40:09 -07:00
parent 8f6cb7a2cb
commit 0966b62f29
14 changed files with 104 additions and 20 deletions
+16 -4
View File
@@ -122,21 +122,33 @@ int ProjectViewModel::columnCount(const QModelIndex &parent) const
QVariant ProjectViewModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::DisplayRole) {
Item* internal_item = static_cast<Item*>(index.internalPointer());
switch (role) {
case Qt::DisplayRole:
{
// Standard text role
ColumnType column_type = columns_.at(index.column());
switch (column_type) {
case kName:
return static_cast<Item*>(index.internalPointer())->name();
return internal_item->name();
case kDuration:
// FIXME Return actual information
return "00:00:00;00";
case kRate:
// FIXME Return actual information
return "29.97 FPS";
}
}
// TODO Add DecorationRole to column 1 for icons
break;
case Qt::DecorationRole:
// If this is the first column, return the Item's icon
if (index.column() == 0) {
return internal_item->icon();
}
break;
}
return QVariant();
}