2014-12-17 02:47:57 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin Core developers
|
2014-12-13 05:09:33 +01:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 16:20:43 +01:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#ifndef BITCOIN_QT_MACDOCKICONHANDLER_H
|
|
|
|
#define BITCOIN_QT_MACDOCKICONHANDLER_H
|
2011-10-07 13:21:45 +02:00
|
|
|
|
2013-04-14 22:11:55 +02:00
|
|
|
#include <QMainWindow>
|
2013-04-13 07:13:08 +02:00
|
|
|
#include <QObject>
|
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 QIcon;
|
2013-04-13 07:13:08 +02:00
|
|
|
class QMenu;
|
2011-10-07 13:21:45 +02:00
|
|
|
class QWidget;
|
2013-01-23 21:51:02 +01:00
|
|
|
QT_END_NAMESPACE
|
2012-09-27 21:06:16 +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();
|
2015-03-13 15:40:53 +01:00
|
|
|
static void cleanup();
|
2011-10-07 13:21:45 +02:00
|
|
|
void handleDockIconClickEvent();
|
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
Q_SIGNALS:
|
2011-10-07 13:21:45 +02:00
|
|
|
void dockIconClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
MacDockIconHandler();
|
|
|
|
|
|
|
|
QWidget *m_dummyWidget;
|
|
|
|
QMenu *m_dockMenu;
|
2013-04-14 22:11:55 +02:00
|
|
|
QMainWindow *mainWindow;
|
2011-10-07 13:21:45 +02:00
|
|
|
};
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#endif // BITCOIN_QT_MACDOCKICONHANDLER_H
|