umbrello/umbrello
notewidget.cpp
Go to the documentation of this file.
59 void NoteWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
89 painter->drawText(0, margin, w, fontHeight, Qt::AlignCenter, QLatin1String("<< precondition >>"));
92 painter->drawText(0, margin, w, fontHeight, Qt::AlignCenter, QLatin1String("<< postcondition >>"));
95 painter->drawText(0, margin, w, fontHeight, Qt::AlignCenter, QLatin1String("<< transformation >>"));
static NoteType stringToNoteType(const QString ¬eType)
Converts a string to NoteWidget::NoteType.
Definition: notewidget.cpp:119
virtual bool loadFromXMI(QDomElement &qElement)
Loads a "notewidget" XMI element.
Definition: notewidget.cpp:202
void slotMenuSelection(QAction *action)
Will be called when a menu selection has been made from the popup menu.
Definition: notewidget.cpp:245
int width() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Draws the UMLWidget on the given paint device.
Definition: umlwidget.cpp:1636
Displays a note box to allow multiple lines of text to be displayed.
Definition: notewidget.h:30
QDomNode appendChild(const QDomNode &newChild)
QString attribute(const QString &name, const QString &defValue) const
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:88
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
void setDiagramLink(Uml::ID::Type viewID)
Set the ID of the diagram hyperlinked to this note.
Definition: notewidget.cpp:164
void drawPolyline(const QPointF *points, int pointCount)
Definition: umlwidget.h:215
Definition: notewidget.h:39
Definition: listpopupmenu.h:171
virtual QSizeF calculateSize(bool withExtensions=true) const
Calculate content related size of widget.
Definition: notewidget.cpp:290
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule)
void drawLine(const QLineF &line)
Uml::ID::Type diagramLink() const
Return the ID of the diagram hyperlinked to this note.
Definition: notewidget.cpp:153
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
void setPoint(int index, int x, int y)
void update(const QRectF &rect)
QString documentation() const
Used by some child classes to get documentation.
Definition: widgetbase.cpp:171
virtual int type() const
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
UMLView * findView(Uml::ID::Type id)
Finds a view (diagram) by the ID given to method.
Definition: umldoc.cpp:749
void setFont(const QFont &font)
bool isSpace() const
void setPen(const QColor &color)
void setAttribute(const QString &name, const QString &value)
QChar fromLatin1(char c)
int toInt(bool *ok, int base) const
void changeCurrentView(Uml::ID::Type id)
Changes the current view (diagram) to the view with the given ID.
Definition: umldoc.cpp:1446
void setDocumentation(const QString &doc)
Used by some child classes to set documentation.
Definition: widgetbase.cpp:196
void setBrush(const QBrush &brush)
void drawText(const QPointF &position, const QString &text)
Qt::MouseButton button() const
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)
Saves to the "notewidget" XMI element.
Definition: notewidget.cpp:219
Definition: notewidget.h:41
virtual void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: umlwidget.cpp:1461
int width(const QString &text, int len) const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Override default method.
Definition: notewidget.cpp:59
Definition: notewidget.h:38
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
Definition: notewidget.h:40
int height() const
NoteWidget(UMLScene *scene, NoteWidget::NoteType noteType=Normal, Uml::ID::Type id=Uml::ID::None)
Constructs a NoteWidget.
Definition: notewidget.cpp:41
int length() const
QString left(int n) const
QSize size(int flags, const QString &text, int tabStops, int *tabArray) const
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 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Event handler for moude double click events.
Definition: notewidget.cpp:484
void setZValue(qreal z)
void askForNoteType(UMLWidget *&targetWidget)
Display a dialog box to allow the user to choose the note's type.
Definition: notewidget.cpp:181
virtual QFont font() const
Returns the font used for diaplaying any text.
Definition: widgetbase.cpp:445
int lineSpacing() const
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.