Language updates.

This commit is contained in:
Christoph Holzheuer
2026-01-23 16:33:05 +01:00
parent 37fcc5e888
commit 7647b01d62
5 changed files with 19 additions and 33 deletions

View File

@@ -47,27 +47,13 @@ BCDeviceView::BCDeviceView(QWidget *parent)
_itemDelegate = new BCValueDelegate( _valueModel.getValueList(), this); _itemDelegate = new BCValueDelegate( _valueModel.getValueList(), this);
setItemDelegateForColumn( 1, _itemDelegate ); setItemDelegateForColumn( 1, _itemDelegate );
/*
setStyleSheet( R"(QTableView::item:selected
{
background-color: green;
border: none;
}
QTableView:focus
{
outline: none;
}
})");
*/
} }
void BCDeviceView::setDeviceID( BCDevice::ID deviceID ) void BCDeviceView::setDeviceID( BCDevice::ID deviceID )
{ {
_devideID = deviceID; _devideID = deviceID;
} }
BCDevice::ID BCDeviceView::deviceID() const BCDevice::ID BCDeviceView::deviceID() const

View File

@@ -193,16 +193,16 @@ void BCMainWindow::initStatusBar()
_statusBar->addPermanentWidget(themeBtn); _statusBar->addPermanentWidget(themeBtn);
connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark) connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark)
{ {
QString message = isDark ? "DarkMode aktiviert" : "LightMode aktiviert"; QString message = isDark ? "using DarkMode." : "using LightMode.";
_statusBar->showMessage( message, 3000); onShowMessage( message );
setApplicationStyleSheet( isDark ? cDarkModeStyle : cLightModeStyle ); setApplicationStyleSheet( isDark ? cDarkModeStyle : cLightModeStyle );
}); });
// Wir starten im light mode // Wir starten im light mode
//themeBtn->setDarkMode( false ); //themeBtn->setDarkMode( false );
_statusBar->showMessage("Bereit. (Dummy-Treiber eingestellt)"); onShowMessage("Ready. (Using dummy driver)");
setApplicationStyleSheet(cLightModeStyle); setApplicationStyleSheet(cLightModeStyle);
@@ -270,7 +270,7 @@ void BCMainWindow::onStartAnimation()
void BCMainWindow::onDriverStateChanged( BCDriver::DriverState state, const QString& message ) void BCMainWindow::onDriverStateChanged( BCDriver::DriverState state, const QString& message )
{ {
Q_UNUSED(state) Q_UNUSED(state)
_statusBar->showMessage( message, 8000 ); onShowMessage( message, 8000 );
} }
void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID ) void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID )
@@ -318,7 +318,7 @@ void BCMainWindow::onValueUpdated(BCDevice::ID deviceID, int index, BCValue::Fla
void BCMainWindow::onEndOfProcessing() void BCMainWindow::onEndOfProcessing()
{ {
_syncButton->setEnabled( true ); _syncButton->setEnabled( true );
_statusBar->showMessage( "Synchronisation abgeschlossen.", 3000 ); onShowMessage( "Synchronization complete.");
} }
/** /**
@@ -337,7 +337,7 @@ void BCMainWindow::onSyncDeviceView()
_syncButton->setEnabled( false ); _syncButton->setEnabled( false );
QString devName = _currentPanel->property( cBCKeyHeaderLabel ).toString(); QString devName = _currentPanel->property( cBCKeyHeaderLabel ).toString();
_statusBar->showMessage( "Lese: " + devName, 5000 ); onShowMessage( "Reading: " + devName );
for( const BCValuePtr& value : currentList ) for( const BCValuePtr& value : currentList )
{ {

View File

@@ -65,7 +65,7 @@ public slots:
void onEndOfProcessing(); void onEndOfProcessing();
void onSyncDeviceView(); void onSyncDeviceView();
void onShowMessage( const QString& message, int timeOut=3000); void onShowMessage( const QString& message, int timeOut=4000);
void onStartAnimation(); void onStartAnimation();
signals: signals:

View File

@@ -206,6 +206,9 @@
<height>64</height> <height>64</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Quit application.</string>
</property>
<property name="text"> <property name="text">
<string>Quit</string> <string>Quit</string>
</property> </property>
@@ -350,7 +353,7 @@
<string>motor</string> <string>motor</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Motoreinstellungen anzeigen und bearbeiten</string> <string>Show and edit motor settings.</string>
</property> </property>
</action> </action>
<action name="_batteryAction"> <action name="_batteryAction">
@@ -365,7 +368,7 @@
<string>battery</string> <string>battery</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Batterieeinstellungen anzeigen und bearbeiten</string> <string>Show and edit battery settings.</string>
</property> </property>
</action> </action>
<action name="_consoleAction"> <action name="_consoleAction">
@@ -380,7 +383,7 @@
<string>console</string> <string>console</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Konseleneinstellungen anzeigen und bearbeiten</string> <string>Show and edit console settings.</string>
</property> </property>
</action> </action>
<action name="_connectAction"> <action name="_connectAction">
@@ -395,7 +398,7 @@
<string>connect</string> <string>connect</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>TinyCAN native Treiber laden</string> <string>Load TinyCAN native driver.</string>
</property> </property>
<property name="menuRole"> <property name="menuRole">
<enum>QAction::MenuRole::TextHeuristicRole</enum> <enum>QAction::MenuRole::TextHeuristicRole</enum>
@@ -410,10 +413,10 @@
<string>sync</string> <string>sync</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Einstellungen vom eBike synchroniseren</string> <string>Synchronise with eBike settings.</string>
</property> </property>
<property name="menuRole"> <property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum> <enum>QAction::MenuRole::TextHeuristicRole</enum>
</property> </property>
</action> </action>
</widget> </widget>

View File

@@ -44,9 +44,6 @@ void BCThemeSwitchButton::toggleMode()
void BCThemeSwitchButton::updateIcon() void BCThemeSwitchButton::updateIcon()
{ {
// Logik:
// Ist Dark Mode an? Zeige Mond (oder Sonne, je nach Geschmack).
// Hier: Zeige das Symbol des AKTUELLEN Modus.
setText(_isDarkMode ? "🌙" : "☀️"); setText(_isDarkMode ? "🌙" : "☀️");
setToolTip(_isDarkMode ? "Zum LightMode wechseln" : "Zum DarkMode wechseln"); setToolTip(_isDarkMode ? "Use LightMode" : "Use DarkMode");
} }