Fix initial state of actions (and window title).
[kdepim.git] / kdgantt2 / kdganttview_p.h
blob9852facd71b22c574660a450dbb612064cf4017f
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_P_H
26 #define KDGANTTVIEW_P_H
28 #include "kdganttview.h"
29 #include "kdganttgraphicsscene.h"
30 #include "kdgantttreeviewrowcontroller.h"
31 #include "kdganttconstraintmodel.h"
32 #include "kdganttconstraintproxy.h"
34 #include "kdganttgraphicsview.h"
35 #include "kdganttdatetimegrid.h"
37 #include "kdganttproxymodel.h"
39 #include <QSplitter>
40 #include <QTreeView>
41 #include <QGraphicsView>
42 #include <QPointer>
44 class QAbstractProxyModel;
45 class QGraphicsView;
46 class QGraphicsScene;
47 class QGraphicsRectItem;
49 namespace KDGantt {
50 class GraphicsItem;
51 class KDGanttTreeView;
53 /*! \internal */
54 class KDGanttTreeView : public QTreeView {
55 public:
56 explicit KDGanttTreeView( QAbstractProxyModel* proxy, QWidget* parent=0 );
57 virtual ~KDGanttTreeView();
59 AbstractRowController* rowController() { return &m_controller; }
60 private:
61 TreeViewRowController m_controller;
64 class View::Private {
65 public:
66 explicit Private(View*);
67 virtual ~Private();
69 void init();
71 GraphicsItem* createItem( ItemType type ) const;
73 void updateScene();
75 // slots
76 void slotCollapsed(const QModelIndex&);
77 void slotExpanded(const QModelIndex&);
78 void slotVerticalScrollValueChanged( int );
79 void slotLeftWidgetVerticalRangeChanged( int, int );
80 void slotGfxViewVerticalRangeChanged( int, int );
82 View* q;
84 QSplitter splitter;
86 /* TODO: Refine/subclass */
87 //KDGanttTreeView treeview;
88 QPointer<QAbstractItemView> leftWidget;
89 AbstractRowController* rowController;
90 GraphicsView gfxview;
91 //KDGanttHeaderWidget headerwidget;
93 QPointer<QAbstractItemModel> model;
94 ProxyModel ganttProxyModel;
95 //KDGanttTreeViewRowController rowController;
96 ConstraintModel mappedConstraintModel;
97 ConstraintProxy constraintProxy;
101 #endif /* KDGANTTVIEW_P_H */