fix names

This commit is contained in:
marios8543 2025-04-21 19:44:50 +03:00
parent 4ab5a162c4
commit d8d6568963

View File

@ -31,7 +31,6 @@ namespace autoapp
{
namespace ui
{
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui_(new Ui::MainWindow), webSocket(new QWebSocket),
reconnectTimer(new QTimer(this)),
@ -90,7 +89,7 @@ namespace autoapp
}
}
void f1x::openauto::autoapp::ui::MainWindow::updateBtNowPlaying()
void autoapp::UI::MainWindow::updateBtNowPlaying()
{
QDBusInterface manager(
"org.bluez",
@ -144,14 +143,14 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBtNowPlaying()
if (status == "Playing")
{
ui_->stackedWidget->setCurrentIndex(0);
ui_->btSongName->setText(title);
ui_->btArtistName->setText(artist);
ui_->btAlbumName->setText(album);
//ui_->stackedWidget->setCurrentIndex(0);
//ui_->btSongName->setText(title);
//ui_->btArtistName->setText(artist);
//ui_->btAlbumName->setText(album);
}
else
{
ui_->stackedWidget->setCurrentIndex(1);
//ui_->stackedWidget->setCurrentIndex(1);
}
}
break;
@ -159,14 +158,14 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBtNowPlaying()
}
}
void f1x::openauto::autoapp::ui::MainWindow::connectWebSocket()
void autoapp::UI::MainWindow::connectWebSocket()
{
QUrl url(QStringLiteral("ws://127.0.0.1:5000")); // Change to your real server
qDebug() << "Connecting to WebSocket:" << url;
webSocket->open(url);
}
void f1x::openauto::autoapp::ui::MainWindow::handleIncomingMessage(const QString &message)
void autoapp::UI::MainWindow::handleIncomingMessage(const QString &message)
{
// Your custom message processing logic here
qDebug() << "[Handler] Processing message:" << message;