umbrello 25.04.1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
stereotypesmodel.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2015-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef STEREOTYPESMODEL_H
7#define STEREOTYPESMODEL_H
8
9// app includes
10#include "umlstereotypelist.h"
11
12// qt includes
13#include <QAbstractTableModel>
14#include "stereotype.h"
15
17
18class StereotypesModel : public QAbstractTableModel
19{
20 Q_OBJECT
21public:
22 explicit StereotypesModel(UMLStereotypeList& stereotypes);
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 bool addStereotype(UMLStereotype *stereotype);
31 bool removeStereotype(UMLStereotype *stereotype);
32
33 void emitDataChanged(const QModelIndex &index);
34 void emitDataChanged(int index);
35
36protected:
39};
40
41#endif // STEREOTYPESMODEL_H
Definition stereotypesmodel.h:19
int m_count
Definition stereotypesmodel.h:37
int columnCount(const QModelIndex &parent) const
Definition stereotypesmodel.cpp:33
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition stereotypesmodel.cpp:40
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition stereotypesmodel.cpp:57
UMLStereotypeList & m_stereotypes
Definition stereotypesmodel.h:38
void emitDataChanged(const QModelIndex &index)
Definition stereotypesmodel.cpp:122
int rowCount(const QModelIndex &parent) const
Definition stereotypesmodel.cpp:25
bool removeStereotype(UMLStereotype *stereotype)
Definition stereotypesmodel.cpp:101
bool addStereotype(UMLStereotype *stereotype)
Definition stereotypesmodel.cpp:85
Sets up stereotype information.
Definition stereotype.h:36
Q_DECLARE_METATYPE(UMLStereotype *)
QList< UMLStereotype * > UMLStereotypeList
Definition umlstereotypelist.h:14