3 //=============================================================================
5 * @file QtResource_Loader.h
7 * @author Marek Brudka <mbrudka@aster.pl>
8 * @author Balachandran Natarajan <bala@cs.wustl.edu>
10 //=============================================================================
12 #ifndef TAO_QTRESOURCE_LOADER_H
13 #define TAO_QTRESOURCE_LOADER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/QtResource/TAO_QtResource_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Versioned_Namespace.h"
25 #include <QtWidgets/QApplication>
26 #elif defined ACE_HAS_QT4
27 #include <QtGui/qapplication.h>
29 #include <qapplication.h>
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
37 * @class QtResource_Loader
39 * @brief Loads TAO resources related with Qt.
41 * This class changes the default reactor implementation into
42 * ACE_QtReactor one by calling TAO_ORB_Core::set_gui_resource_factory.
43 * User should create an instance of this class before ORB_init
44 * when the TAO server has has to be integrated within Qt event loop.
46 * Please notice, this class has to be created in the main Qt thread,
47 * because set_gui_resource_factory creates a variable in TSS. This way
48 * QtReactor is instantiated only in Qt event loop thread.
51 class TAO_QtResource_Export QtResource_Loader
54 QtResource_Loader (QApplication
*qapp
);
55 virtual ~QtResource_Loader ();
59 TAO_END_VERSIONED_NAMESPACE_DECL
61 #include /**/ "ace/post.h"
62 #endif /* TAO_QTRESOURCE_LOADER_H */