mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 13:30:44 +00:00
Add a ctrl+enter shortcut in capture dialog to launch the capture
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "CaptureDialog.h"
|
||||
#include <QKeyEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
@@ -207,6 +208,10 @@ CaptureDialog::CaptureDialog(ICaptureContext &ctx, OnCaptureMethod captureCallba
|
||||
initWarning(ui->androidWarn);
|
||||
QObject::connect(ui->androidWarn, &RDLabel::clicked, this, &CaptureDialog::androidWarn_mouseClick);
|
||||
|
||||
QObject::connect(ui->exePath, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
QObject::connect(ui->workDirPath, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
QObject::connect(ui->cmdline, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
|
||||
m_AndroidFlags = AndroidFlags::NoFlags;
|
||||
|
||||
m_CaptureCallback = captureCallback;
|
||||
@@ -684,6 +689,15 @@ Would you like RenderDoc to try patching your package?
|
||||
}
|
||||
}
|
||||
|
||||
void CaptureDialog::lineEdit_keyPress(QKeyEvent *ev)
|
||||
{
|
||||
if((ev->key() == Qt::Key_Return || ev->key() == Qt::Key_Enter) &&
|
||||
ev->modifiers() & Qt::ControlModifier)
|
||||
{
|
||||
TriggerCapture();
|
||||
}
|
||||
}
|
||||
|
||||
void CaptureDialog::on_processRefesh_clicked()
|
||||
{
|
||||
fillProcessList();
|
||||
|
||||
@@ -103,6 +103,7 @@ private slots:
|
||||
// manual slots
|
||||
void vulkanLayerWarn_mouseClick();
|
||||
void androidWarn_mouseClick();
|
||||
void lineEdit_keyPress(QKeyEvent *);
|
||||
|
||||
private:
|
||||
Ui::CaptureDialog *ui;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="exePath">
|
||||
<widget class="RDLineEdit" name="exePath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@@ -134,7 +134,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="workDirPath">
|
||||
<widget class="RDLineEdit" name="workDirPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@@ -147,7 +147,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QLineEdit" name="cmdline">
|
||||
<widget class="RDLineEdit" name="cmdline">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@@ -826,6 +826,11 @@
|
||||
<extends>QLabel</extends>
|
||||
<header>Widgets/Extended/RDLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RDLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>Widgets/Extended/RDLineEdit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user