ddt 1.1.0
Loading...
Searching...
No Matches
ddtViewer.hpp
Go to the documentation of this file.
1
20#ifndef DDT_DATAVISUALISATION_DDTVIEWER_DDTVIEWER_H
21#define DDT_DATAVISUALISATION_DDTVIEWER_DDTVIEWER_H
22
23#include <QMainWindow>
24#include <QSettings>
25#include <QByteArray>
26
28#include "ddt/ddtLogger.hpp"
30
34
35namespace Ui {
36
37class DdtViewerForm;
38}
39
44class DdtViewer : public QMainWindow {
45 Q_OBJECT
46
47 public:
52 explicit DdtViewer(QWidget* parent = nullptr);
53
59 virtual ~DdtViewer();
60
68 bool Init(int argc, char* argv[]);
69
75 void LastSegment(void);
76
88 void connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member);
89 void connect(const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method);
90 void connect(const QObject *sender, const char *signal, const char *member);
91
102 template <typename Func1, typename Func2>
103 void connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot);
104
105 protected:
110
115
116 private:
117 Ui::DdtViewerForm* ui;
118 QSettings* main_settings;
119 QMap<QString, DdtDialog*> dialog_map;
120 QMenu* applicaiton_menu_bar;
121
122 QString startup_filename;
123 QString startup_localbroker_uri;
124 QString startup_remotebroker_uri;
125 QString startup_data_stream;
126 QString startup_server_uri;
127 QString startup_image_scale;
128 bool startup_no_wait_new_data;
129 bool startup_timestamp;
130 QString startup_overlay_file;
131
132 bool debug_log_enabled;
133
134 boost::signals2::connection connection;
135
136 public slots:
141 void HandleArguments();
142
148
149 private:
153 void ConnectWidgets();
154
155 void ConnectWidgetDataStream();
156 void ConnectWidgetFlipRotate();
157 void ConnectWidgetPanning();
158 void ConnectWidgetMagnification();
159 void ConnectWidgetScaleButton();
160 void ConnectWidgetImageScale();
161 void ConnectWidgetCursorInfo();
162 void ConnectWidgetCutValues();
163 void ConnectWidgetColourmap();
164 void ConnectWidgetImageWidget();
165 void ConnectWidgetCubeNavigation();
166
167 // Create instances of all supported dialogs
168 void CreateDialogs();
169
170 // Create main menu display on MainWindow top area
171 void CreateMenuBar();
172
173 const void RegisterMetaTypes();
174
178 void ConnectRemoteControl();
179
187 void ProcessRemoteCommand(const std::string& image_widget_name,
188 const std::string& command_name,
189 const std::vector<std::string>& command_arguments);
190
191 protected:
197 void closeEvent(QCloseEvent* event) override;
198
205 bool ParseCommandline(int argc, char* argv[]);
206
207 signals:
212 void AttachDataFile(QString filename);
213
218 void AttachDataStream(QString data_stream);
219
224
230 void PopulatePublisherListCombo(QString startup_localbroker_uri, QString startup_remotebroker_uri);
231
236 void SetDataStream(QString startup_data_stream);
237
242 void SetImageScale(const QString startup_image_scale);
243
249 void SetNoWaitNewData(const bool startup_no_wait_new_data);
250
255 void LoadOverlayFile(const QString startup_overlay_file);
256};
257
268template <typename Func1, typename Func2>
269void DdtViewer::connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot) {
270 QObject::connect(sender, signal, context, slot, Qt::QueuedConnection);
271}
272
273#endif // DDT_DATAVISUALISATION_DDTVIEWER_DDTVIEWER_H
274
The DdtViewer class Main class of the DDT Standard Viewer.
Definition: ddtViewer.hpp:44
void HandleArguments()
HandleArguments Slot to handle commandline arguments after initialisation of the GUI.
Definition: ddtViewer.cpp:506
void SetImageScale(const QString startup_image_scale)
virtual ~DdtViewer()
Definition: ddtViewer.cpp:121
void ResetDockWidgetsLayout()
ResetDockWidgetsLayout Slot to handle the reconfiguration of dock widgets layout to default state.
Definition: ddtViewer.cpp:534
ddt::DdtLogger * logger
Definition: ddtViewer.hpp:109
bool Init(int argc, char *argv[])
Definition: ddtViewer.cpp:36
void closeEvent(QCloseEvent *event) override
closeEvent Close event which is triggered when the main window shell be closed.
Definition: ddtViewer.cpp:491
bool ParseCommandline(int argc, char *argv[])
Definition: ddtViewer.cpp:545
void SetNoWaitNewData(const bool startup_no_wait_new_data)
ddt::DdtRemoteControl * remote_control
Definition: ddtViewer.hpp:114
void PopulatePublisherListCombo(QString startup_localbroker_uri, QString startup_remotebroker_uri)
void connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
connect Group of overloaded functions that use the QObject::connect method with the Qt::QueuedConnect...
Definition: ddtViewer.cpp:576
void LoadOverlayFile(const QString startup_overlay_file)
void LastSegment(void)
Definition: ddtViewer.cpp:485
void DetachStream()
void AttachDataStream(QString data_stream)
void AttachDataFile(QString filename)
void SetDataStream(QString startup_data_stream)
Definition: ddtLogger.hpp:51
Definition: ddtRemoteControl.hpp:54
Builder for the command line parser.
DDT Dialogs. Factory class for the DDT dialogs. Factory class for the DDT dialogs.
DDT Dialog IDs. ID values for all used dialogs. IDs for the used dialogs.
DDT Dialogs. Base class for the DDT dialogs. Base class for the DDT dialogs.
Class to wrap the usage of log4cplus as logging utility. This file provides a wrapper class for the u...
DDT Remote Control. Remote control interface for the DDT GUIs. Library class for the remote control i...
Definition: ddtTestViewer.hpp:32