You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

macdockiconhandler.h 951B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (c) 2011-2015 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_QT_MACDOCKICONHANDLER_H
  5. #define STARWELS_QT_MACDOCKICONHANDLER_H
  6. #include <QMainWindow>
  7. #include <QObject>
  8. QT_BEGIN_NAMESPACE
  9. class QIcon;
  10. class QMenu;
  11. class QWidget;
  12. QT_END_NAMESPACE
  13. /** Macintosh-specific dock icon handler.
  14. */
  15. class MacDockIconHandler : public QObject
  16. {
  17. Q_OBJECT
  18. public:
  19. ~MacDockIconHandler();
  20. QMenu *dockMenu();
  21. void setIcon(const QIcon &icon);
  22. void setMainWindow(QMainWindow *window);
  23. static MacDockIconHandler *instance();
  24. static void cleanup();
  25. void handleDockIconClickEvent();
  26. Q_SIGNALS:
  27. void dockIconClicked();
  28. private:
  29. MacDockIconHandler();
  30. QWidget *m_dummyWidget;
  31. QMenu *m_dockMenu;
  32. QMainWindow *mainWindow;
  33. };
  34. #endif // STARWELS_QT_MACDOCKICONHANDLER_H