summaryrefslogtreecommitdiff
path: root/ambd/qtmainloop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ambd/qtmainloop.cpp')
-rw-r--r--ambd/qtmainloop.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/ambd/qtmainloop.cpp b/ambd/qtmainloop.cpp
new file mode 100644
index 00000000..32bee662
--- /dev/null
+++ b/ambd/qtmainloop.cpp
@@ -0,0 +1,22 @@
+#include "qtmainloop.h"
+
+extern "C" IMainLoop * create(int argc, char** argv)
+{
+ return new QtMainLoop(argc, argv);
+}
+
+QtMainLoop::QtMainLoop(int argc, char** argv)
+ :IMainLoop(argc,argv)
+{
+ app = new QCoreApplication(argc,argv);
+}
+
+QtMainLoop::~QtMainLoop()
+{
+ app->exit(0);
+}
+
+int QtMainLoop::exec()
+{
+ return app->exec();
+}