mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Improve Basic shapes Properties size function replace QSpinBox by QDoublespinBox, int to double
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4296 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -459,7 +459,7 @@ bool QetShapeItem::fromXml(const QDomElement &e)
|
|||||||
|
|
||||||
is_movable_ = (e.attribute("is_movable").toInt());
|
is_movable_ = (e.attribute("is_movable").toInt());
|
||||||
m_pen.setStyle(Qt::PenStyle(e.attribute("style","0").toInt()));
|
m_pen.setStyle(Qt::PenStyle(e.attribute("style","0").toInt()));
|
||||||
m_pen.setWidthF(e.attribute("shape_size", QString::number(shape_size)).toInt());
|
m_pen.setWidthF(e.attribute("shape_size", QString::number(shape_size)).toDouble());
|
||||||
|
|
||||||
QString type = e.attribute("type");
|
QString type = e.attribute("type");
|
||||||
//Compatibility for version older than N°4075, shape type was stored with an int
|
//Compatibility for version older than N°4075, shape type was stored with an int
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class QetShapeItem : public QetGraphicsItem
|
|||||||
bool m_hovered,
|
bool m_hovered,
|
||||||
m_mouse_grab_handler;
|
m_mouse_grab_handler;
|
||||||
int m_vector_index;
|
int m_vector_index;
|
||||||
int shape_size;
|
double shape_size;
|
||||||
QetGraphicsHandlerUtility m_handler;
|
QetGraphicsHandlerUtility m_handler;
|
||||||
};
|
};
|
||||||
#endif // QETSHAPEITEM_H
|
#endif // QETSHAPEITEM_H
|
||||||
|
|||||||
@@ -134,10 +134,10 @@ bool ShapeGraphicsItemPropertiesWidget::setLiveEdit(bool live_edit)
|
|||||||
|
|
||||||
if (m_live_edit){
|
if (m_live_edit){
|
||||||
connect (ui->m_style_cb, SIGNAL(activated(int)), this, SLOT(apply()));
|
connect (ui->m_style_cb, SIGNAL(activated(int)), this, SLOT(apply()));
|
||||||
connect (ui->m_size_cb, SIGNAL(valueChanged(int)), this, SLOT(apply()));
|
connect (ui->m_size_cb, SIGNAL(valueChanged(double)), this, SLOT(apply()));
|
||||||
}else
|
}else
|
||||||
disconnect (ui->m_style_cb, SIGNAL(activated(int)), this, SLOT(apply()));
|
disconnect (ui->m_style_cb, SIGNAL(activated(int)), this, SLOT(apply()));
|
||||||
disconnect (ui->m_size_cb, SIGNAL(valueChanged(int)), this, SLOT(apply()));
|
disconnect (ui->m_size_cb, SIGNAL(valueChanged(double)), this, SLOT(apply()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,19 +61,28 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item alignment="Qt::AlignRight">
|
||||||
<widget class="QSpinBox" name="m_size_cb">
|
<widget class="QDoubleSpinBox" name="m_size_cb">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777212</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="correctionMode">
|
<property name="correctionMode">
|
||||||
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
|
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<double>0.400000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>20</number>
|
<double>50.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.200000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>1</number>
|
<double>1.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user