/[qspeakers]/branches/qtcharts/bandpassbox.h
ViewVC logotype

Contents of /branches/qtcharts/bandpassbox.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 252 - (show annotations)
Mon Sep 21 21:59:01 2020 UTC (8 months, 3 weeks ago) by ben
File MIME type: text/plain
File size: 1247 byte(s)
version 1.4, fix slot port len
1 #ifndef BANDPASSBOX_H
2 #define BANDPASSBOX_H
3
4 #include <QDomElement>
5 #include <QDomDocument>
6 #include <QPainter>
7 #include <QRectF>
8 #include "box.h"
9 #include "sealedbox.h"
10 #include "portedbox.h"
11
12 class BandPassBox : public Box
13 {
14 public:
15 BandPassBox(double svol = 0.1, double pvol = 0.01, double pfreq = 1, unsigned int pnum = 1, double plen = 0, double pdiam = 0);
16
17 void setSealedBoxVolume(double vol);
18 void setPortedBoxVolume(double vol);
19 void setPortedBoxPortNum(unsigned int val);
20 void setPortedBoxPortLen(double len);
21 void setPortedBoxPortDiam(double diam);
22 void setPortedBoxResFreq(double freq);
23 void updatePortedBoxPorts(double sd, double xmax);
24 void updatePortedBoxPortsLength();
25
26 double getSealedBoxVolume(void) const;
27 double getPortedBoxVolume(void) const;
28 unsigned int getPortedBoxPortNum(void) const;
29 double getPortedBoxPortLen(void) const;
30 double getPortedBoxPortDiam(void) const;
31 double getPortedBoxResFreq(void) const;
32
33 QDomElement toDomElement(QDomDocument& doc) const;
34 void fromDomElement(const QDomElement &e);
35 void render(QPainter *painter, const QRectF& area) const;
36
37 private:
38 SealedBox sealedBox;
39 PortedBox portedBox;
40 };
41
42 #endif // BANDPASSBOX_H

  ViewVC Help
Powered by ViewVC 1.1.26