summaryrefslogtreecommitdiff
path: root/trunk/TAO/tao/QtResource/QtResource_Loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/tao/QtResource/QtResource_Loader.h')
-rw-r--r--trunk/TAO/tao/QtResource/QtResource_Loader.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/trunk/TAO/tao/QtResource/QtResource_Loader.h b/trunk/TAO/tao/QtResource/QtResource_Loader.h
new file mode 100644
index 00000000000..2f7ef42e7a7
--- /dev/null
+++ b/trunk/TAO/tao/QtResource/QtResource_Loader.h
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file QtResource_Loader.h
+ *
+ * $Id$
+ *
+ * @author Marek Brudka <mbrudka@aster.pl>
+ * @author Balachandran Natarajan <bala@cs.wustl.edu>
+ */
+//=============================================================================
+
+#ifndef TAO_QTRESOURCE_LOADER_H
+#define TAO_QTRESOURCE_LOADER_H
+#include /**/ "ace/pre.h"
+
+#include "tao/QtResource/TAO_QtResource_Export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/Versioned_Namespace.h"
+
+#include <qapplication.h>
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+namespace TAO
+{
+ /**
+ * @class QtResource_Loader
+ *
+ * @brief Loads TAO resources related with Qt.
+ *
+ * This class changes the default reactor implementation into
+ * ACE_QtReactor one by calling TAO_ORB_Core::set_gui_resource_factory.
+ * User should create an instance of this class before ORB_init
+ * when the TAO server has has to be integrated within Qt event loop.
+ *
+ * Please notice, this class has to be created in the main Qt thread,
+ * because set_gui_resource_factory creates a variable in TSS. This way
+ * QtReactor is instantiated only in Qt event loop thread.
+ */
+
+ class TAO_QtResource_Export QtResource_Loader
+ {
+ public:
+ QtResource_Loader (QApplication *qapp);
+ virtual ~QtResource_Loader (void);
+ };
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#include /**/ "ace/post.h"
+#endif /* TAO_QTRESOURCE_LOADER_H */