Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan, LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor, LtsPluginManager, LtsPrinting, LtsProjectionWorkstation, LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic, LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13 subdirectories actually built remain. TrainingAreaBase: drop sources of targets excluded by IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer, svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7 plugin directories not added in the release path (AdlerJson, ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only tabTelegrams, svcTabCommon and the TetraJson plugin are compiled. Cross-checked: no kept compiled source includes headers from the removed modules (GuiPluginInterface - the only LtsWidgets consumer - is itself NOT RELEASE_BUILD-guarded).
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
/**
|
|
* @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 <QtCore/QSet>
|
|
#include <QtWidgets/QSpinBox>
|
|
#include <QtCore/QRegularExpression>
|
|
|
|
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);
|
|
//void buildRegex();
|
|
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;
|
|
};
|
|
|
|
|
|
|
|
}
|