summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h
new file mode 100644
index 0000000..6852e51
--- /dev/null
+++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h
@@ -0,0 +1,54 @@
+/*
+ * MainController.h
+ *
+ * Created on: 31.03.2011
+ * Author: sven
+ */
+
+#ifndef MAINCONTROLLER_H_
+#define MAINCONTROLLER_H_
+
+#ifndef SINEGENERATORPARAMETERS_H_
+ #include "SineGeneratorParameters.h"
+#endif
+#ifndef _GTKMM_H
+ #include <gtkmm.h>
+#endif
+
+class MainController {
+public:
+ MainController();
+ virtual ~MainController();
+ void startApp(Gtk::Main&);
+private:
+ static const unsigned short DEFAULT_FREQUENCY;
+ static const unsigned short DEFAULT_AMPLITUDE;
+ static const unsigned short DEFAULT_PHASE;
+ static const unsigned short DEFAULT_LENGTH;
+ static const char* DEFAULT_WAVEFILENAME;
+ static const char* UI_FILENAME;
+
+ Gtk::Window* mPtrMainWin;
+ Gtk::SpinButton* mPtrFreqField;
+ Gtk::SpinButton* mPtrAmpField;
+ Gtk::SpinButton* mPtrPhaseField;
+ Gtk::SpinButton* mPtrLengthField;
+ Gtk::Entry* mPtrBitrateEntry;
+ Gtk::Entry* mPtrSamplerateEntry;
+ Gtk::Entry* mPtrFilenameEntry;
+ Gtk::Button* mPtrStartBtn;
+ SineGeneratorParameters mParams;
+ Gtk::Adjustment mFreqAdj;
+ Gtk::Adjustment mAmpAdj;
+ Gtk::Adjustment mPhaseAdj;
+ Gtk::Adjustment mLengthAdj;
+
+ void on_startbutton_clicked();
+ void on_freq_changed();
+ void on_amp_changed();
+ void on_phase_changed();
+ void on_length_changed();
+ void on_filename_changed();
+};
+
+#endif /* MAINCONTROLLER_H_ */