diff --git a/bc.cpp b/bc.cpp index 196c27a..95fa051 100644 --- a/bc.cpp +++ b/bc.cpp @@ -1,3 +1,34 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + #include #include diff --git a/bc.h b/bc.h index af5c2df..6744cd7 100644 --- a/bc.h +++ b/bc.h @@ -1,31 +1,34 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ -***************************************************************************/ #ifndef BC_H diff --git a/bccandriver.cpp b/bccandriver.cpp index 167246f..a6bc081 100644 --- a/bccandriver.cpp +++ b/bccandriver.cpp @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #include #include diff --git a/bccandriver.h b/bccandriver.h index a74b7cd..0107e64 100644 --- a/bccandriver.h +++ b/bccandriver.h @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #ifndef BCCANDRIVER_H #define BCCANDRIVER_H diff --git a/bccandrivertinycan.cpp b/bccandrivertinycan.cpp index 002c598..f8c7f2f 100644 --- a/bccandrivertinycan.cpp +++ b/bccandrivertinycan.cpp @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #include #include diff --git a/bccandrivertinycan.h b/bccandrivertinycan.h index 3af404e..6236b18 100644 --- a/bccandrivertinycan.h +++ b/bccandrivertinycan.h @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #ifndef BCCANDRIVERTINYCAN_H #define BCCANDRIVERTINYCAN_H diff --git a/bcdatamanager.cpp b/bcdatamanager.cpp index 11e5f57..3dc5d6d 100644 --- a/bcdatamanager.cpp +++ b/bcdatamanager.cpp @@ -1,29 +1,31 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo ***************************************************************************/ diff --git a/bcdatamanager.h b/bcdatamanager.h index 8fd3f3d..ba67244 100644 --- a/bcdatamanager.h +++ b/bcdatamanager.h @@ -4,7 +4,10 @@ Copyright © 2025 christoph holzheuer christoph.holzheuer@gmail.com - Using: + Using: mhs_can_drv.c +© 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany +Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de BigXionFlasher USB V 0.2.4 rev. 97 © 2011-2013 by Thomas Koenig @@ -30,6 +33,37 @@ #ifndef BCDATAMANAGER_H #define BCDATAMANAGER_H +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + #include #include diff --git a/bcdatamodel.cpp b/bcdatamodel.cpp index 518605e..9f04c43 100644 --- a/bcdatamodel.cpp +++ b/bcdatamodel.cpp @@ -1,29 +1,31 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo ***************************************************************************/ diff --git a/bcdatamodel.h b/bcdatamodel.h index bc3c331..f0a353e 100644 --- a/bcdatamodel.h +++ b/bcdatamodel.h @@ -1,33 +1,36 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo ***************************************************************************/ + #ifndef BCDATAMODEL_H #define BCDATAMODEL_H diff --git a/bcdatavalue.cpp b/bcdatavalue.cpp index 67bb860..71d5517 100644 --- a/bcdatavalue.cpp +++ b/bcdatavalue.cpp @@ -1,32 +1,35 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo ***************************************************************************/ + #include #include diff --git a/bcdatavalue.h b/bcdatavalue.h index 1975d62..1016ac5 100644 --- a/bcdatavalue.h +++ b/bcdatavalue.h @@ -1,29 +1,31 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo ***************************************************************************/ diff --git a/bcitemdelegate.cpp b/bcitemdelegate.cpp index 5ff28c7..95b9772 100644 --- a/bcitemdelegate.cpp +++ b/bcitemdelegate.cpp @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #include #include #include diff --git a/bcitemdelegate.h b/bcitemdelegate.h index 02f0f13..f077ef1 100644 --- a/bcitemdelegate.h +++ b/bcitemdelegate.h @@ -1,3 +1,34 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + #ifndef BCITEMDELEGATE_H #define BCITEMDELEGATE_H diff --git a/bcmainwindow.cpp b/bcmainwindow.cpp index 3763147..36e58ba 100644 --- a/bcmainwindow.cpp +++ b/bcmainwindow.cpp @@ -1,51 +1,66 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ -***************************************************************************/ #include #include #include +/** + * @brief Das Mainwindow erzeugen + * @param parent + */ BCMainWindow::BCMainWindow(QWidget *parent) : QMainWindow(parent) { setupUi(this); + // Die actions an die Buttons binden _motorButton->setDefaultAction( _motorAction); _consoleButton->setDefaultAction( _consoleAction ); _batteryButton->setDefaultAction( _batteryAction ); _pimpButton->setDefaultAction( _pimpAction); - _valueManager.loadXmlBikeData(); - auto model = _valueManager.getModel( BCDevice::ID::Console ); -/* + // die Daten des eBikes laden + _dataManager.loadXmlBikeData(); + + // Die Daten und auch die Datenmodelle für die Views werden + // vom DataManager verwaltet und an die Views weitergereicht. + + auto model = _dataManager.getModel( BCDevice::ID::Console ); + _consolePanel->getValueView()->setModel( model.v ); + + /* if( model) { _valueView->setModel( *model ); @@ -68,13 +83,13 @@ BCMainWindow::BCMainWindow(QWidget *parent) // Highlight mit Fade-Out: //_delegate->onHighlightRow(2); // 2 Sekunden Fade - BCTransmitter* transmitter = _valueManager.getTransmitter(); + BCTransmitter* transmitter = _dataManager.getTransmitter(); // besser: model::emit dataChanged // also: emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole, ValueRole}); - connect( &_valueManager, &BCDataManager::valueTouched, _delegate, &BCItemDelegate::onHighlightRow ); + connect( &_dataManager, &BCDataManager::valueTouched, _delegate, &BCItemDelegate::onHighlightRow ); connect( _connectButton, &QPushButton::clicked, transmitter, &BCTransmitter::onToggleConnectionState ); - connect( _syncButton, &QPushButton::clicked, &_valueManager, &BCDataManager::onSyncFromDevice ); + connect( _syncButton, &QPushButton::clicked, &_dataManager, &BCDataManager::onSyncFromDevice ); */ } @@ -82,10 +97,38 @@ BCMainWindow::BCMainWindow(QWidget *parent) BCMainWindow::~BCMainWindow() { + } +void BCMainWindow::initData() +{ + // Die Daten und auch die Datenmodelle für die Views werden + // vom DataManager verwaltet und an die Views weitergereicht. + + auto setDeviceModel = [&]( BCDevice::ID deviceID, BCDevicePanel* panel ) + { + auto model = _dataManager.getModel( deviceID ); + if( model) + { + QAbstractItemView* valueView = panel->getValueView(); + valueView->setModel( *model ); + //valueView->resizeColumnsToContents(); + //_valueView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); + } + + + }; + + + _dataManager.loadXmlBikeData(); + + + + + +} void BCMainWindow::onConnectButtonToggled(bool checked ) { - //_valueManager.setDriverConnectionState( checked ); + //_dataManager.setDriverConnectionState( checked ); } diff --git a/bcmainwindow.h b/bcmainwindow.h index ff7f7c2..7e2d003 100644 --- a/bcmainwindow.h +++ b/bcmainwindow.h @@ -1,31 +1,34 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ -***************************************************************************/ #ifndef BCMAINWINDOW_H #define BCMAINWINDOW_H @@ -53,7 +56,9 @@ public slots: protected: - BCDataManager _valueManager; + void initData(); + + BCDataManager _dataManager; AnimatedDelegate* _delegate; diff --git a/bcmainwindow.ui b/bcmainwindow.ui index 2058eec..86ca614 100644 --- a/bcmainwindow.ui +++ b/bcmainwindow.ui @@ -22,88 +22,79 @@ - - - background-color: #aaaaaa; + + + + 64 + 64 + + + + ... + + + + 64 + 64 + + + + + + + + + 64 + 64 + + + + ... + + + + 64 + 64 + + + + + + + + + 64 + 64 + + + + ... + + + + 64 + 64 + + + + + + + + + 64 + 64 + + + + ... + + + + 64 + 64 + - - - - - - 64 - 64 - - - - ... - - - - 64 - 64 - - - - - - - - - 64 - 64 - - - - ... - - - - 64 - 64 - - - - - - - - - 64 - 64 - - - - ... - - - - 64 - 64 - - - - - - - - - 64 - 64 - - - - ... - - - - 64 - 64 - - - - - @@ -114,11 +105,18 @@ 20 - 227 + 239 + + + + Sync + + + @@ -129,13 +127,6 @@ - - - - Sync - - - diff --git a/bctransmitter.cpp b/bctransmitter.cpp index bb58187..f03b747 100644 --- a/bctransmitter.cpp +++ b/bctransmitter.cpp @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #include #include diff --git a/bctransmitter.h b/bctransmitter.h index 7424304..07f3d96 100644 --- a/bctransmitter.h +++ b/bctransmitter.h @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #ifndef BCTRANSMITTER_H #define BCTRANSMITTER_H diff --git a/bcvaluetype.cpp b/bcvaluetype.cpp index c593531..6db8210 100644 --- a/bcvaluetype.cpp +++ b/bcvaluetype.cpp @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #include #include diff --git a/bcvaluetype.h b/bcvaluetype.h index 9cc05c0..2d7b48b 100644 --- a/bcvaluetype.h +++ b/bcvaluetype.h @@ -1,3 +1,35 @@ +/*************************************************************************** + + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com + + Using: + + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de + + Based on Bionx data type descriptions from: + + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org + + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ + + #ifndef BCVALUETYPE_H #define BCVALUETYPE_H diff --git a/doc/material_dummy/.qtcreator/material_dummy.pro.user b/doc/material_dummy/.qtcreator/material_dummy.pro.user index 52966d2..9ae5e20 100644 --- a/doc/material_dummy/.qtcreator/material_dummy.pro.user +++ b/doc/material_dummy/.qtcreator/material_dummy.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/main.cpp b/main.cpp index 60c699b..7fce12d 100644 --- a/main.cpp +++ b/main.cpp @@ -1,31 +1,33 @@ /*************************************************************************** - BionxControl - Copyright © 2025 christoph holzheuer - christoph.holzheuer@gmail.com + BionxControl + Copyright © 2025 christoph holzheuer + christoph.holzheuer@gmail.com - Using: + Using: - BigXionFlasher USB V 0.2.4 rev. 97 - © 2011-2013 by Thomas Koenig - @see www.bigxionflasher.org + mhs_can_drv.c + © 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany + Klaus Demlehner, klaus@mhs-elektronik.de + @see www.mhs-elektronik.de - Bionx Bike Info - © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) - @see www.ts-soft.de + Based on Bionx data type descriptions from: - mhs_can_drv.c 3.00 - © 2011 - 2015 by MHS-Elektronik GmbH & Co. KG, Germany - Demlehner Klaus, info@mhs-elektronik.de - @see www.mhs-elektronik.de + BigXionFlasher USB V 0.2.4 rev. 97 + © 2011-2013 by Thomas Koenig + @see www.bigxionflasher.org - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - @see https://github.com/bikemike/bionx-bikeinfo + Bionx Bike Info + © 2018 Thorsten Schmidt (tschmidt@ts-soft.de) + @see www.ts-soft.de -***************************************************************************/ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + @see https://github.com/bikemike/bionx-bikeinfo + + ***************************************************************************/ #include