kdgantt

KDGanttViewTaskItem.h

00001 /* -*- Mode: C++ -*-
00002    $Id: KDGanttViewTaskItem.h 297547 2004-03-21 13:34:17Z rogowski $
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 Qt, and distribute the resulting executable,
00031  ** without including the source code for Qt 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 QBrush;
00042 
00043 class KDGanttViewTaskItem : public KDGanttViewItem
00044 {
00045 public:
00046     KDGanttViewTaskItem( KDGanttView* view,
00047                             const QString& lvtext = QString::null,
00048                             const QString& name = QString::null );
00049     KDGanttViewTaskItem( KDGanttViewItem* parent,
00050                             const QString& lvtext = QString::null,
00051                             const QString& name = QString::null );
00052     KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after,
00053                             const QString& lvtext = QString::null,
00054                             const QString& name = QString::null );
00055     KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after,
00056                             const QString& lvtext = QString::null,
00057                             const QString& name = QString::null );
00058     virtual ~KDGanttViewTaskItem();
00059 
00060     void setStartTime( const QDateTime& start );
00061     void setEndTime( const QDateTime& end );
00062 
00063 private:
00064     void showItem( bool show = true, int coordY = 0 );
00065     void initItem();
00066     void hideMe();
00067     QBrush myBrush, undefinedBrush;
00068     bool _showUndefinedBrush;
00069 };
00070 
00071 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys