summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.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/Aufgabenblatt2/DiceSim/src/DiceSimController.h
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.h
new file mode 100644
index 0000000..3c39e30
--- /dev/null
+++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSimController.h
@@ -0,0 +1,49 @@
+/*
+ * DiceSimController.h
+ *
+ * Created on: 11.05.2011
+ * Author: sven
+ */
+
+#ifndef DICESIMCONTROLLER_H_
+#define DICESIMCONTROLLER_H_
+
+#ifndef _GTKMM_H
+ #include <gtkmm.h>
+#endif
+
+class DiceSimController {
+public:
+ DiceSimController();
+ virtual ~DiceSimController();
+ void startApp(Gtk::Main& kit);
+private:
+
+ class Columns : public Gtk::TreeModel::ColumnRecord {
+ public:
+ Columns() {
+ add(mData);
+ }
+
+ ~Columns() {}
+
+ Gtk::TreeModelColumn<unsigned> mData;
+ };
+ static const char* UI_FILENAME;
+ Gtk::Window* mPtrMainWin;
+ Gtk::Button* mPtrStartBtn;
+ Gtk::ComboBox* mPtrDiceCombo;
+ Gtk::ComboBox* mPtrRollsCombo;
+ Glib::RefPtr<Gtk::TreeStore> mDiceTreeStore;
+ Glib::RefPtr<Gtk::TreeStore> mRollsTreeStore;
+ Gtk::TextView* mPtrTextView;
+ Glib::RefPtr<Gtk::TextBuffer> mRefPtrTextBuffer;
+ Columns mDiceCols;
+ Columns mRollsCols;
+
+ void on_startbutton_clicked();
+ void writeToCSV(const std::vector<unsigned>& results, unsigned numDice);
+ void startGnuPlot();
+};
+
+#endif /* DICESIMCONTROLLER_H_ */