summaryrefslogtreecommitdiffstats
path: root/filters/karbon/ai
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters/karbon/ai
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/karbon/ai')
-rw-r--r--filters/karbon/ai/ai88handler.cc34
-rw-r--r--filters/karbon/ai/aicolor.h2
-rw-r--r--filters/karbon/ai/aielement.cc190
-rw-r--r--filters/karbon/ai/aielement.h56
-rw-r--r--filters/karbon/ai/aiimport.cc26
-rw-r--r--filters/karbon/ai/aiimport.h11
-rw-r--r--filters/karbon/ai/ailexer.cc24
-rw-r--r--filters/karbon/ai/ailexer.h12
-rw-r--r--filters/karbon/ai/aiparserbase.cc156
-rw-r--r--filters/karbon/ai/aiparserbase.h52
-rw-r--r--filters/karbon/ai/karbonaiparserbase.cc14
-rw-r--r--filters/karbon/ai/karbonaiparserbase.h22
12 files changed, 300 insertions, 299 deletions
diff --git a/filters/karbon/ai/ai88handler.cc b/filters/karbon/ai/ai88handler.cc
index f3cf53a7..a271f33f 100644
--- a/filters/karbon/ai/ai88handler.cc
+++ b/filters/karbon/ai/ai88handler.cc
@@ -326,7 +326,7 @@ void AI88Handler::_handleSetFillPattern()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ka = m_delegate->getDoubleValue();
double k = m_delegate->getDoubleValue();
@@ -341,7 +341,7 @@ void AI88Handler::_handleSetFillPattern()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
}
@@ -350,7 +350,7 @@ void AI88Handler::_handleSetStrokePattern()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ka = m_delegate->getDoubleValue();
double k = m_delegate->getDoubleValue();
@@ -365,7 +365,7 @@ void AI88Handler::_handleSetStrokePattern()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
}
@@ -406,7 +406,7 @@ void AI88Handler::_handleSetStrokeColorGray()
void AI88Handler::_handleSetFillColorCustom()
{
double g = m_delegate->getDoubleValue();
- const QString name = m_delegate->getStringValue();
+ const TQString name = m_delegate->getStringValue();
double k = m_delegate->getDoubleValue();
double y = m_delegate->getDoubleValue();
double m = m_delegate->getDoubleValue();
@@ -426,7 +426,7 @@ void AI88Handler::_handleSetDash()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotDash (aval, fval);
// qDebug ("dash operation finished");
}
@@ -436,7 +436,7 @@ void AI88Handler::_handlePatternDefinition()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ury = m_delegate->getDoubleValue();
double urx = m_delegate->getDoubleValue();
@@ -446,7 +446,7 @@ void AI88Handler::_handlePatternDefinition()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_delegate->m_documentHandler) m_delegate->m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
}
@@ -455,7 +455,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
int ury = m_delegate->getIntValue();
int urx = m_delegate->getIntValue();
@@ -465,7 +465,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_delegate->m_embeddedHandler) m_delegate->m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
}
@@ -491,7 +491,7 @@ void AI88Handler::_handleSetCurrentText() {
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &fontname = elem2.toReference();
+ const TQString &fontname = elem2.toReference();
if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);
@@ -502,7 +502,7 @@ void AI88Handler::_handleTextBlock (TextOperation to) {
qDebug ("to element is (%s)",elem.typeName());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotTextBlockBegin (aval, to);
}
@@ -511,7 +511,7 @@ void AI88Handler::_handleTextOutput () {
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &text = elem.toString();
+ const TQString &text = elem.toString();
int length = -1;
@@ -535,15 +535,15 @@ void AI88Handler::_handleFontEncoding()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &oldFont = elem.toReference();
+ const TQString &oldFont = elem.toReference();
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QString &newFont = elem2.toReference();
+ const TQString &newFont = elem2.toReference();
AIElement elem3 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
- const QValueVector<AIElement> encodingData = elem3.toElementArray();
+ const TQValueVector<AIElement> encodingData = elem3.toElementArray();
if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
}
@@ -551,7 +551,7 @@ void AI88Handler::_handleFontEncoding()
void AI88Handler::_handleSetStrokeColorCustom()
{
double g = m_delegate->getDoubleValue();
- const QString name = m_delegate->getStringValue();
+ const TQString name = m_delegate->getStringValue();
double k = m_delegate->getDoubleValue();
double y = m_delegate->getDoubleValue();
double m = m_delegate->getDoubleValue();
diff --git a/filters/karbon/ai/aicolor.h b/filters/karbon/ai/aicolor.h
index b8cc1414..6e22984c 100644
--- a/filters/karbon/ai/aicolor.h
+++ b/filters/karbon/ai/aicolor.h
@@ -20,7 +20,7 @@
#ifndef AICOLOR_H
#define AICOLOR_H
-#include <qstring.h>
+#include <tqstring.h>
/**
*@author
diff --git a/filters/karbon/ai/aielement.cc b/filters/karbon/ai/aielement.cc
index 13887b50..608bdf61 100644
--- a/filters/karbon/ai/aielement.cc
+++ b/filters/karbon/ai/aielement.cc
@@ -1,5 +1,5 @@
/* This file is part of the KDE project
- Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
+ Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -18,7 +18,7 @@
*/
#include "aielement.h"
-#include <qglobal.h>
+#include <tqglobal.h>
AIElement::Private::Private()
{
@@ -34,23 +34,23 @@ AIElement::Private::Private( Private* d )
case AIElement::String:
case AIElement::Reference:
case AIElement::Operator:
- value.ptr = new QString( *((QString*)d->value.ptr) );
+ value.ptr = new TQString( *((TQString*)d->value.ptr) );
break;
case AIElement::CString:
- // QCString is explicit shared
- value.ptr = new QCString( *((QCString*)d->value.ptr) );
+ // TQCString is explicit shared
+ value.ptr = new TQCString( *((TQCString*)d->value.ptr) );
break;
/* case AIElement::List:
- value.ptr = new QValueList<AIElement>( *((QValueList<AIElement>*)d->value.ptr) );
+ value.ptr = new TQValueList<AIElement>( *((TQValueList<AIElement>*)d->value.ptr) );
break; */
case AIElement::ElementArray:
- value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
+ value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
break;
case AIElement::Block:
- value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
+ value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
break;
case AIElement::ByteArray:
- value.ptr = new QByteArray( *((QByteArray*)d->value.ptr) );
+ value.ptr = new TQByteArray( *((TQByteArray*)d->value.ptr) );
break;
case AIElement::Int:
value.i = d->value.i;
@@ -83,22 +83,22 @@ void AIElement::Private::clear()
case AIElement::String:
case AIElement::Operator:
case AIElement::Reference:
- delete (QString*)value.ptr;
+ delete (TQString*)value.ptr;
break;
case AIElement::CString:
- delete (QCString*)value.ptr;
+ delete (TQCString*)value.ptr;
break;
/* case AIElement::List:
- delete (QValueList<AIElement>*)value.ptr;
+ delete (TQValueList<AIElement>*)value.ptr;
break; */
case AIElement::ElementArray:
- delete (QValueVector<AIElement>*)value.ptr;
+ delete (TQValueVector<AIElement>*)value.ptr;
break;
case AIElement::Block:
- delete (QValueVector<AIElement>*)value.ptr;
+ delete (TQValueVector<AIElement>*)value.ptr;
break;
case AIElement::ByteArray:
- delete (QByteArray*)value.ptr;
+ delete (TQByteArray*)value.ptr;
break;
case AIElement::Invalid:
case AIElement::Int:
@@ -136,7 +136,7 @@ AIElement::~AIElement()
/*!
Constructs a copy of the aielement, \a p, passed as the argument to this
constructor. Usually this is a deep copy, but a shallow copy is made
- if the stored data type is explicitly shared, as e.g. QImage is.
+ if the stored data type is explicitly shared, as e.g. TQImage is.
*/
AIElement::AIElement( const AIElement& p )
{
@@ -147,25 +147,25 @@ AIElement::AIElement( const AIElement& p )
/*!
Constructs a new aielement with a string value, \a val.
*/
-AIElement::AIElement( const QString& val, Type type )
+AIElement::AIElement( const TQString& val, Type type )
{
d = new Private;
d->typ = type;
- d->value.ptr = new QString( val );
+ d->value.ptr = new TQString( val );
}
/*!
Constructs a new aielement with a C-string value, \a val.
- If you want to modify the QCString after you've passed it to this
+ If you want to modify the TQCString after you've passed it to this
constructor, we recommend passing a deep copy (see
- QCString::copy()).
+ TQCString::copy()).
*/
-AIElement::AIElement( const QCString& val )
+AIElement::AIElement( const TQCString& val )
{
d = new Private;
d->typ = CString;
- d->value.ptr = new QCString( val );
+ d->value.ptr = new TQCString( val );
}
/*!
@@ -180,7 +180,7 @@ AIElement::AIElement( const char* val )
if ( val == 0 )
return;
d->typ = CString;
- d->value.ptr = new QCString( val );
+ d->value.ptr = new TQCString( val );
}
/*!
@@ -227,32 +227,32 @@ AIElement::AIElement( double val )
/*!
Constructs a new aielement with a list value, \a val.
*/
-/* AIElement::AIElement( const QValueList<AIElement>& val )
+/* AIElement::AIElement( const TQValueList<AIElement>& val )
{
d = new Private;
d->typ = List;
- d->value.ptr = new QValueList<AIElement>( val );
+ d->value.ptr = new TQValueList<AIElement>( val );
} */
-AIElement::AIElement( const QValueVector<AIElement>& val, Type type )
+AIElement::AIElement( const TQValueVector<AIElement>& val, Type type )
{
d = new Private;
d->typ = type;
- d->value.ptr = new QValueVector<AIElement>( val );
+ d->value.ptr = new TQValueVector<AIElement>( val );
}
-AIElement::AIElement( const QByteArray& val )
+AIElement::AIElement( const TQByteArray& val )
{
d = new Private;
d->typ = ByteArray;
- d->value.ptr = new QByteArray( val );
+ d->value.ptr = new TQByteArray( val );
}
/*!
Assigns the value of the aielement \a aielement to this aielement.
This is a deep copy of the aielement, but note that if the aielement
- holds an explicitly shared type such as QImage, a shallow copy
+ holds an explicitly shared type such as TQImage, a shallow copy
is performed.
*/
AIElement& AIElement::operator= ( const AIElement& aielement )
@@ -283,7 +283,7 @@ void AIElement::detach()
/*!
Returns the name of the type stored in the aielement.
The returned strings describe the C++ datatype used to store the
- data: for example, "QFont", "QString", or "QValueList<AIElement>".
+ data: for example, "TQFont", TQSTRING_OBJECT_NAME_STRING, or "TQValueList<AIElement>".
An Invalid aielement returns 0.
*/
const char* AIElement::typeName() const
@@ -310,16 +310,16 @@ static const int ntypes = 11;
static const char* const type_map[ntypes] =
{
0,
-// "QValueList<AIElement>",
- "QString",
+// "TQValueList<AIElement>",
+ TQSTRING_OBJECT_NAME_STRING,
"int",
"uint",
"double",
- "QCString",
+ "TQCString",
"Operator",
"Reference",
- "QValueVector<AIElement>",
- "QByteArray",
+ "TQValueVector<AIElement>",
+ TQBYTEARRAY_OBJECT_NAME_STRING,
"uchar",
};
@@ -351,59 +351,59 @@ AIElement::Type AIElement::nameToType( const char* name )
}
/*!
- Returns the aielement as a QString if the aielement has type()
+ Returns the aielement as a TQString if the aielement has type()
String, CString, ByteArray, Int, Uint, Double,
- or QString::null otherwise.
+ or TQString() otherwise.
\sa asString()
*/
-const QString AIElement::toString() const
+const TQString AIElement::toString() const
{
if ( d->typ == CString )
- return QString::fromLatin1( toCString() );
+ return TQString::tqfromLatin1( toCString() );
if ( d->typ == Int )
- return QString::number( toInt() );
+ return TQString::number( toInt() );
if ( d->typ == UInt )
- return QString::number( toUInt() );
+ return TQString::number( toUInt() );
if ( d->typ == Double )
- return QString::number( toDouble() );
+ return TQString::number( toDouble() );
if ( d->typ == Byte )
- return QString::number( toByte() );
+ return TQString::number( toByte() );
if ( d->typ != String )
- return QString::null;
- return *((QString*)d->value.ptr);
+ return TQString();
+ return *((TQString*)d->value.ptr);
}
-const QString AIElement::toReference() const
+const TQString AIElement::toReference() const
{
if ( d->typ != Reference )
- return QString::null;
- return *((QString*)d->value.ptr);
+ return TQString();
+ return *((TQString*)d->value.ptr);
}
-const QString AIElement::toOperator() const
+const TQString AIElement::toOperator() const
{
if ( d->typ != Operator )
- return QString::null;
- return *((QString*)d->value.ptr);
+ return TQString();
+ return *((TQString*)d->value.ptr);
}
/*!
- Returns the aielement as a QCString if the aielement has type()
+ Returns the aielement as a TQCString if the aielement has type()
CString or String, or a 0 otherwise.
\sa asCString()
*/
-const QCString AIElement::toCString() const
+const TQCString AIElement::toCString() const
{
if ( d->typ == CString )
- return *((QCString*)d->value.ptr);
+ return *((TQCString*)d->value.ptr);
if ( d->typ == String )
- return ((QString*)d->value.ptr)->latin1();
+ return ((TQString*)d->value.ptr)->latin1();
if ( d->typ == Operator )
- return ((QString*)d->value.ptr)->latin1();
+ return ((TQString*)d->value.ptr)->latin1();
if ( d->typ == Reference )
- return ((QString*)d->value.ptr)->latin1();
+ return ((TQString*)d->value.ptr)->latin1();
return 0;
}
@@ -421,9 +421,9 @@ const QCString AIElement::toCString() const
int AIElement::toInt( bool * ok ) const
{
if( d->typ == String )
- return ((QString*)d->value.ptr)->toInt( ok );
+ return ((TQString*)d->value.ptr)->toInt( ok );
if ( d->typ == CString )
- return ((QCString*)d->value.ptr)->toInt( ok );
+ return ((TQCString*)d->value.ptr)->toInt( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Int )
@@ -440,9 +440,9 @@ int AIElement::toInt( bool * ok ) const
uchar AIElement::toByte( bool * ok ) const
{
if( d->typ == String )
- return ((QString*)d->value.ptr)->toShort( ok );
+ return ((TQString*)d->value.ptr)->toShort( ok );
if ( d->typ == CString )
- return ((QCString*)d->value.ptr)->toShort( ok );
+ return ((TQCString*)d->value.ptr)->toShort( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Byte )
@@ -469,9 +469,9 @@ uchar AIElement::toByte( bool * ok ) const
uint AIElement::toUInt( bool * ok ) const
{
if( d->typ == String )
- return ((QString*)d->value.ptr)->toUInt( ok );
+ return ((TQString*)d->value.ptr)->toUInt( ok );
if ( d->typ == CString )
- return ((QCString*)d->value.ptr)->toUInt( ok );
+ return ((TQCString*)d->value.ptr)->toUInt( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Int )
@@ -498,9 +498,9 @@ uint AIElement::toUInt( bool * ok ) const
double AIElement::toDouble( bool * ok ) const
{
if( d->typ == String )
- return ((QString*)d->value.ptr)->toDouble( ok );
+ return ((TQString*)d->value.ptr)->toDouble( ok );
if ( d->typ == CString )
- return ((QCString*)d->value.ptr)->toDouble( ok );
+ return ((TQCString*)d->value.ptr)->toDouble( ok );
if ( ok )
*ok = canCast( Double );
if ( d->typ == Double )
@@ -515,14 +515,14 @@ double AIElement::toDouble( bool * ok ) const
}
/*!
- Returns the aielement as a QValueList<AIElement> if the aielement has type()
+ Returns the aielement as a TQValueList<AIElement> if the aielement has type()
List or StringList, or an empty list otherwise.
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
- QValueList<AIElement> list = myAIElement.toList();
- QValueList<AIElement>::Iterator it = list.begin();
+ TQValueList<AIElement> list = myAIElement.toList();
+ TQValueList<AIElement>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
@@ -531,40 +531,40 @@ double AIElement::toDouble( bool * ok ) const
\sa asList()
*/
-/* const QValueList<AIElement> AIElement::toList() const
+/* const TQValueList<AIElement> AIElement::toList() const
{
if ( d->typ == List )
- return *((QValueList<AIElement>*)d->value.ptr);
- return QValueList<AIElement>();
+ return *((TQValueList<AIElement>*)d->value.ptr);
+ return TQValueList<AIElement>();
} */
-const QValueVector<AIElement> AIElement::toElementArray() const
+const TQValueVector<AIElement> AIElement::toElementArray() const
{
if ( d->typ == ElementArray )
- return *((QValueVector<AIElement>*)d->value.ptr);
- return QValueVector<AIElement>();
+ return *((TQValueVector<AIElement>*)d->value.ptr);
+ return TQValueVector<AIElement>();
}
-const QValueVector<AIElement> AIElement::toBlock() const
+const TQValueVector<AIElement> AIElement::toBlock() const
{
if ( d->typ == Block )
- return *((QValueVector<AIElement>*)d->value.ptr);
- return QValueVector<AIElement>();
+ return *((TQValueVector<AIElement>*)d->value.ptr);
+ return TQValueVector<AIElement>();
}
-const QByteArray AIElement::toByteArray() const
+const TQByteArray AIElement::toByteArray() const
{
if ( d->typ == ByteArray )
- return *((QByteArray*)d->value.ptr);
- return QByteArray();
+ return *((TQByteArray*)d->value.ptr);
+ return TQByteArray();
}
-#define Q_VARIANT_AS( f ) Q##f& AIElement::as##f() { \
- if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((Q##f*)d->value.ptr);}
+#define TQ_VARIANT_AS( f ) TQ##f& AIElement::as##f() { \
+ if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((TQ##f*)d->value.ptr);}
-Q_VARIANT_AS(String)
-Q_VARIANT_AS(CString)
+TQ_VARIANT_AS(String)
+TQ_VARIANT_AS(CString)
/*!
Returns the aielement's value as int reference.
@@ -632,41 +632,41 @@ uchar& AIElement::asByte()
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
- QValueList<AIElement> list = myAIElement.asList();
- QValueList<AIElement>::Iterator it = list.begin();
+ TQValueList<AIElement> list = myAIElement.asList();
+ TQValueList<AIElement>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
}
\endcode
*/
-/* QValueList<AIElement>& AIElement::asList()
+/* TQValueList<AIElement>& AIElement::asList()
{
if ( d->typ != List )
*this = AIElement( toList() );
- return *((QValueList<AIElement>*)d->value.ptr);
+ return *((TQValueList<AIElement>*)d->value.ptr);
} */
-QValueVector<AIElement>& AIElement::asElementArray()
+TQValueVector<AIElement>& AIElement::asElementArray()
{
if ( d->typ != ElementArray )
*this = AIElement( toElementArray() );
- return *((QValueVector<AIElement>*)d->value.ptr);
+ return *((TQValueVector<AIElement>*)d->value.ptr);
}
-QValueVector<AIElement>& AIElement::asBlock()
+TQValueVector<AIElement>& AIElement::asBlock()
{
if ( d->typ != Block )
*this = AIElement( toBlock() );
- return *((QValueVector<AIElement>*)d->value.ptr);
+ return *((TQValueVector<AIElement>*)d->value.ptr);
}
-QByteArray& AIElement::asByteArray()
+TQByteArray& AIElement::asByteArray()
{
if ( d->typ != ByteArray )
*this = AIElement( toByteArray() );
- return *((QByteArray*)d->value.ptr);
+ return *((TQByteArray*)d->value.ptr);
}
/*!
diff --git a/filters/karbon/ai/aielement.h b/filters/karbon/ai/aielement.h
index 5c6ab045..4fdf64a2 100644
--- a/filters/karbon/ai/aielement.h
+++ b/filters/karbon/ai/aielement.h
@@ -20,11 +20,11 @@
#ifndef AIELEMENT_H
#define AIELEMENT_H
-// #include <qvaluelist.h>
-#include <qvaluevector.h>
+// #include <tqvaluelist.h>
+#include <tqvaluevector.h>
-class QString;
-class QCString;
+class TQString;
+class TQCString;
/**
*@author
@@ -52,15 +52,15 @@ public:
AIElement();
~AIElement();
AIElement( const AIElement& );
- AIElement( const QString&, Type type = String );
- AIElement( const QCString& );
+ AIElement( const TQString&, Type type = String );
+ AIElement( const TQCString& );
AIElement( const char* );
-// AIElement( const QValueList<AIElement>& );
- AIElement( const QValueVector<AIElement>&, Type type = ElementArray);
+// AIElement( const TQValueList<AIElement>& );
+ AIElement( const TQValueVector<AIElement>&, Type type = ElementArray);
AIElement( int );
AIElement( uint );
AIElement( double );
- AIElement( const QByteArray& );
+ AIElement( const TQByteArray& );
AIElement( uchar );
AIElement& operator= ( const AIElement& );
@@ -77,36 +77,36 @@ public:
void clear();
- const QString toString() const;
- const QCString toCString() const;
+ const TQString toString() const;
+ const TQCString toCString() const;
int toInt( bool * ok=0 ) const;
uint toUInt( bool * ok=0 ) const;
double toDouble( bool * ok=0 ) const;
-// const QValueList<AIElement> toList() const;
- const QValueVector<AIElement> toElementArray() const;
- const QValueVector<AIElement> toBlock() const;
+// const TQValueList<AIElement> toList() const;
+ const TQValueVector<AIElement> toElementArray() const;
+ const TQValueVector<AIElement> toBlock() const;
// Custom types
- const QString toReference() const;
- const QString toOperator() const;
- const QByteArray toByteArray() const;
+ const TQString toReference() const;
+ const TQString toOperator() const;
+ const TQByteArray toByteArray() const;
uchar toByte( bool * ok=0 ) const;
-// QValueListConstIterator<AIElement> listBegin() const;
-// QValueListConstIterator<AIElement> listEnd() const;
- QString& asString();
- QCString& asCString();
+// TQValueListConstIterator<AIElement> listBegin() const;
+// TQValueListConstIterator<AIElement> listEnd() const;
+ TQString& asString();
+ TQCString& asCString();
int& asInt();
uint& asUInt();
double& asDouble();
-// QValueList<AIElement>& asList();
- QValueVector<AIElement>& asElementArray();
- QValueVector<AIElement>& asBlock();
+// TQValueList<AIElement>& asList();
+ TQValueVector<AIElement>& asElementArray();
+ TQValueVector<AIElement>& asBlock();
// Custom types
- QString& asReference();
- QString& asToken();
- QByteArray& asByteArray();
+ TQString& asReference();
+ TQString& asToken();
+ TQByteArray& asByteArray();
uchar& asByte();
static const char* typeToName( Type typ );
@@ -115,7 +115,7 @@ public:
private:
void detach();
- class Private : public QShared
+ class Private : public TQShared
{
public:
Private();
diff --git a/filters/karbon/ai/aiimport.cc b/filters/karbon/ai/aiimport.cc
index a5e24f5b..4a201ec5 100644
--- a/filters/karbon/ai/aiimport.cc
+++ b/filters/karbon/ai/aiimport.cc
@@ -1,5 +1,5 @@
/* This file is part of the KDE project
- Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
+ Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kgenericfactory.h>
#include <KoFilterChain.h>
@@ -47,7 +47,7 @@ protected:
K_EXPORT_COMPONENT_FACTORY( libkarbonaiimport, AiImportFactory() )
-AiImport::AiImport( KoFilter*, const char*, const QStringList& )
+AiImport::AiImport( KoFilter*, const char*, const TQStringList& )
: KoFilter()
{
}
@@ -56,29 +56,29 @@ AiImport::~AiImport()
{
}
-KoFilter::ConversionStatus
-AiImport::convert( const QCString& from, const QCString& to )
+KoFilter::ConversiontqStatus
+AiImport::convert( const TQCString& from, const TQCString& to )
{
if ( from != "application/illustrator" || to != "application/x-karbon" )
{
return KoFilter::NotImplemented;
}
- QFile fileIn( m_chain->inputFile() );
+ TQFile fileIn( m_chain->inputFile() );
if( !fileIn.open( IO_ReadOnly ) )
{
fileIn.close();
return KoFilter::FileNotFound;
}
- QDomDocument doc ("DOC");
+ TQDomDocument doc ("DOC");
KarbonAIParserBase parser;
- if (!parser.parse (fileIn, doc))
+ if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc))
{
fileIn.close();
return KoFilter::CreationError;
}
- QString result = doc.toString();
+ TQString result = doc.toString();
kdDebug() << result << endl;
KoStoreDevice* storeOut = m_chain->storageFile( "root", KoStore::Write );
@@ -88,7 +88,7 @@ AiImport::convert( const QCString& from, const QCString& to )
return KoFilter::StorageCreationError;
}
- QCString cStr = result.latin1();
+ TQCString cStr = result.latin1();
storeOut->writeBlock( cStr, cStr.size() - 1 );
return KoFilter::OK;
diff --git a/filters/karbon/ai/aiimport.h b/filters/karbon/ai/aiimport.h
index 2ec2d19b..901eba6d 100644
--- a/filters/karbon/ai/aiimport.h
+++ b/filters/karbon/ai/aiimport.h
@@ -24,20 +24,21 @@
#include "karbonaiparserbase.h"
-class QDomElement;
-class QTextStream;
+class TQDomElement;
+class TQTextStream;
class AiImport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- AiImport( KoFilter* parent, const char* name, const QStringList& );
+ AiImport( KoFilter* tqparent, const char* name, const TQStringList& );
virtual ~AiImport();
- virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
+ virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
/* private:
- QString m_result; */
+ TQString m_result; */
};
diff --git a/filters/karbon/ai/ailexer.cc b/filters/karbon/ai/ailexer.cc
index 7b660f7f..a1ab4bda 100644
--- a/filters/karbon/ai/ailexer.cc
+++ b/filters/karbon/ai/ailexer.cc
@@ -19,7 +19,7 @@
#include <ctype.h>
#include <stdlib.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "ailexer.h"
#define CATEGORY_WHITESPACE -1
@@ -173,7 +173,7 @@ AILexer::AILexer(){
AILexer::~AILexer(){
}
-bool AILexer::parse (QIODevice& fin){
+bool AILexer::parse (TQIODevice& fin){
char c;
m_buffer.clear();
@@ -350,7 +350,7 @@ void AILexer::gotByte (uchar value) {
qDebug ( "got byte %d" , value );
}
-void AILexer::gotByteArray (const QByteArray &data) {
+void AILexer::gotByteArray (const TQByteArray &data) {
qDebug ( "got byte array" );
/* for ( uint i = 0; i < data.size(); i++ )
{
@@ -413,11 +413,11 @@ void AILexer::doHandleByteArray ()
uint strIdx = 0;
uint arrayIdx = 0;
- QByteArray data (m_buffer.length() >> 1);
+ TQByteArray data (m_buffer.length() >> 1);
while (strIdx < m_buffer.length())
{
- const QString &item = m_buffer.mid (strIdx, 2);
+ const TQString &item = m_buffer.mid (strIdx, 2);
uchar val = item.toShort(NULL, 16);
data[arrayIdx] = val;
strIdx += 2;
@@ -431,7 +431,7 @@ uchar AILexer::getByte()
{
// qDebug ("convert string to byte (%s)", m_buffer.latin1());
- QStringList list = QStringList::split ("#", m_buffer.toString());
+ TQStringList list = TQStringList::split ("#", m_buffer.toString());
int radix = list[0].toShort();
uchar value = list[1].toShort (NULL, radix);
@@ -471,8 +471,8 @@ void StringBuffer::clear(){
m_length = 0;
}
-QString StringBuffer::toString() const {
- QString ret(m_buffer);
+TQString StringBuffer::toString() const {
+ TQString ret(m_buffer);
return ret;
}
@@ -495,12 +495,12 @@ uint StringBuffer::length() {
}
double StringBuffer::toFloat() {
- QString data = toString();
+ TQString data = toString();
return data.toFloat();
}
int StringBuffer::toInt() {
- QString data = toString();
+ TQString data = toString();
return data.toInt();
}
@@ -508,7 +508,7 @@ const char *StringBuffer::latin1() {
return m_buffer;
}
-QString StringBuffer::mid( uint index, uint len) const {
- QString data = toString();
+TQString StringBuffer::mid( uint index, uint len) const {
+ TQString data = toString();
return data.mid(index,len);
}
diff --git a/filters/karbon/ai/ailexer.h b/filters/karbon/ai/ailexer.h
index c53aab66..c0aaf022 100644
--- a/filters/karbon/ai/ailexer.h
+++ b/filters/karbon/ai/ailexer.h
@@ -20,8 +20,8 @@
#ifndef AILEXER_H
#define AILEXER_H
-#include <qiodevice.h>
-#include <qstring.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
/**
*@author Dirk Schönberger
@@ -65,12 +65,12 @@ public:
void append (char c);
void clear();
- QString toString() const;
+ TQString toString() const;
uint length();
double toFloat();
int toInt();
const char *latin1();
- QString mid( uint index, uint len=0xffffffff) const;
+ TQString mid( uint index, uint len=0xffffffff) const;
private:
char *m_buffer;
uint m_length;
@@ -84,7 +84,7 @@ public:
AILexer();
virtual ~AILexer();
- virtual bool parse (QIODevice& fin);
+ virtual bool parse (TQIODevice& fin);
private:
State m_curState;
StringBuffer m_buffer;
@@ -116,7 +116,7 @@ protected:
virtual void gotArrayStart ();
virtual void gotArrayEnd ();
virtual void gotByte (uchar value);
- virtual void gotByteArray (const QByteArray &data);
+ virtual void gotByteArray (const TQByteArray &data);
};
#endif
diff --git a/filters/karbon/ai/aiparserbase.cc b/filters/karbon/ai/aiparserbase.cc
index 63ace734..6e9ff040 100644
--- a/filters/karbon/ai/aiparserbase.cc
+++ b/filters/karbon/ai/aiparserbase.cc
@@ -20,8 +20,8 @@
#include "aiparserbase.h"
#include "ai88handler.h"
#include "ai3handler.h"
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
typedef struct {
char* op;
@@ -204,7 +204,7 @@ AIParserBase::~AIParserBase(){
}
-bool AIParserBase::parse (QIODevice& fin){
+bool AIParserBase::parse (TQIODevice& fin){
return AILexer::parse (fin);
}
@@ -376,13 +376,13 @@ void AIParserBase::handleElement (AIElement &element)
if (m_sink == DS_Array)
{
if (m_debug) qDebug ("in mode array");
- QValueVector<AIElement> &elementArray = m_arrayStack.top();
+ TQValueVector<AIElement> &elementArray = m_arrayStack.top();
elementArray.push_back(element);
}
if (m_sink == DS_Block)
{
if (m_debug) qDebug ("in mode block");
- QValueVector<AIElement> &elementArray = m_blockStack.top();
+ TQValueVector<AIElement> &elementArray = m_blockStack.top();
elementArray.push_back(element);
}
else
@@ -425,7 +425,7 @@ void AIParserBase::gotReference (const char *value) {
if (m_ignoring) return;
if (value == NULL) value = "";
if (m_debug) qDebug ("reference: %s", value);
- QString string(value);
+ TQString string(value);
AIElement element (string, AIElement::Reference);
handleElement (element);
if (m_debug) qDebug ("/got reference value");
@@ -441,7 +441,7 @@ void AIParserBase::gotByte (uchar value) {
if (m_debug) qDebug ("/got byte value");
}
-void AIParserBase::gotByteArray (const QByteArray &data) {
+void AIParserBase::gotByteArray (const TQByteArray &data) {
if (m_ignoring) return;
AIElement element (data);
handleElement (element);
@@ -452,7 +452,7 @@ void AIParserBase::gotArrayStart () {
if (m_ignoring) return;
if (m_debug) qDebug ("got array start");
- QValueVector<AIElement> array;
+ TQValueVector<AIElement> array;
m_arrayStack.push (array);
m_sink = DS_Array;
@@ -462,7 +462,7 @@ void AIParserBase::gotBlockStart () {
if (m_ignoring) return;
if (m_debug) qDebug ("got block start");
- QValueVector<AIElement> array;
+ TQValueVector<AIElement> array;
m_blockStack.push (array);
m_sink = DS_Block;
@@ -472,7 +472,7 @@ void AIParserBase::gotArrayEnd () {
if (m_ignoring) return;
if (m_debug) qDebug ("got array end");
- QValueVector<AIElement> stackArray = m_arrayStack.pop();
+ TQValueVector<AIElement> stackArray = m_arrayStack.pop();
if (m_arrayStack.empty())
{
@@ -491,7 +491,7 @@ void AIParserBase::gotArrayEnd () {
else
{
if (m_debug) qDebug ("put elements to nest stack level");
- QValueVector<AIElement> currentTOS = m_arrayStack.top();
+ TQValueVector<AIElement> currentTOS = m_arrayStack.top();
currentTOS.push_back (stackArray);
}
}
@@ -500,7 +500,7 @@ void AIParserBase::gotBlockEnd () {
if (m_ignoring) return;
if (m_debug) qDebug ("got block end");
- QValueVector<AIElement> stackArray = m_blockStack.pop();
+ TQValueVector<AIElement> stackArray = m_blockStack.pop();
if (m_blockStack.empty())
{
@@ -519,7 +519,7 @@ void AIParserBase::gotBlockEnd () {
else
{
if (m_debug) qDebug ("put elements to nest stack level");
- QValueVector<AIElement> currentTOS = m_blockStack.top();
+ TQValueVector<AIElement> currentTOS = m_blockStack.top();
currentTOS.push_back (stackArray);
}
}
@@ -531,7 +531,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_gstateHandler) m_gstateHandler->gotDash (aval, fval);
} */
@@ -553,7 +553,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ka = getDoubleValue();
double k = getDoubleValue();
@@ -568,7 +568,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_gstateHandler) m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
} */
@@ -577,7 +577,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ka = getDoubleValue();
double k = getDoubleValue();
@@ -592,7 +592,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_gstateHandler) m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
} */
@@ -632,7 +632,7 @@ void AIParserBase::gotBlockEnd () {
/*Ai88*/ /* void AIParserBase::_handleSetFillColorCustom()
{
double g = getDoubleValue();
- const QString &name = getStringValue();
+ const TQString &name = getStringValue();
double k = getDoubleValue();
double y = getDoubleValue();
double m = getDoubleValue();
@@ -648,7 +648,7 @@ void AIParserBase::_handlePSGet() {
m_stack.pop();
m_stack.pop();
- QString name ("xxx");
+ TQString name ("xxx");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -660,7 +660,7 @@ void AIParserBase::_handlePSExec() {
void AIParserBase::_handlePSString() {
m_stack.pop();
- QString name ("stringval");
+ TQString name ("stringval");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -668,13 +668,13 @@ void AIParserBase::_handlePSString() {
void AIParserBase::_handlePSBind() {
m_stack.pop();
- QString name ("bindentry");
+ TQString name ("bindentry");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
void AIParserBase::_handlePSUserdict() {
- QString name ("userdict");
+ TQString name ("userdict");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -684,7 +684,7 @@ void AIParserBase::_handlePSDict() {
m_stack.pop();
m_stack.pop();
- QString name ("dict");
+ TQString name ("dict");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -699,7 +699,7 @@ void AIParserBase::_handlePSDup() {
void AIParserBase::_handlePSBegin() {
m_stack.pop();
- QString name ("dictionary begin");
+ TQString name ("dictionary begin");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -714,7 +714,7 @@ void AIParserBase::_handlePSPut() {
AIElement elem (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
double ury = getDoubleValue();
double urx = getDoubleValue();
@@ -724,7 +724,7 @@ void AIParserBase::_handlePSPut() {
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
if (m_documentHandler) m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
} */
@@ -740,7 +740,7 @@ void AIParserBase::_handlePSDef() {
/*Ai88*/ /* void AIParserBase::_handleSetStrokeColorCustom()
{
double g = getDoubleValue();
- const QString &name = getStringValue();
+ const TQString &name = getStringValue();
double k = getDoubleValue();
double y = getDoubleValue();
double m = getDoubleValue();
@@ -763,22 +763,22 @@ void AIParserBase::_handleDocumentCustomColors(const char *) {
void AIParserBase::_handleDocumentNeededResources(const char *data) {
if (!data) return;
- QStringList items = QStringList::split (' ', data);
+ TQStringList items = TQStringList::split (' ', data);
- QString itemType = items[1];
- QString name = items[2];
- QString version = items[3];
- QString release = items[4];
+ TQString itemType = items[1];
+ TQString name = items[2];
+ TQString version = items[3];
+ TQString release = items[4];
}
void AIParserBase::_handleIncludeResource(const char *data) {
if (!data) return;
- QStringList items = QStringList::split (' ', data);
+ TQStringList items = TQStringList::split (' ', data);
- QString itemType = items[1];
- QString name = items[2];
- QString version = items[3];
- QString release = items[4];
+ TQString itemType = items[1];
+ TQString name = items[2];
+ TQString version = items[3];
+ TQString release = items[4];
m_modules.push_back (name);
}
@@ -787,20 +787,20 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) {
if (!data) return;
int colorSet = 0;
- QString tmp (data);
+ TQString tmp (data);
signed int index;
- index = tmp.find ("Cyan");
+ index = tmp.tqfind ("Cyan");
if (index > 0) colorSet |= PC_Cyan;
- index = tmp.find ("Magenta");
+ index = tmp.tqfind ("Magenta");
if (index > 0) colorSet |= PC_Magenta;
- index = tmp.find ("Yellow");
+ index = tmp.tqfind ("Yellow");
if (index > 0) colorSet |= PC_Yellow;
- index = tmp.find ("Black");
+ index = tmp.tqfind ("Black");
if (index > 0) colorSet |= PC_Black;
if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet);
@@ -813,7 +813,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &name = elem2.toString();
+ const TQString &name = elem2.toString();
int ury = getIntValue();
int urx = getIntValue();
@@ -823,7 +823,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_embeddedHandler) m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
} */
@@ -849,7 +849,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &fontname = elem2.toReference();
+ const TQString &fontname = elem2.toReference();
if (m_textHandler) m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);
} */
@@ -859,7 +859,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
qDebug ("to element is (%s)",elem.typeName());
m_stack.pop();
- const QValueVector<AIElement> aval = elem.toElementArray();
+ const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_textHandler) m_textHandler->gotTextBlockBegin (aval, to);
} */
@@ -868,7 +868,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem (m_stack.top());
m_stack.pop();
- const QString &text = elem.toString();
+ const TQString &text = elem.toString();
int length = -1;
@@ -888,11 +888,11 @@ void AIParserBase::_handleCreationDate (const char *data)
{
if (!data) return;
- QRegExp test ("\\((.+)\\) \\((.+)\\)");
+ TQRegExp test ("\\((.+)\\) \\((.+)\\)");
if (test.search (data))
{
- QString val1 = test.cap(1);
- QString val2 = test.cap(2);
+ TQString val1 = test.cap(1);
+ TQString val2 = test.cap(2);
if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1());
}
@@ -907,7 +907,7 @@ void AIParserBase::gotToken (const char *value) {
if (m_sink == DS_Array)
{
if (m_debug) qDebug ("token in array");
- QString op (value);
+ TQString op (value);
AIElement realElement (op, AIElement::Operator);
handleElement (realElement);
@@ -916,7 +916,7 @@ void AIParserBase::gotToken (const char *value) {
if (m_sink == DS_Block)
{
if (m_debug) qDebug ("token in block");
- QString op (value);
+ TQString op (value);
AIElement realElement (op, AIElement::Operator);
handleElement (realElement);
@@ -943,9 +943,9 @@ void AIParserBase::gotToken (const char *value) {
}
qWarning ( "unknown operator: %s", value );
- QString string(value);
+ TQString string(value);
- if (m_modules.findIndex(string) != -1)
+ if (m_modules.tqfindIndex(string) != -1)
{
AIElement element (string, AIElement::Reference);
handleElement (element);
@@ -1019,13 +1019,13 @@ const bool AIParserBase::getBoolValue(void) {
return getIntValue() == 1;
}
-const QString AIParserBase::getStringValue(void) {
+const TQString AIParserBase::getStringValue(void) {
const AIElement &elem = m_stack.pop();
return elem.toString();
}
-const QString AIParserBase::getOperatorValue(void) {
+const TQString AIParserBase::getOperatorValue(void) {
const AIElement &elem = m_stack.pop();
return elem.toOperator();
@@ -1034,7 +1034,7 @@ const QString AIParserBase::getOperatorValue(void) {
AIOperation AIParserBase::getAIOperation (const char *operand)
{
int i=0;
- QString cmpValue (operand);
+ TQString cmpValue (operand);
for(;;) { AIOperationMapping map = aiMappings[i];
if (map.op == NULL) return AIO_Other;
@@ -1047,7 +1047,7 @@ AIOperation AIParserBase::getAIOperation (const char *operand)
PSOperation AIParserBase::getPSOperation (const char *operand)
{
int i=0;
- QString cmpValue (operand);
+ TQString cmpValue (operand);
for(;;) { PSOperationMapping map = psMappings[i];
if (map.op == NULL) return PSO_Other;
@@ -1058,7 +1058,7 @@ PSOperation AIParserBase::getPSOperation (const char *operand)
}
CommentOperation AIParserBase::getCommentOperation (const char *command) {
- QString data (command);
+ TQString data (command);
signed int index;
@@ -1067,28 +1067,28 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) {
for(;;) {
CommentOperationMapping map = commentMappings[i];
if (map.op == NULL) return CO_Other;
- index = data.find (map.op);
+ index = data.tqfind (map.op);
if (index >= 0) return map.action;
i++;
}
}
-void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
+void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
qDebug ( "got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
arraytoa (transformData);
qDebug ("/got fill pattern");
}
-void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
+void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
qDebug ( "got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
arraytoa (transformData);
qDebug ("/got stroke pattern");
}
const char *AIParserBase::getValue (const char *input) {
- QString data(input);
+ TQString data(input);
- signed int index = data.find (':');
+ signed int index = data.tqfind (':');
if (index < 0) return "";
index++;
while (data.at(index) == ' ') index++;
@@ -1098,9 +1098,9 @@ const char *AIParserBase::getValue (const char *input) {
bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx, int &ury) {
if (input == NULL) return false;
- QString s(input);
- if (s.contains ("(atend)")) return false;
- QStringList values = QStringList::split (" ", input);
+ TQString s(input);
+ if (s.tqcontains ("(atend)")) return false;
+ TQStringList values = TQStringList::split (" ", input);
if (values.size() < 5) return false;
llx = values[1].toInt();
lly = values[2].toInt();
@@ -1113,8 +1113,8 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx
bool AIParserBase::getPoint (const char* input, int &x, int &y) {
if (input == NULL) return false;
- QString s(input);
- QStringList values = QStringList::split (" ", input);
+ TQString s(input);
+ TQStringList values = TQStringList::split (" ", input);
if (values.size() < 3) return false;
@@ -1139,20 +1139,20 @@ void AIParserBase::cleanupArrays()
AIElement elem (m_stack.top());
m_stack.pop();
- const QString &oldFont = elem.toReference();
+ const TQString &oldFont = elem.toReference();
AIElement elem2 (m_stack.top());
m_stack.pop();
- const QString &newFont = elem2.toReference();
+ const TQString &newFont = elem2.toReference();
AIElement elem3 (m_stack.top());
m_stack.pop();
- const QValueVector<AIElement> encodingData = elem3.toElementArray();
+ const TQValueVector<AIElement> encodingData = elem3.toElementArray();
if (m_textHandler) m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
} */
-void TextHandlerBase::gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
+void TextHandlerBase::gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
{
qDebug ("font encoding %s to %s",oldFontName, newFontName);
arraytoa (encodingData);
@@ -1164,7 +1164,7 @@ void TextHandlerBase::gotFontDefinition (const char*fontName, double size, doubl
qDebug ("font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align);
}
-void TextHandlerBase::gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode)
+void TextHandlerBase::gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode)
{
qDebug ("text block begin %d",mode);
arraytoa (transData);
@@ -1213,7 +1213,7 @@ const void elementtoa (const AIElement &/*data*/)
} */
}
-const void arraytoa (const QValueVector<AIElement> &/*data*/)
+const void arraytoa (const TQValueVector<AIElement> &/*data*/)
{
/* qDebug ("array size is %d ",data.size());
if (data.size() > 0)
@@ -1227,7 +1227,7 @@ const void arraytoa (const QValueVector<AIElement> &/*data*/)
} */
}
-const void stacktoa (const QValueStack<AIElement> &/*data*/)
+const void stacktoa (const TQValueStack<AIElement> &/*data*/)
{
/* qDebug ("stack size is %d",data.size());
if (data.size() > 0)
@@ -1241,7 +1241,7 @@ const void stacktoa (const QValueStack<AIElement> &/*data*/)
qDebug (">>>>>>>>>>>>>>>>>>"); */
}
-const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&/*data*/)
+const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&/*data*/)
{
/* qDebug ("stack size is %d",data.size());
diff --git a/filters/karbon/ai/aiparserbase.h b/filters/karbon/ai/aiparserbase.h
index 8d2633f3..14c00a14 100644
--- a/filters/karbon/ai/aiparserbase.h
+++ b/filters/karbon/ai/aiparserbase.h
@@ -22,19 +22,19 @@
#include "ailexer.h"
-#include <qstring.h>
-#include <qvaluestack.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluestack.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
#include "aielement.h"
#include "aicolor.h"
-const void arraytoa (const QValueVector<AIElement> &data);
+const void arraytoa (const TQValueVector<AIElement> &data);
const void elementtoa (const AIElement &data);
-const void stacktoa (const QValueStack<AIElement> &data);
-const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&data);
+const void stacktoa (const TQValueStack<AIElement> &data);
+const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&data);
class GStateHandlerBase;
class StructureHandlerBase;
@@ -209,9 +209,9 @@ typedef enum {
#define PatternTileFilledDefiniton "_"
#define TextSizeUnknown -1
-/* typedef QValueVector<AElement> ElementArray;
-typedef QValueStack<AIElement> ElementStack;
-typedef QValueStack<ElementArray> ElementArrayStack; */
+/* typedef TQValueVector<AElement> ElementArray;
+typedef TQValueStack<AIElement> ElementStack;
+typedef TQValueStack<ElementArray> ElementArrayStack; */
typedef struct {
PathElementType petype;
@@ -234,19 +234,19 @@ protected:
bool m_debug;
private:
bool m_ignoring;
- QValueStack<AIElement> m_stack;
- QValueStack<QValueVector<AIElement> > m_arrayStack;
- QValueStack<QValueVector<AIElement> > m_blockStack;
+ TQValueStack<AIElement> m_stack;
+ TQValueStack<TQValueVector<AIElement> > m_arrayStack;
+ TQValueStack<TQValueVector<AIElement> > m_blockStack;
DataSink m_sink;
- QValueList<QString> m_modules;
+ TQValueList<TQString> m_modules;
ContinuationMode m_continuationMode;
const double getDoubleValue(void);
const int getIntValue(void);
const bool getBoolValue(void);
- const QString getStringValue(void);
- const QString& getReferenceValue(void);
- const QString getOperatorValue(void);
+ const TQString getStringValue(void);
+ const TQString& getReferenceValue(void);
+ const TQString getOperatorValue(void);
/*Ai88*/ // void _handleSetDash();
/*Ai88*/ // void _handleGsaveIncludeDocument();
@@ -308,7 +308,7 @@ protected:
void gotArrayStart ();
void gotArrayEnd ();
void gotByte (uchar value);
- void gotByteArray (const QByteArray &data);
+ void gotByteArray (const TQByteArray &data);
GStateHandlerBase *m_gstateHandler;
StructureHandlerBase *m_structureHandler;
@@ -328,7 +328,7 @@ public:
AIParserBase();
~AIParserBase();
- bool parse (QIODevice& fin);
+ bool parse (TQIODevice& fin);
};
const void aiotoa (AIOperation &data);
@@ -342,15 +342,15 @@ class GStateHandlerBase
virtual void gotFillColor (AIColor &) {}
virtual void gotStrokeColor (AIColor &) {}
- virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
- virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
+ virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
+ virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
virtual void gotFlatness (double) {}
virtual void gotLineWidth (double) {}
virtual void gotLineCaps (int) {}
virtual void gotLineJoin (int) {}
virtual void gotMiterLimit (double) {}
virtual void gotWindingOrder (int) {}
- virtual void gotDash (const QValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
+ virtual void gotDash (const TQValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
};
class StructureHandlerBase {
@@ -401,7 +401,7 @@ class DocumentHandlerBase {
virtual void gotTemplate (const char *) {}
virtual void gotTitle (const char *) {}
virtual void gotCreator (const char *) {}
- virtual void gotPatternDefinition (const char */*name*/, const QValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
+ virtual void gotPatternDefinition (const char */*name*/, const TQValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
virtual void gotCreationDate (const char */*val1*/,const char */*val2*/) {}
virtual void gotProcessColors (int /*colors*/) {}
};
@@ -420,7 +420,7 @@ class EmbeddedHandlerBase {
EmbeddedHandlerBase() {}
virtual ~EmbeddedHandlerBase() {}
- virtual void gotGsaveIncludeDocument (const QValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
+ virtual void gotGsaveIncludeDocument (const TQValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
virtual void gotGrestore () {}
};
@@ -429,9 +429,9 @@ class TextHandlerBase {
TextHandlerBase() {}
virtual ~TextHandlerBase() {}
- virtual void gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName);
+ virtual void gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName);
virtual void gotFontDefinition (const char*fontName, double size, double leading, double kerning, TextAlign align);
- virtual void gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode);
+ virtual void gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode);
virtual void gotTextOutput (const char*text, int length=-1);
virtual void gotTextBlockEnd ();
};
diff --git a/filters/karbon/ai/karbonaiparserbase.cc b/filters/karbon/ai/karbonaiparserbase.cc
index 8c2b5a5f..77945723 100644
--- a/filters/karbon/ai/karbonaiparserbase.cc
+++ b/filters/karbon/ai/karbonaiparserbase.cc
@@ -25,7 +25,7 @@
#include <core/vclipgroup.h>
#include <core/vvisitor.h>
#include "aicolor.h"
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <commands/vtransformcmd.h>
#include <KoPageLayout.h>
@@ -90,7 +90,7 @@ void KarbonAIParserBase::parsingFinished(){
if (m_bbox.height() > 0. )
m_document->setHeight (m_bbox.height());
-/* QWMatrix matrix;
+/* TQWMatrix matrix;
matrix.translate (-m_bbox.x(),-m_bbox.y());
VTransformNodes translator (matrix);
@@ -101,8 +101,8 @@ void KarbonAIParserBase::parsingFinished(){
}
// generic
-QString KarbonAIParserBase::getParamList(Parameters& params){
- QString data("");
+TQString KarbonAIParserBase::getParamList(Parameters& params){
+ TQString data("");
Parameter *param;
@@ -450,7 +450,7 @@ void KarbonAIParserBase::doOutputCurrentPath2(PathOutputType type)
m_curKarbonPath = new VPath( 0L );
}
-bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
+bool KarbonAIParserBase::parse (TQIODevice& fin, TQDomDocument &doc)
{
bool res = AIParserBase::parse (fin);
@@ -461,7 +461,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
qDebug ("before save document");
doc = m_document->saveXML();
// add paper info, we always need custom for svg (Rob)
- QDomElement paper = doc.createElement( "PAPER" );
+ TQDomElement paper = doc.createElement( "PAPER" );
doc.documentElement().appendChild( paper );
paper.setAttribute( "format", PG_CUSTOM );
paper.setAttribute( "width", m_document->width() );
@@ -471,7 +471,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
}
else
{
- QDomDocument tempDoc;
+ TQDomDocument tempDoc;
doc = tempDoc;
}
diff --git a/filters/karbon/ai/karbonaiparserbase.h b/filters/karbon/ai/karbonaiparserbase.h
index 4b6f05a9..160fdc20 100644
--- a/filters/karbon/ai/karbonaiparserbase.h
+++ b/filters/karbon/ai/karbonaiparserbase.h
@@ -21,9 +21,9 @@
#define KARBONAIPARSERBASE_H
#include <aiparserbase.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qpair.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqpair.h>
#include "aicolor.h"
@@ -34,16 +34,16 @@
#include <core/vgroup.h>
#include <core/vfill.h>
#include <core/vstroke.h>
-#include <qdom.h>
+#include <tqdom.h>
-#include <qptrstack.h>
+#include <tqptrstack.h>
/**
*@author
*/
-typedef QPair<QString,QString> Parameter;
-typedef QPtrList<Parameter> Parameters;
-typedef QPtrList<PathElement> PathElements;
+typedef TQPair<TQString,TQString> Parameter;
+typedef TQPtrList<Parameter> Parameters;
+typedef TQPtrList<PathElement> PathElements;
typedef enum { POT_Filled = 1, POT_Stroked = 2, POT_FilledStroked = 3, POT_Clip = 4, POT_Ignore = 8, POT_Leave = -1, POT_Other = 0 } PathOutputType;
typedef enum { PTT_Output = 1, PTT_Combine = 2 } PathTransferType;
@@ -132,13 +132,13 @@ public:
KarbonAIParserBase();
~KarbonAIParserBase();
- bool parse (QIODevice& fin, QDomDocument &doc);
+ bool parse (TQIODevice& fin, TQDomDocument &doc);
private:
VPath *m_curKarbonPath;
VDocument *m_document;
VLayer *m_layer;
VPath *m_combination;
- QPtrStack<VGroup> m_groupStack;
+ TQPtrStack<VGroup> m_groupStack;
FillMode m_fm;
PathOutputType m_pot;
@@ -171,7 +171,7 @@ protected:
void parsingStarted();
void parsingFinished();
- QString getParamList(Parameters& params);
+ TQString getParamList(Parameters& params);
void gotPathElement (PathElement &element);
void gotFillPath (bool closed, bool reset, FillMode fm = FM_NonZero);