summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttView.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kdgantt/KDGanttView.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r--kdgantt/KDGanttView.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 6e2e4b4b..f7eeeacd 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.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.
**
**********************************************************************/
@@ -76,12 +76,12 @@
/*!
Constructs an empty KDGanttView.
- \param parent the widget parent
+ \param tqparent the widget tqparent
\param name the internal debugging name
*/
-KDGanttView::KDGanttView( TQWidget* parent, const char* name )
- : KDGanttMinimizeSplitter( Qt::Vertical, parent, name ),
+KDGanttView::KDGanttView( TQWidget* tqparent, const char* name )
+ : KDGanttMinimizeSplitter( TQt::Vertical, tqparent, name ),
myCanvasView(0),
myTimeHeaderScroll(0),
mFixedHorizon( false )
@@ -156,7 +156,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
initDefaults();
_showHeader = false;
- myTextColor = Qt::black;
+ myTextColor = TQt::black;
myLegendItems = new TQPtrList<legendItem>;
//TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ;
myItemAttributeDialog = new itemAttributeDialog();
@@ -766,25 +766,25 @@ bool KDGanttView::editable() const
/*!
- Saves the state of the Gantt view in an IO device in XML format. The saved
+ Saves the state of the Gantt view in an IO tqdevice in XML format. The saved
data can be reloaded with \a loadProject().
- \param device a pointer to the IO device in which to store the Gantt
+ \param tqdevice a pointer to the IO tqdevice in which to store the Gantt
view state.
\return true if the data could be written, false if an error
occurred
\sa loadProject()
*/
-bool KDGanttView::saveProject( TQIODevice* device )
+bool KDGanttView::saveProject( TQIODevice* tqdevice )
{
- Q_ASSERT( device );
+ Q_ASSERT( tqdevice );
TQDomDocument doc = saveXML();
- if( device->isOpen() )
- device->close();
- if( device->open( IO_WriteOnly ) ) {
- TQTextStream ts( device );
+ if( tqdevice->isOpen() )
+ tqdevice->close();
+ if( tqdevice->open( IO_WriteOnly ) ) {
+ TQTextStream ts( tqdevice );
ts << doc.toString();
return true;
} else
@@ -796,30 +796,30 @@ bool KDGanttView::saveProject( TQIODevice* device )
Loads a previously saved state of the Gantt view. All current
settings and items are discarded before loading the data.
- \param device a pointer to the IO device from which to load the
+ \param tqdevice a pointer to the IO tqdevice from which to load the
Gantt view state.
\return true if the file could be read, false if an error
occurred
\sa saveProject()
*/
-bool KDGanttView::loadProject( TQIODevice* device )
+bool KDGanttView::loadProject( TQIODevice* tqdevice )
{
- Q_ASSERT( device );
+ Q_ASSERT( tqdevice );
- if( device->isOpen() )
- device->close();
- if( device->open( IO_ReadOnly ) ) {
+ if( tqdevice->isOpen() )
+ tqdevice->close();
+ if( tqdevice->open( IO_ReadOnly ) ) {
TQDomDocument doc( "GanttView" );
TQString err;
int errline, errcol;
- if ( !doc.setContent( device, &err, &errline, &errcol ) ) {
+ if ( !doc.setContent( tqdevice, &err, &errline, &errcol ) ) {
qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline );
qDebug("%s ", err.latin1());
- device->close();
+ tqdevice->close();
return false;
}
- device->close();
+ tqdevice->close();
return loadXML( doc );
} else
return false;
@@ -869,7 +869,7 @@ void KDGanttView::print( TQPrinter* printer ,
// at the top, we want to print current time/date
TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString();
- int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
+ int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
// compute the scale
@@ -2341,12 +2341,12 @@ KDGanttViewItem* KDGanttView::firstChild() const
/*!
This method turns calendar mode on and off. In calendar mode, only
those items can be opened which have subitems which have
- subitems. I.e., if an item tqcontains multiple calendars, it can be
+ subitems. I.e., if an item contains multiple calendars, it can be
opened, but not a calendar item itself. If you want to use this
GanttView as a calendar view, you have to call
setDisplaySubitemsAsGroup( true ); to use the root items as calendar
items. To create new calendar entries for these root items, create
- a new KDGanttViewTaskItem with this root item as a parent. If you
+ a new KDGanttViewTaskItem with this root item as a tqparent. If you
want an item with subitems to behave like a calendar (which is
possibly empty at startup), please call setIsCalendar( true ); for
this item.
@@ -3727,7 +3727,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group)
myTaskLinkGroupList.append(group);
return;
}
- if (myTaskLinkGroupList.find(group) == -1)
+ if (myTaskLinkGroupList.tqfind(group) == -1)
myTaskLinkGroupList.append(group);
}
@@ -3776,10 +3776,10 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape,
TQPixmap p = TQPixmap( size+4, size+4 );
p.fill( backgroundColor );
TQPainter paint (&p);
- TQBrush b = TQBrush ( Qt::SolidPattern );
+ TQBrush b = TQBrush ( TQt::SolidPattern );
b.setColor( tqshapeColor );
paint.setBrush( b );
- TQPen pen( Qt::black, 1 ) ;
+ TQPen pen( TQt::black, 1 ) ;
paint.setPen( pen );
switch (tqshape) {
case KDGanttViewItem::TriangleDown:{
@@ -3857,12 +3857,12 @@ void KDGanttView::initDefaults()
undefinedColorHL[i] = true;
}
// setting the default colors
- myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = Qt::blue; //event
- myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = Qt::red;
- myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = Qt::green;//task
- myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = Qt::red;
- myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = Qt::cyan;//summary
- myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = Qt::red;
+ myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = TQt::blue; //event
+ myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = TQt::red;
+ myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = TQt::green;//task
+ myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = TQt::red;
+ myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = TQt::cyan;//summary
+ myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = TQt::red;
// setting the default tqshape types
// currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape
@@ -4357,7 +4357,7 @@ bool KDGanttView::dropEnabled() const
order to specify user-defined drop handling, subclass
KDGanttView and reimplement this method.
- \param e The QDropEvent
+ \param e The TQDropEvent
Note: e->source() is a pointer to the KDGanttView from which the drag started.
I.e., if e->source() == this, this drag is an internal drag.
\param droppedItem 0, if this is a drag operation from another
@@ -4433,7 +4433,7 @@ bool KDGanttView::lvDropEvent ( TQDropEvent* e,
In order to define accepting drops for particular items yourself,
subclass KDGanttView and reimplement this method.
- \param e The QDragMoveEvent
+ \param e The TQDragMoveEvent
Note: e->source() is a pointer to the KDGanttView, the drag started from.
I.e., if e->source() == this, this drag is an internal drag.
@@ -4475,7 +4475,7 @@ void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * e)
In order to specify user-defined drop acceptance for particular
items, subclass KDGanttView and reimplement this method.
- \param e The QDragMoveEvent
+ \param e The TQDragMoveEvent
Note: e->source() is a pointer to the KDGanttView, the drag started from.
I.e. if e->source() == this, this drag is an internal drag.
draggedItem 0, if this is a drag operation from another KDGanttView instance.
@@ -4542,7 +4542,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item)
// In order to avoid starting drags for particular items, subclass KDGanttView
// an reimplement this method.
// insert here some code like
- // if ( item->parent() )
+ // if ( item->tqparent() )
// return;
// This particular code will make it impossible to drag other items but root items.
if ( d->drag() ) {
@@ -4800,7 +4800,7 @@ bool KDGanttView::isLinkItemsEnabled() const
const TQString& text )
This signal is emitted whenever the user changes the name of an item
- in the list view using in-place editing. \a text tqcontains the new
+ in the list view using in-place editing. \a text contains the new
text in the list view.
*/