#include <QueueCanvasVisualizer.h>
void inet::visualizer::QueueCanvasVisualizer::addQueueVisualization |
( |
const QueueVisualization * |
queueVisualization | ) |
|
|
overrideprotectedvirtual |
Reimplemented from inet::visualizer::QueueVisualizerBase.
68 auto queueCanvasVisualization =
static_cast<const QueueCanvasVisualization *
>(queueVisualization);
69 auto figure = queueCanvasVisualization->figure;
virtual void addQueueVisualization(const QueueVisualization *queueVisualization)
Definition: QueueVisualizerBase.cc:71
double displacementPriority
Definition: QueueVisualizerBase.h:63
Displacement displacementHint
Definition: QueueVisualizerBase.h:62
Implements inet::visualizer::QueueVisualizerBase.
51 auto module = check_and_cast<cModule *>(queue->getOwner());
52 auto figure =
new QueueFigure(
"queue");
53 figure->setTags((std::string(
"queue ") +
tags).c_str());
54 figure->setTooltip(
"This figure represents a queue");
55 figure->setAssociatedObject(queue);
56 figure->setColor(
color);
58 figure->setBounds(cFigure::Rectangle(0, 0,
width,
height));
59 figure->setMaxElementCount(queue->getMaxPacketLength());
62 return new QueueCanvasVisualization(networkNodeVisualization, figure, queue);
double width
Definition: QueueVisualizerBase.h:59
const char * tags
Definition: VisualizerBase.h:32
double spacing
Definition: QueueVisualizerBase.h:61
cFigure::Color color
Definition: QueueVisualizerBase.h:58
virtual NetworkNodeCanvasVisualization * getNetworkNodeVisualization(const cModule *networkNode) const
Definition: NetworkNodeCanvasVisualizer.cc:63
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:65
NetworkNodeCanvasVisualizer * networkNodeVisualizer
Definition: QueueCanvasVisualizer.h:45
double height
Definition: QueueVisualizerBase.h:60
void inet::visualizer::QueueCanvasVisualizer::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
Reimplemented from inet::visualizer::QueueVisualizerBase.
42 if (!hasGUI())
return;
45 networkNodeVisualizer = getModuleFromPar<NetworkNodeCanvasVisualizer>(par(
"networkNodeVisualizerModule"),
this);
double zIndex
Definition: QueueCanvasVisualizer.h:44
virtual void initialize(int stage) override
Definition: QueueVisualizerBase.cc:37
Local initializations.
Definition: InitStages.h:35
NetworkNodeCanvasVisualizer * networkNodeVisualizer
Definition: QueueCanvasVisualizer.h:45
void inet::visualizer::QueueCanvasVisualizer::refreshQueueVisualization |
( |
const QueueVisualization * |
queueVisualization | ) |
const |
|
overrideprotectedvirtual |
Implements inet::visualizer::QueueVisualizerBase.
83 auto queueCanvasVisualization =
static_cast<const QueueCanvasVisualization *
>(queueVisualization);
84 auto queue = queueVisualization->queue;
85 auto figure = queueCanvasVisualization->figure;
86 figure->setElementCount(queue->getLength());
void inet::visualizer::QueueCanvasVisualizer::removeQueueVisualization |
( |
const QueueVisualization * |
queueVisualization | ) |
|
|
overrideprotectedvirtual |
Reimplemented from inet::visualizer::QueueVisualizerBase.
76 auto queueCanvasVisualization =
static_cast<const QueueCanvasVisualization *
>(queueVisualization);
77 auto figure = queueCanvasVisualization->figure;
78 queueCanvasVisualization->networkNodeVisualization->removeAnnotation(figure);
virtual void removeQueueVisualization(const QueueVisualization *queueVisualization)
Definition: QueueVisualizerBase.cc:76
double inet::visualizer::QueueCanvasVisualizer::zIndex = NaN |
|
protected |
The documentation for this class was generated from the following files: