15#include <QtCore/qobject.h>
16#include <QtCore/qbytearray.h>
17#include <QtCore/qlist.h>
18#include <QtCore/qjsonobject.h>
19#include <QtWidgets/qtreewidget.h>
20#include <QtWidgets/qdialog.h>
37namespace ot {
class Splitter; }
49 void setTitle(
const QString& _title);
50 const QString&
title(
void)
const {
return m_title; };
105 void setUrl(
const QString& _url) { m_url = _url; };
106 const QString&
url(
void)
const {
return m_url; };
108 void setMessageBody(
const QString& _messageBody) { m_messageBody = _messageBody; };
116 QString m_messageBody;
164 void slotSendMessage(
void);
165 void slotMessageSendSuccessful(
const QByteArray& _response);
166 void slotMessageSendFailed(
const QString& _errorString);
167 void slotServiceNameChanged(
void);
168 void slotSelectionChanged(
void);
169 void slotShowNavigationContextMenu(
const QPoint& _pt);
170 void slotNavigationItemDoubleClicked(QTreeWidgetItem* _item,
int _column);
171 void slotNavigationItemChanged(QTreeWidgetItem* _item,
int _column);
172 void slotUpdateCurrent(
void);
173 void slotRenameCurrent(
void);
174 void slotDeleteCurrent(
void);
175 void slotCloneCurrent(
void);
177 void slotLoadRequestCollection(
void);
178 void slotSaveRequestCollection(
void);
185 void initializeServices(
void);
186 void initializeDefaultServices(
void);
187 void setWaitingMode(
bool _isWaiting);
194 void handleContextRequest(
const QPoint& _pt,
TerminalRequest * _request);
212 void workerSendMessage(
const std::string& _receiverUrl,
ot::MessageType _messageType,
const QByteArray& _data);
221 QList<ServiceInfo> m_services;
229 QWidget * m_leftLayoutW;
230 QVBoxLayout * m_leftLayout;
232 QGridLayout * m_buttonLayout;
234 QHBoxLayout * m_navigationLayout;
235 QTreeWidget * m_navigation;
237 QWidget * m_rightLayoutW;
238 QVBoxLayout * m_rightLayout;
241 QGroupBox * m_receiverBox;
242 QGridLayout * m_receiverLayout;
244 QGroupBox * m_messageBox;
245 QVBoxLayout * m_messageLayout;
247 QGroupBox * m_responseBox;
248 QVBoxLayout * m_responseLayout;
252 QLabel * m_receiverNameL;
253 QComboBox * m_receiverName;
254 QLabel * m_receiverUrlL;
255 QLineEdit * m_receiverUrl;
257 QLabel * m_endpointL;
258 QComboBox * m_endpoint;
260 QPushButton * m_btnSend;
265 QLabel * m_responseLength;
267 QProgressBar * m_progressBar;
271 QShortcut* m_shortcutSave;
272 QShortcut* m_shortcutSend;
273 QShortcut* m_shortcutRename;
274 QShortcut* m_shortcutDelete;
275 QShortcut* m_shortcutClone;
Definition JSONEditor.h:11
bool hasChild(TerminalCollectionItem *_item) const
Definition Terminal.cpp:214
bool merge(TerminalCollectionFilter *_newData, bool _isFirst)
Definition Terminal.cpp:225
virtual bool setFromJsonObject(const QJsonObject &_object) override
Definition Terminal.cpp:137
virtual void addToJsonObject(QJsonObject &_object) const override
Definition Terminal.cpp:174
virtual ~TerminalCollectionFilter()
Definition Terminal.cpp:135
bool hasDirectChildWith(const QString &_title) const
Definition Terminal.cpp:194
bool hasAnyChildWith(const QString &_title) const
Definition Terminal.cpp:201
static TerminalCollectionItem * createFromJsonObject(Terminal *_owner, const QJsonObject &_object)
Definition Terminal.cpp:89
void setTitle(const QString &_title)
Definition Terminal.cpp:117
virtual bool setFromJsonObject(const QJsonObject &_object)=0
virtual void addToJsonObject(QJsonObject &_object) const =0
virtual ~TerminalCollectionItem()
Definition Terminal.cpp:83
Terminal * ownerTerminal(void)
Definition Terminal.h:52
const QString & title(void) const
Definition Terminal.h:50
Definition Terminal.h:130
virtual QString getToolName(void) const override
Return the unique tool name The name will be used to create all required menu entries.
Definition Terminal.cpp:386
ot::MessageType endpointToMessageType(void) const
Definition Terminal.cpp:569
virtual bool runTool(QMenu *_rootMenu, otoolkit::ToolWidgets &_content) override
Create the central widget that will be displayed to the user in the main tab view.
Definition Terminal.cpp:390
Terminal()
Definition Terminal.cpp:375
virtual void restoreToolSettings(QSettings &_settings) override
Definition Terminal.cpp:536
virtual bool prepareToolShutdown(QSettings &_settings) override
Stop all the logic of this tool.
Definition Terminal.cpp:541
void setEndpointFromMessageType(ot::MessageType _type)
Definition Terminal.cpp:553
virtual ~Terminal()
Definition Terminal.cpp:379
void notifyItemDeleted(TerminalCollectionItem *_item)
Definition Terminal.cpp:549
virtual void addToJsonObject(QJsonObject &_object) const override
Definition Terminal.cpp:360
const QString & url(void) const
Definition Terminal.h:106
const QString & messageBody(void) const
Definition Terminal.h:109
void setUrl(const QString &_url)
Definition Terminal.h:105
void setEndpoint(ot::MessageType _endpoint)
Definition Terminal.h:111
virtual ~TerminalRequest(void)
Definition Terminal.cpp:340
virtual bool setFromJsonObject(const QJsonObject &_object) override
Definition Terminal.cpp:342
void setMessageBody(const QString &_messageBody)
Definition Terminal.h:108
ot::MessageType endpoint(void) const
Definition Terminal.h:112
MessageType
The message types describes how a message should be delivered.
Definition CommunicationTypes.h:10