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.

91 lines
2.4KB

  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_CANVAS_STACK_H
  22. #define KBFX_PLASMA_CANVAS_STACK_H
  23. #include <tqobject.h>
  24. #include <tqptrlist.h>
  25. #include <kbfxplasmacanvasstackdata.h>
  26. //#include "kbfxplasmacanvasgroup.h"
  27. #include "kbfxplasmacanvasgroupview.h"
  28. /**
  29. This class will manager a list of Grouplists.
  30. **/
  31. class KbfxPlasmaCanvasStack:public TQObject
  32. {
  33. Q_OBJECT
  34. public:
  35. typedef TQPtrList<KbfxPlasmaCanvasGroupView> groupPtrList;
  36. typedef TQMap<TQString,uint> Dict;//DEPRECATED
  37. typedef TQMap<KbfxPlasmaCanvasStackData,uint> DataDict;
  38. KbfxPlasmaCanvasStack();
  39. virtual ~KbfxPlasmaCanvasStack();
  40. void addGroup ( KbfxPlasmaCanvasGroupView* );
  41. void deleteGroup ( KbfxPlasmaCanvasGroupView* );
  42. KbfxPlasmaCanvasStack* contains ( KbfxPlasmaCanvasGroupView* );
  43. TQString getItemName ( int );
  44. virtual int rtti() {return 1006;}
  45. void predend ( KbfxPlasmaCanvasGroupView* );
  46. void append ( KbfxPlasmaCanvasGroupView* );
  47. Dict getDict();
  48. void hide();
  49. int count() { return m_count;}
  50. int height()
  51. {
  52. return m_height;
  53. }
  54. int width()
  55. {
  56. return m_width;
  57. }
  58. TQString name() {return m_name;}
  59. void setName ( TQString name ) { m_name = name;}
  60. bool contains ( TQString );
  61. KbfxPlasmaCanvasGroupView * activeViewByName ( TQString name );
  62. public slots:
  63. void raise ( uint id );
  64. void raiseByName ( TQString name );
  65. private:
  66. int m_x;
  67. int m_y;
  68. int m_z; //depth index : not Z axis
  69. int m_count;
  70. int m_height;
  71. int m_width;
  72. KbfxPlasmaCanvasGroupView * m_current;
  73. groupPtrList m_groupChain;
  74. Dict m_dict;
  75. DataDict m_dataDict;
  76. TQString m_name;
  77. //state variables
  78. };
  79. #endif