Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
TestData Class Reference

#include <test-helpers.hh>

Collaboration diagram for TestData:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< TestData >
 

Public Member Functions

 ~TestData ()
 
 TestData (const TestData &)=delete
 
 TestData (TestData &&)=delete
 
TestData operator= (const TestData &)=delete
 
TestData operator= (TestData &&)=delete
 
void redraw (cairo_t *cr)
 
bool wait ()
 

Static Public Member Functions

static Ptr create (DummyColormapProvider::Ptr colormapProvider, const LayerSpec &ls, const TiledBitmapInterface::Ptr &tbi, SourcePresentation::Ptr sp, int zoom)
 

Private Member Functions

 TestData (DummyColormapProvider::Ptr colormapProvider, LayerSpec ls, const TiledBitmapInterface::Ptr &tbi, SourcePresentation::Ptr sp, int zoom)
 

Private Attributes

ProgressInterfaceStub::Ptr pi
 
ViewInterface::Ptr vi
 
DummyColormapProvider::Ptr colormapProvider
 
LayerSpec ls
 
TiledBitmapInterface::Ptr tbi
 
SourcePresentation::Ptr sp
 
int zoom
 

Member Typedef Documentation

◆ Ptr

using TestData::Ptr = std::shared_ptr<TestData>

Constructor & Destructor Documentation

◆ TestData() [1/3]

TestData::TestData ( DummyColormapProvider::Ptr  colormapProvider,
LayerSpec  ls,
const TiledBitmapInterface::Ptr tbi,
SourcePresentation::Ptr  sp,
int  zoom 
)
private
52 , colormapProvider(std::move(colormapProvider_))
53 , ls(std::move(ls_))
54 , tbi(tbi_)
55 , sp(std::move(sp_))
56 , zoom(zoom_)
57{
58 tbi_->open(vi);
59}
static Ptr create()
Definition measure-framerate-stubs.cc:14
LayerSpec ls
Definition test-helpers.hh:51
ProgressInterfaceStub::Ptr pi
Definition test-helpers.hh:48
ViewInterface::Ptr vi
Definition test-helpers.hh:49
int zoom
Definition test-helpers.hh:54
SourcePresentation::Ptr sp
Definition test-helpers.hh:53
TiledBitmapInterface::Ptr tbi
Definition test-helpers.hh:52
DummyColormapProvider::Ptr colormapProvider
Definition test-helpers.hh:50
static Ptr create(ProgressInterface::Ptr pi)
Definition measure-framerate-stubs.cc:25

◆ ~TestData()

TestData::~TestData ( )
75{
76 tbi->close(vi);
77 tbi.reset();
78 sp.reset();
79 ls.clear();
80 colormapProvider.reset();
81 vi.reset();
82}

◆ TestData() [2/3]

TestData::TestData ( const TestData )
delete

◆ TestData() [3/3]

TestData::TestData ( TestData &&  )
delete

Member Function Documentation

◆ create()

TestData::Ptr TestData::create ( DummyColormapProvider::Ptr  colormapProvider,
const LayerSpec ls,
const TiledBitmapInterface::Ptr tbi,
SourcePresentation::Ptr  sp,
int  zoom 
)
static
68{
69 return TestData::Ptr(new TestData(std::move(colormapProvider), ls, std::move(tbi), std::move(sp), zoom));
70}
Definition test-helpers.hh:43
std::shared_ptr< TestData > Ptr
Definition test-helpers.hh:45

Referenced by setupTest1bpp(), setupTest2bpp(), setupTest4bpp(), setupTest8bpp(), and setupTest8bppColormapped().

Here is the caller graph for this function:

◆ operator=() [1/2]

TestData TestData::operator= ( const TestData )
delete

◆ operator=() [2/2]

TestData TestData::operator= ( TestData &&  )
delete

◆ redraw()

void TestData::redraw ( cairo_t *  cr)
85{
86 if(tbi)
87 {
88 const auto pixelSize = pixelSizeFromZoom(zoom);
90
91 tbi->redraw(vi, cr, rect.to<double>() / pixelSize, zoom);
92 }
93}
double pixelSizeFromZoom(int zoom)
Definition cairo-helpers.cc:123
Definition rectangle.hh:29
const auto rect
Definition rectangletests.cc:335
int drawingAreaWidth
Definition test-helpers.cc:22
int drawingAreaHeight
Definition test-helpers.cc:23
cairo_t * cr
Definition transformpresentation_test.cc:72
Here is the call graph for this function:

◆ wait()

bool TestData::wait ( )
72{ return !pi->isFinished(); }

Member Data Documentation

◆ colormapProvider

DummyColormapProvider::Ptr TestData::colormapProvider
private

Referenced by create(), and ~TestData().

◆ ls

LayerSpec TestData::ls
private

Referenced by create(), and ~TestData().

◆ pi

ProgressInterfaceStub::Ptr TestData::pi
private

Referenced by wait().

◆ sp

SourcePresentation::Ptr TestData::sp
private

Referenced by create(), and ~TestData().

◆ tbi

TiledBitmapInterface::Ptr TestData::tbi
private

Referenced by create(), redraw(), and ~TestData().

◆ vi

ViewInterface::Ptr TestData::vi
private

Referenced by redraw(), TestData(), and ~TestData().

◆ zoom

int TestData::zoom
private

Referenced by create(), and redraw().


The documentation for this class was generated from the following files: