Skip to content

Commit f6fca48

Browse files
committed
remove shutdown button, since we're in the container
1 parent 1a49cc7 commit f6fca48

2 files changed

Lines changed: 1 addition & 29 deletions

File tree

src/gui/gui_mainwindow.cc

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,8 @@ MainWindow::MainWindow(QWidget* parent) :
393393
stop_config_button_->setEnabled(false); // Initially disabled
394394
connect(stop_config_button_, SIGNAL(clicked()), this, SLOT(StopTmuxConfiguration()));
395395

396-
QPushButton* shutdown_button = new QPushButton("Shutdown Car");
397-
shutdown_button->setFont(font);
398-
shutdown_button->setSizePolicy(expanding_policy);
399-
connect(shutdown_button, SIGNAL(clicked()), this, SLOT(ShutdownCar()));
400-
401396
right_layout->addWidget(stop_config_button_);
402-
right_layout->addStretch(); // Gap in the middle
403-
right_layout->addWidget(shutdown_button);
397+
right_layout->addStretch(); // Fill remaining space
404398
right_widget->setLayout(right_layout);
405399

406400
// Add left and right widgets to main layout
@@ -743,25 +737,4 @@ void MainWindow::StopTmuxConfiguration() {
743737
}
744738
}
745739

746-
void MainWindow::ShutdownCar() {
747-
// Show confirmation dialog
748-
QMessageBox::StandardButton reply = QMessageBox::question(
749-
this,
750-
"Confirm Shutdown",
751-
"Are you sure you want to shutdown the car?\n\nThis will:\n- Stop all running configurations\n- Stop all ROS nodes\n- Power off the system",
752-
QMessageBox::Yes | QMessageBox::No,
753-
QMessageBox::No // Default to No for safety
754-
);
755-
756-
if (reply == QMessageBox::Yes) {
757-
// Stop all tmux sessions
758-
StopTmuxConfiguration();
759-
760-
// Shutdown the PC
761-
Exec("sudo shutdown -h now");
762-
}
763-
}
764-
765-
766-
767740
} // namespace ut_automata_gui

src/gui/gui_mainwindow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public slots:
175175
void UpdateTmuxConfigurations();
176176
void StartTmuxConfiguration();
177177
void StopTmuxConfiguration();
178-
void ShutdownCar();
179178

180179
signals:
181180
void UpdateQuestion(std::string question,

0 commit comments

Comments
 (0)