KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
KDGantt::ConstraintModel Class Reference

The ConstraintModel keeps track of the interdependencies between gantt items in a View. More...

#include <kdganttconstraintmodel.h>

Inheritance diagram for KDGantt::ConstraintModel:
Inheritance graph
[legend]
Collaboration diagram for KDGantt::ConstraintModel:
Collaboration graph
[legend]

Signals

void constraintAdded (const KDGantt::Constraint &)
 
void constraintRemoved (const KDGantt::Constraint &)
 

Public Member Functions

 ConstraintModel (QObject *parent=nullptr)
 Constructor.
 
 ~ConstraintModel () override
 Destroys this ConstraintModel.
 
virtual void addConstraint (const Constraint &c)
 Adds the constraint c to this ConstraintModel If the Constraint c is already in this ConstraintModel, nothing happens.
 
void cleanup ()
 Not used.
 
void clear ()
 Removes all Constraints from this model The signal constraintRemoved(const Constraint&) is emitted for every Constraint that is removed.
 
QList< Constraintconstraints () const
 
QList< ConstraintconstraintsForIndex (const QModelIndex &) const
 
bool hasConstraint (const Constraint &c) const
 Returns true if a Constraint with start s and end e exists, otherwise false.
 
bool hasConstraint (const QModelIndex &s, const QModelIndex &e) const
 
virtual bool removeConstraint (const Constraint &c)
 Removes the Constraint c from this ConstraintModel.
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
T qFindChild (const QObject *obj, const QString &name)
 
QList< TqFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< TqFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The ConstraintModel keeps track of the interdependencies between gantt items in a View.

Definition at line 21 of file kdganttconstraintmodel.h.

Constructor & Destructor Documentation

◆ ConstraintModel()

ConstraintModel::ConstraintModel ( QObject parent = nullptr)
explicit

Constructor.

Creates an empty ConstraintModel with parent parent

Definition at line 61 of file kdganttconstraintmodel.cpp.

◆ ~ConstraintModel()

ConstraintModel::~ConstraintModel ( )
override

Destroys this ConstraintModel.

Definition at line 77 of file kdganttconstraintmodel.cpp.

Member Function Documentation

◆ addConstraint()

void ConstraintModel::addConstraint ( const Constraint c)
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 108 of file kdganttconstraintmodel.cpp.

References constraintAdded(), d, KDGantt::Constraint::dataMap(), KDGantt::Constraint::endIndex(), QObject::Q_EMIT(), QObject::qobject_cast(), removeConstraint(), and KDGantt::Constraint::startIndex().

Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().

◆ cleanup()

void ConstraintModel::cleanup ( )

◆ 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 161 of file kdganttconstraintmodel.cpp.

References constraints(), QObject::qobject_cast(), and removeConstraint().

◆ constraintAdded

void KDGantt::ConstraintModel::constraintAdded ( const KDGantt::Constraint )
signal

◆ constraintRemoved

void KDGantt::ConstraintModel::constraintRemoved ( const KDGantt::Constraint )
signal

◆ constraints()

QList< Constraint > ConstraintModel::constraints ( ) const
Returns
A list of all Constraints in this ConstraintModel.

Definition at line 185 of file kdganttconstraintmodel.cpp.

References d.

Referenced by clear(), KDAB_SCOPED_UNITTEST_SIMPLE(), and operator<<().

◆ constraintsForIndex()

QList< Constraint > ConstraintModel::constraintsForIndex ( const QModelIndex idx) const

◆ 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 221 of file kdganttconstraintmodel.cpp.

References KDGantt::Constraint::compareIndexes(), d, and QObject::qobject_cast().

Referenced by hasConstraint(), and KDAB_SCOPED_UNITTEST_SIMPLE().

◆ hasConstraint() [2/2]

bool KDGantt::ConstraintModel::hasConstraint ( const QModelIndex s,
const QModelIndex e 
) const
inline

Definition at line 64 of file kdganttconstraintmodel.h.

References hasConstraint(), and QObject::qobject_cast().

◆ removeConstraint()

bool ConstraintModel::removeConstraint ( const Constraint c)
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 137 of file kdganttconstraintmodel.cpp.

References KDGantt::Constraint::compareIndexes(), constraintRemoved(), d, KDGantt::Constraint::endIndex(), QObject::Q_EMIT(), QObject::qobject_cast(), and KDGantt::Constraint::startIndex().

Referenced by addConstraint(), clear(), and KDAB_SCOPED_UNITTEST_SIMPLE().


The documentation for this class was generated from the following files:

© 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 on Fri Apr 26 2024 00:04:58 for KD Chart API Documentation by doxygen 1.9.8