TDE personal information management applications
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.

98 lines
2.8KB

  1. /*
  2. * Copyright (C) 2004, Mart Kelder (mart.kde@hccnet.nl)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef MK_DOCKEDITEM_H
  19. #define MK_DOCKEDITEM_H
  20. #include "boxcontaineritem.h"
  21. class SystemTray;
  22. class TDEConfig;
  23. class TQPixmap;
  24. /**
  25. * This class is an implementation of a BoxContainerItem for the
  26. * systemtray view. If also is a KSystemTray reimplementation.
  27. *
  28. * @see BoxContainerItem
  29. * @author Mart Kelder <mart.kde@hccnet.nl>
  30. */
  31. class DockedItem : public BoxContainerItem
  32. { Q_OBJECT
  33. public:
  34. /**
  35. * This contructor gives all it parameters to its parents.
  36. * @param parant The parent window
  37. * @param name The name of the TQObject's parents.
  38. */
  39. DockedItem( TQWidget * parent = 0, const char * name = 0 );
  40. /**
  41. * Empty destructor; does nothing at the moment
  42. */
  43. ~DockedItem();
  44. /**
  45. * This functions shows the element in the systay.
  46. */
  47. virtual void showBox();
  48. /**
  49. * This functions reads the config. It used the parent
  50. * version for the main things, but it is possible to
  51. * add some configurations over here.
  52. * @param config The TDEConfig-instance which contains the settings of this tray-item.
  53. * @param index The index of the box in the configuration file
  54. */
  55. virtual void readConfig( TDEConfig* config, const int index );
  56. public slots:
  57. /**
  58. * This functions sets the number of messages to be displayed, and warns if there are new messages waiting.
  59. * @param count The number of messages waiting
  60. * @param newMessages if true than the settings for displaying new messages will be used.
  61. */
  62. virtual void setCount( const int count, const bool newMessages ) ;
  63. /**
  64. * This function sets the tooltip @p string to a box.
  65. * @param string The tooltip to be added.
  66. */
  67. virtual void setTooltip( const TQString& string );
  68. void slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& );
  69. void slotShowPassivePopup( const TQString& error, const TQString& );
  70. protected:
  71. /**
  72. * This function popup's the TDEPopupMenu inmideately.
  73. */
  74. virtual void doPopup();
  75. private:
  76. void setAnimIcon( const TQString& anim );
  77. private:
  78. SystemTray *_systemtray;
  79. };
  80. #endif //MK_DOCKEDITEM_H