I think this would be better in heapmap.h rather then in the gui case.  That way if you want to make a heatmap without the gui you still can get to the emun.