diff options
Diffstat (limited to 'kivio/kiviopart/kiviosdk/kivio_text_style.cpp')
-rw-r--r-- | kivio/kiviopart/kiviosdk/kivio_text_style.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kivio/kiviopart/kiviosdk/kivio_text_style.cpp b/kivio/kiviopart/kiviosdk/kivio_text_style.cpp index 75d975d5..28044f39 100644 --- a/kivio/kiviopart/kiviosdk/kivio_text_style.cpp +++ b/kivio/kiviopart/kiviosdk/kivio_text_style.cpp @@ -1,17 +1,17 @@ #include "kivio_common.h" #include "kivio_text_style.h" -#include <qdom.h> -#include <qpainter.h> +#include <tqdom.h> +#include <tqpainter.h> #include <KoGlobal.h> KivioTextStyle::KivioTextStyle() { m_text = ""; - m_color = QColor(0,0,0); - m_hTextAlign = Qt::AlignHCenter; - m_vTextAlign = Qt::AlignVCenter; + m_color = TQColor(0,0,0); + m_hTextAlign = TQt::AlignHCenter; + m_vTextAlign = TQt::AlignVCenter; m_isHtml = false; - //m_font = QFont("times",12); + //m_font = TQFont("times",12); m_font = KoGlobal::defaultFont(); } @@ -29,9 +29,9 @@ void KivioTextStyle::copyInto( KivioTextStyle *pTarget ) pTarget->m_font = m_font; } -QDomElement KivioTextStyle::saveXML( QDomDocument &doc ) +TQDomElement KivioTextStyle::saveXML( TQDomDocument &doc ) { - QDomElement textE = doc.createElement("KivioTextStyle"); + TQDomElement textE = doc.createElement("KivioTextStyle"); XmlWriteString( textE, "text", m_text ); XmlWriteInt( textE, "isHtml", m_isHtml ); @@ -39,7 +39,7 @@ QDomElement KivioTextStyle::saveXML( QDomDocument &doc ) XmlWriteInt( textE, "vTextAlign", m_vTextAlign ); // Text font & color - QDomElement innerTextE = doc.createElement("Font"); + TQDomElement innerTextE = doc.createElement("Font"); XmlWriteColor( innerTextE, "color", m_color ); XmlWriteString( innerTextE, "family", m_font.family() ); XmlWriteInt( innerTextE, "size", m_font.pointSize() ); @@ -54,20 +54,20 @@ QDomElement KivioTextStyle::saveXML( QDomDocument &doc ) return textE; } -bool KivioTextStyle::loadXML( const QDomElement &e ) +bool KivioTextStyle::loadXML( const TQDomElement &e ) { m_text = XmlReadString( e, "text", "" ); m_isHtml = (bool)XmlReadInt( e, "isHtml", (int)false ); - m_hTextAlign = XmlReadInt( e, "hTextAlign", Qt::AlignHCenter ); - m_vTextAlign = XmlReadInt( e, "vTextAlign", Qt::AlignVCenter ); + m_hTextAlign = XmlReadInt( e, "hTextAlign", TQt::AlignHCenter ); + m_vTextAlign = XmlReadInt( e, "vTextAlign", TQt::AlignVCenter ); // Search for the font - QDomNode innerNode = e.firstChild(); + TQDomNode innerNode = e.firstChild(); while( !innerNode.isNull() ) { - QString innerName = innerNode.nodeName(); - QDomElement innerE = innerNode.toElement(); + TQString innerName = innerNode.nodeName(); + TQDomElement innerE = innerNode.toElement(); if( innerName == "Font" ) { @@ -78,7 +78,7 @@ bool KivioTextStyle::loadXML( const QDomElement &e ) m_font.setUnderline( (bool)XmlReadInt( innerE, "underline", 12 ) ); m_font.setStrikeOut( (bool)XmlReadInt( innerE, "strikeOut", 12 ) ); m_font.setFixedPitch( (bool)XmlReadInt( innerE, "fixedPitch", false ) ); - m_color = XmlReadColor( innerE, "color", QColor(0,0,0) ); + m_color = XmlReadColor( innerE, "color", TQColor(0,0,0) ); } innerNode = innerNode.nextSibling(); |