summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewTaskItem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kdgantt/KDGanttViewTaskItem.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt/KDGanttViewTaskItem.cpp')
-rw-r--r--kdgantt/KDGanttViewTaskItem.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index 6428fbdb..4b060013 100644
--- a/kdgantt/KDGanttViewTaskItem.cpp
+++ b/kdgantt/KDGanttViewTaskItem.cpp
@@ -27,8 +27,8 @@
** licensing are not clear to you.
**
** As a special exception, permission is given to link this program
- ** with any edition of Qt, and distribute the resulting executable,
- ** without including the source code for Qt in the source distribution.
+ ** with any edition of TQt, and distribute the resulting executable,
+ ** without including the source code for TQt in the source distribution.
**
**********************************************************************/
@@ -43,7 +43,7 @@
This class represents calendar items in Gantt charts.
- A calendar item in a Gantt chart has no start/end shape,
+ A calendar item in a Gantt chart has no start/end tqshape,
it is displayed as a rectangle.
You can set the colors as usual, where only the first argument of
setColors( col, col, col )
@@ -67,8 +67,8 @@
is specified, a unique name will be generated
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, lvtext, name )
{
@@ -79,15 +79,15 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
/*!
Constructs an empty Gantt item of type event.
- \param parent a parent item under which this one goes
+ \param tqparent a tqparent item under which this one goes
\param lvtext the text to show in the list view
\param name the name by which the item can be identified. If no name
is specified, a unique name will be generated
*/
-KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
- KDGanttViewItem( Task, parent, lvtext, name )
+KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* tqparent,
+ const TQString& lvtext,
+ const TQString& name ) :
+ KDGanttViewItem( Task, tqparent, lvtext, name )
{
initItem();
}
@@ -104,8 +104,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, after, lvtext, name )
{
initItem();
@@ -115,17 +115,17 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
/*!
Constructs an empty Gantt item of type event.
- \param parent a parent item under which this one goes
+ \param tqparent a tqparent item under which this one goes
\param after another item at the same level behind which this one should go
\param lvtext the text to show in the listview
\param name the name by which the item can be identified. If no name
is specified, a unique name will be generated
*/
-KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
+KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* tqparent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- KDGanttViewItem( Task, parent, after, lvtext, name )
+ const TQString& lvtext,
+ const TQString& name ) :
+ KDGanttViewItem( Task, tqparent, after, lvtext, name )
{
initItem();
}
@@ -149,7 +149,7 @@ KDGanttViewTaskItem::~KDGanttViewTaskItem()
\param end the end time
\sa setStartTime(), startTime(), endTime()
*/
-void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
+void KDGanttViewTaskItem::setEndTime( const TQDateTime& end )
{
myEndTime = end;
if ( myEndTime < startTime() )
@@ -168,7 +168,7 @@ void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewTaskItem::setStartTime( const QDateTime& start )
+void KDGanttViewTaskItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewTaskItem::setStartTime():Invalid parameter-no time set");
@@ -201,7 +201,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
//qDebug("KDGanttViewTaskItem::showItem() %d %s ", (int) show, listViewText().latin1());
isVisibleInGanttView = show;
- invalidateHeight () ;
+ tqinvalidateHeight () ;
if (!show) {
hideMe();
return;
@@ -216,7 +216,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
floatEndShape->setZ(startShape->z()+0.003); // less than textCanvas
floatEndShape->hide();
textCanvas->setZ( prio + 0.005 );
- if ( displaySubitemsAsGroup() && !parent() && !isOpen() ) {
+ if ( displaySubitemsAsGroup() && !tqparent() && !isOpen() ) {
hideMe();
return;
}
@@ -242,14 +242,14 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
}
int hei = height();
if ( ! isVisible() ) {
- KDGanttViewItem * par = parent();
+ KDGanttViewItem * par = tqparent();
while ( par != 0 && !par->isVisible() )
- par = par->parent();
+ par = par->tqparent();
if ( par )
hei = par->height();
}
- if (myGanttView->myListView->itemAt( QPoint(2, allY)))
- hei = myGanttView->myListView->itemAt( QPoint(2, allY))->height();
+ if (myGanttView->myListView->itemAt( TQPoint(2, allY)))
+ hei = myGanttView->myListView->itemAt( TQPoint(2, allY))->height();
if ( takedefaultHeight )
hei = 16;
if ( myStartTime == myEndTime ) {
@@ -281,12 +281,12 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
temp->show();
if (progX > 0) {
// FIXME: For now, just use inverted color for progress
- QColor c = temp->brush().color();
+ TQColor c = temp->brush().color();
int h, s, v;
c.getHsv(&h, &s, &v);
h > 359/2 ? h -= 359/2 : h += 359/2;
c.setHsv(h, s, v);
- progtemp->setBrush(QBrush(c));
+ progtemp->setBrush(TQBrush(c));
progtemp->setSize(progX, hei-3);
progtemp->move(temp->x(), temp->y());
@@ -296,9 +296,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatStartTemp = (KDCanvasRectangle*) floatStartShape;
int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatStartTemp->setBrush(b);
- floatStartTemp->setPen(QPen(gray));
+ floatStartTemp->setPen(TQPen(gray));
if (floatStartX < startX) {
floatStartTemp->setSize(startX - floatStartX, temp->size().height()/2);
floatStartTemp->move(floatStartX, temp->y() + temp->size().height()/4);
@@ -312,9 +312,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatEndTemp = (KDCanvasRectangle*) floatEndShape;
int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatEndTemp->setBrush(b);
- floatEndTemp->setPen(QPen(gray));
+ floatEndTemp->setPen(TQPen(gray));
int ex = startX + temp->size().width();
if (floatEndX > ex) {
floatEndTemp->setSize(floatEndX - ex, temp->size().height()/2);
@@ -335,7 +335,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
textCanvas->hide();
else {
textCanvas->move(startX+3, allY-textCanvas->boundingRect().height()/2);
- QString temp = textCanvasText;
+ TQString temp = textCanvasText;
textCanvas->setText(temp);
int len = temp.length();
while ( textCanvas->boundingRect().width() > wid ) {
@@ -356,9 +356,9 @@ void KDGanttViewTaskItem::initItem()
{
isVisibleInGanttView = false;
- if ( myGanttView->calendarMode() && parent() ) {
+ if ( myGanttView->calendarMode() && tqparent() ) {
setVisible( false );
- parent()->setVisible( true );
+ tqparent()->setVisible( true );
} else
showItem(true);
//qDebug("initItem %s %s", listViewText().latin1(),startShape->brush().color().name().latin1() );