umbrello: umbrello/umlwidgets/childwidgetplacementpin.h Source File

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
childwidgetplacement.h
ChildWidgetPlacementPin
Child widget placement attached to parent.
Definition: childwidgetplacementpin.h:23
ChildWidgetPlacementPin::isAboveParent
bool isAboveParent() const
Definition: childwidgetplacementpin.cpp:101
ChildWidgetPlacementPin::jumpToTopOfParent
void jumpToTopOfParent()
Definition: childwidgetplacementpin.cpp:126
ChildWidgetPlacementPin::ChildWidgetPlacementPin
ChildWidgetPlacementPin(PinPortBase *widget)
Definition: childwidgetplacementpin.cpp:15
ChildWidgetPlacementPin::detectConnectedSide
virtual void detectConnectedSide()
Definition: childwidgetplacementpin.cpp:24
ChildWidgetPlacementPin::jumpToLeftOfParent
void jumpToLeftOfParent()
Definition: childwidgetplacementpin.cpp:143
ChildWidgetPlacementPin::jumpToBottomOfParent
void jumpToBottomOfParent()
Definition: childwidgetplacementpin.cpp:132
ChildWidgetPlacementPin::jumpToRightOfParent
void jumpToRightOfParent()
Definition: childwidgetplacementpin.cpp:149
ChildWidgetPlacementPin::~ChildWidgetPlacementPin
virtual ~ChildWidgetPlacementPin()
Definition: childwidgetplacementpin.cpp:20
ChildWidgetPlacementPin::setInitialPosition
virtual void setInitialPosition(const QPointF &scenePos=QPointF())
Definition: childwidgetplacementpin.cpp:29
ChildWidgetPlacementPin::isLeftOfParent
bool isLeftOfParent() const
Definition: childwidgetplacementpin.cpp:111
ChildWidgetPlacementPin::setNewPositionWhenMoved
virtual void setNewPositionWhenMoved(qreal diffX, qreal diffY)
Definition: childwidgetplacementpin.cpp:36
ChildWidgetPlacementPin::setNewPositionOnParentResize
virtual void setNewPositionOnParentResize()
Definition: childwidgetplacementpin.cpp:90
ChildWidgetPlacementPin::getNewYOnJumpToSide
qreal getNewYOnJumpToSide() const
Definition: childwidgetplacementpin.cpp:138
ChildWidgetPlacementPin::getNewXOnJumpToTopOrBottom
qreal getNewXOnJumpToTopOrBottom() const
Definition: childwidgetplacementpin.cpp:121
ChildWidgetPlacementPin::isBelowParent
bool isBelowParent() const
Definition: childwidgetplacementpin.cpp:106
ChildWidgetPlacementPin::isRightOfParent
bool isRightOfParent() const
Definition: childwidgetplacementpin.cpp:116
ChildWidgetPlacement
Base class for child widget placement.
Definition: childwidgetplacement.h:27
PinPortBase
Abstract base class for PinWidget and PortWidget.
Definition: pinportbase.h:28