00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file QtResource_Loader.h 00006 * 00007 * $Id: QtResource_Loader.h 84592 2009-02-24 11:31:13Z msmit $ 00008 * 00009 * @author Marek Brudka <mbrudka@aster.pl> 00010 * @author Balachandran Natarajan <bala@cs.wustl.edu> 00011 */ 00012 //============================================================================= 00013 00014 #ifndef TAO_QTRESOURCE_LOADER_H 00015 #define TAO_QTRESOURCE_LOADER_H 00016 #include /**/ "ace/pre.h" 00017 00018 #include "tao/QtResource/TAO_QtResource_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "tao/Versioned_Namespace.h" 00025 00026 #if defined (ACE_HAS_QT4) 00027 #include <Qt/qapplication.h> 00028 #else 00029 #include <qapplication.h> 00030 #endif 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 namespace TAO 00035 { 00036 /** 00037 * @class QtResource_Loader 00038 * 00039 * @brief Loads TAO resources related with Qt. 00040 * 00041 * This class changes the default reactor implementation into 00042 * ACE_QtReactor one by calling TAO_ORB_Core::set_gui_resource_factory. 00043 * User should create an instance of this class before ORB_init 00044 * when the TAO server has has to be integrated within Qt event loop. 00045 * 00046 * Please notice, this class has to be created in the main Qt thread, 00047 * because set_gui_resource_factory creates a variable in TSS. This way 00048 * QtReactor is instantiated only in Qt event loop thread. 00049 */ 00050 00051 class TAO_QtResource_Export QtResource_Loader 00052 { 00053 public: 00054 QtResource_Loader (QApplication *qapp); 00055 virtual ~QtResource_Loader (void); 00056 }; 00057 } 00058 00059 TAO_END_VERSIONED_NAMESPACE_DECL 00060 00061 #include /**/ "ace/post.h" 00062 #endif /* TAO_QTRESOURCE_LOADER_H */