diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
commit | 716a5de8870d7c02bb4d0aed72f30291b17b763a (patch) | |
tree | 29e58b213ead28151ccf7eb33d12c968ea844120 /kdgantt/KDGanttView.cpp | |
parent | 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (diff) | |
download | tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.tar.gz tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r-- | kdgantt/KDGanttView.cpp | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index c7bfa0106..9598f8673 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -532,7 +532,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item, the fastest mode. If Medium, there is extra repainting after releasing the scrollbar. This provides fast scrolling with updated content - after scrolling. Recommended, when tqrepaint problems occur. + after scrolling. Recommended, when repaint problems occur. This is the default value after startup. If Always, there is an extra update after every move of the scrollbar. This entails slow scrolling with updated @@ -615,7 +615,7 @@ void KDGanttView::slotHeaderSizeChanged() // legend is cleared - reinit legend with list legendItem* li; for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) { - myLegend->addLegendItem(li->tqshape, li->color, li->text ); + myLegend->addLegendItem(li->shape, li->color, li->text ); } } } @@ -766,25 +766,25 @@ bool KDGanttView::editable() const /*! - Saves the state of the Gantt view in an IO tqdevice in XML format. The saved + Saves the state of the Gantt view in an IO device in XML format. The saved data can be reloaded with \a loadProject(). - \param tqdevice a pointer to the IO tqdevice in which to store the Gantt + \param device a pointer to the IO device 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* tqdevice ) +bool KDGanttView::saveProject( TQIODevice* device ) { - Q_ASSERT( tqdevice ); + Q_ASSERT( device ); TQDomDocument doc = saveXML(); - if( tqdevice->isOpen() ) - tqdevice->close(); - if( tqdevice->open( IO_WriteOnly ) ) { - TQTextStream ts( tqdevice ); + if( device->isOpen() ) + device->close(); + if( device->open( IO_WriteOnly ) ) { + TQTextStream ts( device ); ts << doc.toString(); return true; } else @@ -796,30 +796,30 @@ bool KDGanttView::saveProject( TQIODevice* tqdevice ) Loads a previously saved state of the Gantt view. All current settings and items are discarded before loading the data. - \param tqdevice a pointer to the IO tqdevice from which to load the + \param device a pointer to the IO device 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* tqdevice ) +bool KDGanttView::loadProject( TQIODevice* device ) { - Q_ASSERT( tqdevice ); + Q_ASSERT( device ); - if( tqdevice->isOpen() ) - tqdevice->close(); - if( tqdevice->open( IO_ReadOnly ) ) { + if( device->isOpen() ) + device->close(); + if( device->open( IO_ReadOnly ) ) { TQDomDocument doc( "GanttView" ); TQString err; int errline, errcol; - if ( !doc.setContent( tqdevice, &err, &errline, &errcol ) ) { + if ( !doc.setContent( device, &err, &errline, &errcol ) ) { qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline ); qDebug("%s ", err.latin1()); - tqdevice->close(); + device->close(); return false; } - tqdevice->close(); + device->close(); return loadXML( doc ); } else return false; @@ -1209,7 +1209,7 @@ bool KDGanttView::showTaskLinks() const void KDGanttView::setFont(const TQFont& font) { myListView->setFont(font); - myListView->tqrepaint(); + myListView->repaint(); myTimeHeader->setFont(font); myLegend->setFont( font ); TQWidget::setFont( font ); @@ -1299,21 +1299,21 @@ bool KDGanttView::showTimeTablePopupMenu() const /*! - Sets the tqshapes for a certain type of Gantt item. Not all items use - all three tqshapes (e.g., only summary items use the middle tqshape). + Sets the shapes for a certain type of Gantt item. Not all items use + all three shapes (e.g., only summary items use the middle shape). - This setting overrides any tqshape settings made on individual items. + This setting overrides any shape settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the documentation of the KDGanttViewItem class. - \param type the type of Gantt items for which to set the tqshapes - \param start the tqshape to use for the beginning of the item - \param middle the tqshape to use for the middle of the item - \param end the tqshape to use for the end of the item - \param overwriteExisting if true, overwrites existing tqshape settings + \param type the type of Gantt items for which to set the shapes + \param start the shape to use for the beginning of the item + \param middle the shape to use for the middle of the item + \param end the shape to use for the end of the item + \param overwriteExisting if true, overwrites existing shape settings in the individual items - \sa tqshapes() + \sa shapes() */ void KDGanttView::setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, @@ -1337,18 +1337,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, /*! - Queries the tqshapes for a particular type of Gantt item. + Queries the shapes for a particular type of Gantt item. - \param type the type of Gantt items for which to query the tqshapes - \param start the start tqshape is returned in this parameter - \param middle the middle tqshape is returned in this parameter - \param end the end tqshape is returned in this parameter - \return true if there was a general tqshape set for the specified - type. If the return value is false, the values of the three tqshape + \param type the type of Gantt items for which to query the shapes + \param start the start shape is returned in this parameter + \param middle the middle shape is returned in this parameter + \param end the end shape is returned in this parameter + \return true if there was a general shape set for the specified + type. If the return value is false, the values of the three shape parameters are undefined. \sa setShapes() */ -bool KDGanttView::tqshapes( KDGanttViewItem::Type type, +bool KDGanttView::shapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const @@ -1562,19 +1562,19 @@ void KDGanttView::clearLegend( ) /*! Adds an item to the legend. - \param tqshape the tqshape to display - \param tqshapeColor the color in which to display the tqshape + \param shape the shape to display + \param shapeColor the color in which to display the shape \param text the text to display \sa clearLegend() */ -void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape, - const TQColor& tqshapeColor, +void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, + const TQColor& shapeColor, const TQString& text ) { - myLegend->addLegendItem( tqshape,tqshapeColor,text ); + myLegend->addLegendItem( shape,shapeColor,text ); legendItem* item = new legendItem; - item->tqshape = tqshape; - item->color = tqshapeColor; + item->shape = shape; + item->color = shapeColor; item->text = text; myLegendItems->append( item ); } @@ -3415,58 +3415,58 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const showTimeTablePopupMenu() ); // the Shapes element - TQDomElement tqshapesElement = doc.createElement( "Shapes" ); - docRoot.appendChild( tqshapesElement ); - TQDomElement tqshapesEventElement = doc.createElement( "Event" ); - tqshapesElement.appendChild( tqshapesEventElement ); + TQDomElement shapesElement = doc.createElement( "Shapes" ); + docRoot.appendChild( shapesElement ); + TQDomElement shapesEventElement = doc.createElement( "Event" ); + shapesElement.appendChild( shapesEventElement ); KDGanttViewItem::Shape start, middle, end; - if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", - KDGanttViewItem::tqshapeToString( start ) ); - KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", - KDGanttViewItem::tqshapeToString( middle ) ); - KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", - KDGanttViewItem::tqshapeToString( end ) ); + if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, shapesEventElement, "Start", + KDGanttViewItem::shapeToString( start ) ); + KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", + KDGanttViewItem::shapeToString( middle ) ); + KDGanttXML::createStringNode( doc, shapesEventElement, "End", + KDGanttViewItem::shapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", + KDGanttXML::createStringNode( doc, shapesEventElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", + KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", + KDGanttXML::createStringNode( doc, shapesEventElement, "End", "Undefined" ); } - TQDomElement tqshapesTaskElement = doc.createElement( "Task" ); - tqshapesElement.appendChild( tqshapesTaskElement ); - if( tqshapes( KDGanttViewItem::Task, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", - KDGanttViewItem::tqshapeToString( start ) ); - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", - KDGanttViewItem::tqshapeToString( middle ) ); - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", - KDGanttViewItem::tqshapeToString( end ) ); + TQDomElement shapesTaskElement = doc.createElement( "Task" ); + shapesElement.appendChild( shapesTaskElement ); + if( shapes( KDGanttViewItem::Task, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", + KDGanttViewItem::shapeToString( start ) ); + KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", + KDGanttViewItem::shapeToString( middle ) ); + KDGanttXML::createStringNode( doc, shapesTaskElement, "End", + KDGanttViewItem::shapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", + KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", + KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", + KDGanttXML::createStringNode( doc, shapesTaskElement, "End", "Undefined" ); } - TQDomElement tqshapesSummaryElement = doc.createElement( "Summary" ); - tqshapesElement.appendChild( tqshapesSummaryElement ); - if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", - KDGanttViewItem::tqshapeToString( start ) ); - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", - KDGanttViewItem::tqshapeToString( middle ) ); - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", - KDGanttViewItem::tqshapeToString( end ) ); + TQDomElement shapesSummaryElement = doc.createElement( "Summary" ); + shapesElement.appendChild( shapesSummaryElement ); + if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", + KDGanttViewItem::shapeToString( start ) ); + KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", + KDGanttViewItem::shapeToString( middle ) ); + KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", + KDGanttViewItem::shapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", + KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", + KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", + KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", "Undefined" ); } @@ -3604,7 +3604,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const TQDomElement legendItemElement = doc.createElement( "LegendItem" ); legendItemsElement.appendChild( legendItemElement ); KDGanttXML::createStringNode( doc, legendItemElement, "Shape", - KDGanttViewItem::tqshapeToString( current->tqshape ) ); + KDGanttViewItem::shapeToString( current->shape ) ); KDGanttXML::createColorNode( doc, legendItemElement, "Color", current->color ); KDGanttXML::createStringNode( doc, legendItemElement, "Text", @@ -3757,17 +3757,17 @@ void KDGanttView::editItem( KDGanttViewItem* item) /*! - This method returns the pixmap used for a certain tqshape, in the + This method returns the pixmap used for a certain shape, in the selected color and size. - \param tqshape the tqshape to generate - \param tqshapeColor the foreground color of the tqshape - \param backgroundColor the background color of the tqshape - \param itemSize the size of the tqshape - \return the generated tqshape pixmap + \param shape the shape to generate + \param shapeColor the foreground color of the shape + \param backgroundColor the background color of the shape + \param itemSize the size of the shape + \return the generated shape pixmap */ -TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, - const TQColor& tqshapeColor, +TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, + const TQColor& shapeColor, const TQColor& backgroundColor, int itemSize) { // 10 is a good value as size @@ -3777,11 +3777,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, p.fill( backgroundColor ); TQPainter paint (&p); TQBrush b = TQBrush ( TQt::SolidPattern ); - b.setColor( tqshapeColor ); + b.setColor( shapeColor ); paint.setBrush( b ); TQPen pen( TQt::black, 1 ) ; paint.setPen( pen ); - switch (tqshape) { + switch (shape) { case KDGanttViewItem::TriangleDown:{ TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); @@ -3864,8 +3864,8 @@ void KDGanttView::initDefaults() 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 + // setting the default shape types + // currently, we take for each item for all three shapes (start, middle, end) the same default shape for (i = 0;i<3;++i) { myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task |