Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
7fd03750
There was an error fetching the commit references. Please try again later.
Commit
7fd03750
authored
9 years ago
by
Tony Wasserka
Browse files
Options
Downloads
Patches
Plain Diff
citra-qt: Add support for copying the command list contents to clipboard.
parent
7673cdfd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/citra_qt/debugger/graphics_cmdlists.cpp
+29
-1
29 additions, 1 deletion
src/citra_qt/debugger/graphics_cmdlists.cpp
src/citra_qt/debugger/graphics_cmdlists.h
+2
-0
2 additions, 0 deletions
src/citra_qt/debugger/graphics_cmdlists.h
with
31 additions
and
1 deletion
src/citra_qt/debugger/graphics_cmdlists.cpp
+
29
−
1
View file @
7fd03750
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
// Refer to the license.txt file included.
#include
<QApplication>
#include
<QClipboard>
#include
<QLabel>
#include
<QLabel>
#include
<QListView>
#include
<QListView>
#include
<QMainWindow>
#include
<QMainWindow>
...
@@ -304,16 +306,24 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi
...
@@ -304,16 +306,24 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi
this
,
SLOT
(
OnCommandDoubleClicked
(
const
QModelIndex
&
)));
this
,
SLOT
(
OnCommandDoubleClicked
(
const
QModelIndex
&
)));
toggle_tracing
=
new
QPushButton
(
tr
(
"Start Tracing"
));
toggle_tracing
=
new
QPushButton
(
tr
(
"Start Tracing"
));
QPushButton
*
copy_all
=
new
QPushButton
(
tr
(
"Copy All"
));
connect
(
toggle_tracing
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
OnToggleTracing
()));
connect
(
toggle_tracing
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
OnToggleTracing
()));
connect
(
this
,
SIGNAL
(
TracingFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
)),
connect
(
this
,
SIGNAL
(
TracingFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
)),
model
,
SLOT
(
OnPicaTraceFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
)));
model
,
SLOT
(
OnPicaTraceFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
)));
connect
(
copy_all
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
CopyAllToClipboard
()));
command_info_widget
=
new
QWidget
;
command_info_widget
=
new
QWidget
;
QVBoxLayout
*
main_layout
=
new
QVBoxLayout
;
QVBoxLayout
*
main_layout
=
new
QVBoxLayout
;
main_layout
->
addWidget
(
list_widget
);
main_layout
->
addWidget
(
list_widget
);
main_layout
->
addWidget
(
toggle_tracing
);
{
QHBoxLayout
*
sub_layout
=
new
QHBoxLayout
;
sub_layout
->
addWidget
(
toggle_tracing
);
sub_layout
->
addWidget
(
copy_all
);
main_layout
->
addLayout
(
sub_layout
);
}
main_layout
->
addWidget
(
command_info_widget
);
main_layout
->
addWidget
(
command_info_widget
);
main_widget
->
setLayout
(
main_layout
);
main_widget
->
setLayout
(
main_layout
);
...
@@ -330,3 +340,21 @@ void GPUCommandListWidget::OnToggleTracing() {
...
@@ -330,3 +340,21 @@ void GPUCommandListWidget::OnToggleTracing() {
toggle_tracing
->
setText
(
tr
(
"Start Tracing"
));
toggle_tracing
->
setText
(
tr
(
"Start Tracing"
));
}
}
}
}
void
GPUCommandListWidget
::
CopyAllToClipboard
()
{
QClipboard
*
clipboard
=
QApplication
::
clipboard
();
QString
text
;
QAbstractItemModel
*
model
=
(
QAbstractListModel
*
)
list_widget
->
model
();
for
(
int
row
=
0
;
row
<
model
->
rowCount
({});
++
row
)
{
for
(
int
col
=
0
;
col
<
model
->
columnCount
({});
++
col
)
{
QModelIndex
index
=
model
->
index
(
row
,
col
);
text
+=
model
->
data
(
index
).
value
<
QString
>
();
text
+=
'\t'
;
}
text
+=
'\n'
;
}
clipboard
->
setText
(
text
);
}
This diff is collapsed.
Click to expand it.
src/citra_qt/debugger/graphics_cmdlists.h
+
2
−
0
View file @
7fd03750
...
@@ -49,6 +49,8 @@ public slots:
...
@@ -49,6 +49,8 @@ public slots:
void
SetCommandInfo
(
const
QModelIndex
&
);
void
SetCommandInfo
(
const
QModelIndex
&
);
void
CopyAllToClipboard
();
signals:
signals:
void
TracingFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
);
void
TracingFinished
(
const
Pica
::
DebugUtils
::
PicaTrace
&
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment