umbrello/umbrello
floatingdashlinewidget.cpp
Go to the documentation of this file.
35 FloatingDashLineWidget::FloatingDashLineWidget(UMLScene * scene, Uml::ID::Type id, CombinedFragmentWidget *parent)
58 void FloatingDashLineWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
90 if (((abs((long)(y() + height() - point.y()))) <= POINT_DELTA) || (abs((long)(y() - point.y())) <= POINT_DELTA)) {
105 name = KInputDialog::getText(i18n("Enter alternative Name"), i18n("Enter the alternative:"), m_Text, &ok);
qreal getDiffY() const
Returns the difference between the y-coordinate of the dash line and m_yMin.
Definition: floatingdashlinewidget.cpp:151
bool onLine(const QPointF &point)
Returns true if the given point is near the floatingdashline.
Definition: floatingdashlinewidget.cpp:87
qreal y() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Draws the UMLWidget on the given paint device.
Definition: umlwidget.cpp:1636
QDomNode appendChild(const QDomNode &newChild)
QString attribute(const QString &name, const QString &defValue) const
void removeDashLine(FloatingDashLineWidget *line)
Definition: combinedfragmentwidget.cpp:370
Definition: umlwidget.h:215
Definition: listpopupmenu.h:171
bool loadFromXMI(QDomElement &qElement)
Loads the "floatingdashline" XMI element.
Definition: floatingdashlinewidget.cpp:174
void drawLine(const QLineF &line)
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:211
virtual void slotMenuSelection(QAction *action)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: umlwidget.cpp:772
void slotMenuSelection(QAction *action)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: floatingdashlinewidget.cpp:97
#define FLOATING_DASH_LINE_TEXT_MARGIN
Definition: floatingdashlinewidget.h:18
void setFont(const QFont &font)
qreal y() const
void setPen(const QColor &color)
void setAttribute(const QString &name, const QString &value)
void drawText(const QPointF &position, const QString &text)
This class is used to draw dash lines for UML combined fragments.
Definition: floatingdashlinewidget.h:33
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: umlwidget.cpp:1833
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: umlwidget.cpp:1810
float toFloat(bool *ok) const
int length() const
This class is the graphical version of a UML combined fragment.
Definition: combinedfragmentwidget.h:36
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the "floatingdashline" XMI element.
Definition: floatingdashlinewidget.cpp:159
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1234
QDomElement createElement(const QString &tagName)
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Returns the font metric used by this object for Text which uses bold/italic fonts.
Definition: umlwidget.cpp:1701
virtual QFont font() const
Returns the font used for diaplaying any text.
Definition: widgetbase.cpp:445
int lineSpacing() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option=0, QWidget *widget=0)
Overrides the standard paint event.
Definition: floatingdashlinewidget.cpp:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.