change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+19 -19
View File
@@ -20,44 +20,44 @@
#include "decimalsliderbase.h"
namespace olive {
namespace olive
{
#define super NumericSliderBase
DecimalSliderBase::DecimalSliderBase(QWidget *parent) :
super(parent),
decimal_places_(2),
autotrim_decimal_places_(false)
DecimalSliderBase::DecimalSliderBase(QWidget *parent)
: super(parent)
, decimal_places_(2)
, autotrim_decimal_places_(false)
{
}
void DecimalSliderBase::SetAutoTrimDecimalPlaces(bool e)
{
autotrim_decimal_places_ = e;
autotrim_decimal_places_ = e;
UpdateLabel();
UpdateLabel();
}
QString DecimalSliderBase::FloatToString(double val, int decimal_places, bool autotrim_decimal_places)
QString DecimalSliderBase::FloatToString(double val, int decimal_places,
bool autotrim_decimal_places)
{
QString s = QString::number(val, 'f', decimal_places);
QString s = QString::number(val, 'f', decimal_places);
if (autotrim_decimal_places) {
while (s.endsWith('0')
&& s.at(s.size() - 2).isDigit()) {
s = s.left(s.size() - 1);
}
}
if (autotrim_decimal_places) {
while (s.endsWith('0') && s.at(s.size() - 2).isDigit()) {
s = s.left(s.size() - 1);
}
}
return s;
return s;
}
void DecimalSliderBase::SetDecimalPlaces(int i)
{
decimal_places_ = i;
decimal_places_ = i;
UpdateLabel();
UpdateLabel();
}
}