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

@@ -1,4 +1,3 @@
alias.i = e
alias.include = input
macro.0 = "\\\\0"

View File

@@ -74,7 +74,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_DECLARATIVE_EXPORT \
Q_GADGET \
QWEBKIT_EXPORT \
Q_INVOKABLE
Q_INVOKABLE \
Q_MULTIMEDIA_EXPORT
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_DECLARE_INTERFACE \
Q_DECLARE_METATYPE \

View File

@@ -69,7 +69,7 @@ sounds. These classes allow you to specify a WAV format file which can
then be played with low latency when necessary. Both QSoundEffect and
SoundEffect have essentially the same API.
You can adjust the number of \l {QSoundEffect::loops}{loops} a sound effect is played, as well as
You can adjust the number of \l {QSoundEffect::loopCount()}{loops} a sound effect is played, as well as
the \l {QSoundEffect::setVolume()}{volume} (or \l {QSoundEffect::setMuted()}{muting}) of the effect.
For older, Qt 4.x based applications \l QSound is also available. Applications

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]
};