|
INET Framework for OMNeT++/OMNEST
|
#include <IndexedImageFigure.h>
◆ IndexedImageFigure()
| inet::IndexedImageFigure::IndexedImageFigure |
( |
const char * |
name = nullptr | ) |
|
◆ ~IndexedImageFigure()
| virtual inet::IndexedImageFigure::~IndexedImageFigure |
( |
| ) |
|
|
inlinevirtual |
◆ addChildren()
| void inet::IndexedImageFigure::addChildren |
( |
| ) |
|
|
protected |
◆ getAllowedPropertyKeys()
| const char ** inet::IndexedImageFigure::getAllowedPropertyKeys |
( |
| ) |
const |
|
overrideprotectedvirtual |
213 static const char *
keys[32];
215 const char *localKeys[] = {
216 PKEY_IMAGES, PKEY_TINT_AMOUNT, PKEY_TINT_COLOR, PKEY_OPACITY,
217 PKEY_INTERPOLATION, PKEY_LABEL, PKEY_LABEL_FONT, PKEY_LABEL_COLOR,
218 PKEY_LABEL_OFFSET, PKEY_INITIAL_VALUE, PKEY_POS, PKEY_SIZE, PKEY_ANCHOR,
221 concatArrays(
keys, cGroupFigure::getAllowedPropertyKeys(), localKeys);
◆ getAnchor()
| cFigure::Anchor inet::IndexedImageFigure::getAnchor |
( |
| ) |
const |
153 return image->getAnchor();
◆ getImages()
| const std::vector< std::string > & inet::IndexedImageFigure::getImages |
( |
| ) |
const |
◆ getInterpolation()
| cFigure::Interpolation inet::IndexedImageFigure::getInterpolation |
( |
| ) |
const |
80 return image->getInterpolation();
◆ getLabel()
| const char * inet::IndexedImageFigure::getLabel |
( |
| ) |
const |
◆ getLabelColor()
| const cFigure::Color & inet::IndexedImageFigure::getLabelColor |
( |
| ) |
const |
◆ getLabelFont()
| const cFigure::Font & inet::IndexedImageFigure::getLabelFont |
( |
| ) |
const |
◆ getLabelOffset()
| const cFigure::Point inet::IndexedImageFigure::getLabelOffset |
( |
| ) |
const |
◆ getOpacity()
| double inet::IndexedImageFigure::getOpacity |
( |
| ) |
const |
70 return image->getOpacity();
◆ getPos()
| const cFigure::Point & inet::IndexedImageFigure::getPos |
( |
| ) |
const |
141 return image->getPosition();
◆ getSize()
| const cFigure::Point inet::IndexedImageFigure::getSize |
( |
| ) |
const |
|
overridevirtual |
◆ getTintAmount()
| double inet::IndexedImageFigure::getTintAmount |
( |
| ) |
const |
50 return image->getTintAmount();
◆ getTintColor()
| const cFigure::Color & inet::IndexedImageFigure::getTintColor |
( |
| ) |
const |
60 return image->getTintColor();
◆ parse()
| void inet::IndexedImageFigure::parse |
( |
cProperty * |
property | ) |
|
|
overrideprotectedvirtual |
163 ASSERT(property->getNumValues(PKEY_IMAGES));
164 cGroupFigure::parse(property);
168 std::vector<std::string> names;
169 for (
int i = 0; i <
property->getNumValues(PKEY_IMAGES); ++i)
170 names.push_back(property->getValue(PKEY_IMAGES, i));
173 if (property->containsKey(PKEY_BOUNDS)) {
174 if (property->containsKey(PKEY_POS) || property->containsKey(PKEY_SIZE) || property->containsKey(PKEY_ANCHOR))
175 throw cRuntimeError(
"%s, %s and %s are not allowed when %s is present", PKEY_POS, PKEY_SIZE, PKEY_ANCHOR, PKEY_BOUNDS);
176 if (property->getNumValues(PKEY_BOUNDS) != 4)
177 throw cRuntimeError(
"%s: x, y, width, height expected", PKEY_BOUNDS);
178 Point p = parsePoint(property, PKEY_BOUNDS, 0);
179 Point size = parsePoint(property, PKEY_BOUNDS, 2);
185 setPos(parsePoint(property, PKEY_POS, 0));
186 if ((
s = property->getValue(PKEY_ANCHOR)) !=
nullptr)
188 if ((
s = property->getValue(PKEY_SIZE)) !=
nullptr)
189 setSize(parsePoint(property, PKEY_SIZE, 0));
191 if ((
s = property->getValue(PKEY_TINT_AMOUNT)) !=
nullptr)
193 if ((
s = property->getValue(PKEY_TINT_COLOR)) !=
nullptr)
195 if ((
s = property->getValue(PKEY_OPACITY)) !=
nullptr)
197 if ((
s = property->getValue(PKEY_INTERPOLATION)) !=
nullptr)
199 if ((
s = property->getValue(PKEY_LABEL)) !=
nullptr)
201 if ((
s = property->getValue(PKEY_LABEL_FONT)) !=
nullptr)
203 if ((
s = property->getValue(PKEY_LABEL_COLOR)) !=
nullptr)
205 if (property->containsKey(PKEY_LABEL_OFFSET))
207 if ((
s = property->getValue(PKEY_INITIAL_VALUE)) !=
nullptr)
◆ refresh()
| void inet::IndexedImageFigure::refresh |
( |
| ) |
|
|
protected |
◆ setAnchor()
| void inet::IndexedImageFigure::setAnchor |
( |
Anchor |
anchor | ) |
|
◆ setImages()
| void inet::IndexedImageFigure::setImages |
( |
const std::vector< std::string > & |
images | ) |
|
◆ setInterpolation()
| void inet::IndexedImageFigure::setInterpolation |
( |
Interpolation |
interpolation | ) |
|
85 image->setInterpolation(interpolation);
Referenced by parse().
◆ setLabel()
| void inet::IndexedImageFigure::setLabel |
( |
const char * |
text | ) |
|
◆ setLabelColor()
| void inet::IndexedImageFigure::setLabelColor |
( |
const Color & |
color | ) |
|
◆ setLabelFont()
| void inet::IndexedImageFigure::setLabelFont |
( |
const Font & |
font | ) |
|
◆ setLabelOffset()
| void inet::IndexedImageFigure::setLabelOffset |
( |
const Point & |
offset | ) |
|
◆ setOpacity()
| void inet::IndexedImageFigure::setOpacity |
( |
double |
opacity | ) |
|
◆ setPos()
| void inet::IndexedImageFigure::setPos |
( |
const Point & |
point | ) |
|
◆ setSize()
| void inet::IndexedImageFigure::setSize |
( |
const Point & |
bounds | ) |
|
◆ setTintAmount()
| void inet::IndexedImageFigure::setTintAmount |
( |
double |
tintAmount | ) |
|
◆ setTintColor()
| void inet::IndexedImageFigure::setTintColor |
( |
const Color & |
color | ) |
|
◆ setValue()
| void inet::IndexedImageFigure::setValue |
( |
int |
series, |
|
|
simtime_t |
timestamp, |
|
|
double |
value |
|
) |
| |
|
overridevirtual |
◆ image
| cImageFigure* inet::IndexedImageFigure::image |
|
private |
Referenced by addChildren(), getAnchor(), getInterpolation(), getLabelOffset(), getOpacity(), getPos(), getSize(), getTintAmount(), getTintColor(), refresh(), setAnchor(), setInterpolation(), setLabelOffset(), setOpacity(), setPos(), setSize(), setTintAmount(), and setTintColor().
◆ images
| std::vector<std::string> inet::IndexedImageFigure::images |
|
private |
◆ labelFigure
| cTextFigure* inet::IndexedImageFigure::labelFigure |
|
private |
◆ value
| double inet::IndexedImageFigure::value = NaN |
|
private |
The documentation for this class was generated from the following files:
value< double, units::s > s
Definition: Units.h:1235
double atod(const char *s)
Converts string to double.
Definition: INETUtils.cc:80
std::vector< K > keys(const std::map< K, V > &m)
Definition: stlutils.h:113