diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2013-01-04 14:50:19 +0100 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2013-01-04 14:50:19 +0100 |
commit | 8f9f382e1c97cab2e72e97495650c73ac4b97314 (patch) | |
tree | 78510a0d81368c09b56f444fb19bb132c8bc3009 /main.cpp |
Imported Upstream version 0.3.0.5
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..331a8a0 --- /dev/null +++ b/main.cpp @@ -0,0 +1,36 @@ +/** \file main.cpp
+\brief Define the main() for the point entry
+\author alpha_one_x86
+\version 0.3
+\date 2010
+\licence GPL3, see the file COPYING */
+
+#include <QApplication>
+
+#include "Environment.h"
+#include "EventDispatcher.h"
+
+/// \brief Define the main() for the point entry
+int main(int argc, char *argv[])
+{
+ int returnCode;
+ QApplication ultracopierApplication(argc, argv);
+ ultracopierApplication.setApplicationVersion(ULTRACOPIER_VERSION);
+ ultracopierApplication.setQuitOnLastWindowClosed(false);
+ #ifdef ULTRACOPIER_DEBUG
+ DebugEngine::getInstance();
+ #endif // ULTRACOPIER_DEBUG
+ //the main code, event loop of Qt and event dispatcher of ultracopier
+ {
+ EventDispatcher backgroundRunningInstance;
+ if(backgroundRunningInstance.shouldBeClosed())
+ returnCode=0;
+ else
+ returnCode=ultracopierApplication.exec();
+ }
+ #ifdef ULTRACOPIER_DEBUG
+ DebugEngine::destroyInstanceAtTheLastCall();
+ #endif // ULTRACOPIER_DEBUG
+ return returnCode;
+}
+
|