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

kdgantt2

  • sources
  • kde-4.12
  • kdepim
  • kdgantt2
kdganttgraphicsview_p.h
Go to the documentation of this file.
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.
10  **
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.
14  **
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.
17  **
18  ** See http://www.kdab.net/kdgantt for
19  ** information about KD Gantt Commercial License Agreements.
20  **
21  ** Contact info@kdab.net if any conditions of this
22  ** licensing are not clear to you.
23  **
24  **********************************************************************/
25 #ifndef KDGANTTGRAPHICSVIEW_P_H
26 #define KDGANTTGRAPHICSVIEW_P_H
27 
28 #include "kdganttgraphicsview.h"
29 #include "kdganttgraphicsscene.h"
30 #include "kdganttdatetimegrid.h"
31 
32 #include <QPointer>
33 
34 namespace KDGantt {
35  class HeaderWidget : public QWidget {
36  Q_OBJECT
37  public:
38  explicit HeaderWidget( GraphicsView* parent );
39  virtual ~HeaderWidget();
40 
41  GraphicsView* view() const { return qobject_cast<GraphicsView*>( parent() );}
42 
43  public Q_SLOTS:
44  void scrollTo( int );
45  protected:
46  /*reimp*/ void paintEvent( QPaintEvent* ev );
47 #ifndef QT_NO_CONTEXTMENU
48  /*reimp*/ void contextMenuEvent( QContextMenuEvent* ev );
49 #endif
50  private:
51  qreal m_offset;
52  };
53 
54  class GraphicsView::Private {
55  Q_DISABLE_COPY( Private )
56  public:
57  explicit Private(GraphicsView* _q);
58 
59  void updateHeaderGeometry();
60 
61  void slotGridChanged();
62  void slotHorizontalScrollValueChanged( int val );
63 
64  /* slots for QAbstractItemModel signals */
65  void slotColumnsInserted( const QModelIndex& parent, int start, int end );
66  void slotColumnsRemoved( const QModelIndex& parent, int start, int end );
67  void slotDataChanged( const QModelIndex& topLeft, const QModelIndex& bottomRight );
68  void slotLayoutChanged();
69  void slotModelReset();
70  void slotRowsInserted( const QModelIndex& parent, int start, int end );
71  void slotRowsAboutToBeRemoved( const QModelIndex& parent, int start, int end );
72  void slotRowsRemoved( const QModelIndex& parent, int start, int end );
73 
74  void slotItemClicked( const QModelIndex& idx );
75  void slotItemDoubleClicked( const QModelIndex& idx );
76 
77  void slotHeaderContextMenuRequested( const QPoint& pt );
78 
79  GraphicsView* q;
80  AbstractRowController* rowcontroller;
81  HeaderWidget headerwidget;
82  GraphicsScene scene;
83  };
84 }
85 
86 #endif /* KDGANTTGRAPHICSVIEW_P_H */
87 
KDGantt::GraphicsView::Private::slotHeaderContextMenuRequested
void slotHeaderContextMenuRequested(const QPoint &pt)
Definition: kdganttgraphicsview.cpp:278
KDGantt::GraphicsView
The GraphicsView class provides a model/view implementation of a gantt chart.
Definition: kdganttgraphicsview.h:44
KDGantt::GraphicsView::Private::slotGridChanged
void slotGridChanged()
Definition: kdganttgraphicsview.cpp:172
QWidget
KDGantt::GraphicsView::Private::slotLayoutChanged
void slotLayoutChanged()
Definition: kdganttgraphicsview.cpp:220
KDGantt::GraphicsView::Private::slotRowsInserted
void slotRowsInserted(const QModelIndex &parent, int start, int end)
Definition: kdganttgraphicsview.cpp:232
KDGantt::HeaderWidget::view
GraphicsView * view() const
Definition: kdganttgraphicsview_p.h:41
KDGantt::HeaderWidget::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *ev)
Definition: kdganttgraphicsview.cpp:75
KDGantt::GraphicsView::Private::slotModelReset
void slotModelReset()
Definition: kdganttgraphicsview.cpp:226
KDGantt::HeaderWidget::paintEvent
void paintEvent(QPaintEvent *ev)
Definition: kdganttgraphicsview.cpp:68
KDGantt::GraphicsScene
Definition: kdganttgraphicsscene.h:48
KDGantt::GraphicsView::Private::Private
Private(GraphicsView *_q)
Definition: kdganttgraphicsview.cpp:158
KDGantt::GraphicsView::Private::slotDataChanged
void slotDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: kdganttgraphicsview.cpp:211
KDGantt::GraphicsView::Private::scene
GraphicsScene scene
Definition: kdganttgraphicsview_p.h:82
kdganttdatetimegrid.h
KDGantt::GraphicsView::Private::slotItemDoubleClicked
void slotItemDoubleClicked(const QModelIndex &idx)
Definition: kdganttgraphicsview.cpp:270
KDGantt::GraphicsView::Private::slotItemClicked
void slotItemClicked(const QModelIndex &idx)
Definition: kdganttgraphicsview.cpp:262
KDGantt::GraphicsView::Private::headerwidget
HeaderWidget headerwidget
Definition: kdganttgraphicsview_p.h:81
KDGantt::GraphicsView::Private::slotHorizontalScrollValueChanged
void slotHorizontalScrollValueChanged(int val)
Definition: kdganttgraphicsview.cpp:180
KDGantt::HeaderWidget::~HeaderWidget
virtual ~HeaderWidget()
Definition: kdganttgraphicsview.cpp:56
kdganttgraphicsview.h
KDGantt::HeaderWidget::HeaderWidget
HeaderWidget(GraphicsView *parent)
Definition: kdganttgraphicsview.cpp:50
KDGantt::GraphicsView::Private::q
GraphicsView * q
Definition: kdganttgraphicsview_p.h:79
KDGantt::GraphicsView::Private::slotColumnsInserted
void slotColumnsInserted(const QModelIndex &parent, int start, int end)
Definition: kdganttgraphicsview.cpp:190
KDGantt::GraphicsView::Private::slotRowsRemoved
void slotRowsRemoved(const QModelIndex &parent, int start, int end)
Definition: kdganttgraphicsview.cpp:251
KDGantt::GraphicsView::Private::slotColumnsRemoved
void slotColumnsRemoved(const QModelIndex &parent, int start, int end)
Definition: kdganttgraphicsview.cpp:202
KDGantt::GraphicsView::Private::rowcontroller
AbstractRowController * rowcontroller
Definition: kdganttgraphicsview_p.h:80
KDGantt::GraphicsView::Private::updateHeaderGeometry
void updateHeaderGeometry()
Definition: kdganttgraphicsview.cpp:163
KDGantt::HeaderWidget
Definition: kdganttgraphicsview_p.h:35
KDGantt::GraphicsView::Private
Definition: kdganttgraphicsview_p.h:54
KDGantt::HeaderWidget::scrollTo
void scrollTo(int)
Definition: kdganttgraphicsview.cpp:60
KDGantt::AbstractRowController
Abstract baseclass for row controllers. A row controller is used by the GraphicsView to nagivate the ...
Definition: kdganttabstractrowcontroller.h:34
KDGantt::GraphicsView::Private::slotRowsAboutToBeRemoved
void slotRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: kdganttgraphicsview.cpp:240
kdganttgraphicsscene.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdgantt2

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal