2 * Copyright 2015-2016, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
6 #include "TableCellIntegerEditor.h"
12 #include "IntegerValue.h"
13 #include "ValueFormatter.h"
16 TableCellIntegerEditor::TableCellIntegerEditor(::Value
* initialValue
,
17 ValueFormatter
* formatter
)
19 TableCellTextControlEditor(initialValue
, formatter
)
24 TableCellIntegerEditor::~TableCellIntegerEditor()
30 TableCellIntegerEditor::ValidateInput() const
32 BVariant variantValue
;
33 if (!InitialValue()->ToVariant(variantValue
))
36 return GetValueFormatter()->ValidateFormattedValue(Text(),
42 TableCellIntegerEditor::GetValueForInput(::Value
*& _output
) const
44 BVariant variantValue
;
45 if (!InitialValue()->ToVariant(variantValue
))
48 return GetValueFormatter()->GetValueFromFormattedInput(Text(),
49 variantValue
.Type(), _output
);