Typo found by Yuri Chornoivan
[kdepim.git] / kdgantt / kdganttview.h
blob7eb4b7ca7cb3e1737a484c66954c90ec4d6f3199
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 used under the terms of the GNU General Public
7 ** License versions 2.0 or 3.0 as published by the Free Software
8 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
9 ** included in the packaging of this file. Alternatively you may (at
10 ** your option) use any later version of the GNU General Public
11 ** License if such license has been publicly approved by
12 ** Klarälvdalens Datakonsult AB (or its successors, if any).
13 **
14 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
15 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
16 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
17 ** not expressly granted herein.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 **********************************************************************/
23 #ifndef KDGANTTVIEW_H
24 #define KDGANTTVIEW_H
26 #include <QWidget>
27 #include "kdganttglobal.h"
29 class QAbstractItemModel;
30 class QAbstractProxyModel;
31 class QAbstractItemView;
32 class QModelIndex;
33 class QItemSelectionModel;
35 namespace KDGantt {
36 class ItemDelegate;
37 class Constraint;
38 class ConstraintModel;
39 class AbstractGrid;
40 class GraphicsView;
41 class AbstractRowController;
42 class GraphicsItem;
44 class KDGANTT_EXPORT View : public QWidget {
45 Q_OBJECT
46 KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET(View)
47 Q_PRIVATE_SLOT( d, void slotCollapsed(const QModelIndex&) )
48 Q_PRIVATE_SLOT( d, void slotExpanded(const QModelIndex&) )
49 Q_PRIVATE_SLOT( d, void slotVerticalScrollValueChanged( int ) )
50 Q_PRIVATE_SLOT( d, void slotLeftWidgetVerticalRangeChanged( int, int ) )
51 Q_PRIVATE_SLOT( d, void slotGfxViewVerticalRangeChanged( int, int ) )
52 public:
53 explicit View(QWidget* parent=0);
54 virtual ~View();
56 QAbstractItemModel* model() const;
57 QItemSelectionModel* selectionModel() const;
58 ItemDelegate* itemDelegate() const;
59 ConstraintModel* constraintModel() const;
60 AbstractGrid* grid() const;
61 QModelIndex rootIndex() const;
63 QModelIndex indexAt( const QPoint& pos ) const;
65 void setLeftView( QAbstractItemView* );
66 const QAbstractItemView* leftView() const;
67 QAbstractItemView* leftView();
69 void setRowController( AbstractRowController* );
70 AbstractRowController* rowController();
71 const AbstractRowController* rowController() const;
73 const GraphicsView* graphicsView() const;
74 GraphicsView* graphicsView();
75 const QAbstractProxyModel* ganttProxyModel() const;
76 QAbstractProxyModel* ganttProxyModel();
78 void print( QPainter* painter, const QRectF& target = QRectF(), const QRectF& source = QRectF(), bool drawRowLabels=true, bool drawHeader=true);
80 public Q_SLOTS:
81 void setModel(QAbstractItemModel* model);
82 void setRootIndex( const QModelIndex& idx );
83 void setSelectionModel( QItemSelectionModel* smodel );
84 void setItemDelegate( ItemDelegate* );
85 void setConstraintModel( ConstraintModel* );
86 void setGrid( AbstractGrid* );
88 protected:
89 /*reimp*/ void resizeEvent(QResizeEvent*);
93 #endif /* KDGANTTVIEW_H */