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

Contents of /branches/qtcharts/mainwindow.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 220 - (show annotations)
Sun Mar 18 21:16:30 2018 UTC (3 years, 6 months ago) by ben
File MIME type: text/plain
File size: 3582 byte(s)
added bandpass aligment chooser dialog
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QMainWindow>
5 #include <QFileDialog>
6 #include <QPrinter>
7
8 #include "speakerdialog.h"
9 #include "searchdialog.h"
10 #include "listdialog.h"
11 #include "bandpassdialog.h"
12 #include "speaker.h"
13 #include "sealedbox.h"
14 #include "portedbox.h"
15 #include "bandpassbox.h"
16 #include "plot.h"
17
18 namespace Ui {
19 class MainWindow;
20 }
21
22 class MainWindow : public QMainWindow
23 {
24 Q_OBJECT
25
26 public:
27 explicit MainWindow(QWidget *parent = 0);
28 ~MainWindow();
29
30 signals:
31 void currentSpeakerChanged(Speaker spk);
32 void currentSealedBoxChanged(SealedBox box);
33 void currentPortedBoxChanged(PortedBox box);
34 void currentBandPassBoxChanged(BandPassBox box);
35
36 public slots:
37 void onProjectSave();
38 void onProjectExport();
39 void onProjectImport();
40 void onProjectQuit();
41 void onSpeakerNew();
42 void onSpeakerRemove();
43 void onSpeakerModify();
44 void onSpeakerInserted(Speaker spk);
45 void onSpeakerCancelled();
46 void onEditOptimize();
47 void onSpeakerSearch();
48 void onProjectPrint();
49 void onAboutAbout();
50
51 void onSearchRequested(const QString& param, double min, double max);
52 void onSearchCancelled();
53 void onSpeakerItemSelected(QString title, const Speaker &speaker);
54 void onSpeakerItemCancelled();
55
56 void onCurrentTabChanged(int tab);
57
58 void onNumberSpinChanged(int number);
59 void onVendorChanged(QString vendor);
60 void onModelChanged(QString model);
61
62 void onCurrentSpeakerChanged(const Speaker& spk);
63
64 void onCurrentSealedBoxChanged(const SealedBox& box);
65 void onCurrentPortedBoxChanged(const PortedBox& box);
66 void onCurrentBandPassBoxChanged(const BandPassBox& box);
67
68 void onSealedVolumeDoubleSpinChanged(double val);
69
70 void onPortedVolumeDoubleSpinChanged(double val);
71 void onPortedResonanceDoubleSpinChanged(double val);
72 void onPortedPortsNumberSpinChanged(int val);
73 void onPortedPortDiameterDoubleSpinChanged(double val);
74 void onPortedSlotWidthDoubleSpinChanged(double val);
75
76 void onBandPassSealedVolumeDoubleSpinChanged(double val);
77 void onBandPassPortedVolumeDoubleSpinChanged(double val);
78 void onBandPassPortedResonanceDoubleSpinChanged(double val);
79 void onBandPassPortNumSpinChanged(int val);
80 void onBandPassPortDiameterDoubleSpinChanged(double val);
81
82 void onAlignModerate_Inf();
83 void onAlignLegendre();
84 void onAlignBessel();
85 void onAlignBullock();
86 void onAlignKeele_Hoge();
87
88 void onBandpassAlignment();
89 void onBandpassOptimizeRequested(double s, double pa);
90 void onBandpassOptimizeCancelled();
91
92 protected:
93 bool print(QPrinter* printer);
94 void syncUiFromCurrentSpeaker(const Speaker &spk);
95 void syncUiFromCurrentSealedBox(const SealedBox& box);
96 void syncUiFromCurrentPortedBox(const PortedBox& box);
97 void syncUiFromCurrentBandPassBox(const BandPassBox& box);
98 void setActivateActions(QList<QAction *> actions, bool enable);
99 void setCurrentSpeaker(const Speaker& spk);
100
101 private:
102 static QString getHome();
103
104 Ui::MainWindow *ui;
105 bool projectSaved;
106 bool isModifying;
107 SpeakerDialog *spkDialog;
108 QFileDialog *fileDialog;
109 SearchDialog *searchDialog;
110 ListDialog *listDialog;
111 BandpassDialog *bandpassDialog;
112
113 Speaker currentSpeaker;
114 int currentSpeakerNumber;
115 SealedBox currentSealedBox;
116 PortedBox currentPortedBox;
117 BandPassBox currentBandPassBox;
118
119 int currentTabIndex;
120
121 Plot *sealedPlot;
122 Plot *portedPlot;
123 Plot *bandpassPlot;
124
125 const Speaker *notInDbSpeaker;
126 };
127
128 #endif // MAINWINDOW_H

  ViewVC Help
Powered by ViewVC 1.1.26