VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Private Types
makVrv::DtFireSoundEditorWidget Class Reference

A widget for editing the weapon-fire sound mappings. More...

Inheritance diagram for makVrv::DtFireSoundEditorWidget:
Inheritance graph
[legend]

Public Member Functions

 DtFireSoundEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 Default CTOR.
virtual ~DtFireSoundEditorWidget ()
 Virtual DTOR.
virtual void clearMap ()
 Clear map and reset headers.
virtual int addRecord (const DtEntitySoundMapRecord &rec, int err=0)
 Adds a new record to the widget at the currently selected row.
virtual int changeRecord (const DtEntitySoundMapRecord &rec, int err=0)
 Changes an existing record's row in the widget.
- Public Member Functions inherited from makVrv::DtBaseSoundEditorWidget
 DtBaseSoundEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 CTOR Default CTOR.
virtual ~DtBaseSoundEditorWidget ()
 Virtual DTOR.
virtual void removeRecord (const DtEntitySoundMapRecord &rec)
 Remove an existing record's row from the widget.
- Public Member Functions inherited from makVrv::DtBaseSoundEditorInterface
virtual ~DtBaseSoundEditorInterface ()
 DTOR.

Protected Slots

virtual void onAddEntityClicked ()
 Called when user clicks the "Add Entity" button.
virtual void onDeleteEntityClicked ()
 Called when user clicks the "Delete Entity" button.
virtual void onItemChanged (QStandardItem *item)
 Data in the row of the given item changed, send an update.
- Protected Slots inherited from makVrv::DtBaseSoundEditorWidget
virtual void onAddEntityClicked ()=0
 Called when user clicks the "Add Entity" button.
virtual void onDeleteEntityClicked ()=0
 Called when user clicks the "Delete Entity" button.
virtual void onItemChanged (QStandardItem *item)=0
 Called when the data in an item changed.

Protected Member Functions

virtual bool getRecordFromRow (int row, DtEntitySoundMapRecord *rec)
 Fill out a sound map record with data from a row.
virtual RowData createRowData (const DtEntitySoundMapRecord &rec=DtFireSoundMapRecord())
 Create data for inserting a new row into the model.
- Protected Member Functions inherited from makVrv::DtBaseSoundEditorWidget
virtual void removeRow (int row)
 Remove an old entity sound row from the model.
virtual int rowIndex (const QString &key, int reserved=0)
 Get a row index from the model keyed from an entity type.
virtual bool getRecordFromRow (const QModelIndex &index, DtEntitySoundMapRecord *rec)
 Fill out a sound map record with data from a row.
virtual void setWidgetTitle (const QString &title)
 Set the title for the mapping editor widget.
virtual void setRowError (int row, int err=0)
 Set the color of the row based on an error flag.
virtual void resizeSections ()
 Resize the table sections and headers to fit content.

Private Types

enum  Columns { EntityCol, WaveFileCol, ChannelCol, NumColumns }

Additional Inherited Members

- Public Attributes inherited from makVrv::DtBaseSoundEditorInterface
boost::signal< void(const
DtEntitySoundMapRecord &)> 
signal_SoundMapRecordChanged
 Signal emitted when the user changes data in the widget.
boost::signal< void(const
DtEntitySoundMapRecord &)> 
signal_SoundMapRecordRemoved
- Protected Types inherited from makVrv::DtBaseSoundEditorWidget
typedef QList< QStandardItem * > RowData
- Protected Attributes inherited from makVrv::DtBaseSoundEditorWidget
DtDemyDe
 The display engine for this instance.
QStandardItemModel * myEditorModel
 The model of the Entity Type to Sound File mappings for editing.
QTreeViewmyEditorView
 The view of the Entity Type to Sound File mappings for editing.

Detailed Description

A widget for editing the weapon-fire sound mappings.

Member Enumeration Documentation

Enumerator:
EntityCol 
WaveFileCol 
ChannelCol 
NumColumns 

Constructor & Destructor Documentation

makVrv::DtFireSoundEditorWidget::DtFireSoundEditorWidget ( DtDe de,
QWidget *  parent = 0,
Qt::WindowFlags  f = Qt::Widget 
)

Default CTOR.

Parameters
[in]deis the display engine for this instance.
[in]parentis the parent widget for this widget.
[in]flagsis an OR'd list of Qt window flags.
virtual makVrv::DtFireSoundEditorWidget::~DtFireSoundEditorWidget ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void makVrv::DtFireSoundEditorWidget::clearMap ( )
virtual

Clear map and reset headers.

Reimplemented from makVrv::DtBaseSoundEditorWidget.

virtual int makVrv::DtFireSoundEditorWidget::addRecord ( const DtEntitySoundMapRecord rec,
int  err = 0 
)
virtual

Adds a new record to the widget at the currently selected row.

Parameters
[in]recis the record of data to populate the new row.
[in]erris a flag indicating an error with sound file or data.
Returns
The row index of the new record.

Reimplemented from makVrv::DtBaseSoundEditorWidget.

virtual int makVrv::DtFireSoundEditorWidget::changeRecord ( const DtEntitySoundMapRecord rec,
int  err = 0 
)
virtual

Changes an existing record's row in the widget.

Parameters
[in]recis the record of data to populate the row.
[in]erris a flag indicating an error with sound file or data.
Returns
The row index of the changed record.

Implements makVrv::DtBaseSoundEditorWidget.

virtual void makVrv::DtFireSoundEditorWidget::onAddEntityClicked ( )
protectedvirtualslot

Called when user clicks the "Add Entity" button.

virtual void makVrv::DtFireSoundEditorWidget::onDeleteEntityClicked ( )
protectedvirtualslot

Called when user clicks the "Delete Entity" button.

virtual void makVrv::DtFireSoundEditorWidget::onItemChanged ( QStandardItem *  item)
protectedvirtualslot

Data in the row of the given item changed, send an update.

Parameters
[in]itemis the item of the model that changed.
Note
Derived classes must implement.
virtual bool makVrv::DtFireSoundEditorWidget::getRecordFromRow ( int  row,
DtEntitySoundMapRecord rec 
)
protectedvirtual

Fill out a sound map record with data from a row.

Parameters
[in]rowis the row to get the data from.
[out]recis a pointer to a record to fill out.
Return values
truerecord was successfully filled out.
falseotherwise.

Reimplemented from makVrv::DtBaseSoundEditorWidget.

virtual RowData makVrv::DtFireSoundEditorWidget::createRowData ( const DtEntitySoundMapRecord rec = DtFireSoundMapRecord())
protectedvirtual

Create data for inserting a new row into the model.

Parameters
[in]recis the record of data used to populate a new row.
Note
Derived classes should overwrite or extend for extra data.

Reimplemented from makVrv::DtBaseSoundEditorWidget.


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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)