KGantt::ConstraintModel
#include <kganttconstraintmodel.h>
Signals | |
void | constraintAdded (const KGantt::Constraint &) |
void | constraintRemoved (const KGantt::Constraint &) |
Detailed Description
The ConstraintModel keeps track of the interdependencies between gantt items in a View.
Definition at line 28 of file kganttconstraintmodel.h.
Constructor & Destructor Documentation
◆ ConstraintModel()
Constructor. Creates an empty ConstraintModel with parent parent
Definition at line 50 of file kganttconstraintmodel.cpp.
◆ ~ConstraintModel()
|
override |
Destroys this ConstraintModel
Definition at line 64 of file kganttconstraintmodel.cpp.
Member Function Documentation
◆ addConstraint()
|
virtual |
Adds the constraint c to this ConstraintModel If the Constraint c is already in this ConstraintModel, nothing happens.
Subclassing ConstraintModel and overriding addConstraint() and removeConstraint() can provide re-entrancy issues in the ConstraintModel<->ConstraintProxy interaction. Therefore it is recommended to better subclass GraphicsView and override addConstraint() there.
Definition at line 89 of file kganttconstraintmodel.cpp.
◆ cleanup()
void ConstraintModel::cleanup | ( | ) |
Not used
Definition at line 141 of file kganttconstraintmodel.cpp.
◆ clear()
void ConstraintModel::clear | ( | ) |
Removes all Constraints from this model The signal constraintRemoved(const Constraint&) is emitted for every Constraint that is removed.
Definition at line 133 of file kganttconstraintmodel.cpp.
◆ constraints()
QList< Constraint > ConstraintModel::constraints | ( | ) | const |
- Returns
- A list of all Constraints in this ConstraintModel.
Definition at line 153 of file kganttconstraintmodel.cpp.
◆ constraintsForIndex()
QList< Constraint > ConstraintModel::constraintsForIndex | ( | const QModelIndex & | idx | ) | const |
- Returns
- A list of all Constraints in this ConstraintModel that have an endpoint at idx.
Definition at line 159 of file kganttconstraintmodel.cpp.
◆ hasConstraint() [1/2]
bool ConstraintModel::hasConstraint | ( | const Constraint & | c | ) | const |
Returns true if a Constraint with start s and end e exists, otherwise false.
Definition at line 182 of file kganttconstraintmodel.cpp.
◆ hasConstraint() [2/2]
|
inline |
Definition at line 98 of file kganttconstraintmodel.h.
◆ removeConstraint()
|
virtual |
Removes the Constraint c from this ConstraintModel. If c was found and removed, the signal constraintRemoved(const Constraint&) is emitted.
- Returns
- If c was found and removed, it returns true, otherwise it returns false.
Definition at line 111 of file kganttconstraintmodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.