47 #ifndef _MIRA_VISUALIZATIONTEXTVIEW_H_ 48 #define _MIRA_VISUALIZATIONTEXTVIEW_H_ 50 #include <QTableWidget> 51 #include <QPlainTextEdit> 52 #include <QPushButton> 76 void setName(
const std::string& name);
78 void setText(
const std::string& text);
80 virtual void setStamped(
const Time& timestamp,
const std::string& frameID,
117 template <
typename Reflector>
122 "Show objects' read-only properties",
true);
125 "Serialize any map<string, T> to json object " 126 "(enables simple access to map items by key)",
true);
131 this->
mItem->
setStamped(data->timestamp, data->frameID, data->sequenceID);
142 catch(XNotImplemented&)
154 "serialized data + metadata) failed:\n" << ex.
message());
157 "channel type:\n" << ex.
message());
163 this->
mItem->
setText(
"Conversion to JSON format (from untyped channel's " 164 "serialized data + metadata) failed");
166 this->
mItem->
setText(
"Serialization to JSON format not supported by channel type");
Serializer for serializing objects in JSON format.
Definition: JSONSerializer.h:93
virtual void setStamped(const Time ×tamp, const std::string &frameID, uint32 sequenceID)=0
bool mFormatted
Definition: VisualizationTextBasic.h:189
virtual void setSize(const Size2i &size)
QTableWidget * table
Definition: VisualizationTextView.h:90
DefaultTextVisualizationBase< T > Base
Definition: VisualizationTextView.h:196
std::string getID() const
Return the id of the authority.
Definition: AbstractAuthority.h:119
Definition: VisualizationTextBasic.h:60
Definition: VisualizationTextView.h:107
virtual void registerTextEditRequestCallback(boost::function< void()> fn)
QWidget * setItem
Definition: VisualizationTextView.h:97
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...
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
boost::function< void()> mEditRequestCb
Definition: VisualizationTextView.h:101
#define MIRA_FW
Macro for accessing the framework instance.
Definition: Framework.h:74
QTableWidgetItem * timestampItem
Definition: VisualizationTextView.h:93
TypedDefaultTextVisualizationBase(const std::string &channelName)
Definition: VisualizationTextView.h:198
Provides MIRA_CLASS_SERIALIZATION macro and includes the major headers of the serialization framework...
DefaultTextVisualizationBase(const std::string &channelName)
Definition: VisualizationTextView.h:113
void serialize(const std::string &name, const T &value, const std::string &comment="")
Serializes the specified object value under the given name.
Definition: Serializer.h:204
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:494
QPushButton * setButton
Definition: VisualizationTextView.h:96
IVisualizationTextItem * mItem
Definition: VisualizationTextBasic.h:190
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:418
QPlainTextEdit * textItem
Definition: VisualizationTextView.h:92
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.
virtual void setupScene(IVisualizationTextItem *item)
Definition: VisualizationTextView.h:170
Definition: VisualizationTextView.h:192
bool mShowROProperties
Definition: VisualizationTextView.h:185
std::string message() const MIRA_NOEXCEPT_OR_NOTHROW
Similar to what().
virtual void onEdit()
Definition: VisualizationTextBasic.h:133
bool mStringMapAsObject
Definition: VisualizationTextView.h:186
virtual std::string defaultText()
Definition: VisualizationTextView.h:204
void reflect(Reflector &r)
Definition: VisualizationTextView.h:118
virtual void redraw()
Definition: VisualizationTextView.h:176
virtual void dataChanged(ChannelRead< T > data)
Definition: VisualizationTextView.h:129
QTableWidgetItem * frameidItem
Definition: VisualizationTextView.h:95
Definition: VisualizationTextView.h:64
virtual void enableEdit(bool enable)=0
Declaration of VisualizationText and related classes.
Base class for exceptions.
Definition: Exception.h:199
virtual void setText(const std::string &text)=0
virtual void enableEdit(bool enable)
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
virtual void setStamped(const Time ×tamp, const std::string &frameID, uint32 sequenceID)
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
QTableWidgetItem * sequenceidItem
Definition: VisualizationTextView.h:94
boost::optional< json::Value > mLastValue
Definition: VisualizationTextBasic.h:192
uint mPrecision
Definition: VisualizationText.h:168
void setName(const std::string &name)
QTableWidgetItem * nameItem
Definition: VisualizationTextView.h:91
void readJSON(JSONValue &oValue)
Definition: ChannelReadWrite.h:586
VisualizationTextBasic< T > Base
Definition: VisualizationTextView.h:111
Default format.
Definition: JSONSerializer.h:102
A base class for simple text visualizations.
void setText(const std::string &text)
VisualizationTextItem(QTableWidget *t, int row)
Serialize associative containers with string keys as JSON object (keys = member names) ...
Definition: JSONSerializer.h:105
virtual void registerTextEditRequestCallback(boost::function< void()> fn)=0
virtual Size2i getSize() const
Class for in-place stream formatting Used for constructs like:
Definition: MakeString.h:63