kdganttstyleoptionganttitem.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Chart library.
00005 **
00006 ** Licensees holding valid commercial KD Chart licenses may use this file in
00007 ** accordance with the KD Chart Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
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 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #include "kdganttstyleoptionganttitem.h"
00024 
00025 using namespace KDGantt;
00026 
00032 typedef QStyleOptionViewItem BASE;
00033 
00035 StyleOptionGanttItem::StyleOptionGanttItem()
00036     : BASE(),
00037       grid( 0 )
00038 {
00039     type = QStyleOption::SO_CustomBase+89;
00040     version = 1;
00041 }
00042 
00044 StyleOptionGanttItem::StyleOptionGanttItem( const StyleOptionGanttItem& other )
00045     : BASE(other)
00046 {
00047     operator=( other );
00048 }
00049 
00051 StyleOptionGanttItem& StyleOptionGanttItem::operator=( const StyleOptionGanttItem& other )
00052 {
00053     BASE::operator=( other );
00054     boundingRect = other.boundingRect;
00055     itemRect = other.itemRect;
00056     displayPosition = other.displayPosition;
00057     grid = other.grid;
00058     text = other.text;
00059     return *this;
00060 }
00061 
00062 #ifndef QT_NO_DEBUG_STREAM
00063 QDebug operator<<( QDebug dbg, KDGantt::StyleOptionGanttItem::Position p)
00064 {
00065     switch( p ) {
00066     case KDGantt::StyleOptionGanttItem::Left:   dbg << "KDGantt::StyleOptionGanttItem::Left"; break;
00067     case KDGantt::StyleOptionGanttItem::Right:  dbg << "KDGantt::StyleOptionGanttItem::Right"; break;
00068     case KDGantt::StyleOptionGanttItem::Center: dbg << "KDGantt::StyleOptionGanttItem::Center"; break;
00069     case KDGantt::StyleOptionGanttItem::Hidden: dbg << "KDGantt::StyleOptionGanttItem::Hidden"; break;
00070     default: dbg << static_cast<int>( p );
00071     }
00072     return dbg;
00073 }
00074 
00075 QDebug operator<<( QDebug dbg, const KDGantt::StyleOptionGanttItem& s )
00076 {
00077     dbg << "KDGantt::StyleOptionGanttItem[ boundingRect="<<s.boundingRect
00078         <<", itemRect="<<s.itemRect
00079         <<", displayPosition="<<s.displayPosition
00080         <<", grid="<<s.grid
00081         <<", text="<<s.text
00082         <<"]";
00083     return dbg;
00084 }
00085 
00086 #endif /* QT_NO_DEBUG_STREAM */
00087 
00088 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/