CEBL  2.1
TabRealTimeClassification.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 TABREALTIMECLASSIFICATION_H
27 #define TABREALTIMECLASSIFICATION_H
28 
29 #include "Tab.hpp"
31 #include "../model/EEGData.hpp"
32 
33 //forward declarations
35 
37 {
38 private:
39  bool updating_view;
40 
41  //WIDGETS
42  GtkWidget *interface_combo,
43  *source_combo,
44  *interface_box,
45  *controls_box,
46  *btn_train_classifier,
47  *btn_start,
48  *btn_stop,
49  *btn_interface_cfg;
50 
51 
52  EEGInterface *interface;
53  InterfaceConfigurationWindow * interface_config;
54 
55  void disableControls();
56  void enableControls();
57 
58  static void CB_trainClassifier(GtkWidget *, gpointer);
59  static void CB_start(GtkWidget *, gpointer);
60  static void CB_stop(GtkWidget *, gpointer);
61 
62  //update interface based on num classes, and class labels
63  void updateInterface();
64 
65  //update the interface during classification
66  static gint timedUpdateInterface(gpointer);
67 
68 protected:
70  void CreateGUI();
71 
72 public:
73 
74  //Constructors / Destructors
75  TabRealTimeClassification(string title, GtkWidget* notebook, CEBLViewGTK * view) : Tab(title,notebook,view) { CreateGUI(); }
77 
78  //update the view
79  void updateView();
80  //update model
81  void updateModel();
82  void onHide();
83 };
84 
85 #endif
86 
87 
88