mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
5f28b745a2
_ /)
mo / )
|/)\)
/\_
\__|=
( )
__)(__
_____/ \\_____
| _ ___ _ ||
| | \ | | \ ||
| | | | | | ||
| |_/ | |_/ ||
| | \ | | ||
| | \ | | ||
| | \. _|_. | . ||
| ||
|repository history||
| ||
* | * ** * ** |** **
\))ejm97/.,(//,,..,,\||(,,.,\\,.((//
38 lines
621 B
C++
38 lines
621 B
C++
#include "CustomPaintWidget.h"
|
|
#include <QPainter>
|
|
#include "renderdoc_replay.h"
|
|
|
|
CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
|
|
{
|
|
m_Output = NULL;
|
|
setAttribute(Qt::WA_PaintOnScreen);
|
|
}
|
|
|
|
CustomPaintWidget::~CustomPaintWidget()
|
|
{
|
|
}
|
|
|
|
void CustomPaintWidget::mousePressEvent(QMouseEvent *e)
|
|
{
|
|
emit clicked(e);
|
|
}
|
|
|
|
void CustomPaintWidget::mouseMoveEvent(QMouseEvent *e)
|
|
{
|
|
emit mouseMove(e);
|
|
}
|
|
|
|
void CustomPaintWidget::paintEvent(QPaintEvent *e)
|
|
{
|
|
if(m_Output)
|
|
{
|
|
m_Output->Display();
|
|
}
|
|
else
|
|
{
|
|
QPainter p(this);
|
|
p.setBrush(QBrush(Qt::black));
|
|
p.drawRect(rect());
|
|
}
|
|
}
|