35 #include "KDGanttViewSummaryItem.h"
36 #include "KDGanttViewSubwidgets.h"
38 #include "itemAttributeDialog.h"
57 const TQString& lvtext,
58 const TQString& name ) :
74 const TQString& lvtext,
75 const TQString& name ) :
93 const TQString& lvtext,
94 const TQString& name ) :
112 const TQString& lvtext,
113 const TQString& name ) :
140 if (! dateTime.isValid() ) {
141 tqDebug(
"KDGanttViewSummaryItem::setMiddleTime():Invalid parameter-no time set");
144 if (!myMiddleTime) myMiddleTime =
new TQDateTime;
145 *myMiddleTime = dateTime;
164 return *myMiddleTime;
179 if (! end.isValid() ) {
180 tqDebug(
"KDGanttViewSummaryItem::setEndTime():Invalid parameter-no time set");
202 if (! start.isValid() ) {
203 tqDebug(
"KDGanttViewSummaryItem::setStartTime():Invalid parameter-no time set");
226 if (!myActualEndTime) myActualEndTime =
new TQDateTime;
227 *myActualEndTime = end;
244 return *myActualEndTime;
249 void KDGanttViewSummaryItem::hideMe()
267 void KDGanttViewSummaryItem::showItem(
bool show,
int coordY )
270 invalidateHeight () ;
279 float prio = ((float) (
priority() - 100 )) / 100.0;
296 int startX, endX, midX = 0,allY;
304 midX =
myGanttView->myTimeHeader->getCoordX(*myMiddleTime);
308 startLine->setPoints(startX,allY,midX,allY);
324 endLine->setPoints(midX,allY,endX,allY);
339 if (myActualEndTime) {
344 int actendX =
myGanttView->myTimeHeader->getCoordX(*myActualEndTime);
345 actualEnd->setPoints(actendX,allY-5,actendX,allY+5);
367 void KDGanttViewSummaryItem::initItem()
KDCanvasPolygonItem * midShapeBack
KDCanvasText * textCanvas
KDCanvasPolygonItem * startShape
KDCanvasPolygonItem * midShape
void moveTextCanvas(int x, int y)
KDCanvasPolygonItem * endShapeBack
KDCanvasLine * endLineBack
KDCanvasPolygonItem * startShapeBack
KDGanttViewItem * parent() const
TQDateTime myChildStartTime()
KDGanttView * myGanttView
KDCanvasLine * startLineBack
bool displaySubitemsAsGroup() const
KDGanttViewItem * firstChild() const
bool isVisibleInGanttView
TQDateTime myChildEndTime()
KDCanvasPolygonItem * endShape
void setActualEndTime(const TQDateTime &end)
void setMiddleTime(const TQDateTime &)
virtual ~KDGanttViewSummaryItem()
TQDateTime middleTime() const
void setStartTime(const TQDateTime &start)
TQDateTime actualEndTime() const
void setEndTime(const TQDateTime &end)
KDGanttViewSummaryItem(KDGanttView *view, const TQString &lvtext=TQString(), const TQString &name=TQString())