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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2387 - (hide annotations) (download) (as text)
Sat Dec 29 00:21:11 2012 UTC (11 years, 3 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2273 byte(s)
* Preparations for Qt5 migration. (TESTING)
1 schoenebeck 1667 // qsamplerFxSendList.h
2     //
3     /****************************************************************************
4 capela 2387 Copyright (C) 2010-2012, 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     #include <QAbstractListModel>
27     #include <lscp/client.h>
28    
29     #include "qsamplerFxSend.h"
30    
31     namespace QSampler {
32    
33     class FxSendsModel : public QAbstractListModel
34     {
35     Q_OBJECT
36     public:
37     FxSendsModel(int SamplerChannelID, QObject* pParent = NULL);
38    
39     // Overridden methods from subclass(es)
40     int rowCount(const QModelIndex& parent) const;
41     QVariant data(const QModelIndex& index, int role) const;
42     bool setData(const QModelIndex& index,
43     const QVariant& value, int role = Qt::EditRole);
44     QVariant headerData(int section, Qt::Orientation orientation,
45     int role = Qt::DisplayRole) const;
46     Qt::ItemFlags flags(const QModelIndex& index) const;
47    
48     // Own methods
49     FxSend* addFxSend();
50     FxSend* fxSend(const QModelIndex& index);
51     void removeFxSend(const QModelIndex& index);
52    
53     signals:
54     void fxSendsDirtyChanged(bool);
55    
56     public slots:
57     void cleanRefresh();
58     void applyToSampler();
59 schoenebeck 1668 // not pretty, but more efficient than wiring connections for each element
60     void onExternalModifiication(const QModelIndex& index);
61 schoenebeck 1667
62     private:
63     typedef QList<FxSend> FxSendsList;
64    
65     int m_SamplerChannelID;
66     FxSendsList m_FxSends;
67     };
68    
69     } // namespace QSampler
70    
71     #endif // __qsamplerFxSendList_h
72    
73     // end of qsamplerFxSendList.h

  ViewVC Help
Powered by ViewVC