KShutdown – graphical shutdown utility
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.

66 lines
1.5KB

  1. /*
  2. mtip.h - A tip widget
  3. Copyright (C) 2003 Konrad Twardowski <kdtonline@poczta.onet.pl>
  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. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. */
  16. #ifndef __MTIP_H__
  17. #define __MTIP_H__
  18. #include <kactivelabel.h>
  19. /** @short A tip widget based on the @c KActiveLabel widget. */
  20. class MTip: public KActiveLabel
  21. {
  22. public:
  23. /**
  24. * Tip types.
  25. */
  26. enum TipType {
  27. Info, /**< Info tip. */
  28. Normal, /**< Normal tip. */
  29. Warning /**< Warning tip. */
  30. };
  31. /**
  32. * Constructor.
  33. * @param tipType A tip type
  34. * @param parent A parent widget
  35. */
  36. MTip(const TipType tipType, TQWidget *parent);
  37. /**
  38. * Destructor.
  39. */
  40. virtual ~MTip();
  41. /**
  42. * Sets tip text to @p value.
  43. */
  44. void setTipText(const TQString &value);
  45. /**
  46. * Sets tip type to @p value.
  47. */
  48. void setTipType(const TipType value);
  49. private:
  50. TQString _iconPath;
  51. TipType _type;
  52. TQString getIconPath(const TQString &name) const;
  53. };
  54. #endif // __MTIP_H__