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.
 
 
 
 
 
 

95 lines
2.3 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_TOOL_TIP
  22. #define KBFX_TOOL_TIP
  23. #include <tqcursor.h>
  24. #include <tqimage.h>
  25. #include <tqlabel.h>
  26. #include <tqmovie.h>
  27. #include <tqpainter.h>
  28. #include <tqpixmap.h>
  29. #include <tqtimer.h>
  30. #include <tqwidget.h>
  31. #include <kdebug.h>
  32. #include <kiconloader.h>
  33. #include <kicontheme.h>
  34. #include <kstandarddirs.h>
  35. #include <ktip.h>
  36. #include <kuser.h>
  37. #include <kbfxconfig.h>
  38. #include <kbfxplasmapixmapprovider.h>
  39. class KbfxToolTip:public TQWidget
  40. {
  41. Q_OBJECT
  42. public:
  43. KbfxToolTip ( TQWidget * parent=0,const char * name=0,WFlags fl=WType_TopLevel );
  44. ~KbfxToolTip();
  45. void setStartPos ( int x=0, int y=0 );
  46. virtual void paintEvent ( TQPaintEvent *pe );
  47. void setBackground ( TQPixmap bg );
  48. void setAnimationImage ( TQString path );
  49. void setWindow ( TQPixmap win );
  50. public slots:
  51. void hideToolTip();
  52. void logoMove();
  53. void setUserImage();
  54. void setBoundBox();
  55. void setAnimated ( bool );
  56. void setLabelText ( TQString );
  57. void setHeadingText ( TQString );
  58. void setVersionText ( TQString );
  59. private:
  60. TQTimer * _hide_timer;
  61. TQTimer * _move_timer;
  62. TQTimer * _update_timer;
  63. int _x,_y;
  64. int _maxW;
  65. int _width;
  66. int _height;
  67. int _logo_move_x;
  68. TQPixmap _dude;
  69. TQPixmap _dude_box;
  70. TQImage _bg;
  71. TQLabel * _window;
  72. TQLabel * _agent;
  73. TQMovie * _agent_anim;
  74. bool _animate;
  75. TQString _label_text;
  76. TQString _heading_text;
  77. TQString _version_text;
  78. TQFont m_fontTooltipFont;
  79. TQImage logo;
  80. TQImage tooltip_win;
  81. TQImage tooltip_mask;
  82. TQImage dude_img;
  83. };
  84. #endif