MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / MiniMap

Method MiniMap

ASAP/MiniMap.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10const char* const MiniMap::coverageColors[] = { "red", "green", "yellow", "black", "purple", "orange" };
11
12MiniMap::MiniMap(const QPixmap& overview, QWidget *parent)
13 : QWidget(parent),
14 _overview(overview),
15 _fieldOfView(QRectF()),
16 _aspectRatio(1),
17 _manager(NULL),
18 _drawCoverageMap(true)
19{
20 QSizePolicy policy;
21 policy.setHeightForWidth(true);
22 policy.setHorizontalPolicy(QSizePolicy::Fixed);
23 policy.setVerticalPolicy(QSizePolicy::Fixed);
24 setSizePolicy(policy);
25 if (!overview.isNull()) {
26 _aspectRatio = static_cast<float>(_overview.width()) / _overview.height();
27 }
28}
29
30void MiniMap::toggleCoverageMap(bool drawCoverageMap) {
31 bool repaintNeeded = false;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected