kdgantt

KDGanttView.h

00001 /* -*- Mode: C++ -*-
00002    $Id: KDGanttView.h 837187 2008-07-24 05:48:39Z pradeepto $
00003    KDChart - a multi-platform charting engine
00004 */
00005 
00006 /****************************************************************************
00007  ** Copyright (C)  2001-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 #ifndef KDGANTTVIEW_H
00036 #define KDGANTTVIEW_H
00037 
00038 #include <qptrlist.h>
00039 #include <qwidget.h>
00040 #include <qlistview.h>
00041 #include <qsplitter.h>
00042 #include <qlayout.h>
00043 #include <qfont.h>
00044 #include <qdom.h>
00045 #include <qvbox.h>
00046 
00047 
00048 #include "KDGanttViewItem.h"
00049 #include "KDGanttViewTaskLinkGroup.h"
00050 #include "KDGanttMinimizeSplitter.h"
00051 #include "KDGanttViewItemDrag.h"
00052 
00053 class KDIntervalColorRectangle;
00054 class KDGanttViewTaskLink;
00055 class QPrinter;
00056 class QIODevice;
00057 class itemAttributeDialog;
00058 class KDListView;
00059 class KDGanttViewItem;
00060 class KDGanttViewEventItem;
00061 class KDGanttViewTaskItem;
00062 class KDGanttViewSummaryItem;
00063 class KDTimeTableWidget;
00064 class KDTimeHeaderWidget;
00065 class KDLegendWidget;
00066 class KDGanttCanvasView;
00067 class KDGanttViewTaskLink;
00068 class KDGanttMinimizeSplitter;
00069 
00070 class KDGanttView : public KDGanttMinimizeSplitter
00071 {
00072     Q_OBJECT
00073 
00074     Q_PROPERTY( bool showLegend READ showLegend WRITE setShowLegend )
00075     Q_PROPERTY( bool showListView READ showListView WRITE setShowListView )
00076     Q_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks )
00077     Q_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled )
00078     Q_PROPERTY( QDateTime horizonStart READ horizonStart WRITE setHorizonStart )
00079     Q_PROPERTY( QDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
00080     Q_PROPERTY( Scale scale READ scale WRITE setScale )
00081     Q_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat )
00082     Q_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat )
00083     Q_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks )
00084     Q_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks )
00085     Q_PROPERTY( bool editable READ editable WRITE setEditable )
00086     Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
00087     Q_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount )
00088     Q_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount )
00089     Q_PROPERTY( int autoScaleMinorTickCount READ autoScaleMinorTickCount WRITE setAutoScaleMinorTickCount )
00090     Q_PROPERTY( Scale maximumScale READ maximumScale WRITE setMaximumScale )
00091     Q_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale )
00092     Q_PROPERTY( int minimumColumnWidth READ minimumColumnWidth WRITE setMinimumColumnWidth )
00093     Q_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth )
00094     Q_PROPERTY( QColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor )
00095     Q_PROPERTY( QColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
00096     Q_PROPERTY( QColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
00097     Q_PROPERTY( QColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor )
00098     Q_PROPERTY( QColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor )
00099     Q_PROPERTY( double zoomFactor READ zoomFactor )
00100     Q_PROPERTY( bool showHeaderPopupMenu READ showHeaderPopupMenu WRITE setShowHeaderPopupMenu )
00101     Q_PROPERTY( bool showTimeTablePopupMenu READ showTimeTablePopupMenu WRITE setShowTimeTablePopupMenu )
00102     Q_PROPERTY( bool headerVisible READ headerVisible WRITE setHeaderVisible )
00103     Q_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton )
00104     Q_PROPERTY( bool legendIsDockwindow READ legendIsDockwindow WRITE setLegendIsDockwindow )
00105     Q_PROPERTY( bool displayEmptyTasksAsLine READ displayEmptyTasksAsLine WRITE setDisplayEmptyTasksAsLine )
00106     Q_PROPERTY( QBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
00107     Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
00108     Q_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled )
00109     Q_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode )
00110 
00111     Q_ENUMS( Scale )
00112     Q_ENUMS( YearFormat )
00113     Q_ENUMS( HourFormat )
00114 
00115 public:
00116     enum Scale { Minute, Hour, Day, Week, Month, Auto };
00117     enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe, NoDate };
00118     enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit };
00119     enum RepaintMode { No, Medium, Always };
00120 
00121     KDGanttView( QWidget* parent = 0, const char* name = 0 );
00122     ~KDGanttView();
00123 
00124     virtual void show();
00125     virtual bool close ( bool alsoDelete );
00126     void setRepaintMode( RepaintMode mode );
00127     void setUpdateEnabled( bool enable);
00128     bool getUpdateEnabled( )const;
00129 
00130     void setGanttMaximumWidth( int w );
00131     int ganttMaximumWidth() const;
00132     void setShowLegend( bool show );
00133     bool showLegend() const;
00134     void setLegendIsDockwindow( bool dock );
00135     bool legendIsDockwindow( ) const;
00136     QDockWindow* legendDockwindow( ) const;
00137     void setShowListView( bool show );
00138     bool showListView() const;
00139     void setEditorEnabled( bool enable );
00140     bool editorEnabled() const;
00141     void setListViewWidth( int );
00142     int listViewWidth();
00143     void setEditable( bool editable );
00144     bool editable() const;
00145     void setCalendarMode( bool mode );
00146     bool calendarMode() const;
00147     void setDisplaySubitemsAsGroup( bool show );
00148     bool displaySubitemsAsGroup() const;
00149     void setDisplayEmptyTasksAsLine( bool show );
00150     bool displayEmptyTasksAsLine() const;
00151 
00152     void setHorBackgroundLines( int count = 2,
00153                 QBrush brush =
00154                 QBrush( QColor ( 200,200,200 ),
00155                     Qt::Dense6Pattern ));
00156     int horBackgroundLines( QBrush& brush );
00157     bool saveProject( QIODevice* );
00158     bool loadProject( QIODevice* );
00159     void print( QPrinter* printer = 0 ,
00160         bool printListView = true, bool printTimeLine = true,
00161         bool printLegend = false );
00162     QSize drawContents( QPainter* p = 0,
00163               bool drawListView = true, bool drawTimeLine = true,
00164               bool drawLegend = false );
00165     void setZoomFactor( double factor, bool absolute );
00166     double zoomFactor() const;
00167     void zoomToFit();
00168     void ensureVisible( KDGanttViewItem* );
00169     void center( KDGanttViewItem* );
00170     void centerTimeline( const QDateTime& center );
00171     void centerTimelineAfterShow( const QDateTime& center );
00172     void setTimelineToStart();
00173     void setTimelineToEnd();
00174     void addTicksLeft( int num = 1 );
00175     void addTicksRight( int num = 1 );
00176     void setShowTaskLinks( bool show );
00177     bool showTaskLinks() const;
00178 
00179     void setFont(const QFont& f);
00180     void setShowHeaderPopupMenu( bool show = true,
00181                                  bool showZoom = true,
00182                                  bool showScale = true,
00183                                  bool showTime = true,
00184                                  bool showYear = true,
00185                                  bool showGrid = true,
00186                                  bool showPrint = false);
00187     bool showHeaderPopupMenu() const;
00188     void setShowTimeTablePopupMenu( bool );
00189     bool showTimeTablePopupMenu() const;
00190     void setShapes( KDGanttViewItem::Type type,
00191                     KDGanttViewItem::Shape start,
00192                     KDGanttViewItem::Shape middle,
00193                     KDGanttViewItem::Shape end,
00194             bool overwriteExisting = true  );
00195     bool shapes( KDGanttViewItem::Type type,
00196                  KDGanttViewItem::Shape& start,
00197                  KDGanttViewItem::Shape& middle,
00198                  KDGanttViewItem::Shape& end ) const;
00199     void setColors( KDGanttViewItem::Type type,
00200                     const QColor& start, const QColor& middle,
00201                     const QColor& end,
00202             bool overwriteExisting = true );
00203     bool colors( KDGanttViewItem::Type type,
00204                  QColor& start, QColor& middle, QColor& end ) const;
00205     void setDefaultColor( KDGanttViewItem::Type type,
00206               const QColor&,
00207               bool overwriteExisting = true );
00208     QColor defaultColor( KDGanttViewItem::Type type ) const;
00209     void setHighlightColors( KDGanttViewItem::Type type,
00210                              const QColor& start, const QColor& middle,
00211                              const QColor& end,
00212                  bool overwriteExisting = true );
00213     bool highlightColors( KDGanttViewItem::Type type,
00214                           QColor& start, QColor& middle, QColor& end ) const;
00215     void setDefaultHighlightColor( KDGanttViewItem::Type type,
00216                    const QColor&,
00217                    bool overwriteExisting = true );
00218     QColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
00219     void setTextColor( const QColor& color );
00220     QColor textColor() const;
00221 
00222     void setNoInformationBrush( const QBrush& brush );
00223     QBrush noInformationBrush() const;
00224 
00225     // Link-related stuff
00226     QPtrList<KDGanttViewTaskLink> taskLinks() const;
00227     QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
00228 
00229     // Legend-related stuff
00230     void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text );
00231     void clearLegend();
00232     // Header-related stuff
00233     void setHorizonStart( const QDateTime& start );
00234     QDateTime horizonStart() const;
00235     void setHorizonEnd( const QDateTime& start );
00236     QDateTime horizonEnd() const;
00237     void setScale( Scale );
00238     Scale scale() const;
00239     void setMaximumScale( Scale );
00240     Scale maximumScale() const;
00241     void setMinimumScale( Scale );
00242     Scale minimumScale() const;
00243     void setAutoScaleMinorTickCount( int count );
00244     int autoScaleMinorTickCount() const;
00245     void setMajorScaleCount( int count );
00246     int majorScaleCount() const;
00247     void setMinorScaleCount( int count );
00248     int minorScaleCount() const;
00249     void setMinimumColumnWidth( int width );
00250     int minimumColumnWidth() const;
00251     void setYearFormat( YearFormat format );
00252     YearFormat yearFormat() const;
00253     void setHourFormat( HourFormat format );
00254     HourFormat hourFormat() const;
00255     void setShowMajorTicks( bool );
00256     bool showMajorTicks() const;
00257     void setShowMinorTicks( bool );
00258     bool showMinorTicks() const;
00259     void setColumnBackgroundColor( const QDateTime& column,
00260                                    const QColor& color,
00261                    Scale mini =  KDGanttView::Minute ,
00262                    Scale maxi =  KDGanttView::Month);
00263 #if 0
00264    // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
00265     void setIntervalBackgroundColor( const QDateTime& start,
00266                      const QDateTime& end,
00267                      const QColor& color,
00268                      Scale mini =  KDGanttView::Minute ,
00269                      Scale maxi =  KDGanttView::Month);
00270     bool changeBackgroundInterval( const QDateTime& oldstart,
00271                    const QDateTime& oldend,
00272                    const QDateTime& newstart,
00273                    const QDateTime& newend );
00274     bool deleteBackgroundInterval( const QDateTime& start,
00275                    const QDateTime& end );
00276 #endif
00277     void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
00278     void clearBackgroundColor();
00279     QColor columnBackgroundColor( const QDateTime& column ) const;
00280     void setWeekendBackgroundColor( const QColor& color );
00281     QColor weekendBackgroundColor() const;
00282     void setWeekdayBackgroundColor( const QColor& color, int weekday );
00283     QColor weekdayBackgroundColor(int weekday) const;
00284 
00285 
00286     void setPaletteBackgroundColor(const QColor& col);
00287     void setGvBackgroundColor ( const QColor & );
00288     void setLvBackgroundColor ( const QColor & );
00289     void setTimeHeaderBackgroundColor ( const QColor & );
00290     void setLegendHeaderBackgroundColor ( const QColor & );
00291     QColor gvBackgroundColor () const ;
00292     QColor lvBackgroundColor () const ;
00293     QColor timeHeaderBackgroundColor () const ;
00294     QColor legendHeaderBackgroundColor () const ;
00295     void addUserdefinedLegendHeaderWidget( QWidget * w );
00296 
00297     void setWeekendDays( int start, int end );
00298     void weekendDays( int& start, int& end ) const;
00299 
00300     static QPixmap getPixmap( KDGanttViewItem::Shape shape, const QColor& shapeColor,const QColor& backgroundColor, int itemSize);
00301 
00302     void setHeaderVisible( bool );
00303     bool headerVisible() const;
00304 
00305     void setShowLegendButton( bool show );
00306     bool showLegendButton() const;
00307 
00308     // Pass-through methods from QListView
00309     virtual int addColumn( const QString& label, int width = -1 );
00310     virtual int addColumn( const QIconSet& iconset, const QString& label,
00311                            int width = -1 );
00312     virtual void removeColumn( int index );
00313     KDGanttViewItem* selectedItem() const;
00314     void setSelected( KDGanttViewItem*, bool );
00315     KDGanttViewItem* firstChild() const;
00316     KDGanttViewItem* lastItem() const;
00317     int childCount() const;
00318     void clear();
00319 
00320     void setDragEnabled( bool b );
00321     void setDropEnabled( bool b );
00322     void setDragDropEnabled( bool b );
00323     bool dragEnabled() const;
00324     bool dropEnabled() const;
00325     bool isDragEnabled() const;
00326     bool isDropEnabled() const;
00327 
00328     virtual bool lvDropEvent ( QDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
00329     virtual void lvStartDrag (KDGanttViewItem*);
00330     virtual bool lvDragMoveEvent (QDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
00331     virtual void lvDragEnterEvent (QDragEnterEvent * e );
00332     virtual QSize sizeHint() const;
00333     KDGanttViewItem* getItemByName( const QString& name ) const;
00334     QDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
00335     KDGanttViewItem* getItemByListViewPos( const QPoint& pos ) const;
00336     KDGanttViewItem* getItemByGanttViewPos( const QPoint& pos ) const;
00337     KDGanttViewItem* getItemAt( const QPoint& pos , bool global = true ) const;
00338 
00339     // setting the vertical scrollbars of the listview and the timetable
00340     // default values: always off for the listview, always on for the timetable
00341     void setLvVScrollBarMode( QScrollView::ScrollBarMode );
00342     void setGvVScrollBarMode( QScrollView::ScrollBarMode );
00343 
00344     void setLinkItemsEnabled(bool on);
00345     bool isLinkItemsEnabled() const;
00346 
00347     KDTimeTableWidget * timeTableWidget() { return myTimeTable; }
00348     KDTimeHeaderWidget * timeHeaderWidget() { return myTimeHeader; }
00349 
00350     void setFixedHorizon( bool f ) { mFixedHorizon = f; }
00351 
00352 public slots:
00353     void editItem( KDGanttViewItem* );
00354     void zoomToSelection( const QDateTime& start,  const QDateTime&  end);
00355 
00356 signals:
00357     void timeIntervallSelected( const QDateTime& start,  const QDateTime&  end);
00358     void timeIntervalSelected( const QDateTime& start,  const QDateTime&  end);
00359     void rescaling( KDGanttView::Scale );
00360     void intervalColorRectangleMoved( const QDateTime& start, const QDateTime& end );
00361 
00362     // the following signals are emitted if an item is clicked in the
00363     // listview (inclusive) or in the ganttview
00364     void itemLeftClicked( KDGanttViewItem* );
00365     void itemMidClicked( KDGanttViewItem* );
00366     void itemRightClicked( KDGanttViewItem* );
00367     void itemDoubleClicked( KDGanttViewItem* );
00368 
00369     // The following signal is emitted when two items shall be linked
00370     void linkItems( KDGanttViewItem* from, KDGanttViewItem* to, int linkType );
00371 
00372     // the following signals are emitted if an item is clicked in the
00373     // listview (exlusive) or in the ganttview
00374     // gv... means item in ganttview clicked
00375 
00376     void gvCurrentChanged( KDGanttViewItem* );
00377     void gvItemLeftClicked( KDGanttViewItem* );
00378     void gvItemMidClicked( KDGanttViewItem* );
00379     void gvItemRightClicked( KDGanttViewItem* );
00380   // the point is the global position!!
00381     void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos);
00382     void gvItemDoubleClicked( KDGanttViewItem* );
00383     // the point is the global position!!
00384     void gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos );
00385     void gvItemMoved( KDGanttViewItem* );
00386 
00387     // lv... means item in listview clicked
00388     void lvCurrentChanged( KDGanttViewItem* );
00389     void lvItemRenamed( KDGanttViewItem* , int col, const QString & text  );
00390     void lvMouseButtonPressed(  int button, KDGanttViewItem * item, const QPoint & pos, int c );
00391     void lvItemLeftClicked( KDGanttViewItem* );
00392     void lvItemMidClicked( KDGanttViewItem* );
00393     void lvItemRightClicked( KDGanttViewItem* );
00394     void lvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos, int col );
00395     void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos, int c );
00396     void lvItemDoubleClicked( KDGanttViewItem* );
00397     void lvSelectionChanged( KDGanttViewItem* );
00398 
00399     void itemConfigured( KDGanttViewItem* );
00400 
00401     void taskLinkLeftClicked( KDGanttViewTaskLink* );
00402     void taskLinkMidClicked( KDGanttViewTaskLink* );
00403     void taskLinkRightClicked( KDGanttViewTaskLink* );
00404     void taskLinkDoubleClicked( KDGanttViewTaskLink* );
00405 
00406     void dateTimeDoubleClicked (const QDateTime& );
00407 
00408     void dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
00409 private slots:
00410     void forceRepaint( int val = 0 );
00411     void slotSelectionChanged( QListViewItem* item );
00412     void slotCurrentChanged ( QListViewItem * item );
00413     void slotItemRenamed ( QListViewItem * item, int col, const QString & text  );
00414     void slotMouseButtonPressed ( int button, QListViewItem * item, const QPoint & pos, int c );
00415     void slotmouseButtonClicked ( int button, QListViewItem * item, const QPoint & pos, int c );
00416     void slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col );
00417     void slotHeaderSizeChanged();
00418     void addTickRight();
00419     void addTickLeft();
00420     void enableAdding( int );
00421     void slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
00422 private:
00423     struct legendItem {
00424       KDGanttViewItem::Shape shape;
00425       QColor color;
00426       QString text;
00427     };
00428     bool loadXML( const QDomDocument& doc );
00429     QDomDocument saveXML( bool withPI = true ) const;
00430 
00431     void emptySpaceDoubleClicked( QMouseEvent* e );
00432 
00433     static QString scaleToString( Scale scale );
00434     static QString yearFormatToString( YearFormat format );
00435     static QString hourFormatToString( HourFormat format );
00436     static Scale stringToScale( const QString& string );
00437     static YearFormat stringToYearFormat( const QString& string );
00438     static HourFormat stringToHourFormat( const QString& string );
00439 
00440     // PENDING(lutz) Review these
00441     friend class KDGanttCanvasView;
00442     friend class KDGanttViewEventItem;
00443     friend class KDGanttViewItem;
00444     friend class KDGanttViewTaskItem;
00445     friend class KDGanttViewSummaryItem;
00446     friend class KDGanttViewTaskLink;
00447     friend class KDGanttViewCalendarItem;
00448     friend class KDTimeTableWidget;
00449     friend class KDTimeHeaderWidget;
00450     friend class KDListView;
00451     friend class KDGanttViewTaskLinkGroup;
00452     friend class KDLegendWidget;
00453 
00454     KDListView * myListView;
00455     KDGanttCanvasView *myCanvasView;
00456     KDTimeHeaderWidget * myTimeHeader;
00457     KDTimeTableWidget * myTimeTable;
00458     KDLegendWidget * myLegend;
00459     itemAttributeDialog* myItemAttributeDialog;
00460     QVBox * leftWidget,  * rightWidget;
00461     QHBox * spacerLeft;
00462     QScrollView* myTimeHeaderScroll;
00463     QHBox* myTimeHeaderContainer ;
00464     QWidget* timeHeaderSpacerWidget;
00465     QWidget *spacerRight;
00466 
00467     bool listViewIsVisible;
00468     bool chartIsEditable;
00469     bool editorIsEnabled;
00470     bool _displaySubitemsAsGroup;
00471     bool _displayEmptyTasksAsLine;
00472     bool _showLegendButton;
00473     bool _showHeader;
00474     bool _enableAdding;
00475     bool fCenterTimeLineAfterShow;
00476     bool fDragEnabled;
00477     bool fDropEnabled;
00478     bool closingBlocked;
00479     QDateTime dtCenterTimeLineAfterShow;
00480     KDGanttViewItem::Shape myDefaultShape [9];
00481     QColor myColor[9],myColorHL[9];
00482     bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3];
00483     QColor myTextColor;
00484     QColor myDefaultColor[3],myDefaultColorHL[3];
00485     QPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
00486     QPtrList<legendItem> *myLegendItems;
00487     void addTaskLinkGroup(KDGanttViewTaskLinkGroup*);
00488     void removeTaskLinkGroup(KDGanttViewTaskLinkGroup*);
00489     int getIndex( KDGanttViewItem::Type ) const;
00490     void notifyEditdialog( KDGanttViewItem * );
00491     void initDefaults();
00492     KDGanttViewItem* myCurrentItem;
00493     KDGanttMinimizeSplitter *mySplitter;
00494     bool  mFixedHorizon;
00495 protected:
00496   virtual QDragObject * dragObject ();
00497   virtual void startDrag ();
00498 };
00499 
00500 
00501 
00502 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys