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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1668 - (hide annotations) (download) (as text)
Tue Feb 5 15:42:33 2008 UTC (16 years, 2 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2263 byte(s)
* finished FX Sends dialog implementation
* bumped version to 0.2.1.4

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

  ViewVC Help
Powered by ViewVC