summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttView.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kdgantt/KDGanttView.cpp
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r--kdgantt/KDGanttView.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index f14ac027..b5d44d35 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -41,7 +41,7 @@
#include "itemAttributeDialog.h"
#include <tqprinter.h>
#include <tqpainter.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpaintdevicemetrics.h>
#include <tqfile.h>
#include <tqheader.h>
@@ -186,7 +186,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
fDropEnabled = false;
closingBlocked = false;
myTimeHeader->computeTicks();
- centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () );
+ centerTimelineAfterShow( TQDateTime::currentDateTime () );
setDisplayEmptyTasksAsLine( false );
TQValueList<int> list;
list.append(240);
@@ -313,12 +313,12 @@ bool KDGanttView::close ( bool alsoDelete )
/*!
Returns a useful size for the view.
Returned width:
- tqsizeHint().width() of the list view + width of TimeTable
+ sizeHint().width() of the list view + width of TimeTable
Returned height:
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-TQSize KDGanttView::tqsizeHint() const
+TQSize KDGanttView::sizeHint() const
{
bool block = myTimeTable->blockUpdating();
myTimeTable->setBlockUpdating( false );
@@ -342,9 +342,9 @@ TQSize KDGanttView::tqsizeHint() const
if ( myLegend->isShown() )
hintHeight += myLegend->legendSizeHint().height() +10;
hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2;
- int hintWid = myListView->tqsizeHint().width();
+ int hintWid = myListView->sizeHint().width();
//hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width();
- hintWid += myCanvasView->tqsizeHint().width();
+ hintWid += myCanvasView->sizeHint().width();
// add 10 for the splitter-bars
// qDebug("sizehint %d %d ",hintWid+10, hintHeight );
myTimeTable->setBlockUpdating( block );
@@ -539,7 +539,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
@@ -622,7 +622,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 );
}
}
}
@@ -875,7 +875,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::tqcurrentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -1216,7 +1216,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 );
@@ -1306,21 +1306,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,
@@ -1344,18 +1344,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
@@ -1569,19 +1569,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 );
}
@@ -3412,58 +3412,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" );
}
@@ -3601,7 +3601,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",
@@ -3754,17 +3754,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
@@ -3774,11 +3774,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);
@@ -3861,8 +3861,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
@@ -4236,7 +4236,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 tqlayout of the added widgets is managed by this
+ is a TQHBox, the layout of the added widgets is managed by this
TQHBox.
\param w A pointer to the widget to be added.