From 63dc51c35d26c837295ac0ef33c1b8e41353ea35 Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Wed, 27 Jun 2018 17:30:37 +0200 Subject: Merge 'eel' into 'master' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace content from 'master' by content from 'eel' as it's the new version based on 4a on which new development will be done. Change-Id: I2966af7dcee59701ff3a344487c008d7e65e68ed Signed-off-by: Loïc Collignon --- app/pacontrolmodel.h | 92 ---------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 app/pacontrolmodel.h (limited to 'app/pacontrolmodel.h') diff --git a/app/pacontrolmodel.h b/app/pacontrolmodel.h deleted file mode 100644 index 81eb70b..0000000 --- a/app/pacontrolmodel.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2016,2017 Konsulko Group - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include -#include - -class PaControlModel; - -class PaControl -{ - public: - PaControl(const quint32 &index, const QString &name, const QString &desc, const quint32 &type, const quint32 &channel, const QString &cdesc, const quint32 &volume); - - quint32 cindex() const; - QString name() const; - QString desc() const; - quint32 type() const; - quint32 channel() const; - QString cdesc() const; - quint32 volume() const; - void setCIndex(const QVariant&); - void setName(const QVariant&); - void setDesc(const QVariant&); - void setType(const QVariant&); - void setChannel(const QVariant&); - void setCDesc(const QVariant&); - void setVolume(PaControlModel *, const QVariant&); - - private: - quint32 m_cindex; - QString m_name; - QString m_desc; - quint32 m_type; - quint32 m_channel; - QString m_cdesc; - quint32 m_volume; -}; - -class PaControlModel : public QAbstractListModel -{ - Q_OBJECT - public: - enum PaControlRoles { - CIndexRole = Qt::UserRole + 1, - NameRole, - DescRole, - TypeRole, - ChannelRole, - CDescRole, - VolumeRole - }; - - PaControlModel(QObject *parent = 0); - - void addControl(const PaControl &control); - - int rowCount(const QModelIndex &parent = QModelIndex()) const; - - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); - - Qt::ItemFlags flags(const QModelIndex &index) const; - - public slots: - void addOneControl(int cindex, QString name, QString desc, int type, int channel, const char *cdesc, int volume); - void changeExternalVolume(uint32_t type, uint32_t cindex, uint32_t chan, uint32_t volume); - - signals: - void volumeChanged(uint32_t type, uint32_t index, uint32_t channel, uint32_t volume); - - protected: - QHash roleNames() const; - private: - QList m_controls; - pa_context *pa_ctx; -}; -- cgit 1.2.3-korg