///
/// This method paints the widgets needed in this step. The ones that the user havent interact
///  with them will be marked in red otherwise in a green color.
///
void UseCaseGuide::paintRequirementMap(RequirementMap & map)
{
    if (!helpEnabled_)
        return;


    RequirementMap::iterator it=map.begin();

    Figure::PaintingContext * reqDone= new Figure::PaintingContext();
    Figure::PaintingContext * reqIncomplete= new Figure::PaintingContext();

    reqDone->lineColor=Qt::green;
    reqDone->lineWidth=3;
    reqIncomplete->lineColor=Qt::red;
    reqIncomplete->lineWidth=3;

    //Painting the rectangle surrounding the widgets of the current stage
    for (;it!=map.end();it++)
    {
        QWidget * w=this->parentWidget()->findChild<QWidget *>(it->first.c_str());
        Figure::PaintingContext * req;

        it->second?req=reqDone:req=reqIncomplete;

        shadow_->paintFigure(it->first,new Rectangle(w->mapTo(this->parentWidget(),shadow_->pos()).x(),
                                                    w->mapTo(this->parentWidget(),shadow_->pos()).y(),
                                                    w->width(),
                                                    w->height(),req));


    }

    shadow_->update();

}