Language updates.
This commit is contained in:
@@ -47,27 +47,13 @@ BCDeviceView::BCDeviceView(QWidget *parent)
|
||||
_itemDelegate = new BCValueDelegate( _valueModel.getValueList(), this);
|
||||
setItemDelegateForColumn( 1, _itemDelegate );
|
||||
|
||||
/*
|
||||
setStyleSheet( R"(QTableView::item:selected
|
||||
{
|
||||
background-color: green;
|
||||
border: none;
|
||||
}
|
||||
QTableView:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
})");
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BCDeviceView::setDeviceID( BCDevice::ID deviceID )
|
||||
{
|
||||
_devideID = deviceID;
|
||||
_devideID = deviceID;
|
||||
}
|
||||
|
||||
BCDevice::ID BCDeviceView::deviceID() const
|
||||
|
||||
@@ -193,16 +193,16 @@ void BCMainWindow::initStatusBar()
|
||||
_statusBar->addPermanentWidget(themeBtn);
|
||||
connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark)
|
||||
{
|
||||
QString message = isDark ? "DarkMode aktiviert" : "LightMode aktiviert";
|
||||
_statusBar->showMessage( message, 3000);
|
||||
setApplicationStyleSheet( isDark ? cDarkModeStyle : cLightModeStyle );
|
||||
QString message = isDark ? "using DarkMode." : "using LightMode.";
|
||||
onShowMessage( message );
|
||||
setApplicationStyleSheet( isDark ? cDarkModeStyle : cLightModeStyle );
|
||||
|
||||
});
|
||||
|
||||
// Wir starten im light mode
|
||||
//themeBtn->setDarkMode( false );
|
||||
|
||||
_statusBar->showMessage("Bereit. (Dummy-Treiber eingestellt)");
|
||||
onShowMessage("Ready. (Using dummy driver)");
|
||||
|
||||
setApplicationStyleSheet(cLightModeStyle);
|
||||
|
||||
@@ -270,7 +270,7 @@ void BCMainWindow::onStartAnimation()
|
||||
void BCMainWindow::onDriverStateChanged( BCDriver::DriverState state, const QString& message )
|
||||
{
|
||||
Q_UNUSED(state)
|
||||
_statusBar->showMessage( message, 8000 );
|
||||
onShowMessage( message, 8000 );
|
||||
}
|
||||
|
||||
void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID )
|
||||
@@ -318,7 +318,7 @@ void BCMainWindow::onValueUpdated(BCDevice::ID deviceID, int index, BCValue::Fla
|
||||
void BCMainWindow::onEndOfProcessing()
|
||||
{
|
||||
_syncButton->setEnabled( true );
|
||||
_statusBar->showMessage( "Synchronisation abgeschlossen.", 3000 );
|
||||
onShowMessage( "Synchronization complete.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,7 +337,7 @@ void BCMainWindow::onSyncDeviceView()
|
||||
_syncButton->setEnabled( false );
|
||||
|
||||
QString devName = _currentPanel->property( cBCKeyHeaderLabel ).toString();
|
||||
_statusBar->showMessage( "Lese: " + devName, 5000 );
|
||||
onShowMessage( "Reading: " + devName );
|
||||
|
||||
for( const BCValuePtr& value : currentList )
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ public slots:
|
||||
void onEndOfProcessing();
|
||||
void onSyncDeviceView();
|
||||
|
||||
void onShowMessage( const QString& message, int timeOut=3000);
|
||||
void onShowMessage( const QString& message, int timeOut=4000);
|
||||
void onStartAnimation();
|
||||
|
||||
signals:
|
||||
|
||||
@@ -206,6 +206,9 @@
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Quit application.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Quit</string>
|
||||
</property>
|
||||
@@ -350,7 +353,7 @@
|
||||
<string>motor</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Motoreinstellungen anzeigen und bearbeiten</string>
|
||||
<string>Show and edit motor settings.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_batteryAction">
|
||||
@@ -365,7 +368,7 @@
|
||||
<string>battery</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Batterieeinstellungen anzeigen und bearbeiten</string>
|
||||
<string>Show and edit battery settings.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_consoleAction">
|
||||
@@ -380,7 +383,7 @@
|
||||
<string>console</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Konseleneinstellungen anzeigen und bearbeiten</string>
|
||||
<string>Show and edit console settings.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_connectAction">
|
||||
@@ -395,7 +398,7 @@
|
||||
<string>connect</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>TinyCAN native Treiber laden</string>
|
||||
<string>Load TinyCAN native driver.</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::TextHeuristicRole</enum>
|
||||
@@ -410,10 +413,10 @@
|
||||
<string>sync</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Einstellungen vom eBike synchroniseren</string>
|
||||
<string>Synchronise with eBike settings.</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::MenuRole::TextHeuristicRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
@@ -44,9 +44,6 @@ void BCThemeSwitchButton::toggleMode()
|
||||
|
||||
void BCThemeSwitchButton::updateIcon()
|
||||
{
|
||||
// Logik:
|
||||
// Ist Dark Mode an? Zeige Mond (oder Sonne, je nach Geschmack).
|
||||
// Hier: Zeige das Symbol des AKTUELLEN Modus.
|
||||
setText(_isDarkMode ? "🌙" : "☀️");
|
||||
setToolTip(_isDarkMode ? "Zum LightMode wechseln" : "Zum DarkMode wechseln");
|
||||
setToolTip(_isDarkMode ? "Use LightMode" : "Use DarkMode");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user