diff options
Diffstat (limited to 'kword/KWTableTemplate.cpp')
-rw-r--r-- | kword/KWTableTemplate.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kword/KWTableTemplate.cpp b/kword/KWTableTemplate.cpp index 02bc428c..76eb224e 100644 --- a/kword/KWTableTemplate.cpp +++ b/kword/KWTableTemplate.cpp @@ -25,7 +25,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qdom.h> +#include <tqdom.h> /******************************************************************/ @@ -53,13 +53,13 @@ void KWTableTemplateCollection::clear() m_lastTemplate = 0; } -KWTableTemplate* KWTableTemplateCollection::findTableTemplate( const QString & _name ) +KWTableTemplate* KWTableTemplateCollection::findTableTemplate( const TQString & _name ) { // Caching, to speed things up if ( m_lastTemplate && m_lastTemplate->name() == _name ) return m_lastTemplate; - QPtrListIterator<KWTableTemplate> templateIt( m_templateList ); + TQPtrListIterator<KWTableTemplate> templateIt( m_templateList ); for ( ; templateIt.current(); ++templateIt ) { if ( templateIt.current()->name() == _name ) { @@ -107,7 +107,7 @@ void KWTableTemplateCollection::removeTableTemplate ( KWTableTemplate *tt ) /* Class: KWTableTemplate */ /******************************************************************/ -KWTableTemplate::KWTableTemplate( const QString & name, KWTableStyle * _firstRow, KWTableStyle * _firstCol, +KWTableTemplate::KWTableTemplate( const TQString & name, KWTableStyle * _firstRow, KWTableStyle * _firstCol, KWTableStyle *_lastRow, KWTableStyle *_lastCol, KWTableStyle *_bodyCell, KWTableStyle *_topLeftCorner, KWTableStyle *_topRightCorner, KWTableStyle *_bottomLeftCorner, KWTableStyle *_bottomRightCorner ) @@ -124,18 +124,18 @@ KWTableTemplate::KWTableTemplate( const QString & name, KWTableStyle * _firstRow m_bottomLeftCorner = _bottomLeftCorner; } -KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, int /*docVersion*/ ) +KWTableTemplate::KWTableTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int /*docVersion*/ ) { m_topRightCorner = 0L; m_topLeftCorner = 0L; m_bottomRightCorner = 0L; m_bottomLeftCorner = 0L; - QDomElement element = parentElem.namedItem( "NAME" ).toElement(); + TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("value") ) ) m_name = element.attribute( "value" ); - element = parentElem.namedItem( "BODYCELL" ).toElement(); + element = tqparentElem.namedItem( "BODYCELL" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) && ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) ) m_bodyCell = _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ); @@ -152,11 +152,11 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in ts->setFrameStyle( fs ); else { KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" ); - standardFrameStyle->setBackgroundColor(QColor("white")); - standardFrameStyle->setTopBorder(KoBorder(QColor("black"),KoBorder::SOLID,0)); - standardFrameStyle->setRightBorder(KoBorder(QColor("black"),KoBorder::SOLID,0)); - standardFrameStyle->setLeftBorder(KoBorder(QColor("black"),KoBorder::SOLID,0)); - standardFrameStyle->setBottomBorder(KoBorder(QColor("black"),KoBorder::SOLID,0)); + standardFrameStyle->setBackgroundColor(TQColor("white")); + standardFrameStyle->setTopBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0)); + standardFrameStyle->setRightBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0)); + standardFrameStyle->setLeftBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0)); + standardFrameStyle->setBottomBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0)); _doc->frameStyleCollection()->addStyle( standardFrameStyle ); ts->setFrameStyle( fs ); } @@ -172,7 +172,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in setBodyCell ( ts ); } } - element = parentElem.namedItem( "FIRSTROW" ).toElement(); + element = tqparentElem.namedItem( "FIRSTROW" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) && ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) ) { @@ -186,7 +186,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in else m_firstRow = m_bodyCell; - element = parentElem.namedItem( "FIRSTCOL" ).toElement(); + element = tqparentElem.namedItem( "FIRSTCOL" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) && ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) ) { @@ -200,7 +200,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in else m_firstCol = m_bodyCell; - element = parentElem.namedItem( "LASTROW" ).toElement(); + element = tqparentElem.namedItem( "LASTROW" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) && ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) ) { @@ -214,7 +214,7 @@ KWTableTemplate::KWTableTemplate( QDomElement & parentElem, KWDocument *_doc, in else m_lastRow = m_bodyCell; - element = parentElem.namedItem( "LASTCOL" ).toElement(); + element = tqparentElem.namedItem( "LASTCOL" ).toElement(); if ( ( !element.isNull() ) && ( element.hasAttribute("name") ) && ( _doc->tableStyleCollection()->findStyle( element.attribute( "name" ) ) ) ) { @@ -248,52 +248,52 @@ void KWTableTemplate::operator=( const KWTableTemplate &rhs ) m_bottomLeftCorner = rhs.pBottomLeftCorner(); } -QString KWTableTemplate::displayName() const +TQString KWTableTemplate::displayName() const { return i18n( "Style name", name().utf8() ); } // TODO -void KWTableTemplate::saveTableTemplate( QDomElement & parentElem ) +void KWTableTemplate::saveTableTemplate( TQDomElement & tqparentElem ) { - QDomDocument doc = parentElem.ownerDocument(); - QDomElement element = doc.createElement( "NAME" ); - parentElem.appendChild( element ); + TQDomDocument doc = tqparentElem.ownerDocument(); + TQDomElement element = doc.createElement( "NAME" ); + tqparentElem.appendChild( element ); element.setAttribute( "value", name() ); if (m_bodyCell) { element = doc.createElement( "BODYCELL" ); - parentElem.appendChild( element ); + tqparentElem.appendChild( element ); element.setAttribute( "name", m_bodyCell->name() ); } if (m_firstRow) { element = doc.createElement( "FIRSTROW" ); - parentElem.appendChild( element ); + tqparentElem.appendChild( element ); element.setAttribute( "name", m_firstRow->name() ); } if (m_firstCol) { element = doc.createElement( "FIRSTCOL" ); - parentElem.appendChild( element ); + tqparentElem.appendChild( element ); element.setAttribute( "name", m_firstCol->name() ); } if (m_lastRow) { element = doc.createElement( "LASTROW" ); - parentElem.appendChild( element ); + tqparentElem.appendChild( element ); element.setAttribute( "name", m_lastRow->name() ); } if (m_lastCol) { element = doc.createElement( "LASTCOL" ); - parentElem.appendChild( element ); + tqparentElem.appendChild( element ); element.setAttribute( "name", m_lastCol->name() ); } } -KWTableTemplate *KWTableTemplate::loadTemplate( QDomElement & parentElem, KWDocument *_doc, int docVersion ) +KWTableTemplate *KWTableTemplate::loadTemplate( TQDomElement & tqparentElem, KWDocument *_doc, int docVersion ) { - return new KWTableTemplate(parentElem, _doc, docVersion); + return new KWTableTemplate(tqparentElem, _doc, docVersion); } |