kdganttstyleoptionganttitem.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002  ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB.  All rights reserved.
00003  **
00004  ** This file is part of the KD Gantt library.
00005  **
00006  ** This file may be distributed and/or modified under the terms of the
00007  ** GNU General Public License version 2 as published by the Free Software
00008  ** Foundation and appearing in the file LICENSE.GPL included in the
00009  ** packaging of this file.
00010  **
00011  ** Licensees holding valid commercial KD Gantt licenses may use this file in
00012  ** accordance with the KD Gantt Commercial License Agreement provided with
00013  ** the Software.
00014  **
00015  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017  **
00018  ** See http://www.kdab.net/kdgantt for
00019  **   information about KD Gantt Commercial License Agreements.
00020  **
00021  ** Contact info@kdab.net if any conditions of this
00022  ** licensing are not clear to you.
00023  **
00024  **********************************************************************/
00025 #include "kdganttstyleoptionganttitem.h"
00026 
00027 using namespace KDGantt;
00028 
00034 typedef QStyleOptionViewItem BASE;
00035 
00037 StyleOptionGanttItem::StyleOptionGanttItem()
00038     : BASE(),
00039       grid( 0 )
00040 {
00041     type = QStyleOption::SO_CustomBase+89;
00042     version = 1;
00043 }
00044 
00046 StyleOptionGanttItem::StyleOptionGanttItem( const StyleOptionGanttItem& other )
00047     : BASE(other)
00048 {
00049     operator=( other );
00050 }
00051 
00053 StyleOptionGanttItem& StyleOptionGanttItem::operator=( const StyleOptionGanttItem& other )
00054 {
00055     BASE::operator=( other );
00056     boundingRect = other.boundingRect;
00057     itemRect = other.itemRect;
00058     displayPosition = other.displayPosition;
00059     grid = other.grid;
00060     text = other.text;
00061     return *this;
00062 }
00063 
00064 #ifndef QT_NO_DEBUG_STREAM
00065 QDebug operator<<( QDebug dbg, KDGantt::StyleOptionGanttItem::Position p)
00066 {
00067     switch( p ) {
00068     case KDGantt::StyleOptionGanttItem::Left:   dbg << "KDGantt::StyleOptionGanttItem::Left"; break;
00069     case KDGantt::StyleOptionGanttItem::Right:  dbg << "KDGantt::StyleOptionGanttItem::Right"; break;
00070     case KDGantt::StyleOptionGanttItem::Center: dbg << "KDGantt::StyleOptionGanttItem::Center"; break;
00071     default: dbg << static_cast<int>( p );
00072     }
00073     return dbg;
00074 }
00075 
00076 QDebug operator<<( QDebug dbg, const KDGantt::StyleOptionGanttItem& s )
00077 {
00078     dbg << "KDGantt::StyleOptionGanttItem[ boundingRect="<<s.boundingRect
00079         <<", itemRect="<<s.itemRect
00080         <<", displayPosition="<<s.displayPosition
00081         <<", grid="<<s.grid
00082         <<", text="<<s.text
00083         <<"]";
00084     return dbg;
00085 }
00086 
00087 #endif /* QT_NO_DEBUG_STREAM */
00088 
00089 

Generated on Thu Mar 4 23:19:13 2010 for KD Chart 2 by  doxygen 1.5.4