KD Chart API Documentation  3.1
kdganttconstraintproxy.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Chart library.
4 **
5 ** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDGANTTCONSTRAINTPROXY_H
12 #define KDGANTTCONSTRAINTPROXY_H
13 
14 #include "kdganttglobal.h"
15 
16 #include <QPointer>
17 
18 QT_BEGIN_NAMESPACE
19 class QAbstractProxyModel;
20 QT_END_NAMESPACE
21 
22 namespace KDGantt {
23 class Constraint;
24 class ConstraintModel;
25 
26 class KDGANTT_EXPORT ConstraintProxy : public QObject
27 {
28  Q_OBJECT
29 public:
30  explicit ConstraintProxy(QObject *parent = nullptr);
31  ~ConstraintProxy() override;
32 
33  void setSourceModel(ConstraintModel *src);
34  void setDestinationModel(ConstraintModel *dest);
35  void setProxyModel(QAbstractProxyModel *proxy);
36 
37  ConstraintModel *sourceModel() const;
38  ConstraintModel *destinationModel() const;
39  QAbstractProxyModel *proxyModel() const;
40 
41 private Q_SLOTS:
42 
43  void slotSourceConstraintAdded(const KDGantt::Constraint &);
44  void slotSourceConstraintRemoved(const KDGantt::Constraint &);
45 
46  void slotDestinationConstraintAdded(const KDGantt::Constraint &);
47  void slotDestinationConstraintRemoved(const KDGantt::Constraint &);
48 
49  void slotLayoutChanged();
50 
51 private:
52  void copyFromSource();
53 
54  QPointer<QAbstractProxyModel> m_proxy;
55  QPointer<ConstraintModel> m_source;
56  QPointer<ConstraintModel> m_destination;
57 };
58 }
59 
60 #endif /* KDGANTTCONSTRAINTPROXY_H */
The ConstraintModel keeps track of the interdependencies between gantt items in a View.
A class used to represent a dependency.
Contains KDGantt macros.

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1