Add warning about missing Nepomuk in the KMail composer.
[kdepim.git] / kdgantt2 / kdganttview.h
blob281fb3da3c46c50c8cd51d2fb2ba41b8f86fd2ee
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 KDGANTTVIEW_H
26 #define KDGANTTVIEW_H
28 #include <QWidget>
29 #include "kdganttglobal.h"
31 class QAbstractItemModel;
32 class QAbstractProxyModel;
33 class QAbstractItemView;
34 class QModelIndex;
35 class QItemSelectionModel;
36 class QPrinter;
37 class QSplitter;
39 namespace KDGantt {
40 class ItemDelegate;
41 class Constraint;
42 class ConstraintModel;
43 class AbstractGrid;
44 class GraphicsView;
45 class AbstractRowController;
47 class KDGANTT_EXPORT View : public QWidget {
48 Q_OBJECT
49 KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET(View)
50 Q_PRIVATE_SLOT( d, void slotCollapsed(const QModelIndex&) )
51 Q_PRIVATE_SLOT( d, void slotExpanded(const QModelIndex&) )
52 Q_PRIVATE_SLOT( d, void slotVerticalScrollValueChanged( int ) )
53 Q_PRIVATE_SLOT( d, void slotLeftWidgetVerticalRangeChanged( int, int ) )
54 Q_PRIVATE_SLOT( d, void slotGfxViewVerticalRangeChanged( int, int ) )
56 public:
58 explicit View(QWidget* parent=0);
59 virtual ~View();
61 QAbstractItemModel* model() const;
62 QItemSelectionModel* selectionModel() const;
63 ItemDelegate* itemDelegate() const;
64 ConstraintModel* constraintModel() const;
65 AbstractGrid* grid() const;
66 QModelIndex rootIndex() const;
68 QModelIndex indexAt( const QPoint& pos ) const;
70 void setLeftView( QAbstractItemView* );
71 const QAbstractItemView* leftView() const;
72 QAbstractItemView* leftView();
74 const QSplitter* splitter() const;
75 QSplitter* splitter();
77 void setRowController( AbstractRowController* );
78 AbstractRowController* rowController();
79 const AbstractRowController* rowController() const;
81 const GraphicsView* graphicsView() const;
82 GraphicsView* graphicsView();
83 const QAbstractProxyModel* ganttProxyModel() const;
84 QAbstractProxyModel* ganttProxyModel();
86 void print( QPrinter* printer, bool drawRowLabels=true );
87 void print( QPrinter* printer, qreal start, qreal end, bool drawRowLabels=true );
88 void print( QPainter* painter, const QRectF& target = QRectF(), bool drawRowLabels=true);
89 void print( QPainter* painter, qreal start, qreal end,
90 const QRectF& target = QRectF(), bool drawRowLabels=true);
92 public Q_SLOTS:
93 void setModel(QAbstractItemModel* model);
94 void setRootIndex( const QModelIndex& idx );
95 void setSelectionModel( QItemSelectionModel* smodel );
96 void setItemDelegate( ItemDelegate* );
97 void setConstraintModel( ConstraintModel* );
98 void setGrid( AbstractGrid* );
100 protected:
101 /*reimp*/ void resizeEvent(QResizeEvent*);
105 #endif /* KDGANTTVIEW_H */