MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / updateCurrentMode

Method updateCurrentMode

bt_editor/startup_dialog.cpp:99–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void StartupDialog::updateCurrentMode()
100{
101 const QString selected_style( "color:white; "
102 "border: 2px solid #9cff71; border-radius: 10px;"
103 "background-color: #2f981a;" );
104
105 const QString default_style( "QToolButton {"
106 "color:white; "
107 "border: 2px solid #9cff71; border-radius: 10px;"
108 "background-color: rgba(0, 0, 0, 0);"
109 "}\n"
110 "QToolButton:hover {color:white; background-color: rgb(111, 111, 111);}");
111
112 if( _mode == GraphicMode::EDITOR)
113 {
114 ui->labelDescription->setText("Create/Load/Edit/Save your own BehaviorTree.");
115 }
116 else if( _mode == GraphicMode::MONITOR)
117 {
118 ui->labelDescription->setText("Connect to a remote server to visualize the status"
119 " of a BehaviorTree in real-time.");
120 }
121 else if( _mode == GraphicMode::REPLAY)
122 {
123 ui->labelDescription->setText("Load a BehaviorTree Log file to visualize all the"
124 " transitions off-line.");
125 }
126
127 ui->toolButtonEditor->setStyleSheet( _mode == GraphicMode::EDITOR ? selected_style : default_style);
128#ifdef ZMQ_FOUND
129 ui->toolButtonMonitor->setStyleSheet( _mode == GraphicMode::MONITOR ? selected_style : default_style);
130#endif
131 ui->toolButtonReplay->setStyleSheet( _mode == GraphicMode::REPLAY ? selected_style : default_style);
132}
133
134void StartupDialog::on_toolButtonStart_clicked()
135{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected