|
|
@@ -129,18 +129,39 @@ bool CBoxAlgorithmP300TactileVisualization::initialize() |
|
|
|
m_result = GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, "label-result"));
|
|
|
|
m_target = GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, "label-target"));
|
|
|
|
|
|
|
|
//TactileMenu initialization
|
|
|
|
TactileMenu CBoxAlgorithmP300TactileVisualization::m_MainMenu("Ja", "Nein", "Pflege", "Hilfe", "Geräte", "Optionen", m_mainWidgetInterface);
|
|
|
|
TactileMenu CBoxAlgorithmP300TactileVisualization::m_CareMenu("Ja", "Nein", "Hunger", "Lage", "Müdigkeit", "Hauptmenü", m_mainWidgetInterface);
|
|
|
|
TactileMenu CBoxAlgorithmP300TactileVisualization::m_HelpMenu("Ja", "Nein", "Schmerzen", "Atemnot", "Anderes", "Hauptmenü", m_mainWidgetInterface);
|
|
|
|
TactileMenu CBoxAlgorithmP300TactileVisualization::m_DevicesMenu("Ja", "Nein", "Atemgerät", "Rollstuhl", "Computer", "Hauptmenü", m_mainWidgetInterface);
|
|
|
|
TactileMenu CBoxAlgorithmP300TactileVisualization::m_FunctionsMenu("Ja", "Nein", "befehl1", "befehl2", "befehl3", "Hauptmenü", m_mainWidgetInterface);
|
|
|
|
//Begin TactileMenu Initialization -------------------------------------------------------------------------------------
|
|
|
|
//Create Menus
|
|
|
|
m_MainMenu = new TactileMenu("Ja", "Nein", "Pflege", "Hilfe", "Geräte", "Funktionen");
|
|
|
|
m_CareMenu = new TactileMenu("Ja", "Nein", "Hunger", "Lage", "Müdigkeit", "Hauptmenü");
|
|
|
|
m_HelpMenu = new TactileMenu("Ja", "Nein", "Schmerzen", "Atemnot", "Anderes", "Hauptmenü");
|
|
|
|
m_DevicesMenu = new TactileMenu("Ja", "Nein", "Atemgerät", "Rollstuhl", "Computer", "Hauptmenü");
|
|
|
|
m_FunctionsMenu = new TactileMenu("Ja", "Nein", "befehl1", "befehl2", "befehl3", "Hauptmenü");
|
|
|
|
|
|
|
|
//Initialize MainMenu
|
|
|
|
m_MainMenu->init_Labels(m_mainWidgetInterface);
|
|
|
|
m_MainMenu->set_SubMenu(2, m_CareMenu);
|
|
|
|
m_MainMenu->set_SubMenu(3, m_HelpMenu);
|
|
|
|
m_MainMenu->set_SubMenu(4, m_DevicesMenu);
|
|
|
|
m_MainMenu->set_SubMenu(5, m_FunctionsMenu);
|
|
|
|
//Initialize CareMenu
|
|
|
|
m_CareMenu->init_Labels(m_mainWidgetInterface);
|
|
|
|
m_CareMenu->set_SubMenu(5, m_MainMenu);
|
|
|
|
//Initialize HelpMenu
|
|
|
|
m_HelpMenu->init_Labels(m_mainWidgetInterface);
|
|
|
|
m_HelpMenu->set_SubMenu(5, m_MainMenu);
|
|
|
|
//Initialize DevicesMenu
|
|
|
|
m_DevicesMenu->init_Labels(m_mainWidgetInterface);
|
|
|
|
m_DevicesMenu->set_SubMenu(5, m_MainMenu);
|
|
|
|
//Initialize FunctionsMenu
|
|
|
|
m_FunctionsMenu->init_Labels(m_mainWidgetInterface);
|
|
|
|
m_FunctionsMenu->set_SubMenu(5, m_MainMenu);
|
|
|
|
|
|
|
|
|
|
|
|
m_CurrentMenu = &m_MainMenu;
|
|
|
|
//Set Pointer to active Menu
|
|
|
|
//Load MenuLabels
|
|
|
|
m_CurrentMenu = m_MainMenu;
|
|
|
|
m_CurrentMenu->reloadui();
|
|
|
|
//Grenze-------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
//End TactileMenu Initialization ---------------------------------------------------------------------------------------
|
|
|
|
gtk_builder_connect_signals(m_mainWidgetInterface, nullptr);
|
|
|
|
gtk_builder_connect_signals(m_toolbarWidgetInterface, nullptr);
|
|
|
|
|
|
|
@@ -211,6 +232,14 @@ bool CBoxAlgorithmP300TactileVisualization::initialize() |
|
|
|
|
|
|
|
bool CBoxAlgorithmP300TactileVisualization::uninitialize()
|
|
|
|
{
|
|
|
|
//Begin Uninitialize TactileMenu -----------------------------------------------------------------------
|
|
|
|
delete m_MainMenu;
|
|
|
|
delete m_CareMenu;
|
|
|
|
delete m_HelpMenu;
|
|
|
|
delete m_DevicesMenu;
|
|
|
|
delete m_FunctionsMenu;
|
|
|
|
//End Uninitialize TactileMenu -------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if (m_idleFuncTag)
|
|
|
|
{
|
|
|
|
m_stimuliQueue.clear();
|
|
|
@@ -605,6 +634,10 @@ bool CBoxAlgorithmP300TactileVisualization::process() |
|
|
|
this->getLogManager() << Kernel::LogLevel_Warning << "Did not find a unique widget at row : " << size_t(m_selectedRow) <<
|
|
|
|
" column : " << size_t(m_selectedCol) << "\n";
|
|
|
|
}
|
|
|
|
//Toggle Menu
|
|
|
|
m_CurrentMenu->call_SubRoutine(m_selectedRow);
|
|
|
|
m_CurrentMenu = m_CurrentMenu->get_SubMenu(m_selectedRow);
|
|
|
|
m_CurrentMenu->reloadui();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
@@ -614,22 +647,10 @@ bool CBoxAlgorithmP300TactileVisualization::process() |
|
|
|
label += "*";
|
|
|
|
gtk_label_set_text(m_result, label.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_selectedRow = -1;
|
|
|
|
m_selectedCol = -1;
|
|
|
|
}
|
|
|
|
//Load new menuentries
|
|
|
|
uint64_t label_id = id - m_rowStimulationBase;
|
|
|
|
if(main)
|
|
|
|
{
|
|
|
|
set_labeltext(label_id);
|
|
|
|
main = false;
|
|
|
|
}
|
|
|
|
else if(label_id == 5)
|
|
|
|
{
|
|
|
|
set_labeltext(6);
|
|
|
|
main = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|