38 #include <tqptrlist.h>
40 #include <tqlistview.h>
41 #include <tqsplitter.h>
48 #include "KDGanttViewItem.h"
49 #include "KDGanttViewTaskLinkGroup.h"
50 #include "KDGanttMinimizeSplitter.h"
51 #include "KDGanttViewItemDrag.h"
53 class KDIntervalColorRectangle;
57 class itemAttributeDialog;
63 class KDTimeTableWidget;
64 class KDTimeHeaderWidget;
66 class KDGanttCanvasView;
117 enum Scale { Minute, Hour, Day, Week, Month, Auto };
118 enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe, NoDate };
122 KDGanttView( TQWidget* parent = 0, const char* name = 0 );
126 virtual bool close ( bool alsoDelete );
155 TQBrush( TQColor ( 200,200,200 ),
156 TQt::Dense6Pattern ));
160 void print( TQPrinter* printer = 0 ,
161 bool printListView = true, bool printTimeLine = true,
162 bool printLegend = false );
164 bool drawListView = true, bool drawTimeLine = true,
165 bool drawLegend = false );
182 bool showZoom = true,
183 bool showScale = true,
184 bool showTime = true,
185 bool showYear = true,
186 bool showGrid = true,
187 bool showPrint = false);
195 bool overwriteExisting = true );
201 const TQColor& start, const TQColor& middle,
203 bool overwriteExisting = true );
205 TQColor& start, TQColor& middle, TQColor& end ) const;
208 bool overwriteExisting = true );
211 const TQColor& start, const TQColor& middle,
213 bool overwriteExisting = true );
215 TQColor& start, TQColor& middle, TQColor& end ) const;
218 bool overwriteExisting = true );
227 TQPtrList<KDGanttViewTaskLink> taskLinks() const;
261 const TQColor& color,
262 Scale mini = KDGanttView::Minute ,
263 Scale maxi = KDGanttView::Month);
266 void setIntervalBackgroundColor( const TQDateTime& start,
267 const TQDateTime& end,
268 const TQColor& color,
269 Scale mini = KDGanttView::Minute ,
270 Scale maxi = KDGanttView::Month);
271 bool changeBackgroundInterval( const TQDateTime& oldstart,
272 const TQDateTime& oldend,
273 const TQDateTime& newstart,
274 const TQDateTime& newend );
275 bool deleteBackgroundInterval( const TQDateTime& start,
276 const TQDateTime& end );
310 virtual int addColumn( const TQString& label, int width = -1 );
311 virtual int addColumn( const TQIconSet& iconset, const TQString& label,
348 KDTimeTableWidget * timeTableWidget() { return myTimeTable; }
349 KDTimeHeaderWidget * timeHeaderWidget() { return myTimeHeader; }
351 void setFixedHorizon( bool f ) { mFixedHorizon = f; }
361 void intervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end );
407 void dateTimeDoubleClicked ( const TQDateTime& );
411 void forceRepaint( int val = 0 );
412 void slotSelectionChanged( TQListViewItem* item );
413 void slotCurrentChanged ( TQListViewItem * item );
414 void slotItemRenamed ( TQListViewItem * item, int col, const TQString & text );
415 void slotMouseButtonPressed ( int button, TQListViewItem * item, const TQPoint & pos, int c );
416 void slotmouseButtonClicked ( int button, TQListViewItem * item, const TQPoint & pos, int c );
417 void slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col );
418 void slotHeaderSizeChanged();
421 void enableAdding( int );
429 bool loadXML( const TQDomDocument& doc );
430 TQDomDocument saveXML( bool withPI = true ) const;
432 void emptySpaceDoubleClicked( TQMouseEvent* e );
435 static TQString yearFormatToString( YearFormat format );
436 static TQString hourFormatToString( HourFormat format );
437 static Scale stringToScale( const TQString& string );
438 static YearFormat stringToYearFormat( const TQString& string );
439 static HourFormat stringToHourFormat( const TQString& string );
442 friend class KDGanttCanvasView;
448 friend class KDGanttViewCalendarItem;
449 friend class KDTimeTableWidget;
450 friend class KDTimeHeaderWidget;
451 friend class KDListView;
453 friend class KDLegendWidget;
455 KDListView * myListView;
456 KDGanttCanvasView *myCanvasView;
457 KDTimeHeaderWidget * myTimeHeader;
458 KDTimeTableWidget * myTimeTable;
459 KDLegendWidget * myLegend;
460 itemAttributeDialog* myItemAttributeDialog;
461 TQVBox * leftWidget, * rightWidget;
463 TQScrollView* myTimeHeaderScroll;
464 TQHBox* myTimeHeaderContainer ;
465 TQWidget* timeHeaderSpacerWidget;
466 TQWidget *spacerRight;
468 bool listViewIsVisible;
469 bool chartIsEditable;
470 bool editorIsEnabled;
471 bool _displaySubitemsAsGroup;
472 bool _displayEmptyTasksAsLine;
473 bool _showLegendButton;
476 bool fCenterTimeLineAfterShow;
480 TQDateTime dtCenterTimeLineAfterShow;
482 TQColor myColor[9],myColorHL[9];
483 bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3];
485 TQColor myDefaultColor[3],myDefaultColorHL[3];
486 TQPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
487 TQPtrList<legendItem> *myLegendItems;
|