Browse Source

Dateien hochladen nach „src/TactileVisualization“

master
Tobias Baumann 2 years ago
parent
commit
1f5d5b76f1
1 changed files with 25 additions and 10 deletions
  1. 25
    10
      src/TactileVisualization/ovpCBoxAlgorithmP300TactileVisualization.cpp

+ 25
- 10
src/TactileVisualization/ovpCBoxAlgorithmP300TactileVisualization.cpp View File

m_selectedFontSize = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 14); m_selectedFontSize = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 14);
m_nTactilos = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 15); m_nTactilos = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 15);
//set m_nTactilos to 2 if lower than 2
if(m_nTactilos < 2)
{
m_nTactilos = 2;
}
//set m_nTactilos to MAX if greater than MAX_TACTILOS
if(m_nTactilos > MAX_TACTILOS)
{
m_nTactilos = MAX_TACTILOS;
}
// ---------------------------------------------------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------------------------------------------------
//Set Pointer to Mainmenu //Set Pointer to Mainmenu
m_currMenu = &m_Menu[0]; m_currMenu = &m_Menu[0];
//Init Gtk Labels
for(int i = 0; i < 6; i++)
{
std::string label_id = "label-" + std::to_string(i+1);
std::string label_text = m_currMenu->get_LabelText(i);
m_Label.push_back(GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, label_id.c_str())));
gtk_label_set_text(m_Label[i], label_text.c_str());
}
} }
else
else //Create default menu for m_nTactilos != 6
{
m_Menu.push_back(TactileMenu(m_nTactilos));
m_currMenu = &m_Menu[0];
}
//Init Gtk Labels
for(int i = 0; i < m_nTactilos; i++)
{ {
std::string label_id = "label-" + std::to_string(i+1);
std::string label_text = m_currMenu->get_LabelText(i);
m_Label.push_back(GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, label_id.c_str())));
gtk_label_set_text(m_Label[i], label_text.c_str());
} }
//End Menu Initialization --------------------------------------------------------------------------------------- //End Menu Initialization ---------------------------------------------------------------------------------------
gtk_builder_connect_signals(m_mainWidgetInterface, nullptr); gtk_builder_connect_signals(m_mainWidgetInterface, nullptr);
for(int i = 0; i < 6; i++) for(int i = 0; i < 6; i++)
{ {
std::string label_text = m_currMenu->get_LabelText(i); std::string label_text = m_currMenu->get_LabelText(i);
gtk_label_set_text(m_Label[i], label_text.c_str()); gtk_label_set_text(m_Label[i], label_text.c_str());
} }
} }

Loading…
Cancel
Save