2011-10-07 08:21:45 -03:00
|
|
|
#ifndef MACDOCKICONHANDLER_H
|
|
|
|
#define MACDOCKICONHANDLER_H
|
|
|
|
|
2012-11-08 17:45:32 -03:00
|
|
|
#include <QObject>
|
2013-04-14 17:11:55 -03:00
|
|
|
#include <QMainWindow>
|
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 QMenu;
|
|
|
|
class QIcon;
|
|
|
|
class QWidget;
|
2013-01-23 17:51:02 -03:00
|
|
|
QT_END_NAMESPACE
|
2012-09-27 16:06:16 -03:00
|
|
|
|
|
|
|
#ifdef __OBJC__
|
|
|
|
@class DockIconClickEventHandler;
|
|
|
|
#else
|
|
|
|
class DockIconClickEventHandler;
|
|
|
|
#endif
|
2011-10-07 08:21:45 -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();
|
|
|
|
|
|
|
|
void handleDockIconClickEvent();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void dockIconClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
MacDockIconHandler();
|
|
|
|
|
2012-09-27 16:06:16 -03:00
|
|
|
DockIconClickEventHandler *m_dockIconClickEventHandler;
|
2011-10-07 08:21:45 -03:00
|
|
|
QWidget *m_dummyWidget;
|
|
|
|
QMenu *m_dockMenu;
|
2013-04-14 17:11:55 -03:00
|
|
|
QMainWindow *mainWindow;
|
2011-10-07 08:21:45 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MACDOCKICONCLICKHANDLER_H
|