VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
15 
16 #include <QtCore/QList>
17 
18 #include <QtWidgets/QWidget>
19 #include <QtWidgets/QAbstractItemDelegate>
20 
21 class QModelIndex;
22 class QStandardItem;
23 class QStandardItemModel;
24 class QTreeView;
25 
26 namespace makVrv
27 {
28  class DtDe;
29 
30 
35  {
36  Q_OBJECT;
37 
38  protected:
41 
42  public:
43 
49  DtBaseSoundEditorWidget( DtDe& de, QWidget* parent = 0,
50  Qt::WindowFlags f = Qt::Widget );
51 
53  virtual ~DtBaseSoundEditorWidget();
54 
60  virtual int addRecord( const DtEntitySoundMapRecord& rec, int err = 0 );
61 
67  virtual int changeRecord( const DtEntitySoundMapRecord& rec, int err ) = 0;
68 
72  virtual void removeRecord( const DtEntitySoundMapRecord& rec );
73 
76  virtual void clearMap();
77 
78  protected slots:
81  virtual void onAddEntityClicked() = 0;
82 
85  virtual void onDeleteEntityClicked() = 0;
86 
89  virtual void onItemChanged( QStandardItem* item ) = 0;
90 
91  protected:
92 
95  virtual void removeRow( int row );
96 
101  virtual int rowIndex( const QString& key, int reserved = 0 );
102 
109  virtual bool getRecordFromRow( int row, DtEntitySoundMapRecord* rec );
110 
117  virtual bool getRecordFromRow(
118  const QModelIndex& index, DtEntitySoundMapRecord* rec );
119 
122  virtual RowData createRowData( const DtEntitySoundMapRecord& rec );
123 
127  virtual void setWidgetTitle( const QString& title );
128 
135  virtual void setRowError( int row, int err = 0 );
136 
138  virtual void resizeSections();
139 
140  private:
142  void setupGui();
143 
144  protected:
147 
149  QStandardItemModel* myEditorModel;
150 
153 
154  };
155 }
156 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)