KGantt

kganttconstraintproxy.h
1 /*
2  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KGantt library.
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef KGANTTCONSTRAINTPROXY_H
10 #define KGANTTCONSTRAINTPROXY_H
11 
12 #include "kganttglobal.h"
13 
14 #include <QPointer>
15 
16 QT_BEGIN_NAMESPACE
18 QT_END_NAMESPACE
19 
20 namespace KGantt {
21  class Constraint;
22  class ConstraintModel;
23 
24 
25 
26  /*!\class KGantt::ConstraintProxy
27  * \internal
28  */
29  class KGANTT_EXPORT ConstraintProxy : public QObject {
30  Q_OBJECT
31  public:
32  explicit ConstraintProxy( QObject* parent = nullptr );
33  ~ConstraintProxy() override;
34 
35  void setSourceModel( ConstraintModel* src );
36  void setDestinationModel( ConstraintModel* dest );
37  void setProxyModel( QAbstractProxyModel* proxy );
38 
39  ConstraintModel* sourceModel() const;
40  ConstraintModel* destinationModel() const;
41  QAbstractProxyModel* proxyModel() const;
42 
43 
44  private Q_SLOTS:
45 
46  void slotSourceConstraintAdded( const KGantt::Constraint& );
47  void slotSourceConstraintRemoved( const KGantt::Constraint& );
48 
49  void slotDestinationConstraintAdded( const KGantt::Constraint& );
50  void slotDestinationConstraintRemoved( const KGantt::Constraint& );
51 
52  void slotLayoutChanged();
53 
54  private:
55  void copyFromSource();
56 
59  QPointer<ConstraintModel> m_destination;
60  };
61 }
62 
63 #endif /* KGANTTCONSTRAINTPROXY_H */
64 
A class used to represent a dependency.
Global namespace.
Contains KGantt macros.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 22:32:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.