MCPcopy Create free account
hub / github.com/apitrace/apitrace / ProfileDialog

Method ProfileDialog

gui/profiledialog.cpp:69–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67};
68
69ProfileDialog::ProfileDialog(QWidget *parent)
70 : QDialog(parent),
71 m_profile(0)
72{
73 setupUi(this);
74 g_profileDialog = this;
75
76 /* Gradients for call duration histograms */
77 QLinearGradient cpuGradient;
78 cpuGradient.setColorAt(0.9, QColor(0, 0, 210));
79 cpuGradient.setColorAt(0.0, QColor(130, 130, 255));
80
81 QLinearGradient gpuGradient;
82 gpuGradient.setColorAt(0.9, QColor(210, 0, 0));
83 gpuGradient.setColorAt(0.0, QColor(255, 130, 130));
84
85
86 /* Setup heatmap timeline */
87 m_timeline->setLabel(new GraphLabelWidget("Frames ", m_timeline));
88 m_timeline->label()->setFlags(Qt::AlignVCenter | Qt::AlignRight);
89
90 m_timeline->setView(new HeatmapView(m_timeline));
91
92 m_timeline->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_timeline));
93 m_timeline->setAxis(GraphWidget::AxisLeft, new HeatmapVerticalAxisWidget(m_timeline));
94 m_timeline->axis(GraphWidget::AxisLeft)->resize(80, 0);
95
96 m_timeline->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
97 m_timeline->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
98
99
100 /* Setup Cpu call duration histogram */
101 m_cpuGraph->setLabel(new GraphLabelWidget("CPU", m_cpuGraph));
102
103 m_cpuGraph->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_cpuGraph));
104 m_cpuGraph->setAxis(GraphWidget::AxisLeft, new TimeAxisWidget(m_cpuGraph));
105 m_cpuGraph->axis(GraphWidget::AxisLeft)->resize(80, 0);
106
107 HistogramView* cpuView = new HistogramView(m_cpuGraph);
108 cpuView->setSelectedGradient(cpuGradient);
109 m_cpuGraph->setView(cpuView);
110
111
112 /* Setup Gpu call duration histogram */
113 m_gpuGraph->setLabel(new GraphLabelWidget("GPU", m_gpuGraph));
114
115 m_gpuGraph->setAxis(GraphWidget::AxisTop, new FrameAxisWidget(m_gpuGraph));
116 m_gpuGraph->setAxis(GraphWidget::AxisLeft, new TimeAxisWidget(m_gpuGraph));
117 m_gpuGraph->axis(GraphWidget::AxisLeft)->resize(80, 0);
118
119 HistogramView* gpuView = new HistogramView(m_gpuGraph);
120 gpuView->setSelectedGradient(gpuGradient);
121 m_gpuGraph->setView(gpuView);
122
123
124 /* Synchronise selections */
125 connect(m_timeline, SIGNAL(selectionChanged(SelectionState)), m_cpuGraph, SLOT(setSelection(SelectionState)));
126 connect(m_timeline, SIGNAL(selectionChanged(SelectionState)), m_gpuGraph, SLOT(setSelection(SelectionState)));

Callers

nothing calls this directly

Calls 10

setFlagsMethod · 0.80
setAxisMethod · 0.80
axisMethod · 0.80
setSelectedGradientMethod · 0.80
setLabelMethod · 0.45
labelMethod · 0.45
setViewMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected