Crossfire Server, Trunk
SoundFiles.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef SOUND_FILES_H
14 #define SOUND_FILES_H
15 
16 #include "../assets/AssetWrapper.h"
17 
18 class SoundFile;
19 
20 class SoundFiles : public AssetWrapper {
21  Q_OBJECT
22 
23  Q_PROPERTY(QString licenseInformation READ licenseInformation)
24 public:
25  SoundFiles(AssetWrapper *parent);
26 
27  virtual QString displayName() const override { return tr("Sound files"); }
28 
29  void refreshSounds();
30 
31  virtual int childrenCount() const override { return mySounds.size(); }
32  virtual AssetWrapper *child(int index) override;
33  virtual int childIndex(AssetWrapper *child) override;
34 
35  QString licenseInformation() const;
36 
37 protected:
38  std::vector<SoundFile *> mySounds;
39 };
40 
41 #endif /* SOUND_FILES_H */
SoundFiles::displayName
virtual QString displayName() const override
Definition: SoundFiles.h:27
SoundFiles::childrenCount
virtual int childrenCount() const override
Definition: SoundFiles.h:31
SoundFiles::SoundFiles
SoundFiles(AssetWrapper *parent)
Definition: SoundFiles.cpp:22
AssetWrapper
Definition: AssetWrapper.h:25
SoundFiles::mySounds
std::vector< SoundFile * > mySounds
Definition: SoundFiles.h:38
SoundFiles
Definition: SoundFiles.h:20
SoundFiles::refreshSounds
void refreshSounds()
Definition: SoundFiles.cpp:27
npc_dialog.index
int index
Definition: npc_dialog.py:102
SoundFiles::childIndex
virtual int childIndex(AssetWrapper *child) override
Definition: SoundFiles.cpp:97
SoundFiles::child
virtual AssetWrapper * child(int index) override
Definition: SoundFiles.cpp:93
SoundFile
Definition: SoundFile.h:19
SoundFiles::licenseInformation
QString licenseInformation
Definition: SoundFiles.h:23