summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewItem.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/KDGanttViewItem.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/KDGanttViewItem.cpp')
-rw-r--r--kdgantt/KDGanttViewItem.cpp590
1 files changed, 295 insertions, 295 deletions
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index 090c4c8c..4421517a 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -4,7 +4,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -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.
**
**********************************************************************/
@@ -39,7 +39,7 @@
#include "KDGanttViewEventItem.h"
#include "itemAttributeDialog.h"
-#include "qpainter.h"
+#include "tqpainter.h"
#include "KDGanttXMLTools.h"
@@ -52,32 +52,32 @@
directly. Instead, you should create items of one of the
subclasses. This class provides methods common to all Gantt items.
- The initialization of the shapes/colors of the item works as follows:
+ The initialization of the tqshapes/colors of the item works as follows:
Shapes:
- When a new item is created, the shapes are set to the default values
+ When a new item is created, the tqshapes are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setShapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape start,
KDGanttViewItem::Shape middle,
KDGanttViewItem::Shape end );
If there is no default value defined for this type,
- the shapes are set as follows:
- For TaskViewItems all three shapes are set to Square.
- For SummaryViewItems all three shapes are set to TriangleDown.
- For EventViewItems all three shapes are set to Diamond.
+ the tqshapes are set as follows:
+ For TaskViewItems all three tqshapes are set to Square.
+ For SummaryViewItems all three tqshapes are set to TriangleDown.
+ For EventViewItems all three tqshapes are set to Diamond.
Colors:
When a new item is created, the colors are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
- the colors of the shapes are set to the default color for items of this type,
+ the colors of the tqshapes are set to the default color for items of this type,
defined in the KDGanttView class with:
- void setDefaultColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultColor( KDGanttViewItem::Type type, const TQColor& );
The initial default color in the KDGanttView class is set to
blue for KDGanttViewItem::Event,
green for KDGanttViewItem::Task,
@@ -88,13 +88,13 @@
values for items of the type of this item,
defined in the KDGanttView class with:
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
- the highlight colors of the shapes are set to the default color for
+ the highlight colors of the tqshapes are set to the default color for
items of this type, defined in the KDGanttView class with:
- void setDefaultHighlightColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& );
The initial default highlight color in the KDGanttView class is set to red
for all types.
@@ -122,23 +122,23 @@
shown or not.
In the other mode (set with setDisplaySubitemsAsGroup( true ); ),
called "calendar mode", the item is displayed as follows:
- If the item has no children, it is displayed as usual.
- If the item is opened (i.e., its children are displayed), the
+ If the item has no tqchildren, it is displayed as usual.
+ If the item is opened (i.e., its tqchildren are displayed), the
start/end time of this item is computed automatically according to
- the earliest start time/latest end time of its children. The item
- and its children are displayed as usual.
- If the item is closed (i.e., its children are hidden in the left
- list view), the item itself is hidden, and its children are displayed
+ the earliest start time/latest end time of its tqchildren. The item
+ and its tqchildren are displayed as usual.
+ If the item is closed (i.e., its tqchildren are hidden in the left
+ list view), the item itself is hidden, and its tqchildren are displayed
on the timeline of this item instead. To control the painting of
- overlapping children, call \a setPriority() for the childs.
+ overlapping tqchildren, call \a setPriority() for the childs.
Blocking of user interaction to open item:
- If you want to block users to open items used as parents of calendar items,
+ If you want to block users to open items used as tqparents of calendar items,
call \a KDGanttView::setCalendarMode( true );
Example 1, Color:
If you create an instance of a KDGanttView class and add a SummaryViewItem
- without setting any color/shape values, you get an item with three shapes
+ without setting any color/tqshape values, you get an item with three tqshapes
of the form TriangleDown in the color magenta. If the item is highlighted,
the color will change to the highlight color red.
@@ -147,17 +147,17 @@
\a KDGanttView::setCalendarMode( true );
\a KDGanttView::setDisplaySubitemsAsGroup( true );
Insert root items in the Gantt view.
- Insert items as children of these root item in the Gantt view.
- You may use any item type as parent and child; there are no limitations.
+ Insert items as tqchildren of these root item in the Gantt view.
+ You may use any item type as tqparent and child; there are no limitations.
It is, however, recommended to use KDGanttViewTaskItems
- Actually, you may add child items to the children themselves.
- Such a child behaves then like a parent.
- Now set the start/end time of the children to specify a time
+ Actually, you may add child items to the tqchildren themselves.
+ Such a child behaves then like a tqparent.
+ Now set the start/end time of the tqchildren to specify a time
interval for these items.
*/
-QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
+TQDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
/*!
Constructs an empty Gantt item.
@@ -169,9 +169,9 @@ QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
is specified, a unique name will be generated
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -182,16 +182,16 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
Constructs an empty Gantt item.
\param type the type of the item to insert
- \param parentItem a parent item under which this one goes
+ \param tqparentItem 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
*/
-KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(parentItem,lvtext)
+KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* tqparentItem,
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(tqparentItem,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -211,9 +211,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,after, lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,after, lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -224,18 +224,18 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
Constructs an empty Gantt item.
\param type the type of the item to insert
- \param parentItem a parent item under which this one goes
+ \param tqparentItem 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 list view
\param name the name by which the item can be identified. If no name
is specified, a unique name will be generated
*/
-KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
+KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* tqparentItem,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem( parentItem, after, lvtext )
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem( tqparentItem, after, lvtext )
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -268,8 +268,8 @@ KDGanttViewItem::~KDGanttViewItem()
if ( listView() ) {
if ( isOpen() )
setOpen( false );
- if ( parent() )
- parent()->takeItem( this );
+ if ( tqparent() )
+ tqparent()->takeItem( this );
else
myGanttView->myListView->takeItem( this );
myGanttView->myTimeTable->updateMyContent();
@@ -283,7 +283,7 @@ KDGanttViewItem::~KDGanttViewItem()
Generates a unique name if necessary and inserts it into the item
dictionary.
*/
-void KDGanttViewItem::generateAndInsertName( const QString& name )
+void KDGanttViewItem::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -291,11 +291,11 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
// We had a name, remove it
sItemDict.remove( _name );
- QString newName;
- if ( name.isEmpty() || sItemDict.find( name ) ) {
+ TQString newName;
+ if ( name.isEmpty() || sItemDict.tqfind( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
- while( sItemDict.find( newName ) ) {
+ while( sItemDict.tqfind( newName ) ) {
newName += "_0";
}
} else {
@@ -311,7 +311,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
\return the unique item name
*/
-QString KDGanttViewItem::name() const
+TQString KDGanttViewItem::name() const
{
return _name;
}
@@ -325,11 +325,11 @@ QString KDGanttViewItem::name() const
with that name exists
*/
-KDGanttViewItem* KDGanttViewItem::find( const QString& name )
+KDGanttViewItem* KDGanttViewItem::tqfind( const TQString& name )
{
- if (name.isEmpty()) // avoid error msg from QDict
+ if (name.isEmpty()) // avoid error msg from TQDict
return 0;
- return sItemDict.find( name );
+ return sItemDict.tqfind( name );
}
@@ -369,7 +369,7 @@ void KDGanttViewItem::setEnabled( bool on )
temp->setEnabled( on );
temp = temp->nextSibling();
}
- QListViewItem::setEnabled( on );
+ TQListViewItem::setEnabled( on );
myGanttView->myTimeTable->dec_blockUpdating();
}
updateCanvasItems();
@@ -414,7 +414,7 @@ void KDGanttViewItem::setItemVisible( bool on )
*/
bool KDGanttViewItem::itemVisible () const
{
- return QListViewItem::isVisible();
+ return TQListViewItem::isVisible();
}
@@ -451,7 +451,7 @@ bool KDGanttViewItem::editable() const
Useful to get a so called "calendar view" with many items in one row.
When \a displaySubitemsAsGroup() is set to true, this item has a normal view,
when it is expanded. If it is not expanded (and has at least one child),
- the item itself is hidden, and all children are displayed instead.
+ the item itself is hidden, and all tqchildren are displayed instead.
To manage the painting priority of the childs (if overlapping),
you may set \a priority() of these items.
@@ -463,9 +463,9 @@ void KDGanttViewItem::setDisplaySubitemsAsGroup( bool show )
if ( !show && _displaySubitemsAsGroup)
isVisibleInGanttView = true;
_displaySubitemsAsGroup = show;
- if ( parent() )
- if ( parent()->isOpen() )
- parent()->setOpen( true );
+ if ( tqparent() )
+ if ( tqparent()->isOpen() )
+ tqparent()->setOpen( true );
if ( isOpen() )
setOpen( true );
updateCanvasItems();
@@ -534,7 +534,7 @@ int KDGanttViewItem::priority()
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewItem::setStartTime( const QDateTime& )
+void KDGanttViewItem::setStartTime( const TQDateTime& )
{
}
@@ -545,7 +545,7 @@ void KDGanttViewItem::setStartTime( const QDateTime& )
\return the start time of this item
\sa setStartTime(), setEndTime(), endTime()
*/
-QDateTime KDGanttViewItem::startTime() const
+TQDateTime KDGanttViewItem::startTime() const
{
return myStartTime;
}
@@ -559,7 +559,7 @@ QDateTime KDGanttViewItem::startTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewItem::setEndTime( const QDateTime& end )
+void KDGanttViewItem::setEndTime( const TQDateTime& end )
{
switch( type() ) {
case Event:
@@ -583,7 +583,7 @@ void KDGanttViewItem::setEndTime( const QDateTime& end )
\return the end time of this item
\sa setEndTime(), setStartTime(), startTime()
*/
-QDateTime KDGanttViewItem::endTime() const
+TQDateTime KDGanttViewItem::endTime() const
{
return myEndTime;
}
@@ -600,7 +600,7 @@ QDateTime KDGanttViewItem::endTime() const
\sa text(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-void KDGanttViewItem::setText( const QString& text )
+void KDGanttViewItem::setText( const TQString& text )
{
textCanvas->setText(text);
textCanvasText = text;
@@ -615,18 +615,18 @@ void KDGanttViewItem::setText( const QString& text )
\sa setText(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-QString KDGanttViewItem::text() const
+TQString KDGanttViewItem::text() const
{
return textCanvasText;
}
/*!
- \deprecated Use setListViewTest( int, const QString& ) instead
+ \deprecated Use setListViewTest( int, const TQString& ) instead
*/
-void KDGanttViewItem::setListViewText( const QString& text, int column )
+void KDGanttViewItem::setListViewText( const TQString& text, int column )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -637,9 +637,9 @@ void KDGanttViewItem::setListViewText( const QString& text, int column )
\param text the text to be shown
\sa text(), setTextColor(), textColor(), setText(), listViewText()
*/
-void KDGanttViewItem::setListViewText( int column, const QString& text )
+void KDGanttViewItem::setListViewText( int column, const TQString& text )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -651,9 +651,9 @@ void KDGanttViewItem::setListViewText( int column, const QString& text )
\sa setText(), setTextColor(), textColor(), text(),
setListViewText()
*/
-QString KDGanttViewItem::listViewText( int column ) const
+TQString KDGanttViewItem::listViewText( int column ) const
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
@@ -663,7 +663,7 @@ QString KDGanttViewItem::listViewText( int column ) const
\param font the font to be shown
\sa font()
*/
-void KDGanttViewItem::setFont( const QFont& font )
+void KDGanttViewItem::setFont( const TQFont& font )
{
textCanvas->setFont(font);
updateCanvasItems();
@@ -676,7 +676,7 @@ void KDGanttViewItem::setFont( const QFont& font )
\return the font used for the text in this item
\sa setFont()
*/
-QFont KDGanttViewItem::font() const
+TQFont KDGanttViewItem::font() const
{
return textCanvas->font();
}
@@ -688,7 +688,7 @@ QFont KDGanttViewItem::font() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewItem::setTooltipText( const QString& text )
+void KDGanttViewItem::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -700,7 +700,7 @@ void KDGanttViewItem::setTooltipText( const QString& text )
\return the tooltip text
\sa setTooltipText()
*/
-QString KDGanttViewItem::tooltipText() const
+TQString KDGanttViewItem::tooltipText() const
{
return myToolTipText;
@@ -713,7 +713,7 @@ QString KDGanttViewItem::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewItem::setWhatsThisText( const QString& text )
+void KDGanttViewItem::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
}
@@ -726,7 +726,7 @@ void KDGanttViewItem::setWhatsThisText( const QString& text )
\sa setWhatsThisText()
*/
-QString KDGanttViewItem::whatsThisText() const
+TQString KDGanttViewItem::whatsThisText() const
{
return myWhatsThisText;
}
@@ -735,7 +735,7 @@ QString KDGanttViewItem::whatsThisText() const
/*!
Specifies whether this item should be shown highlighted. The user
can also highlight items with the mouse.
- If the item displays its subitems (children) as a group
+ If the item displays its subitems (tqchildren) as a group
(displaySubitemsAsGroup() == true),
all changes apply to all subitems as well.
@@ -773,16 +773,16 @@ bool KDGanttViewItem::highlight() const
/*!
- Specifies the shapes to be used for this item.
+ Specifies the tqshapes to be used for this item.
- It is advisable not to use this method, but rather set the shapes
+ It is advisable not to use this method, but rather set the tqshapes
for all items of a type with KDGanttView::setShapes() in order to
get a uniform Gantt view.
- \param start the start shape
- \param middle the middle shape
- \param end the end shape
- \sa shapes(), setColors(), colors()
+ \param start the start tqshape
+ \param middle the middle tqshape
+ \param end the end tqshape
+ \sa tqshapes(), setColors(), colors()
*/
void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end )
{
@@ -799,45 +799,45 @@ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end )
/*!
- Creates shapes of the specified type \a shape.
- The background shape color is set to black and the background shape
- is slightly bit bigger than the foreground shape to have a black border
- around the foreground shape.
+ Creates tqshapes of the specified type \a tqshape.
+ The background tqshape color is set to black and the background tqshape
+ is slightly bit bigger than the foreground tqshape to have a black border
+ around the foreground tqshape.
- \param itemShape the foreground shape
- \param middle itemShapeBack the background shape
- \param shape the type of the shape
+ \param itemShape the foreground tqshape
+ \param middle itemShapeBack the background tqshape
+ \param tqshape the type of the tqshape
(may be TriangleDown, TriangleUp, Diamond, Square, Circle)
- \sa shapes(), setColors(), colors()
+ \sa tqshapes(), setColors(), colors()
*/
void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
KDCanvasPolygonItem* &itemShapeBack,
- Shape shape )
+ Shape tqshape )
{
if ( itemShape && type() == Task )
return;
if (itemShape) delete itemShape;
if (itemShapeBack) delete itemShapeBack;
- QCanvasPolygonalItem * item;
- QCanvasPolygonalItem * itemBack;
+ TQCanvasPolygonalItem * item;
+ TQCanvasPolygonalItem * itemBack;
int size = myItemSize+2;
int hei = (myItemSize/3)/2;
- switch (shape) {
+ switch (tqshape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -847,17 +847,17 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
// of the same size as a TriangleDown-icon, if we increment the size by 2
size+=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -865,19 +865,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
case Diamond:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -885,19 +885,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
{
size -=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -912,8 +912,8 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
break;
}
default:
- // Uninitialized shape, can e.g. be the case with free-busy
- // items which don't have any shapes
+ // Uninitialized tqshape, can e.g. be the case with free-busy
+ // items which don't have any tqshapes
return;
}
item->setBrush(Qt::SolidPattern);
@@ -927,14 +927,14 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
/*!
- Returns the shapes used for this item
+ Returns the tqshapes used for this item
- \param start returns the start shape
- \param middle returns the middle shape
- \param end returns the end shape
+ \param start returns the start tqshape
+ \param middle returns the middle tqshape
+ \param end returns the end tqshape
\sa setShapes(), setColors(), colors()
*/
-void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
+void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const
{
start = myStartShape;
middle = myMiddleShape;
@@ -943,19 +943,19 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
/*!
- Specifies the colors in which to draw the shapes of this item.
+ Specifies the colors in which to draw the tqshapes of this item.
It is advisable not to use this method, but rather set the colors
for all items of a type with KDGanttView::setColors() in order to
get a uniform Gantt view.
- \param start the color for the start shape
- \param middle the color for the middle shape
- \param end the color for the end shape
- \sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
+ \param start the color for the start tqshape
+ \param middle the color for the middle tqshape
+ \param end the color for the end tqshape
+ \sa colors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
- const QColor& end )
+void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end )
{
myStartColor=start ;
@@ -980,9 +980,9 @@ void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
\param start returns the start color
\param middle returns the middle color
\param end returns the end color
- \sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
+ \sa setColors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColor ;
middle = myMiddleColor;
@@ -992,23 +992,23 @@ void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
/*!
- Specifies the highlight colors in which to draw the shapes of this item.
+ Specifies the highlight colors in which to draw the tqshapes of this item.
It is advisable not to use this method, but rather set the highlight
colors for all items of a type with
KDGanttView::setHighlightColors() in order to get a uniform Gantt
view.
- If the item displays its subitems (children) as a group,
+ If the item displays its subitems (tqchildren) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
- \param start the highlight color for the start shape
- \param middle the highlight color for the middle shape
- \param end the highlight color for the end shape
- \sa highlightColors(), setShapes(), shapes()
+ \param start the highlight color for the start tqshape
+ \param middle the highlight color for the middle tqshape
+ \param end the highlight color for the end tqshape
+ \sa highlightColors(), setShapes(), tqshapes()
*/
-void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& middle, const QColor& end )
+void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end )
{
myStartColorHL=start ;
myMiddleColorHL= middle;
@@ -1032,9 +1032,9 @@ void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& mid
\param start returns the start highlight color
\param middle returns the middle highlight color
\param end returns the end highlight color
- \sa setHighlightColors(), setShapes(), shapes()
+ \sa setHighlightColors(), setShapes(), tqshapes()
*/
-void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColorHL ;
middle = myMiddleColorHL;
@@ -1048,13 +1048,13 @@ void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& en
It is advisable not to use this method, but rather set the text color
for all items with KDGanttView::setTextColor() in order to get a
uniform Gantt view.
- If the item displays its subitems (children) as a group,
+ If the item displays its subitems (tqchildren) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
\param color the text color
\sa textColor(), setText(), text()
*/
-void KDGanttViewItem::setTextColor( const QColor& color )
+void KDGanttViewItem::setTextColor( const TQColor& color )
{
myTextColor = color;
@@ -1077,7 +1077,7 @@ void KDGanttViewItem::setTextColor( const QColor& color )
\return the text color
\sa setTextColor(), setText(), text()
*/
-QColor KDGanttViewItem::textColor() const
+TQColor KDGanttViewItem::textColor() const
{
return myTextColor;
}
@@ -1086,7 +1086,7 @@ QColor KDGanttViewItem::textColor() const
/*!
\enum KDGanttViewItem::Shape
- This enum is used in order to specify the shapes of a Gantt chart
+ This enum is used in order to specify the tqshapes of a Gantt chart
item.
*/
@@ -1105,17 +1105,17 @@ QColor KDGanttViewItem::textColor() const
\param pixmap the pixmap to show
\sa pixmap()
*/
-void KDGanttViewItem::setPixmap( int column, const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( int column, const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( column, pixmap );
+ TQListViewItem::setPixmap( column, pixmap );
}
/*!
- \deprecated use setPixmap( int, const QPixmap& ) instead
+ \deprecated use setPixmap( int, const TQPixmap& ) instead
*/
-void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( 0, pixmap );
+ TQListViewItem::setPixmap( 0, pixmap );
}
@@ -1126,9 +1126,9 @@ void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
\return a pointer to the pixmap shown
\sa setPixmap()
*/
-const QPixmap* KDGanttViewItem::pixmap( int column ) const
+const TQPixmap* KDGanttViewItem::pixmap( int column ) const
{
- return QListViewItem::pixmap( column );
+ return TQListViewItem::pixmap( column );
}
@@ -1140,14 +1140,14 @@ const QPixmap* KDGanttViewItem::pixmap( int column ) const
for all items of a type with KDGanttView::setDefaultColor() in order to
get a uniform Gantt view.
- If the item displays its subitems (children) as a group,
+ If the item displays its subitems (tqchildren) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
\param color the default color to use
\sa defaultColor(), setColors(), colors()
*/
-void KDGanttViewItem::setDefaultColor( const QColor& color )
+void KDGanttViewItem::setDefaultColor( const TQColor& color )
{
myDefaultColor = color;
@@ -1173,7 +1173,7 @@ void KDGanttViewItem::setDefaultColor( const QColor& color )
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttViewItem::defaultColor() const
+TQColor KDGanttViewItem::defaultColor() const
{
return myDefaultColor;
}
@@ -1187,14 +1187,14 @@ QColor KDGanttViewItem::defaultColor() const
for all items of a type with KDGanttView::setDefaultHighlightColor()
in order to get a uniform Gantt view.
- If the item displays its subitems (children) as a group,
+ If the item displays its subitems (tqchildren) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
\param color the default highlighting color to use
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
+void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color )
{
myDefaultColorHL = color;
if ( displaySubitemsAsGroup() ) {
@@ -1217,7 +1217,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttViewItem::defaultHighlightColor() const
+TQColor KDGanttViewItem::defaultHighlightColor() const
{
return myDefaultColorHL;
}
@@ -1226,12 +1226,12 @@ QColor KDGanttViewItem::defaultHighlightColor() const
/*!
Returns the first child of this item.
- \return the first child of this item, 0 if this item has no children
+ \return the first child of this item, 0 if this item has no tqchildren
*/
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
- return (KDGanttViewItem* )QListViewItem::firstChild();
+ return (KDGanttViewItem* )TQListViewItem::firstChild();
}
@@ -1243,19 +1243,19 @@ KDGanttViewItem* KDGanttViewItem::firstChild() const
*/
KDGanttViewItem* KDGanttViewItem::nextSibling() const
{
- return (KDGanttViewItem* )QListViewItem::nextSibling();
+ return (KDGanttViewItem* )TQListViewItem::nextSibling();
}
/*!
- Returns the parent item of this item
+ Returns the tqparent item of this item
- \return the parent item of this item, 0 if this item is a top-level
+ \return the tqparent item of this item, 0 if this item is a top-level
item
*/
-KDGanttViewItem* KDGanttViewItem::parent() const
+KDGanttViewItem* KDGanttViewItem::tqparent() const
{
- return (KDGanttViewItem*)QListViewItem::parent();
+ return (KDGanttViewItem*)TQListViewItem::tqparent();
}
@@ -1266,7 +1266,7 @@ KDGanttViewItem* KDGanttViewItem::parent() const
*/
KDGanttViewItem* KDGanttViewItem::itemAbove()
{
- return (KDGanttViewItem* )QListViewItem::itemAbove();
+ return (KDGanttViewItem* )TQListViewItem::itemAbove();
}
@@ -1281,7 +1281,7 @@ KDGanttViewItem* KDGanttViewItem::itemAbove()
KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
{
- KDGanttViewItem* retItem = (KDGanttViewItem* )QListViewItem::itemBelow();
+ KDGanttViewItem* retItem = (KDGanttViewItem* )TQListViewItem::itemBelow();
if ( !includeDisabled ) {
return retItem;
}
@@ -1290,7 +1290,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
return retItem;
}
}
- KDGanttViewItem* Item2 = (KDGanttViewItem* )QListViewItem::listView()->itemAt(QPoint (2, QListViewItem::itemPos() + QListViewItem::height() +2) );
+ KDGanttViewItem* Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) );
if ( Item2 != 0 )
if (!Item2->enabled() )
return Item2;
@@ -1304,8 +1304,8 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
void KDGanttViewItem::updateCanvasItems()
{
if (blockUpdating) return;
- QPen p,pBack;
- QBrush b;
+ TQPen p,pBack;
+ TQBrush b;
b.setStyle(Qt::SolidPattern);
if ( enabled() ) {
textCanvas->setColor(myTextColor);
@@ -1338,9 +1338,9 @@ void KDGanttViewItem::updateCanvasItems()
endLine->setPen(p);
}
} else {
- //QColor discol = Qt::lightGray;
- QColor discol = QColor(232,232,232);
- textCanvas->setColor( QColor(150,150,150) );
+ //TQColor discol = TQt::lightGray;
+ TQColor discol = TQColor(232,232,232);
+ textCanvas->setColor( TQColor(150,150,150) );
b.setStyle(Qt::SolidPattern);
b.setColor(discol);
startShape->setBrush(b);
@@ -1354,7 +1354,7 @@ void KDGanttViewItem::updateCanvasItems()
pBack.setWidth((myItemSize/3-1)+2);
startLineBack->setPen(pBack);
endLineBack->setPen(pBack);
- QFont f = textCanvas->font();
+ TQFont f = textCanvas->font();
f.setPixelSize(myItemSize);
textCanvas->setFont(f);
//if (isvisible) {
@@ -1380,7 +1380,7 @@ void KDGanttViewItem::setOpen( bool open )
} else {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
}
@@ -1390,16 +1390,16 @@ void KDGanttViewItem::showItem( bool, int )
}
-QPoint KDGanttViewItem::getTaskLinkStartCoord(QPoint p)
+TQPoint KDGanttViewItem::getTaskLinkStartCoord(TQPoint p)
{
textCanvas->move(p.x()+myItemSize, itemPos() + height()/2-myItemSize/2);
- return QPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
}
-QPoint KDGanttViewItem::getTaskLinkEndCoord()
+TQPoint KDGanttViewItem::getTaskLinkEndCoord()
{
- return QPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
}
@@ -1421,7 +1421,7 @@ void KDGanttViewItem::setCallListViewOnSetOpen( bool call )
void KDGanttViewItem::initColorAndShapes(Type t)
{
- setTextOffset(QPoint(0,0));
+ setTextOffset(TQPoint(0,0));
//_isCalendar = false;
_callListViewOnSetOpen = true;
myType = t;
@@ -1443,8 +1443,8 @@ void KDGanttViewItem::initColorAndShapes(Type t)
myGanttView->myTimeHeader->saveCenterDateTime();
myStartTime = myGanttView->myTimeHeader->myCenterDateTime;
myEndTime = myStartTime;
- myToolTipText =QListViewItem::text(0);
- myWhatsThisText = QListViewItem::text(0);
+ myToolTipText =TQListViewItem::text(0);
+ myWhatsThisText = TQListViewItem::text(0);
isHighlighted = false;
isEditable = true;
_displaySubitemsAsGroup = myGanttView->displaySubitemsAsGroup();
@@ -1456,7 +1456,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
startLineBack->setZ(1);endLineBack->setZ(1);
actualEnd = new KDCanvasLine(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
actualEnd->setZ(5);
- actualEnd->setPen( QPen ( Qt::red, 3 ) );
+ actualEnd->setPen( TQPen ( TQt::red, 3 ) );
textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
textCanvas->setText("");
@@ -1467,10 +1467,10 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setDefaultColor( myGanttView->defaultColor(myType));
// set default highlight color
setDefaultHighlightColor(myGanttView->defaultHighlightColor(myType));
- // set shapes
- if (!( shapeDefined = (myGanttView->shapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
+ // set tqshapes
+ if (!( tqshapeDefined = (myGanttView->tqshapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
- //qDebug("KDGantt::KDGanttViewItem created with not user defined shapes");
+ //qDebug("KDGantt::KDGanttViewItem created with not user defined tqshapes");
};
setShapes(myStartShape,myMiddleShape,myEndShape);
@@ -1484,19 +1484,19 @@ void KDGanttViewItem::initColorAndShapes(Type t)
floatStartShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
floatEndShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
- // set color of shapes
+ // set color of tqshapes
if (!( colorDefined = (myGanttView->colors(myType,myStartColor,myMiddleColor,myEndColor)))) {
};
setColors(defaultColor(),defaultColor(), defaultColor());
- // set highlight color of shapes
+ // set highlight color of tqshapes
if (!( colorHLDefined = (myGanttView->highlightColors(myType,myStartColorHL,myMiddleColorHL,myEndColorHL)))) {
};
setHighlightColors(defaultHighlightColor(),defaultHighlightColor(), defaultHighlightColor());
setFont(myGanttView->font());
// if (type() == Task)
- //setText(QListViewItem::text(0)); // testing only
+ //setText(TQListViewItem::text(0)); // testing only
//isvisible = true;
_priority = 150;
_showNoInformation = false;
@@ -1506,9 +1506,9 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-QString KDGanttViewItem::shapeToString( Shape shape )
+TQString KDGanttViewItem::tqshapeToString( Shape tqshape )
{
- switch( shape ) {
+ switch( tqshape ) {
case TriangleDown:
return "TriangleDown";
case TriangleUp:
@@ -1524,7 +1524,7 @@ QString KDGanttViewItem::shapeToString( Shape shape )
}
-KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
+KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& string )
{
if( string == "TriangleDown" )
return TriangleDown;
@@ -1545,13 +1545,13 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
Creates a DOM node that describes this item.
\param doc the DOM document to which the node belongs
- \param parentElement the element into which to insert this node
+ \param tqparentElement the element into which to insert this node
*/
-void KDGanttViewItem::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewItem::createNode( TQDomDocument& doc,
+ TQDomElement& tqparentElement )
{
- QDomElement itemElement = doc.createElement( "Item" );
- parentElement.appendChild( itemElement );
+ TQDomElement itemElement = doc.createElement( "Item" );
+ tqparentElement.appendChild( itemElement );
itemElement.setAttribute( "Type", typeToString( type() ) );
KDGanttXML::createDateTimeNode( doc, itemElement, "StartTime", startTime() );
@@ -1569,15 +1569,15 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createBoolNode( doc, itemElement, "Open", isOpen() );
KDGanttXML::createBoolNode( doc, itemElement, "Highlight", highlight() );
Shape startShape, middleShape, endShape;
- shapes( startShape, middleShape, endShape );
+ tqshapes( startShape, middleShape, endShape );
KDGanttXML::createStringNode( doc, itemElement, "StartShape",
- shapeToString( startShape ) );
+ tqshapeToString( startShape ) );
KDGanttXML::createStringNode( doc, itemElement, "MiddleShape",
- shapeToString( middleShape ) );
+ tqshapeToString( middleShape ) );
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
- shapeToString( endShape ) );
+ tqshapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, itemElement, "StartColor", startColor );
KDGanttXML::createColorNode( doc, itemElement, "MiddleColor", middleColor );
@@ -1592,7 +1592,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createColorNode( doc, itemElement, "EndHighlightColor", endColor );
KDGanttXML::createColorNode( doc, itemElement, "TextColor", textColor() );
KDGanttXML::createStringNode( doc, itemElement, "Name", name() );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
itemElement.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -1613,9 +1613,9 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
\return the newly created item
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1645,9 +1645,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1672,22 +1672,22 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
Creates a KDGanttViewItem according to the specification in a DOM
element.
- \param parent the parent item under which the item will be inserted
+ \param tqparent the tqparent item under which the item will be inserted
\param element the DOM element from which to read the specification
\return the newly created element
*/
-KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element )
+KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* tqparent,
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
- item = new KDGanttViewTaskItem( parent );
+ item = new KDGanttViewTaskItem( tqparent );
else if( typeString == "Summary" )
- item = new KDGanttViewSummaryItem( parent );
+ item = new KDGanttViewSummaryItem( tqparent );
else if( typeString == "Event" )
- item = new KDGanttViewEventItem( parent );
+ item = new KDGanttViewEventItem( tqparent );
else {
qDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
return 0;
@@ -1702,24 +1702,24 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
Creates a KDGanttViewItem according to the specification in a DOM
element.
- \param parent the parent item under which the item will be inserted
+ \param tqparent the tqparent item under which the item will be inserted
\param previous to item behind this one should appear
\param element the DOM element from which to read the specification
\return the newly created element
*/
-KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
+KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* tqparent,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
- item = new KDGanttViewTaskItem( parent, previous );
+ item = new KDGanttViewTaskItem( tqparent, previous );
else if( typeString == "Summary" )
- item = new KDGanttViewSummaryItem( parent, previous );
+ item = new KDGanttViewSummaryItem( tqparent, previous );
else if( typeString == "Event" )
- item = new KDGanttViewEventItem( parent, previous );
+ item = new KDGanttViewEventItem( tqparent, previous );
else {
qDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
return 0;
@@ -1733,48 +1733,48 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
/*
Fills in the values in the item by reading the DOM element.
*/
-void KDGanttViewItem::loadFromDomElement( QDomElement& element )
+void KDGanttViewItem::loadFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
Shape startShape = TriangleDown, middleShape = TriangleDown,
endShape = TriangleDown;
- QColor startColor, middleColor, endColor;
- QColor startHighlightColor, middleHighlightColor, endHighlightColor;
- QString tempName;
+ TQColor startColor, middleColor, endColor;
+ TQColor startHighlightColor, middleHighlightColor, endHighlightColor;
+ TQString tempName;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "StartTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setStartTime( value );
} else if( tagName == "EndTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setEndTime( value );
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setText( value );
} else if( tagName == "Font" ) {
- QFont value;
+ TQFont value;
if( KDGanttXML::readFontNode( element, value ) )
setFont( value );
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setTooltipText( value );
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setWhatsThisText( value );
} else if( tagName == "Pixmap" ) {
- QPixmap value;
+ TQPixmap value;
if( KDGanttXML::readPixmapNode( element, value ) )
setPixmap( value );
} else if( tagName == "ListViewText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setListViewText( value );
} else if( tagName == "Open" ) {
@@ -1786,64 +1786,64 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
if( KDGanttXML::readBoolNode( element, value ) )
setHighlight( value );
} else if( tagName == "StartShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = stringToShape( value );
} else if( tagName == "MiddleShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = stringToShape( value );
} else if( tagName == "EndShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = stringToShape( value );
} else if( tagName == "DefaultColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( value );
} else if( tagName == "StartColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "MiddleColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "EndColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else if( tagName == "DefaultHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( value );
} else if( tagName == "StartHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startHighlightColor = value;
} else if( tagName == "MiddleHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleHighlightColor = value;
} else if( tagName == "EndHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endHighlightColor = value;
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempName = value;
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -1881,7 +1881,7 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
}
-QString KDGanttViewItem::typeToString( Type type )
+TQString KDGanttViewItem::typeToString( Type type )
{
switch( type ) {
case Event:
@@ -1942,13 +1942,13 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
/*!
- Returns the start time of the children of this item.
+ Returns the start time of the tqchildren of this item.
- \return the start time of the children of this item
+ \return the start time of the tqchildren of this item
*/
-QDateTime KDGanttViewItem::myChildStartTime()
+TQDateTime KDGanttViewItem::myChildStartTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -1976,13 +1976,13 @@ QDateTime KDGanttViewItem::myChildStartTime()
/*!
- Returns the end time of the children of this item.
+ Returns the end time of the tqchildren of this item.
- \return the end time of the children of this item
+ \return the end time of the tqchildren of this item
*/
-QDateTime KDGanttViewItem::myChildEndTime()
+TQDateTime KDGanttViewItem::myChildEndTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -2028,7 +2028,7 @@ bool KDGanttViewItem::showNoInformation()
The height of the line is the height of the item.
The brush of the line is specified by KDGanttView::setNoInformationBrush().
(i.e. the same brush for all items of the Gantt view).
- The default brush is QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ The default brush is TQBrush( TQColor ( 100,100,100 ), TQt::FDiagPattern );
\param show if true, the 'showNoInformation' line is shown for this item
\sa showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
*/
@@ -2042,12 +2042,12 @@ void KDGanttViewItem::setShowNoInformation( bool show )
/*!
If the name of this item is \a name (i.e., listViewText() == name),
the pointer to this item is returned. Otherwise, it looks for an
- item with name \a name in the set of children and subchildren of
+ item with name \a name in the set of tqchildren and subtqchildren of
this item.
\param name the name of the item
\return the pointer to the item with name \a name
*/
-KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
+KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
{
if ( listViewText() == name )
return this;
@@ -2062,7 +2062,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
/*
-void KDGanttViewItem::printinfo( QString s )
+void KDGanttViewItem::printinfo( TQString s )
{
KDGanttViewItem* temp = firstChild();
while (temp != 0) {
@@ -2103,7 +2103,7 @@ int KDGanttViewItem::computeHeight()
showItem( false );
if ( firstChild() )
firstChild()->hideSubtree();
- // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", QListViewItem::text(0).latin1());
+ // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", TQListViewItem::text(0).latin1());
return 0;
}
@@ -2144,7 +2144,7 @@ int KDGanttViewItem::computeHeight()
// display closed item as usual
//
if ( isOpen() ) {
- //qDebug("KDGanttViewItem::computeHeight() %s is open ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is open ", TQListViewItem::text(0).latin1());
temp = firstChild();
// if item opened, iterate over all subitems
int tempHeight;
@@ -2167,7 +2167,7 @@ int KDGanttViewItem::computeHeight()
temp = temp->nextSibling();
}
} else { // closed!
- //qDebug("KDGanttViewItem::computeHeight() %s is closed ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is closed ", TQListViewItem::text(0).latin1());
if ( !displaySubitemsAsGroup() ) {
if ( firstChild() ) {
@@ -2185,7 +2185,7 @@ int KDGanttViewItem::computeHeight()
showItem( true );
hei += height();
- //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", QListViewItem::text(0).latin1(), hei);
+ //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", TQListViewItem::text(0).latin1(), hei);
return hei;
}
@@ -2207,10 +2207,10 @@ bool KDGanttViewItem::showNoCross()
}
-void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
+void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg,
int w, int y, int h )
{
- QListViewItem::paintBranches ( p, cg, w, y, h);
+ TQListViewItem::paintBranches ( p, cg, w, y, h);
if ( !myGanttView->calendarMode() )
return;
else {
@@ -2222,11 +2222,11 @@ void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
int hei = temp->height();
//qDebug(" y %d w %d h %d ", y,w,h);
//qDebug("yc %d hei %d",y_coord,hei );
- myGanttView->myListView->paintemptyarea( p, QRect( 0,y+y_coord,w,hei));
+ myGanttView->myListView->paintemptyarea( p, TQRect( 0,y+y_coord,w,hei));
int x_c = w/2;
int y_c = y+y_coord+ temp->height ()/2;
int y_ce ;
- if ( temp->itemBelow() && temp->itemBelow()->parent() == this )
+ if ( temp->itemBelow() && temp->itemBelow()->tqparent() == this )
y_ce =y+y_coord+ temp->height ();
else
y_ce = y_c;
@@ -2253,11 +2253,11 @@ void KDGanttViewItem::resetSubitemVisibility()
if ( myGanttView->calendarMode() ) {
// in calendarmode only items can be opened which have subitems which have subitems
if ( ! temp ) {
- if ( !parent() )
- // has no parent, has no child : show!
+ if ( !tqparent() )
+ // has no tqparent, has no child : show!
setVisible( true );
else
- // has parent, has no child : hide!
+ // has tqparent, has no child : hide!
setVisible( false );
return;
}
@@ -2292,7 +2292,7 @@ void KDGanttViewItem::resetSubitemVisibility()
In calendar mode, only those items can be opened
which have subitems which have subitems.
An item which has subitems which have no subitems is called a calendar.
- I.e., an item that contains
+ I.e., an item that tqcontains
multiple calendars can be opened, while a calendar item itself cannot.
But if all calendars of an item do not have any subitem (e.g at startup),
the program cannot detect automatically that it should be possible to open
@@ -2363,37 +2363,37 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
\var KDGanttViewItem::startShape
- the shape at the beginning of the item
+ the tqshape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShape
- the shape in the middle of the item
+ the tqshape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShape
- the shape at the end of the item
+ the tqshape at the end of the item
*/
/*!
\var KDGanttViewItem::startShapeBack
- the background shape at the beginning of the item
+ the background tqshape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShapeBack
- the background shape in the middle of the item
+ the background tqshape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShapeBack
- the background shape at the end of the item
+ the background tqshape at the end of the item
*/
@@ -2463,16 +2463,16 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
Returns the coordinate of this items middle left point
*/
-QPoint KDGanttViewItem::middleLeft()
+TQPoint KDGanttViewItem::middleLeft()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
}
/*!
Returns the coordinate of this items middle right point
*/
-QPoint KDGanttViewItem::middleRight()
+TQPoint KDGanttViewItem::middleRight()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
}
/*!
Moves this items text.
@@ -2494,21 +2494,21 @@ void KDGanttViewItem::moveTextCanvas(int x, int y)
*/
void KDGanttViewItem::moveTextCanvas()
{
- QPoint m = myTextOffset+middleRight();
+ TQPoint m = myTextOffset+middleRight();
textCanvas->move(m.x(), m.y()-myItemSize/2);
}
/*!
Sets with how much the item text is offset.
*/
-void KDGanttViewItem::setTextOffset(QPoint p)
+void KDGanttViewItem::setTextOffset(TQPoint p)
{
//qDebug("%s: setTextOffset() offset: %d,%d",listViewText(0).latin1(),p.x(),p.y());
myTextOffset.setX(p.x());
myTextOffset.setY(p.y());
}
-bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc)
+bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc)
{
return tc == textCanvas;
}
@@ -2522,8 +2522,8 @@ bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc)
void KDGanttViewItem::setProgress(int percent)
{
- myProgress = QMAX(0, percent);
- myProgress = QMIN(100, myProgress);
+ myProgress = TQMAX(0, percent);
+ myProgress = TQMIN(100, myProgress);
}
/*!
@@ -2532,7 +2532,7 @@ void KDGanttViewItem::setProgress(int percent)
\param start the float start time
*/
-void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
+void KDGanttViewItem::setFloatStartTime(const TQDateTime &start)
{
myFloatStartTime = start;
}
@@ -2543,7 +2543,7 @@ void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
\param end the float end time
*/
-void KDGanttViewItem::setFloatEndTime(const QDateTime &end)
+void KDGanttViewItem::setFloatEndTime(const TQDateTime &end)
{
myFloatEndTime = end;
}