/[qspeakers]/speaker.h
ViewVC logotype

Contents of /speaker.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 79 - (show annotations)
Sun Mar 1 13:28:12 2015 UTC (2 years, 3 months ago) by ben
File MIME type: text/plain
File size: 1207 byte(s)
implement print function
1 #ifndef SPEAKER_H
2 #define SPEAKER_H
3 #include <QMetaType>
4 #include <QDomNode>
5 #include <QPainter>
6
7
8
9 class Speaker
10 {
11
12 public:
13 Speaker();
14 Speaker(const Speaker& copy);
15 ~Speaker();
16
17 bool operator!=(const Speaker& r) const;
18 bool operator==(const Speaker& r) const;
19 bool isValid(void) const;
20
21 void setVendor(const QString& vnd);
22 void setModel(const QString& mdl);
23
24 void setFs(double val);
25 void setVas(double val);
26 void setRe(double val);
27 void setQts(double val);
28 void setSd(double val);
29 void setXmax(double val);
30
31 QString getVendor() const;
32 QString getModel() const;
33
34 double getFs(void) const;
35 double getVas(void) const;
36 double getRe(void) const;
37 double getQts(void) const;
38 double getSd(void) const;
39 double getXmax() const;
40
41 QDomElement toDomElement(QDomDocument& doc) const;
42 void fromDomElement(const QDomElement& el);
43 void render(QPainter *painter, const QRectF& area);
44
45 private:
46 QString vendor;
47 QString model;
48
49 double fs; // Hz
50 double vas; // L
51 double re; // Ohm
52 double qts; // unitless
53 double sd; // m²
54 double xmax; // mm
55 };
56
57 Q_DECLARE_METATYPE(Speaker)
58
59 #endif // SPEAKER_H

  ViewVC Help
Powered by ViewVC 1.1.26