diff options
| author | 2014-10-26 11:40:12 +0100 | |
|---|---|---|
| committer | 2014-12-09 16:37:34 +0100 | |
| commit | 706f9c5574f74b018958477813495dd6e15bd00d (patch) | |
| tree | 20b91ad228862764177d7cb0997e3ba53093b5e3 /src/citra_qt/debugger/graphics_cmdlists.cpp | |
| parent | citra-qt: Add a utility spinbox class called CSpinBox. (diff) | |
| download | yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.gz yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.xz yuzu-706f9c5574f74b018958477813495dd6e15bd00d.zip | |
citra-qt: Polish the pica tracing widget.
Changed start/stop button to reflect current tracing status.
Properly labeled column headers.
Diffstat (limited to 'src/citra_qt/debugger/graphics_cmdlists.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 71dd166cd..9e53a03d0 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -49,6 +49,24 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const | |||
| 49 | return QVariant(); | 49 | return QVariant(); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const | ||
| 53 | { | ||
| 54 | switch(role) { | ||
| 55 | case Qt::DisplayRole: | ||
| 56 | { | ||
| 57 | if (section == 0) { | ||
| 58 | return tr("Command Name"); | ||
| 59 | } else if (section == 1) { | ||
| 60 | return tr("Data"); | ||
| 61 | } | ||
| 62 | |||
| 63 | break; | ||
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | return QVariant(); | ||
| 68 | } | ||
| 69 | |||
| 52 | void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace) | 70 | void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace) |
| 53 | { | 71 | { |
| 54 | beginResetModel(); | 72 | beginResetModel(); |
| @@ -70,7 +88,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi | |||
| 70 | list_widget->setFont(QFont("monospace")); | 88 | list_widget->setFont(QFont("monospace")); |
| 71 | list_widget->setRootIsDecorated(false); | 89 | list_widget->setRootIsDecorated(false); |
| 72 | 90 | ||
| 73 | QPushButton* toggle_tracing = new QPushButton(tr("Start Tracing")); | 91 | toggle_tracing = new QPushButton(tr("Start Tracing")); |
| 74 | 92 | ||
| 75 | connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing())); | 93 | connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing())); |
| 76 | connect(this, SIGNAL(TracingFinished(const Pica::DebugUtils::PicaTrace&)), | 94 | connect(this, SIGNAL(TracingFinished(const Pica::DebugUtils::PicaTrace&)), |
| @@ -88,8 +106,10 @@ void GPUCommandListWidget::OnToggleTracing() | |||
| 88 | { | 106 | { |
| 89 | if (!Pica::DebugUtils::IsPicaTracing()) { | 107 | if (!Pica::DebugUtils::IsPicaTracing()) { |
| 90 | Pica::DebugUtils::StartPicaTracing(); | 108 | Pica::DebugUtils::StartPicaTracing(); |
| 109 | toggle_tracing->setText(tr("Stop Tracing")); | ||
| 91 | } else { | 110 | } else { |
| 92 | pica_trace = Pica::DebugUtils::FinishPicaTracing(); | 111 | pica_trace = Pica::DebugUtils::FinishPicaTracing(); |
| 93 | emit TracingFinished(*pica_trace); | 112 | emit TracingFinished(*pica_trace); |
| 113 | toggle_tracing->setText(tr("Start Tracing")); | ||
| 94 | } | 114 | } |
| 95 | } | 115 | } |