--- qsampler/trunk/src/qsamplerFxSendsModel.h 2010/03/29 17:00:30 2074 +++ qsampler/trunk/src/qsamplerFxSendsModel.h 2016/08/16 15:34:45 2979 @@ -1,8 +1,8 @@ // qsamplerFxSendList.h // /**************************************************************************** + Copyright (C) 2010-2016, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck - Copyright (C) 2010, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -23,18 +23,21 @@ #ifndef __qsamplerFxSendList_h #define __qsamplerFxSendList_h -#include +#include "qsamplerFxSend.h" + #include -#include "qsamplerFxSend.h" +#include namespace QSampler { class FxSendsModel : public QAbstractListModel { Q_OBJECT + public: - FxSendsModel(int SamplerChannelID, QObject* pParent = NULL); + + FxSendsModel(int iChannelID, QObject *pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent) const; @@ -45,28 +48,29 @@ int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex& index) const; - // Make the following method public - QAbstractListModel::reset; - // Own methods - FxSend* addFxSend(); - FxSend* fxSend(const QModelIndex& index); + FxSend *addFxSend(); + FxSend *fxSend(const QModelIndex& index); void removeFxSend(const QModelIndex& index); signals: + void fxSendsDirtyChanged(bool); public slots: + void cleanRefresh(); void applyToSampler(); + // not pretty, but more efficient than wiring connections for each element void onExternalModifiication(const QModelIndex& index); private: + typedef QList FxSendsList; - int m_SamplerChannelID; - FxSendsList m_FxSends; + int m_iChannelID; + FxSendsList m_fxSends; }; } // namespace QSampler