Add sound manager initial source code
[staging/soundmanager.git] / sample / radio / app / PresetDataObject.h
1 /*
2  * Copyright (C) 2016 by Scott Murray <scott.murray@konsulko.com>
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef PRESETDATAOBJECT_H
18 #define PRESETDATAOBJECT_H
19
20 #include <QObject>
21
22 class PresetDataObject : public QObject
23 {
24     Q_OBJECT
25
26     Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
27     Q_PROPERTY(quint32 frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged)
28     Q_PROPERTY(quint32 band READ band WRITE setBand NOTIFY bandChanged)
29
30 public:
31     PresetDataObject(QObject *parent = Q_NULLPTR);
32     PresetDataObject(const QString &title, const quint32 &frequency, const quint32 &band, QObject *parent = Q_NULLPTR);
33
34     QString title() const;
35
36     void setTitle(const QString &title);
37
38     quint32 frequency() const;
39
40     void setFrequency(const quint32 &frequency);
41
42     quint32 band() const;
43
44     void setBand(const quint32 &band);
45
46 signals:
47     void titleChanged();
48     void frequencyChanged();
49     void bandChanged();
50
51 private:
52     QString m_title;
53     quint32 m_frequency;
54     quint32 m_band;
55 };
56
57 #endif // PRESETDATAOBJECT_H