Changed copyright notice.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
© 2025 -2026 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <bcmainwindow.h>
|
||||
#include <bcanimateddelegate.h>
|
||||
#include <ui_bcmainwindow.h>
|
||||
|
||||
#include <bcguihelpers.h>
|
||||
|
||||
/**
|
||||
* @brief Das Mainwindow erzeugen
|
||||
@@ -141,20 +141,21 @@ void BCMainWindow::initMainWindow()
|
||||
|
||||
fitzeButton->setStyleSheet(style);
|
||||
*/
|
||||
// besser: model::emit dataChanged
|
||||
// also: emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole, ValueRole});
|
||||
|
||||
initStatusBar();
|
||||
|
||||
// besser: model::emit dataChanged
|
||||
// also: emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole, ValueRole});
|
||||
connect( _connectButton, &QToolButton::clicked, &_transmitter, &BCTransmitter::onToggleDriverConnection );
|
||||
connect( _syncButton, &QToolButton::clicked, this, &BCMainWindow::onSyncDeviceView );
|
||||
connect( &_transmitter, &BCTransmitter::valueUpdated, this, &BCMainWindow::onValueUpdated );
|
||||
|
||||
|
||||
_transmitter.moveToThread(&_worker);
|
||||
|
||||
connect(this, &BCMainWindow::requestValueUpdate, &_transmitter, &BCTransmitter::enqueueValue);
|
||||
connect(&_worker, &QThread::finished, &_transmitter, &QObject::deleteLater);
|
||||
connect( &_transmitter, &BCTransmitter::driverStateChanged, this, &BCMainWindow::onDriverStateChanged );
|
||||
|
||||
// transmitter starten
|
||||
_transmitter.moveToThread(&_worker);
|
||||
_worker.start();
|
||||
|
||||
// die Daten des eBikes laden
|
||||
@@ -167,30 +168,19 @@ void BCMainWindow::initMainWindow()
|
||||
|
||||
void BCMainWindow::initStatusBar()
|
||||
{
|
||||
// __fix
|
||||
QStatusBar *statBar = statusBar();
|
||||
|
||||
// Optional: Normale Nachricht links
|
||||
BCDriverStateWidget* connector = new BCDriverStateWidget(this);
|
||||
connect( &_transmitter, &BCTransmitter::driverStateChanged, connector, &BCDriverStateWidget::onDriverStateChanged );
|
||||
statBar->addPermanentWidget(connector);
|
||||
|
||||
statBar->showMessage("Ready");
|
||||
|
||||
// 1. Unseren Switcher erstellen
|
||||
ThemeSwitchButton *themeBtn = new ThemeSwitchButton(this);
|
||||
|
||||
// 2. WICHTIG: Rechts hinzufügen
|
||||
BCThemeSwitchButton *themeBtn = new BCThemeSwitchButton(this);
|
||||
statBar->addPermanentWidget(themeBtn);
|
||||
|
||||
// 3. Signal verbinden: Button klick -> Theme ändern
|
||||
connect(themeBtn, &ThemeSwitchButton::themeChanged, this, [this](bool isDark){
|
||||
if (isDark)
|
||||
{
|
||||
//applyFluentDarkTheme(*qApp); // Funktion von vorhin
|
||||
statusBar()->showMessage("Dark Mode Activated", 3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
//applyFluentLightTheme(*qApp); // Funktion von vorhin
|
||||
statusBar()->showMessage("Light Mode Activated", 3000);
|
||||
}
|
||||
connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark)
|
||||
{
|
||||
QString message = isDark ? "Dark Mode Activated" : "Light Mode Activated";
|
||||
statusBar()->showMessage( message, 3000);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -216,6 +206,7 @@ void BCMainWindow::autoConnect()
|
||||
void BCMainWindow::onDriverStateChanged( BCDriver::DriverState state, const QString& message )
|
||||
{
|
||||
qDebug() << " --- on DriverStatusChanged: " << state << ":" << message;
|
||||
_statusbar->showMessage( message, 8000 );
|
||||
}
|
||||
|
||||
void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID )
|
||||
|
||||
Reference in New Issue
Block a user