Qt6 Migration: LtsWidgets, BUILD_RTI Guards, externe Dependencies dokumentiert
- LtsWidgets Verzeichnis vollständig migriert (Qt5→Qt6) - BUILD_RTI Guards für RTI-spezifische Module hinzugefügt - Externe Dependencies in EXTERNAL_DEPS.md dokumentiert - Qt6 API-Änderungen: QRegExp→QRegularExpression, enterEvent(QEnterEvent*) - AutoUic-Fehler bei ui_requirement behoben (SKIP_AUTOUIC) - Include-Pfade korrigiert (LtsElevation, LtsMultiMonitor, LtsUtilsCore) - MOC-Fehler behoben (Q_INTERFACES entfernt wo nicht benötigt) - CMakeLists.txt Anpassungen für Qt6 (PUBLIC statt INTERFACE) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
145 files changed
+17700
-14377
No files matched your search
@@ -1,12 +1,19 @@
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* SpinBox, that corrects values to a valid value that fits minimum() + n * singleStep() = value
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Malte Diers, NLSE, 2018-05-07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "lts_widgets_export.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QRegularExpression>
|
||||
#include "lts_widgets_export.h"
|
||||
#include <QSet>
|
||||
#include <QSpinBox>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
@@ -15,37 +22,39 @@ class LTSWIDGETS_EXPORT LtsMultiRangeSpinBox : public QSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LtsMultiRangeSpinBox(QWidget* parent = nullptr);
|
||||
public:
|
||||
explicit LtsMultiRangeSpinBox(QWidget *parent = nullptr);
|
||||
~LtsMultiRangeSpinBox() = default;
|
||||
|
||||
public slots:
|
||||
void setRanges(const QVector<QPair<int, int>>& ranges);
|
||||
|
||||
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;
|
||||
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);
|
||||
private:
|
||||
static QVector<QPair<int,int>> sortRanges(const QVector<QPair<int, int> > &ranges);
|
||||
|
||||
QValidator::State validateAll(QString &input, int &pos);
|
||||
//void buildRegex();
|
||||
int fixupValue(int value) const;
|
||||
int fixupValue(int value, bool higher) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
QVector<QPair<int, int>> m_rangesList;
|
||||
|
||||
int m_curVal = minimum();
|
||||
QRegularExpression m_regex;
|
||||
};
|
||||
|
||||
} // namespace LtsWidgets
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user