/[qspeakers]/portedbox.h
ViewVC logotype

Contents of /portedbox.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (show annotations)
Wed May 6 22:48:15 2015 UTC (2 years, 1 month ago) by ben
File MIME type: text/plain
File size: 1210 byte(s)
add slot port in bass-reflex tab
1 #ifndef PORTEDBOX_H
2 #define PORTEDBOX_H
3
4 #include <QDomElement>
5
6 #include "sealedbox.h"
7 #define K 0.732 /* correction factor for a half flanged disposed port */
8
9 class PortedBox : public Box
10 {
11 public:
12 PortedBox(double volume = 0.01, double resfreq = 1, unsigned int portnum = 1, double portdiam = 0, double portlen = 0);
13 void setBoxVolume(double vol);
14 void setPortNum(unsigned int value);
15 void setPortLen(double len);
16 void setPortDiam(double diam);
17 void setSlotWidth(double width);
18 void setResFreq(double value);
19
20 double getBoxVolume(void) const;
21 unsigned int getPortNum() const;
22 double getPortLen(void) const;
23 double getPortDiam(void) const;
24 double getSlotWidth() const;
25 double getSlotHeight() const;
26 double getResFreq() const;
27
28 void updateSlots();
29 void updatePorts(double sd, double xmax);
30 void updatePortsLength();
31
32 QDomElement toDomElement(QDomDocument& doc) const;
33 void fromDomElement(const QDomElement& e);
34 void render(QPainter *painter, const QRectF& area);
35
36 private:
37 SealedBox box;
38 double resFreq;
39
40 unsigned int portNum;
41 double portLen;
42 double portDiam;
43 double slotWidth;
44 };
45
46 #endif // PORTEDBOX_H

  ViewVC Help
Powered by ViewVC 1.1.26