summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-10-26 11:40:12 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2014-12-09 16:37:34 +0100
commit706f9c5574f74b018958477813495dd6e15bd00d (patch)
tree20b91ad228862764177d7cb0997e3ba53093b5e3 /src/citra_qt
parentcitra-qt: Add a utility spinbox class called CSpinBox. (diff)
downloadyuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.gz
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.bz2
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.lz
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.xz
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.tar.zst
yuzu-706f9c5574f74b018958477813495dd6e15bd00d.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp22
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.hxx5
2 files changed, 26 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
return QVariant();
}
+QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ switch(role) {
+ case Qt::DisplayRole:
+ {
+ if (section == 0) {
+ return tr("Command Name");
+ } else if (section == 1) {
+ return tr("Data");
+ }
+
+ break;
+ }
+ }
+
+ return QVariant();
+}
+
void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace)
{
beginResetModel();
@@ -70,7 +88,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi
list_widget->setFont(QFont("monospace"));
list_widget->setRootIsDecorated(false);
- QPushButton* toggle_tracing = new QPushButton(tr("Start Tracing"));
+ toggle_tracing = new QPushButton(tr("Start Tracing"));
connect(toggle_tracing, SIGNAL(clicked()), this, SLOT(OnToggleTracing()));
connect(this, SIGNAL(TracingFinished(const Pica::DebugUtils::PicaTrace&)),
@@ -88,8 +106,10 @@ void GPUCommandListWidget::OnToggleTracing()
{
if (!Pica::DebugUtils::IsPicaTracing()) {
Pica::DebugUtils::StartPicaTracing();
+ toggle_tracing->setText(tr("Stop Tracing"));
} else {
pica_trace = Pica::DebugUtils::FinishPicaTracing();
emit TracingFinished(*pica_trace);
+ toggle_tracing->setText(tr("Start Tracing"));
}
}
diff --git a/src/citra_qt/debugger/graphics_cmdlists.hxx b/src/citra_qt/debugger/graphics_cmdlists.hxx
index 1523e724f..31bd2546d 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.hxx
+++ b/src/citra_qt/debugger/graphics_cmdlists.hxx
@@ -10,6 +10,8 @@
#include "video_core/gpu_debugger.h"
#include "video_core/debug_utils/debug_utils.h"
+class QPushButton;
+
class GPUCommandListModel : public QAbstractListModel
{
Q_OBJECT
@@ -20,6 +22,7 @@ public:
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
public slots:
void OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& trace);
@@ -43,4 +46,6 @@ signals:
private:
std::unique_ptr<Pica::DebugUtils::PicaTrace> pica_trace;
+
+ QPushButton* toggle_tracing;
};