18 #ifndef GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_
19 #define GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_
23 #include <QQuickImageProvider>
25 #include <gz/msgs/image.pb.h>
28 # define ImageDisplay_EXPORTS_API
30 # if (defined(ImageDisplay_EXPORTS))
31 # define ImageDisplay_EXPORTS_API __declspec(dllexport)
33 # define ImageDisplay_EXPORTS_API __declspec(dllimport)
41 class ImageDisplayPrivate;
46 : QQuickImageProvider(QQuickImageProvider::Image)
51 const QSize &)
override
53 if (!this->img.isNull())
61 QImage i(400, 400, QImage::Format_RGB888);
90 NOTIFY TopicListChanged
100 public: virtual
void LoadConfig(const
tinyxml2::XMLElement *_pluginElem);
103 public slots:
void OnRefresh();
106 public slots:
void OnTopic(const
QString _topic);
116 public: Q_INVOKABLE
void SetTopicList(const
QStringList &_topicList);
119 signals:
void TopicListChanged();
122 signals:
void newImage();
125 private slots:
void ProcessImage();
129 private:
void OnImageMsg(const
gz::msgs::Image &_msg);
133 private:
std::unique_ptr<ImageDisplayPrivate> dataPtr;