umbrello  2.32.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
checkconstraint.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) 2002-2020 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef CHECKCONSTRAINT_H
12 #define CHECKCONSTRAINT_H
13 
14 #include "basictypes.h"
15 #include "entityconstraint.h"
16 
26 {
27  Q_OBJECT
28 public:
29 
30  UMLCheckConstraint(UMLObject *parent, const QString& name,
32  explicit UMLCheckConstraint(UMLObject *parent);
33 
34  bool operator==(const UMLCheckConstraint &rhs) const;
35 
36  virtual ~UMLCheckConstraint();
37 
38  virtual void copyInto(UMLObject *lhs) const;
39 
40  virtual UMLObject* clone() const;
41 
42  QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
43 
44  QString getFullyQualifiedName(const QString& separator = QString(),
45  bool includeRoot = false) const;
46 
47  void saveToXMI1(QXmlStreamWriter& writer);
48 
49  virtual bool showPropertiesDialog(QWidget* parent = 0);
50 
51  QString getCheckCondition() const {
52  return m_CheckCondition;
53  }
54 
55  void setCheckCondition(const QString& condition) {
56  m_CheckCondition = condition.trimmed();
57  }
58 
59 protected:
60 
61  bool load1(QDomElement & element);
62 
63 private:
64 
65  void init();
66 
67  QString m_CheckCondition;
68 
69 };
70 
71 #endif
Sets up Check Constraint information for UMLEntities.
Definition: checkconstraint.h:26
bool load1(QDomElement &element)
Definition: checkconstraint.cpp:139
void saveToXMI1(QXmlStreamWriter &writer)
Definition: checkconstraint.cpp:118
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: checkconstraint.cpp:96
virtual ~UMLCheckConstraint()
Definition: checkconstraint.cpp:60
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: checkconstraint.cpp:108
void init()
Definition: checkconstraint.cpp:155
bool operator==(const UMLCheckConstraint &rhs) const
Definition: checkconstraint.cpp:46
virtual UMLObject * clone() const
Definition: checkconstraint.cpp:82
void setCheckCondition(const QString &condition)
Definition: checkconstraint.h:55
QString getCheckCondition() const
Definition: checkconstraint.h:51
virtual void copyInto(UMLObject *lhs) const
Definition: checkconstraint.cpp:68
QString m_CheckCondition
the check condition
Definition: checkconstraint.h:67
UMLCheckConstraint(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: checkconstraint.cpp:25
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: checkconstraint.cpp:130
Sets up entity constraint information.
Definition: entityconstraint.h:27
The base class for UML objects.
Definition: umlobject.h:75
QString name() const
Definition: umlobject.cpp:211
const Type None
special value for uninitialized ID
Definition: basictypes.h:387
std::string Type
Definition: basictypes.h:385
Enum
Definition: basictypes.h:174
@ NoSig
Definition: basictypes.h:175