KDGanttViewTaskItem.h
00001 /* -*- Mode: C++ -*- 00002 $Id$ 00003 KDGantt - a multi-platform charting engine 00004 */ 00005 00006 /**************************************************************************** 00007 ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. 00008 ** 00009 ** This file is part of the KDGantt library. 00010 ** 00011 ** This file may be distributed and/or modified under the terms of the 00012 ** GNU General Public License version 2 as published by the Free Software 00013 ** Foundation and appearing in the file LICENSE.GPL included in the 00014 ** packaging of this file. 00015 ** 00016 ** Licensees holding valid commercial KDGantt licenses may use this file in 00017 ** accordance with the KDGantt Commercial License Agreement provided with 00018 ** the Software. 00019 ** 00020 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00021 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00022 ** 00023 ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for 00024 ** information about KDGantt Commercial License Agreements. 00025 ** 00026 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this 00027 ** licensing are not clear to you. 00028 ** 00029 ** As a special exception, permission is given to link this program 00030 ** with any edition of TQt, and distribute the resulting executable, 00031 ** without including the source code for TQt in the source distribution. 00032 ** 00033 **********************************************************************/ 00034 00035 00036 #ifndef KDGANTTVIEWTASKITEM_H 00037 #define KDGANTTVIEWTASKITEM_H 00038 00039 #include "KDGanttViewItem.h" 00040 class KDCanvasRectangle; 00041 class TQBrush; 00042 00043 class KDGanttViewTaskItem : public KDGanttViewItem 00044 { 00045 public: 00046 KDGanttViewTaskItem( KDGanttView* view, 00047 const TQString& lvtext = TQString(), 00048 const TQString& name = TQString() ); 00049 KDGanttViewTaskItem( KDGanttViewItem* parent, 00050 const TQString& lvtext = TQString(), 00051 const TQString& name = TQString() ); 00052 KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after, 00053 const TQString& lvtext = TQString(), 00054 const TQString& name = TQString() ); 00055 KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after, 00056 const TQString& lvtext = TQString(), 00057 const TQString& name = TQString() ); 00058 virtual ~KDGanttViewTaskItem(); 00059 00060 void setStartTime( const TQDateTime& start ); 00061 void setEndTime( const TQDateTime& end ); 00062 00063 protected: 00064 void showItem( bool show = true, int coordY = 0 ); 00065 00066 private: 00067 void initItem(); 00068 void hideMe(); 00069 TQBrush myBrush, undefinedBrush; 00070 bool _showUndefinedBrush; 00071 }; 00072 00073 #endif