- LtsWidgets: Fixed Qt6 API compatibility issues - QWheelEvent::delta() → angleDelta().y() - QStyleOption::init() → initFrom() - QComboBox activated signal signature change - QTextCodec removal (UTF-8 default in Qt6) - Missing widget includes added - LtsWebSocket: Fixed m_logger reference initialization - Added NGLLoggerBootstrap includes - Proper initialization in constructor initializer lists - CMake: Added BUILD_LTSWEBSOCKET option for temporary exclusion - Docker: RTI Connext permanent installation script added - ci/install-rti-in-docker.sh for persistent RTI setup - Removes need for volume mounting RTI into container - BUILD options: FilterManagement, RTI, Codification, Grantlee, LtsWebSocket can be disabled for partial builds during migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
|
|
|
|
#pragma once
|
|
#include "ltswidgets_export.h"
|
|
|
|
#include <QObject>
|
|
#include <QRegularExpression>
|
|
#include <QSet>
|
|
#include <QSpinBox>
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
class LTSWIDGETS_EXPORT LtsMultiRangeSpinBox : public QSpinBox
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LtsMultiRangeSpinBox(QWidget* parent = nullptr);
|
|
~LtsMultiRangeSpinBox() = default;
|
|
|
|
public slots:
|
|
void setRanges(const QVector<QPair<int, int>>& ranges);
|
|
void setRange(int min, int max);
|
|
void setMinimum(int min);
|
|
void setMaximum(int max);
|
|
|
|
protected:
|
|
QValidator::State validate(QString& input, int& pos) const override;
|
|
void fixup(QString& str) const override;
|
|
void focusOutEvent(QFocusEvent* event) override;
|
|
void wheelEvent(QWheelEvent* event) override;
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
void keyPressEvent(QKeyEvent* event) override;
|
|
|
|
private:
|
|
static QVector<QPair<int, int>> sortRanges(const QVector<QPair<int, int>>& ranges);
|
|
|
|
QValidator::State validateAll(QString& input, int& pos);
|
|
|
|
int fixupValue(int value) const;
|
|
int fixupValue(int value, bool higher) const;
|
|
|
|
private:
|
|
QVector<QPair<int, int>> m_rangesList;
|
|
|
|
int m_curVal = minimum();
|
|
QRegularExpression m_regex;
|
|
};
|
|
|
|
} // namespace LtsWidgets
|