• 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
kdganttitemdelegate.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 KDGANTTITEMDELEGATE_H
26 #define KDGANTTITEMDELEGATE_H
27 
28 #include <QItemDelegate>
29 #include <QBrush>
30 #include <QPen>
31 #include <QDebug>
32 
33 #include "kdgantt_export.h"
34 #include "kdganttglobal.h"
35 
36 namespace KDGantt {
37  class StyleOptionGanttItem;
38 
39  class KDGANTT_EXPORT ItemDelegate : public QItemDelegate {
40  Q_OBJECT
41  KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC( ItemDelegate )
42  public:
43  enum InteractionState { State_None = 0,
44  State_Move,
45  State_ExtendLeft,
46  State_ExtendRight,
47  State_DragConstraint
48  };
49 
50  explicit ItemDelegate( QObject* parent = 0 );
51  virtual ~ItemDelegate();
52 
53  void setDefaultBrush( ItemType type, const QBrush& brush );
54  QBrush defaultBrush( ItemType type ) const;
55 
56  void setDefaultPen( ItemType type, const QPen& pen );
57  QPen defaultPen( ItemType type ) const;
58 
59  virtual Span itemBoundingSpan(const StyleOptionGanttItem& opt, const QModelIndex& idx) const;
60  virtual QRectF constraintBoundingRect( const QPointF& start, const QPointF& end ) const;
61  virtual InteractionState interactionStateFor( const QPointF& pos,
62  const StyleOptionGanttItem& opt,
63  const QModelIndex& idx ) const;
64 
65  virtual void paintGanttItem( QPainter* p, const StyleOptionGanttItem& opt, const QModelIndex& idx );
66  virtual void paintConstraintItem( QPainter* p, const QStyleOptionGraphicsItem& opt,
67  const QPointF& start, const QPointF& end, const QPen& pen );
68  };
69 }
70 
71 #ifndef QT_NO_DEBUG_STREAM
72 QDebug operator<<( QDebug dbg, KDGantt::ItemDelegate::InteractionState );
73 #endif
74 
75 #endif /* KDGANTTITEMDELEGATE_H */
76 
KDGantt::ItemDelegate
Class used to render gantt items in a KDGantt::GraphicsView.
Definition: kdganttitemdelegate.h:39
KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC
#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
Definition: kdganttglobal.h:121
kdgantt_export.h
KDGantt::ItemDelegate::InteractionState
InteractionState
Definition: kdganttitemdelegate.h:43
kdganttglobal.h
KDGantt::ItemDelegate::State_ExtendRight
Definition: kdganttitemdelegate.h:46
KDGantt::ItemType
ItemType
Definition: kdganttglobal.h:211
KDGANTT_EXPORT
#define KDGANTT_EXPORT
Definition: kdgantt_export.h:40
QObject
KDGantt::ItemDelegate::State_ExtendLeft
Definition: kdganttitemdelegate.h:45
KDGantt::Span
A class representing a start point and a length.
Definition: kdganttglobal.h:220
operator<<
QDebug operator<<(QDebug dbg, KDGantt::ItemDelegate::InteractionState)
Definition: kdganttitemdelegate.cpp:42
QItemDelegate
KDGantt::ItemDelegate::State_Move
Definition: kdganttitemdelegate.h:44
KDGantt::StyleOptionGanttItem
QStyleOption subclass for gantt items.
Definition: kdganttstyleoptionganttitem.h:36
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