qdeclarativesparticles_p.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  4. ** All rights reserved.
  5. ** Contact: Nokia Corporation (qt-info@nokia.com)
  6. **
  7. ** This file is part of the QtDeclarative module of the Qt Toolkit.
  8. **
  9. ** $QT_BEGIN_LICENSE:LGPL$
  10. ** GNU Lesser General Public License Usage
  11. ** This file may be used under the terms of the GNU Lesser General Public
  12. ** License version 2.1 as published by the Free Software Foundation and
  13. ** appearing in the file LICENSE.LGPL included in the packaging of this
  14. ** file. Please review the following information to ensure the GNU Lesser
  15. ** General Public License version 2.1 requirements will be met:
  16. ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  17. **
  18. ** In addition, as a special exception, Nokia gives you certain additional
  19. ** rights. These rights are described in the Nokia Qt LGPL Exception
  20. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  21. **
  22. ** GNU General Public License Usage
  23. ** Alternatively, this file may be used under the terms of the GNU General
  24. ** Public License version 3.0 as published by the Free Software Foundation
  25. ** and appearing in the file LICENSE.GPL included in the packaging of this
  26. ** file. Please review the following information to ensure the GNU General
  27. ** Public License version 3.0 requirements will be met:
  28. ** http://www.gnu.org/copyleft/gpl.html.
  29. **
  30. ** Other Usage
  31. ** Alternatively, this file may be used in accordance with the terms and
  32. ** conditions contained in a signed written agreement between you and Nokia.
  33. **
  34. **
  35. **
  36. **
  37. **
  38. ** $QT_END_LICENSE$
  39. **
  40. ****************************************************************************/
  41. #ifndef QDECLARATIVEPARTICLES_H
  42. #define QDECLARATIVEPARTICLES_H
  43. #include <QtDeclarative/qdeclarativeitem.h>
  44. QT_BEGIN_HEADER
  45. QT_BEGIN_NAMESPACE
  46. QT_MODULE(Declarative)
  47. class QDeclarativeSParticlesPrivate;
  48. class QDeclarativeSParticles : public QDeclarativeItem
  49. {
  50. Q_OBJECT
  51. // Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
  52. // Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
  53. // Q_PROPERTY(int emissionRate READ emissionRate WRITE setEmissionRate NOTIFY emissionRateChanged)
  54. // Q_PROPERTY(qreal emissionVariance READ emissionVariance WRITE setEmissionVariance NOTIFY emissionVarianceChanged)
  55. // Q_PROPERTY(int lifeSpan READ lifeSpan WRITE setLifeSpan NOTIFY lifeSpanChanged)
  56. // Q_PROPERTY(int lifeSpanDeviation READ lifeSpanDeviation WRITE setLifeSpanDeviation NOTIFY lifeSpanDeviationChanged)
  57. // Q_PROPERTY(int fadeInDuration READ fadeInDuration WRITE setFadeInDuration NOTIFY fadeInDurationChanged)
  58. // Q_PROPERTY(int fadeOutDuration READ fadeOutDuration WRITE setFadeOutDuration NOTIFY fadeOutDurationChanged)
  59. // Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
  60. // Q_PROPERTY(qreal angleDeviation READ angleDeviation WRITE setAngleDeviation NOTIFY angleDeviationChanged)
  61. // Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged)
  62. // Q_PROPERTY(qreal velocityDeviation READ velocityDeviation WRITE setVelocityDeviation NOTIFY velocityDeviationChanged)
  63. // Q_PROPERTY(QDeclarativeParticleMotion *motion READ motion WRITE setMotion NOTIFY motionChanged)
  64. // Q_CLASSINFO("DefaultProperty", "motion")
  65. public:
  66. QDeclarativeSParticles(QDeclarativeItem *parent=0);
  67. ~QDeclarativeSParticles();
  68. // QUrl source() const;
  69. // void setSource(const QUrl &);
  70. // int count() const;
  71. // void setCount(int cnt);
  72. // int emissionRate() const;
  73. // void setEmissionRate(int);
  74. // qreal emissionVariance() const;
  75. // void setEmissionVariance(qreal);
  76. // int lifeSpan() const;
  77. // void setLifeSpan(int);
  78. // int lifeSpanDeviation() const;
  79. // void setLifeSpanDeviation(int);
  80. // int fadeInDuration() const;
  81. // void setFadeInDuration(int);
  82. // int fadeOutDuration() const;
  83. // void setFadeOutDuration(int);
  84. // qreal angle() const;
  85. // void setAngle(qreal);
  86. // qreal angleDeviation() const;
  87. // void setAngleDeviation(qreal);
  88. // qreal velocity() const;
  89. // void setVelocity(qreal);
  90. // qreal velocityDeviation() const;
  91. // void setVelocityDeviation(qreal);
  92. // QDeclarativeParticleMotion *motion() const;
  93. // void setMotion(QDeclarativeParticleMotion *);
  94. void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
  95. public Q_SLOTS:
  96. // void burst(int count, int emissionRate=-1);
  97. protected:
  98. virtual void componentComplete();
  99. Q_SIGNALS:
  100. void sourceChanged();
  101. void countChanged();
  102. void emissionRateChanged();
  103. void emissionVarianceChanged();
  104. void lifeSpanChanged();
  105. void lifeSpanDeviationChanged();
  106. void fadeInDurationChanged();
  107. void fadeOutDurationChanged();
  108. void angleChanged();
  109. void angleDeviationChanged();
  110. void velocityChanged();
  111. void velocityDeviationChanged();
  112. void emittingChanged();
  113. void motionChanged();
  114. private Q_SLOTS:
  115. void imageLoaded();
  116. private:
  117. Q_DISABLE_COPY(QDeclarativeParticles)
  118. Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeSParticles)
  119. };
  120. QT_END_NAMESPACE
  121. //QML_DECLARE_TYPE(QDeclarativeParticleMotion)
  122. //QML_DECLARE_TYPE(QDeclarativeParticleMotionLinear)
  123. //QML_DECLARE_TYPE(QDeclarativeParticleMotionGravity)
  124. //QML_DECLARE_TYPE(QDeclarativeParticleMotionWander)
  125. QML_DECLARE_TYPE(QDeclarativeParticles)
  126. QT_END_HEADER
  127. #endif