#include "stdafx.h"
#include "Task.h"

void TaskWrapper::displayIn(QTreeWidgetItemTask* item, size_t snapshotFrame) const
{
  //item->setCustomData(m_id);
  item->setText(0, QString::number(m_priority) + " - " + m_name);

  //if (!m_accessible)
  //{
  //  QFont font(item->font(0));
  //  font.setItalic(true);
  //  item->setFont(0, font);
  //}
  
  QBrush brush = item->foreground(0);
  QColor color;
  if (m_executionFrame <= static_cast<size_t>(snapshotFrame))
    color = QColor(255, 0, 0);
  brush.setColor(color);
  item->setForeground(0, brush);

  item->setExpanded(true);
};
