Typos
[kdepim.git] / kdgantt2 / kdganttconstraintproxy.h
blob0ac6631a935d3ffaf2e52f64ee0432f176915dfe
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.
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.
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.
18 ** See http://www.kdab.net/kdgantt for
19 ** information about KD Gantt Commercial License Agreements.
21 ** Contact info@kdab.net if any conditions of this
22 ** licensing are not clear to you.
24 **********************************************************************/
25 #ifndef KDGANTTCONSTRAINTPROXY_H
26 #define KDGANTTCONSTRAINTPROXY_H
28 #include "kdganttglobal.h"
30 #include <QPointer>
32 class QAbstractProxyModel;
34 namespace KDGantt {
35 class Constraint;
36 class ConstraintModel;
38 class ConstraintProxy : public QObject {
39 Q_OBJECT
40 public:
41 explicit ConstraintProxy( QObject* parent = 0 );
42 virtual ~ConstraintProxy();
44 void setSourceModel( ConstraintModel* src );
45 void setDestinationModel( ConstraintModel* dest );
46 void setProxyModel( QAbstractProxyModel* proxy );
48 ConstraintModel* sourceModel() const;
49 ConstraintModel* destinationModel() const;
50 QAbstractProxyModel* proxyModel() const;
53 private Q_SLOTS:
55 void slotSourceConstraintAdded( const Constraint& );
56 void slotSourceConstraintRemoved( const Constraint& );
58 void slotDestinationConstraintAdded( const Constraint& );
59 void slotDestinationConstraintRemoved( const Constraint& );
61 private:
62 void copyFromSource();
64 QPointer<QAbstractProxyModel> m_proxy;
65 QPointer<ConstraintModel> m_source;
66 QPointer<ConstraintModel> m_destination;
70 #endif /* KDGANTTCONSTRAINTPROXY_H */