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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

childwidgetplacement.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2016-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef CHILDWIDGETPLACEMENT_H
7#define CHILDWIDGETPLACEMENT_H
8
9 class PinPortBase;
10 class UMLWidget;
11
12#include <QPointF>
13#include <QtGlobal>
14
21 class ChildWidgetPlacement
22{
23 public:
24 ChildWidgetPlacement(PinPortBase* widget);
25 virtual ~ChildWidgetPlacement() {}
26
27 virtual void detectConnectedSide() = 0;
28 virtual void setInitialPosition(const QPointF &scenePos = QPointF()) = 0;
29 virtual void setNewPositionWhenMoved(qreal diffX, qreal diffY) = 0;
30 virtual void setNewPositionOnParentResize() = 0;
31
32 protected:
33 enum ConnectedSide {
34 Undefined,
35 Top,
36 Right,
37 Bottom,
38 Left,
39 TopLeft,
40 TopRight,
41 BottomRight,
42 BottomLeft
43 };
44
45 void setPos(const QPointF& pos);
46 void setPos(qreal x, qreal y);
47 void setX(qreal x);
48 void setY(qreal y);
49 qreal x() const;
50 qreal y() const;
51 qreal width() const;
52 qreal height() const;
53 UMLWidget* ownerWidget() const;
54
55 PinPortBase* const m_widget;
56 ConnectedSide m_connectedSide;
57};
58
59#endif /* ! CHILDWIDGETPLACEMENT_H */
60
ChildWidgetPlacement
Base class for child widget placement.
Definition childwidgetplacement.h:22
ChildWidgetPlacement::m_connectedSide
ConnectedSide m_connectedSide
Definition childwidgetplacement.h:56
ChildWidgetPlacement::x
qreal x() const
Definition childwidgetplacement.cpp:35
ChildWidgetPlacement::setInitialPosition
virtual void setInitialPosition(const QPointF &scenePos=QPointF())=0
ChildWidgetPlacement::height
qreal height() const
Definition childwidgetplacement.cpp:50
ChildWidgetPlacement::width
qreal width() const
Definition childwidgetplacement.cpp:45
ChildWidgetPlacement::m_widget
PinPortBase *const m_widget
Definition childwidgetplacement.h:55
ChildWidgetPlacement::ConnectedSide
ConnectedSide
Definition childwidgetplacement.h:33
ChildWidgetPlacement::Bottom
@ Bottom
Definition childwidgetplacement.h:37
ChildWidgetPlacement::Left
@ Left
Definition childwidgetplacement.h:38
ChildWidgetPlacement::Right
@ Right
Definition childwidgetplacement.h:36
ChildWidgetPlacement::BottomLeft
@ BottomLeft
Definition childwidgetplacement.h:42
ChildWidgetPlacement::Undefined
@ Undefined
Definition childwidgetplacement.h:34
ChildWidgetPlacement::TopRight
@ TopRight
Definition childwidgetplacement.h:40
ChildWidgetPlacement::Top
@ Top
Definition childwidgetplacement.h:35
ChildWidgetPlacement::TopLeft
@ TopLeft
Definition childwidgetplacement.h:39
ChildWidgetPlacement::BottomRight
@ BottomRight
Definition childwidgetplacement.h:41
ChildWidgetPlacement::setY
void setY(qreal y)
Definition childwidgetplacement.cpp:30
ChildWidgetPlacement::~ChildWidgetPlacement
virtual ~ChildWidgetPlacement()
Definition childwidgetplacement.h:25
ChildWidgetPlacement::ChildWidgetPlacement
ChildWidgetPlacement(PinPortBase *widget)
Definition childwidgetplacement.cpp:10
ChildWidgetPlacement::setNewPositionOnParentResize
virtual void setNewPositionOnParentResize()=0
ChildWidgetPlacement::setPos
void setPos(const QPointF &pos)
Definition childwidgetplacement.cpp:15
ChildWidgetPlacement::detectConnectedSide
virtual void detectConnectedSide()=0
ChildWidgetPlacement::setNewPositionWhenMoved
virtual void setNewPositionWhenMoved(qreal diffX, qreal diffY)=0
ChildWidgetPlacement::setX
void setX(qreal x)
Definition childwidgetplacement.cpp:25
ChildWidgetPlacement::ownerWidget
UMLWidget * ownerWidget() const
Definition childwidgetplacement.cpp:55
ChildWidgetPlacement::y
qreal y() const
Definition childwidgetplacement.cpp:40
PinPortBase
Abstract base class for PinWidget and PortWidget.
Definition pinportbase.h:23
UMLWidget
The base class for graphical UML objects.
Definition umlwidget.h:36