Crossfire Server, Trunk
GameSounds Class Reference

#include <GameSounds.h>

+ Inheritance diagram for GameSounds:
+ Collaboration diagram for GameSounds:

Public Member Functions

virtual AssetWrapperchild (int child) override
 
virtual int childIndex (AssetWrapper *child) override
 
virtual int childrenCount () const override
 
QString description () const
 
virtual QString displayName () const override
 
 GameSounds (AssetWrapper *parent)
 
virtual PossibleUse uses (const AssetWrapper *asset, std::string &) const override
 
- Public Member Functions inherited from AssetWrapper
 AssetWrapper (AssetWrapper *parent, const QString &panelName="empty")
 
virtual bool canDrag () const
 
virtual bool canDrop (const QMimeData *, int) const
 
virtual QIcon displayIcon () const
 
virtual QString displayPanelName () const
 
AssetWrapperdisplayParent () const
 
virtual void drag (QMimeData *) const
 
virtual void drop (const QMimeData *, int)
 
virtual void fillMenu (QMenu *)
 
void markModified (ChangeType change, int extra=0)
 
AssetWrapperself ()
 
void setDisplayParent (AssetWrapper *parent)
 
virtual ~AssetWrapper () override
 

Static Public Attributes

static std::map< QString, std::string > gameSounds
 
- Static Public Attributes inherited from AssetWrapper
static const char * tipProperty = "_cre_internal"
 

Properties

QString description
 
- Properties inherited from AssetWrapper
QString displayName
 
AssetWrapper self
 

Private Attributes

std::vector< GameSound * > mySounds
 

Additional Inherited Members

- Public Types inherited from AssetWrapper
enum  ChangeType {
  AssetUpdated, BeforeChildAdd, AfterChildAdd, BeforeChildRemove,
  AfterChildRemove, BeforeLayoutChange, AfterLayoutChange
}
 
enum  PossibleUse { Uses, ChildrenMayUse, DoesntUse }
 
- Public Slots inherited from AssetWrapper
virtual void removeChild (AssetWrapper *)
 
- Signals inherited from AssetWrapper
void dataModified (AssetWrapper *asset, AssetWrapper::ChangeType type, int extra)
 
void modified ()
 
- Static Public Member Functions inherited from AssetWrapper
static bool compareByDisplayName (const AssetWrapper *left, const AssetWrapper *right)
 
- Protected Member Functions inherited from AssetWrapper
virtual void wasModified (AssetWrapper *asset, ChangeType type, int extra)
 
- Protected Attributes inherited from AssetWrapper
QString myPanelName
 
AssetWrappermyParent
 

Detailed Description

Definition at line 21 of file GameSounds.h.

Constructor & Destructor Documentation

◆ GameSounds()

GameSounds::GameSounds ( AssetWrapper parent)

Definition at line 43 of file GameSounds.cpp.

References gameSounds, mySounds, and AssetWrapper::tipProperty.

Member Function Documentation

◆ child()

AssetWrapper * GameSounds::child ( int  child)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 58 of file GameSounds.cpp.

References mySounds.

Referenced by childIndex().

+ Here is the caller graph for this function:

◆ childIndex()

int GameSounds::childIndex ( AssetWrapper child)
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 62 of file GameSounds.cpp.

References child(), and mySounds.

+ Here is the call graph for this function:

◆ childrenCount()

virtual int GameSounds::childrenCount ( ) const
inlineoverridevirtual

Reimplemented from AssetWrapper.

Definition at line 29 of file GameSounds.h.

References mySounds.

◆ description()

QString GameSounds::description ( ) const

◆ displayName()

virtual QString GameSounds::displayName ( ) const
inlineoverridevirtual

Implements AssetWrapper.

Definition at line 28 of file GameSounds.h.

◆ uses()

AssetWrapper::PossibleUse GameSounds::uses ( const AssetWrapper asset,
std::string &   
) const
overridevirtual

Reimplemented from AssetWrapper.

Definition at line 50 of file GameSounds.cpp.

References AssetWrapper::ChildrenMayUse, and AssetWrapper::DoesntUse.

Field Documentation

◆ gameSounds

std::map< QString, std::string > GameSounds::gameSounds
static
Initial value:
= {
{"learn", QT_TR_NOOP("player learns a spell")},
{"apply", QT_TR_NOOP("player applies an item")},
{"evaporate", QT_TR_NOOP("someone applies an item that is only available to DM; an item is destroyed to save the player's life")},
{"hit", QT_TR_NOOP("player (or pet) hits a living creature")},
{"miss", QT_TR_NOOP("player fails hitting a living creature")},
{"kill", QT_TR_NOOP("player is killed")},
{"step", QT_TR_NOOP("player is walking")},
{"fire", QT_TR_NOOP("player fires a bow or crossbow")},
{"poof", QT_TR_NOOP("player attempts to use a rod or wand without enough sp or charges")},
{"open", QT_TR_NOOP("player opens a door with a key")},
{"push", QT_TR_NOOP("a living creature is pushed")},
{"death", QT_TR_NOOP("player dies")},
{"explode", QT_TR_NOOP("a wand explodes when an attempt to recharged it is made")},
{"fumble", QT_TR_NOOP("player fails casting a praying spell; player fails to learn a spell")},
{"button click", QT_TR_NOOP("a button is walked on")},
{"turn handle", QT_TR_NOOP("a handle is applied")},
{"tick", QT_TR_NOOP("player applies a clock")},
{"drink", QT_TR_NOOP("someone drinks an item")},
{"gate moving", QT_TR_NOOP("a gate is opening or closing")},
{"fall hole", QT_TR_NOOP("someone falls in a hole")},
{"poison", QT_TR_NOOP("player applies a poisoned food or drink")},
}

Definition at line 36 of file GameSounds.h.

Referenced by GameSounds(), and SoundsDialog::soundType().

◆ mySounds

std::vector<GameSound *> GameSounds::mySounds
private

Definition at line 39 of file GameSounds.h.

Referenced by child(), childIndex(), childrenCount(), and GameSounds().

Property Documentation

◆ description

QString GameSounds::description
read

Definition at line 24 of file GameSounds.h.


The documentation for this class was generated from the following files: