Changeset View
Changeset View
Standalone View
Standalone View
src/pulseaudio.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 36 | public: | |||
---|---|---|---|---|---|
46 | 46 | | |||
47 | Q_INVOKABLE int role(const QByteArray &roleName) const; | 47 | Q_INVOKABLE int role(const QByteArray &roleName) const; | ||
48 | 48 | | |||
49 | protected: | 49 | protected: | ||
50 | AbstractModel(const MapBaseQObject *map, QObject *parent); | 50 | AbstractModel(const MapBaseQObject *map, QObject *parent); | ||
51 | void initRoleNames(const QMetaObject &qobjectMetaObject); | 51 | void initRoleNames(const QMetaObject &qobjectMetaObject); | ||
52 | Context *context() const; | 52 | Context *context() const; | ||
53 | 53 | | |||
54 | private slots: | 54 | private Q_SLOTS: | ||
55 | void propertyChanged(); | 55 | void propertyChanged(); | ||
56 | 56 | | |||
57 | private: | 57 | private: | ||
58 | void onDataAdded(int index); | 58 | void onDataAdded(int index); | ||
59 | void onDataRemoved(int index); | 59 | void onDataRemoved(int index); | ||
60 | QMetaMethod propertyChangedMetaMethod() const; | 60 | QMetaMethod propertyChangedMetaMethod() const; | ||
61 | 61 | | |||
62 | const MapBaseQObject *m_map; | 62 | const MapBaseQObject *m_map; | ||
Show All 25 Lines | 85 | public: | |||
88 | }; | 88 | }; | ||
89 | Q_ENUMS(ItemRole) | 89 | Q_ENUMS(ItemRole) | ||
90 | 90 | | |||
91 | explicit SinkModel(QObject *parent = nullptr); | 91 | explicit SinkModel(QObject *parent = nullptr); | ||
92 | Sink *defaultSink() const; | 92 | Sink *defaultSink() const; | ||
93 | Sink *preferredSink() const; | 93 | Sink *preferredSink() const; | ||
94 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 94 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
95 | 95 | | |||
96 | signals: | 96 | Q_SIGNALS: | ||
97 | void defaultSinkChanged(); | 97 | void defaultSinkChanged(); | ||
98 | void preferredSinkChanged(); | 98 | void preferredSinkChanged(); | ||
99 | 99 | | |||
100 | private: | 100 | private: | ||
101 | void sinkAdded(int index); | 101 | void sinkAdded(int index); | ||
102 | void sinkRemoved(int index); | 102 | void sinkRemoved(int index); | ||
103 | void updatePreferredSink(); | 103 | void updatePreferredSink(); | ||
104 | Sink *findPreferredSink() const; | 104 | Sink *findPreferredSink() const; | ||
Show All 17 Lines | 121 | enum ItemRole { | |||
122 | SortByDefaultRole = PulseObjectRole + 1 | 122 | SortByDefaultRole = PulseObjectRole + 1 | ||
123 | }; | 123 | }; | ||
124 | Q_ENUMS(ItemRole) | 124 | Q_ENUMS(ItemRole) | ||
125 | 125 | | |||
126 | explicit SourceModel(QObject *parent = nullptr); | 126 | explicit SourceModel(QObject *parent = nullptr); | ||
127 | Source *defaultSource() const; | 127 | Source *defaultSource() const; | ||
128 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 128 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
129 | 129 | | |||
130 | signals: | 130 | Q_SIGNALS: | ||
131 | void defaultSourceChanged(); | 131 | void defaultSourceChanged(); | ||
132 | }; | 132 | }; | ||
133 | 133 | | |||
134 | class SourceOutputModel : public AbstractModel | 134 | class SourceOutputModel : public AbstractModel | ||
135 | { | 135 | { | ||
136 | Q_OBJECT | 136 | Q_OBJECT | ||
137 | public: | 137 | public: | ||
138 | explicit SourceOutputModel(QObject *parent = nullptr); | 138 | explicit SourceOutputModel(QObject *parent = nullptr); | ||
Show All 19 Lines |