summaryrefslogtreecommitdiffstats
path: root/kgantt/kgantt/xQGanttBarView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kgantt/kgantt/xQGanttBarView.cpp')
-rw-r--r--kgantt/kgantt/xQGanttBarView.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kgantt/kgantt/xQGanttBarView.cpp b/kgantt/kgantt/xQGanttBarView.cpp
index 4a79de60..7cc410d1 100644
--- a/kgantt/kgantt/xQGanttBarView.cpp
+++ b/kgantt/kgantt/xQGanttBarView.cpp
@@ -12,18 +12,18 @@
xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem,
- QWidget* parent,
+ TQWidget* parent,
const char * name, WFlags f)
- : QScrollView(parent,name,f)
+ : TQScrollView(parent,name,f)
{
_config = NULL;
_toplevelitem = toplevelitem;
- setFrameStyle(QFrame::Sunken);
+ setFrameStyle(TQFrame::Sunken);
setLineWidth(1);
- _headerBackBrush = QBrush(QColor(250,250,250));
+ _headerBackBrush = TQBrush(TQColor(250,250,250));
setMargins( 1, TOPMARGIN , 1, 1 );
@@ -33,14 +33,14 @@ xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem,
_viewport->setMode(xQGanttBarViewPort::Select);
- connect(_viewport, SIGNAL(scroll(int,int)),
- this, SLOT(scrollBy(int,int)) );
+ connect(_viewport, TQT_SIGNAL(scroll(int,int)),
+ this, TQT_SLOT(scrollBy(int,int)) );
- connect(_viewport, SIGNAL(recalculated()),
- this, SLOT(drawHeader()) );
+ connect(_viewport, TQT_SIGNAL(recalculated()),
+ this, TQT_SLOT(drawHeader()) );
- connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
- this, SLOT(horizontalScrollBarChanged(int)) );
+ connect(horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(horizontalScrollBarChanged(int)) );
}
@@ -67,12 +67,12 @@ void
xQGanttBarView::drawHeader()
////////////////////////////////
{
- static QPen _dotPen( QColor(35,35,35), 0, DotLine);
- static QPen _normalPen(QColor(0,0,0));
- static QPen _redPen(QColor(254,0,0));
- static QPen _greyPen(QColor(150,150,150));
+ static TQPen _dotPen( TQColor(35,35,35), 0, DotLine);
+ static TQPen _normalPen(TQColor(0,0,0));
+ static TQPen _redPen(TQColor(254,0,0));
+ static TQPen _greyPen(TQColor(150,150,150));
- QPainter p(this);
+ TQPainter p(this);
p.setPen( _normalPen );
p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush );
@@ -87,10 +87,10 @@ xQGanttBarView::drawHeader()
int wx = _viewport->worldX(contentsX());
- QDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
+ TQDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
wx = _viewport->worldX(contentsX()+width());
- QDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
+ TQDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
endDate = endDate.addDays(1);
int end = (int) startDate.daysTo(endDate);
@@ -98,12 +98,12 @@ xQGanttBarView::drawHeader()
// draw week, which first day is not visible
- QDate t = startDate.addDays(-startDate.dayOfWeek()+1);
+ TQDate t = startDate.addDays(-startDate.dayOfWeek()+1);
tmp = _toplevelitem->getStart().secsTo(t)/60;
a = _viewport->screenX(tmp) - contentsX();
- p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top, (int) (5. * dayWidth), height );
// draw month, which first day is not visible
@@ -114,12 +114,12 @@ xQGanttBarView::drawHeader()
a = _viewport->screenX(tmp) - contentsX();
e = t.daysInMonth();
- p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top + height + skip, (int) (e*dayWidth), height );
if(a<0) a = 0;
p.drawText(a+5, int( top + height + skip + (0.8*height) ),
- t.shortMonthName(t.month()) + " " + QString::number(t.year()) );
+ t.shortMonthName(t.month()) + " " + TQString::number(t.year()) );
// draw snapgrid for first month
@@ -146,15 +146,15 @@ xQGanttBarView::drawHeader()
tmp = _toplevelitem->getStart().secsTo(t)/60;
a = _viewport->screenX(tmp) - contentsX();
- p.setPen( QPen(QColor(black)) );
+ p.setPen( TQPen(TQColor(black)) );
if(t.dayOfWeek() == 1) {
- p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top, (int) (5. * dayWidth), height );
if(!drawDays)
- p.drawText(a+5, (int) (top + (0.8*height)), QString::number(t.day()) );
+ p.drawText(a+5, (int) (top + (0.8*height)), TQString::number(t.day()) );
}
@@ -162,15 +162,15 @@ xQGanttBarView::drawHeader()
if(a<0) a = 0;
- QString str = t.shortDayName(t.dayOfWeek()) + " " + QString::number(t.day());
- QRect rect = p.boundingRect(a+5, (int)(0.8 * height),
+ TQString str = t.shortDayName(t.dayOfWeek()) + " " + TQString::number(t.day());
+ TQRect rect = p.boundingRect(a+5, (int)(0.8 * height),
(int) dayWidth, height, AlignLeft, str );
if(t.dayOfWeek() > 5)
p.fillRect(rect.x(), rect.y(), rect.width(), -rect.height(), _headerBackBrush );
else
p.fillRect(rect.x(), rect.y(),
- rect.width(), -rect.height(), QBrush(QColor(240,240,240)));
+ rect.width(), -rect.height(), TQBrush(TQColor(240,240,240)));
p.drawText(a+5, (int)(0.8 * height), str );
@@ -188,12 +188,12 @@ xQGanttBarView::drawHeader()
p.setPen(_normalPen);
p.fillRect(a, top + height + skip,
- (int) (e * dayWidth), height, QBrush(QColor(240,240,240)));
+ (int) (e * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top + height + skip, (int) (e * dayWidth), height );
p.drawText(a+5,
top + (int)(1.8 * height) + skip,
- t.shortMonthName(t.month()) + " " + QString::number(t.year()) );
+ t.shortMonthName(t.month()) + " " + TQString::number(t.year()) );
// draw snapgrid
@@ -214,7 +214,7 @@ xQGanttBarView::drawHeader()
void
-xQGanttBarView::paintEvent(QPaintEvent * /*e*/)
+xQGanttBarView::paintEvent(TQPaintEvent * /*e*/)
{
drawHeader();
}