47 #ifndef _MIRA_VISUALIZATIONTEXTBASIC_H_ 48 #define _MIRA_VISUALIZATIONTEXTBASIC_H_ 79 template <
typename Reflector>
86 "Formatted json output",
true);
145 if (dialog.exec() == 0)
150 writeJSON(boost::posix_time::time_from_string(dialog.
getInput(
"time").toStdString()),
151 dialog.
getInput(
"frame").toStdString(),
152 fromString<int>(dialog.
getInput(
"sequence").toStdString()),
166 auto internalChannel = this->
mChannel.getChannel();
168 internalChannel.getID(),
getGlobalID(),
false, internalChannel.getTypename());
171 cw->timestamp = timestamp;
172 cw->frameID = frameID;
173 cw->sequenceID = sequenceID;
179 catch (XNotImplemented&) {
virtual void channelChanged()
Definition: VisualizationTextBasic.h:117
bool mFormatted
Definition: VisualizationTextBasic.h:189
virtual void setupScene(IVisualizationTextSite *site)
Must be implemented in derived classes.
Definition: VisualizationTextBasic.h:89
Definition: VisualizationTextBasic.h:60
Abstract base class for all text visualization.
Definition: VisualizationText.h:92
void setName(const std::string &name)
Sets the name of this visualization.
Definition: Visualization.h:157
virtual void setName(const std::string &name)=0
virtual IVisualizationTextItem * addItem()=0
Definition: VisualizationText.h:57
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
ChannelProperty< T > mChannel
Definition: VisualizationTextBasic.h:188
Provides a special setter, that simply sets the value of the member to the given value AND calls a us...
An object that allows exclusive write access to data of a channel.
Definition: ChannelReadWrite.h:652
virtual void setSize(const Size2i &size)
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
void channelProperty(Reflector &r, const std::string &name, ChannelProperty< T > &channel, const std::string &comment, OptionalMode optional=REQUIRED)
Special property-method that should be called within the reflect method to specify a ChannelProperty...
Definition: Visualization.h:249
#define MIRA_FW
Macro for accessing the framework instance.
Definition: Framework.h:74
virtual Size2i getSize() const =0
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:494
IVisualizationTextItem * mItem
Definition: VisualizationTextBasic.h:190
The data structure that is returned by getDataConnection.
Definition: Visualization.h:183
virtual void destroyItem(IVisualizationTextItem *item)=0
std::string toString(const T &value, int precision=-1)
Converts any data type to string (the data type must support the stream << operator).
Definition: ToString.h:256
virtual DataConnection getDataConnection()
Returns information about the direct data connection for this visualization.
Definition: VisualizationTextBasic.h:113
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:418
virtual void redraw()
Definition: VisualizationTextBasic.h:157
MIRA_BASE_EXPORT void write(const Value &value, std::ostream &ioStream, bool formatted=false, int precision=-1)
Writes a json::Value into a given stream using the JSON format.
Deserializer for serializing objects from JSON format.
Definition: JSONSerializer.h:400
std::string getGlobalID() const
Return the fully qualified global id (includes namespace)
Definition: AbstractAuthority.h:111
virtual std::string defaultText()
Definition: VisualizationTextBasic.h:131
VisualizationTextBasic(const std::string &channelName)
Definition: VisualizationTextBasic.h:64
virtual void setupScene(IVisualizationTextItem *item)
Definition: VisualizationTextBasic.h:111
virtual void onEdit()
Definition: VisualizationTextBasic.h:133
virtual IVisualizationTextItem * getItem()
Get the visualization item.
Definition: VisualizationTextBasic.h:184
std::string mName
Definition: VisualizationTextBasic.h:187
MIRA_BASE_EXPORT void read(const std::string &s, Value &oValue)
Read a json::Value from a string that contains JSON format.
virtual void dataChanged(ChannelRead< T > data)
Definition: VisualizationTextBasic.h:129
Declaration of VisualizationText and related classes.
virtual void setText(const std::string &text)=0
json_spirit::mValue Value
A value is an abstract description of data in JSON (underlying data can either be one of the JSON bas...
Definition: JSON.h:176
Accept associative containers with string keys as JSON object (keys = member names), in ADDITION to the standard array format (i.e.
Definition: JSONSerializer.h:416
The concrete typed ChannelProperty template class.
Definition: ChannelProperty.h:214
Setter< T > setterNotify(T &member, boost::function< void()> notifyFn)
Creates a setter that simply sets the value of the specified member to the given value AND calls a us...
Definition: SetterNotify.h:86
virtual Size2i getSize() const
Definition: VisualizationTextBasic.h:104
boost::optional< json::Value > mLastValue
Definition: VisualizationTextBasic.h:192
Size2i mSize
Definition: VisualizationText.h:167
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:481
uint mPrecision
Definition: VisualizationText.h:168
virtual void setSize(const Size2i &size)=0
virtual ~VisualizationTextBasic()
Definition: VisualizationTextBasic.h:73
void reflect(Reflector &r)
Definition: VisualizationTextBasic.h:80
virtual void setSize(const Size2i &size)
Definition: VisualizationTextBasic.h:97
virtual IVisualizationTextSite * getSite()
Returns a pointer to the IVisualizationTextSite interface that was set in the init() method...
virtual void writeJSON(const Time ×tamp, const std::string &frameID, int sequenceID, const json::Value &value)
Definition: VisualizationTextBasic.h:163
Definition: VisualizationText.h:77