2013-11-04 16:20:43 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin developers
|
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2011-10-07 13:21:45 +02:00
|
|
|
#ifndef MACDOCKICONHANDLER_H
|
|
|
|
#define MACDOCKICONHANDLER_H
|
|
|
|
|
2012-11-08 21:45:32 +01:00
|
|
|
#include <QObject>
|
2013-04-14 22:11:55 +02:00
|
|
|
#include <QMainWindow>
|
2011-10-07 13:21:45 +02:00
|
|
|
|
2013-01-23 21:51:02 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
2011-10-07 13:21:45 +02:00
|
|
|
class QMenu;
|
|
|
|
class QIcon;
|
|
|
|
class QWidget;
|
2013-01-23 21:51:02 +01:00
|
|
|
QT_END_NAMESPACE
|
2012-09-27 21:06:16 +02:00
|
|
|
|
|
|
|
#ifdef __OBJC__
|
|
|
|
@class DockIconClickEventHandler;
|
|
|
|
#else
|
|
|
|
class DockIconClickEventHandler;
|
|
|
|
#endif
|
2011-10-07 13:21:45 +02:00
|
|
|
|
2011-11-13 13:19:52 +01:00
|
|
|
/** Macintosh-specific dock icon handler.
|
|
|
|
*/
|
2011-10-07 13:21:45 +02:00
|
|
|
class MacDockIconHandler : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2013-01-23 21:51:02 +01:00
|
|
|
|
2011-10-07 13:21:45 +02:00
|
|
|
public:
|
|
|
|
~MacDockIconHandler();
|
|
|
|
|
|
|
|
QMenu *dockMenu();
|
|
|
|
void setIcon(const QIcon &icon);
|
2013-04-14 22:11:55 +02:00
|
|
|
void setMainWindow(QMainWindow *window);
|
2011-10-07 13:21:45 +02:00
|
|
|
static MacDockIconHandler *instance();
|
|
|
|
|
|
|
|
void handleDockIconClickEvent();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void dockIconClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
MacDockIconHandler();
|
|
|
|
|
2012-09-27 21:06:16 +02:00
|
|
|
DockIconClickEventHandler *m_dockIconClickEventHandler;
|
2011-10-07 13:21:45 +02:00
|
|
|
QWidget *m_dummyWidget;
|
|
|
|
QMenu *m_dockMenu;
|
2013-04-14 22:11:55 +02:00
|
|
|
QMainWindow *mainWindow;
|
2011-10-07 13:21:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MACDOCKICONCLICKHANDLER_H
|