diff options
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r-- | kdgantt/KDGanttView.cpp | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 9403c10ff..6e2e4b4b6 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -69,7 +69,7 @@ In order to set up a Gantt view, create an object of this class, and populate it with a number of \a KDGanttViewItem objects. - If you experience problems with the repainting of the content of the + If you experience problems with the tqrepainting of the content of the Gantt View after scrolling, call \a setRepaintMode(). */ @@ -186,7 +186,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name ) fDropEnabled = false; closingBlocked = false; myTimeHeader->computeTicks(); - centerTimelineAfterShow( TQDateTime::currentDateTime () ); + centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () ); setDisplayEmptyTasksAsLine( false ); TQValueList<int> list; list.append(240); @@ -296,7 +296,7 @@ void KDGanttView::show() } /*! Closes the widget. - The closing is rejected, if a repainting is currently being done. + The closing is rejected, if a tqrepainting is currently being done. \param alsoDelete if true, the widget is deleted \return true, if the widget was closed */ @@ -313,12 +313,12 @@ bool KDGanttView::close ( bool alsoDelete ) /*! Returns a useful size for the view. Returned width: - sizeHint().width() of the list view + width of TimeTable + tqsizeHint().width() of the list view + width of TimeTable Returned height: height() of TimeHeader + height() of TimeTable + height() of Legend (if shown) */ -TQSize KDGanttView::sizeHint() const +TQSize KDGanttView::tqsizeHint() const { bool block = myTimeTable->blockUpdating(); myTimeTable->setBlockUpdating( false ); @@ -328,7 +328,7 @@ TQSize KDGanttView::sizeHint() const * there is a legitimate gui updating issue here somewhere, it will need * to be solved differently. */ - //qApp->processEvents(); + //tqApp->processEvents(); int hintHeight = myTimeHeader->height(); int legendHeight = 0; if ( showLegendButton() ) @@ -342,9 +342,9 @@ TQSize KDGanttView::sizeHint() const if ( myLegend->isShown() ) hintHeight += myLegend->legendSizeHint().height() +10; hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2; - int hintWid = myListView->sizeHint().width(); + int hintWid = myListView->tqsizeHint().width(); //hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width(); - hintWid += myCanvasView->sizeHint().width(); + hintWid += myCanvasView->tqsizeHint().width(); // add 10 for the splitter-bars // qDebug("sizehint %d %d ",hintWid+10, hintHeight ); myTimeTable->setBlockUpdating( block ); @@ -525,14 +525,14 @@ void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item, /*! - Specifies whether the content should be repainted after scrolling or + Specifies whether the content should be tqrepainted after scrolling or not. - \param mode If No, there is no repainting after scrolling. This is + \param mode If No, there is no tqrepainting after scrolling. This is the fastest mode. - If Medium, there is extra repainting after releasing the + If Medium, there is extra tqrepainting after releasing the scrollbar. This provides fast scrolling with updated content - after scrolling. Recommended, when repaint problems occur. + after scrolling. Recommended, when tqrepaint 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->shape, li->color, li->text ); + myLegend->addLegendItem(li->tqshape, li->color, li->text ); } } } @@ -691,9 +691,9 @@ void KDGanttView::setShowListView( bool show ) if(listViewIsVisible == show) return; listViewIsVisible = show; if (listViewIsVisible) - myListView->parentWidget()->show(); + myListView->tqparentWidget()->show(); else - myListView->parentWidget()->hide(); + myListView->tqparentWidget()->hide(); } @@ -868,7 +868,7 @@ void KDGanttView::print( TQPrinter* printer , TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); // at the top, we want to print current time/date - TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString(); + TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString(); int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); p.drawText( 0, 0, date ); @@ -979,7 +979,7 @@ TQSize KDGanttView::drawContents( TQPainter* p, } if ( drawTimeLine ) { p->translate( myCanvasView->frameWidth(), 0); - myTimeHeader->repaintMe( 0, myTimeHeader->width(), p ); + myTimeHeader->tqrepaintMe( 0, myTimeHeader->width(), p ); p->translate( -myCanvasView->frameWidth(), thY); myCanvasView->drawToPainter( p ); if ( drawListView ) @@ -1209,7 +1209,7 @@ bool KDGanttView::showTaskLinks() const void KDGanttView::setFont(const TQFont& font) { myListView->setFont(font); - myListView->repaint(); + myListView->tqrepaint(); myTimeHeader->setFont(font); myLegend->setFont( font ); TQWidget::setFont( font ); @@ -1299,21 +1299,21 @@ bool KDGanttView::showTimeTablePopupMenu() const /*! - 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). + 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). - This setting overrides any shape settings made on individual items. + This setting overrides any tqshape 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 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 + \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 in the individual items - \sa shapes() + \sa tqshapes() */ void KDGanttView::setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, @@ -1337,18 +1337,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, /*! - Queries the shapes for a particular type of Gantt item. + Queries the tqshapes for a particular type of Gantt item. - \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 + \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 parameters are undefined. \sa setShapes() */ -bool KDGanttView::shapes( KDGanttViewItem::Type type, +bool KDGanttView::tqshapes( 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 shape the shape to display - \param shapeColor the color in which to display the shape + \param tqshape the tqshape to display + \param tqshapeColor the color in which to display the tqshape \param text the text to display \sa clearLegend() */ -void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, - const TQColor& shapeColor, +void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, const TQString& text ) { - myLegend->addLegendItem( shape,shapeColor,text ); + myLegend->addLegendItem( tqshape,tqshapeColor,text ); legendItem* item = new legendItem; - item->shape = shape; - item->color = shapeColor; + item->tqshape = tqshape; + item->color = tqshapeColor; item->text = text; myLegendItems->append( item ); } @@ -2341,7 +2341,7 @@ 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 contains multiple calendars, it can be + subitems. I.e., if an item tqcontains 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 @@ -3415,58 +3415,58 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const showTimeTablePopupMenu() ); // the Shapes element - TQDomElement shapesElement = doc.createElement( "Shapes" ); - docRoot.appendChild( shapesElement ); - TQDomElement shapesEventElement = doc.createElement( "Event" ); - shapesElement.appendChild( shapesEventElement ); + TQDomElement tqshapesElement = doc.createElement( "Shapes" ); + docRoot.appendChild( tqshapesElement ); + TQDomElement tqshapesEventElement = doc.createElement( "Event" ); + tqshapesElement.appendChild( tqshapesEventElement ); KDGanttViewItem::Shape start, middle, 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 ) ); + 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 ) ); } else { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", "Undefined" ); } - 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 ) ); + 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 ) ); } else { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", "Undefined" ); } - 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 ) ); + 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 ) ); } else { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "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::shapeToString( current->shape ) ); + KDGanttViewItem::tqshapeToString( current->tqshape ) ); 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 shape, in the + This method returns the pixmap used for a certain tqshape, in the selected color and size. - \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 + \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 */ -TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, - const TQColor& shapeColor, +TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, const TQColor& backgroundColor, int itemSize) { // 10 is a good value as size @@ -3777,11 +3777,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, p.fill( backgroundColor ); TQPainter paint (&p); TQBrush b = TQBrush ( Qt::SolidPattern ); - b.setColor( shapeColor ); + b.setColor( tqshapeColor ); paint.setBrush( b ); TQPen pen( Qt::black, 1 ) ; paint.setPen( pen ); - switch (shape) { + switch (tqshape) { case KDGanttViewItem::TriangleDown:{ TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); @@ -3864,8 +3864,8 @@ void KDGanttView::initDefaults() myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = Qt::cyan;//summary myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = Qt::red; - // setting the default shape types - // currently, we take for each item for all three shapes (start, middle, end) the same default shape + // setting the default tqshape types + // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape for (i = 0;i<3;++i) { myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task @@ -4239,7 +4239,7 @@ TQColor KDGanttView::legendHeaderBackgroundColor () const may add as many widgets as you want. They are ordered horizontally from left to right. To remove a widget from the spacer widget, call widget->reparent(newParent,...) or delete the widget. Since the spacer - is a TQHBox, the layout of the added widgets is managed by this + is a TQHBox, the tqlayout of the added widgets is managed by this TQHBox. \param w A pointer to the widget to be added. @@ -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 contains the new + in the list view using in-place editing. \a text tqcontains the new text in the list view. */ |