kdgantt

KDGanttView.h
1/*
2 $Id$
3 KDChart - a multi-platform charting engine
4*/
5
6/****************************************************************************
7 ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved.
8 **
9 ** This file is part of the KDGantt library.
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 as published by the Free Software
13 ** Foundation and appearing in the file LICENSE.GPL included in the
14 ** packaging of this file.
15 **
16 ** Licensees holding valid commercial KDGantt licenses may use this file in
17 ** accordance with the KDGantt Commercial License Agreement provided with
18 ** the Software.
19 **
20 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 **
23 ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
24 ** information about KDGantt Commercial License Agreements.
25 **
26 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
27 ** licensing are not clear to you.
28 **
29 ** As a special exception, permission is given to link this program
30 ** with any edition of TQt, and distribute the resulting executable,
31 ** without including the source code for TQt in the source distribution.
32 **
33 **********************************************************************/
34
35#ifndef KDGANTTVIEW_H
36#define KDGANTTVIEW_H
37
38#include <tqptrlist.h>
39#include <tqwidget.h>
40#include <tqlistview.h>
41#include <tqsplitter.h>
42#include <tqlayout.h>
43#include <tqfont.h>
44#include <tqdom.h>
45#include <tqvbox.h>
46
47
48#include "KDGanttViewItem.h"
49#include "KDGanttViewTaskLinkGroup.h"
50#include "KDGanttMinimizeSplitter.h"
51#include "KDGanttViewItemDrag.h"
52
53class KDIntervalColorRectangle;
55class TQPrinter;
56class TQIODevice;
57class itemAttributeDialog;
58class KDListView;
59class KDGanttViewItem;
63class KDTimeTableWidget;
64class KDTimeHeaderWidget;
65class KDLegendWidget;
66class KDGanttCanvasView;
69
71{
72 TQ_OBJECT
73
74
75 TQ_PROPERTY( bool showLegend READ showLegend WRITE setShowLegend )
76 TQ_PROPERTY( bool showListView READ showListView WRITE setShowListView )
77 TQ_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks )
78 TQ_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled )
79 TQ_PROPERTY( TQDateTime horizonStart READ horizonStart WRITE setHorizonStart )
80 TQ_PROPERTY( TQDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
81 TQ_PROPERTY( Scale scale READ scale WRITE setScale )
82 TQ_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat )
83 TQ_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat )
84 TQ_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks )
85 TQ_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks )
86 TQ_PROPERTY( bool editable READ editable WRITE setEditable )
87 TQ_PROPERTY( TQColor textColor READ textColor WRITE setTextColor )
88 TQ_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount )
89 TQ_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount )
91 TQ_PROPERTY( Scale maximumScale READ maximumScale WRITE setMaximumScale )
92 TQ_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale )
94 TQ_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth )
96 TQ_PROPERTY( TQColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
97 TQ_PROPERTY( TQColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
100 TQ_PROPERTY( double zoomFactor READ zoomFactor )
103 TQ_PROPERTY( bool headerVisible READ headerVisible WRITE setHeaderVisible )
104 TQ_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton )
105 TQ_PROPERTY( bool legendIsDoctwindow READ legendIsDoctwindow WRITE setLegendIsDoctwindow )
107 TQ_PROPERTY( TQBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
108 TQ_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
109 TQ_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled )
110 TQ_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode )
111
112 TQ_ENUMS( Scale )
113 TQ_ENUMS( YearFormat )
114 TQ_ENUMS( HourFormat )
115
116public:
117 enum Scale { Minute, Hour, Day, Week, Month, Auto };
118 enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe, NoDate };
119 enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit };
120 enum RepaintMode { No, Medium, Always };
121
122 KDGanttView( TQWidget* parent = 0, const char* name = 0 );
123 ~KDGanttView();
124
125 virtual void show();
126 virtual bool close ( bool alsoDelete );
127 void setRepaintMode( RepaintMode mode );
128 void setUpdateEnabled( bool enable);
129 bool getUpdateEnabled( )const;
130
131 void setGanttMaximumWidth( int w );
132 int ganttMaximumWidth() const;
133 void setShowLegend( bool show );
134 bool showLegend() const;
135 void setLegendIsDoctwindow( bool dock );
136 bool legendIsDoctwindow( ) const;
137 TQDockWindow* legendDoctwindow( ) const;
138 void setShowListView( bool show );
139 bool showListView() const;
140 void setEditorEnabled( bool enable );
141 bool editorEnabled() const;
142 void setListViewWidth( int );
143 int listViewWidth();
144 void setEditable( bool editable );
145 bool editable() const;
146 void setCalendarMode( bool mode );
147 bool calendarMode() const;
148 void setDisplaySubitemsAsGroup( bool show );
149 bool displaySubitemsAsGroup() const;
150 void setDisplayEmptyTasksAsLine( bool show );
151 bool displayEmptyTasksAsLine() const;
152
153 void setHorBackgroundLines( int count = 2,
154 TQBrush brush =
155 TQBrush( TQColor ( 200,200,200 ),
156 TQt::Dense6Pattern ));
157 int horBackgroundLines( TQBrush& brush );
158 bool saveProject( TQIODevice* );
159 bool loadProject( TQIODevice* );
160 void print( TQPrinter* printer = 0 ,
161 bool printListView = true, bool printTimeLine = true,
162 bool printLegend = false );
163 TQSize drawContents( TQPainter* p = 0,
164 bool drawListView = true, bool drawTimeLine = true,
165 bool drawLegend = false );
166 void setZoomFactor( double factor, bool absolute );
167 double zoomFactor() const;
168 void zoomToFit();
170 void center( KDGanttViewItem* );
171 void centerTimeline( const TQDateTime& center );
172 void centerTimelineAfterShow( const TQDateTime& center );
173 void setTimelineToStart();
174 void setTimelineToEnd();
175 void addTicksLeft( int num = 1 );
176 void addTicksRight( int num = 1 );
177 void setShowTaskLinks( bool show );
178 bool showTaskLinks() const;
179
180 void setFont(const TQFont& f);
181 void setShowHeaderPopupMenu( bool show = true,
182 bool showZoom = true,
183 bool showScale = true,
184 bool showTime = true,
185 bool showYear = true,
186 bool showGrid = true,
187 bool showPrint = false);
188 bool showHeaderPopupMenu() const;
189 void setShowTimeTablePopupMenu( bool );
190 bool showTimeTablePopupMenu() const;
195 bool overwriteExisting = true );
196 bool shapes( KDGanttViewItem::Type type,
199 KDGanttViewItem::Shape& end ) const;
201 const TQColor& start, const TQColor& middle,
202 const TQColor& end,
203 bool overwriteExisting = true );
204 bool colors( KDGanttViewItem::Type type,
205 TQColor& start, TQColor& middle, TQColor& end ) const;
207 const TQColor&,
208 bool overwriteExisting = true );
209 TQColor defaultColor( KDGanttViewItem::Type type ) const;
211 const TQColor& start, const TQColor& middle,
212 const TQColor& end,
213 bool overwriteExisting = true );
215 TQColor& start, TQColor& middle, TQColor& end ) const;
217 const TQColor&,
218 bool overwriteExisting = true );
219 TQColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
220 void setTextColor( const TQColor& color );
221 TQColor textColor() const;
222
223 void setNoInformationBrush( const TQBrush& brush );
224 TQBrush noInformationBrush() const;
225
226 // Link-related stuff
227 TQPtrList<KDGanttViewTaskLink> taskLinks() const;
228 TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
229
230 // Legend-related stuff
231 void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
232 void clearLegend();
233 // Header-related stuff
234 void setHorizonStart( const TQDateTime& start );
235 TQDateTime horizonStart() const;
236 void setHorizonEnd( const TQDateTime& start );
237 TQDateTime horizonEnd() const;
238 void setScale( Scale );
239 Scale scale() const;
240 void setMaximumScale( Scale );
241 Scale maximumScale() const;
242 void setMinimumScale( Scale );
243 Scale minimumScale() const;
244 void setAutoScaleMinorTickCount( int count );
245 int autoScaleMinorTickCount() const;
246 void setMajorScaleCount( int count );
247 int majorScaleCount() const;
248 void setMinorScaleCount( int count );
249 int minorScaleCount() const;
250 void setMinimumColumnWidth( int width );
251 int minimumColumnWidth() const;
252 void setYearFormat( YearFormat format );
253 YearFormat yearFormat() const;
254 void setHourFormat( HourFormat format );
255 HourFormat hourFormat() const;
256 void setShowMajorTicks( bool );
257 bool showMajorTicks() const;
258 void setShowMinorTicks( bool );
259 bool showMinorTicks() const;
260 void setColumnBackgroundColor( const TQDateTime& column,
261 const TQColor& color,
262 Scale mini = KDGanttView::Minute ,
263 Scale maxi = KDGanttView::Month);
264#if 0
265 // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
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 );
277#endif
278 void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
280 TQColor columnBackgroundColor( const TQDateTime& column ) const;
281 void setWeekendBackgroundColor( const TQColor& color );
282 TQColor weekendBackgroundColor() const;
283 void setWeekdayBackgroundColor( const TQColor& color, int weekday );
284 TQColor weekdayBackgroundColor(int weekday) const;
285
286
287 void setPaletteBackgroundColor(const TQColor& col);
288 void setGvBackgroundColor ( const TQColor & );
289 void setLvBackgroundColor ( const TQColor & );
290 void setTimeHeaderBackgroundColor ( const TQColor & );
291 void setLegendHeaderBackgroundColor ( const TQColor & );
292 TQColor gvBackgroundColor () const ;
293 TQColor lvBackgroundColor () const ;
294 TQColor timeHeaderBackgroundColor () const ;
295 TQColor legendHeaderBackgroundColor () const ;
296 void addUserdefinedLegendHeaderWidget( TQWidget * w );
297
298 void setWeekendDays( int start, int end );
299 void weekendDays( int& start, int& end ) const;
300
301 static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize);
302
303 void setHeaderVisible( bool );
304 bool headerVisible() const;
305
306 void setShowLegendButton( bool show );
307 bool showLegendButton() const;
308
309 // Pass-through methods from TQListView
310 virtual int addColumn( const TQString& label, int width = -1 );
311 virtual int addColumn( const TQIconSet& iconset, const TQString& label,
312 int width = -1 );
313 virtual void removeColumn( int index );
315 void setSelected( KDGanttViewItem*, bool );
317 KDGanttViewItem* lastItem() const;
318 int childCount() const;
319 void clear();
320
321 void setDragEnabled( bool b );
322 void setDropEnabled( bool b );
323 void setDragDropEnabled( bool b );
324 bool dragEnabled() const;
325 bool dropEnabled() const;
326 bool isDragEnabled() const;
327 bool isDropEnabled() const;
328
329 virtual bool lvDropEvent ( TQDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
330 virtual void lvStartDrag (KDGanttViewItem*);
331 virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
332 virtual void lvDragEnterEvent (TQDragEnterEvent * e );
333 virtual TQSize sizeHint() const;
334 KDGanttViewItem* getItemByName( const TQString& name ) const;
335 TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
336 KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const;
337 KDGanttViewItem* getItemByGanttViewPos( const TQPoint& pos ) const;
338 KDGanttViewItem* getItemAt( const TQPoint& pos , bool global = true ) const;
339
340 // setting the vertical scrollbars of the listview and the timetable
341 // default values: always off for the listview, always on for the timetable
342 void setLvVScrollBarMode( TQScrollView::ScrollBarMode );
343 void setGvVScrollBarMode( TQScrollView::ScrollBarMode );
344
345 void setLinkItemsEnabled(bool on);
346 bool isLinkItemsEnabled() const;
347
348 KDTimeTableWidget * timeTableWidget() { return myTimeTable; }
349 KDTimeHeaderWidget * timeHeaderWidget() { return myTimeHeader; }
350
351 void setFixedHorizon( bool f ) { mFixedHorizon = f; }
352
353public slots:
354 void editItem( KDGanttViewItem* );
355 void zoomToSelection( const TQDateTime& start, const TQDateTime& end);
356
357signals:
358 void timeIntervallSelected( const TQDateTime& start, const TQDateTime& end);
359 void timeIntervalSelected( const TQDateTime& start, const TQDateTime& end);
361 void intervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end );
362
363 // the following signals are emitted if an item is clicked in the
364 // listview (inclusive) or in the ganttview
369
370 // The following signal is emitted when two items shall be linked
371 void linkItems( KDGanttViewItem* from, KDGanttViewItem* to, int linkType );
372
373 // the following signals are emitted if an item is clicked in the
374 // listview (exlusive) or in the ganttview
375 // gv... means item in ganttview clicked
376
381 // the point is the global position!!
382 void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos);
384 // the point is the global position!!
385 void gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos );
386 void gvItemMoved( KDGanttViewItem* );
387
388 // lv... means item in listview clicked
390 void lvItemRenamed( KDGanttViewItem* , int col, const TQString & text );
391 void lvMouseButtonPressed( int button, KDGanttViewItem * item, const TQPoint & pos, int c );
395 void lvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos, int col );
396 void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos, int c );
399
401
406
407 void dateTimeDoubleClicked (const TQDateTime& );
408
409 void dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
410private slots:
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();
419 void addTickRight();
420 void addTickLeft();
421 void enableAdding( int );
422 void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
423private:
424 struct legendItem {
426 TQColor color;
427 TQString text;
428 };
429 bool loadXML( const TQDomDocument& doc );
430 TQDomDocument saveXML( bool withPI = true ) const;
431
432 void emptySpaceDoubleClicked( TQMouseEvent* e );
433
434 static TQString scaleToString( Scale scale );
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 );
440
441 // PENDING(lutz) Review these
442 friend class KDGanttCanvasView;
443 friend class KDGanttViewEventItem;
444 friend class KDGanttViewItem;
445 friend class KDGanttViewTaskItem;
446 friend class KDGanttViewSummaryItem;
447 friend class KDGanttViewTaskLink;
448 friend class KDGanttViewCalendarItem;
449 friend class KDTimeTableWidget;
450 friend class KDTimeHeaderWidget;
451 friend class KDListView;
452 friend class KDGanttViewTaskLinkGroup;
453 friend class KDLegendWidget;
454
455 KDListView * myListView;
456 KDGanttCanvasView *myCanvasView;
457 KDTimeHeaderWidget * myTimeHeader;
458 KDTimeTableWidget * myTimeTable;
459 KDLegendWidget * myLegend;
460 itemAttributeDialog* myItemAttributeDialog;
461 TQVBox * leftWidget, * rightWidget;
462 TQHBox * spacerLeft;
463 TQScrollView* myTimeHeaderScroll;
464 TQHBox* myTimeHeaderContainer ;
465 TQWidget* timeHeaderSpacerWidget;
466 TQWidget *spacerRight;
467
468 bool listViewIsVisible;
469 bool chartIsEditable;
470 bool editorIsEnabled;
471 bool _displaySubitemsAsGroup;
472 bool _displayEmptyTasksAsLine;
473 bool _showLegendButton;
474 bool _showHeader;
475 bool _enableAdding;
476 bool fCenterTimeLineAfterShow;
477 bool fDragEnabled;
478 bool fDropEnabled;
479 bool closingBlocked;
480 TQDateTime dtCenterTimeLineAfterShow;
481 KDGanttViewItem::Shape myDefaultShape [9];
482 TQColor myColor[9],myColorHL[9];
483 bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3];
484 TQColor myTextColor;
485 TQColor myDefaultColor[3],myDefaultColorHL[3];
486 TQPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
487 TQPtrList<legendItem> *myLegendItems;
488 void addTaskLinkGroup(KDGanttViewTaskLinkGroup*);
489 void removeTaskLinkGroup(KDGanttViewTaskLinkGroup*);
490 int getIndex( KDGanttViewItem::Type ) const;
491 void notifyEditdialog( KDGanttViewItem * );
492 void initDefaults();
493 KDGanttViewItem* myCurrentItem;
494 KDGanttMinimizeSplitter *mySplitter;
495 bool mFixedHorizon;
496protected:
497 virtual TQDragObject * dragObject ();
498 virtual void startDrag ();
499};
500
501
502
503#endif
The KDGanttMinimizeSplitter class implements a splitter widget with minimize buttons.
bool showMinorTicks() const
bool showListView() const
void setTimelineToEnd()
void setZoomFactor(double factor, bool absolute)
void setYearFormat(YearFormat format)
void itemRightClicked(KDGanttViewItem *)
virtual void show()
bool isLinkItemsEnabled() const
void setDisplaySubitemsAsGroup(bool show)
void setMinimumColumnWidth(int width)
void gvContextMenuRequested(KDGanttViewItem *item, const TQPoint &pos)
TQBrush noInformationBrush() const
TQSize drawContents(TQPainter *p=0, bool drawListView=true, bool drawTimeLine=true, bool drawLegend=false)
void setScale(Scale)
void setWeekendDays(int start, int end)
void lvItemRenamed(KDGanttViewItem *, int col, const TQString &text)
bool editorEnabled() const
void lvMouseButtonPressed(int button, KDGanttViewItem *item, const TQPoint &pos, int c)
void addUserdefinedLegendHeaderWidget(TQWidget *w)
void clearBackgroundColor()
void gvItemMidClicked(KDGanttViewItem *)
TQColor timeHeaderBackgroundColor() const
virtual void startDrag()
void print(TQPrinter *printer=0, bool printListView=true, bool printTimeLine=true, bool printLegend=false)
static TQPixmap getPixmap(KDGanttViewItem::Shape shape, const TQColor &shapeColor, const TQColor &backgroundColor, int itemSize)
void lvCurrentChanged(KDGanttViewItem *)
KDGanttViewItem * getItemAt(const TQPoint &pos, bool global=true) const
void setShowMajorTicks(bool)
bool dragEnabled() const
void itemMidClicked(KDGanttViewItem *)
virtual int addColumn(const TQString &label, int width=-1)
virtual void lvStartDrag(KDGanttViewItem *)
void gvCurrentChanged(KDGanttViewItem *)
void setShowTaskLinks(bool show)
int ganttMaximumWidth() const
void setDefaultColor(KDGanttViewItem::Type type, const TQColor &, bool overwriteExisting=true)
KDGanttViewItem * firstChild() const
KDGanttViewItem * getItemByGanttViewPos(const TQPoint &pos) const
void setEditable(bool editable)
bool colors(KDGanttViewItem::Type type, TQColor &start, TQColor &middle, TQColor &end) const
void setSelected(KDGanttViewItem *, bool)
TQColor columnBackgroundColor(const TQDateTime &column) const
void setLegendHeaderBackgroundColor(const TQColor &)
void taskLinkRightClicked(KDGanttViewTaskLink *)
bool isDropEnabled() const
TQPtrList< KDGanttViewTaskLinkGroup > taskLinkGroups() const
void center(KDGanttViewItem *)
void lvContextMenuRequested(KDGanttViewItem *item, const TQPoint &pos, int col)
KDGanttView(TQWidget *parent=0, const char *name=0)
Definition: KDGanttView.cpp:83
void lvItemDoubleClicked(KDGanttViewItem *)
void setPaletteBackgroundColor(const TQColor &col)
double zoomFactor() const
void rescaling(KDGanttView::Scale)
virtual void removeColumn(int index)
void setShowListView(bool show)
void setGanttMaximumWidth(int w)
void setDragDropEnabled(bool b)
void setShapes(KDGanttViewItem::Type type, KDGanttViewItem::Shape start, KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end, bool overwriteExisting=true)
void setCalendarMode(bool mode)
void setDropEnabled(bool b)
void setWeekendBackgroundColor(const TQColor &color)
void setHighlightColors(KDGanttViewItem::Type type, const TQColor &start, const TQColor &middle, const TQColor &end, bool overwriteExisting=true)
void gvItemDoubleClicked(KDGanttViewItem *)
bool saveProject(TQIODevice *)
void setLinkItemsEnabled(bool on)
void addLegendItem(KDGanttViewItem::Shape shape, const TQColor &shapeColor, const TQString &text)
void setListViewWidth(int)
Scale minimumScale() const
bool getUpdateEnabled() const
void setShowHeaderPopupMenu(bool show=true, bool showZoom=true, bool showScale=true, bool showTime=true, bool showYear=true, bool showGrid=true, bool showPrint=false)
void setDisplayEmptyTasksAsLine(bool show)
void taskLinkMidClicked(KDGanttViewTaskLink *)
void gvItemRightClicked(KDGanttViewItem *)
void centerTimeline(const TQDateTime &center)
bool calendarMode() const
bool highlightColors(KDGanttViewItem::Type type, TQColor &start, TQColor &middle, TQColor &end) const
void setGvVScrollBarMode(TQScrollView::ScrollBarMode)
void taskLinkLeftClicked(KDGanttViewTaskLink *)
void setHorBackgroundLines(int count=2, TQBrush brush=TQBrush(TQColor(200, 200, 200), TQt::Dense6Pattern))
virtual bool lvDragMoveEvent(TQDragMoveEvent *e, KDGanttViewItem *, KDGanttViewItem *)
void setMinorScaleCount(int count)
void gvItemLeftClicked(KDGanttViewItem *)
void addTicksLeft(int num=1)
void setDragEnabled(bool b)
bool isDragEnabled() const
void setShowLegend(bool show)
void itemConfigured(KDGanttViewItem *)
void clearLegend()
TQColor defaultHighlightColor(KDGanttViewItem::Type type) const
int minimumColumnWidth() const
void timeIntervallSelected(const TQDateTime &start, const TQDateTime &end)
void lvSelectionChanged(KDGanttViewItem *)
void setShowLegendButton(bool show)
bool showLegend() const
TQColor lvBackgroundColor() const
TQColor legendHeaderBackgroundColor() const
virtual TQSize sizeHint() const
TQColor defaultColor(KDGanttViewItem::Type type) const
Scale scale() const
TQDateTime getDateTimeForCoordX(int coordX, bool global=true) const
bool editable() const
void addIntervalBackgroundColor(KDIntervalColorRectangle *newItem)
void setEditorEnabled(bool enable)
bool showTaskLinks() const
bool showMajorTicks() const
int majorScaleCount() const
void zoomToFit()
void itemLeftClicked(KDGanttViewItem *)
TQDateTime horizonStart() const
void setHorizonEnd(const TQDateTime &start)
virtual TQDragObject * dragObject()
void setDefaultHighlightColor(KDGanttViewItem::Type type, const TQColor &, bool overwriteExisting=true)
KDGanttViewItem * getItemByListViewPos(const TQPoint &pos) const
Scale maximumScale() const
void itemDoubleClicked(KDGanttViewItem *)
void timeIntervalSelected(const TQDateTime &start, const TQDateTime &end)
bool loadProject(TQIODevice *)
TQPtrList< KDGanttViewTaskLink > taskLinks() const
void setMaximumScale(Scale)
TQColor gvBackgroundColor() const
virtual void lvDragEnterEvent(TQDragEnterEvent *e)
void setMajorScaleCount(int count)
void lvItemMidClicked(KDGanttViewItem *)
bool showTimeTablePopupMenu() const
void lvItemLeftClicked(KDGanttViewItem *)
void setTextColor(const TQColor &color)
void setShowTimeTablePopupMenu(bool)
void setHorizonStart(const TQDateTime &start)
bool legendIsDoctwindow() const
void setFont(const TQFont &f)
void setLvVScrollBarMode(TQScrollView::ScrollBarMode)
bool shapes(KDGanttViewItem::Type type, KDGanttViewItem::Shape &start, KDGanttViewItem::Shape &middle, KDGanttViewItem::Shape &end) const
void setAutoScaleMinorTickCount(int count)
void gvMouseButtonClicked(int button, KDGanttViewItem *item, const TQPoint &pos)
void setLegendIsDoctwindow(bool dock)
TQColor weekendBackgroundColor() const
void taskLinkDoubleClicked(KDGanttViewTaskLink *)
void weekendDays(int &start, int &end) const
bool showLegendButton() const
TQColor textColor() const
HourFormat hourFormat() const
bool displaySubitemsAsGroup() const
void setWeekdayBackgroundColor(const TQColor &color, int weekday)
void ensureVisible(KDGanttViewItem *)
void zoomToSelection(const TQDateTime &start, const TQDateTime &end)
void setUpdateEnabled(bool enable)
bool dropEnabled() const
bool showHeaderPopupMenu() const
void setHourFormat(HourFormat format)
int autoScaleMinorTickCount() const
KDGanttViewItem * selectedItem() const
bool headerVisible() const
int childCount() const
int minorScaleCount() const
void dropped(TQDropEvent *e, KDGanttViewItem *droppedItem, KDGanttViewItem *itemBelowMouse)
void setHeaderVisible(bool)
virtual bool close(bool alsoDelete)
void setColors(KDGanttViewItem::Type type, const TQColor &start, const TQColor &middle, const TQColor &end, bool overwriteExisting=true)
YearFormat yearFormat() const
virtual bool lvDropEvent(TQDropEvent *e, KDGanttViewItem *, KDGanttViewItem *)
TQDateTime horizonEnd() const
void setNoInformationBrush(const TQBrush &brush)
void setLvBackgroundColor(const TQColor &)
KDGanttViewItem * getItemByName(const TQString &name) const
void setShowMinorTicks(bool)
bool displayEmptyTasksAsLine() const
int horBackgroundLines(TQBrush &brush)
void setGvBackgroundColor(const TQColor &)
TQDockWindow * legendDoctwindow() const
void setMinimumScale(Scale)
void setColumnBackgroundColor(const TQDateTime &column, const TQColor &color, Scale mini=KDGanttView::Minute, Scale maxi=KDGanttView::Month)
void setTimelineToStart()
void lvItemRightClicked(KDGanttViewItem *)
void lvMouseButtonClicked(int button, KDGanttViewItem *item, const TQPoint &pos, int c)
KDGanttViewItem * lastItem() const
void addTicksRight(int num=1)
void setRepaintMode(RepaintMode mode)
void linkItems(KDGanttViewItem *from, KDGanttViewItem *to, int linkType)
void setTimeHeaderBackgroundColor(const TQColor &)
void centerTimelineAfterShow(const TQDateTime &center)
void editItem(KDGanttViewItem *)
int listViewWidth()
TQColor weekdayBackgroundColor(int weekday) const