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

diagramsmodel.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2015-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef DIAGRAMSMODEL_H
7#define DIAGRAMSMODEL_H
8
9// app includes
10#include "umlviewlist.h"
11
12// qt includes
13#include <QAbstractTableModel>
14#include <QPointer>
15
16 class UMLView;
17
18 class DiagramsModel : public QAbstractTableModel
19{
20 Q_OBJECT
21 public:
22 explicit DiagramsModel();
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 addDiagram(UMLView *view);
31 bool removeDiagram(UMLView *view);
32 bool removeAllDiagrams();
33
34 void emitDataChanged(const QModelIndex &index);
35 void emitDataChanged(int index);
36 void emitDataChanged(UMLView *view);
37
38 protected:
39 int m_count;
40 UMLViewList m_views;
41};
42
43#endif // STEREOTYPESMODEL_H
DiagramsModel
Definition: diagramsmodel.h:19
DiagramsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: diagramsmodel.cpp:125
DiagramsModel::removeDiagram
bool removeDiagram(UMLView *view)
Definition: diagramsmodel.cpp:104
DiagramsModel::m_views
UMLViewList m_views
Definition: diagramsmodel.h:40
DiagramsModel::addDiagram
bool addDiagram(UMLView *view)
Definition: diagramsmodel.cpp:93
DiagramsModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: diagramsmodel.cpp:62
DiagramsModel::m_count
int m_count
Definition: diagramsmodel.h:39
DiagramsModel::DiagramsModel
DiagramsModel()
Definition: diagramsmodel.cpp:21
DiagramsModel::removeAllDiagrams
bool removeAllDiagrams()
Definition: diagramsmodel.cpp:115
DiagramsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: diagramsmodel.cpp:41
DiagramsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:34
DiagramsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:26
UMLView
Definition: umlview.h:30
umlviewlist.h
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:16