trayicon.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*****************************************************************************
  2. * trayicon.h - QStarDict, a StarDict clone written with using Qt *
  3. * Copyright (C) 2008 Alexander Rodin *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License along *
  16. * with this program; if not, write to the Free Software Foundation, Inc., *
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
  18. *****************************************************************************/
  19. #ifndef TRAYICON_H
  20. #define TRAYICON_H
  21. #include <QSystemTrayIcon>
  22. namespace QStarDict
  23. {
  24. class TrayIcon: public QSystemTrayIcon
  25. {
  26. Q_OBJECT
  27. public:
  28. TrayIcon(QObject *parent = 0);
  29. virtual ~TrayIcon();
  30. void saveSettings();
  31. private slots:
  32. void on_activated(QSystemTrayIcon::ActivationReason reason);
  33. void on_actionSettings_triggered();
  34. void setScanEnabled(bool enabled);
  35. private:
  36. void loadSettings();
  37. };
  38. }
  39. #endif // TRAYICON_H
  40. // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent