partitionmanager/src/gui/formattedspinbox.h

27 lines
558 B
C
Raw Normal View History

2020-09-16 00:35:12 +01:00
/*
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#if !defined(FORMATTEDSPINBOX_H)
#define FORMATTEDSPINBOX_H
#include <QDoubleSpinBox>
class FormattedSpinBox : public QDoubleSpinBox
{
public:
2019-12-09 16:33:04 +00:00
explicit FormattedSpinBox(QWidget* parent = nullptr) : QDoubleSpinBox(parent) {}
public:
2016-05-17 18:03:28 +01:00
QString textFromValue(double value) const override;
double valueFromText(const QString& text) const override;
private:
2022-01-18 20:30:48 +00:00
QString stripped(const QString &t, int *pos = nullptr) const;
};
#endif