Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+43
-32
@@ -1,11 +1,9 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
||||
#include "ltswidgets_export.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSpinBox>
|
||||
|
||||
namespace LtsWidgets
|
||||
@@ -13,49 +11,62 @@ namespace LtsWidgets
|
||||
|
||||
class LTSWIDGETS_EXPORT LtsSpinBox : public QSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LtsSpinBox(QWidget *parent = nullptr);
|
||||
~LtsSpinBox() = default;
|
||||
public:
|
||||
explicit LtsSpinBox(QWidget* parent = nullptr);
|
||||
~LtsSpinBox() = default;
|
||||
|
||||
public slots:
|
||||
void setValue(int val) { QString valStr = QString::number(val); fixup(valStr); QSpinBox::setValue(valStr.toInt()); }
|
||||
bool setExclusionRanges(const QVector<QPair<int,int> > &exclusionRanges, bool preserveCurrentValues = false);
|
||||
bool addExclusionRange(int min, int max);
|
||||
void clearExclusionRanges();
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
QValidator::State validate(QString &input, int &pos) const override;
|
||||
void fixup(QString &str) const override;
|
||||
void setValue(int val)
|
||||
{
|
||||
QString valStr = QString::number(val);
|
||||
fixup(valStr);
|
||||
QSpinBox::setValue(valStr.toInt());
|
||||
}
|
||||
|
||||
private:
|
||||
bool setExclusionRanges(const QVector<QPair<int, int>>& exclusionRanges, bool preserveCurrentValues = false);
|
||||
bool addExclusionRange(int min, int max);
|
||||
void clearExclusionRanges();
|
||||
|
||||
struct
|
||||
{
|
||||
bool operator()(const QPair<int,int> &a, const QPair<int,int> &b) const { return a.first < b.first; }
|
||||
} customless;
|
||||
protected:
|
||||
QValidator::State validate(QString& input, int& pos) const override;
|
||||
void fixup(QString& str) const override;
|
||||
|
||||
QVector<QPair<int,int> > m_exclusions;
|
||||
QVector<QPair<int,int> > m_validRanges;
|
||||
private:
|
||||
struct
|
||||
{
|
||||
bool operator()(const QPair<int, int>& a, const QPair<int, int>& b) const
|
||||
{
|
||||
return a.first < b.first;
|
||||
}
|
||||
} customless;
|
||||
|
||||
QVector<QPair<int, int>> m_exclusions;
|
||||
QVector<QPair<int, int>> m_validRanges;
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT LtsDoubleSpinBox : public QDoubleSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LtsDoubleSpinBox(QWidget *parent = nullptr);
|
||||
~LtsDoubleSpinBox() = default;
|
||||
public:
|
||||
explicit LtsDoubleSpinBox(QWidget* parent = nullptr);
|
||||
~LtsDoubleSpinBox() = default;
|
||||
|
||||
public slots:
|
||||
void setValue(double val) { QString valStr = QString::number(val); fixup(valStr); QDoubleSpinBox::setValue(valStr.toDouble()); }
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
QValidator::State validate(QString &input, int &pos) const override;
|
||||
void fixup(QString &str) const override;
|
||||
void setValue(double val)
|
||||
{
|
||||
QString valStr = QString::number(val);
|
||||
fixup(valStr);
|
||||
QDoubleSpinBox::setValue(valStr.toDouble());
|
||||
}
|
||||
|
||||
protected:
|
||||
QValidator::State validate(QString& input, int& pos) const override;
|
||||
void fixup(QString& str) const override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LtsWidgets
|
||||
Reference in new issue
Block a user