fix names
This commit is contained in:
parent
4ab5a162c4
commit
d8d6568963
@ -31,7 +31,6 @@ namespace autoapp
|
|||||||
{
|
{
|
||||||
namespace ui
|
namespace ui
|
||||||
{
|
{
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: QMainWindow(parent), ui_(new Ui::MainWindow), webSocket(new QWebSocket),
|
: QMainWindow(parent), ui_(new Ui::MainWindow), webSocket(new QWebSocket),
|
||||||
reconnectTimer(new QTimer(this)),
|
reconnectTimer(new QTimer(this)),
|
||||||
@ -90,7 +89,7 @@ namespace autoapp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void f1x::openauto::autoapp::ui::MainWindow::updateBtNowPlaying()
|
void autoapp::UI::MainWindow::updateBtNowPlaying()
|
||||||
{
|
{
|
||||||
QDBusInterface manager(
|
QDBusInterface manager(
|
||||||
"org.bluez",
|
"org.bluez",
|
||||||
@ -144,14 +143,14 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBtNowPlaying()
|
|||||||
|
|
||||||
if (status == "Playing")
|
if (status == "Playing")
|
||||||
{
|
{
|
||||||
ui_->stackedWidget->setCurrentIndex(0);
|
//ui_->stackedWidget->setCurrentIndex(0);
|
||||||
ui_->btSongName->setText(title);
|
//ui_->btSongName->setText(title);
|
||||||
ui_->btArtistName->setText(artist);
|
//ui_->btArtistName->setText(artist);
|
||||||
ui_->btAlbumName->setText(album);
|
//ui_->btAlbumName->setText(album);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui_->stackedWidget->setCurrentIndex(1);
|
//ui_->stackedWidget->setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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
|
QUrl url(QStringLiteral("ws://127.0.0.1:5000")); // Change to your real server
|
||||||
qDebug() << "Connecting to WebSocket:" << url;
|
qDebug() << "Connecting to WebSocket:" << url;
|
||||||
webSocket->open(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
|
// Your custom message processing logic here
|
||||||
qDebug() << "[Handler] Processing message:" << message;
|
qDebug() << "[Handler] Processing message:" << message;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user