~ubuntu-branches/ubuntu/wily/qsampler/wily

« back to all changes in this revision

Viewing changes to src/qsamplerFxSendsModel.cpp

  • Committer: Package Import Robot
  • Author(s): Jaromír Mikeš
  • Date: 2015-04-26 17:30:50 UTC
  • mfrom: (5.2.2 sid)
  • Revision ID: package-import@ubuntu.com-20150426173050-0o46g530ngbdaco1
Tags: 0.3.0-1
* Imported Upstream version 0.3.0
* Fix VCS fields.
* Removed patches - they don't apply anymore.
* Add desktop patch.
* Add description to patch.
* Install upstream desktop file.
* Update copyright file.
* Enable parallel build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// qsamplerFxSendList.cpp
2
2
//
3
3
/****************************************************************************
 
4
   Copyright (C) 2010-2012, rncbc aka Rui Nuno Capela. All rights reserved.
4
5
   Copyright (C) 2008, Christian Schoenebeck
5
6
 
6
7
   This program is free software; you can redistribute it and/or
68
69
                        break;
69
70
                case Qt::DecorationRole:
70
71
                        if (m_FxSends[index.row()].deletion())
71
 
                                return QIcon(":/icons/formRemove.png");
 
72
                                return QIcon(":/images/formRemove.png");
72
73
                        if (m_FxSends[index.row()].isNew())
73
 
                                return QIcon(":/icons/itemNew.png");
 
74
                                return QIcon(":/images/itemNew.png");
74
75
                        if (m_FxSends[index.row()].isModified())
75
 
                                return QIcon(":/icons/formEdit.png");
76
 
                        return QIcon(":/icons/itemFile.png");
 
76
                                return QIcon(":/images/formEdit.png");
 
77
                        return QIcon(":/images/itemFile.png");
77
78
                case Qt::FontRole: {
78
79
                        if (m_FxSends[index.row()].isModified()) {
79
80
                                QFont font;
120
121
        fxSend.setName("New FX Send");
121
122
        m_FxSends.push_back(fxSend);
122
123
        QModelIndex index = createIndex(m_FxSends.size() - 1, 0);
 
124
#if QT_VERSION < 0x050000
123
125
        QAbstractListModel::reset();
 
126
#else
 
127
        QAbstractListModel::beginResetModel();
 
128
        QAbstractListModel::endResetModel();
 
129
#endif
124
130
        emit fxSendsDirtyChanged(true);
125
131
        return &m_FxSends.last();
126
132
#else // CONFIG_FXSEND
139
145
        FxSend* pFxSend = fxSend(index);
140
146
        if (!pFxSend) return;
141
147
        pFxSend->setDeletion(true);
 
148
#if QT_VERSION < 0x050000
142
149
        QAbstractListModel::reset();
 
150
#else
 
151
        QAbstractListModel::beginResetModel();
 
152
        QAbstractListModel::endResetModel();
 
153
#endif
143
154
        emit fxSendsDirtyChanged(true);
144
155
}
145
156
 
152
163
                fxSend.getFromSampler();
153
164
                m_FxSends.push_back(fxSend);
154
165
        }
 
166
#if QT_VERSION < 0x050000
155
167
        QAbstractListModel::reset();
 
168
#else
 
169
        QAbstractListModel::beginResetModel();
 
170
        QAbstractListModel::endResetModel();
 
171
#endif
156
172
        emit fxSendsDirtyChanged(false);
157
173
}
158
174