mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
ElementEditor: partterminal.cpp code style
This commit is contained in:
committed by
Laurent Trinques
parent
ac5ec020a6
commit
3b4237f21f
@@ -96,8 +96,7 @@ void PartTerminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, Q
|
||||
* @brief PartTerminal::shape
|
||||
* @return the shape of this item
|
||||
*/
|
||||
QPainterPath PartTerminal::shape() const
|
||||
{
|
||||
QPainterPath PartTerminal::shape() const {
|
||||
QPainterPath shape;
|
||||
shape.lineTo(d -> second_point);
|
||||
|
||||
@@ -111,8 +110,7 @@ QPainterPath PartTerminal::shape() const
|
||||
* @brief PartTerminal::boundingRect
|
||||
* @return the bounding rect of this item
|
||||
*/
|
||||
QRectF PartTerminal::boundingRect() const
|
||||
{
|
||||
QRectF PartTerminal::boundingRect() const {
|
||||
QRectF br(QPointF(0, 0), d -> second_point);
|
||||
br = br.normalized();
|
||||
|
||||
@@ -125,8 +123,7 @@ QRectF PartTerminal::boundingRect() const
|
||||
Definit l'orientation de la borne
|
||||
@param ori la nouvelle orientation de la borne
|
||||
*/
|
||||
void PartTerminal::setOrientation(Qet::Orientation ori)
|
||||
{
|
||||
void PartTerminal::setOrientation(Qet::Orientation ori) {
|
||||
if (d -> m_orientation == ori) return;
|
||||
prepareGeometryChange();
|
||||
d -> m_orientation = ori;
|
||||
@@ -137,15 +134,13 @@ void PartTerminal::setOrientation(Qet::Orientation ori)
|
||||
@brief PartTerminal::setName
|
||||
@param name
|
||||
*/
|
||||
void PartTerminal::setName(QString& name)
|
||||
{
|
||||
void PartTerminal::setName(QString& name) {
|
||||
if (d -> m_name == name) return;
|
||||
d -> m_name = name;
|
||||
emit nameChanged();
|
||||
}
|
||||
|
||||
void PartTerminal::setNewUuid()
|
||||
{
|
||||
void PartTerminal::setNewUuid() {
|
||||
d -> m_uuid = QUuid::createUuid();
|
||||
}
|
||||
|
||||
@@ -196,6 +191,7 @@ void PartTerminal::startUserTransformation(const QRectF &initial_selection_rect)
|
||||
Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect
|
||||
*/
|
||||
void PartTerminal::handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) {
|
||||
QPointF mapped_point = mapPoints(initial_selection_rect, new_selection_rect, QList<QPointF>() << saved_position_).first();
|
||||
QPointF mapped_point = mapPoints(
|
||||
initial_selection_rect, new_selection_rect, QList<QPointF>() << saved_position_).first();
|
||||
setPos(mapped_point);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user