KBFX – an alternative to T-Menu
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.
 
 
 
 
 
 

70 lines
1.8 KiB

  1. /*
  2. * Copyright (C) 2006
  3. * Siraj Razick <siraj@kdemail.net>
  4. * PhobosK <phobosk@mail.kbfx.net>
  5. * see Also AUTHORS
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Library General Public License version 2 as
  9. * published by the Free Software Foundation
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this program; if not, write to the
  18. * Free Software Foundation, Inc.,
  19. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef KBFX_PLASMA_INDEX_ITEM_H
  22. #define KBFX_PLASMA_INDEX_ITEM_H
  23. #include "kbfxplasmacanvasabstractitem.h"
  24. class KbfxPlasmaIndexItem : public KbfxPlasmaCanvasAbstractItem
  25. {
  26. Q_OBJECT
  27. public:
  28. KbfxPlasmaIndexItem ( TQCanvasPixmapArray * a, TQCanvas * canvas );
  29. virtual ~KbfxPlasmaIndexItem();
  30. void setIcon ( TQString path );
  31. void setText ( TQString text );
  32. void setId ( int id );
  33. //void setName(TQString name);
  34. void setLabelText ( TQString text );
  35. void setBelongsTo ( TQString parent );
  36. TQString belongsTo();
  37. int height();
  38. void setSelected ( bool select );
  39. bool selected();
  40. int Id() { return m_id;}
  41. virtual void drawContent ( TQPainter * pe );
  42. virtual void draw ( TQPainter & pe );
  43. virtual void mousePressEvent ( TQMouseEvent * e );
  44. private:
  45. int m_id;
  46. TQString m_name;
  47. TQString m_text;
  48. TQString m_iconPath;
  49. TQPixmap m_icon;
  50. TQString m_parent;
  51. bool m_isCurrent;
  52. int m_height;
  53. int m_width;
  54. bool m_isSelected;
  55. };
  56. #endif