forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonitor_main.cpp
48 lines (40 loc) · 1.32 KB
/
Monitor_main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#include "Viewer.h"
#include "Options.h"
#include <QtWidgets/QSplashScreen>
#include "dds/DCPS/Service_Participant.h"
#include <ace/Argv_Type_Converter.h>
int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
// Initialize the application, consume any Qt arguments.
ACE_Argv_Type_Converter conv(argc, argv);
QApplication application(conv.get_argc(), conv.get_ASCII_argv());
QPixmap splashImage(":/jpeg/splash.jpg");
QSplashScreen splash(splashImage);
splash.show();
application.processEvents();
// Initialize the service and consume the ACE+TAO+DDS arguments.
TheParticipantFactoryWithArgs(argc, argv);
application.processEvents();
// Load the Tcp transport library as we know that we will be
// using it.
ACE_Service_Config::process_directive(
ACE_TEXT("dynamic OpenDDS_Tcp Service_Object * ")
ACE_TEXT("OpenDDS_Tcp:_make_TcpLoader()")
);
application.processEvents();
// Process the command line arguments left after ACE and Qt have had a go.
Monitor::Options options(argc, argv);
application.processEvents();
// Instantiate and display.
Monitor::Viewer* viewer = new Monitor::Viewer(options);
viewer->show();
splash.finish(viewer);
// Main GUI processing loop.
return application.exec();
}