umbrello/umbrello
widgetbase.cpp
Go to the documentation of this file.
481 qElement.setAttribute(QLatin1String("textcolor"), m_usesDiagramTextColor ? QLatin1String("none")
550 For the next three *color attributes, there was a mixup of american and english spelling for "color".
560 QString usesDiagramFillColor = qElement.attribute(QLatin1String("usesdiagramfillcolour"), QLatin1String("1"));
561 usesDiagramFillColor = qElement.attribute(QLatin1String("usesdiagramfillcolor"), usesDiagramFillColor);
564 QString usesDiagramUseFillColor = qElement.attribute(QLatin1String("usesdiagramusefillcolour"), QLatin1String("1"));
565 usesDiagramUseFillColor = qElement.attribute(QLatin1String("usesdiagramusefillcolor"), usesDiagramUseFillColor);
686 void WidgetBase::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
853 ClassifierWidget::ShowOperationSignature, sel != ListPopupMenu::mt_Hide_Operation_Signature_Selection
860 ClassifierWidget::ShowAttributeSignature, sel != ListPopupMenu::mt_Hide_Attribute_Signature_Selection
void setUsesDiagramFillColor(bool state)
Set state if diagram fill color is used.
Definition: widgetbase.cpp:396
bool m_usesDiagramTextColor
true by default, false if the colors have been explicitly set for this widget.
Definition: widgetbase.h:184
void setSelected(bool selected)
qreal x() const
qreal y() const
Definition: widgetbase.h:51
Definition: listpopupmenu.h:251
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
virtual bool showPropertiesPagedDialog(int page=0, bool assoc=false)
This method is called if you wish to see the properties of a UMLObject.
Definition: umlobject.cpp:119
int selectedCount(bool filterText=false) const
Return the amount of widgets selected.
Definition: umlscene.cpp:1822
void setStartedCut()
Called by the view or any of its children when they start a cut operation.
Definition: umlscene.cpp:3183
UMLObject * umlObject() const
Returns the UMLObject set to represent.
Definition: widgetbase.cpp:127
Definition: widgetbase.h:48
static QString toString(MenuType menu)
Convert enum MenuType to string.
Definition: listpopupmenu.cpp:2099
Definition: widgetbase.h:44
UMLDoc * umlDoc() const
This is shortcut method for UMLApp::app()->document().
Definition: widgetbase.cpp:117
QString name() const
void slotEditCut()
Put the marked text/object into the clipboard and remove it from the document.
Definition: uml.cpp:1515
void setUsesDiagramTextColor(bool state)
Set state if diagram text color is used.
Definition: widgetbase.cpp:352
Definition: listpopupmenu.h:180
void addObject(UMLObject *object)
Add an object to the application, and update the view.
Definition: umlscene.cpp:3839
QString attribute(const QString &name, const QString &defValue) const
Definition: listpopupmenu.h:230
virtual void showPropertiesDialog()
A virtual method for the widget to display a property dialog box.
Definition: widgetbase.cpp:462
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Draws the UMLWidget on the given paint device.
Definition: widgetbase.cpp:686
bool usesDiagramUseFillColor() const
Returns state of diagram use fill color is used.
Definition: widgetbase.cpp:406
Definition: listpopupmenu.h:181
UMLScene * umlScene() const
Deliver a pointer to the connected UMLView (needed esp.
Definition: widgetbase.cpp:107
virtual void setUMLObject(UMLObject *obj)
Sets the UMLObject to represent.
Definition: widgetbase.cpp:137
Definition: listpopupmenu.h:171
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Reimplemented to show appropriate context menu.
Definition: widgetbase.cpp:694
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: widgetbase.cpp:477
void selectionUseFillColor(bool useFC)
Set the useFillColor variable to all selected widgets.
Definition: umlscene.cpp:1327
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Set or unset the visual property (show ..) setting of all selected items.
Definition: umlscene.cpp:1412
Definition: listpopupmenu.h:197
Definition: listpopupmenu.h:210
const Settings::OptionState & optionState() const
Returns the options being used.
Definition: umlscene.cpp:428
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: widgetbase.cpp:517
bool isCloneable(WidgetBase::WidgetType type)
Determines whether the given widget type is cloneable.
Definition: model_utils.cpp:52
Definition: widgetbase.h:47
void selectionSetFillColor(const QColor &color)
Set the fill color for all the currently selected items.
Definition: umlscene.cpp:1397
Definition: listpopupmenu.h:228
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
QGraphicsScene * scene() const
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:211
static ListPopupMenu * menuFromAction(QAction *action)
Convenience method to extract the ListPopupMenu pointer stored in QAction objects belonging to ListPo...
Definition: listpopupmenu.cpp:1335
Definition: widgetbase.h:59
void update(const QRectF &rect)
QString documentation() const
Used by some child classes to get documentation.
Definition: widgetbase.cpp:171
virtual int type() const
Definition: optionstate.h:142
virtual void setName(const QString &strName)
Sets the name in the corresponding UMLObject.
Definition: widgetbase.cpp:224
#define ENUM_NAME(o, e, v)
In a Q_OBJECT class define any enum as Q_ENUMS.
Definition: debug_utils.h:125
void handleRename()
Handle the ListPopupMenu::mt_Rename case of the slotMenuSelection.
Definition: floatingtextwidget.cpp:388
static QString toString(WidgetType wt)
Helper function for debug output.
Definition: widgetbase.cpp:987
qreal x() const
qreal y() const
bool fromString(const QString &descrip)
Definition: widgetbase.h:49
Definition: listpopupmenu.h:199
Definition: widgetbase.h:46
bool usesDiagramTextColor() const
Returns state if diagram text color is used.
Definition: widgetbase.cpp:342
void setAttribute(const QString &name, const QString &value)
bool isSelected() const
Definition: listpopupmenu.h:174
int toInt(bool *ok, int base) const
bool isEmpty() const
virtual void slotMenuSelection(QAction *trigger)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: widgetbase.cpp:757
virtual void setUseFillColor(bool state)
Set state if fill color is used.
Definition: widgetbase.cpp:331
void setDocumentation(const QString &doc)
Used by some child classes to set documentation.
Definition: widgetbase.cpp:196
bool isSimpleCodeGeneratorActive()
Determines if SimpleCodeGenerator is active.
Definition: uml.cpp:2292
Definition: listpopupmenu.h:229
Definition: listpopupmenu.h:179
Definition: widgetbase.h:60
QRectF rect() const
return drawing rectangle of widget in local coordinates
Definition: widgetbase.cpp:611
Definition: listpopupmenu.h:252
void setModified(bool modified=true)
Sets the modified flag for the document after a modifying action on the view connected to the documen...
Definition: umldoc.cpp:2652
void prepareGeometryChange()
WidgetBase * ownerWidget() const
Utility method to fetch owner of the menu.
Definition: listpopupmenu.cpp:2036
void deleteSelection()
Delete the selected widgets list and the widgets in it.
Definition: umlscene.cpp:1427
virtual UMLWidget * onWidget(const QPointF &p)
Test if point is inside the bounding rectangle of the widget.
Definition: widgetbase.cpp:655
void selectionSetFont(const QFont &font)
Set the font for all the currently selected items.
Definition: umlscene.cpp:1345
void selectionSetLineColor(const QColor &color)
Set the line color for all the currently selected items.
Definition: umlscene.cpp:1359
Definition: listpopupmenu.h:253
virtual UMLObject * clone() const =0
void setUsesDiagramLineWidth(bool state)
Set state of diagram line width is used.
Definition: widgetbase.cpp:436
bool usesDiagramLineWidth() const
Returns state of diagram line width is used.
Definition: widgetbase.cpp:426
WidgetBase(UMLScene *scene, WidgetType type=wt_UMLWidget)
Creates a WidgetBase object.
Definition: widgetbase.cpp:35
Uml::ID::Type m_nId
This ID is only used when the widget does not have a corresponding UMLObject (i.e.
Definition: widgetbase.h:169
virtual void setFont(const QFont &font)
Set the font used to display text inside this widget.
Definition: widgetbase.cpp:453
void setUsesDiagramUseFillColor(bool state)
Set state of diagram use fill color is used.
Definition: widgetbase.cpp:416
qreal width() const
void setActionEnabled(MenuType idx, bool value)
Enables the action item.
Definition: listpopupmenu.cpp:2067
Definition: basictypes.h:77
Definition: widgetbase.h:50
QString toString() const
Definition: listpopupmenu.h:170
Definition: listpopupmenu.h:207
bool usesDiagramLineColor() const
Returns state of diagram line color is used.
Definition: widgetbase.cpp:366
void setFlags(QFlags< QGraphicsItem::GraphicsItemFlag > flags)
WidgetBase::WidgetType getUniqueSelectionType()
Returns the type of the selected widget or widgets.
Definition: umlscene.cpp:3267
A popup menu that depending on what type is set to will display a different menu. ...
Definition: listpopupmenu.h:40
void setUsesDiagramLineColor(bool state)
Set state of diagram line color is used.
Definition: widgetbase.cpp:376
Definition: widgetbase.h:45
void viewCodeDocument(UMLClassifier *classifier)
Call the code viewing assistant on a given UMLClassifier.
Definition: uml.cpp:2175
Definition: widgetbase.h:54
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const
qreal height() const
void selectWidget(UMLWidget *widget, QRectF *rect=0)
Select a single widget.
Definition: umlscene.cpp:1637
void setRect(const QRectF &rect)
set widget rectangle in item coordinates
Definition: widgetbase.cpp:619
void refactor(UMLClassifier *classifier)
Call the refactoring assistant on a classifier.
Definition: uml.cpp:2206
Definition: widgetbase.h:52
bool m_useFillColor
flag indicates if the UMLWidget uses the Diagram FillColour
Definition: widgetbase.h:177
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:158
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1234
void addItem(QGraphicsItem *item)
Definition: widgetbase.h:61
virtual QFont font() const
Returns the font used for diaplaying any text.
Definition: widgetbase.cpp:445
Definition: widgetbase.h:72
bool usesDiagramFillColor() const
Returns state of diagram fill color is used.
Definition: widgetbase.cpp:386
typedef KeyboardModifiers
bool hasDocumentation()
Returns state of documentation for the widget.
Definition: widgetbase.cpp:183
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 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:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.