/[qspeakers]/mainwindow.h
ViewVC logotype

Contents of /mainwindow.h

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26