Fix a number of other qdoc issues.

* Several places needed the forward class declaration hack
* Missing/wrong minor version numbers on imports
* A few typos
* Any number of attempts to work around qdoc
* A few missing docs
* Tweaked soundeffect docs

Change-Id: I3c2ab998a11cbb0956712e0423e01fdb70f5bfff
Reviewed-by: Peter Yard <peter.yard@nokia.com>
Reviewed-by: Angus Cummings <angus.cummings@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
This commit is contained in:
Michael Goddard
2012-06-13 13:52:05 +10:00
committed by Qt by Nokia
parent e975897ad7
commit 6931cbb35a
35 changed files with 611 additions and 436 deletions

View File

@@ -38,8 +38,9 @@
**
****************************************************************************/
#include "qobject.h"
#include "qsound.h"
#include "qsoundeffect.h"
void qsoundsnippet() {
//! [0]
@@ -52,3 +53,33 @@ void qsoundsnippet() {
bells.play();
//! [1]
}
void qsoundeffectsnippet() {
//! [2]
QSoundEffect effect;
effect.setSource(QUrl::fromLocalFile("engine.wav"));
effect.setLoopCount(QSoundEffect::Infinite);
effect.setVolume(0.25f);
effect.play();
//! [2]
}
QObject *clickSource;
class MyGame : public QObject {
Q_OBJECT
public:
//! [3]
MyGame()
: m_explosion(this)
{
m_explosion.setSource(QUrl::fromLocalFile("explosion.wav"));
m_explosion.setVolume(0.25f);
// Set up click handling etc.
connect(clickSource, SIGNAL(clicked()), &m_explosion, SLOT(play()));
}
private:
QSoundEffect m_explosion;
//! [3]
};