VR-Forces 4.1 Class Documentation
DtBaseSoundEditorWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvAudioQt/dllExport.h>
16 
17 #include <QtCore/QList>
18 
19 #include <QtGui/QWidget>
20 #include <QtGui/QAbstractItemDelegate>
21 
22 class QModelIndex;
23 class QStandardItem;
24 class QStandardItemModel;
25 class QTreeView;
26 
27 namespace makVrv
28 {
29  class DtDe;
30 
31 
36  {
37  Q_OBJECT;
38 
39  protected:
42 
43  public:
44 
50  DtBaseSoundEditorWidget( DtDe& de, QWidget* parent = 0,
51  Qt::WindowFlags f = Qt::Widget );
52 
54  virtual ~DtBaseSoundEditorWidget();
55 
61  virtual int addRecord( const DtEntitySoundMapRecord& rec, int err = 0 );
62 
68  virtual int changeRecord( const DtEntitySoundMapRecord& rec, int err ) = 0;
69 
73  virtual void removeRecord( const DtEntitySoundMapRecord& rec );
74 
77  virtual void clearMap();
78 
79  protected slots:
82  virtual void onAddEntityClicked() = 0;
83 
86  virtual void onDeleteEntityClicked() = 0;
87 
90  virtual void onItemChanged( QStandardItem* item ) = 0;
91 
92  protected:
93 
96  virtual void removeRow( int row );
97 
102  virtual int rowIndex( const QString& key, int reserved = 0 );
103 
110  virtual bool getRecordFromRow( int row, DtEntitySoundMapRecord* rec );
111 
118  virtual bool getRecordFromRow(
119  const QModelIndex& index, DtEntitySoundMapRecord* rec );
120 
123  virtual RowData createRowData( const DtEntitySoundMapRecord& rec );
124 
128  virtual void setWidgetTitle( const QString& title );
129 
136  virtual void setRowError( int row, int err = 0 );
137 
139  virtual void resizeSections();
140 
141  private:
143  void setupGui();
144 
145  protected:
148 
150  QStandardItemModel* myEditorModel;
151 
154 
155  };
156 }
157 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)