From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../SineGenerator/src/MainController.h | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/MainController.h') 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 +#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_ */ -- cgit v1.2.3