• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kdgantt2

  • sources
  • kde-4.12
  • kdepim
  • kdgantt2
kdganttconstraintmodel.h
Go to the documentation of this file.
1 /****************************************************************************
2  ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB. All rights reserved.
3  **
4  ** This file is part of the KD Gantt library.
5  **
6  ** This file may be distributed and/or modified under the terms of the
7  ** GNU General Public License version 2 as published by the Free Software
8  ** Foundation and appearing in the file LICENSE.GPL included in the
9  ** packaging of this file.
10  **
11  ** Licensees holding valid commercial KD Gantt licenses may use this file in
12  ** accordance with the KD Gantt Commercial License Agreement provided with
13  ** the Software.
14  **
15  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17  **
18  ** See http://www.kdab.net/kdgantt for
19  ** information about KD Gantt Commercial License Agreements.
20  **
21  ** Contact info@kdab.net if any conditions of this
22  ** licensing are not clear to you.
23  **
24  **********************************************************************/
25 #ifndef KDGANTTCONSTRAINTMODEL_H
26 #define KDGANTTCONSTRAINTMODEL_H
27 
28 #include <QModelIndex>
29 #include <QDebug>
30 
31 #include "kdganttglobal.h"
32 #include "kdganttconstraint.h"
33 
34 namespace KDGantt {
35  class KDGANTT_EXPORT ConstraintModel : public QObject {
36  Q_OBJECT
37  KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT( ConstraintModel, QObject* )
38  public:
39  explicit ConstraintModel( QObject* parent=0 );
40  virtual ~ConstraintModel();
41 
42  void addConstraint( const Constraint& c );
43  bool removeConstraint( const Constraint& c );
44 
45  void clear();
46  void cleanup();
47 
48  QList<Constraint> constraints() const;
49 
50  bool hasConstraint( const Constraint& c ) const;
51  inline bool hasConstraint( const QModelIndex& s,
52  const QModelIndex& e ) const;
53 
54  QList<Constraint> constraintsForIndex( const QModelIndex& ) const;
55 
56  Q_SIGNALS:
57  void constraintAdded(const Constraint&);
58  void constraintRemoved(const Constraint&);
59 
60  private:
61  Private* _d;
62  };
63 
64  inline const ConstraintModel::Private* ConstraintModel::d_func() const { return _d; }
65  inline ConstraintModel::Private* ConstraintModel::d_func() { return _d; }
66  inline bool ConstraintModel::hasConstraint( const QModelIndex& s, const QModelIndex& e ) const {
67  return hasConstraint( Constraint( s, e ) );
68  }
69 }
70 
71 #ifndef QT_NO_DEBUG_STREAM
72 #include <QDebug>
73 
74 QDebug operator<<( QDebug dbg, const KDGantt::ConstraintModel& model );
75 inline QDebug operator<<( QDebug dbg, KDGantt::ConstraintModel* model )
76 {
77  return operator<<(dbg,*model);
78 }
79 
80 #endif /* QT_NO_DEBUG_STREAM */
81 
82 #endif /* KDGANTTCONSTRAINTMODEL_H */
83 
KDGantt::ConstraintModel::Private
Definition: kdganttconstraintmodel_p.h:35
kdganttglobal.h
KDGANTT_EXPORT
#define KDGANTT_EXPORT
Definition: kdgantt_export.h:40
kdganttconstraint.h
QObject
operator<<
QDebug operator<<(QDebug dbg, const KDGantt::ConstraintModel &model)
Definition: kdganttconstraintmodel.cpp:210
KDGantt::Constraint
A class used to represent a dependency.
Definition: kdganttconstraint.h:38
KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT
#define KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
Definition: kdganttglobal.h:82
KDGantt::ConstraintModel::hasConstraint
bool hasConstraint(const Constraint &c) const
Definition: kdganttconstraintmodel.cpp:196
KDGantt::ConstraintModel
Definition: kdganttconstraintmodel.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdgantt2

Skip menu "kdgantt2"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal