+ g_profileDialog = this;
+
+ /* Gradients for call duration histograms */
+ QLinearGradient cpuGradient;
+ cpuGradient.setColorAt(0.9, QColor(0, 0, 210));
+ cpuGradient.setColorAt(0.0, QColor(130, 130, 255));
+
+ QLinearGradient gpuGradient;
+ gpuGradient.setColorAt(0.9, QColor(210, 0, 0));
+ gpuGradient.setColorAt(0.0, QColor(255, 130, 130));
+
+
+ /* Setup heatmap timeline */
+ m_timeline->setLabel(new GraphLabelWidget("Frames ", m_timeline));
+ m_timeline->label()->setFlags(Qt::AlignVCenter | Qt::AlignRight);
+
+ m_timeline->setView(new HeatmapView(m_timeline));
+
+ m_timeline->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_timeline));
+ m_timeline->setAxis(GraphWidget::AxisLeft, new HeatmapVerticalAxisWidget(m_timeline));
+ m_timeline->axis(GraphWidget::AxisLeft)->resize(80, 0);
+
+ m_timeline->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ m_timeline->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+
+
+ /* Setup Cpu call duration histogram */
+ m_cpuGraph->setLabel(new GraphLabelWidget("CPU", m_cpuGraph));
+
+ m_cpuGraph->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_cpuGraph));
+ m_cpuGraph->setAxis(GraphWidget::AxisLeft, new TimeAxisWidget(m_cpuGraph));
+ m_cpuGraph->axis(GraphWidget::AxisLeft)->resize(80, 0);
+
+ HistogramView* cpuView = new HistogramView(m_cpuGraph);
+ cpuView->setSelectedGradient(cpuGradient);
+ m_cpuGraph->setView(cpuView);
+
+
+ /* Setup Gpu call duration histogram */
+ m_gpuGraph->setLabel(new GraphLabelWidget("GPU", m_gpuGraph));
+
+ m_gpuGraph->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_gpuGraph));
+ m_gpuGraph->setAxis(GraphWidget::AxisLeft, new TimeAxisWidget(m_gpuGraph));
+ m_gpuGraph->axis(GraphWidget::AxisLeft)->resize(80, 0);
+
+ HistogramView* gpuView = new HistogramView(m_gpuGraph);
+ gpuView->setSelectedGradient(gpuGradient);
+ m_gpuGraph->setView(gpuView);
+