summaryrefslogtreecommitdiffstats
path: root/kchart/kchart_part.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kchart/kchart_part.cc')
-rw-r--r--kchart/kchart_part.cc400
1 files changed, 200 insertions, 200 deletions
diff --git a/kchart/kchart_part.cc b/kchart/kchart_part.cc
index c4efc0bf..483c7e22 100644
--- a/kchart/kchart_part.cc
+++ b/kchart/kchart_part.cc
@@ -29,10 +29,10 @@ using std::cerr;
#include <kglobal.h>
#include <kdebug.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qbuffer.h>
-#include <qpainter.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqbuffer.h>
+#include <tqpainter.h>
using namespace std;
@@ -44,18 +44,18 @@ using namespace std;
/* ----- X labels ----- */
// char *t[6] = { "Chicago", "New York", "L.A.", "Atlanta", "Paris, MD\n(USA) ", "London" };
/* ----- data set colors (RGB) ----- */
-// QColor sc[2] = { QColor( 255, 128, 128 ), QColor( 128, 128, 255 ) };
+// TQColor sc[2] = { TQColor( 255, 128, 128 ), TQColor( 128, 128, 255 ) };
namespace KChart
{
-KChartPart::KChartPart( QWidget *parentWidget, const char *widgetName,
- QObject* parent, const char* name,
+KChartPart::KChartPart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject* tqparent, const char* name,
bool singleViewMode )
- : KoChart::Part( parentWidget, widgetName, parent, name, singleViewMode ),
+ : KoChart::Part( tqparentWidget, widgetName, tqparent, name, singleViewMode ),
m_params( 0 ),
- m_parentWidget( parentWidget ),
+ m_parentWidget( tqparentWidget ),
m_rowLabels(), m_colLabels()
{
kdDebug(35001) << "Constructor started!" << endl;
@@ -102,7 +102,7 @@ KChartPart::~KChartPart()
// Reimplement KoDocument::initDoc()
-bool KChartPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
+bool KChartPart::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
// Initialize the parameter set for this chart document
#if 0
@@ -111,7 +111,7 @@ bool KChartPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
kdDebug(35001) << "================================================================" << endl;
#endif
- QString f;
+ TQString f;
// Embedded documents are initially created like a normal empty
// document. If this is in KSpread or another program where the
@@ -140,7 +140,7 @@ bool KChartPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
dlgtype = KoTemplateChooseDia::Everything;
ret = KoTemplateChooseDia::choose( KChartFactory::global(), f,
dlgtype, "kchart_template",
- parentWidget );
+ tqparentWidget );
if ( ret == KoTemplateChooseDia::File ) {
KURL url( f );
@@ -156,8 +156,8 @@ bool KChartPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
// generateBarChartTemplate();
// return true;
// }
- QFileInfo fileInfo( f );
- QString fileName( fileInfo.dirPath( true ) + "/" +
+ TQFileInfo fileInfo( f );
+ TQString fileName( fileInfo.dirPath( true ) + "/" +
fileInfo.baseName() + ".chrt" );
resetURL();
@@ -196,8 +196,8 @@ void KChartPart::initNullChart()
m_params->setFirstColAsLabel(false);
// Fill column and row labels.
- m_colLabels << QString("");
- m_rowLabels << QString("");
+ m_colLabels << TQString("");
+ m_rowLabels << TQString("");
setChartDefaults();
@@ -225,12 +225,12 @@ void KChartPart::generateBarChartTemplate()
// Fill column label, but only on the first iteration.
if (row == 0) {
- m_colLabels << i18n("Column %1").arg(col + 1);
+ m_colLabels << i18n("Column %1").tqarg(col + 1);
}
}
// Fill row label.
- m_rowLabels << i18n("Row %1").arg(row + 1);
+ m_rowLabels << i18n("Row %1").tqarg(row + 1);
}
}
@@ -240,9 +240,9 @@ void KChartPart::generateBarChartTemplate()
}
-KoView* KChartPart::createViewInstance( QWidget* parent, const char* name )
+KoView* KChartPart::createViewInstance( TQWidget* tqparent, const char* name )
{
- return new KChartView( this, parent, name );
+ return new KChartView( this, tqparent, name );
}
@@ -250,7 +250,7 @@ KoView* KChartPart::createViewInstance( QWidget* parent, const char* name )
// Painting
-void KChartPart::paintContent( QPainter& painter, const QRect& rect,
+void KChartPart::paintContent( TQPainter& painter, const TQRect& rect,
bool /*transparent*/,
double /*zoomX*/, double /*zoomY*/ )
{
@@ -274,8 +274,8 @@ void KChartPart::paintContent( QPainter& painter, const QRect& rect,
numDatasets = createDisplayData();
// Create and set the axis labels and legend.
- QStringList longLabels;
- QStringList shortLabels;
+ TQStringList longLabels;
+ TQStringList shortLabels;
createLabelsAndLegend(longLabels, shortLabels);
// Set the x axis labels.
@@ -329,15 +329,15 @@ void KChartPart::paintContent( QPainter& painter, const QRect& rect,
m_bufferPixmap.resize( rect.size() );
}
- QPainter bufferPainter( &m_bufferPixmap );
+ TQPainter bufferPainter( &m_bufferPixmap );
// We only need to draw the document rectangle "rect".
KDChart::paint( &bufferPainter, m_params, &m_displayData, 0, &rect );
// This is always the empty rect...
- // Shouldn't creating a QPainter in a paintEvent set up clipping automatically?
+ // Shouldn't creating a TQPainter in a paintEvent set up clipping automatically?
// I thought it did (DF)
- //const QRect clipRect = painter.clipRegion().boundingRect();
+ //const TQRect clipRect = painter.clipRegion().boundingRect();
//painter.drawPixmap( clipRect.topLeft(), m_bufferPixmap, clipRect );
painter.drawPixmap( 0, 0, m_bufferPixmap );
@@ -376,8 +376,8 @@ int KChartPart::createDisplayData()
// After this sequence, m_DisplayData contains the data in the
// correct transposition, and the X axis and the legend contain
// the correct labels.
- QVariant value1;
- QVariant value2;
+ TQVariant value1;
+ TQVariant value2;
int prop;
if (m_params->dataDirection() == KChartParams::DataRows) {
// Data is handled in rows. This is the way KDChart works also.
@@ -460,8 +460,8 @@ int KChartPart::createDisplayData()
}
-void KChartPart::createLabelsAndLegend( QStringList &longLabels,
- QStringList &shortLabels )
+void KChartPart::createLabelsAndLegend( TQStringList &longLabels,
+ TQStringList &shortLabels )
{
longLabels.clear();
shortLabels.clear();
@@ -486,7 +486,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// taken from the row headers.
for ( uint row = 0; row < dataRowCount ; row++ ) {
- QString label = (row < rowLabelCount) ? m_rowLabels[row] : QString::null;
+ TQString label = (row < rowLabelCount) ? m_rowLabels[row] : TQString();
longLabels << label;
shortLabels << label.left( 3 );
@@ -497,7 +497,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// be taken from the column headers.
for ( uint col = 0; col < dataColumnCount; col++ ) {
- QString label = (col < columnLabelCount) ? m_colLabels[col] : QString::null;
+ TQString label = (col < columnLabelCount) ? m_colLabels[col] : TQString();
longLabels << m_colLabels[col];
shortLabels << m_colLabels[col].left( 3 );
@@ -510,7 +510,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// Set X axis labels from column headers.
for ( uint col = 0; col < dataColumnCount; col++ ) {
- QString label = (col < columnLabelCount) ? m_colLabels[col] : QString::null;
+ TQString label = (col < columnLabelCount) ? m_colLabels[col] : TQString();
longLabels << label;
shortLabels << label.left( 3 );
@@ -518,7 +518,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// Set legend from row headers.
for ( uint row = 0; row < dataRowCount; row++ ) {
- QString label = (row < rowLabelCount) ? m_rowLabels[row] : QString::null;
+ TQString label = (row < rowLabelCount) ? m_rowLabels[row] : TQString();
m_params->setLegendText( row, label );
}
@@ -529,7 +529,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// Set X axis labels from row headers.
for ( uint row = 0; row < dataRowCount; row++ ) {
- QString label = (row < rowLabelCount) ? m_rowLabels[row] : QString::null;
+ TQString label = (row < rowLabelCount) ? m_rowLabels[row] : TQString();
longLabels << label;
shortLabels << label.left( 3 );
@@ -537,7 +537,7 @@ void KChartPart::createLabelsAndLegend( QStringList &longLabels,
// Set legend from column headers.
for ( uint col = 0; col < dataColumnCount ; col++ ) {
- QString label = (col < columnLabelCount) ? m_colLabels[col] : QString::null;
+ TQString label = (col < columnLabelCount) ? m_colLabels[col] : TQString();
m_params->setLegendText( col, label );
}
@@ -568,12 +568,12 @@ void KChartPart::analyzeHeaders( const KDChartTableData& data )
{
// FIXME(khz): replace this when automatic string detection works in KDChart
// Does the top/left cell contain a string?
- bool isStringTopLeft = (data.cellVal( 0, 0 ).type() == QVariant::String);
+ bool isStringTopLeft = (data.cellVal( 0, 0 ).type() == TQVariant::String);
// Does the first row (without first cell) contain only strings?
bool isStringFirstRow = true;
for ( uint col = 1; isStringFirstRow && col < data.cols(); col++ ) {
- isStringFirstRow = (data.cellVal( 0, col ).type() == QVariant::String);
+ isStringFirstRow = (data.cellVal( 0, col ).type() == TQVariant::String);
}
// Just in case, we only have 1 row, we never use it for label text.
@@ -589,7 +589,7 @@ void KChartPart::analyzeHeaders( const KDChartTableData& data )
// Does the first column (without first cell) contain only strings?
bool isStringFirstCol = true;
for ( uint row = 1; isStringFirstCol && row < data.rows(); row++ ) {
- isStringFirstCol = (data.cellVal( row, 0 ).type() == QVariant::String);
+ isStringFirstCol = (data.cellVal( row, 0 ).type() == TQVariant::String);
}
// Just in case, we only have 1 column, we never use it for axis
@@ -683,17 +683,17 @@ void KChartPart::resizeData( int rows, int cols )
}
-void KChartPart::setCellData( int row, int column, const QVariant &val)
+void KChartPart::setCellData( int row, int column, const TQVariant &val)
{
m_currentData.setCell( row, column, val );
}
-bool KChartPart::showWizard( QString &dataArea )
+bool KChartPart::showWizard( TQString &dataArea )
{
KChartWizard *wizard = new KChartWizard( this, m_parentWidget, "wizard" );
- connect( wizard, SIGNAL(finished()), this, SLOT(slotModified()) );
+ connect( wizard, TQT_SIGNAL(finished()), this, TQT_SLOT(slotModified()) );
wizard->setDataArea( dataArea );
@@ -746,7 +746,7 @@ void KChartPart::setChartDefaults()
// Setting the background layer.
KDFrame frame;
- frame.setBackground( QBrush( QColor( 230, 222, 222 ) ) );
+ frame.setBackground( TQBrush( TQColor( 230, 222, 222 ) ) );
m_params->setFrame( KDChartEnums::AreaInnermost, frame, 0, 0, 0, 0 );
}
@@ -766,7 +766,7 @@ void KChartPart::loadConfig( KConfig *conf )
// TODO: the fonts
// PENDING(kalle) Put the applicable ones of these back in
- // QFont tempfont;
+ // TQFont tempfont;
// tempfont = conf->readFontEntry("titlefont", &titlefont);
// setTitleFont(tempfont);
// tempfont = conf->readFontEntry("ytitlefont", &ytitlefont);
@@ -961,9 +961,9 @@ void KChartPart::saveConfig( KConfig *conf )
// Save and Load OpenDocument file format
-bool KChartPart::loadOasis( const QDomDocument& doc,
+bool KChartPart::loadOasis( const TQDomDocument& doc,
KoOasisStyles& oasisStyles,
- const QDomDocument& /*settings*/,
+ const TQDomDocument& /*settings*/,
KoStore *store )
{
kdDebug(35001) << "kchart loadOasis called" << endl;
@@ -971,8 +971,8 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
// Set some sensible defaults.
setChartDefaults();
- QDomElement content = doc.documentElement();
- QDomElement bodyElem ( KoDom::namedItemNS( content,
+ TQDomElement content = doc.documentElement();
+ TQDomElement bodyElem ( KoDom::namedItemNS( content,
KoXmlNS::office, "body" ) );
if ( bodyElem.isNull() ) {
kdError(32001) << "No office:body found!" << endl;
@@ -981,12 +981,12 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
}
// Get the office:chart element.
- QDomElement officeChartElem = KoDom::namedItemNS( bodyElem,
+ TQDomElement officeChartElem = KoDom::namedItemNS( bodyElem,
KoXmlNS::office, "chart" );
if ( officeChartElem.isNull() ) {
kdError(32001) << "No office:chart found!" << endl;
- QDomElement childElem;
- QString localName;
+ TQDomElement childElem;
+ TQString localName;
forEachElement( childElem, bodyElem ) {
localName = childElem.localName();
}
@@ -994,12 +994,12 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
if ( localName.isEmpty() )
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) );
else
- setErrorMessage( i18n( "This document is not a chart, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) );
+ setErrorMessage( i18n( "This document is not a chart, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) );
return false;
}
- QDomElement chartElem = KoDom::namedItemNS( officeChartElem,
+ TQDomElement chartElem = KoDom::namedItemNS( officeChartElem,
KoXmlNS::chart, "chart" );
if ( chartElem.isNull() ) {
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No chart:chart tag found." ) );
@@ -1016,7 +1016,7 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
styleStack.setTypeProperties( "chart" ); // load chart properties
loadingContext.fillStyleStack( chartElem, KoXmlNS::chart, "style-name" );
- const QString fillColor = styleStack.attributeNS( KoXmlNS::draw, "fill-color" );
+ const TQString fillColor = styleStack.attributeNS( KoXmlNS::draw, "fill-color" );
kdDebug() << "fillColor=" << fillColor << endl;
styleStack.restore();
@@ -1024,7 +1024,7 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
// Load chart parameters, most of these are stored in the
// chart:plot-area element within chart:chart.
- QString errorMessage;
+ TQString errorMessage;
bool ok = m_params->loadOasis( chartElem, loadingContext, errorMessage,
store);
if ( !ok ) {
@@ -1035,7 +1035,7 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
// TODO Load data direction (see loadAuxiliary)
// Load the data table.
- QDomElement tableElem = KoDom::namedItemNS( chartElem,
+ TQDomElement tableElem = KoDom::namedItemNS( chartElem,
KoXmlNS::table, "table" );
if ( !tableElem.isNull() ) {
ok = loadOasisData( tableElem );
@@ -1047,18 +1047,18 @@ bool KChartPart::loadOasis( const QDomDocument& doc,
}
-bool KChartPart::loadOasisData( const QDomElement& tableElem )
+bool KChartPart::loadOasisData( const TQDomElement& tableElem )
{
int numberHeaderColumns = 0;
- QDomElement tableHeaderColumns = KoDom::namedItemNS( tableElem,
+ TQDomElement tableHeaderColumns = KoDom::namedItemNS( tableElem,
KoXmlNS::table,
"table-header-columns" );
- QDomElement elem;
+ TQDomElement elem;
forEachElement( elem, tableHeaderColumns ) {
if ( elem.localName() == "table-column" ) {
- int repeated = elem.attributeNS( KoXmlNS::table, "number-columns-repeated", QString::null ).toInt();
- numberHeaderColumns += QMAX( 1, repeated );
+ int repeated = elem.attributeNS( KoXmlNS::table, "number-columns-repeated", TQString() ).toInt();
+ numberHeaderColumns += TQMAX( 1, repeated );
}
}
@@ -1066,20 +1066,20 @@ bool KChartPart::loadOasisData( const QDomElement& tableElem )
Q_ASSERT( numberHeaderColumns == 1 );
int numberDataColumns = 0;
- QDomElement tableColumns = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-columns" );
+ TQDomElement tableColumns = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-columns" );
forEachElement( elem, tableColumns ) {
if ( elem.localName() == "table-column" ) {
- int repeated = elem.attributeNS( KoXmlNS::table, "number-columns-repeated", QString::null ).toInt();
- numberDataColumns += QMAX( 1, repeated );
+ int repeated = elem.attributeNS( KoXmlNS::table, "number-columns-repeated", TQString() ).toInt();
+ numberDataColumns += TQMAX( 1, repeated );
}
}
// Parse table-header-rows for the column names.
m_colLabels.clear();
- QDomElement tableHeaderRows = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-header-rows" );
+ TQDomElement tableHeaderRows = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-header-rows" );
if ( tableHeaderRows.isNull() )
kdWarning(35001) << "No table-header-rows element found!" << endl;
- QDomElement tableHeaderRow = KoDom::namedItemNS( tableHeaderRows, KoXmlNS::table, "table-row" );
+ TQDomElement tableHeaderRow = KoDom::namedItemNS( tableHeaderRows, KoXmlNS::table, "table-row" );
if ( tableHeaderRow.isNull() )
kdWarning(35001) << "No table-row inside table-header-rows!" << endl;
@@ -1088,12 +1088,12 @@ bool KChartPart::loadOasisData( const QDomElement& tableElem )
if ( elem.localName() == "table-cell" ) {
++cellNum;
if ( cellNum > numberHeaderColumns ) {
- QDomElement pElem = KoDom::namedItemNS( elem, KoXmlNS::text, "p" );
+ TQDomElement pElem = KoDom::namedItemNS( elem, KoXmlNS::text, "p" );
m_colLabels.append( pElem.text() );
}
}
}
- numberDataColumns = QMAX( numberDataColumns, cellNum - numberHeaderColumns );
+ numberDataColumns = TQMAX( numberDataColumns, cellNum - numberHeaderColumns );
if ( (int)m_colLabels.count() != numberDataColumns )
kdWarning(35001) << "Got " << m_colLabels.count()
<< " column titles, expected " << numberDataColumns
@@ -1101,17 +1101,17 @@ bool KChartPart::loadOasisData( const QDomElement& tableElem )
// Get the number of rows, and read row labels
int numberDataRows = 0;
- QDomElement tableRows = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-rows" );
+ TQDomElement tableRows = KoDom::namedItemNS( tableElem, KoXmlNS::table, "table-rows" );
m_rowLabels.clear();
forEachElement( elem, tableRows ) {
if ( elem.localName() == "table-row" ) {
- int repeated = elem.attributeNS( KoXmlNS::table, "number-rows-repeated", QString::null ).toInt();
+ int repeated = elem.attributeNS( KoXmlNS::table, "number-rows-repeated", TQString() ).toInt();
Q_ASSERT( repeated <= 1 ); // we don't handle yet the case where data rows are repeated (can this really happen?)
- numberDataRows += QMAX( 1, repeated );
+ numberDataRows += TQMAX( 1, repeated );
if ( numberHeaderColumns > 0 ) {
- QDomElement firstCell = KoDom::namedItemNS( elem, KoXmlNS::table, "table-cell" );
- QDomElement pElem = KoDom::namedItemNS( firstCell, KoXmlNS::text, "p" );
+ TQDomElement firstCell = KoDom::namedItemNS( elem, KoXmlNS::table, "table-cell" );
+ TQDomElement pElem = KoDom::namedItemNS( firstCell, KoXmlNS::text, "p" );
m_rowLabels.append( pElem.text() );
}
}
@@ -1131,21 +1131,21 @@ bool KChartPart::loadOasisData( const QDomElement& tableElem )
// Now really load the cells.
int row = 0;
- QDomElement rowElem;
+ TQDomElement rowElem;
forEachElement( rowElem, tableRows ) {
if ( rowElem.localName() == "table-row" ) {
int col = 0;
int cellNum = 0;
- QDomElement cellElem;
+ TQDomElement cellElem;
forEachElement( cellElem, rowElem ) {
if ( cellElem.localName() == "table-cell" ) {
++cellNum;
if ( cellNum > numberHeaderColumns ) {
- QString valueType = cellElem.attributeNS( KoXmlNS::office, "value-type", QString::null );
+ TQString valueType = cellElem.attributeNS( KoXmlNS::office, "value-type", TQString() );
if ( valueType != "float" )
kdWarning(35001) << "Don't know how to handle value-type " << valueType << endl;
else {
- QString value = cellElem.attributeNS( KoXmlNS::office, "value", QString::null );
+ TQString value = cellElem.attributeNS( KoXmlNS::office, "value", TQString() );
double val = value.toDouble();
m_currentData.setCell( row, col, val );
@@ -1219,10 +1219,10 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
Q_UNUSED( mainStyles );
const int cols = m_currentData.usedCols()
- ? QMIN(m_currentData.usedCols(), m_currentData.cols())
+ ? TQMIN(m_currentData.usedCols(), m_currentData.cols())
: m_currentData.cols();
const int rows = m_currentData.usedRows()
- ? QMIN(m_currentData.usedRows(), m_currentData.rows())
+ ? TQMIN(m_currentData.usedRows(), m_currentData.rows())
: m_currentData.rows();
bodyWriter->startElement( "table:table" );
@@ -1256,7 +1256,7 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
// <table:table-cell office:value-type="string">
// <text:p>Column 1 </text:p>
// </table:table-cell>
- QStringList::const_iterator colLabelIt = m_colLabels.begin();
+ TQStringList::const_iterator colLabelIt = m_colLabels.begin();
for ( int col = 0; col < cols ; ++col ) {
if ( colLabelIt != m_colLabels.end() ) {
bodyWriter->startElement( "table:table-cell" );
@@ -1273,7 +1273,7 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
bodyWriter->endElement(); // table:table-header-rows
bodyWriter->startElement( "table:table-rows" );
- QStringList::const_iterator rowLabelIt = m_rowLabels.begin();
+ TQStringList::const_iterator rowLabelIt = m_rowLabels.begin();
for ( int row = 0; row < rows ; ++row ) {
bodyWriter->startElement( "table:table-row" );
@@ -1291,22 +1291,22 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
}
for ( int col = 0; col < cols; ++col ) {
- QVariant value( m_currentData.cellVal( row, col ) );
- QString valType;
- QString valStr;
+ TQVariant value( m_currentData.cellVal( row, col ) );
+ TQString valType;
+ TQString valStr;
switch ( value.type() ) {
- case QVariant::Invalid:
+ case TQVariant::Invalid:
break;
- case QVariant::String:
+ case TQVariant::String:
valType = "string";
valStr = value.toString();
break;
- case QVariant::Double:
+ case TQVariant::Double:
valType = "float";
- valStr = QString::number( value.toDouble(), 'g', DBL_DIG );
+ valStr = TQString::number( value.toDouble(), 'g', DBL_DIG );
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
valType = "date";
valStr = ""; /* like in saveXML, but why? */
break;
@@ -1320,7 +1320,7 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
bodyWriter->startElement( "table:table-cell" );
if ( !valType.isEmpty() ) {
bodyWriter->addAttribute( "office:value-type", valType );
- if ( value.type() == QVariant::Double )
+ if ( value.type() == TQVariant::Double )
bodyWriter->addAttribute( "office:value", valStr );
bodyWriter->startElement( "text:p" );
@@ -1338,8 +1338,8 @@ void KChartPart::saveOasisData( KoXmlWriter* bodyWriter,
void KChartPart::writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles ) const
{
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( &contentWriter, mainStyles, "style:style", (*it).name, "style:chart-properties" );
}
@@ -1350,23 +1350,23 @@ void KChartPart::writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles&
// Save and Load old KChart file format
-QDomDocument KChartPart::saveXML()
+TQDomDocument KChartPart::saveXML()
{
- QDomElement tmpElem;
+ TQDomElement tmpElem;
//kdDebug(35001) << "kchart saveXML called" << endl;
// The biggest part of the saving is done by KDChart itself, so we
// don't have to do it.
- QDomDocument doc = m_params->saveXML( false );
+ TQDomDocument doc = m_params->saveXML( false );
// ----------------------------------------------------------------
// The rest of the saving has to be done by us.
- QDomElement docRoot = doc.documentElement();
+ TQDomElement docRoot = doc.documentElement();
// Save auxiliary data.
- QDomElement aux = doc.createElement( "KChartAuxiliary" );
+ TQDomElement aux = doc.createElement( "KChartAuxiliary" );
docRoot.appendChild( aux );
// The data direction (rows/columns).
@@ -1386,14 +1386,14 @@ QDomDocument KChartPart::saveXML()
aux.appendChild( tmpElem );
// Save the data values.
- QDomElement data = doc.createElement( "data" );
+ TQDomElement data = doc.createElement( "data" );
docRoot.appendChild( data );
int cols = m_currentData.usedCols()
- ? QMIN(m_currentData.usedCols(), m_currentData.cols())
+ ? TQMIN(m_currentData.usedCols(), m_currentData.cols())
: m_currentData.cols();
int rows = m_currentData.usedRows()
- ? QMIN(m_currentData.usedRows(), m_currentData.rows())
+ ? TQMIN(m_currentData.usedRows(), m_currentData.rows())
: m_currentData.rows();
data.setAttribute( "cols", cols );
data.setAttribute( "rows", rows );
@@ -1401,15 +1401,15 @@ QDomDocument KChartPart::saveXML()
for (int i=0; i!=rows; ++i) {
for (int j=0; j!=cols; ++j) {
- QDomElement e = doc.createElement( "cell" );
+ TQDomElement e = doc.createElement( "cell" );
data.appendChild( e );
- QString valType;
- QVariant value( m_currentData.cellVal( i,j ) );
+ TQString valType;
+ TQVariant value( m_currentData.cellVal( i,j ) );
switch ( value.type() ) {
- case QVariant::Invalid: valType = "NoValue"; break;
- case QVariant::String: valType = "String"; break;
- case QVariant::Double: valType = "Double"; break;
- case QVariant::DateTime: valType = "DateTime"; break;
+ case TQVariant::Invalid: valType = "NoValue"; break;
+ case TQVariant::String: valType = "String"; break;
+ case TQVariant::Double: valType = "Double"; break;
+ case TQVariant::DateTime: valType = "DateTime"; break;
default: {
valType = "(unknown)";
kdDebug(35001) << "ERROR: cell " << i << "," << j
@@ -1421,15 +1421,15 @@ QDomDocument KChartPart::saveXML()
//kdDebug(35001) << " cell " << i << "," << j
// << " saved with type '" << valType << "'." << endl;
switch ( value.type() ) {
- case QVariant::String: e.setAttribute( "value", value.toString() );
+ case TQVariant::String: e.setAttribute( "value", value.toString() );
break;
- case QVariant::Double: e.setAttribute( "value", QString::number( value.toDouble() ) );
+ case TQVariant::Double: e.setAttribute( "value", TQString::number( value.toDouble() ) );
break;
- case QVariant::DateTime:e.setAttribute( "value", "" );
+ case TQVariant::DateTime:e.setAttribute( "value", "" );
break;
default: {
e.setAttribute( "value", "" );
- if( QVariant::Invalid != value.type() )
+ if( TQVariant::Invalid != value.type() )
kdDebug(35001) << "ERROR: cell " << i << "," << j
<< " has unknown type." << endl;
}
@@ -1441,7 +1441,7 @@ QDomDocument KChartPart::saveXML()
}
-bool KChartPart::loadXML( QIODevice*, const QDomDocument& doc )
+bool KChartPart::loadXML( TQIODevice*, const TQDomDocument& doc )
{
kdDebug(35001) << "kchart loadXML called" << endl;
@@ -1462,14 +1462,14 @@ bool KChartPart::loadXML( QIODevice*, const QDomDocument& doc )
// If everything is OK, then get the headers from the KDChart parameters.
if (result) {
- QStringList legendLabels;
+ TQStringList legendLabels;
KDChartAxisParams params;
params = m_params->axisParams( KDChartAxisParams::AxisPosBottom );
// Get the legend.
- QString str;
+ TQString str;
uint index = 0;
- while ((str = m_params->legendText(index++)) != QString::null)
+ while ((str = m_params->legendText(index++)) != TQString())
legendLabels << str;
if (m_params->dataDirection() == KChartParams::DataRows) {
@@ -1493,22 +1493,22 @@ bool KChartPart::loadXML( QIODevice*, const QDomDocument& doc )
//
// Currently, that means the data direction.
//
-bool KChartPart::loadAuxiliary( const QDomDocument& doc )
+bool KChartPart::loadAuxiliary( const TQDomDocument& doc )
{
- QDomElement chart = doc.documentElement();
- QDomElement aux = chart.namedItem("KChartAuxiliary").toElement();
+ TQDomElement chart = doc.documentElement();
+ TQDomElement aux = chart.namedItem("KChartAuxiliary").toElement();
// Older XML files might be missing this section. That is OK; the
// defaults will be used.
if (aux.isNull())
return true;
- QDomNode node = aux.firstChild();
+ TQDomNode node = aux.firstChild();
// If the aux section exists, it should contain data.
while (!node.isNull()) {
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (e.isNull()) {
// FIXME: Should this be regarded as an error?
node = node.nextSibling();
@@ -1535,7 +1535,7 @@ bool KChartPart::loadAuxiliary( const QDomDocument& doc )
// Check for first row / col as label
else if ( e.tagName() == "dataaslabel" ) {
- QString val;
+ TQString val;
if ( e.hasAttribute("firstrow") ) {
// Read the direction. On failure, use the default.
@@ -1596,13 +1596,13 @@ bool KChartPart::loadAuxiliary( const QDomDocument& doc )
}
-bool KChartPart::loadData( const QDomDocument& doc,
+bool KChartPart::loadData( const TQDomDocument& doc,
KDChartTableData& m_currentData )
{
kdDebug(35001) << "kchart loadData called" << endl;
- QDomElement chart = doc.documentElement();
- QDomElement data = chart.namedItem("data").toElement();
+ TQDomElement chart = doc.documentElement();
+ TQDomElement data = chart.namedItem("data").toElement();
bool ok;
int cols = data.attribute("cols").toInt(&ok);
kdDebug(35001) << "cols readed as:" << cols << endl;
@@ -1620,21 +1620,21 @@ bool KChartPart::loadData( const QDomDocument& doc,
m_currentData.setUsedCols( cols );
m_currentData.setUsedRows( rows );
kdDebug(35001) << "Expanded!" << endl;
- QDomNode n = data.firstChild();
- //QArray<int> tmpExp(rows*cols);
- //QArray<bool> tmpMissing(rows*cols);
+ TQDomNode n = data.firstChild();
+ //TQArray<int> tmpExp(rows*cols);
+ //TQArray<bool> tmpMissing(rows*cols);
for (int i=0; i!=rows; i++) {
for (int j=0; j!=cols; j++) {
if (n.isNull()) {
kdDebug(35001) << "Some problems, there is less data than it should be!" << endl;
break;
}
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() && e.tagName() == "cell" ) {
// add the cell to the corresponding place...
- QVariant t;
+ TQVariant t;
if ( e.hasAttribute("value") && e.hasAttribute("valType") ) {
- QString valueType = e.attribute("valType").lower();
+ TQString valueType = e.attribute("valType").lower();
if ( "string" == valueType ) {
t = e.attribute("value");
}
@@ -1691,7 +1691,7 @@ bool KChartPart::loadData( const QDomDocument& doc,
// Save and Load real old KChart file format
-bool KChartPart::loadOldXML( const QDomDocument& doc )
+bool KChartPart::loadOldXML( const TQDomDocument& doc )
{
kdDebug(35001) << "kchart loadOldXML called" << endl;
if ( doc.doctype().name() != "chart" )
@@ -1699,14 +1699,14 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
kdDebug(35001) << "Ok, it is a chart" << endl;
- QDomElement chart = doc.documentElement();
+ TQDomElement chart = doc.documentElement();
if ( chart.attribute( "mime" ) != "application/x-kchart" && chart.attribute( "mime" ) != "application/vnd.kde.kchart" )
return false;
kdDebug(35001) << "Mimetype ok" << endl;
#if 0
- QDomElement data = chart.namedItem("data").toElement();
+ TQDomElement data = chart.namedItem("data").toElement();
bool ok;
int cols = data.attribute("cols").toInt(&ok);
kdDebug(35001) << "cols readed as:" << cols << endl;
@@ -1716,9 +1716,9 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
kdDebug(35001) << rows << " x " << cols << endl;
m_currentData.expand(rows, cols);
kdDebug(35001) << "Expanded!" << endl;
- QDomNode n = data.firstChild();
- QArray<int> tmpExp(rows*cols);
- QArray<bool> tmpMissing(rows*cols);
+ TQDomNode n = data.firstChild();
+ TQArray<int> tmpExp(rows*cols);
+ TQArray<bool> tmpMissing(rows*cols);
for (int i=0; i!=rows; i++) {
for (int j=0; j!=cols; j++) {
@@ -1727,7 +1727,7 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
break;
}
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() && e.tagName() == "cell" ) {
// add the cell to the corresponding place...
double val = e.attribute("value").toDouble(&ok);
@@ -1783,7 +1783,7 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
};
*/
bool ok;
- QDomElement params = chart.namedItem( "params" ).toElement();
+ TQDomElement params = chart.namedItem( "params" ).toElement();
if ( params.hasAttribute( "type" ) ) {
int type=params.attribute("type").toInt( &ok );
if ( !ok )
@@ -1864,82 +1864,82 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
return false;
}
- QDomElement title = params.namedItem( "title" ).toElement();
+ TQDomElement title = params.namedItem( "title" ).toElement();
if ( !title.isNull()) {
- QString t = title.text();
+ TQString t = title.text();
m_params->title=t;
}
- QDomElement titlefont = params.namedItem( "titlefont" ).toElement();
+ TQDomElement titlefont = params.namedItem( "titlefont" ).toElement();
if ( !titlefont.isNull()) {
- QDomElement font = titlefont.namedItem( "font" ).toElement();
+ TQDomElement font = titlefont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setTitleFont(toFont(font));
}
- QDomElement xtitle = params.namedItem( "xtitle" ).toElement();
+ TQDomElement xtitle = params.namedItem( "xtitle" ).toElement();
if ( !xtitle.isNull()) {
- QString t = xtitle.text();
+ TQString t = xtitle.text();
m_params->xtitle=t;
}
- QDomElement xtitlefont = params.namedItem( "xtitlefont" ).toElement();
+ TQDomElement xtitlefont = params.namedItem( "xtitlefont" ).toElement();
if ( !xtitlefont.isNull()) {
- QDomElement font = xtitlefont.namedItem( "font" ).toElement();
+ TQDomElement font = xtitlefont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setXTitleFont(toFont(font));
}
- QDomElement ytitle = params.namedItem( "ytitle" ).toElement();
+ TQDomElement ytitle = params.namedItem( "ytitle" ).toElement();
if ( !ytitle.isNull()) {
- QString t = ytitle.text();
+ TQString t = ytitle.text();
m_params->ytitle=t;
}
- QDomElement ytitle2 = params.namedItem( "ytitle2" ).toElement();
+ TQDomElement ytitle2 = params.namedItem( "ytitle2" ).toElement();
if ( !ytitle2.isNull()) {
- QString t = ytitle2.text();
+ TQString t = ytitle2.text();
m_params->ytitle2=t;
}
- QDomElement ytitlefont = params.namedItem( "ytitlefont" ).toElement();
+ TQDomElement ytitlefont = params.namedItem( "ytitlefont" ).toElement();
if ( !ytitlefont.isNull()) {
- QDomElement font = ytitlefont.namedItem( "font" ).toElement();
+ TQDomElement font = ytitlefont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setYTitleFont(toFont(font));
}
- QDomElement ylabelfmt = params.namedItem( "ylabelfmt" ).toElement();
+ TQDomElement ylabelfmt = params.namedItem( "ylabelfmt" ).toElement();
if ( !ylabelfmt.isNull()) {
- QString t = ylabelfmt.text();
+ TQString t = ylabelfmt.text();
m_params->ylabel_fmt=t;
}
- QDomElement ylabel2fmt = params.namedItem( "ylabel2fmt" ).toElement();
+ TQDomElement ylabel2fmt = params.namedItem( "ylabel2fmt" ).toElement();
if ( !ylabel2fmt.isNull()) {
- QString t = ylabel2fmt.text();
+ TQString t = ylabel2fmt.text();
m_params->ylabel2_fmt=t;
}
- QDomElement labelfont = params.namedItem( "labelfont" ).toElement();
+ TQDomElement labelfont = params.namedItem( "labelfont" ).toElement();
if ( !labelfont.isNull()) {
- QDomElement font = labelfont.namedItem( "font" ).toElement();
+ TQDomElement font = labelfont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setLabelFont(toFont(font));
}
- QDomElement yaxisfont = params.namedItem( "yaxisfont" ).toElement();
+ TQDomElement yaxisfont = params.namedItem( "yaxisfont" ).toElement();
if ( !yaxisfont.isNull()) {
- QDomElement font = yaxisfont.namedItem( "font" ).toElement();
+ TQDomElement font = yaxisfont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setYAxisFont(toFont(font));
}
- QDomElement xaxisfont = params.namedItem( "xaxisfont" ).toElement();
+ TQDomElement xaxisfont = params.namedItem( "xaxisfont" ).toElement();
if ( !xaxisfont.isNull()) {
- QDomElement font = xaxisfont.namedItem( "font" ).toElement();
+ TQDomElement font = xaxisfont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setXAxisFont(toFont(font));
}
- QDomElement annotationFont = params.namedItem("annotationfont").toElement();
+ TQDomElement annotationFont = params.namedItem("annotationfont").toElement();
if ( !annotationFont.isNull()) {
- QDomElement font = annotationFont.namedItem( "font" ).toElement();
+ TQDomElement font = annotationFont.namedItem( "font" ).toElement();
if ( !font.isNull() )
m_params->setAnnotationFont(toFont(font));
}
- QDomElement yaxis = params.namedItem( "yaxis" ).toElement();
+ TQDomElement yaxis = params.namedItem( "yaxis" ).toElement();
if ( !yaxis.isNull()) {
if (yaxis.hasAttribute( "yinterval" )) {
m_params->requested_yinterval= yaxis.attribute("yinterval").toDouble( &ok );
@@ -1956,7 +1956,7 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
#endif
- QDomElement graph = params.namedItem( "graph" ).toElement();
+ TQDomElement graph = params.namedItem( "graph" ).toElement();
if (!graph.isNull()) {
if (graph.hasAttribute( "grid" )) {
bool b=(bool) graph.attribute("grid").toInt( &ok );
@@ -2043,7 +2043,7 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
#if 0
- QDomElement graphparams = params.namedItem( "graphparams" ).toElement();
+ TQDomElement graphparams = params.namedItem( "graphparams" ).toElement();
if (!graphparams.isNull()) {
if (graphparams.hasAttribute( "dept3d" )) {
m_params->_3d_depth=graphparams.attribute("dept3d").toDouble( &ok );
@@ -2102,51 +2102,51 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
}
- QDomElement graphcolor = params.namedItem( "graphcolor" ).toElement();
+ TQDomElement graphcolor = params.namedItem( "graphcolor" ).toElement();
if (!graphcolor.isNull()) {
if (graphcolor.hasAttribute( "bgcolor" )) {
- m_params->BGColor= QColor( graphcolor.attribute( "bgcolor" ) );
+ m_params->BGColor= TQColor( graphcolor.attribute( "bgcolor" ) );
}
if (graphcolor.hasAttribute( "gridcolor" )) {
- m_params->GridColor= QColor( graphcolor.attribute( "gridcolor" ) );
+ m_params->GridColor= TQColor( graphcolor.attribute( "gridcolor" ) );
}
if (graphcolor.hasAttribute( "linecolor" )) {
- m_params->LineColor= QColor( graphcolor.attribute( "linecolor" ) );
+ m_params->LineColor= TQColor( graphcolor.attribute( "linecolor" ) );
}
if (graphcolor.hasAttribute( "plotcolor" )) {
- m_params->PlotColor= QColor( graphcolor.attribute( "plotcolor" ) );
+ m_params->PlotColor= TQColor( graphcolor.attribute( "plotcolor" ) );
}
if (graphcolor.hasAttribute( "volcolor" )) {
- m_params->VolColor= QColor( graphcolor.attribute( "volcolor" ) );
+ m_params->VolColor= TQColor( graphcolor.attribute( "volcolor" ) );
}
if (graphcolor.hasAttribute( "titlecolor" )) {
- m_params->TitleColor= QColor( graphcolor.attribute( "titlecolor" ) );
+ m_params->TitleColor= TQColor( graphcolor.attribute( "titlecolor" ) );
}
if (graphcolor.hasAttribute( "xtitlecolor" )) {
- m_params->XTitleColor= QColor( graphcolor.attribute( "xtitlecolor" ) );
+ m_params->XTitleColor= TQColor( graphcolor.attribute( "xtitlecolor" ) );
}
if (graphcolor.hasAttribute( "ytitlecolor" )) {
- m_params->YTitleColor= QColor( graphcolor.attribute( "ytitlecolor" ) );
+ m_params->YTitleColor= TQColor( graphcolor.attribute( "ytitlecolor" ) );
}
if (graphcolor.hasAttribute( "ytitle2color" )) {
- m_params->YTitle2Color= QColor( graphcolor.attribute( "ytitle2color" ) );
+ m_params->YTitle2Color= TQColor( graphcolor.attribute( "ytitle2color" ) );
}
if (graphcolor.hasAttribute( "xlabelcolor" )) {
- m_params->XLabelColor= QColor( graphcolor.attribute( "xlabelcolor" ) );
+ m_params->XLabelColor= TQColor( graphcolor.attribute( "xlabelcolor" ) );
}
if (graphcolor.hasAttribute( "ylabelcolor" )) {
- m_params->YLabelColor= QColor( graphcolor.attribute( "ylabelcolor" ) );
+ m_params->YLabelColor= TQColor( graphcolor.attribute( "ylabelcolor" ) );
}
if (graphcolor.hasAttribute( "ylabel2color" )) {
- m_params->YLabel2Color= QColor( graphcolor.attribute( "ylabel2color" ) );
+ m_params->YLabel2Color= TQColor( graphcolor.attribute( "ylabel2color" ) );
}
}
- QDomElement annotation = params.namedItem( "annotation" ).toElement();
+ TQDomElement annotation = params.namedItem( "annotation" ).toElement();
if (!annotation.isNull()) {
m_params->annotation=new KChartAnnotationType;
if (annotation.hasAttribute( "color" )) {
- m_params->annotation->color= QColor( annotation.attribute( "color" ) );
+ m_params->annotation->color= TQColor( annotation.attribute( "color" ) );
}
if (annotation.hasAttribute( "point" )) {
m_params->annotation->point=annotation.attribute("point").toDouble( &ok );
@@ -2154,13 +2154,13 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
}
- QDomElement note = params.namedItem( "note" ).toElement();
+ TQDomElement note = params.namedItem( "note" ).toElement();
if ( !note.isNull()) {
- QString t = note.text();
+ TQString t = note.text();
m_params->annotation->note=t;
}
- QDomElement scatter = params.namedItem( "scatter" ).toElement();
+ TQDomElement scatter = params.namedItem( "scatter" ).toElement();
if ( !scatter.isNull() ) {
m_params->scatter = new KChartScatterType;
if ( scatter.hasAttribute( "point" ) ) {
@@ -2179,7 +2179,7 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
return false;
}
if ( scatter.hasAttribute( "color" )) {
- m_params->scatter->color= QColor( scatter.attribute( "color" ) );
+ m_params->scatter->color= TQColor( scatter.attribute( "color" ) );
}
if ( scatter.hasAttribute( "ind" ) ) {
m_params->scatter->ind = (KChartScatterIndType)scatter.attribute( "ind" ).toInt( &ok );
@@ -2188,47 +2188,47 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
}
- QDomElement legend = chart.namedItem("legend").toElement();
+ TQDomElement legend = chart.namedItem("legend").toElement();
if (!legend.isNull()) {
int number = legend.attribute("number").toInt(&ok);
if (!ok) { return false; }
- QDomNode name = legend.firstChild();
+ TQDomNode name = legend.firstChild();
m_params->legend.clear();
for(int i=0; i<number; i++) {
if (name.isNull()) {
kdDebug(35001) << "Some problems, there is less data than it should be!" << endl;
break;
}
- QDomElement element = name.toElement();
+ TQDomElement element = name.toElement();
if ( !element.isNull() && element.tagName() == "name" ) {
- QString t = element.text();
+ TQString t = element.text();
m_params->legend+=t;
name = name.nextSibling();
}
}
}
- QDomElement xlbl = chart.namedItem("xlbl").toElement();
+ TQDomElement xlbl = chart.namedItem("xlbl").toElement();
if (!xlbl.isNull()) {
int number = xlbl.attribute("number").toInt(&ok);
if (!ok) { return false; }
- QDomNode label = xlbl.firstChild();
+ TQDomNode label = xlbl.firstChild();
m_params->xlbl.clear();
for (int i=0; i<number; i++) {
if (label.isNull()) {
kdDebug(35001) << "Some problems, there is less data than it should be!" << endl;
break;
}
- QDomElement element = label.toElement();
+ TQDomElement element = label.toElement();
if ( !element.isNull() && element.tagName() == "label" ) {
- QString t = element.text();
+ TQString t = element.text();
m_params->xlbl+=t;
label = label.nextSibling();
}
}
}
- QDomElement backgroundPixmap = chart.namedItem( "backgroundPixmap" ).toElement();
+ TQDomElement backgroundPixmap = chart.namedItem( "backgroundPixmap" ).toElement();
if ( !backgroundPixmap.isNull() ) {
if ( backgroundPixmap.hasAttribute( "name" ) )
m_params->backgroundPixmapName = backgroundPixmap.attribute( "name" );
@@ -2254,21 +2254,21 @@ bool KChartPart::loadOldXML( const QDomDocument& doc )
}
}
- QDomElement extcolor = chart.namedItem("extcolor").toElement();
+ TQDomElement extcolor = chart.namedItem("extcolor").toElement();
if (!extcolor.isNull()) {
unsigned int number = extcolor.attribute("number").toInt(&ok);
if (!ok) { return false; }
- QDomNode color = extcolor.firstChild();
+ TQDomNode color = extcolor.firstChild();
for (unsigned int i=0; i<number; i++) {
if (color.isNull()) {
kdDebug(35001) << "Some problems, there is less data than it should be!" << endl;
break;
}
- QDomElement element = color.toElement();
+ TQDomElement element = color.toElement();
if ( !element.isNull()) {
if (element.hasAttribute( "name" )) {
- m_params->ExtColor.setColor(i,QColor( element.attribute( "name" ) ));
+ m_params->ExtColor.setColor(i,TQColor( element.attribute( "name" ) ));
}
color = color.nextSibling();
}
@@ -2294,7 +2294,7 @@ void KChartPart::slotModified()
}
-bool KChartPart::showEmbedInitDialog(QWidget* /*parent*/)
+bool KChartPart::showEmbedInitDialog(TQWidget* /*tqparent*/)
{
// Don't show an embed dialog
return true;