TDE base libraries and programs
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.

77 lines
1.9 KiB

  1. /*
  2. * Copyright (C) 2008 Danilo Cesar Lemes de Paula <danilo@mandriva.com>
  3. * Copyright (C) 2008 Gustavo Boiko <boiko@mandriva.com>
  4. * Mandriva Conectiva
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License version 2 as published by the Free Software Foundation.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. * Boston, MA 02111-1307, USA.
  19. */
  20. #ifndef __KCROSSBGRENDER_H__
  21. #define __KCROSSBGRENDER_H__
  22. #include <tqvaluelist.h>
  23. #include <tqpixmap.h>
  24. #include <tqvaluelist.h>
  25. #include <tqdatetime.h>
  26. #include "bgrender.h"
  27. class TQDomElement;
  28. typedef struct crossEvent{
  29. bool transition;
  30. TQString pix1;
  31. TQString pix2;
  32. TQTime stime; //start time
  33. TQTime etime; //end time
  34. } KBGCrossEvent;
  35. class KCrossBGRender: public KBackgroundRenderer{
  36. TQ_OBJECT
  37. public:
  38. KCrossBGRender(int desk, int screen, bool drawBackgroundPerScreen, TDEConfig *config=0);
  39. ~KCrossBGRender();
  40. bool needWallpaperChange();
  41. void changeWallpaper(bool init=false);
  42. TQPixmap pixmap();
  43. bool usingCrossXml(){return useCrossEfect;};
  44. private:
  45. TQPixmap pix;
  46. int secs;
  47. TQString xmlFileName;
  48. bool useCrossEfect;
  49. int actualPhase;
  50. void createStartTime(TQDomElement e);
  51. void createTransition(TQDomElement e);
  52. void createStatic(TQDomElement e);
  53. bool setCurrentEvent(bool init = false);
  54. void initCrossFade(TQString xml);
  55. void fixEnabled();
  56. TQPixmap getCurrentPixmap();
  57. KBGCrossEvent current;
  58. TQValueList<KBGCrossEvent> timeList;
  59. };
  60. #endif // __KCROSSBGRENDER_H__