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