33 lines
682 B
C++
33 lines
682 B
C++
|
#include "ImageViewWidget.h"
|
||
|
|
||
|
#include "GridNode.h"
|
||
|
#include "TransformNode.h"
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
ImageViewWidget::ImageViewWidget()
|
||
|
{
|
||
|
mName = "ImageViewWidget";
|
||
|
}
|
||
|
|
||
|
void ImageViewWidget::doPaint(const PaintEvent* event)
|
||
|
{
|
||
|
if (!mVisible)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if (!mGridNode)
|
||
|
{
|
||
|
std::cout << "Setting up grid node" << std::endl;
|
||
|
mGridNode = std::make_unique<GridNode>(mLocation);
|
||
|
mGridNode->setName(mName + "_GridNode");
|
||
|
mGridNode->setNumX(mNumX);
|
||
|
mGridNode->setNumY(mNumY);
|
||
|
|
||
|
mGridNode->setWidth(mSize.mWidth);
|
||
|
mGridNode->setHeight(mSize.mHeight);
|
||
|
mRootNode->addChild(mGridNode.get());
|
||
|
}
|
||
|
}
|