[Companion] Unix format used everywhere

This commit is contained in:
Bertrand Songis
2016-11-23 16:42:24 +01:00
parent b0f5b646af
commit d5e4f7b6e9
32 changed files with 4331 additions and 4331 deletions
+27 -27
View File
@@ -18,30 +18,30 @@
* GNU General Public License for more details.
*/
#include "hexspinbox.h"
HexSpinBox::HexSpinBox(QWidget *parent):
QSpinBox(parent)
{
validator = new QRegExpValidator(QRegExp("[0-9A-Fa-f]{1,8}"), this);
}
QValidator::State HexSpinBox::validate(QString &text, int &pos) const
{
return validator->validate(text, pos);
}
int HexSpinBox::valueFromText(const QString &text) const
{
return text.toInt(0, 16);
}
QString HexSpinBox::textFromValue(int value) const
{
QString text;
text.sprintf("%04X", value);
return text;
}
#include "hexspinbox.h"
HexSpinBox::HexSpinBox(QWidget *parent):
QSpinBox(parent)
{
validator = new QRegExpValidator(QRegExp("[0-9A-Fa-f]{1,8}"), this);
}
QValidator::State HexSpinBox::validate(QString &text, int &pos) const
{
return validator->validate(text, pos);
}
int HexSpinBox::valueFromText(const QString &text) const
{
return text.toInt(0, 16);
}
QString HexSpinBox::textFromValue(int value) const
{
QString text;
text.sprintf("%04X", value);
return text;
}