-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
bandpassbox.h
49 lines (41 loc) · 1.48 KB
/
bandpassbox.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
#ifndef BANDPASSBOX_H
#define BANDPASSBOX_H
#include <QDomElement>
#include <QDomDocument>
#include <QPainter>
#include <QRectF>
#include "box.h"
#include "sealedbox.h"
#include "portedbox.h"
class BandPassBox : public Box
{
public:
BandPassBox(double svol = 0.1, double pvol = 0.01, double pfreq = 1, unsigned int pnum = 1, double plen = 0, double pdiam = 0);
void setSealedBoxVolume(double vol);
void setPortedBoxVolume(double vol);
void setPortedBoxPortNum(unsigned int val);
void setPortedBoxPortLen(double len);
void setPortedBoxPortDiam(double diam);
void setPortedBoxSlotWidth(double width);
void setPortedBoxResFreq(double freq);
void setPortedBoxSlotPortActivated(bool enable);
void updatePortedBoxPorts(double sd, double xmax);
void updatePortedBoxPortsLength();
void updatePortedBoxSlots();
double getSealedBoxVolume(void) const;
double getPortedBoxVolume(void) const;
unsigned int getPortedBoxPortNum(void) const;
double getPortedBoxPortLen(void) const;
double getPortedBoxPortDiam(void) const;
bool getPortedBoxSlotPortActivated(void) const;
double getPortedBoxSlotWidth() const;
double getPortedBoxSlotHeight() const;
double getPortedBoxResFreq(void) const;
QDomElement toDomElement(QDomDocument& doc) const;
void fromDomElement(const QDomElement &e);
void render(QPainter *painter, const QRectF& area) const;
private:
SealedBox sealedBox;
PortedBox portedBox;
};
#endif // BANDPASSBOX_H