summaryrefslogtreecommitdiff
path: root/EventDispatcher.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
committerThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
commitb3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (patch)
tree8fce8a51adfb245db8ab2a76831661780c0c713e /EventDispatcher.h
parente297dbd8052ef4e66f069e2dd1865ae7fa8af28e (diff)
New upstream version 1.2.3.6
Diffstat (limited to 'EventDispatcher.h')
-rw-r--r--EventDispatcher.h116
1 files changed, 63 insertions, 53 deletions
diff --git a/EventDispatcher.h b/EventDispatcher.h
index 35a5d07..b597c90 100644
--- a/EventDispatcher.h
+++ b/EventDispatcher.h
@@ -1,8 +1,6 @@
/** \file EventDispatcher.h
\brief Define the class of the event dispatcher
\author alpha_one_x86
-\version 0.3
-\date 2010
\licence GPL3, see the file COPYING */
#ifndef EVENT_DISPATCHER_H
@@ -17,11 +15,15 @@
#include "Environment.h"
#include "Core.h"
-#include "GlobalClass.h"
#include "SystrayIcon.h"
#include "OptionEngine.h"
#include "HelpDialog.h"
+#ifndef ULTRACOPIER_VERSION_PORTABLE
#include "SessionLoader.h"
+#endif
+#ifdef ULTRACOPIER_INTERNET_SUPPORT
+#include "InternetUpdater.h"
+#endif
#include "CopyListener.h"
#include "OptionDialog.h"
#include "CopyEngineManager.h"
@@ -31,57 +33,65 @@
/** \brief Define the class of the event dispatcher
This class provide a core for dispatch the event of signal/slot, it checks too if not other instance is running */
-class EventDispatcher : public QObject, public GlobalClass
+class EventDispatcher : public QObject
{
- Q_OBJECT
- public:
- /// \brief Initiate the ultracopier event dispatcher and check if no other session is running
- EventDispatcher();
- /// \brief Destroy the ultracopier event dispatcher
- ~EventDispatcher();
- /// \brief return if need be close
- bool shouldBeClosed();
- public slots:
- /// \brief Quit ultracopier
- void quit();
- signals:
- /** \brief Send that's caught state have changed for CatchedState::Uncatched or CatchedState::Semicatched or CatchedState::Catched
- \see CatchState
- \see tryCatchCopy()
- \see tryUncatchCopy()
- \param State is the new state */
- void catchCopyStateChanged(CatchState state);
- /** \brief Send that's copy/move task is finished in returning the copyMoveEventId
- \see routeCopyMoveEvent()
- \param copyMoveEventId The task id generated by routeCopyMoveEvent() */
- void copyMoveEventIsFinish(int copyMoveEventId);
- private:
- /// \brief To have counter for increment the copyMoveEventId at each request
- int copyMoveEventIdIndex;
- /// \brief To store windows windows session
- struct CoreSession
- {
- Core * CoreWindow;
- QList<int> copyMoveEventIdManaged;
- };
- /// \brief the systray icon
- SystrayIcon *backgroundIcon;
- /// \brief To lunch event only when the event loop is setup
- QTimer lunchInitFunction;
- /// \brief the help dialog
- HelpDialog theHelp;
- /// \brief the session loader
- SessionLoader *sessionloader;
- bool stopIt;
- CopyListener *copyServer;
- Core *core;
- OptionDialog optionDialog;
- CopyEngineManager *copyEngineList;
- LocalListener localListener;
- CliParser cliParser;
- private slots:
- /// \brief Called when event loop is setup
- void initFunction();
+ Q_OBJECT
+ public:
+ /// \brief Initiate the ultracopier event dispatcher and check if no other session is running
+ EventDispatcher();
+ /// \brief Destroy the ultracopier event dispatcher
+ ~EventDispatcher();
+ /// \brief return if need be close
+ bool shouldBeClosed();
+ #if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
+ static QString GetOSDisplayString();
+ #endif
+ public slots:
+ /// \brief Quit ultracopier
+ void quit();
+ signals:
+ /** \brief Send that's caught state have changed for CatchedState::Uncatched or CatchedState::Semicatched or CatchedState::Catched
+ \see CatchState
+ \see tryCatchCopy()
+ \see tryUncatchCopy()
+ \param State is the new state */
+ void catchCopyStateChanged(Ultracopier::CatchState state) const;
+ /** \brief Send that's copy/move task is finished in returning the copyMoveEventId
+ \see routeCopyMoveEvent()
+ \param copyMoveEventId The task id generated by routeCopyMoveEvent() */
+ void copyMoveEventIsFinish(int copyMoveEventId) const;
+ private:
+ /// \brief To have counter for increment the copyMoveEventId at each request
+ int copyMoveEventIdIndex;
+ /// \brief To store windows windows session
+ struct CoreSession
+ {
+ Core * CoreWindow;
+ QList<int> copyMoveEventIdManaged;
+ };
+ /// \brief the systray icon
+ SystrayIcon *backgroundIcon;
+ /// \brief To lunch event only when the event loop is setup
+ QTimer lunchInitFunction;
+ /// \brief the help dialog
+ HelpDialog theHelp;
+ #ifndef ULTRACOPIER_VERSION_PORTABLE
+ /// \brief the session loader
+ SessionLoader *sessionloader;
+ #endif
+ bool stopIt;
+ CopyListener *copyServer;
+ Core *core;
+ OptionDialog optionDialog;
+ #ifdef ULTRACOPIER_INTERNET_SUPPORT
+ InternetUpdater internetUpdater;
+ #endif
+ CopyEngineManager *copyEngineList;
+ LocalListener localListener;
+ CliParser cliParser;
+ private slots:
+ /// \brief Called when event loop is setup
+ void initFunction();
};
#endif // EVENT_DISPATCHER_H