summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttView.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kdgantt/KDGanttView.cpp
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
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 b5d44d35..f14ac027 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -41,7 +41,7 @@
#include "itemAttributeDialog.h"
#include <tqprinter.h>
#include <tqpainter.h>
-#include <layout.h>
+#include <tqlayout.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::currentDateTime () );
+ centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () );
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:
- 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 );
@@ -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 );
@@ -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 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
@@ -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->shape, li->color, li->text );
+ myLegend->addLegendItem(li->tqshape, 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::currentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().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->repaint();
+ myListView->tqrepaint();
myTimeHeader->setFont(font);
myLegend->setFont( font );
TQWidget::setFont( font );
@@ -1306,21 +1306,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,
@@ -1344,18 +1344,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
@@ -1569,19 +1569,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 );
}
@@ -3412,58 +3412,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" );
}
@@ -3601,7 +3601,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",
@@ -3754,17 +3754,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
@@ -3774,11 +3774,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
p.fill( backgroundColor );
TQPainter paint (&p);
TQBrush b = TQBrush ( TQt::SolidPattern );
- b.setColor( shapeColor );
+ b.setColor( tqshapeColor );
paint.setBrush( b );
TQPen pen( TQt::black, 1 ) ;
paint.setPen( pen );
- switch (shape) {
+ switch (tqshape) {
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 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
@@ -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 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.