Minor updates.
This commit is contained in:
@@ -83,7 +83,8 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<ProgramDataBaseFileName></ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>
|
||||
</ProgramDataBaseFileName>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
@@ -212,13 +213,11 @@
|
||||
<ClCompile Include="bcvaluedelegate.cpp" />
|
||||
<ClCompile Include="bcvaluemodel.cpp" />
|
||||
<ClCompile Include="bcvalueslider.cpp" />
|
||||
<ClCompile Include="bcvaluesliderstyle.cpp" />
|
||||
<ClCompile Include="bcxmlloader.cpp" />
|
||||
<ClCompile Include="libwin\can_drv_win.c" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bcvaluesliderstyle.h" />
|
||||
<QtMoc Include="bc.h" />
|
||||
<QtMoc Include="bcdelightpmwidget.h" />
|
||||
<QtMoc Include="bcdeviceview.h" />
|
||||
|
||||
@@ -89,9 +89,6 @@
|
||||
<ClCompile Include="bcvalueslider.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bcvaluesliderstyle.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bcxmlloader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -103,9 +100,6 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bcvaluesliderstyle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<QtMoc Include="bc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <bcdeviceview.h>
|
||||
#include <bcvaluedelegate.h>
|
||||
#include <bcvalueslider.h>
|
||||
#include <bcvaluesliderstyle.h>
|
||||
|
||||
|
||||
BCValueDelegate::BCValueDelegate(const BCValueList& valueList, BCDeviceView* view)
|
||||
: QStyledItemDelegate{view}, _valueList{valueList}, _view{view}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include <bcvaluesliderstyle.h>
|
||||
#include <bcvalueslider.h>
|
||||
|
||||
|
||||
@@ -42,7 +41,8 @@ BCValueSlider::BCValueSlider( QWidget *parent )
|
||||
setupUi(this);
|
||||
|
||||
// wir wollen ja modern sein
|
||||
_slider->setStyle(new BCValueSliderStyle());
|
||||
_sliderStyle = std::make_unique<BCValueSliderStyle>();
|
||||
_slider->setStyle(_sliderStyle.get());
|
||||
setAutoFillBackground(true);
|
||||
|
||||
QSizePolicy sp = _commitButton->sizePolicy();
|
||||
|
||||
@@ -59,6 +59,7 @@ protected:
|
||||
static constexpr int cPaddingRight = 8;
|
||||
static constexpr int cSliderWidth = 117;
|
||||
|
||||
std::unique_ptr<BCValueSliderStyle> _sliderStyle;
|
||||
};
|
||||
|
||||
#endif // BC_VALUESLIDER_H
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
© 2025 -2026 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 <info@bigxionflasher.org>
|
||||
@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 BC_VALUESLIDERSTYLE_H
|
||||
#define BC_VALUESLIDERSTYLE_H
|
||||
|
||||
#include <QTableView>
|
||||
#include <QSlider>
|
||||
#include <QPainter>
|
||||
#include <QProxyStyle>
|
||||
|
||||
|
||||
// Fluent Design Slider Style
|
||||
class BCValueSliderStyle : public QProxyStyle
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
BCValueSliderStyle();
|
||||
|
||||
int pixelMetric(PixelMetric metric, const QStyleOption* option = nullptr, const QWidget* widget = nullptr) const override;
|
||||
|
||||
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex* opt, SubControl sc, const QWidget* widget) const override;
|
||||
void drawComplexControl(ComplexControl control, const QStyleOptionComplex* option, QPainter* painter, const QWidget* widget) const override;
|
||||
void drawHorizontalFluentSlider(QPainter* painter,
|
||||
const QStyleOptionSlider* slider,
|
||||
const QColor& activeColor,
|
||||
const QColor& bgColor) const;
|
||||
|
||||
static void paintSliderIndicator(QPainter* painter, const QRect& rect, double ratio );
|
||||
static void paintSliderIndicator2(QPainter* painter, const QRect& rect, double ratio );
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // BC_VALUESLIDERSTYLE_H
|
||||
Reference in New Issue
Block a user