-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannel.h
63 lines (58 loc) · 1.73 KB
/
channel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef CHANNEL_H
#define CHANNEL_H
#include <QObject>
#include <QString>
#include <QVector>
#include <QPoint>
#include <QSharedPointer>
#include "channelparam.h"
class Channel : public QObject{
Q_OBJECT
Q_PROPERTY(QString name READ getName WRITE setName)
Q_PROPERTY(QString fullName READ getFullName NOTIFY fullNameChanged)
Q_PROPERTY(int rot READ getRot WRITE setRot NOTIFY rotChanged)
Q_PROPERTY(int span READ getSpan WRITE setSpan NOTIFY spanChanged)
Q_PROPERTY(float vcon READ getVcon WRITE setVcon NOTIFY vconChanged)
Q_PROPERTY(int freq READ getFreq WRITE setFreq NOTIFY freqChanged)
public:
explicit Channel(const QString& name_ = QString());
~Channel();
void add(const short x, const short y);
void clear();
const QPoint &at(const int i) const;
ChannelParam &getCp();
const QVector<QPoint> &getData() const;
QString getName() const;
void setName(const QString &Name);
int getRot() const;
void setRot(int rot_);
int getSpan() const;
void setSpan(int span);
int getRawNpt() const;
void setRawNpt(int rawNpt);
float getVcon() const;
void setVcon(float vcon);
QString getDataSetId() const;
void setDataSetId(const QString &dataSetId);
QString getFullName() const;
void setFullName(const QString &fullName);
int getFreq() const;
void setFreq(int freq);
signals:
void rotChanged();
void spanChanged();
void vconChanged();
void freqChanged();
void fullNameChanged();
private:
QString m_Name;
QString m_fullName;
QString m_dataSetId;
int m_freq;
QVector<QPoint> m_Data;
int m_rawNpt;
ChannelParam cp;
};
//Q_DECLARE_METATYPE(Channel*)
typedef QSharedPointer<Channel> ChannelPtr;
#endif // CHANNEL_H