umbrello 26.07.70-c53146a Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
ObjectsModel
Definition: objectsmodel.h:16
ObjectsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: objectsmodel.cpp:165
ObjectsModel::remove
bool remove(UMLObject *o)
Definition: objectsmodel.cpp:39
ObjectsModel::add
bool add(UMLObject *o)
Definition: objectsmodel.cpp:28
ObjectsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:50
ObjectsModel::m_allObjects
QList< QPointer< UMLObject > > m_allObjects
Definition: objectsmodel.h:35
ObjectsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:58
ObjectsModel::ObjectsModel
ObjectsModel()
Definition: objectsmodel.cpp:24
ObjectsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:65
ObjectsModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:92
UMLObject
The base class for UML objects.
Definition: umlobject.h:70