Files
BionxControl/bcmainwindow.h

90 lines
2.2 KiB
C
Raw Normal View History

2025-12-15 20:57:09 +01:00
/***************************************************************************
2025-12-26 14:07:55 +01:00
BionxControl
Copyright © 2025 christoph holzheuer
christoph.holzheuer@gmail.com
2025-12-15 20:57:09 +01:00
2025-12-26 14:07:55 +01:00
Using:
2025-12-15 20:57:09 +01:00
2025-12-26 14:07:55 +01:00
mhs_can_drv.c
© 2011 - 2023 by MHS-Elektronik GmbH & Co. KG, Germany
Klaus Demlehner, klaus@mhs-elektronik.de
@see www.mhs-elektronik.de
2025-12-15 20:57:09 +01:00
2025-12-26 14:07:55 +01:00
Based on Bionx data type descriptions from:
2025-12-15 20:57:09 +01:00
2025-12-26 14:07:55 +01:00
BigXionFlasher USB V 0.2.4 rev. 97
© 2011-2013 by Thomas Koenig <info@bigxionflasher.org>
@see www.bigxionflasher.org
2025-12-15 20:57:09 +01:00
2025-12-26 14:07:55 +01:00
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
***************************************************************************/
2025-12-15 20:57:09 +01:00
#ifndef BCMAINWINDOW_H
#define BCMAINWINDOW_H
#include <QMainWindow>
2025-12-16 22:42:35 +01:00
#include <ui_bcmainwindow.h>
2025-12-23 20:47:03 +01:00
#include <bcdatamanager.h>
2025-12-16 22:42:35 +01:00
2025-12-26 23:09:53 +01:00
class BCDevicePanel;
2025-12-15 20:57:09 +01:00
2025-12-16 22:42:35 +01:00
class BCMainWindow : public QMainWindow, public Ui_BCMainWindow
2025-12-15 20:57:09 +01:00
{
Q_OBJECT
public:
BCMainWindow(QWidget *parent = nullptr);
virtual ~BCMainWindow();
2025-12-15 20:57:09 +01:00
2025-12-16 22:42:35 +01:00
public slots:
2025-12-27 18:43:15 +01:00
//void onValueListReady( BCDevice::ID deviceID );
2025-12-26 23:09:53 +01:00
void onShowDevicePanel( BCDevice::ID deviceID );
void onActionButtonTriggered( bool checked);
void onActionButtonToggled( bool checked);
void onConnectButtonToggled(bool active );
// Slots für Rückmeldungen vom Runner
void onCommandFinished(int id, bool success);
void onRunnerMessage(const QString &msg);
void onSyncFromDevice();
signals:
// Internes Signal, um Daten an den Worker Thread zu senden
void sendValueCommand( BC::OpID, const BCDataValue* cmd);
//void valuedTouched(const BCDataValue& cmd);
void valueTouched(int rowInModel );
2025-12-16 22:42:35 +01:00
protected:
void initMainWindow();
2025-12-26 14:07:55 +01:00
BCDataManager _dataManager;
2025-12-16 22:42:35 +01:00
2025-12-26 23:09:53 +01:00
// Wir brauchen eine Verbindung zwischen den Views
// und dem Device, das sie darstellen.
using BCDevicePanels = QMap<BCDevice::ID, BCDevicePanel*>;
BCDevicePanels _devicePanels;
2025-12-26 23:37:15 +01:00
BCDevicePanel* _currentPanel{};
2025-12-15 20:57:09 +01:00
QThread _worker;
BCTransmitter _transmitter;
2025-12-15 20:57:09 +01:00
};
#endif // BCMAINWINDOW_H