umbrello  2.32.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
objectsmodel.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 OBJECTSMODEL_H
7 #define OBJECTSMODEL_H
8 
9 // qt includes
10 #include <QAbstractTableModel>
11 #include <QPointer>
12 
13 class UMLObject;
14 
15 class ObjectsModel : public QAbstractTableModel
16 {
17  Q_OBJECT
18 public:
19  explicit ObjectsModel();
20 
21  bool add(UMLObject *o);
22  bool remove(UMLObject *o);
23 
24  int rowCount(const QModelIndex &parent) const;
25  int columnCount(const QModelIndex &parent) const;
26 
27  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
28  QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
29 
30  void emitDataChanged(const QModelIndex &index);
31  void emitDataChanged(int index);
32  void emitDataChanged(UMLObject *o);
33 
34 protected:
35  QList<QPointer<UMLObject>> m_allObjects;
36 };
37 
38 #endif // OBJECTSMODEL_H
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:420
ObjectsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: objectsmodel.cpp:167
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1389
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1404
UMLObject::name
QString name() const
Definition: umlobject.cpp:206
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:173
objectsmodel.h
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1385
ObjectsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:67
operation.h
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false) const
Definition: package.cpp:261
ObjectsModel::add
bool add(UMLObject *o)
Definition: objectsmodel.cpp:30
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1300
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:674
UMLObjectPrivate::isSaved
bool isSaved
Definition: umlobjectprivate.h:13
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:649
UMLObject
The base class for UML objects.
Definition: umlobject.h:69
ObjectsModel
Definition: objectsmodel.h:15
UMLObject::asUMLFolder
UMLFolder * asUMLFolder()
Definition: umlobject.cpp:1398
ObjectsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:60
ObjectsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:52
ObjectsModel::m_allObjects
QList< QPointer< UMLObject > > m_allObjects
Definition: objectsmodel.h:35
ObjectsModel::remove
bool remove(UMLObject *o)
Definition: objectsmodel.cpp:41
attribute.h
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Library General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: LGPL-2.0-only.txt:368
UMLObject::isUMLOperation
bool isUMLOperation() const
Definition: umlobject.h:216
folder.h
i18n
#define i18n
Definition: main.cpp:34
ObjectsModel::ObjectsModel
ObjectsModel()
Definition: objectsmodel.cpp:26
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
c
type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of the commands you use may be called something other than show w and show c
Definition: GPL-2.0-only.txt:301
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:77
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:29
classifier.h
UMLOperation
Definition: operation.h:19
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(UMLObject *)
uml.h
UMLObject::baseTypeStr
QLatin1String baseTypeStr() const
Definition: umlobject.cpp:400
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:34
ObjectsModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:94
UMLObject::isUMLAttribute
bool isUMLAttribute() const
Definition: umlobject.h:198
UMLObject::m_d
UMLObjectPrivate * m_d
private data
Definition: umlobject.h:300
umlobjectprivate.h
UMLObjectList
Definition: umlobjectlist.h:24
umldoc.h