CEBL  2.1
TabDevice.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
26 #ifndef TABDEVICE_H
27 #define TABDEVICE_H
28 
29 #include "Tab.hpp"
30 class WidgetPanel;
31 
32 
33 class TabDevice : public Tab
34 {
35 private:
36  //Widgets for device configuration
37  WidgetPanel *mindset_panel;
38  GtkWidget *error_text;
39  GtkWidget *error_box;
40  GtkWidget *inquiry_text;
41  GtkWidget *inquiry_box;
42  GtkWidget *radio_bs_96, *radio_bs_192, *radio_bs_384, *radio_bs_768;
43  GtkWidget *radio_sr_64, *radio_sr_128, *radio_sr_256, *radio_sr_512, *radio_sr_1024;
44  GtkWidget *mindset_options_box;
45  GtkWidget *btn_search;
46  GtkWidget *mindset_device_box;
47 
48 
49  //CALLBACKS
50  static void CB_DeviceSearch(GtkWidget *, gpointer);
51  static void CB_ChangeLocation(GtkWidget *, gpointer);
52  static void CB_ChangeBlockSize(GtkWidget *, gpointer);
53  static void CB_ChangeSampleRate(GtkWidget *, gpointer);
54 
55  //are the widgets currently being updated from the model
56  bool updating_view;
57 
58  //Widgets for file stream configuration
59  GtkWidget *file_stream_box,
60  *label_filename,
61  *file_btn_load,
62  *file_label_info_text;
63 
64 
65 
66  static void CB_LoadDataSourceFile(GtkWidget *, gpointer);
67 
68 
69 protected:
71  void CreateGUI();
72 
73 public:
74 
75  //Constructors / Destructors
76  TabDevice(string title, GtkWidget* notebook, CEBLViewGTK * view) : Tab(title,notebook,view) { CreateGUI(); }
77  ~TabDevice();
78 
79  //update the view
80  void updateView();
81  //update model
82  void updateModel();
83 };
84 
85 
86 #endif
87