git-svn-id: svn://db.shs.com.ru/libs@334 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -149,6 +149,7 @@ QVariantEdit::QVariantEdit(QWidget * parent): QWidget(parent) {
|
||||
_list = 0;
|
||||
_date = 0;
|
||||
_spin = 0;
|
||||
_espin = 0;
|
||||
_rect = 0;
|
||||
_point = 0;
|
||||
_path = 0;
|
||||
@@ -222,11 +223,11 @@ void QVariantEdit::_recreate(const QVariant & new_value) {
|
||||
connect(_spin, SIGNAL(valueChanged(double)), this, SLOT(_changed()));
|
||||
break;
|
||||
case QVariant::Double:
|
||||
_spin = new QDoubleSpinBox(this);
|
||||
_spin->setDecimals(5);
|
||||
_spin->setRange(-1E+199, 1E+199);
|
||||
_cur_edit = _spin;
|
||||
connect(_spin, SIGNAL(valueChanged(double)), this, SLOT(_changed()));
|
||||
_espin = new EvalSpinBox(this);
|
||||
//_spin->setDecimals(5);
|
||||
//_spin->setRange(-1E+199, 1E+199);
|
||||
_cur_edit = _espin;
|
||||
connect(_espin, SIGNAL(valueChanged(double)), this, SLOT(_changed()));
|
||||
break;
|
||||
case QVariant::Color:
|
||||
_color = new ColorButton(this);
|
||||
@@ -321,7 +322,7 @@ QVariant QVariantEdit::value() const {
|
||||
case QVariant::UInt: return (unsigned int)(_spin->value());
|
||||
case QVariant::LongLong: return qlonglong(_spin->value());
|
||||
case QVariant::ULongLong: return qulonglong(_spin->value());
|
||||
case QVariant::Double: return double(_spin->value());
|
||||
case QVariant::Double: return _espin->value();
|
||||
case QVariant::Color: return _color->color();
|
||||
case QVariant::String: return _line->text();
|
||||
case QVariant::StringList: return _list->value();
|
||||
@@ -372,6 +373,7 @@ void QVariantEdit::setValue(const QVariant & v) {
|
||||
if (_list) {_list->setValue(v.toStringList());}
|
||||
if (_date) {_date->setDateTime(v.toDateTime());}
|
||||
if (_spin) {_spin->setValue(v.toDouble());}
|
||||
if (_espin) {_espin->setValue(v.toDouble());}
|
||||
if (_rect) {_rect->setValue(v.toRectF());}
|
||||
if (_point) {_point->setValue(v.toPointF());}
|
||||
if (_path) {
|
||||
@@ -394,6 +396,7 @@ void QVariantEdit::_delete() {
|
||||
_list = 0;
|
||||
_date = 0;
|
||||
_spin = 0;
|
||||
_espin = 0;
|
||||
_rect = 0;
|
||||
_point = 0;
|
||||
_path = 0;
|
||||
|
||||
Reference in New Issue
Block a user