kdganttglobal.h File Reference

#include <Qt>
#include <QDateTime>
#include <QDebug>
#include <QMetaType>
#include "../kdchart_export.h"
#include <QtAlgorithms>
#include <algorithm>

Include dependency graph for kdganttglobal.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  KDGantt

Classes

class  KDGantt::DateTimeSpan
class  KDGantt::Span
 A class representing a start point and a length. More...

Defines

#define KDAB_SET_OBJECT_NAME(x)   __kdab__dereference_for_methodcall( x ).setObjectName( QLatin1String( #x ) )
#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET(X)
#define KDGANTT_DECLARE_PRIVATE_BASE_VALUE(X)
#define KDGANTT_DECLARE_PRIVATE_DERIVED(X)
#define KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
#define KDGANTT_DECLARE_PRIVATE_DERIVED_QWIDGET(X)   KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT( X, QWidget* )
#define KDGANTT_DECLARE_SWAP_BASE(X)
#define KDGANTT_DECLARE_SWAP_DERIVED(X)   void swap( X& other ) { doSwap( other ); }
#define KDGANTT_DECLARE_SWAP_SPECIALISATION(X)
#define KDGANTT_DECLARE_SWAP_SPECIALISATION_DERIVED(X)   KDGANTT_DECLARE_SWAP_SPECIALISATION( X )

Enumerations

enum  KDGantt::ItemDataRole {
  KDGantt::KDGanttRoleBase = Qt::UserRole + 1174,
  KDGantt::StartTimeRole = KDGanttRoleBase + 1,
  KDGantt::EndTimeRole = KDGanttRoleBase + 2,
  KDGantt::TaskCompletionRole = KDGanttRoleBase + 3,
  KDGantt::ItemTypeRole = KDGanttRoleBase + 4,
  KDGantt::LegendRole = KDGanttRoleBase + 5,
  KDGantt::TextPositionRole = KDGanttRoleBase + 6
}
enum  KDGantt::ItemType {
  KDGantt::TypeNone = 0,
  KDGantt::TypeEvent = 1,
  KDGantt::TypeTask = 2,
  KDGantt::TypeSummary = 3,
  KDGantt::TypeMulti = 4,
  KDGantt::TypeUser = 1000
}

Functions

template<typename T>
T & __kdab__dereference_for_methodcall (T *o)
template<typename T>
T & __kdab__dereference_for_methodcall (T &o)
bool KDGantt::operator!= (const DateTimeSpan &s1, const DateTimeSpan &s2)
bool KDGantt::operator!= (const Span &s1, const Span &s2)
QDebug KDCHART_EXPORT operator<< (QDebug dbg, const KDGantt::DateTimeSpan &s)
QDebug KDCHART_EXPORT operator<< (QDebug dbg, const KDGantt::Span &s)
QDebug KDCHART_EXPORT operator<< (QDebug dbg, KDGantt::ItemType t)
QDebug KDCHART_EXPORT operator<< (QDebug dbg, KDGantt::ItemDataRole r)
bool KDGantt::operator== (const DateTimeSpan &s1, const DateTimeSpan &s2)
bool KDGantt::operator== (const Span &s1, const Span &s2)
 Q_DECLARE_TYPEINFO (KDGantt::DateTimeSpan, Q_MOVABLE_TYPE)
 Q_DECLARE_TYPEINFO (KDGantt::Span, Q_MOVABLE_TYPE)


Define Documentation

#define KDAB_SET_OBJECT_NAME (  )     __kdab__dereference_for_methodcall( x ).setObjectName( QLatin1String( #x ) )

Definition at line 46 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC (  ) 

Value:

protected:                                            \
    class Private;                                    \
        friend class Private;                         \
    Private * d_func() { return _d; }                 \
    const Private * d_func() const { return _d; }     \
    explicit inline X( Private * );                   \
private:                                              \
    void init();                                      \
    Private * _d;

Definition at line 123 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC_QWIDGET (  ) 

Value:

protected:                                            \
    class Private;                                    \
        friend class Private;                         \
    Private * d_func() { return _d; }                 \
    const Private * d_func() const { return _d; }     \
    explicit inline X( Private *, QWidget* );         \
private:                                              \
    void init();                                      \
    Private * _d;

Definition at line 148 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_BASE_VALUE (  ) 

Value:

public:                                                      \
    inline void swap( X & other ) { qSwap( _d, other._d ); } \
protected:                                                   \
    class Private;                                           \
        friend class Private;                                \
    Private * d_func() { return _d; }                        \
    const Private * d_func() const { return _d; }            \
private:                                                     \
    void init();                                             \
    Private * _d;

Definition at line 98 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_DERIVED (  ) 

Value:

protected:                                        \
    class Private;                                \
        friend class Private;                     \
    inline Private * d_func();                    \
    inline const Private * d_func() const;        \
    explicit inline X( Private * );               \
private:                                          \
    void init();

Definition at line 61 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT ( X,
ParentType   ) 

Value:

protected:                                        \
    class Private;                                \
        friend class Private;                     \
    inline Private * d_func();                    \
    inline const Private * d_func() const;        \
    explicit inline X( Private *, ParentType );   \
private:                                          \
    void init();

Definition at line 84 of file kdganttglobal.h.

#define KDGANTT_DECLARE_PRIVATE_DERIVED_QWIDGET (  )     KDGANTT_DECLARE_PRIVATE_DERIVED_PARENT( X, QWidget* )

Definition at line 95 of file kdganttglobal.h.

#define KDGANTT_DECLARE_SWAP_BASE (  ) 

Value:

protected: \
    void doSwap( X& other ) \
    { qSwap( _d, other._d); }

Definition at line 185 of file kdganttglobal.h.

#define KDGANTT_DECLARE_SWAP_DERIVED (  )     void swap( X& other ) { doSwap( other ); }

Definition at line 190 of file kdganttglobal.h.

#define KDGANTT_DECLARE_SWAP_SPECIALISATION (  ) 

Value:

template <> inline void qSwap<X>( X & lhs, X & rhs )    \
    { lhs.swap( rhs ); }                                    \
    namespace std {                                         \
        template <> inline void swap<X>( X & lhs, X & rhs ) \
        { lhs.swap( rhs ); }                                \
    }

Definition at line 170 of file kdganttglobal.h.

#define KDGANTT_DECLARE_SWAP_SPECIALISATION_DERIVED (  )     KDGANTT_DECLARE_SWAP_SPECIALISATION( X )

Definition at line 182 of file kdganttglobal.h.


Function Documentation

template<typename T>
T& __kdab__dereference_for_methodcall ( T *  o  ) 

Definition at line 42 of file kdganttglobal.h.

00042                                                        {
00043     return *o;
00044 }

template<typename T>
T& __kdab__dereference_for_methodcall ( T &  o  ) 

Definition at line 37 of file kdganttglobal.h.

00037                                                        {
00038     return o;
00039 }

QDebug KDCHART_EXPORT operator<< ( QDebug  dbg,
const KDGantt::DateTimeSpan s 
)

Definition at line 155 of file kdganttglobal.cpp.

References KDGantt::DateTimeSpan::end(), and KDGantt::DateTimeSpan::start().

00156 {
00157     dbg << "KDGantt::DateTimeSpan[ start="<<s.start()<<" end="<<s.end()<<"]";
00158     return dbg;
00159 }

QDebug KDCHART_EXPORT operator<< ( QDebug  dbg,
const KDGantt::Span s 
)

Definition at line 150 of file kdganttglobal.cpp.

References KDGantt::Span::length(), and KDGantt::Span::start().

00151 {
00152     dbg << "KDGantt::Span[ start="<<s.start()<<" length="<<s.length()<<"]";
00153     return dbg;
00154 }

QDebug KDCHART_EXPORT operator<< ( QDebug  dbg,
KDGantt::ItemType  t 
)

Definition at line 136 of file kdganttglobal.cpp.

References KDGantt::TypeEvent, KDGantt::TypeMulti, KDGantt::TypeNone, KDGantt::TypeSummary, KDGantt::TypeTask, and KDGantt::TypeUser.

00137 {
00138     switch( t ) {
00139     case KDGantt::TypeNone:        dbg << "KDGantt::TypeNone"; break;
00140     case KDGantt::TypeEvent:       dbg << "KDGantt::TypeEvent"; break;
00141     case KDGantt::TypeTask:       dbg << "KDGantt::TypeTask"; break;
00142     case KDGantt::TypeSummary:     dbg << "KDGantt::TypeSummary"; break;
00143     case KDGantt::TypeMulti:       dbg << "KDGantt::TypeMulti"; break;
00144     case KDGantt::TypeUser:        dbg << "KDGantt::TypeUser"; break;
00145     default: dbg << static_cast<int>(t);
00146     }
00147     return dbg;
00148 }

QDebug KDCHART_EXPORT operator<< ( QDebug  dbg,
KDGantt::ItemDataRole  r 
)

Definition at line 123 of file kdganttglobal.cpp.

References KDGantt::EndTimeRole, KDGantt::ItemTypeRole, KDGantt::LegendRole, KDGantt::StartTimeRole, and KDGantt::TaskCompletionRole.

00124 {
00125   switch(r){
00126   case KDGantt::StartTimeRole:      dbg << "KDGantt::StartTimeRole"; break;
00127   case KDGantt::EndTimeRole:        dbg << "KDGantt::EndTimeRole"; break;
00128   case KDGantt::TaskCompletionRole: dbg << "KDGantt::TaskCompletionRole"; break;
00129   case KDGantt::ItemTypeRole:       dbg << "KDGantt::ItemTypeRole"; break;
00130   case KDGantt::LegendRole:         dbg << "KDGantt::LegendRole"; break;
00131   default: dbg << static_cast<Qt::ItemDataRole>(r);
00132   }
00133   return dbg;
00134 }

Q_DECLARE_TYPEINFO ( KDGantt::DateTimeSpan  ,
Q_MOVABLE_TYPE   
)

Q_DECLARE_TYPEINFO ( KDGantt::Span  ,
Q_MOVABLE_TYPE   
)


Generated on Thu Mar 4 23:24:06 2010 for KD Chart 2 by  doxygen 1.5.4