/[svn]/qsampler/trunk/src/qsamplerFxSendsModel.h
ViewVC logotype

Annotation of /qsampler/trunk/src/qsamplerFxSendsModel.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3555 - (hide annotations) (download) (as text)
Tue Aug 13 10:19:32 2019 UTC (4 years, 8 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2263 byte(s)
- In late compliance to C++11, all NULL constants replaced for nullptr.
1 schoenebeck 1667 // qsamplerFxSendList.h
2     //
3     /****************************************************************************
4 capela 3555 Copyright (C) 2010-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5 schoenebeck 1667 Copyright (C) 2008, Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     as published by the Free Software Foundation; either version 2
10     of the License, or (at your option) any later version.
11    
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20    
21     *****************************************************************************/
22    
23     #ifndef __qsamplerFxSendList_h
24     #define __qsamplerFxSendList_h
25    
26 capela 2979 #include "qsamplerFxSend.h"
27    
28 schoenebeck 1667 #include <lscp/client.h>
29    
30 capela 2979 #include <QAbstractListModel>
31 schoenebeck 1667
32     namespace QSampler {
33    
34     class FxSendsModel : public QAbstractListModel
35     {
36     Q_OBJECT
37 capela 2979
38 schoenebeck 1667 public:
39    
40 capela 3555 FxSendsModel(int iChannelID, QObject *pParent = nullptr);
41 capela 2979
42 schoenebeck 1667 // Overridden methods from subclass(es)
43     int rowCount(const QModelIndex& parent) const;
44     QVariant data(const QModelIndex& index, int role) const;
45     bool setData(const QModelIndex& index,
46     const QVariant& value, int role = Qt::EditRole);
47     QVariant headerData(int section, Qt::Orientation orientation,
48     int role = Qt::DisplayRole) const;
49     Qt::ItemFlags flags(const QModelIndex& index) const;
50    
51     // Own methods
52 capela 2979 FxSend *addFxSend();
53     FxSend *fxSend(const QModelIndex& index);
54 schoenebeck 1667 void removeFxSend(const QModelIndex& index);
55    
56     signals:
57 capela 2979
58 schoenebeck 1667 void fxSendsDirtyChanged(bool);
59    
60     public slots:
61 capela 2979
62 schoenebeck 1667 void cleanRefresh();
63     void applyToSampler();
64 capela 2979
65 schoenebeck 1668 // not pretty, but more efficient than wiring connections for each element
66     void onExternalModifiication(const QModelIndex& index);
67 schoenebeck 1667
68     private:
69 capela 2979
70 schoenebeck 1667 typedef QList<FxSend> FxSendsList;
71    
72 capela 2979 int m_iChannelID;
73     FxSendsList m_fxSends;
74 schoenebeck 1667 };
75    
76     } // namespace QSampler
77    
78     #endif // __qsamplerFxSendList_h
79    
80     // end of qsamplerFxSendList.h

  ViewVC Help
Powered by ViewVC