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

kdgantt

kdganttconstraintmodel.h

Go to the documentation of this file.
00001 /****************************************************************************
00002  ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB.  All rights reserved.
00003  **
00004  ** This file is part of the KD Gantt library.
00005  **
00006  ** This file may be used under the terms of the GNU General Public
00007  ** License versions 2.0 or 3.0 as published by the Free Software
00008  ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
00009  ** included in the packaging of this file.  Alternatively you may (at
00010  ** your option) use any later version of the GNU General Public
00011  ** License if such license has been publicly approved by
00012  ** Klarälvdalens Datakonsult AB (or its successors, if any).
00013  ** 
00014  ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
00015  ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
00016  ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
00017  ** not expressly granted herein.
00018  ** 
00019  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021  **
00022  **********************************************************************/
00023 #ifndef KDGANTTCONSTRAINTMODEL_H
00024 #define KDGANTTCONSTRAINTMODEL_H
00025 
00026 #include <QModelIndex>
00027 #include <QDebug>
00028 
00029 #include "kdganttglobal.h"
00030 #include "kdganttconstraint.h"
00031 
00032 namespace KDGantt {
00033     class KDGANTT_EXPORT ConstraintModel : public QObject {
00034         Q_OBJECT
00035         KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT( ConstraintModel, QObject* )
00036      public:
00037         explicit ConstraintModel( QObject* parent=0 );
00038         virtual ~ConstraintModel();
00039 
00040         void addConstraint( const Constraint& c );
00041         bool removeConstraint( const Constraint& c );
00042 
00043         void clear();
00044         void cleanup();
00045 
00046         QList<Constraint> constraints() const;
00047 
00048         bool hasConstraint( const Constraint& c ) const;
00049         inline bool hasConstraint( const QModelIndex& s, 
00050                                    const QModelIndex& e ) const;
00051 
00052         QList<Constraint> constraintsForIndex( const QModelIndex& ) const;
00053 
00054     Q_SIGNALS:
00055         void constraintAdded(const Constraint&);
00056         void constraintRemoved(const Constraint&);
00057 
00058     private:
00059         Private* _d;
00060     };
00061 
00062     inline const ConstraintModel::Private* ConstraintModel::d_func() const { return _d; }
00063     inline ConstraintModel::Private* ConstraintModel::d_func() { return _d; }
00064     inline bool ConstraintModel::hasConstraint( const QModelIndex& s, const QModelIndex& e ) const {
00065         return hasConstraint( Constraint( s, e ) );
00066     }
00067 }
00068 
00069 #ifndef QT_NO_DEBUG_STREAM
00070 #include <QDebug>
00071 
00072 QDebug operator<<( QDebug dbg, const KDGantt::ConstraintModel& model );
00073 inline QDebug operator<<( QDebug dbg, KDGantt::ConstraintModel* model ) 
00074 {
00075     return operator<<(dbg,*model);
00076 }
00077 
00078 #endif /* QT_NO_DEBUG_STREAM */
00079 
00080 #endif /* KDGANTTCONSTRAINTMODEL_H */
00081 

kdgantt

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal