umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

childwidgetplacementpin.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2016-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef CHILDWIDGETPLACEMENTPIN_H
12 #define CHILDWIDGETPLACEMENTPIN_H
13
14 #include "umlwidgets/childwidgetplacement.h"
15
22 class ChildWidgetPlacementPin : public ChildWidgetPlacement
23 {
24 public:
25 ChildWidgetPlacementPin(PinPortBase* widget);
26 virtual ~ChildWidgetPlacementPin();
27
28 virtual void detectConnectedSide();
29 virtual void setInitialPosition(const QPointF &scenePos = QPointF());
30 virtual void setNewPositionWhenMoved(qreal diffX, qreal diffY);
31 virtual void setNewPositionOnParentResize();
32
33 private:
34 bool isAboveParent() const;
35 bool isBelowParent() const;
36 bool isLeftOfParent() const;
37 bool isRightOfParent() const;
38 qreal getNewXOnJumpToTopOrBottom() const;
39 void jumpToTopOfParent();
40 void jumpToBottomOfParent();
41 qreal getNewYOnJumpToSide() const;
42 void jumpToLeftOfParent();
43 void jumpToRightOfParent();
44 };
45
46 #endif /* ! CHILDWIDGETPLACEMENTPIN_H */
47
48
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
ChildWidgetPlacement::Bottom
@ Bottom
Definition: childwidgetplacement.h:42
ChildWidgetPlacement::width
qreal width() const
Definition: childwidgetplacement.cpp:50
ChildWidgetPlacement::y
qreal y() const
Definition: childwidgetplacement.cpp:45
ChildWidgetPlacementPin::isLeftOfParent
bool isLeftOfParent() const
Definition: childwidgetplacementpin.cpp:111
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
ChildWidgetPlacement::Left
@ Left
Definition: childwidgetplacement.h:43
ChildWidgetPlacementPin::setInitialPosition
virtual void setInitialPosition(const QPointF &scenePos=QPointF())
Definition: childwidgetplacementpin.cpp:29
ChildWidgetPlacementPin::setNewPositionWhenMoved
virtual void setNewPositionWhenMoved(qreal diffX, qreal diffY)
Definition: childwidgetplacementpin.cpp:36
ChildWidgetPlacement::Top
@ Top
Definition: childwidgetplacement.h:40
ChildWidgetPlacement::Right
@ Right
Definition: childwidgetplacement.h:41
ChildWidgetPlacement::setY
void setY(qreal y)
Definition: childwidgetplacement.cpp:35
ChildWidgetPlacementPin::jumpToLeftOfParent
void jumpToLeftOfParent()
Definition: childwidgetplacementpin.cpp:143
ChildWidgetPlacement::setX
void setX(qreal x)
Definition: childwidgetplacement.cpp:30
ChildWidgetPlacement::setPos
void setPos(const QPointF &pos)
Definition: childwidgetplacement.cpp:20
childwidgetplacementpin.h
ChildWidgetPlacementPin::jumpToBottomOfParent
void jumpToBottomOfParent()
Definition: childwidgetplacementpin.cpp:132
ChildWidgetPlacementPin::setNewPositionOnParentResize
virtual void setNewPositionOnParentResize()
Definition: childwidgetplacementpin.cpp:90
ChildWidgetPlacement::x
qreal x() const
Definition: childwidgetplacement.cpp:40
childwidgetplacement.h
ChildWidgetPlacementPin::~ChildWidgetPlacementPin
virtual ~ChildWidgetPlacementPin()
Definition: childwidgetplacementpin.cpp:20
ChildWidgetPlacementPin::getNewXOnJumpToTopOrBottom
qreal getNewXOnJumpToTopOrBottom() const
Definition: childwidgetplacementpin.cpp:121
PinPortBase
Abstract base class for PinWidget and PortWidget.
Definition: pinportbase.h:28
ChildWidgetPlacement::ownerWidget
UMLWidget * ownerWidget() const
Definition: childwidgetplacement.cpp:60
umlwidget.h
ChildWidgetPlacement::height
qreal height() const
Definition: childwidgetplacement.cpp:55
ChildWidgetPlacementPin::isAboveParent
bool isAboveParent() const
Definition: childwidgetplacementpin.cpp:101
ChildWidgetPlacementPin::ChildWidgetPlacementPin
ChildWidgetPlacementPin(PinPortBase *widget)
Definition: childwidgetplacementpin.cpp:15
ChildWidgetPlacementPin::jumpToRightOfParent
void jumpToRightOfParent()
Definition: childwidgetplacementpin.cpp:149
ChildWidgetPlacementPin::detectConnectedSide
virtual void detectConnectedSide()
Definition: childwidgetplacementpin.cpp:24
ChildWidgetPlacement
Base class for child widget placement.
Definition: childwidgetplacement.h:27
ChildWidgetPlacementPin::getNewYOnJumpToSide
qreal getNewYOnJumpToSide() const
Definition: childwidgetplacementpin.cpp:138
ChildWidgetPlacementPin::isRightOfParent
bool isRightOfParent() const
Definition: childwidgetplacementpin.cpp:116
ChildWidgetPlacementPin::jumpToTopOfParent
void jumpToTopOfParent()
Definition: childwidgetplacementpin.cpp:126
ChildWidgetPlacement::m_connectedSide
ConnectedSide m_connectedSide
Definition: childwidgetplacement.h:61
ChildWidgetPlacementPin
Child widget placement attached to parent.
Definition: childwidgetplacementpin.h:23
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
ChildWidgetPlacementPin::isBelowParent
bool isBelowParent() const
Definition: childwidgetplacementpin.cpp:106