13 #include <tqstylefactory.h>
14 #include <tqscrollview.h>
18 TQWidget* parent,
const char * name, WFlags f)
19 : TQWidget(parent,name,f)
22 printf(
"KGantt::KGantt()\n");
25 if(toplevelitem == 0) {
26 _toplevelitem =
new KGanttItem(0,
"toplevelitem",
27 TQDateTime::currentDateTime(),
28 TQDateTime::currentDateTime() );
29 _toplevelitem->
setMode(KGanttItem::Rubberband);
33 _toplevelitem = toplevelitem;
37 setBackgroundColor(TQColor(white));
39 _splitter =
new TQSplitter(
this);
45 TQPalette pal1(_splitter->palette());
55 _ganttlist->setMinimumWidth(1);
56 _ganttlist->setPalette(pal1);
59 _ganttbar->setPalette(pal1);
61 connect(_ganttbar, TQ_SIGNAL(contentsMoving(
int,
int)),
62 _ganttlist, TQ_SLOT(contentsMoved(
int,
int)));
84 TQTextOStream cout(stdout);
86 cout <<
"\n<Gantt>\n";
87 cout <<
" start : " << _toplevelitem->
getStart().toString() << endl;
88 cout <<
" end : " << _toplevelitem->
getEnd().toString() << endl;
90 _toplevelitem->
dump(cout,
" ");
92 cout <<
"</Gantt>\n\n";
TQDateTime getStart()
Get date of starting.
TQDateTime getEnd()
Get date of ending.
void dump(TQTextOStream &cout, const TQString &pre)
Dump to cout.
void setMode(Mode flag)
Set mode.
void dumpItems()
Print to stdout.
KGantt(KGanttItem *toplevelitem=0, TQWidget *parent=0, const char *name=0, WFlags f=0)
Constructor.
void setBarView(xQGanttBarView *v)
Connect barview to this listview.