1 |
// qsamplerFxSendList.cpp |
// qsamplerFxSendList.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
|
Copyright (C) 2010-2012, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2008, Christian Schoenebeck |
Copyright (C) 2008, Christian Schoenebeck |
|
Copyright (C) 2010, rncbc aka Rui Nuno Capela. All rights reserved. |
|
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
121 |
fxSend.setName("New FX Send"); |
fxSend.setName("New FX Send"); |
122 |
m_FxSends.push_back(fxSend); |
m_FxSends.push_back(fxSend); |
123 |
QModelIndex index = createIndex(m_FxSends.size() - 1, 0); |
QModelIndex index = createIndex(m_FxSends.size() - 1, 0); |
124 |
|
#if QT_VERSION < 0x050000 |
125 |
QAbstractListModel::reset(); |
QAbstractListModel::reset(); |
126 |
|
#else |
127 |
|
QAbstractListModel::beginResetModel(); |
128 |
|
QAbstractListModel::endResetModel(); |
129 |
|
#endif |
130 |
emit fxSendsDirtyChanged(true); |
emit fxSendsDirtyChanged(true); |
131 |
return &m_FxSends.last(); |
return &m_FxSends.last(); |
132 |
#else // CONFIG_FXSEND |
#else // CONFIG_FXSEND |
145 |
FxSend* pFxSend = fxSend(index); |
FxSend* pFxSend = fxSend(index); |
146 |
if (!pFxSend) return; |
if (!pFxSend) return; |
147 |
pFxSend->setDeletion(true); |
pFxSend->setDeletion(true); |
148 |
|
#if QT_VERSION < 0x050000 |
149 |
QAbstractListModel::reset(); |
QAbstractListModel::reset(); |
150 |
|
#else |
151 |
|
QAbstractListModel::beginResetModel(); |
152 |
|
QAbstractListModel::endResetModel(); |
153 |
|
#endif |
154 |
emit fxSendsDirtyChanged(true); |
emit fxSendsDirtyChanged(true); |
155 |
} |
} |
156 |
|
|
163 |
fxSend.getFromSampler(); |
fxSend.getFromSampler(); |
164 |
m_FxSends.push_back(fxSend); |
m_FxSends.push_back(fxSend); |
165 |
} |
} |
166 |
|
#if QT_VERSION < 0x050000 |
167 |
QAbstractListModel::reset(); |
QAbstractListModel::reset(); |
168 |
|
#else |
169 |
|
QAbstractListModel::beginResetModel(); |
170 |
|
QAbstractListModel::endResetModel(); |
171 |
|
#endif |
172 |
emit fxSendsDirtyChanged(false); |
emit fxSendsDirtyChanged(false); |
173 |
} |
} |
174 |
|
|