@@ -29,19 +29,16 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
HistogramScope::HistogramScope(QWidget* parent) :
|
||||
ScopeBase(parent)
|
||||
{
|
||||
}
|
||||
#define super ScopeBase
|
||||
|
||||
HistogramScope::~HistogramScope()
|
||||
HistogramScope::HistogramScope(QWidget* parent) :
|
||||
super(parent)
|
||||
{
|
||||
OnDestroy();
|
||||
}
|
||||
|
||||
void HistogramScope::OnInit()
|
||||
{
|
||||
ScopeBase::OnInit();
|
||||
super::OnInit();
|
||||
|
||||
ShaderCode secondary_code(FileFunctions::ReadFileAsString(":/shaders/rgbhistogram_secondary.frag"),
|
||||
FileFunctions::ReadFileAsString(":/shaders/rgbhistogram.vert"));
|
||||
@@ -50,7 +47,7 @@ void HistogramScope::OnInit()
|
||||
|
||||
void HistogramScope::OnDestroy()
|
||||
{
|
||||
ScopeBase::OnDestroy();
|
||||
super::OnDestroy();
|
||||
|
||||
pipeline_secondary_.clear();
|
||||
texture_row_sums_ = nullptr;
|
||||
|
||||
@@ -31,7 +31,7 @@ class HistogramScope : public ScopeBase
|
||||
public:
|
||||
HistogramScope(QWidget* parent = nullptr);
|
||||
|
||||
virtual ~HistogramScope() override;
|
||||
MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR(HistogramScope)
|
||||
|
||||
protected slots:
|
||||
virtual void OnInit() override;
|
||||
|
||||
@@ -24,18 +24,15 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
#define super ManagedDisplayWidget
|
||||
|
||||
ScopeBase::ScopeBase(QWidget* parent) :
|
||||
ManagedDisplayWidget(parent),
|
||||
super(parent),
|
||||
buffer_(nullptr)
|
||||
{
|
||||
EnableDefaultContextMenu();
|
||||
}
|
||||
|
||||
ScopeBase::~ScopeBase()
|
||||
{
|
||||
OnDestroy();
|
||||
}
|
||||
|
||||
void ScopeBase::SetBuffer(Frame *frame)
|
||||
{
|
||||
buffer_ = frame;
|
||||
@@ -45,7 +42,7 @@ void ScopeBase::SetBuffer(Frame *frame)
|
||||
|
||||
void ScopeBase::showEvent(QShowEvent* e)
|
||||
{
|
||||
ManagedDisplayWidget::showEvent(e);
|
||||
super::showEvent(e);
|
||||
|
||||
UploadTextureFromBuffer();
|
||||
}
|
||||
@@ -92,7 +89,7 @@ void ScopeBase::UploadTextureFromBuffer()
|
||||
|
||||
void ScopeBase::OnInit()
|
||||
{
|
||||
ManagedDisplayWidget::OnInit();
|
||||
super::OnInit();
|
||||
|
||||
UploadTextureFromBuffer();
|
||||
|
||||
@@ -114,7 +111,7 @@ void ScopeBase::OnPaint()
|
||||
|
||||
void ScopeBase::OnDestroy()
|
||||
{
|
||||
ManagedDisplayWidget::OnDestroy();
|
||||
super::OnDestroy();
|
||||
|
||||
managed_tex_ = nullptr;
|
||||
texture_ = nullptr;
|
||||
|
||||
@@ -32,7 +32,7 @@ class ScopeBase : public ManagedDisplayWidget
|
||||
public:
|
||||
ScopeBase(QWidget* parent = nullptr);
|
||||
|
||||
virtual ~ScopeBase() override;
|
||||
MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR(ScopeBase)
|
||||
|
||||
public slots:
|
||||
void SetBuffer(Frame* frame);
|
||||
|
||||
@@ -33,14 +33,11 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
WaveformScope::WaveformScope(QWidget* parent) :
|
||||
ScopeBase(parent)
|
||||
{
|
||||
}
|
||||
#define super ScopeBase
|
||||
|
||||
WaveformScope::~WaveformScope()
|
||||
WaveformScope::WaveformScope(QWidget* parent) :
|
||||
super(parent)
|
||||
{
|
||||
OnDestroy();
|
||||
}
|
||||
|
||||
ShaderCode WaveformScope::GenerateShaderCode()
|
||||
|
||||
@@ -31,7 +31,7 @@ class WaveformScope : public ScopeBase
|
||||
public:
|
||||
WaveformScope(QWidget* parent = nullptr);
|
||||
|
||||
virtual ~WaveformScope() override;
|
||||
MANAGEDDISPLAYWIDGET_DEFAULT_DESTRUCTOR(WaveformScope)
|
||||
|
||||
protected:
|
||||
virtual ShaderCode GenerateShaderCode() override;
|
||||
|
||||
Reference in New Issue
Block a user