diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2013-03-21 11:01:59 +0100 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2013-03-21 11:01:59 +0100 |
commit | e297dbd8052ef4e66f069e2dd1865ae7fa8af28e (patch) | |
tree | 342fea0a2f6f33b8b62dad2d1729f8209da1a1ba /SystrayIcon.h | |
parent | 8f9f382e1c97cab2e72e97495650c73ac4b97314 (diff) |
Imported Upstream version 0.3.1.0
Diffstat (limited to 'SystrayIcon.h')
-rw-r--r-- | SystrayIcon.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/SystrayIcon.h b/SystrayIcon.h index 86d0668..b90cbea 100644 --- a/SystrayIcon.h +++ b/SystrayIcon.h @@ -12,6 +12,10 @@ #include <QObject>
#include <QAction>
#include <QMenu>
+#include <QTimer>
+#include <QDropEvent>
+#include <QList>
+#include <QUrl>
#include "Environment.h"
#include "GlobalClass.h"
@@ -19,7 +23,7 @@ /** \brief The systray icon
This class provide a systray icon and its functions */
-class SystrayIcon : public QObject, public GlobalClass
+class SystrayIcon : public QSystemTrayIcon, public GlobalClass
{
Q_OBJECT
public:
@@ -40,7 +44,6 @@ class SystrayIcon : public QObject, public GlobalClass void addCopyEngine(const QString &name,const bool &canDoOnlyCopy);
void removeCopyEngine(const QString &name);
private:
- QSystemTrayIcon* sysTrayIcon; ///< Pointer on the systray icon
QMenu* systrayMenu; ///< Pointer on the menu
QMenu* copyMenu; ///< Pointer on the copy menu (move or copy)
QAction* actionMenuQuit; ///< Pointer on the Quit action
@@ -64,6 +67,25 @@ class SystrayIcon : public QObject, public GlobalClass CatchState statePluginLoader;
bool haveListenerInfo,havePluginLoaderInfo;
bool haveListener,havePluginLoader;
+ QTimer timerCheckSetTooltip;
+ /** \brief drag event processing (impossible with Qt on systray)
+
+ need setAcceptDrops(true); into the constructor
+ need implementation to accept the drop:
+ void dragEnterEvent(QDragEnterEvent* event);
+ void dragMoveEvent(QDragMoveEvent* event);
+ void dragLeaveEvent(QDragLeaveEvent* event);
+ */
+ void dropEvent(QDropEvent *event);
+ /** \brief accept all event to allow the drag and drop
+ \see dropEvent() */
+ void dragEnterEvent(QDragEnterEvent* event);
+ /** \brief accept all event to allow the drag and drop
+ \see dropEvent() */
+ void dragMoveEvent(QDragMoveEvent* event);
+ /** \brief accept all event to allow the drag and drop
+ \see dropEvent() */
+ void dragLeaveEvent(QDragLeaveEvent* event);
private slots:
/// \brief To update the current themes
void updateCurrentTheme();
@@ -79,6 +101,7 @@ class SystrayIcon : public QObject, public GlobalClass /// \brief to retranslate the ui
void retranslateTheUI();
void reloadEngineList();
+ void checkSetTooltip();
signals:
/// \brief Quit ultracopier
void quit();
@@ -95,6 +118,7 @@ class SystrayIcon : public QObject, public GlobalClass \return The core object of the new window created */
void addWindowCopyMove(CopyMode mode,QString name);
void addWindowTransfer(QString name);
+ void urlDropped(QList<QUrl> urls);
};
#endif // SYSTRAY_ICON_H
|