Files
thehub/hub-qt/macdockiconhandler.h
T

59 lines
1.4 KiB
C++
Raw Permalink Normal View History

2017-11-09 19:34:51 +01:00
/*
* This file is part of the Flowee project
* Copyright (C) 2011-2015 The Bitcoin Core developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2013-11-04 16:20:43 +01:00
2018-01-16 10:47:52 +00:00
#ifndef FLOWEE_QT_MACDOCKICONHANDLER_H
#define FLOWEE_QT_MACDOCKICONHANDLER_H
2013-04-14 22:11:55 +02:00
#include <QMainWindow>
2013-04-13 00:13:08 -05:00
#include <QObject>
2013-01-23 21:51:02 +01:00
QT_BEGIN_NAMESPACE
class QIcon;
2013-04-13 00:13:08 -05:00
class QMenu;
class QWidget;
2013-01-23 21:51:02 +01:00
QT_END_NAMESPACE
2012-09-27 15:06:16 -04:00
2011-11-13 13:19:52 +01:00
/** Macintosh-specific dock icon handler.
*/
class MacDockIconHandler : public QObject
{
Q_OBJECT
2013-01-23 21:51:02 +01:00
public:
~MacDockIconHandler();
QMenu *dockMenu();
void setIcon(const QIcon &icon);
2013-04-14 22:11:55 +02:00
void setMainWindow(QMainWindow *window);
static MacDockIconHandler *instance();
static void cleanup();
void handleDockIconClickEvent();
2015-07-14 13:59:05 +02:00
Q_SIGNALS:
void dockIconClicked();
private:
MacDockIconHandler();
QWidget *m_dummyWidget;
QMenu *m_dockMenu;
2013-04-14 22:11:55 +02:00
QMainWindow *mainWindow;
};
2018-01-16 10:47:52 +00:00
#endif