mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Avoid naming manually connected slots on_x_y()
This commit is contained in:
@@ -240,7 +240,7 @@ public:
|
||||
m_Thread = new QThread();
|
||||
m_func = f;
|
||||
moveToThread(m_Thread);
|
||||
connect(m_Thread, SIGNAL(started()), this, SLOT(process()));
|
||||
QObject::connect(m_Thread, &QThread::started, this, &LambdaThread::process);
|
||||
}
|
||||
|
||||
void start(QThread::Priority prio = QThread::InheritPriority) { m_Thread->start(prio); }
|
||||
|
||||
@@ -66,7 +66,7 @@ EventBrowser::EventBrowser(CaptureContext *ctx, QWidget *parent)
|
||||
m_FindHighlight = new QTimer(this);
|
||||
m_FindHighlight->setInterval(400);
|
||||
m_FindHighlight->setSingleShot(true);
|
||||
connect(m_FindHighlight, SIGNAL(timeout()), this, SLOT(on_findHighlight_timeout()));
|
||||
connect(m_FindHighlight, &QTimer::timeout, this, &EventBrowser::findHighlight_timeout);
|
||||
|
||||
QObject::connect(ui->closeFind, &QToolButton::clicked, this, &EventBrowser::on_HideFindJump);
|
||||
QObject::connect(ui->closeJump, &QToolButton::clicked, this, &EventBrowser::on_HideFindJump);
|
||||
@@ -273,7 +273,7 @@ void EventBrowser::on_jumpToEID_returnPressed()
|
||||
}
|
||||
}
|
||||
|
||||
void EventBrowser::on_findHighlight_timeout()
|
||||
void EventBrowser::findHighlight_timeout()
|
||||
{
|
||||
ClearFindIcons();
|
||||
|
||||
@@ -306,7 +306,7 @@ void EventBrowser::on_findEvent_returnPressed()
|
||||
{
|
||||
// manually fire it instantly
|
||||
m_FindHighlight->stop();
|
||||
on_findHighlight_timeout();
|
||||
findHighlight_timeout();
|
||||
}
|
||||
|
||||
if(!ui->findEvent->text().isEmpty())
|
||||
|
||||
@@ -51,29 +51,21 @@ public:
|
||||
void OnEventSelected(uint32_t eventID);
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_find_clicked();
|
||||
|
||||
void on_gotoEID_clicked();
|
||||
|
||||
void on_timeDraws_clicked();
|
||||
|
||||
void on_toolButton_clicked();
|
||||
|
||||
void on_HideFindJump();
|
||||
|
||||
void on_jumpToEID_returnPressed();
|
||||
|
||||
void on_findEvent_returnPressed();
|
||||
|
||||
void on_findEvent_textEdited(const QString &arg1);
|
||||
|
||||
void on_events_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||
|
||||
void on_findNext_clicked();
|
||||
|
||||
void on_findPrev_clicked();
|
||||
|
||||
void on_findHighlight_timeout();
|
||||
// manual slots
|
||||
void findHighlight_timeout();
|
||||
|
||||
private:
|
||||
uint AddDrawcalls(QTreeWidgetItem *parent, const rdctype::array<FetchDrawcall> &draws);
|
||||
|
||||
@@ -337,30 +337,29 @@ TextureViewer::TextureViewer(CaptureContext *ctx, QWidget *parent)
|
||||
QObject::connect(ui->render, &CustomPaintWidget::resize, this, &TextureViewer::render_resize);
|
||||
|
||||
QObject::connect(ui->zoomOption->lineEdit(), &QLineEdit::returnPressed, this,
|
||||
&TextureViewer::on_zoomOption_returnPressed);
|
||||
&TextureViewer::zoomOption_returnPressed);
|
||||
|
||||
QObject::connect(ui->depthDisplay, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->stencilDisplay, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
QObject::connect(ui->flip_y, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->flip_y, &QToolButton::toggled, this, &TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->channelRed, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->channelGreen, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->channelBlue, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->channelAlpha, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->gammaDisplay, &QToolButton::toggled, this,
|
||||
&TextureViewer::on_channelsWidget_toggled);
|
||||
&TextureViewer::channelsWidget_toggled);
|
||||
QObject::connect(ui->channels, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&TextureViewer::on_channelsWidget_selected);
|
||||
&TextureViewer::channelsWidget_selected);
|
||||
QObject::connect(ui->hdrMul, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&TextureViewer::on_channelsWidget_selected);
|
||||
&TextureViewer::channelsWidget_selected);
|
||||
QObject::connect(ui->customShader, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&TextureViewer::on_channelsWidget_selected);
|
||||
&TextureViewer::channelsWidget_selected);
|
||||
|
||||
ui->dockarea->addToolWindow(ui->renderContainer, ToolWindowManager::EmptySpace);
|
||||
ui->dockarea->setToolWindowProperties(renderContainer, ToolWindowManager::DisallowUserDocking |
|
||||
@@ -1323,7 +1322,7 @@ ResourcePreview *TextureViewer::UI_CreateThumbnail(ThumbnailStrip *strip)
|
||||
// prev.MouseClick += thumbsLayout_MouseClick;
|
||||
// prev.MouseDoubleClick += thumbsLayout_MouseDoubleClick;
|
||||
|
||||
QObject::connect(prev, &ResourcePreview::clicked, this, &TextureViewer::on_thumb_clicked);
|
||||
QObject::connect(prev, &ResourcePreview::clicked, this, &TextureViewer::thumb_clicked);
|
||||
|
||||
prev->setActive(false);
|
||||
strip->AddPreview(prev);
|
||||
@@ -1538,7 +1537,7 @@ void TextureViewer::InitStageResourcePreviews(ShaderStageType stage,
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_thumb_clicked(QMouseEvent *e)
|
||||
void TextureViewer::thumb_clicked(QMouseEvent *e)
|
||||
{
|
||||
if(e->buttons() & Qt::LeftButton)
|
||||
{
|
||||
@@ -2019,7 +2018,7 @@ void TextureViewer::on_zoomOption_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_zoomOption_returnPressed()
|
||||
void TextureViewer::zoomOption_returnPressed()
|
||||
{
|
||||
UI_SetScale(getCurrentZoomValue());
|
||||
}
|
||||
|
||||
@@ -125,21 +125,15 @@ public:
|
||||
void OnLogfileClosed();
|
||||
void OnEventSelected(uint32_t eventID);
|
||||
|
||||
|
||||
private slots:
|
||||
void render_mouseClick(QMouseEvent *e);
|
||||
void render_mouseMove(QMouseEvent *e);
|
||||
void render_mouseWheel(QWheelEvent *e);
|
||||
void render_resize(QResizeEvent *e);
|
||||
|
||||
void on_thumb_clicked(QMouseEvent *);
|
||||
|
||||
// automatic slots
|
||||
void on_renderHScroll_valueChanged(int position);
|
||||
void on_renderVScroll_valueChanged(int position);
|
||||
|
||||
void on_fitToWindow_toggled(bool checked);
|
||||
void on_zoomExactSize_clicked();
|
||||
void on_zoomOption_currentIndexChanged(int index);
|
||||
void on_zoomOption_returnPressed();
|
||||
|
||||
void on_mipLevel_currentIndexChanged(int index);
|
||||
void on_sliceFace_currentIndexChanged(int index);
|
||||
@@ -150,12 +144,21 @@ private slots:
|
||||
void on_autoFit_clicked();
|
||||
void on_reset01_clicked();
|
||||
void on_visualiseRange_clicked();
|
||||
|
||||
void on_channelsWidget_toggled(bool checked) { UI_UpdateChannels(); }
|
||||
void on_channelsWidget_selected(int index) { UI_UpdateChannels(); }
|
||||
void on_backcolorPick_clicked();
|
||||
void on_checkerBack_clicked();
|
||||
|
||||
// manual slots
|
||||
void render_mouseClick(QMouseEvent *e);
|
||||
void render_mouseMove(QMouseEvent *e);
|
||||
void render_mouseWheel(QWheelEvent *e);
|
||||
void render_resize(QResizeEvent *e);
|
||||
|
||||
void thumb_clicked(QMouseEvent *);
|
||||
|
||||
void zoomOption_returnPressed();
|
||||
|
||||
void channelsWidget_toggled(bool checked) { UI_UpdateChannels(); }
|
||||
void channelsWidget_selected(int index) { UI_UpdateChannels(); }
|
||||
private:
|
||||
void RT_FetchCurrentPixel(uint32_t x, uint32_t y, PixelValue &pickValue, PixelValue &realValue);
|
||||
void RT_PickPixelsAndUpdate();
|
||||
|
||||
Reference in New Issue
Block a user