summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore')
-rw-r--r--lib/kofficecore/KoApplication.cpp30
-rw-r--r--lib/kofficecore/KoApplication.h5
-rw-r--r--lib/kofficecore/KoApplicationIface.cc30
-rw-r--r--lib/kofficecore/KoApplicationIface.h10
-rw-r--r--lib/kofficecore/KoChild.cpp126
-rw-r--r--lib/kofficecore/KoChild.h77
-rw-r--r--lib/kofficecore/KoContainerHandler.cpp202
-rw-r--r--lib/kofficecore/KoContainerHandler.h38
-rw-r--r--lib/kofficecore/KoDetailsPane.cpp192
-rw-r--r--lib/kofficecore/KoDetailsPane.h48
-rw-r--r--lib/kofficecore/KoDocument.cpp636
-rw-r--r--lib/kofficecore/KoDocument.h225
-rw-r--r--lib/kofficecore/KoDocumentChild.cpp136
-rw-r--r--lib/kofficecore/KoDocumentChild.h41
-rw-r--r--lib/kofficecore/KoDocumentIface.cc130
-rw-r--r--lib/kofficecore/KoDocumentIface.h92
-rw-r--r--lib/kofficecore/KoDocumentInfo.cpp242
-rw-r--r--lib/kofficecore/KoDocumentInfo.h190
-rw-r--r--lib/kofficecore/KoDocumentInfoDlg.cpp214
-rw-r--r--lib/kofficecore/KoDocumentInfoDlg.h10
-rw-r--r--lib/kofficecore/KoDocument_p.h1
-rw-r--r--lib/kofficecore/KoDom.cpp6
-rw-r--r--lib/kofficecore/KoDom.h22
-rw-r--r--lib/kofficecore/KoFactory.cpp4
-rw-r--r--lib/kofficecore/KoFactory.h3
-rw-r--r--lib/kofficecore/KoFileDialog.cpp26
-rw-r--r--lib/kofficecore/KoFileDialog.h15
-rw-r--r--lib/kofficecore/KoFilter.cpp38
-rw-r--r--lib/kofficecore/KoFilter.h49
-rw-r--r--lib/kofficecore/KoFilterChain.cpp206
-rw-r--r--lib/kofficecore/KoFilterChain.h102
-rw-r--r--lib/kofficecore/KoFilterManager.cpp216
-rw-r--r--lib/kofficecore/KoFilterManager.h43
-rw-r--r--lib/kofficecore/KoFilterManager_p.h13
-rw-r--r--lib/kofficecore/KoFrame.cpp152
-rw-r--r--lib/kofficecore/KoFrame.h21
-rw-r--r--lib/kofficecore/KoGenStyles.cpp150
-rw-r--r--lib/kofficecore/KoGenStyles.h118
-rw-r--r--lib/kofficecore/KoGlobal.cpp70
-rw-r--r--lib/kofficecore/KoGlobal.h26
-rw-r--r--lib/kofficecore/KoMainWindow.cpp300
-rw-r--r--lib/kofficecore/KoMainWindow.h23
-rw-r--r--lib/kofficecore/KoMainWindowIface.cc12
-rw-r--r--lib/kofficecore/KoMainWindowIface.h4
-rw-r--r--lib/kofficecore/KoOasisLoadingContext.cpp48
-rw-r--r--lib/kofficecore/KoOasisLoadingContext.h26
-rw-r--r--lib/kofficecore/KoOasisSettings.cpp82
-rw-r--r--lib/kofficecore/KoOasisSettings.h46
-rw-r--r--lib/kofficecore/KoOasisStore.cpp50
-rw-r--r--lib/kofficecore/KoOasisStore.h10
-rw-r--r--lib/kofficecore/KoOasisStyles.cpp348
-rw-r--r--lib/kofficecore/KoOasisStyles.h122
-rw-r--r--lib/kofficecore/KoOpenPane.cpp120
-rw-r--r--lib/kofficecore/KoOpenPane.h29
-rw-r--r--lib/kofficecore/KoPageLayout.cpp64
-rw-r--r--lib/kofficecore/KoPageLayout.h46
-rw-r--r--lib/kofficecore/KoPicture.cpp60
-rw-r--r--lib/kofficecore/KoPicture.h70
-rw-r--r--lib/kofficecore/KoPictureBase.cpp44
-rw-r--r--lib/kofficecore/KoPictureBase.h40
-rw-r--r--lib/kofficecore/KoPictureClipart.cpp48
-rw-r--r--lib/kofficecore/KoPictureClipart.h34
-rw-r--r--lib/kofficecore/KoPictureCollection.cpp62
-rw-r--r--lib/kofficecore/KoPictureCollection.h36
-rw-r--r--lib/kofficecore/KoPictureEps.cpp108
-rw-r--r--lib/kofficecore/KoPictureEps.h48
-rw-r--r--lib/kofficecore/KoPictureImage.cpp62
-rw-r--r--lib/kofficecore/KoPictureImage.h40
-rw-r--r--lib/kofficecore/KoPictureKey.cpp42
-rw-r--r--lib/kofficecore/KoPictureKey.h46
-rw-r--r--lib/kofficecore/KoPictureShared.cpp126
-rw-r--r--lib/kofficecore/KoPictureShared.h76
-rw-r--r--lib/kofficecore/KoPictureWmf.cpp44
-rw-r--r--lib/kofficecore/KoPictureWmf.h38
-rw-r--r--lib/kofficecore/KoPoint.h24
-rw-r--r--lib/kofficecore/KoQueryTrader.cpp38
-rw-r--r--lib/kofficecore/KoQueryTrader.h46
-rw-r--r--lib/kofficecore/KoRect.cpp26
-rw-r--r--lib/kofficecore/KoRect.h22
-rw-r--r--lib/kofficecore/KoSetPropCommand.h8
-rw-r--r--lib/kofficecore/KoSize.h32
-rw-r--r--lib/kofficecore/KoSpeaker.cpp294
-rw-r--r--lib/kofficecore/KoSpeaker.h39
-rw-r--r--lib/kofficecore/KoStyleStack.cpp108
-rw-r--r--lib/kofficecore/KoStyleStack.h42
-rw-r--r--lib/kofficecore/KoTemplates.cpp130
-rw-r--r--lib/kofficecore/KoTemplates.h76
-rw-r--r--lib/kofficecore/KoUnit.cpp58
-rw-r--r--lib/kofficecore/KoUnit.h20
-rw-r--r--lib/kofficecore/KoView.cpp248
-rw-r--r--lib/kofficecore/KoView.h72
-rw-r--r--lib/kofficecore/KoViewIface.cc14
-rw-r--r--lib/kofficecore/KoViewIface.h6
-rw-r--r--lib/kofficecore/KoXmlNS.h4
-rw-r--r--lib/kofficecore/KoXmlReader.cpp424
-rw-r--r--lib/kofficecore/KoXmlReader.h120
-rw-r--r--lib/kofficecore/Koversiondialog.cpp54
-rw-r--r--lib/kofficecore/Koversiondialog.h24
-rw-r--r--lib/kofficecore/THOUGHTS10
-rw-r--r--lib/kofficecore/kkbdaccessextensions.cpp276
-rw-r--r--lib/kofficecore/kkbdaccessextensions.h48
-rw-r--r--lib/kofficecore/koDetailsPaneBase.ui30
-rw-r--r--lib/kofficecore/koDocumentInfoAboutWidget.ui70
-rw-r--r--lib/kofficecore/koDocumentInfoAuthorWidget.ui48
-rw-r--r--lib/kofficecore/koDocumentInfoUserMetadataWidget.ui26
-rw-r--r--lib/kofficecore/koOpenPaneBase.ui22
-rw-r--r--lib/kofficecore/koffice_export.h2
-rw-r--r--lib/kofficecore/priorityqueue.h26
-rw-r--r--lib/kofficecore/tests/filter_graph.cpp44
-rw-r--r--lib/kofficecore/tests/filterchain_test.cpp8
-rw-r--r--lib/kofficecore/tests/kodomtest.cpp46
-rw-r--r--lib/kofficecore/tests/kogenstylestest.cpp58
-rw-r--r--lib/kofficecore/tests/kooasissettingstest.cpp6
-rw-r--r--lib/kofficecore/tests/kooasisstoretest.cpp10
-rw-r--r--lib/kofficecore/tests/kopointtest.cpp10
-rw-r--r--lib/kofficecore/tests/korecttest.cpp8
-rw-r--r--lib/kofficecore/tests/koxmlreadertest.cpp820
-rw-r--r--lib/kofficecore/tests/priorityqueue_test.cpp8
118 files changed, 4923 insertions, 4891 deletions
diff --git a/lib/kofficecore/KoApplication.cpp b/lib/kofficecore/KoApplication.cpp
index 3f2f6b23..2be62bbe 100644
--- a/lib/kofficecore/KoApplication.cpp
+++ b/lib/kofficecore/KoApplication.cpp
@@ -19,8 +19,8 @@
#include "KoApplication.h"
#include <config.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <dcopclient.h>
#include <KoApplicationIface.h>
#include <KoQueryTrader.h>
@@ -106,9 +106,9 @@ bool KoApplication::start()
int argsCount = args->count();
KCmdLineArgs *koargs = KCmdLineArgs::parsedArgs("koffice");
- QCString dpiValues = koargs->getOption( "dpi" );
+ TQCString dpiValues = koargs->getOption( "dpi" );
if ( !dpiValues.isEmpty() ) {
- int sep = dpiValues.find( QRegExp( "[x, ]" ) );
+ int sep = dpiValues.tqfind( TQRegExp( "[x, ]" ) );
int dpiX;
int dpiY = 0;
bool ok = true;
@@ -132,7 +132,7 @@ bool KoApplication::start()
return false;
KoMainWindow *shell = new KoMainWindow( doc->instance() );
shell->show();
- QObject::connect(doc, SIGNAL(sigProgress(int)), shell, SLOT(slotProgress(int)));
+ TQObject::connect(doc, TQT_SIGNAL(sigProgress(int)), shell, TQT_SLOT(slotProgress(int)));
// for initDoc to fill in the recent docs list
// and for KoDocument::slotStarted
doc->addShell( shell );
@@ -144,7 +144,7 @@ bool KoApplication::start()
}
// FIXME This needs to be moved someplace else
- QObject::disconnect(doc, SIGNAL(sigProgress(int)), shell, SLOT(slotProgress(int)));
+ TQObject::disconnect(doc, TQT_SIGNAL(sigProgress(int)), shell, TQT_SLOT(slotProgress(int)));
} else {
bool print = koargs->isSet("print");
bool doTemplate = koargs->isSet("template");
@@ -166,24 +166,24 @@ bool KoApplication::start()
shell->show();
// are we just trying to open a template?
if ( doTemplate ) {
- QStringList paths;
- if ( args->url(i).isLocalFile() && QFile::exists(args->url(i).path()) )
+ TQStringList paths;
+ if ( args->url(i).isLocalFile() && TQFile::exists(args->url(i).path()) )
{
- paths << QString(args->url(i).path());
+ paths << TQString(args->url(i).path());
kdDebug(30003) << "using full path..." << endl;
} else {
- QString desktopName(args->arg(i));
- QString appName = KGlobal::instance()->instanceName();
+ TQString desktopName(args->arg(i));
+ TQString appName = KGlobal::instance()->instanceName();
paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/*/" + desktopName );
if ( paths.isEmpty()) {
paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName );
}
if ( paths.isEmpty()) {
- KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) );
+ KMessageBox::error(0L, i18n("No template found for: %1 ").tqarg(desktopName) );
delete shell;
} else if ( paths.count() > 1 ) {
- KMessageBox::error(0L, i18n("Too many templates found for: %1").arg(desktopName) );
+ KMessageBox::error(0L, i18n("Too many templates found for: %1").tqarg(desktopName) );
delete shell;
}
}
@@ -193,7 +193,7 @@ bool KoApplication::start()
templateBase.setPath(paths[0]);
KDesktopFile templateInfo(paths[0]);
- QString templateName = templateInfo.readURL();
+ TQString templateName = templateInfo.readURL();
KURL templateURL;
templateURL.setPath( templateBase.directory() + "/" + templateName );
if ( shell->openDocument(doc, templateURL )) {
@@ -203,7 +203,7 @@ bool KoApplication::start()
kdDebug(30003) << "Template loaded..." << endl;
n++;
} else {
- KMessageBox::error(0L, i18n("Template %1 failed to load.").arg(templateURL.prettyURL()) );
+ KMessageBox::error(0L, i18n("Template %1 failed to load.").tqarg(templateURL.prettyURL()) );
delete shell;
}
}
diff --git a/lib/kofficecore/KoApplication.h b/lib/kofficecore/KoApplication.h
index ecd9b943..d6f44929 100644
--- a/lib/kofficecore/KoApplication.h
+++ b/lib/kofficecore/KoApplication.h
@@ -37,11 +37,12 @@ class KoApplicationPrivate;
* can find their images etc.
*
* If the last mainwindow becomes closed, KoApplication automatically
- * calls QApplication::quit.
+ * calls TQApplication::quit.
*/
class KOFFICECORE_EXPORT KoApplication : public KApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ public:
* Parses command line arguments and creates the initial shells and docs
* from them (or an empty doc if no cmd-line argument is specified ).
*
- * You must call this method directly before calling QApplication::exec.
+ * You must call this method directly before calling TQApplication::exec.
*
* It is valid behaviour not to call this method at all. In this case you
* have to process your command line parameters by yourself.
diff --git a/lib/kofficecore/KoApplicationIface.cc b/lib/kofficecore/KoApplicationIface.cc
index eb6f4d2d..042a39a8 100644
--- a/lib/kofficecore/KoApplicationIface.cc
+++ b/lib/kofficecore/KoApplicationIface.cc
@@ -40,41 +40,41 @@ KoApplicationIface::~KoApplicationIface()
{
}
-DCOPRef KoApplicationIface::createDocument( const QString &nativeFormat )
+DCOPRef KoApplicationIface::createDocument( const TQString &nativeFormat )
{
KoDocumentEntry entry = KoDocumentEntry::queryByMimeType( nativeFormat );
if ( entry.isEmpty() )
{
- KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).arg( nativeFormat ) );
+ KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).tqarg( nativeFormat ) );
return DCOPRef();
}
KoDocument* doc = entry.createDoc( 0 );
return DCOPRef( kapp->dcopClient()->appId(), doc->dcopObject()->objId() );
}
-QValueList<DCOPRef> KoApplicationIface::getDocuments()
+TQValueList<DCOPRef> KoApplicationIface::getDocuments()
{
- QValueList<DCOPRef> lst;
- QPtrList<KoDocument> *documents = KoDocument::documentList();
+ TQValueList<DCOPRef> lst;
+ TQPtrList<KoDocument> *documents = KoDocument::documentList();
if ( documents )
{
- QPtrListIterator<KoDocument> it( *documents );
+ TQPtrListIterator<KoDocument> it( *documents );
for (; it.current(); ++it )
lst.append( DCOPRef( kapp->dcopClient()->appId(), it.current()->dcopObject()->objId() ) );
}
return lst;
}
-QValueList<DCOPRef> KoApplicationIface::getViews()
+TQValueList<DCOPRef> KoApplicationIface::getViews()
{
- QValueList<DCOPRef> lst;
- QPtrList<KoDocument> *documents = KoDocument::documentList();
+ TQValueList<DCOPRef> lst;
+ TQPtrList<KoDocument> *documents = KoDocument::documentList();
if ( documents )
{
- QPtrListIterator<KoDocument> it( *documents );
+ TQPtrListIterator<KoDocument> it( *documents );
for (; it.current(); ++it )
{
- QPtrListIterator<KoView> itview( it.current()->views() );
+ TQPtrListIterator<KoView> itview( it.current()->views() );
for ( ; itview.current(); ++itview )
lst.append( DCOPRef( kapp->dcopClient()->appId(), itview.current()->dcopObject()->objId() ) );
}
@@ -82,13 +82,13 @@ QValueList<DCOPRef> KoApplicationIface::getViews()
return lst;
}
-QValueList<DCOPRef> KoApplicationIface::getWindows()
+TQValueList<DCOPRef> KoApplicationIface::getWindows()
{
- QValueList<DCOPRef> lst;
- QPtrList<KMainWindow> *mainWindows = KMainWindow::memberList;
+ TQValueList<DCOPRef> lst;
+ TQPtrList<KMainWindow> *mainWindows = KMainWindow::memberList;
if ( mainWindows )
{
- QPtrListIterator<KMainWindow> it( *mainWindows );
+ TQPtrListIterator<KMainWindow> it( *mainWindows );
for (; it.current(); ++it )
lst.append( DCOPRef( kapp->dcopClient()->appId(),
static_cast<KoMainWindow *>(it.current())->dcopObject()->objId() ) );
diff --git a/lib/kofficecore/KoApplicationIface.h b/lib/kofficecore/KoApplicationIface.h
index ac72f09a..6d8b9e99 100644
--- a/lib/kofficecore/KoApplicationIface.h
+++ b/lib/kofficecore/KoApplicationIface.h
@@ -21,7 +21,7 @@
#define __KoApplicationIface_h__
#include <dcopobject.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dcopref.h>
/**
@@ -40,26 +40,26 @@ k_dcop:
* Creates a new document for the given native mimetype
* Use it to create a shell and to load an existing file, if any
*/
- DCOPRef createDocument( const QString &nativeFormat );
+ DCOPRef createDocument( const TQString &nativeFormat );
/**
* @return a list of references to all the documents
* (see KoDocumentIface)
*/
- QValueList<DCOPRef> getDocuments();
+ TQValueList<DCOPRef> getDocuments();
/**
* @return a list of references to all the views
* (see KoViewIface)
* Convenience method to avoid iterating over all documents to get all the views.
*/
- QValueList<DCOPRef> getViews();
+ TQValueList<DCOPRef> getViews();
/**
* @return a list of references to all the windows
* (see KoMainWindowIface)
*/
- QValueList<DCOPRef> getWindows();
+ TQValueList<DCOPRef> getWindows();
};
#endif
diff --git a/lib/kofficecore/KoChild.cpp b/lib/kofficecore/KoChild.cpp
index 8207d086..85d54939 100644
--- a/lib/kofficecore/KoChild.cpp
+++ b/lib/kofficecore/KoChild.cpp
@@ -19,7 +19,7 @@
#include <KoChild.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
@@ -34,24 +34,24 @@ public:
{
}
- QRect m_geometry;
+ TQRect m_tqgeometry;
double m_rotation;
double m_shearX;
double m_shearY;
- QPoint m_rotationPoint;
+ TQPoint m_rotationPoint;
double m_scaleX;
double m_scaleY;
- QWMatrix m_matrix;
+ TQWMatrix m_matrix;
bool m_lock;
- QPointArray m_old;
+ TQPointArray m_old;
bool m_transparent;
int m_contentsX;
int m_contentsY;
};
-KoChild::KoChild( QObject *parent, const char *name )
-: QObject( parent, name )
+KoChild::KoChild( TQObject *tqparent, const char *name )
+: TQObject( tqparent, name )
{
d = new KoChildPrivate;
@@ -69,19 +69,19 @@ KoChild::~KoChild()
delete d;
}
-void KoChild::setGeometry( const QRect &rect, bool noEmit )
+void KoChild::setGeometry( const TQRect &rect, bool noEmit )
{
if ( !d->m_lock )
d->m_old = framePointArray();
- d->m_geometry = rect;
+ d->m_tqgeometry = rect;
// Embedded objects should have a minimum size of 3, so they can be selected
- if( d->m_geometry.width() < 3 )
- d->m_geometry.setWidth( 3 );
+ if( d->m_tqgeometry.width() < 3 )
+ d->m_tqgeometry.setWidth( 3 );
- if( d->m_geometry.height() < 3 )
- d->m_geometry.setHeight( 3 );
+ if( d->m_tqgeometry.height() < 3 )
+ d->m_tqgeometry.setHeight( 3 );
updateMatrix();
@@ -89,27 +89,27 @@ void KoChild::setGeometry( const QRect &rect, bool noEmit )
emit changed( this );
}
-QRect KoChild::geometry() const
+TQRect KoChild::tqgeometry() const
{
- return d->m_geometry;
+ return d->m_tqgeometry;
}
-QRegion KoChild::region( const QWMatrix &matrix ) const
+TQRegion KoChild::region( const TQWMatrix &matrix ) const
{
- return QRegion( pointArray( matrix ) );
+ return TQRegion( pointArray( matrix ) );
}
-QPointArray KoChild::pointArray( const QWMatrix &matrix ) const
+TQPointArray KoChild::pointArray( const TQWMatrix &matrix ) const
{
- return pointArray( QRect( 0, 0, d->m_geometry.width(), d->m_geometry.height() ), matrix );
+ return pointArray( TQRect( 0, 0, d->m_tqgeometry.width(), d->m_tqgeometry.height() ), matrix );
}
-//bool KoChild::contains( const QPoint &point ) const
+//bool KoChild::tqcontains( const TQPoint &point ) const
//{
-// return region().contains( point );
+// return region().tqcontains( point );
//}
-QRect KoChild::boundingRect() const
+TQRect KoChild::boundingRect() const
{
return pointArray().boundingRect();
}
@@ -119,13 +119,13 @@ bool KoChild::isRectangle() const
return !( d->m_shearX != 0.0 || d->m_shearY != 0.0 || d->m_rotation != 0.0 );
}
-void KoChild::setClipRegion( QPainter &painter, bool combine )
+void KoChild::setClipRegion( TQPainter &painter, bool combine )
{
painter.setClipping( true );
if ( combine && !painter.clipRegion().isEmpty() )
- painter.setClipRegion( region( painter.worldMatrix() ).intersect( painter.clipRegion() ) );
+ painter.setClipRegion( region( painter.tqworldMatrix() ).intersect( painter.clipRegion() ) );
else
- painter.setClipRegion( region( painter.worldMatrix() ) );
+ painter.setClipRegion( region( painter.tqworldMatrix() ) );
}
void KoChild::setScaling( double x, double y )
@@ -197,7 +197,7 @@ double KoChild::rotation() const
return d->m_rotation;
}
-void KoChild::setRotationPoint( const QPoint &pos )
+void KoChild::setRotationPoint( const TQPoint &pos )
{
if ( !d->m_lock )
d->m_old = framePointArray();
@@ -209,16 +209,16 @@ void KoChild::setRotationPoint( const QPoint &pos )
emit changed( this );
}
-QPoint KoChild::rotationPoint() const
+TQPoint KoChild::rotationPoint() const
{
return d->m_rotationPoint;
}
-void KoChild::transform( QPainter &painter )
+void KoChild::transform( TQPainter &painter )
{
setClipRegion( painter, true );
- QWMatrix m = painter.worldMatrix();
+ TQWMatrix m = painter.tqworldMatrix();
m = d->m_matrix * m;
m.scale( d->m_scaleX, d->m_scaleY );
painter.setWorldMatrix( m );
@@ -230,37 +230,37 @@ void KoChild::setContentsPos( int x, int y )
d->m_contentsY = y;
}
-QRect KoChild::contentRect() const
+TQRect KoChild::contentRect() const
{
- return QRect( d->m_contentsX, d->m_contentsY, int(d->m_geometry.width() / d->m_scaleX),
- int(d->m_geometry.height() / d->m_scaleY) );
+ return TQRect( d->m_contentsX, d->m_contentsY, int(d->m_tqgeometry.width() / d->m_scaleX),
+ int(d->m_tqgeometry.height() / d->m_scaleY) );
}
-QPointArray KoChild::framePointArray( const QWMatrix &matrix ) const
+TQPointArray KoChild::framePointArray( const TQWMatrix &matrix ) const
{
- return pointArray( QRect( -6, -6, d->m_geometry.width() + 12, d->m_geometry.height() + 12 ), matrix );
+ return pointArray( TQRect( -6, -6, d->m_tqgeometry.width() + 12, d->m_tqgeometry.height() + 12 ), matrix );
}
-QRegion KoChild::frameRegion( const QWMatrix &matrix, bool solid ) const
+TQRegion KoChild::frameRegion( const TQWMatrix &matrix, bool solid ) const
{
- const QPointArray arr = framePointArray( matrix );
- const QRegion frameReg( arr );
+ const TQPointArray arr = framePointArray( matrix );
+ const TQRegion frameReg( arr );
if ( solid )
return frameReg;
- const QRegion reg = region( matrix );
+ const TQRegion reg = region( matrix );
return frameReg.subtract( reg );
}
-QPointArray KoChild::pointArray( const QRect &r, const QWMatrix &matrix ) const
+TQPointArray KoChild::pointArray( const TQRect &r, const TQWMatrix &matrix ) const
{
- QPoint topleft = d->m_matrix.map( QPoint( r.left(), r.top() ) );
- QPoint topright = d->m_matrix.map( QPoint( r.right(), r.top() ) );
- QPoint bottomleft = d->m_matrix.map( QPoint( r.left(), r.bottom() ) );
- QPoint bottomright = d->m_matrix.map( QPoint( r.right(), r.bottom() ) );
+ TQPoint topleft = d->m_matrix.map( TQPoint( r.left(), r.top() ) );
+ TQPoint topright = d->m_matrix.map( TQPoint( r.right(), r.top() ) );
+ TQPoint bottomleft = d->m_matrix.map( TQPoint( r.left(), r.bottom() ) );
+ TQPoint bottomright = d->m_matrix.map( TQPoint( r.right(), r.bottom() ) );
- QPointArray arr( 4 );
+ TQPointArray arr( 4 );
arr.setPoint( 0, topleft );
arr.setPoint( 1, topright );
arr.setPoint( 2, bottomright );
@@ -274,21 +274,21 @@ QPointArray KoChild::pointArray( const QRect &r, const QWMatrix &matrix ) const
void KoChild::updateMatrix()
{
- QWMatrix r;
+ TQWMatrix r;
r.rotate( - d->m_rotation );
- QPoint p = r.map( QPoint( d->m_rotationPoint.x(),
+ TQPoint p = r.map( TQPoint( d->m_rotationPoint.x(),
d->m_rotationPoint.y() ) );
- QWMatrix m;
+ TQWMatrix m;
m.rotate( d->m_rotation );
- m.translate( -d->m_rotationPoint.x() + d->m_geometry.x(), -d->m_rotationPoint.y() + d->m_geometry.y() );
+ m.translate( -d->m_rotationPoint.x() + d->m_tqgeometry.x(), -d->m_rotationPoint.y() + d->m_tqgeometry.y() );
m.translate( p.x(), p.y() );
m.shear( d->m_shearX, d->m_shearY );
d->m_matrix = m;
}
-QWMatrix KoChild::matrix() const
+TQWMatrix KoChild::matrix() const
{
return d->m_matrix;
}
@@ -316,9 +316,9 @@ bool KoChild::locked() const
return d->m_lock;
}
-QPointArray KoChild::oldPointArray( const QWMatrix &matrix )
+TQPointArray KoChild::oldPointArray( const TQWMatrix &matrix )
{
- QPointArray arr = d->m_old;
+ TQPointArray arr = d->m_old;
for( int i = 0; i < 4; ++i )
arr.setPoint( i, matrix.map( arr.point( i ) ) );
@@ -336,28 +336,28 @@ bool KoChild::isTransparent() const
return d->m_transparent;
}
-KoChild::Gadget KoChild::gadgetHitTest( const QPoint &p )
+KoChild::Gadget KoChild::gadgetHitTest( const TQPoint &p )
{
- if ( !frameRegion().contains( p ) )
+ if ( !frameRegion().tqcontains( p ) )
return NoGadget;
- if ( QRegion( pointArray( QRect( -5, -5, 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, -5, 5, 5 ) ) ).tqcontains( p ) )
return TopLeft;
- if ( QRegion( pointArray( QRect( d->m_geometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, -5, 5, 5 ) ) ).tqcontains( p ) )
return TopMid;
- if ( QRegion( pointArray( QRect( d->m_geometry.width(), -5, 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), -5, 5, 5 ) ) ).tqcontains( p ) )
return TopRight;
- if ( QRegion( pointArray( QRect( -5, d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).tqcontains( p ) )
return MidLeft;
- if ( QRegion( pointArray( QRect( -5, d->m_geometry.height(), 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
return BottomLeft;
- if ( QRegion( pointArray( QRect( d->m_geometry.width() / 2 - 3,
- d->m_geometry.height(), 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3,
+ d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
return BottomMid;
- if ( QRegion( pointArray( QRect( d->m_geometry.width(), d->m_geometry.height(), 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
return BottomRight;
- if ( QRegion( pointArray( QRect( d->m_geometry.width(),
- d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(),
+ d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).tqcontains( p ) )
return MidRight;
return Move;
diff --git a/lib/kofficecore/KoChild.h b/lib/kofficecore/KoChild.h
index 26ad4a08..64f41064 100644
--- a/lib/kofficecore/KoChild.h
+++ b/lib/kofficecore/KoChild.h
@@ -19,18 +19,18 @@
#ifndef __koChild_h__
#define __koChild_h__
-#include <qobject.h>
-#include <qwmatrix.h>
+#include <tqobject.h>
+#include <tqwmatrix.h>
#include <koffice_export.h>
/**
- * KoChild is an abstract base class that represents the geometry
+ * KoChild is an abstract base class that represents the tqgeometry
* associated with an embedded document. In general it handles its position
- * relative to the embedded document's parent.
+ * relative to the embedded document's tqparent.
*
* In detail it handles size, matrix operations and can give you
* a clip region. It can deal with scaling, rotation etc. because it
- * makes heavy usage of QWMatrix.
+ * makes heavy usage of TQWMatrix.
*
* After applying the matrix, viewGeometry() applies zooming, but can be
* reimplemented to also apply e.g. some translation by the application
@@ -38,9 +38,10 @@
*
* @see KoDocumentChild KoViewChild
*/
-class KOFFICECORE_EXPORT KoChild : public QObject
+class KOFFICECORE_EXPORT KoChild : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -55,54 +56,54 @@ public:
enum Gadget { NoGadget, TopLeft, TopMid, TopRight, MidLeft, MidRight,
BottomLeft, BottomMid, BottomRight, Move };
- KoChild( QObject *parent = 0, const char *name = 0 );
+ KoChild( TQObject *tqparent = 0, const char *name = 0 );
virtual ~KoChild();
/**
- * Sets a new geometry for this child document.
+ * Sets a new tqgeometry for this child document.
* Use noEmit = true if you do not want the 'changed'-signal to be emitted
*/
- void setGeometry( const QRect &rect, bool noEmit = false );
+ void setGeometry( const TQRect &rect, bool noEmit = false );
/**
* @return the rectangle that would be used to display this
* child document if the child is not rotated or
* subject to some other geometric transformation.
- * The rectangle is in the coordinate system of the parent,
+ * The rectangle is in the coordinate system of the tqparent,
* using unzoomed coordinates in points.
*
* @see #setGeometry
*/
- QRect geometry() const;
+ TQRect tqgeometry() const;
/**
* @return the region of this child part relative to the
- * coordinate system of the parent.
+ * coordinate system of the tqparent.
* The region is transformed with the passed
* matrix.
*/
- virtual QRegion region( const QWMatrix& = QWMatrix() ) const;
+ virtual TQRegion region( const TQWMatrix& = TQWMatrix() ) const;
/**
* @return the polygon which surrounds the child part. The points
- * are in coordinates of the parent.
+ * are in coordinates of the tqparent.
* The points are transformed with the
* passed matrix.
*/
- virtual QPointArray pointArray( const QWMatrix &matrix = QWMatrix() ) const;
+ virtual TQPointArray pointArray( const TQWMatrix &matrix = TQWMatrix() ) const;
/**
* Tests whether the part contains a certain point. The point is
- * in the coordinate system of the parent.
+ * in the coordinate system of the tqparent.
*/
- //virtual bool contains( const QPoint& ) const;
+ //virtual bool tqcontains( const TQPoint& ) const;
/**
* @return the effective bounding rect after all transformations.
* The coordinates of the rectangle are in the coordinate system
- * of the parent.
+ * of the tqparent.
*/
- QRect boundingRect() const;
+ TQRect boundingRect() const;
/**
* Scales the content of the child part. However, that does not
@@ -148,16 +149,16 @@ public:
/**
* Sets the center of the rotation to the point @p pos.
*/
- virtual void setRotationPoint( const QPoint& pos );
+ virtual void setRotationPoint( const TQPoint& pos );
/**
* @return the center of the rotation
*/
- virtual QPoint rotationPoint() const;
+ virtual TQPoint rotationPoint() const;
/**
* @return true if the child part is an orthogonal rectangle relative
- * to its parents coordinate system.
+ * to its tqparents coordinate system.
*/
bool isRectangle() const;
@@ -170,14 +171,14 @@ public:
* of the current region with the childs region or whether only
* the childs region is set.
*/
- virtual void setClipRegion( QPainter& painter, bool combine = true );
+ virtual void setClipRegion( TQPainter& painter, bool combine = true );
/**
* Transforms the painter (its worldmatrix and the clipping)
* in such a way that the painter can be passed to the child part
* for drawing.
*/
- virtual void transform( QPainter& painter );
+ virtual void transform( TQPainter& painter );
/**
* Sets the position of the content relative to the child frame.
@@ -188,25 +189,25 @@ public:
/**
* @return the contents rectangle that is visible.
- * This value depends on the scaling and the geometry.
+ * This value depends on the scaling and the tqgeometry.
* This is the value that is passed to KoDocument::paintContent.
*
- * @see #xScaling #geometry
+ * @see #xScaling #tqgeometry
*/
- virtual QRect contentRect() const;
+ virtual TQRect contentRect() const;
/**
* @return the region of the child frame.
* If solid is set to true the complete area of the child region
* is returned, otherwise only the child border is returned.
*/
- virtual QRegion frameRegion( const QWMatrix& matrix = QWMatrix(), bool solid = false ) const;
+ virtual TQRegion frameRegion( const TQWMatrix& matrix = TQWMatrix(), bool solid = false ) const;
/**
- * @return the frame geometry including a border (6 pixels) as a point
+ * @return the frame tqgeometry including a border (6 pixels) as a point
* array with 4 points, one for each corner, transformed by given matrix.
*/
- virtual QPointArray framePointArray( const QWMatrix &matrix = QWMatrix() ) const;
+ virtual TQPointArray framePointArray( const TQWMatrix &matrix = TQWMatrix() ) const;
/**
* @return the current transformation of this child as matrix.
@@ -214,7 +215,7 @@ public:
*
* @see #updateMatrix
*/
- virtual QWMatrix matrix() const;
+ virtual TQWMatrix matrix() const;
/**
* Locks this child and stores the current transformation.
@@ -233,11 +234,11 @@ public:
void unlock();
/**
- * If the child is locked, geometry changes
+ * If the child is locked, tqgeometry changes
* (including scaling, rotation, ...) are not backed up.
*
* As long as this child is locked, the backed up
- * geometry state can be recovered with oldPointArray.
+ * tqgeometry state can be recovered with oldPointArray.
*
* @return true when this child is locked.
*
@@ -246,9 +247,9 @@ public:
bool locked() const;
/**
- * @return the backed up geometry transformed by given matrix.
+ * @return the backed up tqgeometry transformed by given matrix.
*/
- virtual QPointArray oldPointArray( const QWMatrix &matrix );
+ virtual TQPointArray oldPointArray( const TQWMatrix &matrix );
/**
* Marks this child as either transparent or not.
@@ -260,7 +261,7 @@ public:
virtual void setTransparent( bool transparent );
/**
- * It might be interesting for view updates and repainting in general
+ * It might be interesting for view updates and tqrepainting in general
* whether a child is transparent or not.
* @return true when this child is marked as transparent.
*/
@@ -275,7 +276,7 @@ public:
*
* @see #Gadget
*/
- virtual Gadget gadgetHitTest( const QPoint& p );
+ virtual Gadget gadgetHitTest( const TQPoint& p );
signals:
@@ -295,7 +296,7 @@ protected:
* @param matrix the transformation of r.
* @param r the rectangle for which the point array should be created.
*/
- virtual QPointArray pointArray( const QRect& r, const QWMatrix& matrix = QWMatrix() ) const;
+ virtual TQPointArray pointArray( const TQRect& r, const TQWMatrix& matrix = TQWMatrix() ) const;
/**
* Stores the current transformation of this child into a matrix.
diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp
index 78060592..1f21df24 100644
--- a/lib/kofficecore/KoContainerHandler.cpp
+++ b/lib/kofficecore/KoContainerHandler.cpp
@@ -23,7 +23,7 @@
#include <kcursor.h>
#include <kdebug.h>
-KoEventHandler::KoEventHandler( QObject* target )
+KoEventHandler::KoEventHandler( TQObject* target )
{
m_target = target;
@@ -34,7 +34,7 @@ KoEventHandler::~KoEventHandler()
{
}
-QObject* KoEventHandler::target()
+TQObject* KoEventHandler::target()
{
return m_target;
}
@@ -43,11 +43,11 @@ QObject* KoEventHandler::target()
class KoPartResizeHandlerPrivate {
public:
- KoPartResizeHandlerPrivate( const QWMatrix& matrix, KoView *view, KoChild* child,
- KoChild::Gadget gadget, const QPoint& point ) :
+ KoPartResizeHandlerPrivate( const TQWMatrix& matrix, KoView *view, KoChild* child,
+ KoChild::Gadget gadget, const TQPoint& point ) :
m_gadget(gadget), m_view(view), m_child(child), m_parentMatrix(matrix) {
- m_geometryStart = child->geometry();
+ m_tqgeometryStart = child->tqgeometry();
m_matrix = child->matrix() * matrix;
m_invertParentMatrix = matrix.invert();
@@ -59,19 +59,19 @@ public:
~KoPartResizeHandlerPrivate() {}
KoChild::Gadget m_gadget;
- QPoint m_mouseStart;
- QRect m_geometryStart;
+ TQPoint m_mouseStart;
+ TQRect m_tqgeometryStart;
KoView* m_view;
KoChild* m_child;
- QWMatrix m_invert;
- QWMatrix m_matrix;
- QWMatrix m_parentMatrix;
- QWMatrix m_invertParentMatrix;
+ TQWMatrix m_invert;
+ TQWMatrix m_matrix;
+ TQWMatrix m_parentMatrix;
+ TQWMatrix m_invertParentMatrix;
};
-KoPartResizeHandler::KoPartResizeHandler( QWidget* widget, const QWMatrix& matrix, KoView* view, KoChild* child,
- KoChild::Gadget gadget, const QPoint& point )
- : KoEventHandler( widget )
+KoPartResizeHandler::KoPartResizeHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
+ KoChild::Gadget gadget, const TQPoint& point )
+ : KoEventHandler( TQT_TQOBJECT(widget) )
{
child->lock();
d=new KoPartResizeHandlerPrivate(matrix, view, child, gadget, point);
@@ -84,25 +84,25 @@ KoPartResizeHandler::~KoPartResizeHandler()
d=0L;
}
-void KoPartResizeHandler::repaint(QRegion &rgn)
+void KoPartResizeHandler::tqrepaint(TQRegion &rgn)
{
rgn = rgn.unite( d->m_child->frameRegion( d->m_parentMatrix, true ) );
// rgn.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset());
- ((QWidget*)target())->repaint( rgn );
+ ((TQWidget*)target())->tqrepaint( rgn );
}
-bool KoPartResizeHandler::eventFilter( QObject*, QEvent* ev )
+bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev )
{
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
delete this;
return true;
}
- else if ( ev->type() == QEvent::MouseMove )
+ else if ( ev->type() == TQEvent::MouseMove )
{
- QMouseEvent* e = (QMouseEvent*)ev;
- QPoint p = d->m_invert.map( d->m_invertParentMatrix.map( e->pos() /*+ QPoint(d->m_view->canvasXOffset(), d->m_view->canvasYOffset()) */ ) );
- QRegion rgn( d->m_child->frameRegion( d->m_parentMatrix, true ) );
+ TQMouseEvent* e = (TQMouseEvent*)ev;
+ TQPoint p = d->m_invert.map( d->m_invertParentMatrix.map( e->pos() /*+ TQPoint(d->m_view->canvasXOffset(), d->m_view->canvasYOffset()) */ ) );
+ TQRegion rgn( d->m_child->frameRegion( d->m_parentMatrix, true ) );
double x1_x, x1_y, x2_x, x2_y;
d->m_matrix.map( double( p.x() ), 0.0, &x1_x, &x1_y );
@@ -123,78 +123,78 @@ bool KoPartResizeHandler::eventFilter( QObject*, QEvent* ev )
{
case KoChild::TopLeft:
{
- x = QMIN( d->m_geometryStart.width() - 1, x );
- y = QMIN( d->m_geometryStart.height() - 1, y );
+ x = TQMIN( d->m_tqgeometryStart.width() - 1, x );
+ y = TQMIN( d->m_tqgeometryStart.height() - 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x() + x, d->m_geometryStart.y() + y,
- d->m_geometryStart.width() - x, d->m_geometryStart.height() - y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x() + x, d->m_tqgeometryStart.y() + y,
+ d->m_tqgeometryStart.width() - x, d->m_tqgeometryStart.height() - y ) );
+ tqrepaint(rgn);
}
break;
case KoChild::TopMid:
{
- y = QMIN( d->m_geometryStart.height() - 1, y );
+ y = TQMIN( d->m_tqgeometryStart.height() - 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y,
- d->m_geometryStart.width(), d->m_geometryStart.height() - y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x(), d->m_tqgeometryStart.y() + y,
+ d->m_tqgeometryStart.width(), d->m_tqgeometryStart.height() - y ) );
+ tqrepaint(rgn);
}
break;
case KoChild::TopRight:
{
- x = QMAX( -d->m_geometryStart.width() + 1, x );
- y = QMIN( d->m_geometryStart.height() - 1, y );
+ x = TQMAX( -d->m_tqgeometryStart.width() + 1, x );
+ y = TQMIN( d->m_tqgeometryStart.height() - 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y,
- d->m_geometryStart.width() + x, d->m_geometryStart.height() - y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x(), d->m_tqgeometryStart.y() + y,
+ d->m_tqgeometryStart.width() + x, d->m_tqgeometryStart.height() - y ) );
+ tqrepaint(rgn);
}
break;
case KoChild::MidLeft:
{
- x = QMIN( d->m_geometryStart.width() - 1, x );
+ x = TQMIN( d->m_tqgeometryStart.width() - 1, x );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(),
- d->m_geometryStart.width() - x, d->m_geometryStart.height() ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x() + x, d->m_tqgeometryStart.y(),
+ d->m_tqgeometryStart.width() - x, d->m_tqgeometryStart.height() ) );
+ tqrepaint(rgn);
}
break;
case KoChild::MidRight:
{
- x = QMAX( -d->m_geometryStart.width() + 1, x );
+ x = TQMAX( -d->m_tqgeometryStart.width() + 1, x );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x(), d->m_geometryStart.y(),
- d->m_geometryStart.width() + x, d->m_geometryStart.height() ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x(), d->m_tqgeometryStart.y(),
+ d->m_tqgeometryStart.width() + x, d->m_tqgeometryStart.height() ) );
+ tqrepaint(rgn);
}
break;
case KoChild::BottomLeft:
{
- x = QMIN( d->m_geometryStart.width() - 1, x );
- y = QMAX( -d->m_geometryStart.height() + 1, y );
+ x = TQMIN( d->m_tqgeometryStart.width() - 1, x );
+ y = TQMAX( -d->m_tqgeometryStart.height() + 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(),
- d->m_geometryStart.width() - x, d->m_geometryStart.height() + y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x() + x, d->m_tqgeometryStart.y(),
+ d->m_tqgeometryStart.width() - x, d->m_tqgeometryStart.height() + y ) );
+ tqrepaint(rgn);
}
break;
case KoChild::BottomMid:
{
- y = QMAX( -d->m_geometryStart.height() + 1, y );
+ y = TQMAX( -d->m_tqgeometryStart.height() + 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x(), d->m_geometryStart.y(),
- d->m_geometryStart.width(), d->m_geometryStart.height() + y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x(), d->m_tqgeometryStart.y(),
+ d->m_tqgeometryStart.width(), d->m_tqgeometryStart.height() + y ) );
+ tqrepaint(rgn);
}
break;
case KoChild::BottomRight:
{
- x = QMAX( -d->m_geometryStart.width() + 1, x );
- y = QMAX( -d->m_geometryStart.height() + 1, y );
+ x = TQMAX( -d->m_tqgeometryStart.width() + 1, x );
+ y = TQMAX( -d->m_tqgeometryStart.height() + 1, y );
- d->m_child->setGeometry( QRect( d->m_geometryStart.x(), d->m_geometryStart.y(),
- d->m_geometryStart.width() + x, d->m_geometryStart.height() + y ) );
- repaint(rgn);
+ d->m_child->setGeometry( TQRect( d->m_tqgeometryStart.x(), d->m_tqgeometryStart.y(),
+ d->m_tqgeometryStart.width() + x, d->m_tqgeometryStart.height() + y ) );
+ tqrepaint(rgn);
}
break;
default:
@@ -209,28 +209,28 @@ bool KoPartResizeHandler::eventFilter( QObject*, QEvent* ev )
class KoPartMoveHandlerPrivate {
public:
- KoPartMoveHandlerPrivate( const QWMatrix& matrix, KoView* view, KoChild* child,
- const QPoint& point) : m_view(view), m_dragChild(child),
+ KoPartMoveHandlerPrivate( const TQWMatrix& matrix, KoView* view, KoChild* child,
+ const TQPoint& point) : m_view(view), m_dragChild(child),
m_parentMatrix(matrix) {
m_invertParentMatrix = matrix.invert();
m_mouseDragStart = m_invertParentMatrix.map( point );
- m_geometryDragStart = m_dragChild->geometry();
+ m_tqgeometryDragStart = m_dragChild->tqgeometry();
m_rotationDragStart = m_dragChild->rotationPoint();
}
~KoPartMoveHandlerPrivate() {}
KoView* m_view;
KoChild* m_dragChild;
- QPoint m_mouseDragStart;
- QRect m_geometryDragStart;
- QPoint m_rotationDragStart;
- QWMatrix m_invertParentMatrix;
- QWMatrix m_parentMatrix;
+ TQPoint m_mouseDragStart;
+ TQRect m_tqgeometryDragStart;
+ TQPoint m_rotationDragStart;
+ TQWMatrix m_invertParentMatrix;
+ TQWMatrix m_parentMatrix;
};
-KoPartMoveHandler::KoPartMoveHandler( QWidget* widget, const QWMatrix& matrix, KoView* view, KoChild* child,
- const QPoint& point )
- : KoEventHandler( widget )
+KoPartMoveHandler::KoPartMoveHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
+ const TQPoint& point )
+ : KoEventHandler( TQT_TQOBJECT(widget) )
{
child->lock();
d=new KoPartMoveHandlerPrivate(matrix, view, child, point);
@@ -243,27 +243,27 @@ KoPartMoveHandler::~KoPartMoveHandler()
d=0L;
}
-bool KoPartMoveHandler::eventFilter( QObject*, QEvent* ev )
+bool KoPartMoveHandler::eventFilter( TQObject*, TQEvent* ev )
{
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
delete this;
return true;
}
- else if ( ev->type() == QEvent::MouseMove )
+ else if ( ev->type() == TQEvent::MouseMove )
{
- QMouseEvent* e = (QMouseEvent*)ev;
-
- QRegion bound = d->m_dragChild->frameRegion( d->m_parentMatrix, true );
- QPoint pos = d->m_invertParentMatrix.map( e->pos() /* + QPoint(d->m_view->canvasXOffset(), d->m_view->canvasYOffset()) */ );
- d->m_dragChild->setGeometry( QRect( d->m_geometryDragStart.x() + pos.x() - d->m_mouseDragStart.x(),
- d->m_geometryDragStart.y() + pos.y() - d->m_mouseDragStart.y(),
- d->m_geometryDragStart.width(), d->m_geometryDragStart.height() ) );
- d->m_dragChild->setRotationPoint( QPoint( d->m_rotationDragStart.x() + pos.x() - d->m_mouseDragStart.x(),
+ TQMouseEvent* e = (TQMouseEvent*)ev;
+
+ TQRegion bound = d->m_dragChild->frameRegion( d->m_parentMatrix, true );
+ TQPoint pos = d->m_invertParentMatrix.map( e->pos() /* + TQPoint(d->m_view->canvasXOffset(), d->m_view->canvasYOffset()) */ );
+ d->m_dragChild->setGeometry( TQRect( d->m_tqgeometryDragStart.x() + pos.x() - d->m_mouseDragStart.x(),
+ d->m_tqgeometryDragStart.y() + pos.y() - d->m_mouseDragStart.y(),
+ d->m_tqgeometryDragStart.width(), d->m_tqgeometryDragStart.height() ) );
+ d->m_dragChild->setRotationPoint( TQPoint( d->m_rotationDragStart.x() + pos.x() - d->m_mouseDragStart.x(),
d->m_rotationDragStart.y() + pos.y() - d->m_mouseDragStart.y() ) );
bound = bound.unite( d->m_dragChild->frameRegion( d->m_parentMatrix, false ) );
// bound.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset());
- ((QWidget*)target())->repaint( bound );
+ ((TQWidget*)target())->tqrepaint( bound );
return true;
}
@@ -273,8 +273,8 @@ bool KoPartMoveHandler::eventFilter( QObject*, QEvent* ev )
// -------------------------------------------------------
-KoContainerHandler::KoContainerHandler( KoView* view, QWidget* widget )
- : KoEventHandler( widget )
+KoContainerHandler::KoContainerHandler( KoView* view, TQWidget* widget )
+ : KoEventHandler( TQT_TQOBJECT(widget) )
{
m_view = view;
}
@@ -283,51 +283,51 @@ KoContainerHandler::~KoContainerHandler()
{
}
-bool KoContainerHandler::eventFilter( QObject*, QEvent* ev )
+bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev )
{
- if ( ev->type() == QEvent::KeyPress )
+ if ( ev->type() == TQEvent::KeyPress )
{
- QKeyEvent* keyEvent=(QKeyEvent*)ev;
+ TQKeyEvent* keyEvent=(TQKeyEvent*)ev;
KoChild* child=m_view->selectedChild();
if (child != 0)
{
- if (keyEvent->key()==Qt::Key_Delete)
+ if (keyEvent->key()==TQt::Key_Delete)
emit deleteChild(child);
}
}
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
{
KoChild::Gadget gadget;
- QPoint pos;
- QMouseEvent *e=static_cast<QMouseEvent*>(ev);
+ TQPoint pos;
+ TQMouseEvent *e=TQT_TQMOUSEEVENT(ev);
KoChild *ch=child(gadget, pos, e);
- if ( e->button() == RightButton && gadget != KoChild::NoGadget )
+ if ( e->button() == Qt::RightButton && gadget != KoChild::NoGadget )
{
emit popupMenu( ch, e->globalPos() );
return true;
}
- else if ( e->button() == LeftButton && gadget == KoChild::Move )
+ else if ( e->button() == Qt::LeftButton && gadget == KoChild::Move )
{
- (void)new KoPartMoveHandler( static_cast<QWidget*>(target()), m_view->matrix(), m_view, ch, pos );
+ (void)new KoPartMoveHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, pos );
return true;
}
- else if ( e->button() == LeftButton && gadget != KoChild::NoGadget )
+ else if ( e->button() == Qt::LeftButton && gadget != KoChild::NoGadget )
{
- (void)new KoPartResizeHandler( static_cast<QWidget*>(target()), m_view->matrix(), m_view, ch, gadget, pos );
+ (void)new KoPartResizeHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, gadget, pos );
return true;
}
return false;
}
- else if ( ev->type() == QEvent::MouseMove )
+ else if ( ev->type() == TQEvent::MouseMove )
{
- QWidget *targetWidget = static_cast<QWidget *>( target() );
+ TQWidget *targetWidget = TQT_TQWIDGET( target() );
KoChild::Gadget gadget;
- QPoint pos;
- QMouseEvent *e=static_cast<QMouseEvent*>(ev);
+ TQPoint pos;
+ TQMouseEvent *e=TQT_TQMOUSEEVENT(ev);
child(gadget, pos, e);
bool retval = true;
@@ -354,9 +354,9 @@ bool KoContainerHandler::eventFilter( QObject*, QEvent* ev )
return false;
}
-KoChild *KoContainerHandler::child(KoChild::Gadget &gadget, QPoint &pos, const QMouseEvent *ev) {
+KoChild *KoContainerHandler::child(KoChild::Gadget &gadget, TQPoint &pos, const TQMouseEvent *ev) {
- pos = ev->pos(); //+ QPoint(m_view->canvasXOffset(), m_view->canvasYOffset());
+ pos = ev->pos(); //+ TQPoint(m_view->canvasXOffset(), m_view->canvasYOffset());
pos = m_view->reverseViewTransformations( pos );
diff --git a/lib/kofficecore/KoContainerHandler.h b/lib/kofficecore/KoContainerHandler.h
index d34d0500..0ea9ba35 100644
--- a/lib/kofficecore/KoContainerHandler.h
+++ b/lib/kofficecore/KoContainerHandler.h
@@ -20,10 +20,10 @@
#ifndef HANDLER_H
#define HANDLER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <KoDocumentChild.h>
-class QWMatrix;
+class TQWMatrix;
class KoView;
class KoPartResizeHandlerPrivate;
@@ -40,17 +40,18 @@ class KoPartMoveHandlerPrivate;
* This design pattern helps you to keep your event filters
* and your mousePressEvent, mouseMoveEvent etc. methods clean.
*/
-class KOFFICECORE_EXPORT KoEventHandler : public QObject
+class KOFFICECORE_EXPORT KoEventHandler : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoEventHandler( QObject* target );
+ KoEventHandler( TQObject* target );
~KoEventHandler();
- QObject* target();
+ TQObject* target();
private:
- QObject* m_target;
+ TQObject* m_target;
};
/**
@@ -60,14 +61,15 @@ private:
class KoPartResizeHandler : public KoEventHandler
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoPartResizeHandler( QWidget* widget, const QWMatrix& matrix, KoView* view, KoChild* child,
- KoChild::Gadget gadget, const QPoint& point );
+ KoPartResizeHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
+ KoChild::Gadget gadget, const TQPoint& point );
~KoPartResizeHandler();
protected:
- void repaint(QRegion &rgn);
- bool eventFilter( QObject*, QEvent* );
+ void tqrepaint(TQRegion &rgn);
+ bool eventFilter( TQObject*, TQEvent* );
private:
KoPartResizeHandlerPrivate *d;
@@ -80,13 +82,14 @@ private:
class KoPartMoveHandler : public KoEventHandler
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoPartMoveHandler( QWidget* widget, const QWMatrix& matrix, KoView* view, KoChild* child,
- const QPoint& point );
+ KoPartMoveHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child,
+ const TQPoint& point );
~KoPartMoveHandler();
protected:
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
KoPartMoveHandlerPrivate *d;
@@ -109,8 +112,9 @@ private:
class KOFFICECORE_EXPORT KoContainerHandler : public KoEventHandler
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoContainerHandler( KoView* view, QWidget* widget );
+ KoContainerHandler( KoView* view, TQWidget* widget );
~KoContainerHandler();
signals:
@@ -118,7 +122,7 @@ signals:
* Emitted if the user wants to open the popup menu for some
* child object.
*/
- void popupMenu( KoChild*, const QPoint& global_pos );
+ void popupMenu( KoChild*, const TQPoint& global_pos );
/**
* Emitted if the user pressed the delete key whilst a child was selected
@@ -126,11 +130,11 @@ signals:
void deleteChild( KoChild* );
protected:
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
/// This is a little helper function to get rid of some duplicated code
- KoChild *child(KoChild::Gadget &gadget, QPoint &pos, const QMouseEvent *ev);
+ KoChild *child(KoChild::Gadget &gadget, TQPoint &pos, const TQMouseEvent *ev);
KoView* m_view;
};
diff --git a/lib/kofficecore/KoDetailsPane.cpp b/lib/kofficecore/KoDetailsPane.cpp
index d94a01f7..85d9c3d6 100644
--- a/lib/kofficecore/KoDetailsPane.cpp
+++ b/lib/kofficecore/KoDetailsPane.cpp
@@ -18,17 +18,17 @@
*/
#include "KoDetailsPane.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qheader.h>
-#include <qrect.h>
-#include <qbrush.h>
-#include <qpainter.h>
-#include <qsimplerichtext.h>
-#include <qevent.h>
-#include <qsplitter.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqheader.h>
+#include <tqrect.h>
+#include <tqbrush.h>
+#include <tqpainter.h>
+#include <tqsimplerichtext.h>
+#include <tqevent.h>
+#include <tqsplitter.h>
#include <kinstance.h>
#include <klocale.h>
@@ -47,8 +47,8 @@
class KoFileListItem : public KListViewItem
{
public:
- KoFileListItem(KListView* listView, QListViewItem* after, const QString& filename,
- const QString& fullPath, KFileItem* fileItem)
+ KoFileListItem(KListView* listView, TQListViewItem* after, const TQString& filename,
+ const TQString& fullPath, KFileItem* fileItem)
: KListViewItem(listView, after, filename, fullPath), m_fileItem(fileItem)
{
}
@@ -77,13 +77,13 @@ class KoTemplatesPanePrivate
KInstance* m_instance;
bool m_selected;
- QString m_alwaysUseTemplate;
+ TQString m_alwaysUseTemplate;
};
-KoTemplatesPane::KoTemplatesPane(QWidget* parent, KInstance* instance,
+KoTemplatesPane::KoTemplatesPane(TQWidget* tqparent, KInstance* instance,
KoTemplateGroup *group, KoTemplate* /*defaultTemplate*/)
- : KoDetailsPaneBase(parent, "TemplatesPane")
+ : KoDetailsPaneBase(tqparent, "TemplatesPane")
{
d = new KoTemplatesPanePrivate;
d->m_instance = instance;
@@ -98,24 +98,24 @@ KoTemplatesPane::KoTemplatesPane(QWidget* parent, KInstance* instance,
m_openButton->setGuiItem(openGItem);
m_documentList->header()->hide();
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
- QString fullTemplateName = cfgGrp.readPathEntry("FullTemplateName");
+ TQString fullTemplateName = cfgGrp.readPathEntry("FullTemplateName");
d->m_alwaysUseTemplate = cfgGrp.readPathEntry("AlwaysUseTemplate");
- connect(m_alwaysUseCheckBox, SIGNAL(clicked()), this, SLOT(alwaysUseClicked()));
+ connect(m_alwaysUseCheckBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(alwaysUseClicked()));
changePalette();
if(kapp) {
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(changePalette()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(changePalette()));
}
KListViewItem* selectItem = 0;
for (KoTemplate* t = group->first(); t != 0L; t = group->next()) {
KListViewItem* item = new KListViewItem(m_documentList, t->name(), t->description(), t->file());
- QImage icon = t->loadPicture(instance).convertToImage();
- icon = icon.smoothScale(64, 64, QImage::ScaleMin);
+ TQImage icon = t->loadPicture(instance).convertToImage();
+ icon = icon.smoothScale(64, 64, TQ_ScaleMin);
icon.setAlphaBuffer(true);
icon = icon.copy((icon.width() - 64) / 2, (icon.height() - 64) / 2, 64, 64);
- item->setPixmap(0, QPixmap(icon));
+ item->setPixmap(0, TQPixmap(icon));
item->setPixmap(2, t->loadPicture(instance));
if(d->m_alwaysUseTemplate == t->file()) {
@@ -125,13 +125,13 @@ KoTemplatesPane::KoTemplatesPane(QWidget* parent, KInstance* instance,
}
}
- connect(m_documentList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(selectionChanged(QListViewItem*)));
- connect(m_documentList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- this, SLOT(openTemplate(QListViewItem*)));
- connect(m_documentList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(openTemplate(QListViewItem*)));
- connect(m_openButton, SIGNAL(clicked()), this, SLOT(openTemplate()));
+ connect(m_documentList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(selectionChanged(TQListViewItem*)));
+ connect(m_documentList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(openTemplate(TQListViewItem*)));
+ connect(m_documentList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(openTemplate(TQListViewItem*)));
+ connect(m_openButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(openTemplate()));
if(selectItem) {
m_documentList->setSelected(selectItem, true);
@@ -146,7 +146,7 @@ KoTemplatesPane::~KoTemplatesPane()
delete d;
}
-void KoTemplatesPane::selectionChanged(QListViewItem* item)
+void KoTemplatesPane::selectionChanged(TQListViewItem* item)
{
if(item) {
m_openButton->setEnabled(true);
@@ -159,18 +159,18 @@ void KoTemplatesPane::selectionChanged(QListViewItem* item)
m_openButton->setEnabled(false);
m_alwaysUseCheckBox->setEnabled(false);
m_alwaysUseCheckBox->setChecked(false);
- m_titleLabel->setText(QString::null);
- m_previewLabel->setPixmap(QPixmap());
+ m_titleLabel->setText(TQString());
+ m_previewLabel->setPixmap(TQPixmap());
}
}
void KoTemplatesPane::openTemplate()
{
- QListViewItem* item = m_documentList->selectedItem();
+ TQListViewItem* item = m_documentList->selectedItem();
openTemplate(item);
}
-void KoTemplatesPane::openTemplate(QListViewItem* item)
+void KoTemplatesPane::openTemplate(TQListViewItem* item)
{
if(item) {
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
@@ -183,9 +183,9 @@ void KoTemplatesPane::openTemplate(QListViewItem* item)
void KoTemplatesPane::changePalette()
{
- QPalette p = kapp ? kapp->palette() : palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Text, p.color(QPalette::Normal, QColorGroup::Foreground));
+ TQPalette p = kapp ? kapp->palette() : palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
m_detailsLabel->setPalette(p);
}
@@ -196,12 +196,12 @@ bool KoTemplatesPane::isSelected()
void KoTemplatesPane::alwaysUseClicked()
{
- QListViewItem* item = m_documentList->selectedItem();
+ TQListViewItem* item = m_documentList->selectedItem();
if(!m_alwaysUseCheckBox->isChecked()) {
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
- cfgGrp.writeEntry("AlwaysUseTemplate", QString::null);
- d->m_alwaysUseTemplate = QString::null;
+ cfgGrp.writeEntry("AlwaysUseTemplate", TQString());
+ d->m_alwaysUseTemplate = TQString();
} else {
d->m_alwaysUseTemplate = item->text(2);
}
@@ -209,12 +209,12 @@ void KoTemplatesPane::alwaysUseClicked()
emit alwaysUseChanged(this, d->m_alwaysUseTemplate);
}
-void KoTemplatesPane::changeAlwaysUseTemplate(KoTemplatesPane* sender, const QString& alwaysUse)
+void KoTemplatesPane::changeAlwaysUseTemplate(KoTemplatesPane* sender, const TQString& alwaysUse)
{
if(this == sender)
return;
- QListViewItem* item = m_documentList->selectedItem();
+ TQListViewItem* item = m_documentList->selectedItem();
// If the old always use template is selected uncheck the checkbox
if(item && (item->text(2) == d->m_alwaysUseTemplate)) {
@@ -224,16 +224,16 @@ void KoTemplatesPane::changeAlwaysUseTemplate(KoTemplatesPane* sender, const QSt
d->m_alwaysUseTemplate = alwaysUse;
}
-bool KoTemplatesPane::eventFilter(QObject* watched, QEvent* e)
+bool KoTemplatesPane::eventFilter(TQObject* watched, TQEvent* e)
{
- if(watched == m_previewLabel) {
- if(e->type() == QEvent::MouseButtonDblClick) {
+ if(TQT_BASE_OBJECT(watched) == m_previewLabel) {
+ if(e->type() == TQEvent::MouseButtonDblClick) {
openTemplate();
}
}
- if(watched == m_documentList) {
- if((e->type() == QEvent::Resize) && isShown()) {
+ if(TQT_BASE_OBJECT(watched) == m_documentList) {
+ if((e->type() == TQEvent::Resize) && isShown()) {
emit splitterResized(this, m_splitter->sizes());
}
}
@@ -241,7 +241,7 @@ bool KoTemplatesPane::eventFilter(QObject* watched, QEvent* e)
return false;
}
-void KoTemplatesPane::resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes)
+void KoTemplatesPane::resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes)
{
if(sender == this)
return;
@@ -268,8 +268,8 @@ class KoRecentDocumentsPanePrivate
KInstance* m_instance;
};
-KoRecentDocumentsPane::KoRecentDocumentsPane(QWidget* parent, KInstance* instance)
- : KoDetailsPaneBase(parent, "RecentDocsPane")
+KoRecentDocumentsPane::KoRecentDocumentsPane(TQWidget* tqparent, KInstance* instance)
+ : KoDetailsPaneBase(tqparent, "RecentDocsPane")
{
d = new KoRecentDocumentsPanePrivate;
d->m_instance = instance;
@@ -284,28 +284,28 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(QWidget* parent, KInstance* instanc
changePalette();
if(kapp) {
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(changePalette()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(changePalette()));
}
- QString oldGroup = instance->config()->group();
+ TQString oldGroup = instance->config()->group();
instance->config()->setGroup("RecentFiles");
int i = 0;
- QString value;
+ TQString value;
KFileItemList fileList;
fileList.setAutoDelete(false);
do {
- QString key = QString("File%1").arg(i);
+ TQString key = TQString("File%1").tqarg(i);
value = instance->config()->readPathEntry(key);
if(!value.isEmpty()) {
- QString path = value;
- QString name;
+ TQString path = value;
+ TQString name;
// Support for kdelibs-3.5's new RecentFiles format: name[url]
if(path.endsWith("]")) {
- int pos = path.find("[");
+ int pos = path.tqfind("[");
name = path.mid(0, pos - 1);
path = path.mid(pos + 1, path.length() - pos - 2);
}
@@ -315,16 +315,16 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(QWidget* parent, KInstance* instanc
if(name.isEmpty())
name = url.filename();
- if(!url.isLocalFile() || QFile::exists(url.path())) {
+ if(!url.isLocalFile() || TQFile::exists(url.path())) {
KFileItem* fileItem = new KFileItem(KFileItem::Unknown, KFileItem::Unknown, url);
fileList.append(fileItem);
KoFileListItem* item = new KoFileListItem(m_documentList,
m_documentList->lastItem(), name, url.url(), fileItem);
//center all icons in 64x64 area
- QImage icon = fileItem->pixmap(64).convertToImage();
+ TQImage icon = fileItem->pixmap(64).convertToImage();
icon.setAlphaBuffer(true);
icon = icon.copy((icon.width() - 64) / 2, (icon.height() - 64) / 2, 64, 64);
- item->setPixmap(0, QPixmap(icon));
+ item->setPixmap(0, TQPixmap(icon));
item->setPixmap(2, fileItem->pixmap(128));
}
}
@@ -334,23 +334,23 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(QWidget* parent, KInstance* instanc
instance->config()->setGroup( oldGroup );
- connect(m_documentList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(selectionChanged(QListViewItem*)));
- connect(m_documentList, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(selectionChanged(QListViewItem*)));
- connect(m_documentList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- this, SLOT(openFile(QListViewItem*)));
- connect(m_documentList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(openFile(QListViewItem*)));
- connect(m_openButton, SIGNAL(clicked()), this, SLOT(openFile()));
+ connect(m_documentList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(selectionChanged(TQListViewItem*)));
+ connect(m_documentList, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(selectionChanged(TQListViewItem*)));
+ connect(m_documentList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(openFile(TQListViewItem*)));
+ connect(m_documentList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(openFile(TQListViewItem*)));
+ connect(m_openButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFile()));
m_documentList->setSelected(m_documentList->firstChild(), true);
d->m_previewJob = KIO::filePreview(fileList, 200, 200);
- connect(d->m_previewJob, SIGNAL(result(KIO::Job*)), this, SLOT(previewResult(KIO::Job*)));
- connect(d->m_previewJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)),
- this, SLOT(updatePreview(const KFileItem*, const QPixmap&)));
+ connect(d->m_previewJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(previewResult(KIO::Job*)));
+ connect(d->m_previewJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
+ this, TQT_SLOT(updatePreview(const KFileItem*, const TQPixmap&)));
}
KoRecentDocumentsPane::~KoRecentDocumentsPane()
@@ -358,7 +358,7 @@ KoRecentDocumentsPane::~KoRecentDocumentsPane()
delete d;
}
-void KoRecentDocumentsPane::selectionChanged(QListViewItem* item)
+void KoRecentDocumentsPane::selectionChanged(TQListViewItem* item)
{
if(item) {
m_openButton->setEnabled(true);
@@ -367,31 +367,31 @@ void KoRecentDocumentsPane::selectionChanged(QListViewItem* item)
if(static_cast<KoFileListItem*>(item)->fileItem()) {
KFileItem* fileItem = static_cast<KoFileListItem*>(item)->fileItem();
- QString details = "<center><table border=\"0\">";
+ TQString details = "<center><table border=\"0\">";
details += i18n("File modification date and time. %1 is date time", "<tr><td><b>Modified:</b></td><td>%1</td></tr>")
- .arg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME));
+ .tqarg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME));
details += i18n("File access date and time. %1 is date time", "<tr><td><b>Accessed:</b></td><td>%1</td></tr>")
- .arg(fileItem->timeString(KIO::UDS_ACCESS_TIME));
+ .tqarg(fileItem->timeString(KIO::UDS_ACCESS_TIME));
details += "</table></center>";
m_detailsLabel->setText(details);
} else {
- m_detailsLabel->setText(QString::null);
+ m_detailsLabel->setText(TQString());
}
} else {
m_openButton->setEnabled(false);
- m_titleLabel->setText(QString::null);
- m_previewLabel->setPixmap(QPixmap());
- m_detailsLabel->setText(QString::null);
+ m_titleLabel->setText(TQString());
+ m_previewLabel->setPixmap(TQPixmap());
+ m_detailsLabel->setText(TQString());
}
}
void KoRecentDocumentsPane::openFile()
{
- QListViewItem* item = m_documentList->selectedItem();
+ TQListViewItem* item = m_documentList->selectedItem();
openFile(item);
}
-void KoRecentDocumentsPane::openFile(QListViewItem* item)
+void KoRecentDocumentsPane::openFile(TQListViewItem* item)
{
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
cfgGrp.writeEntry("LastReturnType", "File");
@@ -406,22 +406,22 @@ void KoRecentDocumentsPane::previewResult(KIO::Job* job)
d->m_previewJob = 0;
}
-void KoRecentDocumentsPane::updatePreview(const KFileItem* fileItem, const QPixmap& preview)
+void KoRecentDocumentsPane::updatePreview(const KFileItem* fileItem, const TQPixmap& preview)
{
if(preview.isNull()) {
return;
}
- QListViewItemIterator it(m_documentList);
+ TQListViewItemIterator it(m_documentList);
while(it.current()) {
if(it.current()->text(1) == fileItem->url().url()) {
it.current()->setPixmap(2, preview);
- QImage icon = preview.convertToImage();
- icon = icon.smoothScale(64, 64, QImage::ScaleMin);
+ TQImage icon = preview.convertToImage();
+ icon = icon.smoothScale(64, 64, TQ_ScaleMin);
icon.setAlphaBuffer(true);
icon = icon.copy((icon.width() - 64) / 2, (icon.height() - 64) / 2, 64, 64);
- it.current()->setPixmap(0, QPixmap(icon));
+ it.current()->setPixmap(0, TQPixmap(icon));
if(it.current()->isSelected()) {
m_previewLabel->setPixmap(preview);
@@ -436,22 +436,22 @@ void KoRecentDocumentsPane::updatePreview(const KFileItem* fileItem, const QPixm
void KoRecentDocumentsPane::changePalette()
{
- QPalette p = kapp ? kapp->palette() : palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Text, p.color(QPalette::Normal, QColorGroup::Foreground));
+ TQPalette p = kapp ? kapp->palette() : palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
m_detailsLabel->setPalette(p);
}
-bool KoRecentDocumentsPane::eventFilter(QObject* watched, QEvent* e)
+bool KoRecentDocumentsPane::eventFilter(TQObject* watched, TQEvent* e)
{
- if(watched == m_previewLabel) {
- if(e->type() == QEvent::MouseButtonDblClick) {
+ if(TQT_BASE_OBJECT(watched) == m_previewLabel) {
+ if(e->type() == TQEvent::MouseButtonDblClick) {
openFile();
}
}
- if(watched == m_documentList) {
- if((e->type() == QEvent::Resize) && isShown()) {
+ if(TQT_BASE_OBJECT(watched) == m_documentList) {
+ if((e->type() == TQEvent::Resize) && isShown()) {
emit splitterResized(this, m_splitter->sizes());
}
}
@@ -459,7 +459,7 @@ bool KoRecentDocumentsPane::eventFilter(QObject* watched, QEvent* e)
return false;
}
-void KoRecentDocumentsPane::resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes)
+void KoRecentDocumentsPane::resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes)
{
if(sender == this)
return;
diff --git a/lib/kofficecore/KoDetailsPane.h b/lib/kofficecore/KoDetailsPane.h
index 96a92b98..bee6f14a 100644
--- a/lib/kofficecore/KoDetailsPane.h
+++ b/lib/kofficecore/KoDetailsPane.h
@@ -26,11 +26,11 @@
class KoTemplateGroup;
class KoTemplate;
class KInstance;
-class QListViewItem;
+class TQListViewItem;
class KoRecentDocumentsPanePrivate;
class KoRichTextListItemPrivate;
class KFileItem;
-class QPixmap;
+class TQPixmap;
namespace KIO {
class Job;
@@ -40,46 +40,47 @@ class KoTemplatesPanePrivate;
/**
* This widget is the right-side part of the template opening widget.
- * The parent widget is initial widget in the document space of each KOffice component.
+ * The tqparent widget is initial widget in the document space of each KOffice component.
* This widget shows a list of templates and can show their details or open it.
*/
class KoTemplatesPane : public KoDetailsPaneBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param instance the instance object for the app
* @param group the group of templates this widget will show.
* @param defaultTemplate pointer to the default template. Used to select a
* template when none has been selected before.
*/
- KoTemplatesPane(QWidget* parent, KInstance* instance,
+ KoTemplatesPane(TQWidget* tqparent, KInstance* instance,
KoTemplateGroup* group, KoTemplate* defaultTemplate);
~KoTemplatesPane();
/// Returns true if a template in this group was the last one selected
bool isSelected();
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
signals:
- void openTemplate(const QString&);
+ void openTemplate(const TQString&);
/// Emited when the always use checkbox is selected
- void alwaysUseChanged(KoTemplatesPane* sender, const QString& alwaysUse);
+ void alwaysUseChanged(KoTemplatesPane* sender, const TQString& alwaysUse);
- void splitterResized(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
public slots:
- void resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
protected slots:
- void selectionChanged(QListViewItem* item);
+ void selectionChanged(TQListViewItem* item);
void openTemplate();
- void openTemplate(QListViewItem* item);
+ void openTemplate(TQListViewItem* item);
void alwaysUseClicked();
- void changeAlwaysUseTemplate(KoTemplatesPane* sender, const QString& alwaysUse);
+ void changeAlwaysUseTemplate(KoTemplatesPane* sender, const TQString& alwaysUse);
void changePalette();
@@ -90,38 +91,39 @@ class KoTemplatesPane : public KoDetailsPaneBase
/**
* This widget is the recent doc part of the template opening widget.
- * The parent widget is initial widget in the document space of each KOffice component.
+ * The tqparent widget is initial widget in the document space of each KOffice component.
* This widget shows a list of recent documents and can show their details or open it.
*/
class KoRecentDocumentsPane : public KoDetailsPaneBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param instance the instance object for the app
*/
- KoRecentDocumentsPane(QWidget* parent, KInstance* instance);
+ KoRecentDocumentsPane(TQWidget* tqparent, KInstance* instance);
~KoRecentDocumentsPane();
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
signals:
- void openFile(const QString&);
+ void openFile(const TQString&);
- void splitterResized(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
public slots:
- void resizeSplitter(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void resizeSplitter(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
protected slots:
- void selectionChanged(QListViewItem* item);
+ void selectionChanged(TQListViewItem* item);
void openFile();
- void openFile(QListViewItem* item);
+ void openFile(TQListViewItem* item);
void previewResult(KIO::Job* job);
- void updatePreview(const KFileItem* fileItem, const QPixmap& preview);
+ void updatePreview(const KFileItem* fileItem, const TQPixmap& preview);
void changePalette();
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index 50003627..695599d2 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -49,17 +49,17 @@
#include <kprinter.h>
#include <ksavefile.h>
-#include <qbuffer.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qmap.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qxml.h>
-#include <qlayout.h>
+#include <tqbuffer.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqxml.h>
+#include <tqlayout.h>
#include <config.h>
#include <assert.h>
@@ -76,7 +76,7 @@
#define INTERNAL_PREFIX "intern:/"
// Warning, keep it sync in koStore.cc and koDocumentChild.cc
-QPtrList<KoDocument> *KoDocument::s_documentList=0L;
+TQPtrList<KoDocument> *KoDocument::s_documentList=0L;
using namespace std;
class KoViewWrapperWidget;
@@ -103,7 +103,7 @@ public:
m_shouldCheckAutoSaveFile( true ),
m_autoErrorHandlingEnabled( true ),
m_backupFile( true ),
- m_backupPath( QString::null ),
+ m_backupPath( TQString() ),
m_doNotSaveExtDoc( false ),
m_current( false ),
m_storeInternal( false ),
@@ -119,10 +119,10 @@ public:
}
}
- QPtrList<KoView> m_views;
- QPtrList<KoDocumentChild> m_children;
- QPtrList<KoMainWindow> m_shells;
- QValueList<QDomDocument> m_viewBuildDocuments;
+ TQPtrList<KoView> m_views;
+ TQPtrList<KoDocumentChild> m_tqchildren;
+ TQPtrList<KoMainWindow> m_shells;
+ TQValueList<TQDomDocument> m_viewBuildDocuments;
KoViewWrapperWidget *m_wrapperWidget;
KoDocumentIface * m_dcopObject;
@@ -133,16 +133,16 @@ public:
KoFilterManager * filterManager; // The filter-manager to use when loading/saving [for the options]
- QCString mimeType; // The actual mimetype of the document
- QCString outputMimeType; // The mimetype to use when saving
+ TQCString mimeType; // The actual mimetype of the document
+ TQCString outputMimeType; // The mimetype to use when saving
bool m_confirmNonNativeSave [2]; // used to pop up a dialog when saving for the
// first time if the file is in a foreign format
// (Save/Save As, Export)
int m_specialOutputFlag; // See KoFileDialog in koMainWindow.cc
bool m_isImporting, m_isExporting; // File --> Import/Export vs File --> Open/Save
- QTimer m_autoSaveTimer;
- QString lastErrorMessage; // see openFile()
+ TQTimer m_autoSaveTimer;
+ TQString lastErrorMessage; // see openFile()
int m_autoSaveDelay; // in seconds, 0 to disable.
int m_numOperations;
bool modifiedAfterAutosave;
@@ -151,45 +151,45 @@ public:
bool m_shouldCheckAutoSaveFile; // usually true
bool m_autoErrorHandlingEnabled; // usually true
bool m_backupFile;
- QString m_backupPath;
+ TQString m_backupPath;
bool m_doNotSaveExtDoc; // makes it possible to save only internally stored child documents
bool m_current;
bool m_storeInternal; // Store this doc internally even if url is external
bool m_bLoading; // True while loading (openURL is async)
KoOpenPane* m_startUpWidget;
- QString m_templateType;
+ TQString m_templateType;
};
// Used in singleViewMode
-class KoViewWrapperWidget : public QWidget
+class KoViewWrapperWidget : public TQWidget
{
public:
- KoViewWrapperWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ KoViewWrapperWidget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
KGlobal::locale()->insertCatalogue("koffice");
// Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice");
m_view = 0L;
// Avoid warning from KParts - we'll have the KoView as focus proxy anyway
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
}
virtual ~KoViewWrapperWidget() {
setFocusProxy( 0 ); // to prevent a crash due to clearFocus (#53466)
}
- virtual void resizeEvent( QResizeEvent * )
+ virtual void resizeEvent( TQResizeEvent * )
{
- QObject *wid = child( 0, "QWidget" );
+ TQObject *wid = child( 0, TQWIDGET_OBJECT_NAME_STRING );
if ( wid )
- static_cast<QWidget *>(wid)->setGeometry( 0, 0, width(), height() );
+ TQT_TQWIDGET(wid)->setGeometry( 0, 0, width(), height() );
}
- virtual void childEvent( QChildEvent *ev )
+ virtual void childEvent( TQChildEvent *ev )
{
- if ( ev->type() == QEvent::ChildInserted )
+ if ( ev->type() == TQEvent::ChildInserted )
resizeEvent( 0L );
}
@@ -211,7 +211,7 @@ KoBrowserExtension::KoBrowserExtension( KoDocument * doc, const char * name )
void KoBrowserExtension::print()
{
- KoDocument * doc = static_cast<KoDocument *>( parent() );
+ KoDocument * doc = static_cast<KoDocument *>( tqparent() );
KoViewWrapperWidget * wrapper = static_cast<KoViewWrapperWidget *>( doc->widget() );
KoView * view = wrapper->koView();
// TODO remove code duplication (KoMainWindow), by moving this to KoView
@@ -222,32 +222,32 @@ void KoBrowserExtension::print()
view->print( printer );
}
-KoDocument::KoDocument( QWidget * parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
- : KParts::ReadWritePart( parent, name )
+KoDocument::KoDocument( TQWidget * tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KParts::ReadWritePart( tqparent, name )
{
if(s_documentList==0L)
- s_documentList=new QPtrList<KoDocument>;
+ s_documentList=new TQPtrList<KoDocument>;
s_documentList->append(this);
d = new Private;
m_bEmpty = TRUE;
- connect( &d->m_autoSaveTimer, SIGNAL( timeout() ), this, SLOT( slotAutoSave() ) );
+ connect( &d->m_autoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoSave() ) );
setAutoSave( s_defaultAutoSave );
d->m_bSingleViewMode = singleViewMode;
- // the parent setting *always* overrides! (Simon)
- if ( parent )
+ // the tqparent setting *always* overrides! (Simon)
+ if ( tqparent )
{
- if ( parent->inherits( "KoDocument" ) )
- d->m_bSingleViewMode = ((KoDocument *)parent)->isSingleViewMode();
- else if ( parent->inherits( "KParts::Part" ) )
+ if ( tqparent->inherits( "KoDocument" ) )
+ d->m_bSingleViewMode = ((KoDocument *)tqparent)->isSingleViewMode();
+ else if ( tqparent->inherits( "KParts::Part" ) )
d->m_bSingleViewMode = true;
}
if ( singleViewMode )
{
- d->m_wrapperWidget = new KoViewWrapperWidget( parentWidget, widgetName );
+ d->m_wrapperWidget = new KoViewWrapperWidget( tqparentWidget, widgetName );
setWidget( d->m_wrapperWidget );
kdDebug(30003) << "creating KoBrowserExtension" << endl;
(void) new KoBrowserExtension( this ); // ## only if embedded into a browser?
@@ -264,29 +264,29 @@ KoDocument::KoDocument( QWidget * parentWidget, const char *widgetName, QObject*
// A way to 'fix' the job's window, since we have no widget known to KParts
if ( !singleViewMode )
- connect( this, SIGNAL( started( KIO::Job* ) ), SLOT( slotStarted( KIO::Job* ) ) );
+ connect( this, TQT_SIGNAL( started( KIO::Job* ) ), TQT_SLOT( slotStarted( KIO::Job* ) ) );
}
KoDocument::~KoDocument()
{
d->m_autoSaveTimer.stop();
- QPtrListIterator<KoDocumentChild> childIt( d->m_children );
+ TQPtrListIterator<KoDocumentChild> childIt( d->m_tqchildren );
for (; childIt.current(); ++childIt )
- disconnect( childIt.current(), SIGNAL( destroyed() ),
- this, SLOT( slotChildDestroyed() ) );
+ disconnect( childIt.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotChildDestroyed() ) );
// Tell our views that the document is already destroyed and
// that they shouldn't try to access it.
- QPtrListIterator<KoView> vIt( d->m_views );
+ TQPtrListIterator<KoView> vIt( d->m_views );
for (; vIt.current(); ++vIt )
vIt.current()->setDocumentDeleted();
delete d->m_startUpWidget;
d->m_startUpWidget = 0;
- d->m_children.setAutoDelete( true );
- d->m_children.clear();
+ d->m_tqchildren.setAutoDelete( true );
+ d->m_tqchildren.clear();
d->m_shells.setAutoDelete( true );
d->m_shells.clear();
@@ -309,12 +309,12 @@ bool KoDocument::isSingleViewMode() const
bool KoDocument::isEmbedded() const
{
- return dynamic_cast<KoDocument *>( parent() ) != 0;
+ return dynamic_cast<KoDocument *>( tqparent() ) != 0;
}
-KoView *KoDocument::createView( QWidget *parent, const char *name )
+KoView *KoDocument::createView( TQWidget *tqparent, const char *name )
{
- KoView *view=createViewInstance(parent, name);
+ KoView *view=createViewInstance(tqparent, name);
addView(view);
return view;
}
@@ -334,10 +334,10 @@ bool KoDocument::exp0rt( const KURL & _url )
// non-virtual).
//
KURL oldURL = m_url;
- QString oldFile = m_file;
+ TQString oldFile = m_file;
bool wasModified = isModified ();
- QCString oldMimeType = mimeType ();
+ TQCString oldMimeType = mimeType ();
// save...
@@ -382,12 +382,12 @@ bool KoDocument::saveFile()
const bool wasModified = isModified ();
// The output format is set by koMainWindow, and by openFile
- QCString outputMimeType = d->outputMimeType;
+ TQCString outputMimeType = d->outputMimeType;
//Q_ASSERT( !outputMimeType.isEmpty() ); // happens when using the DCOP method saveAs
if ( outputMimeType.isEmpty() )
outputMimeType = d->outputMimeType = nativeFormatMimeType();
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
if ( backupFile() ) {
if ( url().isLocalFile() )
@@ -401,7 +401,7 @@ bool KoDocument::saveFile()
backup = url();
else
backup = d->m_backupPath +"/"+url().fileName();
- backup.setPath( backup.path() + QString::fromLatin1("~") );
+ backup.setPath( backup.path() + TQString::tqfromLatin1("~") );
KFileItem item( entry, url() );
Q_ASSERT( item.name() == url().fileName() );
KIO::NetAccess::file_copy( url(), backup, item.permissions(), true /*overwrite*/, false /*resume*/, shells().current() );
@@ -418,7 +418,7 @@ bool KoDocument::saveFile()
if ( !d->filterManager )
d->filterManager = new KoFilterManager( this );
- KoFilter::ConversionStatus status = d->filterManager->exp0rt( m_file, outputMimeType );
+ KoFilter::ConversiontqStatus status = d->filterManager->exp0rt( m_file, outputMimeType );
ret = status == KoFilter::OK;
suppressErrorDialog = (status == KoFilter::UserCancelled || status == KoFilter::BadConversionGraph );
} else {
@@ -434,7 +434,7 @@ bool KoDocument::saveFile()
setAutoSave( d->m_autoSaveDelay );
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( !ret )
{
if ( !suppressErrorDialog )
@@ -468,23 +468,23 @@ bool KoDocument::saveFile()
return ret;
}
-QCString KoDocument::mimeType() const
+TQCString KoDocument::mimeType() const
{
return d->mimeType;
}
-void KoDocument::setMimeType( const QCString & mimeType )
+void KoDocument::setMimeType( const TQCString & mimeType )
{
d->mimeType = mimeType;
}
-void KoDocument::setOutputMimeType( const QCString & mimeType, int specialOutputFlag )
+void KoDocument::setOutputMimeType( const TQCString & mimeType, int specialOutputFlag )
{
d->outputMimeType = mimeType;
d->m_specialOutputFlag = specialOutputFlag;
}
-QCString KoDocument::outputMimeType() const
+TQCString KoDocument::outputMimeType() const
{
return d->outputMimeType;
}
@@ -540,7 +540,7 @@ void KoDocument::slotAutoSave()
{
if ( isModified() && d->modifiedAfterAutosave && !d->m_bLoading )
{
- connect( this, SIGNAL( sigProgress( int ) ), shells().current(), SLOT( slotProgress( int ) ) );
+ connect( this, TQT_SIGNAL( sigProgress( int ) ), shells().current(), TQT_SLOT( slotProgress( int ) ) );
emit sigStatusBarMessage( i18n("Autosaving...") );
d->m_autosaving = true;
bool ret = saveNativeFormat( autoSaveFile( m_file ) );
@@ -551,13 +551,13 @@ void KoDocument::slotAutoSave()
}
d->m_autosaving = false;
emit sigClearStatusBarMessage();
- disconnect( this, SIGNAL( sigProgress( int ) ), shells().current(), SLOT( slotProgress( int ) ) );
+ disconnect( this, TQT_SIGNAL( sigProgress( int ) ), shells().current(), TQT_SLOT( slotProgress( int ) ) );
if ( !ret )
emit sigStatusBarMessage( i18n("Error during autosave! Partition full?") );
}
}
-KAction *KoDocument::action( const QDomElement &element ) const
+KAction *KoDocument::action( const TQDomElement &element ) const
{
// First look in the document itself
KAction* act = KParts::ReadWritePart::action( element );
@@ -572,13 +572,13 @@ KAction *KoDocument::action( const QDomElement &element ) const
return 0L;
}
-QDomDocument KoDocument::domDocument() const
+TQDomDocument KoDocument::domDocument() const
{
// When embedded into e.g. konqueror, we want the view's GUI (hopefully a reduced one)
// to be used.
Q_ASSERT( d->m_bSingleViewMode );
if ( d->m_views.isEmpty() )
- return QDomDocument();
+ return TQDomDocument();
else
return d->m_views.getFirst()->domDocument();
}
@@ -591,7 +591,7 @@ void KoDocument::setManager( KParts::PartManager *manager )
if ( manager )
{
- QPtrListIterator<KoDocumentChild> it( d->m_children );
+ TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren );
for (; it.current(); ++it )
if ( it.current()->document() )
manager->addPart( it.current()->document(), false );
@@ -602,11 +602,11 @@ void KoDocument::setReadWrite( bool readwrite )
{
KParts::ReadWritePart::setReadWrite( readwrite );
- QPtrListIterator<KoView> vIt( d->m_views );
+ TQPtrListIterator<KoView> vIt( d->m_views );
for (; vIt.current(); ++vIt )
vIt.current()->updateReadWrite( readwrite );
- QPtrListIterator<KoDocumentChild> dIt( d->m_children );
+ TQPtrListIterator<KoDocumentChild> dIt( d->m_tqchildren );
for (; dIt.current(); ++dIt )
if ( dIt.current()->document() )
dIt.current()->document()->setReadWrite( readwrite );
@@ -637,7 +637,7 @@ void KoDocument::removeView( KoView *view )
d->m_views.removeRef( view );
}
-const QPtrList<KoView>& KoDocument::views() const
+const TQPtrList<KoView>& KoDocument::views() const
{
return d->m_views;
}
@@ -651,12 +651,12 @@ void KoDocument::insertChild( KoDocumentChild *child )
{
setModified( true );
- d->m_children.append( child );
+ d->m_tqchildren.append( child );
- connect( child, SIGNAL( changed( KoChild * ) ),
- this, SLOT( slotChildChanged( KoChild * ) ) );
- connect( child, SIGNAL( destroyed() ),
- this, SLOT( slotChildDestroyed() ) );
+ connect( child, TQT_SIGNAL( changed( KoChild * ) ),
+ this, TQT_SLOT( slotChildChanged( KoChild * ) ) );
+ connect( child, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotChildDestroyed() ) );
// It may be that insertChild is called without the KoDocumentChild
// having a KoDocument attached, yet. This happens for example
@@ -681,23 +681,23 @@ void KoDocument::slotChildDestroyed()
setModified( true );
const KoDocumentChild *child = static_cast<const KoDocumentChild *>( sender() );
- d->m_children.removeRef( child );
+ d->m_tqchildren.removeRef( child );
}
-const QPtrList<KoDocumentChild>& KoDocument::children() const
+const TQPtrList<KoDocumentChild>& KoDocument::tqchildren() const
{
- return d->m_children;
+ return d->m_tqchildren;
}
-KParts::Part *KoDocument::hitTest( QWidget *widget, const QPoint &globalPos )
+KParts::Part *KoDocument::hitTest( TQWidget *widget, const TQPoint &globalPos )
{
- QPtrListIterator<KoView> it( d->m_views );
+ TQPtrListIterator<KoView> it( d->m_views );
for (; it.current(); ++it )
- if ( static_cast<QWidget *>(it.current()) == widget )
+ if ( static_cast<TQWidget *>(it.current()) == widget )
{
KoView* view = it.current();
d->hitTestView = view; // koffice-1.x hack
- QPoint canvasPos( view->canvas()->mapFromGlobal( globalPos ) );
+ TQPoint canvasPos( view->canvas()->mapFromGlobal( globalPos ) );
canvasPos.rx() += view->canvasXOffset();
canvasPos.ry() += view->canvasYOffset();
@@ -715,10 +715,10 @@ KoView* KoDocument::hitTestView()
return d->hitTestView;
}
-KoDocument* KoDocument::hitTest( const QPoint &pos, const QWMatrix &matrix )
+KoDocument* KoDocument::hitTest( const TQPoint &pos, const TQWMatrix &matrix )
{
// Call KoDocumentChild::hitTest for any child document
- QPtrListIterator<KoDocumentChild> it( d->m_children );
+ TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren );
for (; it.current(); ++it )
{
KoDocument *doc = it.current()->hitTest( pos, matrix );
@@ -732,7 +732,7 @@ KoDocument* KoDocument::hitTest( const QPoint &pos, const QWMatrix &matrix )
KoDocumentChild *KoDocument::child( KoDocument *doc )
{
- QPtrListIterator<KoDocumentChild> it( d->m_children );
+ TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren );
for (; it.current(); ++it )
if ( it.current()->document() == doc )
return it.current();
@@ -745,9 +745,9 @@ KoDocumentInfo *KoDocument::documentInfo() const
return d->m_docInfo;
}
-void KoDocument::setViewBuildDocument( KoView *view, const QDomDocument &doc )
+void KoDocument::setViewBuildDocument( KoView *view, const TQDomDocument &doc )
{
- if ( d->m_views.find( view ) == -1 )
+ if ( d->m_views.tqfind( view ) == -1 )
return;
uint viewIdx = d->m_views.at();
@@ -758,11 +758,11 @@ void KoDocument::setViewBuildDocument( KoView *view, const QDomDocument &doc )
d->m_viewBuildDocuments[ viewIdx ] = doc;
}
-QDomDocument KoDocument::viewBuildDocument( KoView *view )
+TQDomDocument KoDocument::viewBuildDocument( KoView *view )
{
- QDomDocument res;
+ TQDomDocument res;
- if ( d->m_views.find( view ) == -1 )
+ if ( d->m_views.tqfind( view ) == -1 )
return res;
uint viewIdx = d->m_views.at();
@@ -772,21 +772,21 @@ QDomDocument KoDocument::viewBuildDocument( KoView *view )
res = d->m_viewBuildDocuments[ viewIdx ];
- // make this entry empty. otherwise we get a segfault in QMap ;-(
- d->m_viewBuildDocuments[ viewIdx ] = QDomDocument();
+ // make this entry empty. otherwise we get a segfault in TQMap ;-(
+ d->m_viewBuildDocuments[ viewIdx ] = TQDomDocument();
return res;
}
-void KoDocument::paintEverything( QPainter &painter, const QRect &rect, bool transparent, KoView *view, double zoomX, double zoomY )
+void KoDocument::paintEverything( TQPainter &painter, const TQRect &rect, bool transparent, KoView *view, double zoomX, double zoomY )
{
paintContent( painter, rect, transparent, zoomX, zoomY );
paintChildren( painter, rect, view, zoomX, zoomY );
}
-void KoDocument::paintChildren( QPainter &painter, const QRect &/*rect*/, KoView *view, double zoomX, double zoomY )
+void KoDocument::paintChildren( TQPainter &painter, const TQRect &/*rect*/, KoView *view, double zoomX, double zoomY )
{
- QPtrListIterator<KoDocumentChild> it( d->m_children );
+ TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren );
for (; it.current(); ++it )
{
// #### todo: paint only if child is visible inside rect
@@ -796,12 +796,12 @@ void KoDocument::paintChildren( QPainter &painter, const QRect &/*rect*/, KoView
}
}
-void KoDocument::paintChild( KoDocumentChild *child, QPainter &painter, KoView *view, double zoomX, double zoomY )
+void KoDocument::paintChild( KoDocumentChild *child, TQPainter &painter, KoView *view, double zoomX, double zoomY )
{
if ( child->isDeleted() )
return;
- // QRegion rgn = painter.clipRegion();
+ // TQRegion rgn = painter.clipRegion();
child->transform( painter );
child->document()->paintEverything( painter, child->contentRect(), child->isTransparent(), view, zoomX, zoomY );
@@ -816,9 +816,9 @@ void KoDocument::paintChild( KoDocumentChild *child, QPainter &painter, KoView *
int w = int( (double)child->contentRect().width() * child->xScaling() );
int h = int( (double)child->contentRect().height() * child->yScaling() );
if ( ( manager->selectedPart() == (KParts::Part *)child->document() &&
- manager->selectedWidget() == (QWidget *)view ) ||
+ manager->selectedWidget() == (TQWidget *)view ) ||
( manager->activePart() == (KParts::Part *)child->document() &&
- manager->activeWidget() == (QWidget *)view ) )
+ manager->activeWidget() == (TQWidget *)view ) )
{
// painter.setClipRegion( rgn );
painter.setClipping( FALSE );
@@ -834,9 +834,9 @@ void KoDocument::paintChild( KoDocumentChild *child, QPainter &painter, KoView *
painter.fillRect( w, -5, 5, h + 10, BDiagPattern );
if ( manager->selectedPart() == (KParts::Part *)child->document() &&
- manager->selectedWidget() == (QWidget *)view )
+ manager->selectedWidget() == (TQWidget *)view )
{
- QColor color;
+ TQColor color;
if ( view->koDocument() == this )
color = black;
else
@@ -863,8 +863,8 @@ bool KoDocument::isModified() const
//kdDebug(30003)<<k_funcinfo<<" Modified doc='"<<url().url()<<"' extern="<<isStoredExtern()<<endl;
return true;
}
- // Then go through internally stored children (considered to be part of this doc)
- QPtrListIterator<KoDocumentChild> it = children();
+ // Then go through internally stored tqchildren (considered to be part of this doc)
+ TQPtrListIterator<KoDocumentChild> it = tqchildren();
for (; it.current(); ++it )
{
KoDocument *doc = it.current()->document();
@@ -876,9 +876,9 @@ bool KoDocument::isModified() const
bool KoDocument::saveChildren( KoStore* _store )
{
- //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl;
+ //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl;
int i = 0;
- QPtrListIterator<KoDocumentChild> it( children() );
+ TQPtrListIterator<KoDocumentChild> it( tqchildren() );
for( ; it.current(); ++it ) {
KoDocument* childDoc = it.current()->document();
if (childDoc && !it.current()->isDeleted())
@@ -886,7 +886,7 @@ bool KoDocument::saveChildren( KoStore* _store )
if ( !childDoc->isStoredExtern() )
{
//kdDebug(30003) << "KoDocument::saveChildren internal url: /" << i << endl;
- if ( !childDoc->saveToStore( _store, QString::number( i++ ) ) )
+ if ( !childDoc->saveToStore( _store, TQString::number( i++ ) ) )
return FALSE;
if (!isExporting ())
@@ -900,8 +900,8 @@ bool KoDocument::saveChildren( KoStore* _store )
bool KoDocument::saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter )
{
- //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl;
- QPtrListIterator<KoDocumentChild> it( children() );
+ //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl;
+ TQPtrListIterator<KoDocumentChild> it( tqchildren() );
for( ; it.current(); ++it ) {
KoDocument* childDoc = it.current()->document();
if ( childDoc && !it.current()->isDeleted() )
@@ -924,9 +924,9 @@ bool KoDocument::saveExternalChildren()
return true;
}
- //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl;
+ //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl;
KoDocumentChild *ch;
- QPtrListIterator<KoDocumentChild> it = children();
+ TQPtrListIterator<KoDocumentChild> it = tqchildren();
for (; (ch = it.current()); ++it )
{
if ( !ch->isDeleted() )
@@ -935,7 +935,7 @@ bool KoDocument::saveExternalChildren()
if ( doc && doc->isStoredExtern() && doc->isModified() )
{
kdDebug(30003)<<" save external doc='"<<url().url()<<"'"<<endl;
- doc->setDoNotSaveExtDoc(); // Only save doc + it's internal children
+ doc->setDoNotSaveExtDoc(); // Only save doc + it's internal tqchildren
if ( !doc->save() )
return false; // error
}
@@ -948,9 +948,9 @@ bool KoDocument::saveExternalChildren()
return true;
}
-bool KoDocument::saveNativeFormat( const QString & file )
+bool KoDocument::saveNativeFormat( const TQString & file )
{
- d->lastErrorMessage = QString::null;
+ d->lastErrorMessage = TQString();
//kdDebug(30003) << "Saving to store" << endl;
KoStore::Backend backend = KoStore::Auto;
@@ -971,10 +971,10 @@ bool KoDocument::saveNativeFormat( const QString & file )
else if ( d->m_specialOutputFlag == SaveAsFlatXML )
{
kdDebug(30003) << "Saving as a flat XML file." << endl;
- QFile f( file );
+ TQFile f( file );
if ( f.open( IO_WriteOnly | IO_Translate ) )
{
- bool success = saveToStream( &f );
+ bool success = saveToStream( TQT_TQIODEVICE(&f) );
f.close();
return success;
}
@@ -984,9 +984,9 @@ bool KoDocument::saveNativeFormat( const QString & file )
kdDebug(30003) << "KoDocument::saveNativeFormat nativeFormatMimeType=" << nativeFormatMimeType() << endl;
// OLD: bool oasis = d->m_specialOutputFlag == SaveAsOASIS;
- // OLD: QCString mimeType = oasis ? nativeOasisMimeType() : nativeFormatMimeType();
- QCString mimeType = d->outputMimeType;
- QCString nativeOasisMime = nativeOasisMimeType();
+ // OLD: TQCString mimeType = oasis ? nativeOasisMimeType() : nativeFormatMimeType();
+ TQCString mimeType = d->outputMimeType;
+ TQCString nativeOasisMime = nativeOasisMimeType();
bool oasis = !mimeType.isEmpty() && ( mimeType == nativeOasisMime || mimeType == nativeOasisMime + "-template" );
// TODO: use std::auto_ptr or create store on stack [needs API fixing],
// to remove all the 'delete store' in all the branches
@@ -1031,7 +1031,7 @@ bool KoDocument::saveNativeFormat( const QString & file )
}
else
{
- d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "meta.xml" );
+ d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "meta.xml" );
delete store;
return false;
}
@@ -1039,7 +1039,7 @@ bool KoDocument::saveNativeFormat( const QString & file )
if ( store->open( "Thumbnails/thumbnail.png" ) )
{
if ( !saveOasisPreview( store, manifestWriter ) || !store->close() ) {
- d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" );
+ d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" );
delete store;
return false;
}
@@ -1047,7 +1047,7 @@ bool KoDocument::saveNativeFormat( const QString & file )
}
else
{
- d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" );
+ d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" );
delete store;
return false;
}
@@ -1055,7 +1055,7 @@ bool KoDocument::saveNativeFormat( const QString & file )
// Write out manifest file
if ( !oasisStore.closeManifestWriter() )
{
- d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "META-INF/manifest.xml" );
+ d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "META-INF/manifest.xml" );
delete store;
return false;
}
@@ -1064,7 +1064,7 @@ bool KoDocument::saveNativeFormat( const QString & file )
}
else
{
- // Save internal children first since they might get a new url
+ // Save internal tqchildren first since they might get a new url
if ( !saveChildren( store ) && !oasis )
{
if ( d->lastErrorMessage.isEmpty() )
@@ -1086,16 +1086,16 @@ bool KoDocument::saveNativeFormat( const QString & file )
}
else
{
- d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "maindoc.xml" );
+ d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "maindoc.xml" );
delete store;
return false;
}
if ( store->open( "documentinfo.xml" ) )
{
- QDomDocument doc = d->m_docInfo->save();
+ TQDomDocument doc = d->m_docInfo->save();
KoStoreDevice dev( store );
- QCString s = doc.toCString(); // this is already Utf8!
+ TQCString s = doc.toCString(); // this is already Utf8!
(void)dev.writeBlock( s.data(), s.size()-1 );
(void)store->close();
}
@@ -1122,13 +1122,13 @@ bool KoDocument::saveNativeFormat( const QString & file )
return true;
}
-bool KoDocument::saveToStream( QIODevice * dev )
+bool KoDocument::saveToStream( TQIODevice * dev )
{
- QDomDocument doc = saveXML();
+ TQDomDocument doc = saveXML();
// Save to buffer
- QCString s = doc.toCString(); // utf8 already
- // We use QCString::size()-1 here, not the official QCString::length
- // It works here, as we are not modifying QCString as QByteArray
+ TQCString s = doc.toCString(); // utf8 already
+ // We use TQCString::size()-1 here, not the official TQCString::length
+ // It works here, as we are not modifying TQCString as TQByteArray
int nwritten = dev->writeBlock( s.data(), s.size()-1 );
if ( nwritten != (int)s.size()-1 )
kdWarning(30003) << "KoDocument::saveToStream wrote " << nwritten << " - expected " << s.size()-1 << endl;
@@ -1136,7 +1136,7 @@ bool KoDocument::saveToStream( QIODevice * dev )
}
// Called for embedded documents
-bool KoDocument::saveToStore( KoStore* _store, const QString & _path )
+bool KoDocument::saveToStore( KoStore* _store, const TQString & _path )
{
kdDebug(30003) << "Saving document to store " << _path << endl;
@@ -1146,7 +1146,7 @@ bool KoDocument::saveToStore( KoStore* _store, const QString & _path )
else // ugly hack to pass a relative URI
m_url = KURL( INTERNAL_PREFIX + _path );
- // To make the children happy cd to the correct directory
+ // To make the tqchildren happy cd to the correct directory
_store->pushDirectory();
_store->enterDirectory( _path );
@@ -1180,8 +1180,8 @@ bool KoDocument::saveToStore( KoStore* _store, const QString & _path )
bool KoDocument::saveOasisPreview( KoStore* store, KoXmlWriter* manifestWriter )
{
- const QPixmap pix = generatePreview( QSize( 128, 128 ) );
- QImage preview ( pix.convertToImage().convertDepth( 32, Qt::ColorOnly ) );
+ const TQPixmap pix = generatePreview( TQSize( 128, 128 ) );
+ TQImage preview ( pix.convertToImage().convertDepth( 32, Qt::ColorOnly ) );
if ( !preview.hasAlphaBuffer() )
{
preview.setAlphaBuffer( true );
@@ -1200,9 +1200,9 @@ bool KoDocument::saveOasisPreview( KoStore* store, KoXmlWriter* manifestWriter )
bool KoDocument::savePreview( KoStore* store )
{
- QPixmap pix = generatePreview(QSize(256, 256));
+ TQPixmap pix = generatePreview(TQSize(256, 256));
// Reducing to 8bpp reduces file sizes quite a lot.
- const QImage preview ( pix.convertToImage().convertDepth( 8, Qt::AvoidDither | Qt::DiffuseDither) );
+ const TQImage preview ( pix.convertToImage().convertDepth( 8, Qt::AvoidDither | Qt::DiffuseDither) );
KoStoreDevice io ( store );
if ( !io.open( IO_WriteOnly ) )
return false;
@@ -1212,24 +1212,24 @@ bool KoDocument::savePreview( KoStore* store )
return true;
}
-QPixmap KoDocument::generatePreview( const QSize& size )
+TQPixmap KoDocument::generatePreview( const TQSize& size )
{
double docWidth, docHeight;
- int pixmapSize = QMAX(size.width(), size.height());
+ int pixmapSize = TQMAX(size.width(), size.height());
if (m_pageLayout.ptWidth > 1.0) {
docWidth = m_pageLayout.ptWidth / 72 * KoGlobal::dpiX();
docHeight = m_pageLayout.ptHeight / 72 * KoGlobal::dpiY();
} else {
- // If we don't have a page layout, just draw the top left hand corner
+ // If we don't have a page tqlayout, just draw the top left hand corner
docWidth = 500.0;
docHeight = 500.0;
}
double ratio = docWidth / docHeight;
- QPixmap pix;
+ TQPixmap pix;
int previewWidth, previewHeight;
if (ratio > 1.0)
{
@@ -1244,22 +1244,22 @@ QPixmap KoDocument::generatePreview( const QSize& size )
pix.resize((int)docWidth, (int)docHeight);
- pix.fill( QColor( 245, 245, 245 ) );
+ pix.fill( TQColor( 245, 245, 245 ) );
- QRect rc(0, 0, pix.width(), pix.height());
+ TQRect rc(0, 0, pix.width(), pix.height());
- QPainter p;
+ TQPainter p;
p.begin(&pix);
paintEverything(p, rc, false);
p.end();
- // ### TODO: why re-convert it to a QPixmap, when mostly it will be re-converted back to a QImage in the calling function
+ // ### TODO: why re-convert it to a TQPixmap, when mostly it will be re-converted back to a TQImage in the calling function
pix.convertFromImage(pix.convertToImage().smoothScale(previewWidth, previewHeight));
return pix;
}
-QString KoDocument::autoSaveFile( const QString & path ) const
+TQString KoDocument::autoSaveFile( const TQString & path ) const
{
// set local again as it can happen that it gets resetted
// so that all saved numbers have a . and not e.g a , as a
@@ -1268,36 +1268,36 @@ QString KoDocument::autoSaveFile( const QString & path ) const
// Using the extension allows to avoid relying on the mime magic when opening
KMimeType::Ptr mime = KMimeType::mimeType( nativeFormatMimeType() );
- QString extension = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString extension = mime->property( "X-KDE-NativeExtension" ).toString();
if ( path.isEmpty() )
{
// Never saved? Use a temp file in $HOME then
// Yes, two open unnamed docs will overwrite each other's autosave file,
// but hmm, we can only do something if that's in the same process anyway...
- QString ret = QDir::homeDirPath() + "/." + QString::fromLatin1(instance()->instanceName()) + ".autosave" + extension;
+ TQString ret = TQDir::homeDirPath() + "/." + TQString::tqfromLatin1(instance()->instanceName()) + ".autosave" + extension;
return ret;
}
else
{
KURL url( path );
Q_ASSERT( url.isLocalFile() );
- QString dir = url.directory(false);
- QString filename = url.fileName();
+ TQString dir = url.directory(false);
+ TQString filename = url.fileName();
return dir + "." + filename + ".autosave" + extension;
}
}
bool KoDocument::checkAutoSaveFile()
{
- QString asf = autoSaveFile( QString::null ); // the one in $HOME
+ TQString asf = autoSaveFile( TQString() ); // the one in $HOME
//kdDebug(30003) << "asf=" << asf << endl;
- if ( QFile::exists( asf ) )
+ if ( TQFile::exists( asf ) )
{
- QDateTime date = QFileInfo(asf).lastModified();
- QString dateStr = date.toString(Qt::LocalDate);
+ TQDateTime date = TQFileInfo(asf).lastModified();
+ TQString dateStr = date.toString(Qt::LocalDate);
int res = KMessageBox::warningYesNoCancel(
0, i18n( "An autosaved file for an unnamed document exists in %1.\nThis file is dated %2\nDo you want to open it?" )
- .arg(asf, dateStr) );
+ .tqarg(asf, dateStr) );
switch(res) {
case KMessageBox::Yes : {
KURL url;
@@ -1308,7 +1308,7 @@ bool KoDocument::checkAutoSaveFile()
return ret;
}
case KMessageBox::No :
- QFile::remove( asf );
+ TQFile::remove( asf );
return false;
default: // Cancel
return false;
@@ -1344,12 +1344,12 @@ bool KoDocument::import( const KURL & _url )
bool KoDocument::openURL( const KURL & _url )
{
kdDebug(30003) << "KoDocument::openURL url=" << _url.url() << endl;
- d->lastErrorMessage = QString::null;
+ d->lastErrorMessage = TQString();
// Reimplemented, to add a check for autosave files and to improve error reporting
if ( !_url.isValid() )
{
- d->lastErrorMessage = i18n( "Malformed URL\n%1" ).arg( _url.url() ); // ## used anywhere ?
+ d->lastErrorMessage = i18n( "Malformed URL\n%1" ).tqarg( _url.url() ); // ## used anywhere ?
return false;
}
if ( !closeURL() )
@@ -1360,9 +1360,9 @@ bool KoDocument::openURL( const KURL & _url )
d->m_bLoading = true;
if ( url.isLocalFile() && d->m_shouldCheckAutoSaveFile )
{
- QString file = url.path();
- QString asf = autoSaveFile( file );
- if ( QFile::exists( asf ) )
+ TQString file = url.path();
+ TQString asf = autoSaveFile( file );
+ if ( TQFile::exists( asf ) )
{
//kdDebug(30003) << "KoDocument::openURL asf=" << asf << endl;
// ## TODO compare timestamps ?
@@ -1374,7 +1374,7 @@ bool KoDocument::openURL( const KURL & _url )
autosaveOpened = true;
break;
case KMessageBox::No :
- QFile::remove( asf );
+ TQFile::remove( asf );
break;
default: // Cancel
d->m_bLoading = false;
@@ -1393,7 +1393,7 @@ bool KoDocument::openURL( const KURL & _url )
//if ( d->m_shells.isEmpty() )
// kdWarning(30003) << "KoDocument::openURL no shell yet !" << endl;
// Add to recent actions list in our shells
- QPtrListIterator<KoMainWindow> it( d->m_shells );
+ TQPtrListIterator<KoMainWindow> it( d->m_shells );
for (; it.current(); ++it )
it.current()->addRecentURL( _url );
}
@@ -1403,33 +1403,33 @@ bool KoDocument::openURL( const KURL & _url )
bool KoDocument::openFile()
{
//kdDebug(30003) << "KoDocument::openFile for " << m_file << endl;
- if ( !QFile::exists(m_file) )
+ if ( !TQFile::exists(m_file) )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( d->m_autoErrorHandlingEnabled )
// Maybe offer to create a new document with that name ?
- KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(m_file) );
+ KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(m_file) );
d->m_bLoading = false;
return false;
}
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
d->m_specialOutputFlag = 0;
- QCString _native_format = nativeFormatMimeType();
+ TQCString _native_format = nativeFormatMimeType();
KURL u;
u.setPath( m_file );
- QString typeName = KMimeType::findByURL( u, 0, true )->name();
+ TQString typeName = KMimeType::findByURL( u, 0, true )->name();
// Allow to open backup files, don't keep the mimetype application/x-trash.
if ( typeName == "application/x-trash" )
{
- QString path = u.path();
- QStringList patterns = KMimeType::mimeType( typeName )->patterns();
+ TQString path = u.path();
+ TQStringList patterns = KMimeType::mimeType( typeName )->patterns();
// Find the extension that makes it a backup file, and remove it
- for( QStringList::Iterator it = patterns.begin(); it != patterns.end(); ++it ) {
- QString ext = *it;
+ for( TQStringList::Iterator it = patterns.begin(); it != patterns.end(); ++it ) {
+ TQString ext = *it;
if ( !ext.isEmpty() && ext[0] == '*' )
{
ext.remove(0, 1);
@@ -1451,18 +1451,18 @@ bool KoDocument::openFile()
}
kdDebug(30003) << "KoDocument::openFile " << m_file << " type:" << typeName << endl;
- QString importedFile = m_file;
+ TQString importedFile = m_file;
if ( !isNativeFormat( typeName.latin1() ) ) {
if ( !d->filterManager )
d->filterManager = new KoFilterManager( this );
- KoFilter::ConversionStatus status;
+ KoFilter::ConversiontqStatus status;
importedFile = d->filterManager->import( m_file, status );
if ( status != KoFilter::OK )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- QString msg;
+ TQString msg;
switch( status )
{
case KoFilter::OK: break;
@@ -1514,9 +1514,9 @@ bool KoDocument::openFile()
if( d->m_autoErrorHandlingEnabled && !msg.isEmpty())
{
- QString errorMsg( i18n( "Could not open\n%2.\nReason: %1" ) );
- QString docUrl = url().prettyURL( 0, KURL::StripFileProtocol );
- KMessageBox::error( 0L, errorMsg.arg(msg).arg(docUrl) );
+ TQString errorMsg( i18n( "Could not open\n%2.\nReason: %1" ) );
+ TQString docUrl = url().prettyURL( 0, KURL::StripFileProtocol );
+ KMessageBox::error( 0L, errorMsg.tqarg(msg).tqarg(docUrl) );
}
d->m_bLoading = false;
@@ -1526,7 +1526,7 @@ bool KoDocument::openFile()
<< "', status: " << static_cast<int>( status ) << endl;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
bool ok = true;
@@ -1563,7 +1563,7 @@ bool KoDocument::openFile()
// remove temp file - uncomment this to debug import filters
if(!importedFile.isEmpty()) {
- QFile::remove( importedFile );
+ TQFile::remove( importedFile );
}
}
@@ -1604,7 +1604,7 @@ bool KoDocument::openFile()
}
// shared between openFile and koMainWindow's "create new empty document" code
-void KoDocument::setMimeTypeAfterLoading( const QString& mimeType )
+void KoDocument::setMimeTypeAfterLoading( const TQString& mimeType )
{
d->mimeType = mimeType.latin1();
@@ -1616,18 +1616,18 @@ void KoDocument::setMimeTypeAfterLoading( const QString& mimeType )
}
// The caller must call store->close() if loadAndParse returns true.
-bool KoDocument::oldLoadAndParse(KoStore* store, const QString& filename, QDomDocument& doc)
+bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDomDocument& doc)
{
//kdDebug(30003) << "oldLoadAndParse: Trying to open " << filename << endl;
if (!store->open(filename))
{
kdWarning(30003) << "Entry " << filename << " not found!" << endl;
- d->lastErrorMessage = i18n( "Could not find %1" ).arg( filename );
+ d->lastErrorMessage = i18n( "Could not tqfind %1" ).tqarg( filename );
return false;
}
- // Error variables for QDomDocument::setContent
- QString errorMsg;
+ // Error variables for TQDomDocument::setContent
+ TQString errorMsg;
int errorLine, errorColumn;
bool ok = doc.setContent( store->device(), &errorMsg, &errorLine, &errorColumn );
if ( !ok )
@@ -1636,8 +1636,8 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const QString& filename, QDomDo
<< " In line: " << errorLine << ", column: " << errorColumn << endl
<< " Error message: " << errorMsg << endl;
d->lastErrorMessage = i18n( "Parsing error in %1 at line %2, column %3\nError message: %4" )
- .arg( filename ).arg( errorLine ).arg( errorColumn )
- .arg( i18n ( "QXml", errorMsg.utf8() ) );
+ .tqarg( filename ).tqarg( errorLine ).tqarg( errorColumn )
+ .tqarg( i18n ( "TQXml", errorMsg.utf8() ) );
store->close();
return false;
}
@@ -1645,32 +1645,32 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const QString& filename, QDomDo
return true;
}
-bool KoDocument::loadNativeFormat( const QString & file )
+bool KoDocument::loadNativeFormat( const TQString & file )
{
- QFileInfo fileInfo( file );
+ TQFileInfo fileInfo( file );
if ( !fileInfo.exists() ) // check duplicated from openURL, but this is useful for templates
{
- d->lastErrorMessage = i18n("The file %1 does not exist.").arg(file);
+ d->lastErrorMessage = i18n("The file %1 does not exist.").tqarg(file);
return false;
}
if ( !fileInfo.isFile() )
{
- d->lastErrorMessage = i18n( "%1 is not a file." ).arg(file);
+ d->lastErrorMessage = i18n( "%1 is not a file." ).tqarg(file);
return false;
}
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
kdDebug(30003) << "KoDocument::loadNativeFormat( " << file << " )" << endl;
- QFile in;
+ TQFile in;
bool isRawXML = false;
if ( d->m_specialOutputFlag != SaveAsDirectoryStore ) // Don't try to open a directory ;)
{
in.setName(file);
if ( !in.open( IO_ReadOnly ) )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
d->lastErrorMessage = i18n( "Could not open the file for reading (check read permissions)." );
return false;
}
@@ -1679,7 +1679,7 @@ bool KoDocument::loadNativeFormat( const QString & file )
char buf[5];
if ( in.readBlock( buf, 4 ) < 4 )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
in.close();
d->lastErrorMessage = i18n( "Could not read the beginning of the file." );
return false;
@@ -1693,16 +1693,16 @@ bool KoDocument::loadNativeFormat( const QString & file )
do {
if ( in.readBlock( buf , 1 ) < 1 )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
in.close();
d->lastErrorMessage = i18n( "Could not read the beginning of the file." );
return false;
}
- } while ( QChar( buf[0] ).isSpace() );
+ } while ( TQChar( buf[0] ).isSpace() );
if ( buf[0] == '<' ) { // First not-space character
if ( in.readBlock( buf , 4 ) < 4 )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
in.close();
d->lastErrorMessage = i18n( "Could not read the beginning of the file." );
return false;
@@ -1716,28 +1716,28 @@ bool KoDocument::loadNativeFormat( const QString & file )
if ( isRawXML )
{
in.at(0);
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
bool res;
if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) )
{
- res = loadXML( &in, doc );
+ res = loadXML( TQT_TQIODEVICE(&in), doc );
if ( res )
res = completeLoading( 0L );
}
else
{
- kdError (30003) << "Parsing Error! Aborting! (in KoDocument::loadNativeFormat (QFile))" << endl
+ kdError (30003) << "Parsing Error! Aborting! (in KoDocument::loadNativeFormat (TQFile))" << endl
<< " Line: " << errorLine << " Column: " << errorColumn << endl
<< " Message: " << errorMsg << endl;
d->lastErrorMessage = i18n( "parsing error in the main document at line %1, column %2\nError message: %3" )
- .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) );
+ .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( errorMsg.utf8() ) );
res=false;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
in.close();
m_bEmpty = false;
return res;
@@ -1749,16 +1749,16 @@ bool KoDocument::loadNativeFormat( const QString & file )
}
}
-bool KoDocument::loadNativeFormatFromStore( const QString& file )
+bool KoDocument::loadNativeFormatFromStore( const TQString& file )
{
KoStore::Backend backend = (d->m_specialOutputFlag == SaveAsDirectoryStore) ? KoStore::Directory : KoStore::Auto;
KoStore * store = KoStore::createStore( file, KoStore::Read, "", backend );
if ( store->bad() )
{
- d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).arg( file );
+ d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).tqarg( file );
delete store;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return false;
}
@@ -1773,7 +1773,7 @@ bool KoDocument::loadNativeFormatFromStore( const QString& file )
if ( !loadOasisFromStore( store ) ) {
delete store;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return false;
}
@@ -1781,21 +1781,21 @@ bool KoDocument::loadNativeFormatFromStore( const QString& file )
{
oasis = false;
- QDomDocument doc;
+ TQDomDocument doc;
bool ok = oldLoadAndParse( store, "root", doc );
if ( ok )
ok = loadXML( store->device(), doc );
if ( !ok )
{
delete store;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return false;
}
store->close();
if ( !loadChildren( store ) )
{
- kdError(30003) << "ERROR: Could not load children" << endl;
+ kdError(30003) << "ERROR: Could not load tqchildren" << endl;
// Don't abort, proceed nonetheless
}
@@ -1804,12 +1804,12 @@ bool KoDocument::loadNativeFormatFromStore( const QString& file )
kdError(30003) << "ERROR: No maindoc.xml" << endl;
d->lastErrorMessage = i18n( "Invalid document: no file 'maindoc.xml'." );
delete store;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return false;
}
if ( oasis && store->hasFile( "meta.xml" ) ) {
- QDomDocument metaDoc;
+ TQDomDocument metaDoc;
KoOasisStore oasisStore( store );
if ( oasisStore.loadAndParse( "meta.xml", metaDoc, d->lastErrorMessage ) ) {
d->m_docInfo->loadOasis( metaDoc );
@@ -1817,7 +1817,7 @@ bool KoDocument::loadNativeFormatFromStore( const QString& file )
}
else if ( !oasis && store->hasFile( "documentinfo.xml" ) )
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( oldLoadAndParse( store, "documentinfo.xml", doc ) ) {
store->close();
d->m_docInfo->load( doc );
@@ -1832,17 +1832,17 @@ bool KoDocument::loadNativeFormatFromStore( const QString& file )
bool res = completeLoading( store );
delete store;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_bEmpty = false;
return res;
}
// For embedded documents
-bool KoDocument::loadFromStore( KoStore* _store, const QString& url )
+bool KoDocument::loadFromStore( KoStore* _store, const TQString& url )
{
if ( _store->open( url ) )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( _store->device() );
if ( !loadXML( _store->device(), doc ) )
{
@@ -1865,7 +1865,7 @@ bool KoDocument::loadFromStore( KoStore* _store, const QString& url )
if ( !loadChildren( _store ) )
{
- kdError(30003) << "ERROR: Could not load children" << endl;
+ kdError(30003) << "ERROR: Could not load tqchildren" << endl;
#if 0
return false;
#endif
@@ -1882,14 +1882,14 @@ bool KoDocument::loadFromStore( KoStore* _store, const QString& url )
bool KoDocument::loadOasisFromStore( KoStore* store )
{
KoOasisStyles oasisStyles;
- QDomDocument contentDoc;
- QDomDocument settingsDoc;
+ TQDomDocument contentDoc;
+ TQDomDocument settingsDoc;
KoOasisStore oasisStore( store );
bool ok = oasisStore.loadAndParse( "content.xml", contentDoc, d->lastErrorMessage );
if ( !ok )
return false;
- QDomDocument stylesDoc;
+ TQDomDocument stylesDoc;
(void)oasisStore.loadAndParse( "styles.xml", stylesDoc, d->lastErrorMessage );
// Load styles from style.xml
oasisStyles.createStyleMap( stylesDoc, true );
@@ -1898,7 +1898,7 @@ bool KoDocument::loadOasisFromStore( KoStore* store )
// TODO post 1.4, pass manifestDoc to the apps so that they don't have to do it themselves
// (when calling KoDocumentChild::loadOasisDocument)
- //QDomDocument manifestDoc;
+ //TQDomDocument manifestDoc;
//KoOasisStore oasisStore( store );
//if ( !oasisStore.loadAndParse( "tar:/META-INF/manifest.xml", manifestDoc, d->lastErrorMessage ) )
// return false;
@@ -1967,7 +1967,7 @@ void KoDocument::setModified( bool mod )
m_bEmpty = FALSE;
} else {
// When saving this document, all non-external child documents get saved too.
- QPtrListIterator<KoDocumentChild> it = children();
+ TQPtrListIterator<KoDocumentChild> it = tqchildren();
for (; it.current(); ++it )
{
KoDocument *doc = it.current()->document();
@@ -1990,7 +1990,7 @@ int KoDocument::queryCloseDia()
{
//kdDebug(30003)<<k_funcinfo<<endl;
- QString name;
+ TQString name;
if ( documentInfo() )
{
name = documentInfo()->title();
@@ -2002,7 +2002,7 @@ int KoDocument::queryCloseDia()
name = i18n( "Untitled" );
int res = KMessageBox::warningYesNoCancel( 0L,
- i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name));
+ i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name));
switch(res)
{
@@ -2023,9 +2023,9 @@ int KoDocument::queryCloseDia()
int KoDocument::queryCloseExternalChildren()
{
- //kdDebug(30003)<<k_funcinfo<<" checking for children in: "<<url().url()<<endl;
+ //kdDebug(30003)<<k_funcinfo<<" checking for tqchildren in: "<<url().url()<<endl;
setDoNotSaveExtDoc(false);
- QPtrListIterator<KoDocumentChild> it( children() );
+ TQPtrListIterator<KoDocumentChild> it( tqchildren() );
for (; it.current(); ++it )
{
if ( !it.current()->isDeleted() )
@@ -2053,17 +2053,17 @@ int KoDocument::queryCloseExternalChildren()
return KMessageBox::Ok;
}
-void KoDocument::setTitleModified( const QString caption, bool mod )
+void KoDocument::setTitleModified( const TQString caption, bool mod )
{
//kdDebug(30003)<<k_funcinfo<<" url: "<<url().url()<<" caption: "<<caption<<" mod: "<<mod<<endl;
- KoDocument *doc = dynamic_cast<KoDocument *>( parent() );
+ KoDocument *doc = dynamic_cast<KoDocument *>( tqparent() );
if ( doc )
{
doc->setTitleModified( caption, mod );
return;
}
// we must be root doc so update caption in all related windows
- QPtrListIterator<KoMainWindow> it( d->m_shells );
+ TQPtrListIterator<KoMainWindow> it( d->m_shells );
for (; it.current(); ++it )
{
it.current()->updateCaption();
@@ -2075,14 +2075,14 @@ void KoDocument::setTitleModified( const QString caption, bool mod )
void KoDocument::setTitleModified()
{
//kdDebug(30003)<<k_funcinfo<<" url: "<<url().url()<<" extern: "<<isStoredExtern()<<" current: "<<d->m_current<<endl;
- KoDocument *doc = dynamic_cast<KoDocument *>( parent() );
- QString caption;
+ KoDocument *doc = dynamic_cast<KoDocument *>( tqparent() );
+ TQString caption;
if ( (url().isEmpty() || isStoredExtern()) && d->m_current )
{
// Get caption from document info (title(), in about page)
if ( documentInfo() )
{
- KoDocumentInfoPage * page = documentInfo()->page( QString::fromLatin1("about") );
+ KoDocumentInfoPage * page = documentInfo()->page( TQString::tqfromLatin1("about") );
if (page)
caption = static_cast<KoDocumentInfoAbout *>(page)->title();
}
@@ -2124,27 +2124,27 @@ bool KoDocument::completeSaving( KoStore* )
return true;
}
-QDomDocument KoDocument::createDomDocument( const QString& tagName, const QString& version ) const
+TQDomDocument KoDocument::createDomDocument( const TQString& tagName, const TQString& version ) const
{
return createDomDocument( instance()->instanceName(), tagName, version );
}
//static
-QDomDocument KoDocument::createDomDocument( const QString& appName, const QString& tagName, const QString& version )
+TQDomDocument KoDocument::createDomDocument( const TQString& appName, const TQString& tagName, const TQString& version )
{
- QDomImplementation impl;
- QString url = QString("http://www.koffice.org/DTD/%1-%1.dtd").arg(appName).arg(version);
- QDomDocumentType dtype = impl.createDocumentType( tagName,
- QString("-//KDE//DTD %1 %1//EN").arg(appName).arg(version),
+ TQDomImplementation impl;
+ TQString url = TQString("http://www.koffice.org/DTD/%1-%1.dtd").tqarg(appName).tqarg(version);
+ TQDomDocumentType dtype = impl.createDocumentType( tagName,
+ TQString("-//KDE//DTD %1 %1//EN").tqarg(appName).tqarg(version),
url );
// The namespace URN doesn't need to include the version number.
- QString namespaceURN = QString("http://www.koffice.org/DTD/%1").arg(appName);
- QDomDocument doc = impl.createDocument( namespaceURN, tagName, dtype );
+ TQString namespaceURN = TQString("http://www.koffice.org/DTD/%1").tqarg(appName);
+ TQDomDocument doc = impl.createDocument( namespaceURN, tagName, dtype );
doc.insertBefore( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ), doc.documentElement() );
return doc;
}
-KoXmlWriter* KoDocument::createOasisXmlWriter( QIODevice* dev, const char* rootElementName )
+KoXmlWriter* KoDocument::createOasisXmlWriter( TQIODevice* dev, const char* rootElementName )
{
KoXmlWriter* writer = new KoXmlWriter( dev );
writer->startDocument( rootElementName );
@@ -2176,11 +2176,11 @@ KoXmlWriter* KoDocument::createOasisXmlWriter( QIODevice* dev, const char* rootE
return writer;
}
-QDomDocument KoDocument::saveXML()
+TQDomDocument KoDocument::saveXML()
{
kdError(30003) << "KoDocument::saveXML not implemented" << endl;
d->lastErrorMessage = i18n( "Internal error: saveXML not implemented" );
- return QDomDocument();
+ return TQDomDocument();
}
KService::Ptr KoDocument::nativeService()
@@ -2191,15 +2191,15 @@ KService::Ptr KoDocument::nativeService()
return m_nativeService;
}
-QCString KoDocument::nativeFormatMimeType() const
+TQCString KoDocument::nativeFormatMimeType() const
{
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service )
- return QCString();
- QCString nativeMimeType = service->property( "X-KDE-NativeMimeType" ).toString().latin1();
+ return TQCString();
+ TQCString nativeMimeType = service->property( "X-KDE-NativeMimeType" ).toString().latin1();
if ( nativeMimeType.isEmpty() ) {
// shouldn't happen, let's find out why it happened
- if ( !service->serviceTypes().contains( "KOfficePart" ) )
+ if ( !service->serviceTypes().tqcontains( "KOfficePart" ) )
kdWarning(30003) << "Wrong desktop file, KOfficePart isn't mentionned" << endl;
else if ( !KServiceType::serviceType( "KOfficePart" ) )
kdWarning(30003) << "The KOfficePart service type isn't installed!" << endl;
@@ -2207,11 +2207,11 @@ QCString KoDocument::nativeFormatMimeType() const
return nativeMimeType;
}
-QCString KoDocument::nativeOasisMimeType() const
+TQCString KoDocument::nativeOasisMimeType() const
{
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service )
- return QCString();
+ return TQCString();
return service->property( "X-KDE-NativeOasisMimeType" ).toString().latin1();
}
@@ -2219,10 +2219,10 @@ QCString KoDocument::nativeOasisMimeType() const
//static
KService::Ptr KoDocument::readNativeService( KInstance *instance )
{
- QString instname = instance ? instance->instanceName() : kapp->instanceName();
+ TQString instname = instance ? instance->instanceName() : kapp->instanceName();
// The new way is: we look for a foopart.desktop in the kde_services dir.
- QString servicepartname = instname + "part.desktop";
+ TQString servicepartname = instname + "part.desktop";
KService::Ptr service = KService::serviceByDesktopPath( servicepartname );
if ( service )
kdDebug(30003) << servicepartname << " found." << endl;
@@ -2233,7 +2233,7 @@ KService::Ptr KoDocument::readNativeService( KInstance *instance )
// Try by path first, so that we find the global one (which has the native mimetype)
// even if the user created a kword.desktop in ~/.kde/share/applnk or any subdir of it.
// If he created it under ~/.kde/share/applnk/Office/ then no problem anyway.
- service = KService::serviceByDesktopPath( QString::fromLatin1("Office/%1.desktop").arg(instname) );
+ service = KService::serviceByDesktopPath( TQString::tqfromLatin1("Office/%1.desktop").tqarg(instname) );
}
if ( !service )
service = KService::serviceByDesktopName( instname );
@@ -2241,11 +2241,11 @@ KService::Ptr KoDocument::readNativeService( KInstance *instance )
return service;
}
-QCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
+TQCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
{
KService::Ptr service = readNativeService( instance );
if ( !service )
- return QCString();
+ return TQCString();
if ( service->property( "X-KDE-NativeMimeType" ).toString().isEmpty() )
{
@@ -2253,7 +2253,7 @@ QCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
if ( KServiceType::serviceType( "KOfficePart" ) == 0L )
kdError(30003) << "The serviceType KOfficePart is missing. Check that you have a kofficepart.desktop file in the share/servicetypes directory." << endl;
else {
- QString instname = instance ? instance->instanceName() : kapp->instanceName();
+ TQString instname = instance ? instance->instanceName() : kapp->instanceName();
if ( instname != "koshell" ) // hack for koshell
kdWarning(30003) << service->desktopEntryPath() << ": no X-KDE-NativeMimeType entry!" << endl;
}
@@ -2262,15 +2262,15 @@ QCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
return service->property( "X-KDE-NativeMimeType" ).toString().latin1();
}
-QStringList KoDocument::readExtraNativeMimeTypes( KInstance *instance ) //static
+TQStringList KoDocument::readExtraNativeMimeTypes( KInstance *instance ) //static
{
KService::Ptr service = readNativeService( instance );
if ( !service )
- return QStringList();
+ return TQStringList();
return service->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
}
-void KoDocument::setupXmlReader( QXmlSimpleReader& reader, bool namespaceProcessing )
+void KoDocument::setupXmlReader( TQXmlSimpleReader& reader, bool namespaceProcessing )
{
if ( namespaceProcessing )
{
@@ -2286,16 +2286,16 @@ void KoDocument::setupXmlReader( QXmlSimpleReader& reader, bool namespaceProcess
}
-bool KoDocument::isNativeFormat( const QCString& mimetype ) const
+bool KoDocument::isNativeFormat( const TQCString& mimetype ) const
{
if ( mimetype == nativeFormatMimeType() )
return true;
- return extraNativeMimeTypes().contains( mimetype );
+ return extraNativeMimeTypes().tqcontains( mimetype );
}
-QStringList KoDocument::extraNativeMimeTypes() const
+TQStringList KoDocument::extraNativeMimeTypes() const
{
- QStringList lst;
+ TQStringList lst;
// This implementation is temporary while we treat both koffice-1.3 and OASIS formats as native.
// But it's good to have this virtual method, in case some app want to
// support more than one native format.
@@ -2315,7 +2315,7 @@ int KoDocument::supportedSpecialFormats() const
void KoDocument::addShell( KoMainWindow *shell )
{
- if ( d->m_shells.findRef( shell ) == -1 )
+ if ( d->m_shells.tqfindRef( shell ) == -1 )
{
//kdDebug(30003) << "addShell: shell " << (void*)shell << " added to doc " << this << endl;
d->m_shells.append( shell );
@@ -2328,7 +2328,7 @@ void KoDocument::removeShell( KoMainWindow *shell )
d->m_shells.removeRef( shell );
}
-const QPtrList<KoMainWindow>& KoDocument::shells() const
+const TQPtrList<KoMainWindow>& KoDocument::shells() const
{
return d->m_shells;
}
@@ -2345,17 +2345,17 @@ DCOPObject * KoDocument::dcopObject()
return d->m_dcopObject;
}
-QCString KoDocument::dcopObjectId() const
+TQCString KoDocument::dcopObjectId() const
{
return const_cast<KoDocument *>(this)->dcopObject()->objId();
}
-void KoDocument::setErrorMessage( const QString& errMsg )
+void KoDocument::setErrorMessage( const TQString& errMsg )
{
d->lastErrorMessage = errMsg;
}
-QString KoDocument::errorMessage() const
+TQString KoDocument::errorMessage() const
{
return d->lastErrorMessage;
}
@@ -2364,11 +2364,11 @@ void KoDocument::showSavingErrorDialog()
{
if ( d->lastErrorMessage.isEmpty() )
{
- KMessageBox::error( 0L, i18n( "Could not save\n%1" ).arg( m_file ) );
+ KMessageBox::error( 0L, i18n( "Could not save\n%1" ).tqarg( m_file ) );
}
else if ( d->lastErrorMessage != "USER_CANCELED" )
{
- KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).arg( m_file, d->lastErrorMessage ) );
+ KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).tqarg( m_file, d->lastErrorMessage ) );
}
}
@@ -2376,11 +2376,11 @@ void KoDocument::showLoadingErrorDialog()
{
if ( d->lastErrorMessage.isEmpty() )
{
- KMessageBox::error( 0L, i18n( "Could not open\n%1" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ) ) );
+ KMessageBox::error( 0L, i18n( "Could not open\n%1" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ) ) );
}
else if ( d->lastErrorMessage != "USER_CANCELED" )
{
- KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) );
+ KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) );
}
}
@@ -2397,12 +2397,12 @@ bool KoDocument::isLoading() const
void KoDocument::removeAutoSaveFiles()
{
// Eliminate any auto-save file
- QString asf = autoSaveFile( m_file ); // the one in the current dir
- if ( QFile::exists( asf ) )
- QFile::remove( asf );
- asf = autoSaveFile( QString::null ); // and the one in $HOME
- if ( QFile::exists( asf ) )
- QFile::remove( asf );
+ TQString asf = autoSaveFile( m_file ); // the one in the current dir
+ if ( TQFile::exists( asf ) )
+ TQFile::remove( asf );
+ asf = autoSaveFile( TQString() ); // and the one in $HOME
+ if ( TQFile::exists( asf ) )
+ TQFile::remove( asf );
}
void KoDocument::setBackupFile( bool _b )
@@ -2416,12 +2416,12 @@ bool KoDocument::backupFile()const
}
-void KoDocument::setBackupPath( const QString & _path)
+void KoDocument::setBackupPath( const TQString & _path)
{
d->m_backupPath = _path;
}
-QString KoDocument::backupPath()const
+TQString KoDocument::backupPath()const
{
return d->m_backupPath;
}
@@ -2429,7 +2429,7 @@ QString KoDocument::backupPath()const
void KoDocument::setCurrent( bool on )
{
//kdDebug(30003)<<k_funcinfo<<" url: "<<url().url()<<" set to: "<<on<<endl;
- KoDocument *doc = dynamic_cast<KoDocument *>( parent() );
+ KoDocument *doc = dynamic_cast<KoDocument *>( tqparent() );
if ( doc )
{
if ( !isStoredExtern() )
@@ -2442,7 +2442,7 @@ void KoDocument::setCurrent( bool on )
d->m_current = on;
if ( !on )
{
- doc->setCurrent( true ); // let my next external parent take over
+ doc->setCurrent( true ); // let my next external tqparent take over
return;
}
doc->forceCurrent( false ); // everybody else should keep off
@@ -2457,7 +2457,7 @@ void KoDocument::forceCurrent( bool on )
{
//kdDebug(30003)<<k_funcinfo<<" url: "<<url().url()<<" force to: "<<on<<endl;
d->m_current = on;
- KoDocument *doc = dynamic_cast<KoDocument *>( parent() );
+ KoDocument *doc = dynamic_cast<KoDocument *>( tqparent() );
if ( doc )
{
doc->forceCurrent( false );
@@ -2505,7 +2505,7 @@ static const struct {
};
static const unsigned int numTN2DT = sizeof( TN2DTArray ) / sizeof( *TN2DTArray );
-QString KoDocument::tagNameToDocumentType( const QString& localName )
+TQString KoDocument::tagNameToDocumentType( const TQString& localName )
{
for ( unsigned int i = 0 ; i < numTN2DT ; ++i )
if ( localName == TN2DTArray[i].localName )
@@ -2513,9 +2513,9 @@ QString KoDocument::tagNameToDocumentType( const QString& localName )
return localName;
}
-QValueList<KoTextDocument *> KoDocument::allTextDocuments() const
+TQValueList<KoTextDocument *> KoDocument::allTextDocuments() const
{
- return QValueList<KoTextDocument *>();
+ return TQValueList<KoTextDocument *>();
}
KoPageLayout KoDocument::pageLayout(int /*pageNumber*/) const
@@ -2537,16 +2537,16 @@ void KoDocument::setUnit( KoUnit::Unit unit )
}
}
-QString KoDocument::unitName() const
+TQString KoDocument::unitName() const
{
return KoUnit::unitName( unit() );
}
-void KoDocument::showStartUpWidget( KoMainWindow* parent, bool alwaysShow )
+void KoDocument::showStartUpWidget( KoMainWindow* tqparent, bool alwaysShow )
{
if(!alwaysShow) {
KConfigGroup cfgGrp( instance()->config(), "TemplateChooserDialog" );
- QString fullTemplateName = cfgGrp.readPathEntry( "AlwaysUseTemplate" );
+ TQString fullTemplateName = cfgGrp.readPathEntry( "AlwaysUseTemplate" );
if( !fullTemplateName.isEmpty() ) {
openTemplate( fullTemplateName );
@@ -2558,24 +2558,24 @@ void KoDocument::showStartUpWidget( KoMainWindow* parent, bool alwaysShow )
if(d->m_startUpWidget){
d->m_startUpWidget->show();
} else {
- d->m_startUpWidget = createOpenPane( parent->centralWidget(), instance(), templateType() );
+ d->m_startUpWidget = createOpenPane( tqparent->centralWidget(), instance(), templateType() );
}
- parent->setDocToOpen( this );
- parent->factory()->container("mainToolBar", parent)->hide();
+ tqparent->setDocToOpen( this );
+ tqparent->factory()->container("mainToolBar", tqparent)->hide();
}
-void KoDocument::openExistingFile( const QString& file )
+void KoDocument::openExistingFile( const TQString& file )
{
KURL url( file );
bool ok = openURL( url );
setModified( false );
if( ok )
- QTimer::singleShot( 0, this, SLOT( deleteOpenPane() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteOpenPane() ) );
}
-void KoDocument::openTemplate( const QString& file )
+void KoDocument::openTemplate( const TQString& file )
{
bool ok = loadNativeFormat( file );
setModified( false );
@@ -2600,31 +2600,31 @@ void KoDocument::startCustomDocument() {
deleteOpenPane();
}
-KoOpenPane* KoDocument::createOpenPane( QWidget* parent, KInstance* instance,
- const QString& templateType )
+KoOpenPane* KoDocument::createOpenPane( TQWidget* tqparent, KInstance* instance,
+ const TQString& templateType )
{
- KoOpenPane* openPane = new KoOpenPane( parent, instance, templateType );
- QWidget *customDoc = createCustomDocumentWidget(openPane);
+ KoOpenPane* openPane = new KoOpenPane( tqparent, instance, templateType );
+ TQWidget *customDoc = createCustomDocumentWidget(openPane);
if(customDoc) {
openPane->setCustomDocumentWidget( customDoc );
- connect( customDoc, SIGNAL( documentSelected() ), this, SLOT( startCustomDocument() ) );
+ connect( customDoc, TQT_SIGNAL( documentSelected() ), this, TQT_SLOT( startCustomDocument() ) );
}
openPane->show();
- connect( openPane, SIGNAL( openExistingFile( const QString& ) ),
- this, SLOT( openExistingFile( const QString& ) ) );
- connect( openPane, SIGNAL( openTemplate( const QString& ) ),
- this, SLOT( openTemplate( const QString& ) ) );
+ connect( openPane, TQT_SIGNAL( openExistingFile( const TQString& ) ),
+ this, TQT_SLOT( openExistingFile( const TQString& ) ) );
+ connect( openPane, TQT_SIGNAL( openTemplate( const TQString& ) ),
+ this, TQT_SLOT( openTemplate( const TQString& ) ) );
return openPane;
}
-void KoDocument::setTemplateType( const QString& _templateType )
+void KoDocument::setTemplateType( const TQString& _templateType )
{
d->m_templateType = _templateType;
}
-QString KoDocument::templateType() const
+TQString KoDocument::templateType() const
{
return d->m_templateType;
}
@@ -2633,7 +2633,7 @@ void KoDocument::deleteOpenPane()
{
if( d->m_startUpWidget ) {
d->m_startUpWidget->hide();
- QTimer::singleShot(1000, this, SLOT(deleteOpenPaneDelayed()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(deleteOpenPaneDelayed()));
shells().getFirst()->factory()->container("mainToolBar", shells().getFirst())->show();
shells().getFirst()->setRootDocument( this );
@@ -2648,20 +2648,20 @@ void KoDocument::deleteOpenPaneDelayed()
d->m_startUpWidget = 0;
}
-QWidget* KoDocument::createCustomDocumentWidget(QWidget */*parent*/) {
+TQWidget* KoDocument::createCustomDocumentWidget(TQWidget */*tqparent*/) {
return 0;
}
-bool KoDocument::showEmbedInitDialog(QWidget* parent)
+bool KoDocument::showEmbedInitDialog(TQWidget* tqparent)
{
- KDialogBase dlg(parent, "EmbedInitDialog", true, i18n("Embedding Object"), 0, KDialogBase::NoDefault);
+ KDialogBase dlg(tqparent, "EmbedInitDialog", true, i18n("Embedding Object"), 0, KDialogBase::NoDefault);
KoOpenPane* pane = createOpenPane(&dlg, instance(), templateType());
- pane->layout()->setMargin(0);
+ pane->tqlayout()->setMargin(0);
dlg.setMainWidget(pane);
dlg.setInitialSize(dlg.configDialogSize("EmbedInitDialog"));
- connect(this, SIGNAL(closeEmbedInitDialog()), &dlg, SLOT(slotOk()));
+ connect(this, TQT_SIGNAL(closeEmbedInitDialog()), &dlg, TQT_SLOT(slotOk()));
- bool ok = dlg.exec() == QDialog::Accepted;
+ bool ok = dlg.exec() == TQDialog::Accepted;
dlg.saveDialogSize("EmbedInitDialog");
diff --git a/lib/kofficecore/KoDocument.h b/lib/kofficecore/KoDocument.h
index 1e8f1f83..0499ab6c 100644
--- a/lib/kofficecore/KoDocument.h
+++ b/lib/kofficecore/KoDocument.h
@@ -25,7 +25,7 @@
class KoTextDocument;
namespace std { }
using namespace std;
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <kparts/part.h>
#include <kurl.h>
@@ -35,9 +35,9 @@ using namespace std;
#include <KoPageLayout.h>
#include <koffice_export.h>
-class QDomElement;
-class QDomDocument;
-class QXmlSimpleReader;
+class TQDomElement;
+class TQDomDocument;
+class TQXmlSimpleReader;
class KoStore;
class KoMainWindow;
@@ -61,8 +61,9 @@ class KoOpenPane;
class KOFFICECORE_EXPORT KoDocument : public KParts::ReadWritePart
{
Q_OBJECT
- Q_PROPERTY( QCString dcopObjectId READ dcopObjectId)
- Q_PROPERTY( bool backupFile READ backupFile WRITE setBackupFile )
+ TQ_OBJECT
+ TQ_PROPERTY( TQCString dcopObjectId READ dcopObjectId)
+ TQ_PROPERTY( bool backupFile READ backupFile WRITE setBackupFile )
public:
@@ -70,24 +71,24 @@ public:
* Constructor.
* The first 4 arguments are the same as the ones passed to KParts::Factory::createPart.
*
- * @param parentWidget the parent widget, in case we create a wrapper widget
+ * @param tqparentWidget the tqparent widget, in case we create a wrapper widget
* (in single view mode).
* Usually the first argument passed by KParts::Factory::createPart.
* @param widgetName name of the widget.
- * @param parent may be another KoDocument, or anything else.
+ * @param tqparent may be another KoDocument, or anything else.
* Usually the third argument of KParts::Factory::createPart.
* @param name is used to identify this document via DCOP so you may want to
* pass a meaningful name here which matches the pattern [A-Za-z_][A-Za-z_0-9]*.
* @param singleViewMode determines whether the document may only have one view. In this case
- * the @p parent must be a QWidget derived class. KoDocument will then create a wrapper widget
- * (KoViewWrapperWidget) which is a child of @p parentWidget.
+ * the @p tqparent must be a TQWidget derived class. KoDocument will then create a wrapper widget
+ * (KoViewWrapperWidget) which is a child of @p tqparentWidget.
* This widget can be retrieved by calling widget().
*
* @todo explain what the purpose of widgetName is.
*/
- KoDocument( QWidget* parentWidget,
+ KoDocument( TQWidget* tqparentWidget,
const char* widgetName,
- QObject* parent,
+ TQObject* tqparent,
const char* name,
bool singleViewMode = false );
@@ -125,13 +126,13 @@ public:
* @see KXMLGUIClient::actionCollection
* @see KoView::action
*/
- virtual KAction *action( const QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
/**
* Returns the DOM document which describes the GUI of the
* first view.
*/
- virtual QDomDocument domDocument() const;
+ virtual TQDomDocument domDocument() const;
/**
* @internal
@@ -187,7 +188,7 @@ public:
* @see KService
* @see KDesktopFile
*/
- static QCString readNativeFormatMimeType( KInstance *instance = 0 );
+ static TQCString readNativeFormatMimeType( KInstance *instance = 0 );
/**
* Used by KoMainWindow, when no document exists yet.
@@ -199,7 +200,7 @@ public:
* @see KService
* @see KDesktopFile
*/
- static QStringList readExtraNativeMimeTypes( KInstance *instance = 0 );
+ static TQStringList readExtraNativeMimeTypes( KInstance *instance = 0 );
/**
* With the help of @p instance or KApplication::instance() this
@@ -211,7 +212,7 @@ public:
/**
* setup the XML reader, so that we don't have to duplicate the code.
*/
- static void setupXmlReader( QXmlSimpleReader& reader, bool namespaceProcessing = false );
+ static void setupXmlReader( TQXmlSimpleReader& reader, bool namespaceProcessing = false );
/**
* To be preferred when a document exists. It is fast when calling
@@ -220,20 +221,20 @@ public:
* This comes from the X-KDE-NativeMimeType key in the .desktop file
* You do NOT have to reimplement this (it is only virtual for kounavail).
*/
- virtual QCString nativeFormatMimeType() const;
+ virtual TQCString nativeFormatMimeType() const;
/**
* Returns the OASIS OpenDocument mimetype of the document, if supported
* This comes from the X-KDE-NativeOasisMimeType key in the .desktop file
*/
- QCString nativeOasisMimeType() const;
+ TQCString nativeOasisMimeType() const;
/// Checks whether a given mimetype can be handled natively.
- bool isNativeFormat( const QCString& mimetype ) const;
+ bool isNativeFormat( const TQCString& mimetype ) const;
/// Returns a list of the mimetypes considered "native", i.e. which can
/// be saved by KoDocument without a filter, in *addition* to the main one
- virtual QStringList extraNativeMimeTypes() const;
+ virtual TQStringList extraNativeMimeTypes() const;
/// Enum values used by specialOutputFlag - note that it's a bitfield for supportedSpecialFormats
enum { /*SaveAsKOffice1dot1 = 1,*/ // old and removed
@@ -251,7 +252,7 @@ public:
/**
* Returns the actual mimetype of the document
*/
- QCString mimeType() const;
+ TQCString mimeType() const;
/**
* @brief Sets the mime type for the document.
@@ -259,7 +260,7 @@ public:
* When choosing "save as" this is also the mime type
* selected by default.
*/
- void setMimeType( const QCString & mimeType );
+ void setMimeType( const TQCString & mimeType );
/**
* @brief Set the format in which the document should be saved.
@@ -270,8 +271,8 @@ public:
* @param mimeType the mime type (format) to use.
* @param specialOutputFlag is for "save as older version" etc.
*/
- void setOutputMimeType( const QCString & mimeType, int specialOutputFlag = 0 );
- QCString outputMimeType() const;
+ void setOutputMimeType( const TQCString & mimeType, int specialOutputFlag = 0 );
+ TQCString outputMimeType() const;
int specialOutputFlag() const;
/**
@@ -298,14 +299,14 @@ public:
* If you asked the user about something and he chose "Cancel",
* set the message to the magic string "USER_CANCELED", to skip the error dialog.
*/
- void setErrorMessage( const QString& errMsg );
+ void setErrorMessage( const TQString& errMsg );
/**
* Return the last error message. Usually KoDocument takes care of
* showing it; this method is mostly provided for non-interactive use.
* @since 1.4
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/**
* Show the last error message in a message box.
@@ -327,7 +328,7 @@ public:
/**
* Create a new view for the document.
*/
- KoView *createView( QWidget *parent = 0, const char *name = 0 );
+ KoView *createView( TQWidget *tqparent = 0, const char *name = 0 );
/**
* Adds a view to the document.
@@ -345,7 +346,7 @@ public:
/**
* @return a list of views this document is displayed in
*/
- const QPtrList<KoView> & views() const;
+ const TQPtrList<KoView> & views() const;
/**
* @return number of views this document is displayed in
@@ -355,7 +356,7 @@ public:
/**
* Reimplemented from KParts::Part
*/
- virtual KParts::Part *hitTest( QWidget *widget, const QPoint &globalPos );
+ virtual KParts::Part *hitTest( TQWidget *widget, const TQPoint &globalPos );
/**
* Find the most nested child document which contains the
@@ -372,7 +373,7 @@ public:
*
* @return Pointer to the document under the mouse at that position
*/
- virtual KoDocument *hitTest( const QPoint &pos, const QWMatrix& matrix = QWMatrix() );
+ virtual KoDocument *hitTest( const TQPoint &pos, const TQWMatrix& matrix = TQWMatrix() );
/// Temporary API for accessing the view that calls hitTest.
/// Will be passed to hitTest() in 2.x.
/// Only call this from within hitTest()!
@@ -384,21 +385,21 @@ public:
* @param painter The painter object onto which will be drawn.
* @param rect The rect that should be used in the painter object.
* @param transparent If true then the entire rectangle is erased before painting.
- * @param view The KoView is needed to fiddle about with the active widget, when painting children.
+ * @param view The KoView is needed to fiddle about with the active widget, when painting tqchildren.
* @param zoomX The zoom value to be applied to X coordinates when painting.
* @param zoomY The zoom value to be applied to Y coordinates when painting.
*/
- virtual void paintEverything( QPainter &painter, const QRect &rect, bool transparent = false,
+ virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false,
KoView *view = 0L, double zoomX = 1.0, double zoomY = 1.0 );
/**
* @brief Generates a preview picture of the document
* @note The preview is used in the File Dialog and also to create the Thumbnail
*/
- virtual QPixmap generatePreview( const QSize& size );
+ virtual TQPixmap generatePreview( const TQSize& size );
/**
- * Paints all of the documents children into the given painter object.
+ * Paints all of the documents tqchildren into the given painter object.
*
* @param painter The painter object onto which will be drawn.
* @param rect The rect that should be used in the painter object.
@@ -408,7 +409,7 @@ public:
*
* @see #paintChild #paintEverything #paintContent
*/
- virtual void paintChildren( QPainter &painter, const QRect &rect, KoView *view, double zoomX = 1.0, double zoomY = 1.0 );
+ virtual void paintChildren( TQPainter &painter, const TQRect &rect, KoView *view, double zoomX = 1.0, double zoomY = 1.0 );
/**
* Paint a given child. Normally called by paintChildren().
@@ -421,12 +422,12 @@ public:
*
* @see #paintEverything #paintChildren #paintContent
*/
- virtual void paintChild( KoDocumentChild *child, QPainter &painter, KoView *view,
+ virtual void paintChild( KoDocumentChild *child, TQPainter &painter, KoView *view,
double zoomX = 1.0, double zoomY = 1.0 );
/**
* Paints the data itself. Normally called by paintEverything(). It does not
- * paint the children.
+ * paint the tqchildren.
* It's this method that %KOffice Parts have to implement.
*
* @param painter The painter object onto which will be drawn.
@@ -437,7 +438,7 @@ public:
*
* @see #paintEverything
*/
- virtual void paintContent( QPainter &painter, const QRect &rect, bool transparent = false,
+ virtual void paintContent( TQPainter &painter, const TQRect &rect, bool transparent = false,
double zoomX = 1.0, double zoomY = 1.0 ) = 0;
/**
@@ -458,17 +459,17 @@ public:
* Initializes an empty document (display the template dialog!).
* You have to overload this method to initialize all your document variables.
* @param flags see InitDocFlags
- * @param parentWidget the widget this document belongs with
+ * @param tqparentWidget the widget this document belongs with
*/
- virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0) = 0;
+ virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0) = 0;
/**
* Creates and shows the start up widget.
- * @param parent the KoMainWindow used as parent for the widget.
+ * @param tqparent the KoMainWindow used as tqparent for the widget.
* @param alwaysShow always show the widget even if the user has configured it to not show.
* @since 1.5
*/
- virtual void showStartUpWidget(KoMainWindow* parent, bool alwaysShow = false);
+ virtual void showStartUpWidget(KoMainWindow* tqparent, bool alwaysShow = false);
/**
* Sets the modified flag on the document. This means that it has
@@ -506,7 +507,7 @@ public:
* @param store The store to load from
* @param url An internal url, like tar:/1/2
*/
- virtual bool loadFromStore( KoStore* store, const QString& url );
+ virtual bool loadFromStore( KoStore* store, const TQString& url );
/**
* @brief Loads an OASIS document from a store.
@@ -519,17 +520,17 @@ public:
*
* You should not have to reimplement this - but call it in saveChildren().
*/
- virtual bool saveToStore( KoStore* store, const QString& path );
+ virtual bool saveToStore( KoStore* store, const TQString& path );
/**
* Reimplement this method to load the contents of your %KOffice document,
* from the XML document. This is for the pre-Oasis file format (maindoc.xml).
*
- * You are supposed to use the QDomDocument. The QIODevice is provided only
+ * You are supposed to use the TQDomDocument. The TQIODevice is provided only
* for the cases where some pre-processing is needed, like kpresenter's kprconverter.
- * Note that the QIODevice could be 0L, when called from an import filter.
+ * Note that the TQIODevice could be 0L, when called from an import filter.
*/
- virtual bool loadXML( QIODevice *, const QDomDocument & doc ) = 0;
+ virtual bool loadXML( TQIODevice *, const TQDomDocument & doc ) = 0;
/**
* Reimplement this method to load the contents of your %KOffice document,
@@ -537,8 +538,8 @@ public:
* you can find them in the oasisStyles parameter. The store can be used
* to load images and embedded documents.
*/
- virtual bool loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles,
- const QDomDocument & settings, KoStore* store ) = 0;
+ virtual bool loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles,
+ const TQDomDocument & settings, KoStore* store ) = 0;
/**
* Reimplement this method to save the contents of your %KOffice document,
@@ -548,18 +549,18 @@ public:
/**
* Reimplement this to save the contents of the %KOffice document into
- * a QDomDocument. The framework takes care of saving it to the store.
+ * a TQDomDocument. The framework takes care of saving it to the store.
*/
- virtual QDomDocument saveXML();
+ virtual TQDomDocument saveXML();
/**
- * Return a correctly created QDomDocument for this KoDocument,
+ * Return a correctly created TQDomDocument for this KoDocument,
* including processing instruction, complete DOCTYPE tag (with systemId and publicId), and root element.
* @param tagName the name of the tag for the root element
* @param version the DTD version (usually the application's version).
* @deprecated use createOasisXmlWriter instead
*/
- QDomDocument createDomDocument( const QString& tagName, const QString& version ) const;
+ TQDomDocument createDomDocument( const TQString& tagName, const TQString& version ) const;
/**
* Return an XML writer for saving Oasis XML into the device @p dev,
@@ -578,17 +579,17 @@ public:
* will need to call endElement(); endDocument(); before destroying the KoXmlWriter.
* @note OASIS-specific
*/
- static KoXmlWriter* createOasisXmlWriter( QIODevice* dev, const char* rootElementName );
+ static KoXmlWriter* createOasisXmlWriter( TQIODevice* dev, const char* rootElementName );
/**
- * Return a correctly created QDomDocument for an old (1.3-style) %KOffice document,
+ * Return a correctly created TQDomDocument for an old (1.3-style) %KOffice document,
* including processing instruction, complete DOCTYPE tag (with systemId and publicId), and root element.
* This static method can be used e.g. by filters.
* @param appName the app's instance name, e.g. kword, kspread, kpresenter etc.
* @param tagName the name of the tag for the root element, e.g. DOC for kword/kpresenter.
* @param version the DTD version (usually the application's version).
*/
- static QDomDocument createDomDocument( const QString& appName, const QString& tagName, const QString& version );
+ static TQDomDocument createDomDocument( const TQString& appName, const TQString& tagName, const TQString& version );
/**
* The first thing to do in loadOasis is get hold of the office:body tag, then its child.
@@ -596,14 +597,14 @@ public:
* This method returns a translated name for the type of document,
* e.g. i18n("Word Processing") for office:text.
*/
- static QString tagNameToDocumentType( const QString& localName );
+ static TQString tagNameToDocumentType( const TQString& localName );
/**
* Save the document. The default implementation is to call
* saveXML(). This method exists only for applications that
- * don't use QDomDocument for saving, i.e. kword and kpresenter.
+ * don't use TQDomDocument for saving, i.e. kword and kpresenter.
*/
- virtual bool saveToStream( QIODevice * dev );
+ virtual bool saveToStream( TQIODevice * dev );
/**
* Loads a document in the native format from a given URL.
@@ -611,14 +612,14 @@ public:
*
* @param file the file to load - usually KReadOnlyPart::m_file or the result of a filter
*/
- virtual bool loadNativeFormat( const QString & file );
+ virtual bool loadNativeFormat( const TQString & file );
/**
* Saves the document in native format, to a given file
* You should never have to reimplement.
* Made public for writing templates.
*/
- virtual bool saveNativeFormat( const QString & file );
+ virtual bool saveNativeFormat( const TQString & file );
/**
* Activate/deactivate/configure the autosave feature.
@@ -658,17 +659,17 @@ public:
static int defaultAutoSave() { return s_defaultAutoSave; }
/**
- * @return the list of all children. Do not modify the
+ * @return the list of all tqchildren. Do not modify the
* returned list.
*/
- const QPtrList<KoDocumentChild>& children() const;
+ const TQPtrList<KoDocumentChild>& tqchildren() const;
/**
* @return the KoDocumentChild associated with the given Document, but only if
* @p doc is a direct child of this document.
*
* This is a convenience function. You could get the same result
- * by traversing the list returned by children().
+ * by traversing the list returned by tqchildren().
*/
KoDocumentChild *child( KoDocument *doc );
@@ -678,8 +679,8 @@ public:
*/
KoDocumentInfo *documentInfo() const;
- void setViewBuildDocument( KoView *view, const QDomDocument &doc );
- QDomDocument viewBuildDocument( KoView *view );
+ void setViewBuildDocument( KoView *view, const TQDomDocument &doc );
+ TQDomDocument viewBuildDocument( KoView *view );
/**
* Appends the shell to the list of shells which show this
@@ -699,7 +700,7 @@ public:
/**
* @return the list of shells for the main window
*/
- const QPtrList<KoMainWindow>& shells() const;
+ const TQPtrList<KoMainWindow>& shells() const;
/**
* @return the number of shells for the main window
@@ -709,7 +710,7 @@ public:
/**
* @return the list of all the currently opened documents
*/
- static QPtrList<KoDocument> *documentList() { return s_documentList; }
+ static TQPtrList<KoDocument> *documentList() { return s_documentList; }
/**
* @brief Return a DCOP interface for this document
@@ -722,7 +723,7 @@ public:
/**
* @return the ID of the DCOP interface for this document.
**/
- QCString dcopObjectId() const;
+ TQCString dcopObjectId() const;
/**
* Signal the progress of operations such as loading or saving.
@@ -740,7 +741,7 @@ public:
virtual bool isStoredExtern() const;
/**
- * @return the page layout associated with this document (margins, pageSize, etc).
+ * @return the page tqlayout associated with this document (margins, pageSize, etc).
* Override this if you want to provide different sized pages.
*
* @see KoPageLayout
@@ -770,14 +771,14 @@ public:
int queryCloseDia();
/**
- * @brief Set when we do not want to save external children when saving our 'main' doc.
+ * @brief Set when we do not want to save external tqchildren when saving our 'main' doc.
*
- * This makes it possible to save 'main' doc + all its internal children first, then
- * go on to save external children. Typically used by query close.
+ * This makes it possible to save 'main' doc + all its internal tqchildren first, then
+ * go on to save external tqchildren. Typically used by query close.
* Use:
* @code
* doc->setDoNotSaveExtDoc();
- * doc->save(); // saves doc and its internal children,
+ * doc->save(); // saves doc and its internal tqchildren,
* //also calls saveExternalChildren() which sets setDoNotSaveExtDoc(false)
* doc->saveExternalChildren();
* @endcode
@@ -787,27 +788,27 @@ public:
/**
* Sets the backup path of the document
*/
- void setBackupPath( const QString & _path );
+ void setBackupPath( const TQString & _path );
/**
* @return path to the backup document
*/
- QString backupPath()const;
+ TQString backupPath()const;
/**
* Indicates that this document is currently viewed
* and thus should control the title caption.
- * Also resets current flag for all parents.
+ * Also resets current flag for all tqparents.
*/
void setCurrent( bool on = true );
/**
- * Sets current flag for this document and all its parents
+ * Sets current flag for this document and all its tqparents
*/
void forceCurrent( bool on );
bool isCurrent() const;
- void setTitleModified( const QString caption, bool mod );
+ void setTitleModified( const TQString caption, bool mod );
/**
* Sets the document URL to empty URL
@@ -815,7 +816,7 @@ public:
* After using loadNativeFormat on a template, one wants
* to set the url to KURL()
*/
- void resetURL() { m_url = KURL(); m_file = QString::null; }
+ void resetURL() { m_url = KURL(); m_file = TQString(); }
/**
* Set when you want an external embedded document to be stored internally
@@ -843,7 +844,7 @@ public:
*
* @internal
*/
- QString &file() { return m_file; }
+ TQString &file() { return m_file; }
/**
* _Only_ use these functions to restore m_file (in KoMainWindow) after a
@@ -853,12 +854,12 @@ public:
*
* @internal
*/
- void setFile( const QString &file ) { m_file = file; }
+ void setFile( const TQString &file ) { m_file = file; }
/**
* @internal (public for KoMainWindow)
*/
- void setMimeTypeAfterLoading( const QString& mimeType );
+ void setMimeTypeAfterLoading( const TQString& mimeType );
/**
* @return returns the number of pages in the document.
@@ -870,7 +871,7 @@ public:
* This is used by some text-analyzer plugins.
* @since 1.5
*/
- virtual QValueList<KoTextDocument *> allTextDocuments() const;
+ virtual TQValueList<KoTextDocument *> allTextDocuments() const;
/**
* Returns the unit used to display all measures/distances.
@@ -890,27 +891,27 @@ public:
* unit() for everything else (conversions etc.)
* @since 1.5
*/
- QString unitName() const;
+ TQString unitName() const;
/**
* Set the template type used. This is used by the start up widget to show
* the correct templates.
* @since 1.5
*/
- void setTemplateType(const QString& _templateType);
+ void setTemplateType(const TQString& _templateType);
/**
* Template type used. This is used by the start up widget to show
* the correct templates.
* @since 1.5
*/
- QString templateType() const;
+ TQString templateType() const;
/**
* Shows the init dialog when embeding
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @since 1.5
*/
- virtual bool showEmbedInitDialog(QWidget* parent);
+ virtual bool showEmbedInitDialog(TQWidget* tqparent);
public slots:
/**
@@ -949,7 +950,7 @@ signals:
* Emitted e.g. at the beginning of a save operation
* This is emitted by KoDocument and used by KoView to display a statusbar message
*/
- void sigStatusBarMessage( const QString& text );
+ void sigStatusBarMessage( const TQString& text );
/**
* Emitted e.g. at the end of a save operation
@@ -973,21 +974,21 @@ protected slots:
* @param file the file to load (including path)
* @since 1.5
*/
- virtual void openExistingFile( const QString& file );
+ virtual void openExistingFile( const TQString& file );
/**
* This slot loads a template and deletes the start up widget.
* @param file the template to load
* @since 1.5
*/
- virtual void openTemplate( const QString& file );
+ virtual void openTemplate( const TQString& file );
void deleteOpenPaneDelayed();
protected:
- QString autoSaveFile( const QString & path ) const;
+ TQString autoSaveFile( const TQString & path ) const;
- virtual KoView *createViewInstance( QWidget *parent, const char *name ) = 0;
+ virtual KoView *createViewInstance( TQWidget *tqparent, const char *name ) = 0;
/**
* Loads a document from KReadOnlyPart::m_file (KParts takes care of downloading
@@ -1015,9 +1016,9 @@ protected:
* implement the logic to implement the document instance correctly.
* After initializing the widget should emit a signal called 'documentSelected()' which
* will remove the startupWidget and show the document.
- * @param parent the parent of the to be created widget.
+ * @param tqparent the tqparent of the to be created widget.
*/
- virtual QWidget* createCustomDocumentWidget(QWidget *parent);
+ virtual TQWidget* createCustomDocumentWidget(TQWidget *tqparent);
/**
* OLD XML method. For OASIS just call KoDocumentChild::loadOasisDocument
@@ -1028,7 +1029,7 @@ protected:
*
* An example implementation may look like this:
* @code
- * QPtrListIterator<KoDocumentChild> it( children() );
+ * TQPtrListIterator<KoDocumentChild> it( tqchildren() );
* for( ; it.current(); ++it )
* {
* if ( !it.current()->loadDocument( _store ) )
@@ -1042,16 +1043,16 @@ protected:
virtual bool loadChildren( KoStore* );
/**
- * Saves all internal children (only!).
- * @see saveExternalChildren if you have external children.
+ * Saves all internal tqchildren (only!).
+ * @see saveExternalChildren if you have external tqchildren.
* Returns true on success.
*/
virtual bool saveChildren( KoStore* store );
/**
- * Saves all internal children (only!), to the store, using the OASIS format.
+ * Saves all internal tqchildren (only!), to the store, using the OASIS format.
* This is called automatically during saveNativeFormat.
- * @see saveExternalChildren if you have external children.
+ * @see saveExternalChildren if you have external tqchildren.
* Returns true on success.
*/
virtual bool saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter );
@@ -1076,7 +1077,7 @@ protected:
virtual bool completeSaving( KoStore* store );
/**
- * Inserts the new child in the list of children and emits the
+ * Inserts the new child in the list of tqchildren and emits the
* childChanged() signal.
*
* At the same time this method marks this document as modified.
@@ -1092,14 +1093,14 @@ protected:
virtual void setModified() { KParts::ReadWritePart::setModified(); }
/** @internal */
- virtual void insertChild(QObject *o) { QObject::insertChild(o); }
+ virtual void insertChild(TQObject *o) { TQObject::insertChild(o); }
KoPageLayout m_pageLayout;
/**
- * Saves all externally stored children.
+ * Saves all externally stored tqchildren.
* Returns true on success.
- * @see #saveChildren for internal children
+ * @see #saveChildren for internal tqchildren
*/
virtual bool saveExternalChildren();
@@ -1121,13 +1122,13 @@ protected:
/**
* Creates the open widget showed at application start up.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param instance the KInstance to be used for KConfig data
* @param templateType the template-type (group) that should be selected on creation.
* @since 1.5
*/
- KoOpenPane* createOpenPane( QWidget* parent, KInstance* instance,
- const QString& templateType = QString::null);
+ KoOpenPane* createOpenPane( TQWidget* tqparent, KInstance* instance,
+ const TQString& templateType = TQString());
private slots:
void slotChildChanged( KoChild *c );
@@ -1143,15 +1144,15 @@ private slots:
private:
KService::Ptr nativeService();
- bool oldLoadAndParse( KoStore* store, const QString& filename, QDomDocument& doc );
- bool loadNativeFormatFromStore( const QString& file );
+ bool oldLoadAndParse( KoStore* store, const TQString& filename, TQDomDocument& doc );
+ bool loadNativeFormatFromStore( const TQString& file );
bool savePreview( KoStore* store );
bool saveOasisPreview( KoStore* store, KoXmlWriter* manifestWriter );
class Private;
Private *d;
KService::Ptr m_nativeService;
bool m_bEmpty;
- static QPtrList<KoDocument> *s_documentList;
+ static TQPtrList<KoDocument> *s_documentList;
static const int s_defaultAutoSave;
};
diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp
index 8157b95a..308493ad 100644
--- a/lib/kofficecore/KoDocumentChild.cpp
+++ b/lib/kofficecore/KoDocumentChild.cpp
@@ -35,7 +35,7 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -67,32 +67,32 @@ public:
bool m_deleted;
};
-KoDocumentChild::KoDocumentChild( KoDocument* parent, KoDocument* doc, const QRect& geometry )
- : KoChild( parent )
+KoDocumentChild::KoDocumentChild( KoDocument* tqparent, KoDocument* doc, const TQRect& tqgeometry )
+ : KoChild( tqparent )
{
d = new KoDocumentChildPrivate;
- d->m_parent = parent;
+ d->m_parent = tqparent;
d->m_doc = doc;
- setGeometry( geometry );
+ setGeometry( tqgeometry );
d->m_deleted = false;
if ( doc )
doc->setStoreInternal( !doc->hasExternURL() );
}
-KoDocumentChild::KoDocumentChild( KoDocument* parent )
- : KoChild( parent )
+KoDocumentChild::KoDocumentChild( KoDocument* tqparent )
+ : KoChild( tqparent )
{
d = new KoDocumentChildPrivate;
- d->m_parent = parent;
+ d->m_parent = tqparent;
d->m_doc = 0L;
d->m_deleted = false;
}
-void KoDocumentChild::setDocument( KoDocument *doc, const QRect &geometry )
+void KoDocumentChild::setDocument( KoDocument *doc, const TQRect &tqgeometry )
{
kdDebug()<<k_funcinfo<<"doc: "<<doc->url().url()<<endl;
d->m_doc = doc;
- setGeometry( geometry );
+ setGeometry( tqgeometry );
updateMatrix();
}
@@ -102,45 +102,45 @@ KoDocument *KoDocumentChild::document() const
return d->m_doc;
}
-KoDocument* KoDocumentChild::parentDocument() const
+KoDocument* KoDocumentChild::tqparentDocument() const
{
return d->m_parent;
}
-KoDocument* KoDocumentChild::hitTest( const QPoint &p, const QWMatrix &_matrix )
+KoDocument* KoDocumentChild::hitTest( const TQPoint &p, const TQWMatrix &_matrix )
{
- if ( !region( _matrix ).contains( p ) || !d->m_doc )
+ if ( !region( _matrix ).tqcontains( p ) || !d->m_doc )
return 0L;
- QWMatrix m( _matrix );
+ TQWMatrix m( _matrix );
m = matrix() * m;
m.scale( xScaling(), yScaling() );
return d->m_doc->hitTest( p, m );
}
-void KoDocumentChild::loadOasis( const QDomElement &frameElement, const QDomElement& objectElement )
+void KoDocumentChild::loadOasis( const TQDomElement &frameElement, const TQDomElement& objectElement )
{
double x, y, w, h;
- x = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "x", QString::null ) );
- y = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "y", QString::null ) );
- w = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "width", QString::null ) );
- h = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "height", QString::null ) );
- m_tmpGeometry = QRect((int)x, (int)y, (int)w, (int)h); // #### double->int conversion
+ x = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "x", TQString() ) );
+ y = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "y", TQString() ) );
+ w = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "width", TQString() ) );
+ h = KoUnit::parseValue( frameElement.attributeNS( KoXmlNS::svg, "height", TQString() ) );
+ m_tmpGeometry = TQRect((int)x, (int)y, (int)w, (int)h); // #### double->int conversion
setGeometry(m_tmpGeometry);
- QString url = objectElement.attributeNS( KoXmlNS::xlink, "href", QString::null );
+ TQString url = objectElement.attributeNS( KoXmlNS::xlink, "href", TQString() );
if ( url[0] == '#' )
url = url.mid( 1 );
if ( url.startsWith( "./" ) )
- m_tmpURL = QString( INTERNAL_PROTOCOL ) + ":/" + url.mid( 2 );
+ m_tmpURL = TQString( INTERNAL_PROTOCOL ) + ":/" + url.mid( 2 );
else
m_tmpURL = url;
kdDebug() << k_funcinfo << m_tmpURL << endl;
}
-bool KoDocumentChild::load( const QDomElement& element, bool uppercase )
+bool KoDocumentChild::load( const TQDomElement& element, bool uppercase )
{
if ( element.hasAttribute( "url" ) )
m_tmpURL = element.attribute("url");
@@ -159,10 +159,10 @@ bool KoDocumentChild::load( const QDomElement& element, bool uppercase )
}
bool brect = FALSE;
- QDomNode n = element.firstChild();
+ TQDomNode n = element.firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.isNull() ) continue;
if ( e.tagName() == "rect" || ( uppercase && e.tagName() == "RECT" ) )
{
@@ -177,7 +177,7 @@ bool KoDocumentChild::load( const QDomElement& element, bool uppercase )
w = e.attribute( "w" ).toInt(&brect);
if ( e.hasAttribute( "h" ) )
h = e.attribute( "h" ).toInt(&brect);
- m_tmpGeometry = QRect(x, y, w, h);
+ m_tmpGeometry = TQRect(x, y, w, h);
setGeometry(m_tmpGeometry);
}
}
@@ -209,11 +209,11 @@ bool KoDocumentChild::loadDocument( KoStore* store )
if ( res )
{
// Try to turn the mimetype name into its comment
- QString mimeName = m_tmpMimeType;
+ TQString mimeName = m_tmpMimeType;
KMimeType::Ptr mime = KMimeType::mimeType( m_tmpMimeType );
if ( mime->name() != KMimeType::defaultMimeType() )
mimeName = mime->comment();
- d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) );
+ d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) );
}
return res;
}
@@ -221,19 +221,19 @@ bool KoDocumentChild::loadDocument( KoStore* store )
return loadDocumentInternal( store, e, true /*open url*/, false /*not oasis*/ );
}
-bool KoDocumentChild::loadOasisDocument( KoStore* store, const QDomDocument& manifestDoc )
+bool KoDocumentChild::loadOasisDocument( KoStore* store, const TQDomDocument& manifestDoc )
{
- QString path = m_tmpURL;
+ TQString path = m_tmpURL;
if ( m_tmpURL.startsWith( INTERNAL_PROTOCOL ) ) {
path = store->currentDirectory();
if ( !path.isEmpty() )
path += '/';
- QString relPath = KURL( m_tmpURL ).path();
+ TQString relPath = KURL( m_tmpURL ).path();
path += relPath.mid( 1 ); // remove leading '/'
}
if ( !path.endsWith( "/" ) )
path += '/';
- const QString mimeType = KoOasisStore::mimeForPath( manifestDoc, path );
+ const TQString mimeType = KoOasisStore::mimeForPath( manifestDoc, path );
kdDebug() << k_funcinfo << "path for manifest file=" << path << " mimeType=" << mimeType << endl;
if ( mimeType.isEmpty() ) {
kdError(30003) << "Manifest doesn't have media-type for " << path << endl;
@@ -248,11 +248,11 @@ bool KoDocumentChild::loadOasisDocument( KoStore* store, const QDomDocument& man
if ( res )
{
// Try to turn the mimetype name into its comment
- QString mimeName = mimeType;
+ TQString mimeName = mimeType;
KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
if ( mime->name() != KMimeType::defaultMimeType() )
mimeName = mime->comment();
- d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) );
+ d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) );
}
return res;
}
@@ -284,7 +284,7 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr
if ( oasis ) {
store->pushDirectory();
assert( m_tmpURL.startsWith( INTERNAL_PROTOCOL ) );
- QString relPath = KURL( m_tmpURL ).path().mid( 1 );
+ TQString relPath = KURL( m_tmpURL ).path().mid( 1 );
store->enterDirectory( relPath );
res = d->m_doc->loadOasisFromStore( store );
store->popDirectory();
@@ -303,10 +303,10 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr
KURL url( m_tmpURL );
if ( !url.isLocalFile() )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// For security reasons we need to ask confirmation if the url is remote
int result = KMessageBox::warningYesNoCancel(
- 0, i18n( "This document contains an external link to a remote document\n%1").arg(m_tmpURL),
+ 0, i18n( "This document contains an external link to a remote document\n%1").tqarg(m_tmpURL),
i18n( "Confirmation Required" ), i18n( "Download" ), i18n( "Skip" ) );
if ( result == KMessageBox::Cancel )
@@ -324,10 +324,10 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr
if ( !res )
{
// Keep the error message from the attempted loading
- QString errorMessage = d->m_doc->errorMessage();
+ TQString errorMessage = d->m_doc->errorMessage();
delete d->m_doc;
d->m_doc = 0;
- QString tmpURL = m_tmpURL; // keep a copy, createUnavailDocument will erase it
+ TQString tmpURL = m_tmpURL; // keep a copy, createUnavailDocument will erase it
// Not found -> use a kounavail instead
res = createUnavailDocument( store, false /* the URL doesn't exist, don't try to open it */, m_tmpMimeType );
if ( res )
@@ -335,40 +335,40 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr
d->m_doc->setProperty( "realURL", tmpURL ); // so that it gets saved correctly
d->m_doc->setStoreInternal( true );
if ( internalURL )
- d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).arg( errorMessage ) );
+ d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).tqarg( errorMessage ) );
else
- d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).arg( tmpURL, errorMessage ) );
+ d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).tqarg( tmpURL, errorMessage ) );
}
return res;
}
// Still waiting...
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
}
- m_tmpURL = QString::null;
+ m_tmpURL = TQString();
// see KoDocument::insertChild for an explanation what's going on
// now :-)
- if ( parentDocument() )
+ if ( tqparentDocument() )
{
- KoDocument *parent = parentDocument();
+ KoDocument *tqparent = tqparentDocument();
- if ( parent->manager() && parent->manager()->parts() )
+ if ( tqparent->manager() && tqparent->manager()->parts() )
{
- KParts::PartManager *manager = parent->manager();
+ KParts::PartManager *manager = tqparent->manager();
- if ( !manager->parts()->containsRef( d->m_doc ) &&
- !parent->isSingleViewMode() )
+ if ( !manager->parts()->tqcontainsRef( d->m_doc ) &&
+ !tqparent->isSingleViewMode() )
manager->addPart( d->m_doc, false );
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return res;
}
-bool KoDocumentChild::createUnavailDocument( KoStore* store, bool doOpenURL, const QString& mimeType )
+bool KoDocumentChild::createUnavailDocument( KoStore* store, bool doOpenURL, const TQString& mimeType )
{
// We don't need a trader query here. We're looking for a very specific component.
KService::Ptr serv = KService::serviceByDesktopName( "kounavail" );
@@ -386,7 +386,7 @@ bool KoDocumentChild::createUnavailDocument( KoStore* store, bool doOpenURL, con
bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
{
- QString path;
+ TQString path;
if ( d->m_doc->isStoredExtern() )
{
kdDebug(30003)<<k_funcinfo<<" external (don't save) url:" << d->m_doc->url().url()<<endl;
@@ -395,9 +395,9 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
else
{
// The name comes from KoDocumentChild (which was set while saving the
- // parent document).
+ // tqparent document).
assert( d->m_doc->url().protocol() == INTERNAL_PROTOCOL );
- const QString name = d->m_doc->url().path();
+ const TQString name = d->m_doc->url().path();
kdDebug() << k_funcinfo << "saving " << name << endl;
if ( d->m_doc->nativeOasisMimeType().isEmpty() ) {
@@ -409,7 +409,7 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
}
else
{
- // To make the children happy cd to the correct directory
+ // To make the tqchildren happy cd to the correct directory
store->pushDirectory();
store->enterDirectory( name );
@@ -433,7 +433,7 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
// OOo uses a trailing slash for the path to embedded objects (== directories)
if ( !path.endsWith( "/" ) )
path += '/';
- QCString mimetype = d->m_doc->nativeOasisMimeType();
+ TQCString mimetype = d->m_doc->nativeOasisMimeType();
if ( mimetype.isEmpty() )
mimetype = d->m_doc->nativeFormatMimeType();
manifestWriter->addManifestEntry( path, mimetype );
@@ -441,7 +441,7 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
return true;
}
-void KoDocumentChild::saveOasisAttributes( KoXmlWriter &xmlWriter, const QString& name )
+void KoDocumentChild::saveOasisAttributes( KoXmlWriter &xmlWriter, const TQString& name )
{
if ( !d->m_doc->isStoredExtern() )
{
@@ -454,21 +454,21 @@ void KoDocumentChild::saveOasisAttributes( KoXmlWriter &xmlWriter, const QString
d->m_doc->setURL( u );
}
- //<draw:object draw:style-name="standard" draw:id="1" draw:layer="layout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
+ //<draw:object draw:style-name="standard" draw:id="1" draw:layer="tqlayout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
xmlWriter.addAttribute( "xlink:type", "simple" );
xmlWriter.addAttribute( "xlink:show", "embed" );
xmlWriter.addAttribute( "xlink:actuate", "onLoad" );
- const QString ref = d->m_doc->isStoredExtern() ? d->m_doc->url().url() : "./"+ name;
+ const TQString ref = d->m_doc->isStoredExtern() ? d->m_doc->url().url() : "./"+ name;
kdDebug(30003) << "KoDocumentChild::saveOasis saving reference to embedded document as " << ref << endl;
xmlWriter.addAttribute( "xlink:href", /*"#" + */ref );
}
-QDomElement KoDocumentChild::save( QDomDocument& doc, bool uppercase )
+TQDomElement KoDocumentChild::save( TQDomDocument& doc, bool uppercase )
{
if( d->m_doc )
{
- QDomElement e = doc.createElement( ( uppercase ? "OBJECT" : "object" ) );
+ TQDomElement e = doc.createElement( ( uppercase ? "OBJECT" : "object" ) );
if ( d->m_doc->url().protocol() != INTERNAL_PROTOCOL ) {
e.setAttribute( "url", d->m_doc->url().url() );
kdDebug() << "KoDocumentChild::save url=" << d->m_doc->url().url() << endl;
@@ -477,17 +477,17 @@ QDomElement KoDocumentChild::save( QDomDocument& doc, bool uppercase )
e.setAttribute( "url", d->m_doc->url().path().mid( 1 ) );
kdDebug() << "KoDocumentChild::save url=" << d->m_doc->url().path().mid( 1 ) << endl;
}
- e.setAttribute( "mime", d->m_doc->nativeFormatMimeType() );
+ e.setAttribute( "mime", d->m_doc->nativeFormatMimeType().data() );
kdDebug() << "KoDocumentChild::save mime=" << d->m_doc->nativeFormatMimeType() << endl;
- QDomElement rect = doc.createElement( ( uppercase ? "RECT" : "rect" ) );
- rect.setAttribute( "x", geometry().left() );
- rect.setAttribute( "y", geometry().top() );
- rect.setAttribute( "w", geometry().width() );
- rect.setAttribute( "h", geometry().height() );
+ TQDomElement rect = doc.createElement( ( uppercase ? "RECT" : "rect" ) );
+ rect.setAttribute( "x", tqgeometry().left() );
+ rect.setAttribute( "y", tqgeometry().top() );
+ rect.setAttribute( "w", tqgeometry().width() );
+ rect.setAttribute( "h", tqgeometry().height() );
e.appendChild(rect);
return e;
}
- return QDomElement();
+ return TQDomElement();
}
bool KoDocumentChild::isStoredExtern() const
diff --git a/lib/kofficecore/KoDocumentChild.h b/lib/kofficecore/KoDocumentChild.h
index 349961ed..228122dc 100644
--- a/lib/kofficecore/KoDocumentChild.h
+++ b/lib/kofficecore/KoDocumentChild.h
@@ -21,8 +21,8 @@
#include <KoChild.h>
#include <koffice_export.h>
-class QDomDocument;
-class QDomElement;
+class TQDomDocument;
+class TQDomElement;
class KURL;
class KoStore;
class KoDocument;
@@ -43,22 +43,23 @@ class KoXmlWriter;
class KOFFICECORE_EXPORT KoDocumentChild : public KoChild
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoDocumentChild( KoDocument* parent, KoDocument* doc, const QRect& geometry );
+ KoDocumentChild( KoDocument* tqparent, KoDocument* doc, const TQRect& tqgeometry );
/**
* When using this constructor you must call @ref #setDocument before
* you can call any other function of this class.
*/
- KoDocumentChild( KoDocument* parent );
+ KoDocumentChild( KoDocument* tqparent );
virtual ~KoDocumentChild();
/**
* Call this function only directly after calling the constructor
- * that takes only a parent as argument.
+ * that takes only a tqparent as argument.
*/
- virtual void setDocument( KoDocument *doc, const QRect &geometry );
+ virtual void setDocument( KoDocument *doc, const TQRect &tqgeometry );
/**
* @return document contained in this child
@@ -68,13 +69,13 @@ public:
KoDocument *document() const;
/**
- * @return parent document of this child
+ * @return tqparent document of this child
*
* @see KoDocument
*/
- virtual KoDocument *parentDocument() const; // TODO: remove virtual, makes no sense
+ virtual KoDocument *tqparentDocument() const; // TODO: remove virtual, makes no sense
- virtual KoDocument* hitTest( const QPoint& p, const QWMatrix& _matrix = QWMatrix() );
+ virtual KoDocument* hitTest( const TQPoint& p, const TQWMatrix& _matrix = TQWMatrix() );
/**
* @note Can be empty (which is why it doesn't return a const KURL &)
@@ -93,20 +94,20 @@ public:
*
* @return the element containing the "object" tag.
*/
- virtual QDomElement save( QDomDocument& doc, bool uppercase=false );
+ virtual TQDomElement save( TQDomDocument& doc, bool uppercase=false );
/**
* Save an embedded object to OASIS.
- * This method sets the attributes for the draw:object element in the parent XML document.
+ * This method sets the attributes for the draw:object element in the tqparent XML document.
* It also prepares the embedded object for being saved into the store at
* the end of saving (see saveOasisToStore).
* Note that @p name is only used for "internal" documents (not extern).
*/
- void saveOasisAttributes( KoXmlWriter &xmlWriter, const QString& name );
+ void saveOasisAttributes( KoXmlWriter &xmlWriter, const TQString& name );
/**
* Save an embedded object to an OASIS store.
- * This is called automatically by the parent KoDocument's saveOasis
+ * This is called automatically by the tqparent KoDocument's saveOasis
*/
virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
@@ -120,9 +121,9 @@ public:
* @ref KoDocument::loadChildren, respectively from your implementation
* of these methods.
*/
- virtual bool load( const QDomElement& element, bool uppercase=false );
+ virtual bool load( const TQDomElement& element, bool uppercase=false );
- void loadOasis( const QDomElement &frameElement, const QDomElement& objectElement );
+ void loadOasis( const TQDomElement &frameElement, const TQDomElement& objectElement );
/**
* Actually loads the document from the disk/net or from the store,
@@ -134,7 +135,7 @@ public:
* Actually loads the document from the disk/net or from the store
* depending on the document's url
*/
- virtual bool loadOasisDocument( KoStore* store, const QDomDocument& manifestDoc );
+ virtual bool loadOasisDocument( KoStore* store, const TQDomDocument& manifestDoc );
virtual bool isStoredExtern() const;
@@ -153,24 +154,24 @@ protected: // Should be private, but KWord needs access to the variables
* set after parsing the OBJECT tag in @ref #load and is reset after
* calling @ref #loadDocument.
*/
- QString m_tmpURL;
+ TQString m_tmpURL;
/**
* This variable is
* set after parsing the OBJECT tag in @ref #load and is reset after
* calling @ref #loadDocument.
*/
- QRect m_tmpGeometry;
+ TQRect m_tmpGeometry;
/**
* This variable is
* set after parsing the OBJECT tag in @ref #load and is reset after
* calling @ref #loadDocument.
*/
- QString m_tmpMimeType;
+ TQString m_tmpMimeType;
private:
- bool createUnavailDocument( KoStore* store, bool doOpenURL, const QString& mimeType );
+ bool createUnavailDocument( KoStore* store, bool doOpenURL, const TQString& mimeType );
bool loadDocumentInternal( KoStore* _store, const KoDocumentEntry& e, bool doOpenURL, bool oasis );
private:
diff --git a/lib/kofficecore/KoDocumentIface.cc b/lib/kofficecore/KoDocumentIface.cc
index 2ff2f5fb..2c9dbe70 100644
--- a/lib/kofficecore/KoDocumentIface.cc
+++ b/lib/kofficecore/KoDocumentIface.cc
@@ -30,15 +30,15 @@
#include <kdcoppropertyproxy.h>
//static
-QCString KoDocumentIface::newIfaceName()
+TQCString KoDocumentIface::newIfaceName()
{
static int s_docIFNumber = 0;
- QCString name; name.setNum( s_docIFNumber++ ); name.prepend("Document-");
+ TQCString name; name.setNum( s_docIFNumber++ ); name.prepend("Document-");
return name;
}
KoDocumentIface::KoDocumentIface( KoDocument * doc, const char * name )
- : DCOPObject( name ? QCString(name) : newIfaceName() )
+ : DCOPObject( name ? TQCString(name) : newIfaceName() )
{
m_pDoc = doc;
m_actionProxy = new KDCOPActionProxy( doc->actionCollection(), this );
@@ -49,7 +49,7 @@ KoDocumentIface::~KoDocumentIface()
delete m_actionProxy;
}
-void KoDocumentIface::openURL( QString url )
+void KoDocumentIface::openURL( TQString url )
{
m_pDoc->openURL( KURL( url ) );
}
@@ -59,7 +59,7 @@ bool KoDocumentIface::isLoading()
return m_pDoc->isLoading();
}
-QString KoDocumentIface::url()
+TQString KoDocumentIface::url()
{
return m_pDoc->url().url();
}
@@ -76,7 +76,7 @@ int KoDocumentIface::viewCount()
DCOPRef KoDocumentIface::view( int idx )
{
- QPtrList<KoView> views = m_pDoc->views();
+ TQPtrList<KoView> views = m_pDoc->views();
KoView *v = views.at( idx );
if ( !v )
return DCOPRef();
@@ -89,7 +89,7 @@ DCOPRef KoDocumentIface::view( int idx )
return DCOPRef( kapp->dcopClient()->appId(), obj->objId() );
}
-DCOPRef KoDocumentIface::action( const QCString &name )
+DCOPRef KoDocumentIface::action( const TQCString &name )
{
return DCOPRef( kapp->dcopClient()->appId(), m_actionProxy->actionObjectId( name ) );
}
@@ -97,16 +97,16 @@ DCOPRef KoDocumentIface::action( const QCString &name )
QCStringList KoDocumentIface::actions()
{
QCStringList res;
- QValueList<KAction *> lst = m_actionProxy->actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = m_actionProxy->actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
res.append( (*it)->name() );
return res;
}
-QMap<QCString,DCOPRef> KoDocumentIface::actionMap()
+TQMap<TQCString,DCOPRef> KoDocumentIface::actionMap()
{
return m_actionProxy->actionMap();
}
@@ -116,236 +116,236 @@ void KoDocumentIface::save()
m_pDoc->save();
}
-void KoDocumentIface::saveAs( const QString & url )
+void KoDocumentIface::saveAs( const TQString & url )
{
m_pDoc->saveAs( KURL( url ) );
m_pDoc->waitSaveComplete(); // see ReadWritePart
}
-void KoDocumentIface::setOutputMimeType( const QCString & mimetype )
+void KoDocumentIface::setOutputMimeType( const TQCString & mimetype )
{
m_pDoc->setOutputMimeType( mimetype );
}
-QString KoDocumentIface::documentInfoAuthorName() const
+TQString KoDocumentIface::documentInfoAuthorName() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->fullName();
}
-QString KoDocumentIface::documentInfoEmail() const
+TQString KoDocumentIface::documentInfoEmail() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->email();
}
-QString KoDocumentIface::documentInfoCompanyName() const
+TQString KoDocumentIface::documentInfoCompanyName() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->company();
}
-QString KoDocumentIface::documentInfoTelephone() const
+TQString KoDocumentIface::documentInfoTelephone() const
{
kdDebug()<<" Keep compatibility with koffice <= 1.3 : use documentInfoTelephoneWork\n";
return documentInfoTelephoneWork();
}
-QString KoDocumentIface::documentInfoTelephoneWork() const
+TQString KoDocumentIface::documentInfoTelephoneWork() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->telephoneWork();
}
-QString KoDocumentIface::documentInfoTelephoneHome() const
+TQString KoDocumentIface::documentInfoTelephoneHome() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->telephoneHome();
}
-QString KoDocumentIface::documentInfoFax() const
+TQString KoDocumentIface::documentInfoFax() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->fax();
}
-QString KoDocumentIface::documentInfoCountry() const
+TQString KoDocumentIface::documentInfoCountry() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->country();
}
-QString KoDocumentIface::documentInfoPostalCode() const
+TQString KoDocumentIface::documentInfoPostalCode() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->postalCode();
}
-QString KoDocumentIface::documentInfoCity() const
+TQString KoDocumentIface::documentInfoCity() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->city();
}
-QString KoDocumentIface::documentInfoInitial() const
+TQString KoDocumentIface::documentInfoInitial() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->initial();
}
-QString KoDocumentIface::documentInfoAuthorPostion() const
+TQString KoDocumentIface::documentInfoAuthorPostion() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->position();
}
-QString KoDocumentIface::documentInfoStreet() const
+TQString KoDocumentIface::documentInfoStreet() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
if ( !authorPage )
{
kdWarning() << "Author information not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->street();
}
-QString KoDocumentIface::documentInfoTitle() const
+TQString KoDocumentIface::documentInfoTitle() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
if ( !aboutPage )
{
kdWarning() << "'About' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return aboutPage->title();
}
-QString KoDocumentIface::documentInfoAbstract() const
+TQString KoDocumentIface::documentInfoAbstract() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
if ( !aboutPage )
{
kdWarning() << "'About' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return aboutPage->abstract();
}
-QString KoDocumentIface::documentInfoKeywords() const
+TQString KoDocumentIface::documentInfoKeywords() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
if ( !aboutPage )
{
kdWarning() << "'About' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return aboutPage->keywords();
}
-QString KoDocumentIface::documentInfoSubject() const
+TQString KoDocumentIface::documentInfoSubject() const
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
if ( !aboutPage )
{
kdWarning() << "'About' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return aboutPage->subject();
}
-void KoDocumentIface::setDocumentInfoKeywords(const QString & text )
+void KoDocumentIface::setDocumentInfoKeywords(const TQString & text )
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
@@ -357,7 +357,7 @@ void KoDocumentIface::setDocumentInfoKeywords(const QString & text )
aboutPage->setKeywords(text);
}
-void KoDocumentIface::setDocumentInfoSubject(const QString & text)
+void KoDocumentIface::setDocumentInfoSubject(const TQString & text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
@@ -369,7 +369,7 @@ void KoDocumentIface::setDocumentInfoSubject(const QString & text)
aboutPage->setSubject(text);
}
-void KoDocumentIface::setDocumentInfoAuthorName(const QString & text)
+void KoDocumentIface::setDocumentInfoAuthorName(const TQString & text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -382,7 +382,7 @@ void KoDocumentIface::setDocumentInfoAuthorName(const QString & text)
}
-void KoDocumentIface::setDocumentInfoEmail(const QString &text)
+void KoDocumentIface::setDocumentInfoEmail(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -394,7 +394,7 @@ void KoDocumentIface::setDocumentInfoEmail(const QString &text)
authorPage->setEmail(text);
}
-void KoDocumentIface::setDocumentInfoCompanyName(const QString &text)
+void KoDocumentIface::setDocumentInfoCompanyName(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -406,7 +406,7 @@ void KoDocumentIface::setDocumentInfoCompanyName(const QString &text)
authorPage->setCompany(text);
}
-void KoDocumentIface::setDocumentInfoAuthorPosition(const QString &text)
+void KoDocumentIface::setDocumentInfoAuthorPosition(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -419,13 +419,13 @@ void KoDocumentIface::setDocumentInfoAuthorPosition(const QString &text)
}
-void KoDocumentIface::setDocumentInfoTelephone(const QString &text)
+void KoDocumentIface::setDocumentInfoTelephone(const TQString &text)
{
kdDebug()<<"Keep compatibility with koffice <= 1.3 : use setDocumentInfoTelephoneWork\n";
setDocumentInfoTelephoneWork(text);
}
-void KoDocumentIface::setDocumentInfoTelephoneWork(const QString &text)
+void KoDocumentIface::setDocumentInfoTelephoneWork(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -437,7 +437,7 @@ void KoDocumentIface::setDocumentInfoTelephoneWork(const QString &text)
authorPage->setTelephoneWork(text);
}
-void KoDocumentIface::setDocumentInfoTelephoneHome(const QString &text)
+void KoDocumentIface::setDocumentInfoTelephoneHome(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -450,7 +450,7 @@ void KoDocumentIface::setDocumentInfoTelephoneHome(const QString &text)
}
-void KoDocumentIface::setDocumentInfoFax(const QString &text)
+void KoDocumentIface::setDocumentInfoFax(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -462,7 +462,7 @@ void KoDocumentIface::setDocumentInfoFax(const QString &text)
authorPage->setFax(text);
}
-void KoDocumentIface::setDocumentInfoCountry(const QString &text)
+void KoDocumentIface::setDocumentInfoCountry(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -475,7 +475,7 @@ void KoDocumentIface::setDocumentInfoCountry(const QString &text)
}
-void KoDocumentIface::setDocumentInfoTitle(const QString & text)
+void KoDocumentIface::setDocumentInfoTitle(const TQString & text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
@@ -487,7 +487,7 @@ void KoDocumentIface::setDocumentInfoTitle(const QString & text)
aboutPage->setTitle(text);
}
-void KoDocumentIface::setDocumentInfoPostalCode(const QString &text)
+void KoDocumentIface::setDocumentInfoPostalCode(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -501,7 +501,7 @@ void KoDocumentIface::setDocumentInfoPostalCode(const QString &text)
}
-void KoDocumentIface::setDocumentInfoCity(const QString & text)
+void KoDocumentIface::setDocumentInfoCity(const TQString & text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -513,7 +513,7 @@ void KoDocumentIface::setDocumentInfoCity(const QString & text)
authorPage->setCity(text);
}
-void KoDocumentIface::setDocumentInfoInitial(const QString & text)
+void KoDocumentIface::setDocumentInfoInitial(const TQString & text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -526,7 +526,7 @@ void KoDocumentIface::setDocumentInfoInitial(const QString & text)
}
-void KoDocumentIface::setDocumentInfoStreet(const QString &text)
+void KoDocumentIface::setDocumentInfoStreet(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
@@ -540,7 +540,7 @@ void KoDocumentIface::setDocumentInfoStreet(const QString &text)
}
-void KoDocumentIface::setDocumentInfoAbstract(const QString &text)
+void KoDocumentIface::setDocumentInfoAbstract(const TQString &text)
{
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
@@ -557,8 +557,8 @@ QCStringList KoDocumentIface::functionsDynamic()
return DCOPObject::functionsDynamic() + KDCOPPropertyProxy::functions( m_pDoc );
}
-bool KoDocumentIface::processDynamic( const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData )
+bool KoDocumentIface::processDynamic( const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData )
{
if ( KDCOPPropertyProxy::isPropertyRequest( fun, m_pDoc ) )
return KDCOPPropertyProxy::processPropertyRequest( fun, data, replyType, replyData, m_pDoc );
diff --git a/lib/kofficecore/KoDocumentIface.h b/lib/kofficecore/KoDocumentIface.h
index 2713cb43..546859ce 100644
--- a/lib/kofficecore/KoDocumentIface.h
+++ b/lib/kofficecore/KoDocumentIface.h
@@ -21,7 +21,7 @@
#define __KoDocumentIface_h__
#include <dcopobject.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dcopref.h>
#include <koffice_export.h>
class KoDocument;
@@ -48,20 +48,20 @@ public:
* Generate a name for this interface. Automatically used if name=0 is
* passed to the constructor
*/
- static QCString newIfaceName();
+ static TQCString newIfaceName();
k_dcop:
/**
* Returns the URL for this document (empty, real URL, or internal one)
*/
- QString url();
+ TQString url();
/**
* Opens a document stored in @p url
* Warning: this is asynchronous. The document might not be loaded yet when
* this call returns. See isLoading.
*/
- void openURL( QString url );
+ void openURL( TQString url );
/**
* @return TRUE is the document is still loading
@@ -86,7 +86,7 @@ k_dcop:
/**
* DCOP-action proxy
*/
- DCOPRef action( const QCString &name );
+ DCOPRef action( const TQCString &name );
/**
* @return list of actions
*/
@@ -94,7 +94,7 @@ k_dcop:
/**
* @return a map of (action name, DCOP reference)
*/
- QMap<QCString,DCOPRef> actionMap();
+ TQMap<TQCString,DCOPRef> actionMap();
/**
* Saves the document under its existing filename
@@ -104,49 +104,49 @@ k_dcop:
/**
* Saves the document under a new name
*/
- void saveAs( const QString & url );
-
- void setOutputMimeType( const QCString & mimetype );
-
- QString documentInfoAuthorName() const;
- QString documentInfoEmail() const;
- QString documentInfoCompanyName() const;
- QString documentInfoTitle() const;
- QString documentInfoAbstract() const;
- QString documentInfoKeywords() const;
- QString documentInfoSubject() const;
- QString documentInfoTelephone() const;
- QString documentInfoTelephoneWork() const;
- QString documentInfoTelephoneHome() const;
- QString documentInfoFax() const;
- QString documentInfoCountry() const;
- QString documentInfoPostalCode() const;
- QString documentInfoCity() const;
- QString documentInfoStreet() const;
- QString documentInfoInitial() const;
- QString documentInfoAuthorPostion() const;
- void setDocumentInfoAuthorName(const QString & text);
- void setDocumentInfoEmail(const QString &text);
- void setDocumentInfoCompanyName(const QString &text);
- void setDocumentInfoTelephone(const QString &text);
- void setDocumentInfoTelephoneWork(const QString &text);
- void setDocumentInfoTelephoneHome(const QString &text);
- void setDocumentInfoFax(const QString &text);
- void setDocumentInfoCountry(const QString &text);
- void setDocumentInfoTitle(const QString & text);
- void setDocumentInfoPostalCode(const QString &text);
- void setDocumentInfoCity(const QString & text);
- void setDocumentInfoStreet(const QString &text);
- void setDocumentInfoAbstract(const QString &text);
- void setDocumentInfoInitial(const QString & text);
- void setDocumentInfoKeywords(const QString & text );
- void setDocumentInfoSubject(const QString & text);
- void setDocumentInfoAuthorPosition(const QString & text);
+ void saveAs( const TQString & url );
+
+ void setOutputMimeType( const TQCString & mimetype );
+
+ TQString documentInfoAuthorName() const;
+ TQString documentInfoEmail() const;
+ TQString documentInfoCompanyName() const;
+ TQString documentInfoTitle() const;
+ TQString documentInfoAbstract() const;
+ TQString documentInfoKeywords() const;
+ TQString documentInfoSubject() const;
+ TQString documentInfoTelephone() const;
+ TQString documentInfoTelephoneWork() const;
+ TQString documentInfoTelephoneHome() const;
+ TQString documentInfoFax() const;
+ TQString documentInfoCountry() const;
+ TQString documentInfoPostalCode() const;
+ TQString documentInfoCity() const;
+ TQString documentInfoStreet() const;
+ TQString documentInfoInitial() const;
+ TQString documentInfoAuthorPostion() const;
+ void setDocumentInfoAuthorName(const TQString & text);
+ void setDocumentInfoEmail(const TQString &text);
+ void setDocumentInfoCompanyName(const TQString &text);
+ void setDocumentInfoTelephone(const TQString &text);
+ void setDocumentInfoTelephoneWork(const TQString &text);
+ void setDocumentInfoTelephoneHome(const TQString &text);
+ void setDocumentInfoFax(const TQString &text);
+ void setDocumentInfoCountry(const TQString &text);
+ void setDocumentInfoTitle(const TQString & text);
+ void setDocumentInfoPostalCode(const TQString &text);
+ void setDocumentInfoCity(const TQString & text);
+ void setDocumentInfoStreet(const TQString &text);
+ void setDocumentInfoAbstract(const TQString &text);
+ void setDocumentInfoInitial(const TQString & text);
+ void setDocumentInfoKeywords(const TQString & text );
+ void setDocumentInfoSubject(const TQString & text);
+ void setDocumentInfoAuthorPosition(const TQString & text);
public:
virtual QCStringList functionsDynamic();
- virtual bool processDynamic( const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData );
+ virtual bool processDynamic( const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData );
protected:
KoDocument * m_pDoc;
diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp
index 3d4e0505..ccec3424 100644
--- a/lib/kofficecore/KoDocumentInfo.cpp
+++ b/lib/kofficecore/KoDocumentInfo.cpp
@@ -32,8 +32,8 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qobjectlist.h>
-#include <qdatetime.h>
+#include <tqobjectlist.h>
+#include <tqdatetime.h>
#include "KoXmlNS.h"
/*****************************************
@@ -42,8 +42,8 @@
*
*****************************************/
-KoDocumentInfo::KoDocumentInfo( QObject* parent, const char* name )
- : QObject( parent, name )
+KoDocumentInfo::KoDocumentInfo( TQObject* tqparent, const char* name )
+ : TQObject( tqparent, name )
{
(void)new KoDocumentInfoUserMetadata( this );
(void)new KoDocumentInfoAuthor( this );
@@ -55,10 +55,10 @@ KoDocumentInfo::~KoDocumentInfo()
}
// KOffice-1.3 format
-bool KoDocumentInfo::load( const QDomDocument& doc )
+bool KoDocumentInfo::load( const TQDomDocument& doc )
{
- QStringList lst = pages();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = pages();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
KoDocumentInfoPage* p = page( *it );
@@ -70,18 +70,18 @@ bool KoDocumentInfo::load( const QDomDocument& doc )
return true;
}
-bool KoDocumentInfo::loadOasis( const QDomDocument& metaDoc )
+bool KoDocumentInfo::loadOasis( const TQDomDocument& metaDoc )
{
//kdDebug()<<" metaDoc.toString() :"<<metaDoc.toString()<<endl;
- QStringList lst = pages();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = pages();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
KoDocumentInfoPage* p = page( *it );
Q_ASSERT( p );
- QDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
- QDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
+ TQDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
+ TQDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
if ( office.isNull() )
return false;
@@ -93,24 +93,24 @@ bool KoDocumentInfo::loadOasis( const QDomDocument& metaDoc )
}
// KOffice-1.3 format
-QDomDocument KoDocumentInfo::save()
+TQDomDocument KoDocumentInfo::save()
{
- QDomDocument doc = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" );
- QDomElement e = doc.documentElement();
+ TQDomDocument doc = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" );
+ TQDomElement e = doc.documentElement();
- const QStringList lst = pages();
- QStringList::ConstIterator it = lst.begin();
+ const TQStringList lst = pages();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
KoDocumentInfoPage* p = page( *it );
Q_ASSERT( p );
- QDomElement s = p->save( doc );
+ TQDomElement s = p->save( doc );
if ( s.isNull() )
continue;
e.appendChild( s );
}
if ( e.isNull() )
- return QDomDocument();
+ return TQDomDocument();
return doc;
}
@@ -122,10 +122,10 @@ bool KoDocumentInfo::saveOasis( KoStore* store )
xmlWriter->startElement( "office:meta" );
xmlWriter->startElement( "meta:generator");
- xmlWriter->addTextNode( QString( "KOffice/%1" ).arg( KOFFICE_VERSION_STRING ) );
+ xmlWriter->addTextNode( TQString( "KOffice/%1" ).tqarg( KOFFICE_VERSION_STRING ) );
xmlWriter->endElement();
- QStringList lst = pages();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = pages();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
KoDocumentInfoPage* p = page( *it );
@@ -140,22 +140,22 @@ bool KoDocumentInfo::saveOasis( KoStore* store )
return true;
}
-KoDocumentInfoPage* KoDocumentInfo::page( const QString& name ) const
+KoDocumentInfoPage* KoDocumentInfo::page( const TQString& name ) const
{
- QObject* obj = const_cast<KoDocumentInfo*>(this)->child( name.latin1() );
+ TQObject* obj = const_cast<KoDocumentInfo*>(this)->child( name.latin1() );
return (KoDocumentInfoPage*)obj;
}
-QStringList KoDocumentInfo::pages() const
+TQStringList KoDocumentInfo::pages() const
{
- QStringList ret;
+ TQStringList ret;
- const QObjectList *list = children();
- if ( list )
+ const TQObjectList list = childrenListObject();
+ if ( !list.isEmpty() )
{
- QObjectListIt it( *list );
- QObject *obj;
+ TQObjectListIt it( list );
+ TQObject *obj;
while ( ( obj = it.current() ) )
{
ret.prepend( obj->name() );
@@ -166,23 +166,23 @@ QStringList KoDocumentInfo::pages() const
return ret;
}
-QString KoDocumentInfo::title() const
+TQString KoDocumentInfo::title() const
{
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(page( "about" ));
if ( !aboutPage ) {
kdWarning() << "'About' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return aboutPage->title();
}
-QString KoDocumentInfo::creator() const
+TQString KoDocumentInfo::creator() const
{
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(page( "author" ));
if ( !authorPage ) {
kdWarning() << "'Author' page not found in documentInfo !" << endl;
- return QString::null;
+ return TQString();
}
else
return authorPage->fullName();
@@ -194,8 +194,8 @@ QString KoDocumentInfo::creator() const
*
*****************************************/
-KoDocumentInfoPage::KoDocumentInfoPage( QObject* parent, const char* name )
- : QObject( parent, name )
+KoDocumentInfoPage::KoDocumentInfoPage( TQObject* tqparent, const char* name )
+ : TQObject( tqparent, name )
{
}
@@ -231,18 +231,18 @@ void KoDocumentInfoAuthor::initParameters()
m_emailCfg = new KConfig( "emaildefaults", true );
m_emailCfg->setGroup( "Defaults" );
- QString group = m_emailCfg->readEntry("Profile","Default");
- m_emailCfg->setGroup(QString("PROFILE_%1").arg(group));
+ TQString group = m_emailCfg->readEntry("Profile","Default");
+ m_emailCfg->setGroup(TQString("PROFILE_%1").tqarg(group));
if ( m_fullName.isNull() ) // only if null. Empty means the user made it explicitly empty.
{
- QString name = m_emailCfg->readEntry( "FullName" );
+ TQString name = m_emailCfg->readEntry( "FullName" );
if ( !name.isEmpty() )
m_fullName = name;
}
if ( m_company.isNull() )
{
- QString name = m_emailCfg->readEntry( "Organization" );
+ TQString name = m_emailCfg->readEntry( "Organization" );
if ( !name.isEmpty() )
m_company = name;
}
@@ -343,20 +343,20 @@ bool KoDocumentInfoAuthor::saveOasis( KoXmlWriter &xmlWriter )
return true;
}
-bool KoDocumentInfoAuthor::loadOasis( const QDomNode& metaDoc )
+bool KoDocumentInfoAuthor::loadOasis( const TQDomNode& metaDoc )
{
- QDomElement e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "creator" );
+ TQDomElement e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "creator" );
if ( !e.isNull() && !e.text().isEmpty() )
m_fullName = e.text();
- QDomNode n = metaDoc.firstChild();
+ TQDomNode n = metaDoc.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() )
{
if (n.isElement())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.namespaceURI() == KoXmlNS::meta && e.localName() == "user-defined" && !e.text().isEmpty() )
{
- QString name = e.attributeNS( KoXmlNS::meta, "name", QString::null );
+ TQString name = e.attributeNS( KoXmlNS::meta, "name", TQString() );
if ( name == "initial" )
m_initial = e.text();
else if ( name == "author-title" )
@@ -388,12 +388,12 @@ bool KoDocumentInfoAuthor::loadOasis( const QDomNode& metaDoc )
}
// KOffice-1.3 format
-bool KoDocumentInfoAuthor::load( const QDomElement& e )
+bool KoDocumentInfoAuthor::load( const TQDomElement& e )
{
- QDomNode n = e.namedItem( "author" ).firstChild();
+ TQDomNode n = e.namedItem( "author" ).firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.isNull() ) continue;
if ( e.tagName() == "full-name" )
m_fullName = e.text();
@@ -425,11 +425,11 @@ bool KoDocumentInfoAuthor::load( const QDomElement& e )
return true;
}
-QDomElement KoDocumentInfoAuthor::save( QDomDocument& doc )
+TQDomElement KoDocumentInfoAuthor::save( TQDomDocument& doc )
{
- QDomElement e = doc.createElement( "author" );
+ TQDomElement e = doc.createElement( "author" );
- QDomElement t = doc.createElement( "full-name" );
+ TQDomElement t = doc.createElement( "full-name" );
e.appendChild( t );
t.appendChild( doc.createTextNode( m_fullName ) );
@@ -485,132 +485,132 @@ QDomElement KoDocumentInfoAuthor::save( QDomDocument& doc )
return e;
}
-QString KoDocumentInfoAuthor::fullName() const
+TQString KoDocumentInfoAuthor::fullName() const
{
return m_fullName;
}
-QString KoDocumentInfoAuthor::initial() const
+TQString KoDocumentInfoAuthor::initial() const
{
return m_initial;
}
-QString KoDocumentInfoAuthor::title() const
+TQString KoDocumentInfoAuthor::title() const
{
return m_title;
}
-QString KoDocumentInfoAuthor::company() const
+TQString KoDocumentInfoAuthor::company() const
{
return m_company;
}
-QString KoDocumentInfoAuthor::email() const
+TQString KoDocumentInfoAuthor::email() const
{
return m_email;
}
-QString KoDocumentInfoAuthor::telephoneHome() const
+TQString KoDocumentInfoAuthor::telephoneHome() const
{
return m_telephoneHome;
}
-QString KoDocumentInfoAuthor::telephoneWork() const
+TQString KoDocumentInfoAuthor::telephoneWork() const
{
return m_telephoneWork;
}
-QString KoDocumentInfoAuthor::fax() const
+TQString KoDocumentInfoAuthor::fax() const
{
return m_fax;
}
-QString KoDocumentInfoAuthor::country() const
+TQString KoDocumentInfoAuthor::country() const
{
return m_country;
}
-QString KoDocumentInfoAuthor::postalCode() const
+TQString KoDocumentInfoAuthor::postalCode() const
{
return m_postalCode;
}
-QString KoDocumentInfoAuthor::city() const
+TQString KoDocumentInfoAuthor::city() const
{
return m_city;
}
-QString KoDocumentInfoAuthor::street() const
+TQString KoDocumentInfoAuthor::street() const
{
return m_street;
}
-QString KoDocumentInfoAuthor::position() const
+TQString KoDocumentInfoAuthor::position() const
{
return m_position;
}
-void KoDocumentInfoAuthor::setFullName( const QString& n )
+void KoDocumentInfoAuthor::setFullName( const TQString& n )
{
m_fullName = n;
}
-void KoDocumentInfoAuthor::setInitial( const QString& n )
+void KoDocumentInfoAuthor::setInitial( const TQString& n )
{
m_initial = n;
}
-void KoDocumentInfoAuthor::setTitle( const QString& n )
+void KoDocumentInfoAuthor::setTitle( const TQString& n )
{
m_title = n;
}
-void KoDocumentInfoAuthor::setCompany( const QString& n )
+void KoDocumentInfoAuthor::setCompany( const TQString& n )
{
m_company = n;
}
-void KoDocumentInfoAuthor::setEmail( const QString& n )
+void KoDocumentInfoAuthor::setEmail( const TQString& n )
{
m_email = n;
}
-void KoDocumentInfoAuthor::setTelephoneHome( const QString& n )
+void KoDocumentInfoAuthor::setTelephoneHome( const TQString& n )
{
m_telephoneHome = n;
}
-void KoDocumentInfoAuthor::setTelephoneWork( const QString& n )
+void KoDocumentInfoAuthor::setTelephoneWork( const TQString& n )
{
m_telephoneWork = n;
}
-void KoDocumentInfoAuthor::setFax( const QString& n )
+void KoDocumentInfoAuthor::setFax( const TQString& n )
{
m_fax = n;
}
-void KoDocumentInfoAuthor::setCountry( const QString& n )
+void KoDocumentInfoAuthor::setCountry( const TQString& n )
{
m_country = n;
}
-void KoDocumentInfoAuthor::setPostalCode( const QString& n )
+void KoDocumentInfoAuthor::setPostalCode( const TQString& n )
{
m_postalCode = n;
}
-void KoDocumentInfoAuthor::setCity( const QString& n )
+void KoDocumentInfoAuthor::setCity( const TQString& n )
{
m_city = n;
}
-void KoDocumentInfoAuthor::setStreet( const QString& n )
+void KoDocumentInfoAuthor::setStreet( const TQString& n )
{
m_street = n;
}
-void KoDocumentInfoAuthor::setPosition( const QString& n )
+void KoDocumentInfoAuthor::setPosition( const TQString& n )
{
m_position = n;
}
@@ -629,15 +629,15 @@ KoDocumentInfoAbout::KoDocumentInfoAbout( KoDocumentInfo* info )
m_docInfo = info;
m_editingCycles = 0;
m_initialCreator = m_docInfo->creator();
- m_creationDate = QDateTime::currentDateTime();
+ m_creationDate = TQDateTime::tqcurrentDateTime();
}
void KoDocumentInfoAbout::saveParameters()
{
- KoDocument* doc = dynamic_cast< KoDocument* >( m_docInfo->parent() );
+ KoDocument* doc = dynamic_cast< KoDocument* >( m_docInfo->tqparent() );
if ( m_firstSave && doc && !doc->isAutosaving() )
m_editingCycles++;
- m_modificationDate = QDateTime::currentDateTime();
+ m_modificationDate = TQDateTime::tqcurrentDateTime();
m_firstSave = false;
}
@@ -676,7 +676,7 @@ bool KoDocumentInfoAbout::saveOasis( KoXmlWriter &xmlWriter )
}
xmlWriter.startElement( "meta:editing-cycles" );
- xmlWriter.addTextNode( QString::number( m_editingCycles ) );
+ xmlWriter.addTextNode( TQString::number( m_editingCycles ) );
xmlWriter.endElement();
if ( m_creationDate.isValid() )
@@ -695,9 +695,9 @@ bool KoDocumentInfoAbout::saveOasis( KoXmlWriter &xmlWriter )
return true;
}
-bool KoDocumentInfoAbout::loadOasis( const QDomNode& metaDoc )
+bool KoDocumentInfoAbout::loadOasis( const TQDomNode& metaDoc )
{
- QDomElement e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "title" );
+ TQDomElement e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "title" );
if ( !e.isNull() && !e.text().isEmpty() )
{
m_title = e.text();
@@ -729,23 +729,23 @@ bool KoDocumentInfoAbout::loadOasis( const QDomNode& metaDoc )
e = KoDom::namedItemNS( metaDoc, KoXmlNS::meta, "creation-date" );
if ( !e.isNull() && !e.text().isEmpty() )
- m_creationDate = QDateTime::fromString( e.text(), Qt::ISODate );
+ m_creationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
else
- m_creationDate = QDateTime();
+ m_creationDate = TQDateTime();
e = KoDom::namedItemNS( metaDoc, KoXmlNS::dc, "date" );
if ( !e.isNull() && !e.text().isEmpty() )
- m_modificationDate = QDateTime::fromString( e.text(), Qt::ISODate );
+ m_modificationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
return true;
}
// KOffice-1.3 format
-bool KoDocumentInfoAbout::load( const QDomElement& e )
+bool KoDocumentInfoAbout::load( const TQDomElement& e )
{
- QDomNode n = e.namedItem( "about" ).firstChild();
+ TQDomNode n = e.namedItem( "about" ).firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.isNull() ) continue;
if ( e.tagName() == "abstract" )
m_abstract = e.text();
@@ -760,21 +760,21 @@ bool KoDocumentInfoAbout::load( const QDomElement& e )
else if ( e.tagName() == "editing-cycles" )
m_editingCycles = e.text().toInt();
else if ( e.tagName() == "creation-date" )
- m_creationDate = QDateTime::fromString( e.text(), Qt::ISODate );
+ m_creationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
else if ( e.tagName() == "date" )
- m_modificationDate = QDateTime::fromString( e.text(), Qt::ISODate );
+ m_modificationDate = TQDateTime::fromString( e.text(), Qt::ISODate );
}
return true;
}
// KOffice-1.3 format
-QDomElement KoDocumentInfoAbout::save( QDomDocument& doc )
+TQDomElement KoDocumentInfoAbout::save( TQDomDocument& doc )
{
saveParameters();
- QDomElement e = doc.createElement( "about" );
+ TQDomElement e = doc.createElement( "about" );
- QDomElement t = doc.createElement( "abstract" );
+ TQDomElement t = doc.createElement( "abstract" );
e.appendChild( t );
t.appendChild( doc.createCDATASection( m_abstract ) );
@@ -796,7 +796,7 @@ QDomElement KoDocumentInfoAbout::save( QDomDocument& doc )
t = doc.createElement( "editing-cycles" );
e.appendChild( t );
- t.appendChild( doc.createTextNode( QString::number( m_editingCycles ) ) );
+ t.appendChild( doc.createTextNode( TQString::number( m_editingCycles ) ) );
t = doc.createElement( "creation-date" );
e.appendChild( t );
@@ -808,68 +808,68 @@ QDomElement KoDocumentInfoAbout::save( QDomDocument& doc )
return e;
}
-QString KoDocumentInfoAbout::title() const
+TQString KoDocumentInfoAbout::title() const
{
return m_title;
}
-QString KoDocumentInfoAbout::abstract() const
+TQString KoDocumentInfoAbout::abstract() const
{
return m_abstract;
}
-QString KoDocumentInfoAbout::initialCreator() const
+TQString KoDocumentInfoAbout::initialCreator() const
{
return m_initialCreator;
}
-QString KoDocumentInfoAbout::editingCycles() const
+TQString KoDocumentInfoAbout::editingCycles() const
{
- return QString::number( m_editingCycles );
+ return TQString::number( m_editingCycles );
}
-QString KoDocumentInfoAbout::creationDate() const
+TQString KoDocumentInfoAbout::creationDate() const
{
if ( m_creationDate.isValid() )
return KGlobal::locale()->formatDateTime( m_creationDate );
else
- return QString::null;
+ return TQString();
}
-QString KoDocumentInfoAbout::modificationDate() const
+TQString KoDocumentInfoAbout::modificationDate() const
{
if ( m_modificationDate.isValid() )
return KGlobal::locale()->formatDateTime( m_modificationDate );
else
- return QString::null;
+ return TQString();
}
-void KoDocumentInfoAbout::setTitle( const QString& n )
+void KoDocumentInfoAbout::setTitle( const TQString& n )
{
m_title = n;
}
-void KoDocumentInfoAbout::setAbstract( const QString& n )
+void KoDocumentInfoAbout::setAbstract( const TQString& n )
{
m_abstract = n;
}
-QString KoDocumentInfoAbout::keywords() const
+TQString KoDocumentInfoAbout::keywords() const
{
return m_keywords;
}
-QString KoDocumentInfoAbout::subject() const
+TQString KoDocumentInfoAbout::subject() const
{
return m_subject;
}
-void KoDocumentInfoAbout::setKeywords( const QString& n )
+void KoDocumentInfoAbout::setKeywords( const TQString& n )
{
m_keywords = n;
}
-void KoDocumentInfoAbout::setSubject( const QString& n )
+void KoDocumentInfoAbout::setSubject( const TQString& n )
{
m_subject = n;
}
@@ -878,8 +878,8 @@ void KoDocumentInfoAbout::resetMetaData()
{
m_editingCycles = 0;
m_initialCreator = m_docInfo->creator();
- m_creationDate = QDateTime::currentDateTime();
- m_modificationDate = QDateTime();
+ m_creationDate = TQDateTime::tqcurrentDateTime();
+ m_modificationDate = TQDateTime();
}
/*****************************************
@@ -898,7 +898,7 @@ KoDocumentInfoUserMetadata::KoDocumentInfoUserMetadata( KoDocumentInfo* info )
bool KoDocumentInfoUserMetadata::saveOasis( KoXmlWriter &xmlWriter )
{
- QMap<QString, QString>::iterator it;
+ TQMap<TQString, TQString>::iterator it;
for ( it = m_metaList.begin(); it != m_metaList.end(); ++it )
{
xmlWriter.startElement( "meta:user-defined");
@@ -909,18 +909,18 @@ bool KoDocumentInfoUserMetadata::saveOasis( KoXmlWriter &xmlWriter )
return true;
}
-bool KoDocumentInfoUserMetadata::loadOasis( const QDomNode& metaDoc )
+bool KoDocumentInfoUserMetadata::loadOasis( const TQDomNode& metaDoc )
{
- QDomNode n = metaDoc.firstChild();
+ TQDomNode n = metaDoc.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() )
{
if (n.isElement())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.namespaceURI() == KoXmlNS::meta && e.localName() == "user-defined" && !e.text().isEmpty() )
{
- QString name = e.attributeNS( KoXmlNS::meta, "name", QString::null );
- if ( !m_reserved.contains( name ) )
+ TQString name = e.attributeNS( KoXmlNS::meta, "name", TQString() );
+ if ( !m_reserved.tqcontains( name ) )
m_metaList[ name ] = e.text();
}
}
@@ -929,15 +929,15 @@ bool KoDocumentInfoUserMetadata::loadOasis( const QDomNode& metaDoc )
}
// KOffice-1.3 format
-bool KoDocumentInfoUserMetadata::load( const QDomElement& )
+bool KoDocumentInfoUserMetadata::load( const TQDomElement& )
{
return true;
}
// KOffice-1.3 format
-QDomElement KoDocumentInfoUserMetadata::save( QDomDocument& )
+TQDomElement KoDocumentInfoUserMetadata::save( TQDomDocument& )
{
- return QDomElement();
+ return TQDomElement();
}
#include <KoDocumentInfo.moc>
diff --git a/lib/kofficecore/KoDocumentInfo.h b/lib/kofficecore/KoDocumentInfo.h
index 30e74cf7..b94a2de0 100644
--- a/lib/kofficecore/KoDocumentInfo.h
+++ b/lib/kofficecore/KoDocumentInfo.h
@@ -21,142 +21,145 @@
#ifndef KO_DOCUMENT_INFO_H
#define KO_DOCUMENT_INFO_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kconfig.h>
#include <koffice_export.h>
-class QString;
-class QStringList;
-class QDomDocument;
-class QDomElement;
-class QDomNode;
-class QDateTime;
+class TQString;
+class TQStringList;
+class TQDomDocument;
+class TQDomElement;
+class TQDomNode;
+class TQDateTime;
class KoStore;
class KoDocumentInfoPage;
class KoXmlWriter;
-class KOFFICECORE_EXPORT KoDocumentInfo : public QObject
+class KOFFICECORE_EXPORT KoDocumentInfo : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoDocumentInfo( QObject* parent = 0, const char* name = 0 );
+ KoDocumentInfo( TQObject* tqparent = 0, const char* name = 0 );
virtual ~KoDocumentInfo();
- bool load( const QDomDocument& doc );
- bool loadOasis( const QDomDocument& metaDoc );
+ bool load( const TQDomDocument& doc );
+ bool loadOasis( const TQDomDocument& metaDoc );
- QDomDocument save();
+ TQDomDocument save();
bool saveOasis( KoStore* store );
/**
* This info has an accessor because it's the most commonly used.
* Equivalent to page("about")->title() (but checking that the page exists)
*/
- QString title() const;
- QString creator() const;
+ TQString title() const;
+ TQString creator() const;
- KoDocumentInfoPage* page( const QString& name ) const;
- QStringList pages() const;
+ KoDocumentInfoPage* page( const TQString& name ) const;
+ TQStringList pages() const;
void documentInfochanged() { emit sigDocumentInfoModifed();}
signals:
void sigDocumentInfoModifed();
};
-class KOFFICECORE_EXPORT KoDocumentInfoPage : public QObject
+class KOFFICECORE_EXPORT KoDocumentInfoPage : public TQObject
{
public:
- KoDocumentInfoPage( QObject *parent, const char* name );
+ KoDocumentInfoPage( TQObject *tqparent, const char* name );
- virtual bool load( const QDomElement& e ) = 0;
- virtual QDomElement save( QDomDocument& doc ) = 0;
- virtual bool loadOasis( const QDomNode& metaDoc ) = 0;
+ virtual bool load( const TQDomElement& e ) = 0;
+ virtual TQDomElement save( TQDomDocument& doc ) = 0;
+ virtual bool loadOasis( const TQDomNode& metaDoc ) = 0;
virtual bool saveOasis( KoXmlWriter &xmlWriter ) = 0;
};
class KOFFICECORE_EXPORT KoDocumentInfoAuthor : public KoDocumentInfoPage
{
Q_OBJECT
+ TQ_OBJECT
public:
KoDocumentInfoAuthor( KoDocumentInfo* info );
~KoDocumentInfoAuthor();
- virtual bool load( const QDomElement& e );
- virtual QDomElement save( QDomDocument& doc );
- virtual bool loadOasis( const QDomNode& metaDoc );
+ virtual bool load( const TQDomElement& e );
+ virtual TQDomElement save( TQDomDocument& doc );
+ virtual bool loadOasis( const TQDomNode& metaDoc );
virtual bool saveOasis( KoXmlWriter &xmlWriter );
- QString fullName() const;
- QString initial() const;
- QString title() const;
- QString company() const;
- QString email() const;
- QString telephoneHome() const;
- QString telephoneWork() const;
- QString fax() const;
- QString country() const;
- QString postalCode() const;
- QString city() const;
- QString street() const;
- QString position() const;
-
- void setFullName( const QString& n );
- void setTitle( const QString& n );
- void setCompany( const QString& n );
- void setEmail( const QString& n );
- void setTelephoneHome( const QString& n );
- void setTelephoneWork( const QString& n );
- void setFax( const QString& n );
- void setCountry( const QString& n );
- void setPostalCode( const QString& n );
- void setCity( const QString& n );
- void setStreet( const QString& n );
- void setInitial( const QString& n );
- void setPosition( const QString& n );
+ TQString fullName() const;
+ TQString initial() const;
+ TQString title() const;
+ TQString company() const;
+ TQString email() const;
+ TQString telephoneHome() const;
+ TQString telephoneWork() const;
+ TQString fax() const;
+ TQString country() const;
+ TQString postalCode() const;
+ TQString city() const;
+ TQString street() const;
+ TQString position() const;
+
+ void setFullName( const TQString& n );
+ void setTitle( const TQString& n );
+ void setCompany( const TQString& n );
+ void setEmail( const TQString& n );
+ void setTelephoneHome( const TQString& n );
+ void setTelephoneWork( const TQString& n );
+ void setFax( const TQString& n );
+ void setCountry( const TQString& n );
+ void setPostalCode( const TQString& n );
+ void setCity( const TQString& n );
+ void setStreet( const TQString& n );
+ void setInitial( const TQString& n );
+ void setPosition( const TQString& n );
void initParameters();
private:
- QString m_fullName;
- QString m_title;
- QString m_company;
- QString m_email;
- QString m_telephoneHome;
- QString m_telephoneWork;
- QString m_fax;
- QString m_country;
- QString m_postalCode;
- QString m_city;
- QString m_street;
- QString m_initial;
- QString m_position;
+ TQString m_fullName;
+ TQString m_title;
+ TQString m_company;
+ TQString m_email;
+ TQString m_telephoneHome;
+ TQString m_telephoneWork;
+ TQString m_fax;
+ TQString m_country;
+ TQString m_postalCode;
+ TQString m_city;
+ TQString m_street;
+ TQString m_initial;
+ TQString m_position;
KConfig *m_emailCfg;
};
class KOFFICECORE_EXPORT KoDocumentInfoAbout : public KoDocumentInfoPage
{
Q_OBJECT
+ TQ_OBJECT
public:
KoDocumentInfoAbout( KoDocumentInfo* info );
- virtual bool load( const QDomElement& e );
- virtual QDomElement save( QDomDocument& doc );
- virtual bool loadOasis( const QDomNode& metaDoc );
+ virtual bool load( const TQDomElement& e );
+ virtual TQDomElement save( TQDomDocument& doc );
+ virtual bool loadOasis( const TQDomNode& metaDoc );
virtual bool saveOasis( KoXmlWriter &xmlWriter );
- QString title() const;
- QString abstract() const;
- QString subject() const;
- QString keywords() const;
- QString initialCreator() const;
- QString editingCycles() const;
- QString creationDate() const;
- QString modificationDate() const;
+ TQString title() const;
+ TQString abstract() const;
+ TQString subject() const;
+ TQString keywords() const;
+ TQString initialCreator() const;
+ TQString editingCycles() const;
+ TQString creationDate() const;
+ TQString modificationDate() const;
- void setKeywords( const QString &n );
- void setSubject( const QString& n );
+ void setKeywords( const TQString &n );
+ void setSubject( const TQString& n );
- void setTitle( const QString& n );
- void setAbstract( const QString& n );
+ void setTitle( const TQString& n );
+ void setAbstract( const TQString& n );
void saveParameters();
public slots:
@@ -164,13 +167,13 @@ public slots:
private:
KoDocumentInfo* m_docInfo;
- QString m_title;
- QString m_abstract;
- QString m_keywords;
- QString m_subject;
- QString m_initialCreator;
- QDateTime m_creationDate;
- QDateTime m_modificationDate;
+ TQString m_title;
+ TQString m_abstract;
+ TQString m_keywords;
+ TQString m_subject;
+ TQString m_initialCreator;
+ TQDateTime m_creationDate;
+ TQDateTime m_modificationDate;
int m_editingCycles;
bool m_firstSave;
};
@@ -178,19 +181,20 @@ private:
class KOFFICECORE_EXPORT KoDocumentInfoUserMetadata : public KoDocumentInfoPage
{
Q_OBJECT
+ TQ_OBJECT
public:
KoDocumentInfoUserMetadata( KoDocumentInfo* info );
- virtual bool load( const QDomElement& e );
- virtual QDomElement save( QDomDocument& doc );
- virtual bool loadOasis( const QDomNode& metaDoc );
+ virtual bool load( const TQDomElement& e );
+ virtual TQDomElement save( TQDomDocument& doc );
+ virtual bool loadOasis( const TQDomNode& metaDoc );
virtual bool saveOasis( KoXmlWriter &xmlWriter );
- QMap<QString, QString>* metadataList() { return &m_metaList; }
+ TQMap<TQString, TQString>* metadataList() { return &m_metaList; }
private:
- QMap<QString, QString> m_metaList;
- QStringList m_reserved;
+ TQMap<TQString, TQString> m_metaList;
+ TQStringList m_reserved;
};
#endif
diff --git a/lib/kofficecore/KoDocumentInfoDlg.cpp b/lib/kofficecore/KoDocumentInfoDlg.cpp
index f9ad8904..8fa70f07 100644
--- a/lib/kofficecore/KoDocumentInfoDlg.cpp
+++ b/lib/kofficecore/KoDocumentInfoDlg.cpp
@@ -33,12 +33,12 @@
#include <unistd.h>
#include <assert.h>
-#include <qlabel.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qvbox.h>
-#include <qdatetime.h>
+#include <tqlabel.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqvbox.h>
+#include <tqdatetime.h>
#include <kabc/addressee.h>
#include <kabc/stdaddressbook.h>
@@ -49,10 +49,10 @@
#include <kdebug.h>
#include <ktempfile.h>
#include <kmimetype.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klistview.h>
-#include <qgrid.h>
-#include <qmap.h>
+#include <tqgrid.h>
+#include <tqmap.h>
#include <kfilterdev.h>
#include <klineedit.h>
#include <ktextedit.h>
@@ -79,9 +79,9 @@ public:
KDialogBase *m_dialog;
};
-KoDocumentInfoDlg::KoDocumentInfoDlg( KoDocumentInfo *docInfo, QWidget *parent, const char *name,
+KoDocumentInfoDlg::KoDocumentInfoDlg( KoDocumentInfo *docInfo, TQWidget *tqparent, const char *name,
KDialogBase *dialog )
-: QObject( parent, "docinfodlg" )
+: TQObject( tqparent, "docinfodlg" )
{
d = new KoDocumentInfoDlgPrivate;
d->m_info = docInfo;
@@ -94,14 +94,14 @@ KoDocumentInfoDlg::KoDocumentInfoDlg( KoDocumentInfo *docInfo, QWidget *parent,
d->m_dialog = new KDialogBase( KDialogBase::Tabbed,
i18n( "Document Information" ),
KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name, true, false );
- d->m_dialog->setInitialSize( QSize( 500, 500 ) );
+ KDialogBase::Ok, tqparent, name, true, false );
+ d->m_dialog->setInitialSize( TQSize( 500, 500 ) );
d->m_bDeleteDialog = true;
}
- QStringList pages = docInfo->pages();
- QStringList::ConstIterator it = pages.begin();
- QStringList::ConstIterator end = pages.end();
+ TQStringList pages = docInfo->pages();
+ TQStringList::ConstIterator it = pages.begin();
+ TQStringList::ConstIterator end = pages.end();
for (; it != end; ++it )
{
KoDocumentInfoPage *pg = docInfo->page( *it );
@@ -174,24 +174,24 @@ void KoDocumentInfoDlg::loadFromKABC()
void KoDocumentInfoDlg::deleteInfo()
{
- d->m_authorWidget->leFullName->setText( QString::null );
- d->m_authorWidget->leInitial->setText( QString::null );
- d->m_authorWidget->leAuthorTitle->setText( QString::null );
- d->m_authorWidget->leCompany->setText( QString::null );
- d->m_authorWidget->leEmail->setText( QString::null );
- d->m_authorWidget->leTelephoneHome->setText( QString::null );
- d->m_authorWidget->leTelephoneWork->setText( QString::null );
- d->m_authorWidget->leFax->setText( QString::null );
- d->m_authorWidget->leCountry->setText( QString::null );
- d->m_authorWidget->lePostalCode->setText( QString::null );
- d->m_authorWidget->leCity->setText( QString::null );
- d->m_authorWidget->leStreet->setText( QString::null );
+ d->m_authorWidget->leFullName->setText( TQString() );
+ d->m_authorWidget->leInitial->setText( TQString() );
+ d->m_authorWidget->leAuthorTitle->setText( TQString() );
+ d->m_authorWidget->leCompany->setText( TQString() );
+ d->m_authorWidget->leEmail->setText( TQString() );
+ d->m_authorWidget->leTelephoneHome->setText( TQString() );
+ d->m_authorWidget->leTelephoneWork->setText( TQString() );
+ d->m_authorWidget->leFax->setText( TQString() );
+ d->m_authorWidget->leCountry->setText( TQString() );
+ d->m_authorWidget->lePostalCode->setText( TQString() );
+ d->m_authorWidget->leCity->setText( TQString() );
+ d->m_authorWidget->leStreet->setText( TQString() );
emit changed();
}
void KoDocumentInfoDlg::resetMetaData()
{
- QString s = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() );
+ TQString s = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() );
d->m_aboutWidget->labelCreated->setText( s + ", " + d->m_info->creator() );
d->m_aboutWidget->labelModified->setText( "" );
d->m_aboutWidget->labelRevision->setText( "0" );
@@ -200,11 +200,11 @@ void KoDocumentInfoDlg::resetMetaData()
void KoDocumentInfoDlg::addAuthorPage( KoDocumentInfoAuthor *authorInfo )
{
- QVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) );
+ TQVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) );
d->m_authorWidget = new KoDocumentInfoAuthorWidget( page );
d->m_authorWidget->labelAuthor->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) );
- d->m_authorWidget->pbLoadKABC->setIconSet( QIconSet( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) );
- d->m_authorWidget->pbDelete->setIconSet( QIconSet( KGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) );
+ d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) );
+ d->m_authorWidget->pbDelete->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) );
d->m_authorWidget->leFullName->setText( authorInfo->fullName() );
d->m_authorWidget->leInitial->setText( authorInfo->initial() );
@@ -220,53 +220,53 @@ void KoDocumentInfoDlg::addAuthorPage( KoDocumentInfoAuthor *authorInfo )
d->m_authorWidget->leStreet->setText( authorInfo->street() );
d->m_authorWidget->leAuthorPosition->setText( authorInfo->position() );
- connect( d->m_authorWidget->leFullName, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leInitial, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leAuthorTitle, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leCompany, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leEmail, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leTelephoneWork, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leTelephoneHome, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leFax, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leCountry, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->lePostalCode, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leCity, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leStreet, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->leAuthorPosition, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_authorWidget->pbLoadKABC, SIGNAL( clicked() ),
- this, SLOT( loadFromKABC() ) );
- connect( d->m_authorWidget->pbDelete, SIGNAL( clicked() ),
- this, SLOT( deleteInfo() ) );
+ connect( d->m_authorWidget->leFullName, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leInitial, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leAuthorTitle, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leCompany, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leEmail, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leTelephoneWork, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leTelephoneHome, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leFax, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leCountry, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->lePostalCode, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leCity, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leStreet, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->leAuthorPosition, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_authorWidget->pbLoadKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( loadFromKABC() ) );
+ connect( d->m_authorWidget->pbDelete, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteInfo() ) );
}
void KoDocumentInfoDlg::addAboutPage( KoDocumentInfoAbout *aboutInfo )
{
- QVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) );
+ TQVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) );
d->m_aboutWidget = new KoDocumentInfoAboutWidget( page );
- d->m_aboutWidget->pbReset->setIconSet( QIconSet( KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) ) );
- KoDocument* doc = dynamic_cast< KoDocument* >( d->m_info->parent() );
+ d->m_aboutWidget->pbReset->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) ) );
+ KoDocument* doc = dynamic_cast< KoDocument* >( d->m_info->tqparent() );
if ( doc )
{
d->m_aboutWidget->leDocFile->setText( doc->file() );
d->m_aboutWidget->labelType->setText( KMimeType::mimeType( doc->mimeType() )->comment() );
d->m_aboutWidget->pixmapLabel->setPixmap( KMimeType::mimeType( doc->mimeType() )->pixmap( KIcon::Desktop, 48 ) );
}
- if ( aboutInfo->creationDate() != QString::null )
+ if ( aboutInfo->creationDate() != TQString() )
d->m_aboutWidget->labelCreated->setText( aboutInfo->creationDate() + ", " + aboutInfo->initialCreator() );
- if ( aboutInfo->modificationDate() != QString::null )
+ if ( aboutInfo->modificationDate() != TQString() )
d->m_aboutWidget->labelModified->setText( aboutInfo->modificationDate() + ", " + d->m_info->creator() );
d->m_aboutWidget->labelRevision->setText( aboutInfo->editingCycles() );
d->m_aboutWidget->leDocTitle->setText( aboutInfo->title() );
@@ -274,33 +274,33 @@ void KoDocumentInfoDlg::addAboutPage( KoDocumentInfoAbout *aboutInfo )
d->m_aboutWidget->leDocKeywords->setText( aboutInfo->keywords() );
d->m_aboutWidget->meDocAbstract->setText( aboutInfo->abstract() );
- connect( d->m_aboutWidget->leDocTitle, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_aboutWidget->meDocAbstract, SIGNAL( textChanged() ),
- this, SIGNAL( changed() ) );
- connect( d->m_aboutWidget->leDocSubject, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_aboutWidget->leDocKeywords, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( d->m_aboutWidget->pbReset, SIGNAL( clicked() ),
- aboutInfo, SLOT( resetMetaData() ) );
- connect( d->m_aboutWidget->pbReset, SIGNAL( clicked() ),
- this, SLOT( resetMetaData() ) );
+ connect( d->m_aboutWidget->leDocTitle, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_aboutWidget->meDocAbstract, TQT_SIGNAL( textChanged() ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_aboutWidget->leDocSubject, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_aboutWidget->leDocKeywords, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( d->m_aboutWidget->pbReset, TQT_SIGNAL( clicked() ),
+ aboutInfo, TQT_SLOT( resetMetaData() ) );
+ connect( d->m_aboutWidget->pbReset, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( resetMetaData() ) );
}
void KoDocumentInfoDlg::addUserMetadataPage( KoDocumentInfoUserMetadata *userMetadataInfo )
{
- QVBox *page = d->m_dialog->addVBoxPage( i18n( "User-Defined Metadata" ) );
+ TQVBox *page = d->m_dialog->addVBoxPage( i18n( "User-Defined Metadata" ) );
d->m_metaWidget = new KoDocumentInfoUserMetadataWidget( page );
d->m_metaWidget->metaListView->addColumn( "Name" );
d->m_metaWidget->metaListView->setFullWidth( true );
- QMap<QString, QString>::iterator it;
+ TQMap<TQString, TQString>::iterator it;
for ( it = userMetadataInfo->metadataList()->begin(); it != userMetadataInfo->metadataList()->end(); ++it )
{
- QString name = it.key();
- QString value = it.data();
+ TQString name = it.key();
+ TQString value = it.data();
KListViewItem* it = new KListViewItem( d->m_metaWidget->metaListView, name, value );
it->setPixmap( 0, KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ) );
}
@@ -308,9 +308,9 @@ void KoDocumentInfoDlg::addUserMetadataPage( KoDocumentInfoUserMetadata *userMet
void KoDocumentInfoDlg::save()
{
- QStringList pages = d->m_info->pages();
- QStringList::ConstIterator it = pages.begin();
- QStringList::ConstIterator end = pages.end();
+ TQStringList pages = d->m_info->pages();
+ TQStringList::ConstIterator it = pages.begin();
+ TQStringList::ConstIterator end = pages.end();
bool saveInfo=false;
for (; it != end; ++it )
{
@@ -385,7 +385,7 @@ public:
KoDocumentInfoPropsPage::KoDocumentInfoPropsPage( KPropertiesDialog *props,
const char *,
- const QStringList & )
+ const TQStringList & )
: KPropsDlgPlugin( props )
{
d = new KoDocumentInfoPropsPagePrivate;
@@ -416,18 +416,18 @@ KoDocumentInfoPropsPage::KoDocumentInfoPropsPage( KPropertiesDialog *props,
{
d->m_docInfoFile = static_cast<const KTarFile *>( entry );
- QBuffer buffer( d->m_docInfoFile->data() );
+ TQBuffer buffer( d->m_docInfoFile->data() );
buffer.open( IO_ReadOnly );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &buffer );
d->m_info->load( doc );
}
d->m_dlg = new KoDocumentInfoDlg( d->m_info, 0, 0, props );
- connect( d->m_dlg, SIGNAL( changed() ),
- this, SIGNAL( changed() ) );
+ connect( d->m_dlg, TQT_SIGNAL( changed() ),
+ this, TQT_SIGNAL( changed() ) );
}
KoDocumentInfoPropsPage::~KoDocumentInfoPropsPage()
@@ -447,10 +447,10 @@ void KoDocumentInfoPropsPage::applyChanges()
struct stat statBuff;
- if ( stat( QFile::encodeName( d->m_url.path() ), &statBuff ) != 0 )
+ if ( stat( TQFile::encodeName( d->m_url.path() ), &statBuff ) != 0 )
return;
- KTempFile tempFile( d->m_url.path(), QString::null, statBuff.st_mode );
+ KTempFile tempFile( d->m_url.path(), TQString(), statBuff.st_mode );
tempFile.setAutoDelete( true );
@@ -468,7 +468,7 @@ void KoDocumentInfoPropsPage::applyChanges()
KMimeType::Ptr mimeType = KMimeType::findByURL( d->m_url, 0, true );
if ( mimeType && dynamic_cast<KFilterDev *>( d->m_dst->device() ) != 0 )
{
- QCString appIdentification( "KOffice " ); // We are limited in the number of chars.
+ TQCString appIdentification( "KOffice " ); // We are limited in the number of chars.
appIdentification += mimeType->name().latin1();
appIdentification += '\004'; // Two magic bytes to make the identification
appIdentification += '\006'; // more reliable (DF)
@@ -477,9 +477,9 @@ void KoDocumentInfoPropsPage::applyChanges()
bool docInfoSaved = false;
- QStringList entries = root->entries();
- QStringList::ConstIterator it = entries.begin();
- QStringList::ConstIterator end = entries.end();
+ TQStringList entries = root->entries();
+ TQStringList::ConstIterator it = entries.begin();
+ TQStringList::ConstIterator end = entries.end();
for (; it != end; ++it )
{
const KTarEntry *entry = root->entry( *it );
@@ -487,13 +487,13 @@ void KoDocumentInfoPropsPage::applyChanges()
assert( entry );
if ( entry->name() == "documentinfo.xml" ||
- ( !docInfoSaved && !entries.contains( "documentinfo.xml" ) ) )
+ ( !docInfoSaved && !entries.tqcontains( "documentinfo.xml" ) ) )
{
d->m_dlg->save();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
+ TQTextStream str( &buffer );
str << d->m_info->save();
buffer.close();
@@ -504,19 +504,19 @@ void KoDocumentInfoPropsPage::applyChanges()
docInfoSaved = true;
}
else
- copy( QString::null, entry );
+ copy( TQString(), entry );
}
d->m_dst->close();
- QDir dir;
+ TQDir dir;
dir.rename( tempFile.name(), d->m_url.path() );
delete d->m_dst;
d->m_dst = 0;
}
-void KoDocumentInfoPropsPage::copy( const QString &path, const KArchiveEntry *entry )
+void KoDocumentInfoPropsPage::copy( const TQString &path, const KArchiveEntry *entry )
{
kdDebug( 30003 ) << "copy " << entry->name() << endl;
if ( entry->isFile() )
@@ -534,16 +534,16 @@ void KoDocumentInfoPropsPage::copy( const QString &path, const KArchiveEntry *en
kdDebug( 30003 ) << "dir : " << entry->name() << endl;
kdDebug( 30003 ) << "full path is: " << path << entry->name() << endl;
- QString p = path + entry->name();
+ TQString p = path + entry->name();
if ( p != "/" )
{
d->m_dst->writeDir( p, entry->user(), entry->group() );
p.append( "/" );
}
- QStringList entries = dir->entries();
- QStringList::ConstIterator it = entries.begin();
- QStringList::ConstIterator end = entries.end();
+ TQStringList entries = dir->entries();
+ TQStringList::ConstIterator it = entries.begin();
+ TQStringList::ConstIterator end = entries.end();
for (; it != end; ++it )
copy( p, dir->entry( *it ) );
}
diff --git a/lib/kofficecore/KoDocumentInfoDlg.h b/lib/kofficecore/KoDocumentInfoDlg.h
index d3e1e9a3..d346c4c1 100644
--- a/lib/kofficecore/KoDocumentInfoDlg.h
+++ b/lib/kofficecore/KoDocumentInfoDlg.h
@@ -32,11 +32,12 @@ class KoDocumentInfoAbout;
class KoDocumentInfoUserMetadata;
class KArchiveEntry;
-class KOFFICECORE_EXPORT KoDocumentInfoDlg : public QObject
+class KOFFICECORE_EXPORT KoDocumentInfoDlg : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoDocumentInfoDlg( KoDocumentInfo *docInfo, QWidget *parent = 0, const char *name = 0,
+ KoDocumentInfoDlg( KoDocumentInfo *docInfo, TQWidget *tqparent = 0, const char *name = 0,
KDialogBase *dialog = 0 );
virtual ~KoDocumentInfoDlg();
@@ -69,15 +70,16 @@ private:
class KOFFICECORE_EXPORT KoDocumentInfoPropsPage : public KPropsDlgPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
KoDocumentInfoPropsPage( KPropertiesDialog *props, const char *name = 0,
- const QStringList & = QStringList() );
+ const TQStringList & = TQStringList() );
virtual ~KoDocumentInfoPropsPage();
virtual void applyChanges();
private:
- void copy( const QString &path, const KArchiveEntry *entry );
+ void copy( const TQString &path, const KArchiveEntry *entry );
class KoDocumentInfoPropsPagePrivate;
KoDocumentInfoPropsPagePrivate *d;
};
diff --git a/lib/kofficecore/KoDocument_p.h b/lib/kofficecore/KoDocument_p.h
index 1b21f69a..5ad03317 100644
--- a/lib/kofficecore/KoDocument_p.h
+++ b/lib/kofficecore/KoDocument_p.h
@@ -30,6 +30,7 @@ class KoDocument;
class KoBrowserExtension : public KParts::BrowserExtension
{
Q_OBJECT
+ TQ_OBJECT
public:
KoBrowserExtension( KoDocument * doc, const char * name = 0 );
diff --git a/lib/kofficecore/KoDom.cpp b/lib/kofficecore/KoDom.cpp
index 45b00acd..72151c10 100644
--- a/lib/kofficecore/KoDom.cpp
+++ b/lib/kofficecore/KoDom.cpp
@@ -19,12 +19,12 @@
#include "KoDom.h"
-QDomElement KoDom::namedItemNS( const QDomNode& node, const char* nsURI, const char* localName )
+TQDomElement KoDom::namedItemNS( const TQDomNode& node, const char* nsURI, const char* localName )
{
- QDomNode n = node.firstChild();
+ TQDomNode n = node.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() ) {
if ( n.isElement() && n.localName() == localName && n.namespaceURI() == nsURI )
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
diff --git a/lib/kofficecore/KoDom.h b/lib/kofficecore/KoDom.h
index 4d95a42b..688110f0 100644
--- a/lib/kofficecore/KoDom.h
+++ b/lib/kofficecore/KoDom.h
@@ -20,28 +20,28 @@
#ifndef KODOM_H
#define KODOM_H
-#include <qdom.h>
+#include <tqdom.h>
#include <koffice_export.h>
/**
- * This namespace contains a few convenience functions to simplify code using QDom
+ * This namespace contains a few convenience functions to simplify code using TQDom
* (when loading OASIS documents, in particular).
*
* To find the child element with a given name, use KoDom::namedItemNS.
*
* To find all child elements with a given name, use
- * QDomElement e;
- * forEachElement( e, parent )
+ * TQDomElement e;
+ * forEachElement( e, tqparent )
* {
* if ( e.localName() == "..." && e.namespaceURI() == KoXmlNS::... )
* {
* ...
* }
* }
- * Note that this means you don't ever need to use QDomNode nor toElement anymore!
+ * Note that this means you don't ever need to use TQDomNode nor toElement anymore!
* Also note that localName is the part without the prefix, this is the whole point
* of namespace-aware methods.
*
- * To find the attribute with a given name, use QDomElement::attributeNS.
+ * To find the attribute with a given name, use TQDomElement::attributeNS.
*
* Do not use getElementsByTagNameNS, it's recursive (which is never needed in KOffice).
* Do not use tagName() or nodeName() or prefix(), since the prefix isn't fixed.
@@ -51,19 +51,19 @@
namespace KoDom {
/**
- * A namespace-aware version of QDomNode::namedItem(),
- * which also takes care of casting to a QDomElement.
+ * A namespace-aware version of TQDomNode::namedItem(),
+ * which also takes care of casting to a TQDomElement.
* Use this when a domelement is known to have only *one* child element
* with a given tagname.
*
* Note: do *NOT* use getElementsByTagNameNS, it's recursive!
*/
- KOFFICECORE_EXPORT QDomElement namedItemNS( const QDomNode& node, const char* nsURI, const char* localName );
+ KOFFICECORE_EXPORT TQDomElement namedItemNS( const TQDomNode& node, const char* nsURI, const char* localName );
}
-#define forEachElement( elem, parent ) \
- for ( QDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
+#define forEachElement( elem, tqparent ) \
+ for ( TQDomNode _node = tqparent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
if ( !( elem = _node.toElement() ).isNull() )
#endif /* KODOM_H */
diff --git a/lib/kofficecore/KoFactory.cpp b/lib/kofficecore/KoFactory.cpp
index d858e8e9..9e6a4a18 100644
--- a/lib/kofficecore/KoFactory.cpp
+++ b/lib/kofficecore/KoFactory.cpp
@@ -31,8 +31,8 @@ public:
}
};
-KoFactory::KoFactory( QObject *parent, const char *name )
- : KParts::Factory( parent, name )
+KoFactory::KoFactory( TQObject *tqparent, const char *name )
+ : KParts::Factory( tqparent, name )
{
//d = new KoFactoryPrivate;
}
diff --git a/lib/kofficecore/KoFactory.h b/lib/kofficecore/KoFactory.h
index bcc77439..e0d6b2b7 100644
--- a/lib/kofficecore/KoFactory.h
+++ b/lib/kofficecore/KoFactory.h
@@ -27,8 +27,9 @@ class KInstance;
class KOFFICECORE_EXPORT KoFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoFactory( QObject *parent = 0, const char *name = 0 );
+ KoFactory( TQObject *tqparent = 0, const char *name = 0 );
virtual ~KoFactory();
private:
diff --git a/lib/kofficecore/KoFileDialog.cpp b/lib/kofficecore/KoFileDialog.cpp
index b80c23e0..9f581a4e 100644
--- a/lib/kofficecore/KoFileDialog.cpp
+++ b/lib/kofficecore/KoFileDialog.cpp
@@ -25,13 +25,13 @@
#include <kdiroperator.h>
#include <kdebug.h>
-KoFileDialog::KoFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
+KoFileDialog::KoFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *tqparent, const char *name,
bool modal)
- : KFileDialog( startDir, filter, parent, name, modal )
+ : KFileDialog( startDir, filter, tqparent, name, modal )
{
- connect( filterWidget, SIGNAL( activated( int) ),
- this, SLOT( slotChangedfilter( int ) ) );
+ connect( filterWidget, TQT_SIGNAL( activated( int) ),
+ this, TQT_SLOT( slotChangedfilter( int ) ) );
}
void KoFileDialog::slotChangedfilter( int index )
@@ -50,9 +50,9 @@ void KoFileDialog::slotChangedfilter( int index )
}
}
-void KoFileDialog::setSpecialMimeFilter( QStringList& mimeFilter,
- const QString& currentFormat, const int specialOutputFlag,
- const QString& nativeFormat,
+void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter,
+ const TQString& currentFormat, const int specialOutputFlag,
+ const TQString& nativeFormat,
int supportedSpecialFormats )
{
Q_ASSERT( !mimeFilter.isEmpty() );
@@ -77,7 +77,7 @@ void KoFileDialog::setSpecialMimeFilter( QStringList& mimeFilter,
}
// Insert numSpecialEntries entries with native mimetypes, for the special entries.
- QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
+ TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
mimeFilter.insert( mimeFilterIt /* before 1 -> after 0 */, numSpecialEntries, nativeFormat );
// Fill in filter combo
@@ -90,9 +90,9 @@ void KoFileDialog::setSpecialMimeFilter( QStringList& mimeFilter,
int idx = 1; // 0 is the native format
if ( addUncompressed )
- filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").arg( type->comment() ), idx++ );
+ filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").tqarg( type->comment() ), idx++ );
if ( addFlatXML )
- filterWidget->changeItem( i18n("%1 (Flat XML File)").arg( type->comment() ), idx++ );
+ filterWidget->changeItem( i18n("%1 (Flat XML File)").tqarg( type->comment() ), idx++ );
// if you add an entry here, update numSpecialEntries above and specialEntrySelected() below
// For native format...
@@ -107,9 +107,9 @@ void KoFileDialog::setSpecialMimeFilter( QStringList& mimeFilter,
for (mimeFilterIt = mimeFilter.begin (); mimeFilterIt != mimeFilter.end (); ++mimeFilterIt, i++)
{
KMimeType::Ptr mime = KMimeType::mimeType (*mimeFilterIt);
- QString compatString = mime->property ("X-KDE-CompatibleApplication").toString ();
+ TQString compatString = mime->property ("X-KDE-CompatibleApplication").toString ();
if (!compatString.isEmpty ())
- filterWidget->changeItem (i18n ("%1 (%2 Compatible)").arg (mime->comment ()).arg (compatString), i);
+ filterWidget->changeItem (i18n ("%1 (%2 Compatible)").tqarg (mime->comment ()).tqarg (compatString), i);
}
}
diff --git a/lib/kofficecore/KoFileDialog.h b/lib/kofficecore/KoFileDialog.h
index fc3b61e2..1482bf36 100644
--- a/lib/kofficecore/KoFileDialog.h
+++ b/lib/kofficecore/KoFileDialog.h
@@ -22,7 +22,7 @@
#define KOFILEDIALOG_H
#include <kfiledialog.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
/**
* Extension to KFileDialog in order to add special entries to the filter combo,
@@ -35,13 +35,14 @@
class KoFileDialog : public KFileDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoFileDialog( const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
+ KoFileDialog( const TQString& startDir, const TQString& filter,
+ TQWidget *tqparent, const char *name,
bool modal );
- void setSpecialMimeFilter( QStringList& mimeFilter,
- const QString& currentFormat, const int specialOutputFlag,
- const QString& nativeFormat,
+ void setSpecialMimeFilter( TQStringList& mimeFilter,
+ const TQString& currentFormat, const int specialOutputFlag,
+ const TQString& nativeFormat,
int supportedSpecialFormats );
int specialEntrySelected();
@@ -49,7 +50,7 @@ private slots:
void slotChangedfilter( int index );
private:
- QValueVector<int> m_specialFormats;
+ TQValueVector<int> m_specialFormats;
};
#endif /* KOFILEDIALOG_H */
diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp
index 5b1d4898..ba37191c 100644
--- a/lib/kofficecore/KoFilter.cpp
+++ b/lib/kofficecore/KoFilter.cpp
@@ -19,7 +19,7 @@
#include <KoFilter.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kmimetype.h>
@@ -28,7 +28,7 @@
#include <KoFilterManager.h>
-KoFilter::KoFilter() : QObject( 0, 0 ), m_chain( 0 )
+KoFilter::KoFilter() : TQObject( 0, 0 ), m_chain( 0 )
{
}
@@ -49,12 +49,12 @@ int KoEmbeddingFilter::lruPartIndex() const
return m_partStack.top()->m_lruPartIndex;
}
-QString KoEmbeddingFilter::mimeTypeByExtension( const QString& extension )
+TQString KoEmbeddingFilter::mimeTypeByExtension( const TQString& extension )
{
// We need to resort to an ugly hack to determine the mimetype
// from the extension, as kservicetypefactory.h isn't installed
KURL url;
- url.setPath( QString( "dummy.%1" ).arg( extension ) );
+ url.setPath( TQString( "dummy.%1" ).tqarg( extension ) );
KMimeType::Ptr m( KMimeType::findByURL( url, 0, true, true ) );
return m->name();
}
@@ -64,31 +64,31 @@ KoEmbeddingFilter::KoEmbeddingFilter() : KoFilter()
m_partStack.push( new PartState() );
}
-int KoEmbeddingFilter::embedPart( const QCString& from, QCString& to,
- KoFilter::ConversionStatus& status, const QString& key )
+int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to,
+ KoFilter::ConversiontqStatus& status, const TQString& key )
{
++( m_partStack.top()->m_lruPartIndex );
KTempFile tempIn;
tempIn.setAutoDelete( true );
- savePartContents( tempIn.file() );
+ savePartContents( TQT_TQIODEVICE(tempIn.file()) );
tempIn.file()->close();
KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain );
- status = manager->exp0rt( QString::null, to );
+ status = manager->exp0rt( TQString(), to );
delete manager;
// Add the part to the current "stack frame", using the number as key
// if the key string is empty
PartReference ref( lruPartIndex(), to );
- m_partStack.top()->m_partReferences.insert( key.isEmpty() ? QString::number( lruPartIndex() ) : key, ref );
+ m_partStack.top()->m_partReferences.insert( key.isEmpty() ? TQString::number( lruPartIndex() ) : key, ref );
return lruPartIndex();
}
-void KoEmbeddingFilter::startInternalEmbedding( const QString& key, const QCString& mimeType )
+void KoEmbeddingFilter::startInternalEmbedding( const TQString& key, const TQCString& mimeType )
{
- filterChainEnterDirectory( QString::number( ++( m_partStack.top()->m_lruPartIndex ) ) );
+ filterChainEnterDirectory( TQString::number( ++( m_partStack.top()->m_lruPartIndex ) ) );
PartReference ref( lruPartIndex(), mimeType );
m_partStack.top()->m_partReferences.insert( key, ref );
m_partStack.push( new PartState() );
@@ -104,23 +104,23 @@ void KoEmbeddingFilter::endInternalEmbedding()
filterChainLeaveDirectory();
}
-int KoEmbeddingFilter::internalPartReference( const QString& key ) const
+int KoEmbeddingFilter::internalPartReference( const TQString& key ) const
{
- QMapConstIterator<QString, PartReference> it = m_partStack.top()->m_partReferences.find( key );
+ TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.tqfind( key );
if ( it == m_partStack.top()->m_partReferences.end() )
return -1;
return it.data().m_index;
}
-QCString KoEmbeddingFilter::internalPartMimeType( const QString& key ) const
+TQCString KoEmbeddingFilter::internalPartMimeType( const TQString& key ) const
{
- QMapConstIterator<QString, PartReference> it = m_partStack.top()->m_partReferences.find( key );
+ TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.tqfind( key );
if ( it == m_partStack.top()->m_partReferences.end() )
- return QCString();
+ return TQCString();
return it.data().m_mimeType;
}
-KoEmbeddingFilter::PartReference::PartReference( int index, const QCString& mimeType ) :
+KoEmbeddingFilter::PartReference::PartReference( int index, const TQCString& mimeType ) :
m_index( index ), m_mimeType( mimeType )
{
}
@@ -134,11 +134,11 @@ KoEmbeddingFilter::PartState::PartState() : m_lruPartIndex( 0 )
{
}
-void KoEmbeddingFilter::savePartContents( QIODevice* )
+void KoEmbeddingFilter::savePartContents( TQIODevice* )
{
}
-void KoEmbeddingFilter::filterChainEnterDirectory( const QString& directory ) const
+void KoEmbeddingFilter::filterChainEnterDirectory( const TQString& directory ) const
{
m_chain->enterDirectory( directory );
}
diff --git a/lib/kofficecore/KoFilter.h b/lib/kofficecore/KoFilter.h
index 9d82a34f..0f087252 100644
--- a/lib/kofficecore/KoFilter.h
+++ b/lib/kofficecore/KoFilter.h
@@ -20,11 +20,11 @@
#ifndef __koffice_filter_h__
#define __koffice_filter_h__
-#include <qobject.h>
-#include <qmap.h>
-#include <qptrstack.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqptrstack.h>
#include <koffice_export.h>
-class QIODevice;
+class TQIODevice;
class KoFilterChain;
/**
@@ -32,6 +32,7 @@ class KoFilterChain;
*
* Derive your filter class from this base class and implement
* the @ref convert() method. Don't forget to specify the Q_OBJECT
+ TQ_OBJECT
* macro in your class even if you don't use signals or slots.
* This is needed as filters are created on the fly.
* The m_chain member allows access to the @ref KoFilterChain
@@ -45,9 +46,10 @@ class KoFilterChain;
* @author Werner Trobin <[email protected]>
* @todo the class has no constructor and therefore cannot initialize its private class
*/
-class KOFFICECORE_EXPORT KoFilter : public QObject
+class KOFFICECORE_EXPORT KoFilter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class KoFilterEntry; // needed for the filter chain pointer :(
friend class KoFilterChain;
@@ -59,7 +61,7 @@ public:
* Feel free to add some more error conditions @em before the last item
* if it's needed.
*/
- enum ConversionStatus { OK, StupidError, UsageError, CreationError, FileNotFound,
+ enum ConversiontqStatus { OK, StupidError, UsageError, CreationError, FileNotFound,
StorageCreationError, BadMimeType, BadConversionGraph,
EmbeddedDocError, WrongFormat, NotImplemented,
ParsingError, InternalError, UnexpectedEOF,
@@ -77,10 +79,10 @@ public:
*
* @param from The mimetype of the source file/document
* @param to The mimetype of the destination file/document
- * @return The error status, see the @ref #ConversionStatus enum.
+ * @return The error status, see the @ref #ConversiontqStatus enum.
* KoFilter::OK means that everything is alright.
*/
- virtual ConversionStatus convert( const QCString& from, const QCString& to ) = 0;
+ virtual ConversiontqStatus convert( const TQCString& from, const TQCString& to ) = 0;
signals:
/**
@@ -133,7 +135,7 @@ private:
* @ref #endInternalEmbedding accordingly. Try to use the previous method if possible.
*
* If you're using this class you can also setup a signal/slot communication
- * between parent and child filter. To make that work you simply have to define
+ * between tqparent and child filter. To make that work you simply have to define
* signals and slots along the following rules:
* Signals should be named "commSignal\<name\>" where \<name\> is the name of the signal,
* slots should be named "commSlot\<name\>". The connection will be done automatically
@@ -145,6 +147,7 @@ private:
class KOFFICECORE_EXPORT KoEmbeddingFilter : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
friend class KoFilterChain;
@@ -167,7 +170,7 @@ public:
* and so on. Note that you should only pass the pure extension
* and not a whole pattern like "*.doc" or so.
*/
- static QString mimeTypeByExtension( const QString& extension );
+ static TQString mimeTypeByExtension( const TQString& extension );
protected:
/**
@@ -197,9 +200,9 @@ protected:
* @return The number of the part (can be used to refer to the part from
* within the embedding filter).
*/
- int embedPart( const QCString& from, QCString& to,
- KoFilter::ConversionStatus& status,
- const QString& key = QString::null );
+ int embedPart( const TQCString& from, TQCString& to,
+ KoFilter::ConversiontqStatus& status,
+ const TQString& key = TQString() );
/**
* Method to perform "internal" embedding of parts in olefilter-style.
@@ -211,7 +214,7 @@ protected:
* @param key The key we use to store reference/mimetype of your new part
* @param mimeType The mimetype of the part you're about to embed
*/
- void startInternalEmbedding( const QString& key, const QCString& mimeType );
+ void startInternalEmbedding( const TQString& key, const TQCString& mimeType );
/**
* This method signals the end of an internal embedding session.
@@ -230,7 +233,7 @@ protected:
* @return The reference or -1 if we didn't find a part with the
* given key
*/
- int internalPartReference( const QString& key ) const;
+ int internalPartReference( const TQString& key ) const;
/**
* Query the internal part map for the mimetype of the part
@@ -240,7 +243,7 @@ protected:
* @return The mimetype, might be empty if the part matching
* the given key doesn't exist.
*/
- QCString internalPartMimeType( const QString& key ) const;
+ TQCString internalPartMimeType( const TQString& key ) const;
private:
/**
@@ -250,16 +253,16 @@ private:
*/
struct PartReference
{
- PartReference( int index = -1, const QCString& mimeType = "" );
+ PartReference( int index = -1, const TQCString& mimeType = "" );
bool isValid() const;
int m_index;
- QCString m_mimeType;
+ TQCString m_mimeType;
};
/**
* This struct keeps track of the last used index for a
- * child part and all references to existing children
+ * child part and all references to existing tqchildren
* We use it to build a whole stack, one PartState per
* embedding level.
* @internal
@@ -269,7 +272,7 @@ private:
PartState();
int m_lruPartIndex;
- QMap<QString, PartReference> m_partReferences;
+ TQMap<TQString, PartReference> m_partReferences;
};
/// Better do not copy the filters
@@ -287,14 +290,14 @@ private:
*
* @param file An already opened file
*/
- virtual void savePartContents( QIODevice* file );
+ virtual void savePartContents( TQIODevice* file );
/**
* Internal methods to support the start/endInternalEmbedding
* methods (we have to change directories and stuff).
* These methods are declared friends of the KoFilterChain
*/
- void filterChainEnterDirectory( const QString& directory ) const;
+ void filterChainEnterDirectory( const TQString& directory ) const;
/**
* Internal methods to support the start/endInternalEmbedding
* methods (we have to change directories and stuff).
@@ -306,7 +309,7 @@ private:
* A stack which keeps track of the current part references.
* We push one PartState structure for every embedding level.
*/
- QPtrStack<PartState> m_partStack;
+ TQPtrStack<PartState> m_partStack;
class Private;
Private* d;
diff --git a/lib/kofficecore/KoFilterChain.cpp b/lib/kofficecore/KoFilterChain.cpp
index 2ab53780..ecade093 100644
--- a/lib/kofficecore/KoFilterChain.cpp
+++ b/lib/kofficecore/KoFilterChain.cpp
@@ -16,7 +16,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <ktempfile.h>
#include <kmimetype.h>
#include <KoFilterChain.h>
@@ -40,13 +40,13 @@ namespace {
KoFilterChain::ChainLink::ChainLink( KoFilterChain* chain, KoFilterEntry::Ptr filterEntry,
- const QCString& from, const QCString& to ) :
+ const TQCString& from, const TQCString& to ) :
m_chain( chain ), m_filterEntry( filterEntry ), m_from( from ), m_to( to ),
m_filter( 0 ), d( 0 )
{
}
-KoFilter::ConversionStatus KoFilterChain::ChainLink::invokeFilter( const ChainLink* const parentChainLink )
+KoFilter::ConversiontqStatus KoFilterChain::ChainLink::invokeFilter( const ChainLink* const tqparentChainLink )
{
if ( !m_filterEntry ) {
kdError( 30500 ) << "This filter entry is null. Strange stuff going on." << endl;
@@ -60,10 +60,10 @@ KoFilter::ConversionStatus KoFilterChain::ChainLink::invokeFilter( const ChainLi
return KoFilter::CreationError;
}
- if ( parentChainLink )
- setupCommunication( parentChainLink->m_filter );
+ if ( tqparentChainLink )
+ setupCommunication( tqparentChainLink->m_filter );
- KoFilter::ConversionStatus status = m_filter->convert( m_from, m_to );
+ KoFilter::ConversiontqStatus status = m_filter->convert( m_from, m_to );
delete m_filter;
m_filter=0;
return status;
@@ -81,41 +81,41 @@ int KoFilterChain::ChainLink::lruPartIndex() const
return -1;
}
-void KoFilterChain::ChainLink::setupCommunication( const KoFilter* const parentFilter ) const
+void KoFilterChain::ChainLink::setupCommunication( const KoFilter* const tqparentFilter ) const
{
// progress information
- QObject::connect( m_filter, SIGNAL( sigProgress( int ) ),
- m_chain->manager(), SIGNAL( sigProgress( int ) ) );
+ TQObject::connect( m_filter, TQT_SIGNAL( sigProgress( int ) ),
+ m_chain->manager(), TQT_SIGNAL( sigProgress( int ) ) );
- if ( !parentFilter )
+ if ( !tqparentFilter )
return;
- const QMetaObject* const parent = parentFilter->metaObject();
- const QMetaObject* const child = m_filter->metaObject();
- if ( !parent || !child )
+ const TQMetaObject* const tqparent = tqparentFilter->tqmetaObject();
+ const TQMetaObject* const child = m_filter->tqmetaObject();
+ if ( !tqparent || !child )
return;
- setupConnections( parentFilter, parent->signalNames(), m_filter, child->slotNames() );
- setupConnections( m_filter, child->signalNames(), parentFilter, parent->slotNames() );
+ setupConnections( tqparentFilter, tqparent->signalNames(), m_filter, child->slotNames() );
+ setupConnections( m_filter, child->signalNames(), tqparentFilter, tqparent->slotNames() );
}
-void KoFilterChain::ChainLink::setupConnections( const KoFilter* sender, const QStrList& sigs,
- const KoFilter* receiver, const QStrList& sl0ts ) const
+void KoFilterChain::ChainLink::setupConnections( const KoFilter* sender, const TQStrList& sigs,
+ const KoFilter* receiver, const TQStrList& sl0ts ) const
{
- QStrListIterator signalIt( sigs );
+ TQStrListIterator signalIt( sigs );
for ( ; signalIt.current(); ++signalIt ) {
if ( strncmp( signalIt.current(), SIGNAL_PREFIX, SIGNAL_PREFIX_LEN ) == 0 ) {
- QStrListIterator slotIt( sl0ts );
+ TQStrListIterator slotIt( sl0ts );
for ( ; slotIt.current(); ++slotIt ) {
if ( strncmp( slotIt.current(), SLOT_PREFIX, SLOT_PREFIX_LEN ) == 0 ) {
if ( strcmp( signalIt.current() + SIGNAL_PREFIX_LEN, slotIt.current() + SLOT_PREFIX_LEN ) == 0 ) {
- QCString signalString;
- signalString.setNum( QSIGNAL_CODE );
+ TQCString signalString;
+ signalString.setNum( TQSIGNAL_CODE );
signalString += signalIt.current();
- QCString slotString;
- slotString.setNum( QSLOT_CODE );
+ TQCString slotString;
+ slotString.setNum( TQSLOT_CODE );
slotString += slotIt.current();
- QObject::connect( sender, signalString, receiver, slotString );
+ TQObject::connect( sender, signalString, receiver, slotString );
}
}
}
@@ -131,23 +131,23 @@ KoFilterChain::~KoFilterChain()
manageIO(); // Called for the 2nd time in a row -> clean up
}
-KoFilter::ConversionStatus KoFilterChain::invokeChain()
+KoFilter::ConversiontqStatus KoFilterChain::invokeChain()
{
- KoFilter::ConversionStatus status = KoFilter::OK;
+ KoFilter::ConversiontqStatus status = KoFilter::OK;
m_state = Beginning;
int count = m_chainLinks.count();
// This is needed due to nasty Microsoft design
- const ChainLink* parentChainLink = 0;
+ const ChainLink* tqparentChainLink = 0;
if ( filterManagerParentChain() )
- parentChainLink = filterManagerParentChain()->m_chainLinks.current();
+ tqparentChainLink = filterManagerParentChain()->m_chainLinks.current();
// No iterator here, as we need m_chainLinks.current() in outputDocument()
m_chainLinks.first();
for ( ; count > 1 && m_chainLinks.current() && status == KoFilter::OK;
m_chainLinks.next(), --count ) {
- status = m_chainLinks.current()->invokeFilter( parentChainLink );
+ status = m_chainLinks.current()->invokeFilter( tqparentChainLink );
m_state = Middle;
manageIO();
}
@@ -162,7 +162,7 @@ KoFilter::ConversionStatus KoFilterChain::invokeChain()
m_state |= End;
else
m_state = End;
- status = m_chainLinks.current()->invokeFilter( parentChainLink );
+ status = m_chainLinks.current()->invokeFilter( tqparentChainLink );
manageIO();
}
@@ -172,20 +172,20 @@ KoFilter::ConversionStatus KoFilterChain::invokeChain()
return status;
}
-QString KoFilterChain::chainOutput() const
+TQString KoFilterChain::chainOutput() const
{
if ( m_state == Done )
return m_inputFile; // as we already called manageIO()
- return QString::null;
+ return TQString();
}
-QString KoFilterChain::inputFile()
+TQString KoFilterChain::inputFile()
{
if ( m_inputQueried == File )
return m_inputFile;
else if ( m_inputQueried != Nil ) {
kdWarning( 30500 ) << "You already asked for some different source." << endl;
- return QString::null;
+ return TQString();
}
m_inputQueried = File;
@@ -198,12 +198,12 @@ QString KoFilterChain::inputFile()
}
else
if ( m_inputFile.isEmpty() )
- inputFileHelper( m_inputDocument, QString::null );
+ inputFileHelper( m_inputDocument, TQString() );
return m_inputFile;
}
-QString KoFilterChain::outputFile()
+TQString KoFilterChain::outputFile()
{
// sanity check: No embedded filter should ask for a plain file
// ###### CHECK: This will break as soon as we support exporting embedding filters
@@ -214,7 +214,7 @@ QString KoFilterChain::outputFile()
return m_outputFile;
else if ( m_outputQueried != Nil ) {
kdWarning( 30500 ) << "You already asked for some different destination." << endl;
- return QString::null;
+ return TQString();
}
m_outputQueried = File;
@@ -231,7 +231,7 @@ QString KoFilterChain::outputFile()
return m_outputFile;
}
-KoStoreDevice* KoFilterChain::storageFile( const QString& name, KoStore::Mode mode )
+KoStoreDevice* KoFilterChain::storageFile( const TQString& name, KoStore::Mode mode )
{
// ###### CHECK: This works only for import filters. Do we want something like
// that for export filters too?
@@ -308,7 +308,7 @@ KoDocument* KoFilterChain::outputDocument()
void KoFilterChain::dump() const
{
kdDebug( 30500 ) << "########## KoFilterChain with " << m_chainLinks.count() << " members:" << endl;
- QPtrListIterator<ChainLink> it( m_chainLinks );
+ TQPtrListIterator<ChainLink> it( m_chainLinks );
for ( ; it.current(); ++it )
it.current()->dump();
kdDebug( 30500 ) << "########## KoFilterChain (done) ##########" << endl;
@@ -324,17 +324,17 @@ KoFilterChain::KoFilterChain( const KoFilterManager* manager ) :
m_chainLinks.setAutoDelete( true );
}
-void KoFilterChain::appendChainLink( KoFilterEntry::Ptr filterEntry, const QCString& from, const QCString& to )
+void KoFilterChain::appendChainLink( KoFilterEntry::Ptr filterEntry, const TQCString& from, const TQCString& to )
{
m_chainLinks.append( new ChainLink( this, filterEntry, from, to ) );
}
-void KoFilterChain::prependChainLink( KoFilterEntry::Ptr filterEntry, const QCString& from, const QCString& to )
+void KoFilterChain::prependChainLink( KoFilterEntry::Ptr filterEntry, const TQCString& from, const TQCString& to )
{
m_chainLinks.prepend( new ChainLink( this, filterEntry, from, to ) );
}
-void KoFilterChain::enterDirectory( const QString& directory )
+void KoFilterChain::enterDirectory( const TQString& directory )
{
// Only a little bit of checking as we (have to :} ) trust KoEmbeddingFilter
// If the output storage isn't initialized yet, we perform that step(s) on init.
@@ -351,12 +351,12 @@ void KoFilterChain::leaveDirectory()
m_internalEmbeddingDirectories.pop_back();
}
-QString KoFilterChain::filterManagerImportFile() const
+TQString KoFilterChain::filterManagerImportFile() const
{
return m_manager->importFile();
}
-QString KoFilterChain::filterManagerExportFile() const
+TQString KoFilterChain::filterManagerExportFile() const
{
return m_manager->exportFile();
}
@@ -373,7 +373,7 @@ int KoFilterChain::filterManagerDirection() const
KoFilterChain* const KoFilterChain::filterManagerParentChain() const
{
- return m_manager->parentChain();
+ return m_manager->tqparentChain();
}
void KoFilterChain::manageIO()
@@ -393,11 +393,11 @@ void KoFilterChain::manageIO()
delete m_inputTempFile; // autodelete
m_inputTempFile = 0;
}
- m_inputFile = QString::null;
+ m_inputFile = TQString();
if ( !m_outputFile.isEmpty() ) {
m_inputFile = m_outputFile;
- m_outputFile = QString::null;
+ m_outputFile = TQString();
m_inputTempFile = m_outputTempFile;
m_outputTempFile = 0;
@@ -406,7 +406,7 @@ void KoFilterChain::manageIO()
if ( m_outputStorage ) {
m_outputStorage->close();
// Don't delete the storage if we're just pointing to the
- // storage of the parent filter chain
+ // storage of the tqparent filter chain
if ( !filterManagerParentChain() || m_outputStorage->mode() != KoStore::Write )
delete m_outputStorage;
m_outputStorage = 0;
@@ -444,19 +444,19 @@ bool KoFilterChain::createTempFile( KTempFile** tempFile, bool autoDelete )
return ( *tempFile )->status() == 0;
}
-void KoFilterChain::inputFileHelper( KoDocument* document, const QString& alternativeFile )
+void KoFilterChain::inputFileHelper( KoDocument* document, const TQString& alternativeFile )
{
if ( document ) {
if ( !createTempFile( &m_inputTempFile ) ) {
delete m_inputTempFile;
m_inputTempFile = 0;
- m_inputFile = QString::null;
+ m_inputFile = TQString();
return;
}
if ( !document->saveNativeFormat( m_inputTempFile->name() ) ) {
delete m_inputTempFile;
m_inputTempFile = 0;
- m_inputFile = QString::null;
+ m_inputFile = TQString();
return;
}
m_inputFile = m_inputTempFile->name();
@@ -470,14 +470,14 @@ void KoFilterChain::outputFileHelper( bool autoDelete )
if ( !createTempFile( &m_outputTempFile, autoDelete ) ) {
delete m_outputTempFile;
m_outputTempFile = 0;
- m_outputFile = QString::null;
+ m_outputFile = TQString();
}
else
m_outputFile = m_outputTempFile->name();
}
KoStoreDevice* KoFilterChain::storageNewStreamHelper( KoStore** storage, KoStoreDevice** device,
- const QString& name )
+ const TQString& name )
{
delete *device;
*device = 0;
@@ -492,7 +492,7 @@ KoStoreDevice* KoFilterChain::storageNewStreamHelper( KoStore** storage, KoStore
return *device;
}
-KoStoreDevice* KoFilterChain::storageHelper( const QString& file, const QString& streamName,
+KoStoreDevice* KoFilterChain::storageHelper( const TQString& file, const TQString& streamName,
KoStore::Mode mode, KoStore** storage,
KoStoreDevice** device )
{
@@ -519,9 +519,9 @@ KoStoreDevice* KoFilterChain::storageHelper( const QString& file, const QString&
return storageCreateFirstStream( streamName, storage, device );
}
-void KoFilterChain::storageInit( const QString& file, KoStore::Mode mode, KoStore** storage )
+void KoFilterChain::storageInit( const TQString& file, KoStore::Mode mode, KoStore** storage )
{
- QCString appIdentification( "" );
+ TQCString appIdentification( "" );
if ( mode == KoStore::Write ) {
// To create valid storages we also have to add the mimetype
// magic "applicationIndentifier" to the storage.
@@ -534,7 +534,7 @@ void KoFilterChain::storageInit( const QString& file, KoStore::Mode mode, KoStor
*storage = KoStore::createStore( file, mode, appIdentification );
}
-KoStoreDevice* KoFilterChain::storageInitEmbedding( const QString& name )
+KoStoreDevice* KoFilterChain::storageInitEmbedding( const TQString& name )
{
if ( m_outputStorage ) {
kdWarning( 30500 ) << "Ooops! Something's really screwed here." << endl;
@@ -544,7 +544,7 @@ KoStoreDevice* KoFilterChain::storageInitEmbedding( const QString& name )
m_outputStorage = filterManagerParentChain()->m_outputStorage;
if ( !m_outputStorage ) {
- // If the storage of the parent hasn't been initialized yet,
+ // If the storage of the tqparent hasn't been initialized yet,
// we have to do that here. Quite nasty...
storageInit( filterManagerParentChain()->outputFile(), KoStore::Write, &m_outputStorage );
@@ -568,21 +568,21 @@ KoStoreDevice* KoFilterChain::storageInitEmbedding( const QString& name )
return storageCleanupHelper( &m_outputStorage );
}
- if ( !m_outputStorage->enterDirectory( QString( "part%1" ).arg( lruPartIndex ) ) )
+ if ( !m_outputStorage->enterDirectory( TQString( "part%1" ).tqarg( lruPartIndex ) ) )
return storageCleanupHelper( &m_outputStorage );
return storageCreateFirstStream( name, &m_outputStorage, &m_outputStorageDevice );
}
-KoStoreDevice* KoFilterChain::storageCreateFirstStream( const QString& streamName, KoStore** storage,
+KoStoreDevice* KoFilterChain::storageCreateFirstStream( const TQString& streamName, KoStore** storage,
KoStoreDevice** device )
{
// Before we go and create the first stream in this storage we
// have to perform a little hack in case we're used by any ole-style
// filter which utilizes internal embedding. Ugly, but well...
if ( !m_internalEmbeddingDirectories.isEmpty() ) {
- QStringList::ConstIterator it = m_internalEmbeddingDirectories.begin();
- QStringList::ConstIterator end = m_internalEmbeddingDirectories.end();
+ TQStringList::ConstIterator it = m_internalEmbeddingDirectories.begin();
+ TQStringList::ConstIterator end = m_internalEmbeddingDirectories.end();
for ( ; it != end && ( *storage )->enterDirectory( *it ); ++it );
}
@@ -600,7 +600,7 @@ KoStoreDevice* KoFilterChain::storageCreateFirstStream( const QString& streamNam
KoStoreDevice* KoFilterChain::storageCleanupHelper( KoStore** storage )
{
- // Take care not to delete the storage of the parent chain
+ // Take care not to delete the storage of the tqparent chain
if ( *storage != m_outputStorage || !filterManagerParentChain() ||
( *storage )->mode() != KoStore::Write )
delete *storage;
@@ -608,7 +608,7 @@ KoStoreDevice* KoFilterChain::storageCleanupHelper( KoStore** storage )
return 0;
}
-KoDocument* KoFilterChain::createDocument( const QString& file )
+KoDocument* KoFilterChain::createDocument( const TQString& file )
{
KURL url;
url.setPath( file );
@@ -618,7 +618,7 @@ KoDocument* KoFilterChain::createDocument( const QString& file )
return 0;
}
- KoDocument *doc = createDocument( QCString( t->name().latin1() ) );
+ KoDocument *doc = createDocument( TQCString( t->name().latin1() ) );
if ( !doc || !doc->loadNativeFormat( file ) ) {
kdError( 30500 ) << "Couldn't load from the file" << endl;
@@ -628,7 +628,7 @@ KoDocument* KoFilterChain::createDocument( const QString& file )
return doc;
}
-KoDocument* KoFilterChain::createDocument( const QCString& mimeType )
+KoDocument* KoFilterChain::createDocument( const TQCString& mimeType )
{
KoDocumentEntry entry = KoDocumentEntry::queryByMimeType(mimeType);
@@ -663,7 +663,7 @@ namespace KOffice {
}
}
- void Edge::dump( const QCString& indent ) const
+ void Edge::dump( const TQCString& indent ) const
{
if ( m_vertex )
kdDebug( 30500 ) << indent << "Edge -> '" << m_vertex->mimeType()
@@ -674,7 +674,7 @@ namespace KOffice {
}
- Vertex::Vertex( const QCString& mimeType ) : m_predecessor( 0 ), m_mimeType( mimeType ),
+ Vertex::Vertex( const TQCString& mimeType ) : m_predecessor( 0 ), m_mimeType( mimeType ),
m_weight( UINT_MAX ), m_index( -1 ), d( 0 )
{
m_edges.setAutoDelete( true ); // we take ownership of added edges
@@ -707,7 +707,7 @@ namespace KOffice {
if ( !vertex )
return 0;
const Edge* edge = 0;
- QPtrListIterator<Edge> it( m_edges );
+ TQPtrListIterator<Edge> it( m_edges );
for ( ; it.current(); ++it ) {
if ( it.current()->vertex() == vertex &&
@@ -723,17 +723,17 @@ namespace KOffice {
e->relax( this, queue );
}
- void Vertex::dump( const QCString& indent ) const
+ void Vertex::dump( const TQCString& indent ) const
{
kdDebug( 30500 ) << indent << "Vertex: " << m_mimeType << " (" << m_weight << "):" << endl;
- const QCString i( indent + " " );
- QPtrListIterator<Edge> it( m_edges );
+ const TQCString i( indent + " " );
+ TQPtrListIterator<Edge> it( m_edges );
for ( ; it.current(); ++it )
it.current()->dump( i );
}
- Graph::Graph( const QCString& from ) : m_vertices( 47 ), m_from( from ),
+ Graph::Graph( const TQCString& from ) : m_vertices( 47 ), m_from( from ),
m_graphValid( false ), d( 0 )
{
m_vertices.setAutoDelete( true );
@@ -741,7 +741,7 @@ namespace KOffice {
shortestPaths(); // Will return after a single lookup if "from" is invalid (->no check here)
}
- void Graph::setSourceMimeType( const QCString& from )
+ void Graph::setSourceMimeType( const TQCString& from )
{
if ( from == m_from )
return;
@@ -749,7 +749,7 @@ namespace KOffice {
m_graphValid = false;
// Initialize with "infinity" ...
- QAsciiDictIterator<Vertex> it( m_vertices );
+ TQAsciiDictIterator<Vertex> it( m_vertices );
for ( ; it.current(); ++it )
it.current()->reset();
@@ -757,7 +757,7 @@ namespace KOffice {
shortestPaths();
}
- KoFilterChain::Ptr Graph::chain( const KoFilterManager* manager, QCString& to ) const
+ KoFilterChain::Ptr Graph::chain( const KoFilterManager* manager, TQCString& to ) const
{
if ( !isValid() || !manager )
return 0;
@@ -790,7 +790,7 @@ namespace KOffice {
{
kdDebug( 30500 ) << "+++++++++ Graph::dump +++++++++" << endl;
kdDebug( 30500 ) << "From: " << m_from << endl;
- QAsciiDictIterator<Vertex> it( m_vertices );
+ TQAsciiDictIterator<Vertex> it( m_vertices );
for ( ; it.current(); ++it )
it.current()->dump( " " );
kdDebug( 30500 ) << "+++++++++ Graph::dump (done) +++++++++" << endl;
@@ -801,31 +801,31 @@ namespace KOffice {
void Graph::buildGraph()
{
// Make sure that all available parts are added to the graph
- QValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
- QValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
- QValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
+ TQValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
+ TQValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
+ TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
while ( partIt != partEnd ) {
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
if ( !(*it).isEmpty() )
m_vertices.insert( (*it).latin1(), new Vertex( (*it).latin1() ) );
++partIt;
}
- QValueList<KoFilterEntry::Ptr> filters( KoFilterEntry::query() ); // no constraint here - we want *all* :)
- QValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
- QValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
+ TQValueList<KoFilterEntry::Ptr> filters( KoFilterEntry::query() ); // no constraint here - we want *all* :)
+ TQValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
+ TQValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
for ( ; it != end; ++it ) {
// First add the "starting points" to the dict
- QStringList::ConstIterator importIt = ( *it )->import.begin();
- QStringList::ConstIterator importEnd = ( *it )->import.end();
+ TQStringList::ConstIterator importIt = ( *it )->import.begin();
+ TQStringList::ConstIterator importEnd = ( *it )->import.end();
for ( ; importIt != importEnd; ++importIt ) {
- const QCString key = ( *importIt ).latin1(); // latin1 is okay here (werner)
+ const TQCString key = ( *importIt ).latin1(); // latin1 is okay here (werner)
// already there?
if ( !m_vertices[ key ] )
m_vertices.insert( key, new Vertex( key ) );
@@ -833,12 +833,12 @@ namespace KOffice {
// Are we allowed to use this filter at all?
if ( KoFilterManager::filterAvailable( *it ) ) {
- QStringList::ConstIterator exportIt = ( *it )->export_.begin();
- QStringList::ConstIterator exportEnd = ( *it )->export_.end();
+ TQStringList::ConstIterator exportIt = ( *it )->export_.begin();
+ TQStringList::ConstIterator exportEnd = ( *it )->export_.end();
for ( ; exportIt != exportEnd; ++exportIt ) {
// First make sure the export vertex is in place
- const QCString key = ( *exportIt ).latin1(); // latin1 is okay here
+ const TQCString key = ( *exportIt ).latin1(); // latin1 is okay here
Vertex* exp = m_vertices[ key ];
if ( !exp ) {
exp = new Vertex( key );
@@ -886,21 +886,21 @@ namespace KOffice {
m_graphValid = true;
}
- QCString Graph::findKOfficePart() const
+ TQCString Graph::findKOfficePart() const
{
// Here we simply try to find the closest KOffice mimetype
- QValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
- QValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
- QValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
+ TQValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
+ TQValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
+ TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
const Vertex *v = 0;
// Be sure that v gets initialized correctly
while ( !v && partIt != partEnd ) {
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; !v && it != end; ++it )
if ( !(*it).isEmpty() )
v = m_vertices[ ( *it ).latin1() ];
@@ -911,12 +911,12 @@ namespace KOffice {
// Now we try to find the "cheapest" KOffice vertex
while ( partIt != partEnd ) {
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; !v && it != end; ++it ) {
- QString key = *it;
+ TQString key = *it;
if ( !key.isEmpty() ) {
Vertex* tmp = m_vertices[ key.latin1() ];
if ( !v || ( tmp && tmp->key() < v->key() ) )
diff --git a/lib/kofficecore/KoFilterChain.h b/lib/kofficecore/KoFilterChain.h
index 5b8dd3dd..2936ae40 100644
--- a/lib/kofficecore/KoFilterChain.h
+++ b/lib/kofficecore/KoFilterChain.h
@@ -19,10 +19,10 @@
#ifndef __koffice_filter_chain_h__
#define __koffice_filter_chain_h__
-#include <qcstring.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqcstring.h>
+#include <tqasciidict.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <KoFilter.h>
#include <KoQueryTrader.h>
@@ -32,7 +32,7 @@
class KTempFile;
class KoFilterManager;
class KoDocument;
-class QStrList;
+class TQStrList;
namespace KOffice {
class Graph;
@@ -69,25 +69,25 @@ public:
* @return The return status of the conversion. KoFilter::OK
* if everything is alright.
*/
- KoFilter::ConversionStatus invokeChain();
+ KoFilter::ConversiontqStatus invokeChain();
/**
* Tells the @ref KoFilterManager the output file of the
* filter chain in case of an import operation. If it's
- * QString::null we directly manipulated the document.
+ * TQString() we directly manipulated the document.
*/
- QString chainOutput() const;
+ TQString chainOutput() const;
/**
* Get the current file to read from. This part of the API
* is for the filters in our chain.
*/
- QString inputFile();
+ TQString inputFile();
/**
* Get the current file to write to. This part of the API
* is for the filters in our chain.
*/
- QString outputFile();
+ TQString outputFile();
/**
* Get a file from a storage. May return 0!
@@ -99,7 +99,7 @@ public:
* @param mode Whether we want to read or write from/to the stream
* @return The storage device to access the stream. May be 0!
*/
- KoStoreDevice* storageFile( const QString& name = "root", KoStore::Mode mode = KoStore::Read );
+ KoStoreDevice* storageFile( const TQString& name = "root", KoStore::Mode mode = KoStore::Read );
/**
* This method allows your filter to work directly on the
@@ -123,27 +123,27 @@ public:
private:
// ### API for KOffice::Graph:
// Construct a filter chain belonging to some KoFilterManager.
- // The parent filter manager may be 0.
+ // The tqparent filter manager may be 0.
KoFilterChain( const KoFilterManager* manager );
- void appendChainLink( KoFilterEntry::Ptr filterEntry, const QCString& from, const QCString& to );
- void prependChainLink( KoFilterEntry::Ptr filterEntry, const QCString& from, const QCString& to );
+ void appendChainLink( KoFilterEntry::Ptr filterEntry, const TQCString& from, const TQCString& to );
+ void prependChainLink( KoFilterEntry::Ptr filterEntry, const TQCString& from, const TQCString& to );
// ### API for KoEmbeddingFilter
// This is needed as the embedding filter might have to influence
// the way we change directories (e.g. in the olefilter case)
// The ugly friend methods are needed, but I'd welcome and suggestions for
// better design :}
- friend void KoEmbeddingFilter::filterChainEnterDirectory( const QString& directory ) const;
- void enterDirectory( const QString& directory );
+ friend void KoEmbeddingFilter::filterChainEnterDirectory( const TQString& directory ) const;
+ void enterDirectory( const TQString& directory );
friend void KoEmbeddingFilter::filterChainLeaveDirectory() const;
void leaveDirectory();
// These methods are friends of KoFilterManager and provide access
// to a private part of its API. As I don't want to include
// koFilterManager.h in this header the direction is "int" here.
- QString filterManagerImportFile() const;
- QString filterManagerExportFile() const;
+ TQString filterManagerImportFile() const;
+ TQString filterManagerExportFile() const;
KoDocument* filterManagerKoDocument() const;
int filterManagerDirection() const;
KoFilterChain* const filterManagerParentChain() const;
@@ -157,18 +157,18 @@ private:
bool createTempFile( KTempFile** tempFile, bool autoDelete = true );
- void inputFileHelper( KoDocument* document, const QString& alternativeFile );
+ void inputFileHelper( KoDocument* document, const TQString& alternativeFile );
void outputFileHelper( bool autoDelete );
- KoStoreDevice* storageNewStreamHelper( KoStore** storage, KoStoreDevice** device, const QString& name );
- KoStoreDevice* storageHelper( const QString& file, const QString& streamName,
+ KoStoreDevice* storageNewStreamHelper( KoStore** storage, KoStoreDevice** device, const TQString& name );
+ KoStoreDevice* storageHelper( const TQString& file, const TQString& streamName,
KoStore::Mode mode, KoStore** storage, KoStoreDevice** device );
- void storageInit( const QString& file, KoStore::Mode mode, KoStore** storage );
- KoStoreDevice* storageInitEmbedding( const QString& name );
- KoStoreDevice* storageCreateFirstStream( const QString& streamName, KoStore** storage, KoStoreDevice** device );
+ void storageInit( const TQString& file, KoStore::Mode mode, KoStore** storage );
+ KoStoreDevice* storageInitEmbedding( const TQString& name );
+ KoStoreDevice* storageCreateFirstStream( const TQString& streamName, KoStore** storage, KoStoreDevice** device );
KoStoreDevice* storageCleanupHelper( KoStore** storage );
- KoDocument* createDocument( const QString& file );
- KoDocument* createDocument( const QCString& mimeType );
+ KoDocument* createDocument( const TQString& file );
+ KoDocument* createDocument( const TQCString& mimeType );
/**
* A small private helper class with represents one single filter
@@ -180,12 +180,12 @@ private:
public:
ChainLink( KoFilterChain* chain, KoFilterEntry::Ptr filterEntry,
- const QCString& from, const QCString& to );
+ const TQCString& from, const TQCString& to );
- KoFilter::ConversionStatus invokeFilter( const ChainLink* const parentChainLink );
+ KoFilter::ConversiontqStatus invokeFilter( const ChainLink* const tqparentChainLink );
- QCString from() const { return m_from; }
- QCString to() const { return m_to; }
+ TQCString from() const { return m_from; }
+ TQCString to() const { return m_to; }
// debugging
void dump() const;
@@ -198,13 +198,13 @@ private:
ChainLink( const ChainLink& rhs );
ChainLink& operator=( const ChainLink& rhs );
- void setupCommunication( const KoFilter* const parentFilter ) const;
- void setupConnections( const KoFilter* sender, const QStrList& sigs,
- const KoFilter* receiver, const QStrList& sl0ts ) const;
+ void setupCommunication( const KoFilter* const tqparentFilter ) const;
+ void setupConnections( const KoFilter* sender, const TQStrList& sigs,
+ const KoFilter* receiver, const TQStrList& sl0ts ) const;
KoFilterChain* m_chain;
KoFilterEntry::Ptr m_filterEntry;
- QCString m_from, m_to;
+ TQCString m_from, m_to;
// This hack is only needed due to crappy Microsoft design and
// circular dependencies in their embedded files :}
@@ -223,13 +223,13 @@ private:
KoFilterChain& operator=( const KoFilterChain& rhs );
const KoFilterManager* const m_manager;
- QPtrList<ChainLink> m_chainLinks;
+ TQPtrList<ChainLink> m_chainLinks;
// stuff needed for bookkeeping
int m_state;
- QString m_inputFile; // Did we pass around plain files?
- QString m_outputFile;
+ TQString m_inputFile; // Did we pass around plain files?
+ TQString m_outputFile;
KoStore* m_inputStorage; // ...or was it a storage+device?
KoStoreDevice* m_inputStorageDevice;
@@ -252,7 +252,7 @@ private:
// as a kind of "memory" even if we didn't initialize the store yet.
// I know that it's ugly, and I'll try to clean up that hack
// sooner or later (Werner)
- QStringList m_internalEmbeddingDirectories;
+ TQStringList m_internalEmbeddingDirectories;
class Private;
Private* d;
@@ -289,7 +289,7 @@ namespace KOffice
void relax( const Vertex* predecessor, PriorityQueue<Vertex>& queue );
// debugging
- void dump( const QCString& indent ) const;
+ void dump( const TQCString& indent ) const;
private:
Edge( const Edge& rhs );
@@ -311,10 +311,10 @@ namespace KOffice
{
public:
- Vertex( const QCString& mimeType );
+ Vertex( const TQCString& mimeType );
~Vertex() {}
- QCString mimeType() const { return m_mimeType; }
+ TQCString mimeType() const { return m_mimeType; }
// Current "weight" of the vertex - will be "relaxed" when
// running the shortest path algorithm. Returns true if it
@@ -345,15 +345,15 @@ namespace KOffice
void relaxVertices( PriorityQueue<Vertex>& queue );
// debugging
- void dump( const QCString& indent ) const;
+ void dump( const TQCString& indent ) const;
private:
Vertex( const Vertex& rhs );
Vertex& operator=( const Vertex& rhs );
- QPtrList<Edge> m_edges;
+ TQPtrList<Edge> m_edges;
const Vertex* m_predecessor;
- QCString m_mimeType;
+ TQCString m_mimeType;
unsigned int m_weight; // "key" inside the queue
int m_index; // position inside the queue, needed for a fast keyDecreased()
@@ -371,20 +371,20 @@ namespace KOffice
{
public:
- Graph( const QCString& from );
+ Graph( const TQCString& from );
~Graph() {}
bool isValid() const { return m_graphValid; }
- QCString sourceMimeType() const { return m_from; }
- void setSourceMimeType( const QCString& from );
+ TQCString sourceMimeType() const { return m_from; }
+ void setSourceMimeType( const TQCString& from );
// Creates a chain from "from" to the "to" mimetype
// If the "to" mimetype isEmpty() then we try to find the
// closest KOffice mimetype and use that as destination.
// After such a search "to" will contain the dest. mimetype (return value)
// if the search was successful. Might return 0!
- KoFilterChain::Ptr chain( const KoFilterManager* manager, QCString& to ) const;
+ KoFilterChain::Ptr chain( const KoFilterManager* manager, TQCString& to ) const;
// debugging
void dump() const;
@@ -395,10 +395,10 @@ namespace KOffice
void buildGraph();
void shortestPaths();
- QCString findKOfficePart() const;
+ TQCString findKOfficePart() const;
- QAsciiDict<Vertex> m_vertices;
- QCString m_from;
+ TQAsciiDict<Vertex> m_vertices;
+ TQCString m_from;
bool m_graphValid;
class Private;
diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp
index f3db5c73..46c20c2f 100644
--- a/lib/kofficecore/KoFilterManager.cpp
+++ b/lib/kofficecore/KoFilterManager.cpp
@@ -23,11 +23,11 @@
#include <KoFilterManager.h>
#include <KoFilterManager_p.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -48,27 +48,27 @@ public:
};
-KoFilterChooser::KoFilterChooser (QWidget *parent, const QStringList &mimeTypes, const QString &nativeFormat)
- : KDialogBase (parent, "kofilterchooser", true, i18n ("Choose Filter"),
+KoFilterChooser::KoFilterChooser (TQWidget *tqparent, const TQStringList &mimeTypes, const TQString &nativeFormat)
+ : KDialogBase (tqparent, "kofilterchooser", true, i18n ("Choose Filter"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true),
m_mimeTypes (mimeTypes)
{
- setInitialSize (QSize (300, 350));
+ setInitialSize (TQSize (300, 350));
- QWidget *page = new QWidget (this);
+ TQWidget *page = new TQWidget (this);
setMainWidget (page);
// looks too squashed together without * 2
- QVBoxLayout *layout = new QVBoxLayout (page, marginHint (), spacingHint () * 2);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout (page, marginHint (), spacingHint () * 2);
- QLabel *filterLabel = new QLabel (i18n ("Select a filter:"), page, "filterlabel");
- layout->addWidget (filterLabel);
+ TQLabel *filterLabel = new TQLabel (i18n ("Select a filter:"), page, "filterlabel");
+ tqlayout->addWidget (filterLabel);
m_filterList = new KListBox (page, "filterlist");
- layout->addWidget (m_filterList);
+ tqlayout->addWidget (m_filterList);
Q_ASSERT (!m_mimeTypes.isEmpty ());
- for (QStringList::ConstIterator it = m_mimeTypes.begin ();
+ for (TQStringList::ConstIterator it = m_mimeTypes.begin ();
it != m_mimeTypes.end ();
it++)
{
@@ -78,7 +78,7 @@ KoFilterChooser::KoFilterChooser (QWidget *parent, const QStringList &mimeTypes,
if (nativeFormat == "application/x-kword")
{
- const int index = m_mimeTypes.findIndex ("text/plain");
+ const int index = m_mimeTypes.tqfindIndex ("text/plain");
if (index > -1)
m_filterList->setCurrentItem (index);
}
@@ -89,26 +89,26 @@ KoFilterChooser::KoFilterChooser (QWidget *parent, const QStringList &mimeTypes,
m_filterList->centerCurrentItem ();
m_filterList->setFocus ();
- connect (m_filterList, SIGNAL (selected (int)), this, SLOT (slotOk ()));
+ connect (m_filterList, TQT_SIGNAL (selected (int)), this, TQT_SLOT (slotOk ()));
}
KoFilterChooser::~KoFilterChooser ()
{
}
-QString KoFilterChooser::filterSelected ()
+TQString KoFilterChooser::filterSelected ()
{
const int item = m_filterList->currentItem ();
if (item > -1)
return m_mimeTypes [item];
else
- return QString::null;
+ return TQString();
}
// static cache for filter availability
-QMap<QString, bool> KoFilterManager::m_filterAvailable;
+TQMap<TQString, bool> KoFilterManager::m_filterAvailable;
const int KoFilterManager::s_area = 30500;
@@ -119,14 +119,14 @@ KoFilterManager::KoFilterManager( KoDocument* document ) :
d = new KoFilterManager::Private;
d -> m_batch = false;
if ( document )
- QObject::connect( this, SIGNAL( sigProgress( int ) ),
- document, SIGNAL( sigProgress( int ) ) );
+ TQObject::connect( this, TQT_SIGNAL( sigProgress( int ) ),
+ document, TQT_SIGNAL( sigProgress( int ) ) );
}
-KoFilterManager::KoFilterManager( const QString& url, const QCString& mimetypeHint,
- KoFilterChain* const parentChain ) :
- m_document( 0 ), m_parentChain( parentChain ), m_importUrl( url ), m_importUrlMimetypeHint( mimetypeHint ),
+KoFilterManager::KoFilterManager( const TQString& url, const TQCString& mimetypeHint,
+ KoFilterChain* const tqparentChain ) :
+ m_document( 0 ), m_parentChain( tqparentChain ), m_importUrl( url ), m_importUrlMimetypeHint( mimetypeHint ),
m_graph( "" ), d( 0 )
{
d = new KoFilterManager::Private;
@@ -138,7 +138,7 @@ KoFilterManager::~KoFilterManager()
delete d;
}
-QString KoFilterManager::import( const QString& url, KoFilter::ConversionStatus& status )
+TQString KoFilterManager::import( const TQString& url, KoFilter::ConversiontqStatus& status )
{
// Find the mime type for the file to be imported.
KURL u;
@@ -155,22 +155,22 @@ QString KoFilterManager::import( const QString& url, KoFilter::ConversionStatus&
if ( !m_document->isAutoErrorHandlingEnabled() )
{
status = KoFilter::BadConversionGraph;
- return QString::null;
+ return TQString();
}
- QCString nativeFormat = m_document->nativeFormatMimeType ();
+ TQCString nativeFormat = m_document->nativeFormatMimeType ();
- QApplication::setOverrideCursor( arrowCursor );
+ TQApplication::setOverrideCursor( arrowCursor );
KoFilterChooser chooser(0,
KoFilterManager::mimeFilter (nativeFormat, KoFilterManager::Import, m_document->extraNativeMimeTypes()),
nativeFormat);
if (chooser.exec ())
{
- QCString f = chooser.filterSelected ().latin1();
+ TQCString f = chooser.filterSelected ().latin1();
if (f == nativeFormat)
{
status = KoFilter::OK;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return url;
}
@@ -178,7 +178,7 @@ QString KoFilterManager::import( const QString& url, KoFilter::ConversionStatus&
}
else
userCancelled = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
if (!m_graph.isValid())
@@ -187,15 +187,15 @@ QString KoFilterManager::import( const QString& url, KoFilter::ConversionStatus&
<< t->name() << endl;
importErrorHelper( t->name(), userCancelled );
status = KoFilter::BadConversionGraph;
- return QString::null;
+ return TQString();
}
}
KoFilterChain::Ptr chain( 0 );
// Are we owned by a KoDocument?
if ( m_document ) {
- QCString mimeType = m_document->nativeFormatMimeType();
- QStringList extraMimes = m_document->extraNativeMimeTypes();
+ TQCString mimeType = m_document->nativeFormatMimeType();
+ TQStringList extraMimes = m_document->extraNativeMimeTypes();
int i=0, n = extraMimes.count();
chain = m_graph.chain( this, mimeType );
while( !chain && i<n) {
@@ -207,31 +207,31 @@ QString KoFilterManager::import( const QString& url, KoFilter::ConversionStatus&
else {
kdError(s_area) << "You aren't supposed to use import() from a filter!" << endl;
status = KoFilter::UsageError;
- return QString::null;
+ return TQString();
}
if ( !chain ) {
kdError(s_area) << "Couldn't create a valid filter chain!" << endl;
importErrorHelper( t->name() );
status = KoFilter::BadConversionGraph;
- return QString::null;
+ return TQString();
}
// Okay, let's invoke the filters one after the other
m_direction = Import; // vital information!
m_importUrl = url; // We want to load that file
- m_exportUrl = QString::null; // This is null for sure, as embedded stuff isn't
+ m_exportUrl = TQString(); // This is null for sure, as embedded stuff isn't
// allowed to use that method
status = chain->invokeChain();
- m_importUrl = QString::null; // Reset the import URL
+ m_importUrl = TQString(); // Reset the import URL
if ( status == KoFilter::OK )
return chain->chainOutput();
- return QString::null;
+ return TQString();
}
-KoFilter::ConversionStatus KoFilterManager::exp0rt( const QString& url, QCString& mimeType )
+KoFilter::ConversiontqStatus KoFilterManager::exp0rt( const TQString& url, TQCString& mimeType )
{
bool userCancelled = false;
@@ -243,11 +243,11 @@ KoFilter::ConversionStatus KoFilterManager::exp0rt( const QString& url, QCString
KoFilterChain::Ptr chain = 0;
if ( m_document ) {
// We have to pick the right native mimetype as source.
- QStringList nativeMimeTypes;
+ TQStringList nativeMimeTypes;
nativeMimeTypes.append( m_document->nativeFormatMimeType() );
nativeMimeTypes += m_document->extraNativeMimeTypes();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- const QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ const TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; !chain && it != end; ++it )
{
m_graph.setSourceMimeType( (*it).latin1() );
@@ -272,14 +272,14 @@ KoFilter::ConversionStatus KoFilterManager::exp0rt( const QString& url, QCString
if ( !m_graph.isValid() ) {
kdWarning(s_area) << "Can't open " << t->name () << ", trying filter chooser" << endl;
- QApplication::setOverrideCursor( arrowCursor );
+ TQApplication::setOverrideCursor( arrowCursor );
KoFilterChooser chooser(0, KoFilterManager::mimeFilter ());
if (chooser.exec ())
m_graph.setSourceMimeType (chooser.filterSelected ().latin1 ());
else
userCancelled = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
@@ -308,28 +308,28 @@ namespace // in order not to mess with the global namespace ;)
class Vertex
{
public:
- Vertex( const QCString& mimeType ) : m_color( White ), m_mimeType( mimeType ) {}
+ Vertex( const TQCString& mimeType ) : m_color( White ), m_mimeType( mimeType ) {}
enum Color { White, Gray, Black };
Color color() const { return m_color; }
void setColor( Color color ) { m_color = color; }
- QCString mimeType() const { return m_mimeType; }
+ TQCString mimeType() const { return m_mimeType; }
void addEdge( Vertex* vertex ) { if ( vertex ) m_edges.append( vertex ); }
- QPtrList<Vertex> edges() const { return m_edges; }
+ TQPtrList<Vertex> edges() const { return m_edges; }
private:
Color m_color;
- QCString m_mimeType;
- QPtrList<Vertex> m_edges;
+ TQCString m_mimeType;
+ TQPtrList<Vertex> m_edges;
};
// Some helper methods for the static stuff
// This method builds up the graph in the passed ascii dict
- void buildGraph( QAsciiDict<Vertex>& vertices, KoFilterManager::Direction direction )
+ void buildGraph( TQAsciiDict<Vertex>& vertices, KoFilterManager::Direction direction )
{
- QStringList stopList; // Lists of mimetypes that are considered end of chains
+ TQStringList stopList; // Lists of mimetypes that are considered end of chains
stopList << "text/plain";
stopList << "text/csv";
stopList << "text/x-tex";
@@ -339,38 +339,38 @@ namespace // in order not to mess with the global namespace ;)
// partly copied from build graph, but I don't see any other
// way without crude hacks, as we have to obey the direction here
- QValueList<KoDocumentEntry> parts( KoDocumentEntry::query(false, QString::null) );
- QValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
- QValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
+ TQValueList<KoDocumentEntry> parts( KoDocumentEntry::query(false, TQString()) );
+ TQValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
+ TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
while ( partIt != partEnd ) {
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- const QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ const TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
if ( !(*it).isEmpty() )
vertices.insert( (*it).latin1(), new Vertex( (*it).latin1() ) );
++partIt;
}
- QValueList<KoFilterEntry::Ptr> filters = KoFilterEntry::query(); // no constraint here - we want *all* :)
- QValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
- const QValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
+ TQValueList<KoFilterEntry::Ptr> filters = KoFilterEntry::query(); // no constraint here - we want *all* :)
+ TQValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
+ const TQValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
for ( ; it != end; ++it ) {
- QStringList impList; // Import list
- QStringList expList; // Export list
+ TQStringList impList; // Import list
+ TQStringList expList; // Export list
- const QStringList::Iterator stopEnd = stopList.end();
+ const TQStringList::Iterator stopEnd = stopList.end();
// Now we have to exclude the "stop" mimetypes (in the right direction!)
if ( direction == KoFilterManager::Import ) {
// Import: "stop" mime type should not appear in export
- QStringList::ConstIterator testIt = ( *it )->export_.begin();
- QStringList::ConstIterator testEnd = ( *it )->export_.end();
+ TQStringList::ConstIterator testIt = ( *it )->export_.begin();
+ TQStringList::ConstIterator testEnd = ( *it )->export_.end();
for ( ; testIt != testEnd ; ++testIt ) {
- if ( stopList.find( *testIt ) == stopEnd ) {
+ if ( stopList.tqfind( *testIt ) == stopEnd ) {
expList.append( *testIt );
}
}
@@ -378,10 +378,10 @@ namespace // in order not to mess with the global namespace ;)
}
else {
// Export: "stop" mime type should not appear in import
- QStringList::ConstIterator testIt = ( *it )->import.begin();
- const QStringList::ConstIterator testEnd = ( *it )->import.end();
+ TQStringList::ConstIterator testIt = ( *it )->import.begin();
+ const TQStringList::ConstIterator testEnd = ( *it )->import.end();
for ( ; testIt != testEnd ; ++testIt ) {
- if ( stopList.find( *testIt ) == stopEnd ) {
+ if ( stopList.tqfind( *testIt ) == stopEnd ) {
impList.append( *testIt );
}
}
@@ -396,10 +396,10 @@ namespace // in order not to mess with the global namespace ;)
}
// First add the "starting points" to the dict
- QStringList::ConstIterator importIt = impList.begin();
- const QStringList::ConstIterator importEnd = impList.end();
+ TQStringList::ConstIterator importIt = impList.begin();
+ const TQStringList::ConstIterator importEnd = impList.end();
for ( ; importIt != importEnd; ++importIt ) {
- const QCString key = ( *importIt ).latin1(); // latin1 is okay here (werner)
+ const TQCString key = ( *importIt ).latin1(); // latin1 is okay here (werner)
// already there?
if ( !vertices[ key ] )
vertices.insert( key, new Vertex( key ) );
@@ -407,12 +407,12 @@ namespace // in order not to mess with the global namespace ;)
// Are we allowed to use this filter at all?
if ( KoFilterManager::filterAvailable( *it ) ) {
- QStringList::ConstIterator exportIt = expList.begin();
- const QStringList::ConstIterator exportEnd = expList.end();
+ TQStringList::ConstIterator exportIt = expList.begin();
+ const TQStringList::ConstIterator exportEnd = expList.end();
for ( ; exportIt != exportEnd; ++exportIt ) {
// First make sure the export vertex is in place
- const QCString key = ( *exportIt ).latin1(); // latin1 is okay here
+ const TQCString key = ( *exportIt ).latin1(); // latin1 is okay here
Vertex* exp = vertices[ key ];
if ( !exp ) {
exp = new Vertex( key );
@@ -440,24 +440,24 @@ namespace // in order not to mess with the global namespace ;)
// This method runs a BFS on the graph to determine the connected
// nodes. Make sure that the graph is "cleared" (the colors of the
// nodes are all white)
- QStringList connected( const QAsciiDict<Vertex>& vertices, const QCString& mimetype )
+ TQStringList connected( const TQAsciiDict<Vertex>& vertices, const TQCString& mimetype )
{
if ( mimetype.isEmpty() )
- return QStringList();
+ return TQStringList();
Vertex *v = vertices[ mimetype ];
if ( !v )
- return QStringList();
+ return TQStringList();
v->setColor( Vertex::Gray );
std::queue<Vertex*> queue;
queue.push( v );
- QStringList connected;
+ TQStringList connected;
while ( !queue.empty() ) {
v = queue.front();
queue.pop();
- QPtrList<Vertex> edges = v->edges();
- QPtrListIterator<Vertex> it( edges );
+ TQPtrList<Vertex> edges = v->edges();
+ TQPtrListIterator<Vertex> it( edges );
for ( ; it.current(); ++it ) {
if ( it.current()->color() == Vertex::White ) {
it.current()->setColor( Vertex::Gray );
@@ -473,45 +473,45 @@ namespace // in order not to mess with the global namespace ;)
// The static method to figure out to which parts of the
// graph this mimetype has a connection to.
-QStringList KoFilterManager::mimeFilter( const QCString& mimetype, Direction direction, const QStringList& extraNativeMimeTypes )
+TQStringList KoFilterManager::mimeFilter( const TQCString& mimetype, Direction direction, const TQStringList& extraNativeMimeTypes )
{
//kdDebug(s_area) << "mimetype=" << mimetype << " extraNativeMimeTypes=" << extraNativeMimeTypes << endl;
- QAsciiDict<Vertex> vertices;
+ TQAsciiDict<Vertex> vertices;
buildGraph( vertices, direction );
// TODO maybe use the fake vertex trick from the method below, to make the search faster?
- QStringList nativeMimeTypes;
- nativeMimeTypes.append( QString::fromLatin1( mimetype ) );
+ TQStringList nativeMimeTypes;
+ nativeMimeTypes.append( TQString::tqfromLatin1( mimetype ) );
nativeMimeTypes += extraNativeMimeTypes;
// Add the native mimetypes first so that they are on top.
- QStringList lst = nativeMimeTypes;
+ TQStringList lst = nativeMimeTypes;
// Now look for filters which output each of those natives mimetypes
- for( QStringList::ConstIterator natit = nativeMimeTypes.begin(); natit != nativeMimeTypes.end(); ++natit ) {
- const QStringList outMimes = connected( vertices, (*natit).latin1() );
+ for( TQStringList::ConstIterator natit = nativeMimeTypes.begin(); natit != nativeMimeTypes.end(); ++natit ) {
+ const TQStringList outMimes = connected( vertices, (*natit).latin1() );
//kdDebug(s_area) << k_funcinfo << "output formats connected to mime " << *natit << " : " << outMimes << endl;
- for ( QStringList::ConstIterator mit = outMimes.begin(); mit != outMimes.end(); ++mit )
- if ( lst.find( *mit ) == lst.end() ) // append only if not there already. Qt4: QSet<QString>?
+ for ( TQStringList::ConstIterator mit = outMimes.begin(); mit != outMimes.end(); ++mit )
+ if ( lst.tqfind( *mit ) == lst.end() ) // append only if not there already. TQt4: TQSet<TQString>?
lst.append( *mit );
}
return lst;
}
-QStringList KoFilterManager::mimeFilter()
+TQStringList KoFilterManager::mimeFilter()
{
- QAsciiDict<Vertex> vertices;
+ TQAsciiDict<Vertex> vertices;
buildGraph( vertices, KoFilterManager::Import );
- QValueList<KoDocumentEntry> parts( KoDocumentEntry::query(false, QString::null) );
- QValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
- QValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
+ TQValueList<KoDocumentEntry> parts( KoDocumentEntry::query(false, TQString()) );
+ TQValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
+ TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
if ( partIt == partEnd )
- return QStringList();
+ return TQStringList();
- // To find *all* reachable mimetypes, we have to resort to
+ // To tqfind *all* reachable mimetypes, we have to resort to
// a small hat trick, in order to avoid multiple searches:
// We introduce a fake vertex, which is connected to every
// single KOffice mimetype. Due to that one BFS is enough :)
@@ -519,16 +519,16 @@ QStringList KoFilterManager::mimeFilter()
Vertex *v = new Vertex( "supercalifragilistic/x-pialadocious" );
vertices.insert( "supercalifragilistic/x-pialadocious", v );
while ( partIt != partEnd ) {
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- const QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ const TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
if ( !(*it).isEmpty() )
v->addEdge( vertices[ (*it).latin1() ] );
++partIt;
}
- QStringList result = connected( vertices, "supercalifragilistic/x-pialadocious" );
+ TQStringList result = connected( vertices, "supercalifragilistic/x-pialadocious" );
// Finally we have to get rid of our fake mimetype again
result.remove( "supercalifragilistic/x-pialadocious" );
@@ -546,14 +546,14 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry )
//kdDebug( 30500 ) << "Checking whether " << entry->service()->name() << " applies." << endl;
// generate some "unique" key
- QString key( entry->service()->name() );
+ TQString key( entry->service()->name() );
key += " - ";
key += entry->service()->library();
- if ( !m_filterAvailable.contains( key ) ) {
+ if ( !m_filterAvailable.tqcontains( key ) ) {
//kdDebug( 30500 ) << "Not cached, checking..." << endl;
- KLibrary* library = KLibLoader::self()->library( QFile::encodeName( entry->service()->library() ) );
+ KLibrary* library = KLibLoader::self()->library( TQFile::encodeName( entry->service()->library() ) );
if ( !library ) {
kdWarning( 30500 ) << "Huh?? Couldn't load the lib: "
<< KLibLoader::self()->lastErrorMessage() << endl;
@@ -562,7 +562,7 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry )
}
// This code is "borrowed" from klibloader ;)
- QCString symname;
+ TQCString symname;
symname.sprintf("check_%s", library->name().latin1() );
void* sym = library->symbol( symname );
if ( !sym )
@@ -581,9 +581,9 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry )
return m_filterAvailable[ key ];
}
-void KoFilterManager::importErrorHelper( const QString& mimeType, const bool suppressDialog )
+void KoFilterManager::importErrorHelper( const TQString& mimeType, const bool suppressDialog )
{
- QString tmp = i18n("Could not import file of type\n%1").arg( mimeType );
+ TQString tmp = i18n("Could not import file of type\n%1").tqarg( mimeType );
// ###### FIXME: use KLibLoader::lastErrorMessage() here
if (!suppressDialog) KMessageBox::error( 0L, tmp, i18n("Missing Import Filter") );
}
diff --git a/lib/kofficecore/KoFilterManager.h b/lib/kofficecore/KoFilterManager.h
index 952c8475..8405f49b 100644
--- a/lib/kofficecore/KoFilterManager.h
+++ b/lib/kofficecore/KoFilterManager.h
@@ -22,8 +22,8 @@
#ifndef __koffice_filter_manager_h__
#define __koffice_filter_manager_h__
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <KoFilterChain.h>
#include <koffice_export.h>
class KoDocument;
@@ -41,9 +41,10 @@ class KoDocument;
* @author Torben Weis <[email protected]>
* @author Werner Trobin <[email protected]>
*/
-class KOFFICECORE_EXPORT KoFilterManager : public QObject
+class KOFFICECORE_EXPORT KoFilterManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* This enum is used to distinguish the import/export cases
@@ -65,11 +66,11 @@ public:
* to specify this information only if the automatic detection will
* fail because e.g. you saved an embedded stream to a *.tmp file.
* Most likely you do not have to care about that.
- * @param parentChain The parent filter chain of this filter manager. Used
+ * @param tqparentChain The tqparent filter chain of this filter manager. Used
* to allow embedding for filters. Most likely you do not have to care.
*/
- KoFilterManager( const QString& url, const QCString& mimetypeHint = "",
- KoFilterChain* const parentChain = 0 );
+ KoFilterManager( const TQString& url, const TQCString& mimetypeHint = "",
+ KoFilterChain* const tqparentChain = 0 );
virtual ~KoFilterManager();
@@ -77,10 +78,10 @@ public:
* Imports the passed URL and returns the resultant filename
* (most likely some file in /tmp).
* The @p status variable signals the success/error of the conversion
- * If the QString which is returned isEmpty() and the status is OK,
+ * If the TQString which is returned isEmpty() and the status is OK,
* then we imported the file directly into the document.
*/
- QString import( const QString& url, KoFilter::ConversionStatus& status );
+ TQString import( const TQString& url, KoFilter::ConversiontqStatus& status );
/**
* @brief Exports the given file/document to the specified URL/mimetype.
*
@@ -88,7 +89,7 @@ public:
* and when the method returns @p mimeType contains this mimetype.
* Oh, well, export is a C++ keyword ;)
*/
- KoFilter::ConversionStatus exp0rt( const QString& url, QCString& mimeType );
+ KoFilter::ConversiontqStatus exp0rt( const TQString& url, TQCString& mimeType );
@@ -100,8 +101,8 @@ public:
* information here.
* Optionally, @p extraNativeMimeTypes are added after the native mimetype.
*/
- KOFFICECORE_EXPORT static QStringList mimeFilter( const QCString& mimetype, Direction direction,
- const QStringList& extraNativeMimeTypes = QStringList() );
+ KOFFICECORE_EXPORT static TQStringList mimeFilter( const TQCString& mimetype, Direction direction,
+ const TQStringList& extraNativeMimeTypes = TQStringList() );
/**
* The same method as KoFilterManager::mimeFilter but suited for KoShell.
@@ -110,7 +111,7 @@ public:
* call this for importing. When saving from KoShell we already
* know the KOffice part we are using.
*/
- static QStringList mimeFilter();
+ static TQStringList mimeFilter();
/**
* Method used to check if that filter is available at all.
@@ -142,34 +143,34 @@ private:
// The friend methods are private in KoFilterChain and
// just forward calls to the methods here. Should be
// pretty save.
- friend QString KoFilterChain::filterManagerImportFile() const;
- QString importFile() const { return m_importUrl; }
- friend QString KoFilterChain::filterManagerExportFile() const;
- QString exportFile() const { return m_exportUrl; }
+ friend TQString KoFilterChain::filterManagerImportFile() const;
+ TQString importFile() const { return m_importUrl; }
+ friend TQString KoFilterChain::filterManagerExportFile() const;
+ TQString exportFile() const { return m_exportUrl; }
friend KoDocument* KoFilterChain::filterManagerKoDocument() const;
KoDocument* document() const { return m_document; }
friend int KoFilterChain::filterManagerDirection() const;
int direction() const { return static_cast<int>( m_direction ); }
friend KoFilterChain* const KoFilterChain::filterManagerParentChain() const;
- KoFilterChain* const parentChain() const { return m_parentChain; }
+ KoFilterChain* const tqparentChain() const { return m_parentChain; }
// Private API
KoFilterManager( const KoFilterManager& rhs );
KoFilterManager &operator=( const KoFilterManager& rhs );
- void importErrorHelper( const QString& mimeType, const bool suppressDialog = false );
+ void importErrorHelper( const TQString& mimeType, const bool suppressDialog = false );
static const int s_area;
KoDocument* m_document;
KoFilterChain* const m_parentChain;
- QString m_importUrl, m_exportUrl;
- QCString m_importUrlMimetypeHint; ///< suggested mimetype
+ TQString m_importUrl, m_exportUrl;
+ TQCString m_importUrlMimetypeHint; ///< suggested mimetype
KOffice::Graph m_graph;
Direction m_direction;
/// A static cache for the availability checks of filters
- static QMap<QString, bool> m_filterAvailable;
+ static TQMap<TQString, bool> m_filterAvailable;
class Private;
Private *d;
diff --git a/lib/kofficecore/KoFilterManager_p.h b/lib/kofficecore/KoFilterManager_p.h
index 20c6cac8..358c25cd 100644
--- a/lib/kofficecore/KoFilterManager_p.h
+++ b/lib/kofficecore/KoFilterManager_p.h
@@ -19,8 +19,8 @@
#ifndef __koFilterManager_p_h__
#define __koFilterManager_p_h__
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
@@ -30,16 +30,17 @@ class KListBox;
class KoFilterChooser : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoFilterChooser (QWidget *parent, const QStringList &mimeTypes,
- const QString &nativeFormat = QString::null);
+ KoFilterChooser (TQWidget *tqparent, const TQStringList &mimeTypes,
+ const TQString &nativeFormat = TQString());
~KoFilterChooser ();
- QString filterSelected ();
+ TQString filterSelected ();
private:
- QStringList m_mimeTypes;
+ TQStringList m_mimeTypes;
KListBox *m_filterList;
};
diff --git a/lib/kofficecore/KoFrame.cpp b/lib/kofficecore/KoFrame.cpp
index 4c07d5c1..b6f77b8a 100644
--- a/lib/kofficecore/KoFrame.cpp
+++ b/lib/kofficecore/KoFrame.cpp
@@ -20,12 +20,12 @@
#include <KoFrame.h>
#include <KoView.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kparts/event.h>
#include <kcursor.h>
#include <kdebug.h>
-#define QMAX32767(a,b) QMAX(QMAX(32767,a),b)
+#define TQMAX32767(a,b) TQMAX(TQMAX(32767,a),b)
class KoFramePrivate
{
@@ -39,8 +39,8 @@ public:
KoView *m_view;
- QPoint m_mousePressPos;
- QPoint m_framePos;
+ TQPoint m_mousePressPos;
+ TQPoint m_framePos;
int m_width;
int m_height;
int m_mode;
@@ -48,8 +48,8 @@ public:
KoFrame::State m_state;
};
-KoFrame::KoFrame( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KoFrame::KoFrame( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
d = new KoFramePrivate;
d->m_state = Inactive;
@@ -97,12 +97,12 @@ void KoFrame::setState( State s )
{
/*
kdDebug(30003) << "KoFrame::setView setMaximumSize "
- << "QMAX32767(" << d->m_view->maximumWidth() + 2 * border() << "," << d->m_view->maximumWidth() << "), "
- << "QMAX32767(" << d->m_view->maximumHeight() + 2 * border() << "," << d->m_view->maximumHeight() << ")"
+ << "TQMAX32767(" << d->m_view->maximumWidth() + 2 * border() << "," << d->m_view->maximumWidth() << "), "
+ << "TQMAX32767(" << d->m_view->maximumHeight() + 2 * border() << "," << d->m_view->maximumHeight() << ")"
<< endl;
*/
- setMaximumSize( QMAX32767( d->m_view->maximumWidth() + 2 * border(), d->m_view->maximumWidth() ),
- QMAX32767( d->m_view->maximumHeight() + 2 * border(), d->m_view->maximumHeight() ) );
+ setMaximumSize( TQMAX32767( d->m_view->maximumWidth() + 2 * border(), d->m_view->maximumWidth() ),
+ TQMAX32767( d->m_view->maximumHeight() + 2 * border(), d->m_view->maximumHeight() ) );
setMinimumSize( d->m_view->minimumWidth() + leftBorder() + rightBorder(),
d->m_view->minimumHeight() + topBorder() + bottomBorder() );
}
@@ -183,9 +183,9 @@ int KoFrame::border() const
return 5;
}
-void KoFrame::paintEvent( QPaintEvent* )
+void KoFrame::paintEvent( TQPaintEvent* )
{
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
painter.setPen( black );
@@ -206,32 +206,32 @@ void KoFrame::paintEvent( QPaintEvent* )
painter.end();
}
-void KoFrame::mousePressEvent( QMouseEvent* ev )
+void KoFrame::mousePressEvent( TQMouseEvent* ev )
{
- QRect r1( 0, 0, 5, 5 );
- QRect r2( 0, height() - 5, 5, 5 );
- QRect r3( width() - 5, height() - 5, 5, 5 );
- QRect r4( width() - 5, 0, 5, 5 );
- QRect r5( width() / 2 - 3, 0, 5, 5 );
- QRect r6( width() / 2 - 3, height() - 5, 5, 5 );
- QRect r7( 0, height() / 2 - 3, 5, 5 );
- QRect r8( width()- 5, height() / 2 - 3, 5, 5 );
-
- if ( r1.contains( ev->pos() ) )
+ TQRect r1( 0, 0, 5, 5 );
+ TQRect r2( 0, height() - 5, 5, 5 );
+ TQRect r3( width() - 5, height() - 5, 5, 5 );
+ TQRect r4( width() - 5, 0, 5, 5 );
+ TQRect r5( width() / 2 - 3, 0, 5, 5 );
+ TQRect r6( width() / 2 - 3, height() - 5, 5, 5 );
+ TQRect r7( 0, height() / 2 - 3, 5, 5 );
+ TQRect r8( width()- 5, height() / 2 - 3, 5, 5 );
+
+ if ( r1.tqcontains( ev->pos() ) )
d->m_mode = 1;
- else if ( r2.contains( ev->pos() ) )
+ else if ( r2.tqcontains( ev->pos() ) )
d->m_mode = 2;
- else if ( r3.contains( ev->pos() ) )
+ else if ( r3.tqcontains( ev->pos() ) )
d->m_mode = 3;
- else if ( r4.contains( ev->pos() ) )
+ else if ( r4.tqcontains( ev->pos() ) )
d->m_mode = 4;
- else if ( r5.contains( ev->pos() ) )
+ else if ( r5.tqcontains( ev->pos() ) )
d->m_mode = 5;
- else if ( r6.contains( ev->pos() ) )
+ else if ( r6.tqcontains( ev->pos() ) )
d->m_mode = 6;
- else if ( r7.contains( ev->pos() ) )
+ else if ( r7.tqcontains( ev->pos() ) )
d->m_mode = 7;
- else if ( r8.contains( ev->pos() ) )
+ else if ( r8.tqcontains( ev->pos() ) )
d->m_mode = 8;
else
d->m_mode = 0;
@@ -242,98 +242,98 @@ void KoFrame::mousePressEvent( QMouseEvent* ev )
kdDebug(30003) << "---- MODE=" << d->m_mode << endl;
d->m_mousePressPos = mapToParent( ev->pos() );
- d->m_framePos = mapToParent( QPoint( 0, 0 ) );
+ d->m_framePos = mapToParent( TQPoint( 0, 0 ) );
d->m_width = width();
d->m_height = height();
}
-void KoFrame::mouseMoveEvent( QMouseEvent* ev )
+void KoFrame::mouseMoveEvent( TQMouseEvent* ev )
{
if ( d->m_mode == 0 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- move( QPoint( p.x() + d->m_framePos.x() - d->m_mousePressPos.x(),
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ move( TQPoint( p.x() + d->m_framePos.x() - d->m_mousePressPos.x(),
p.y() + d->m_framePos.y() - d->m_mousePressPos.y() ) );
- // The other modes change the geometry so they call resizeEvent.
- // This one doesn't, so it has to emit geometryChangedby itself.
- emit geometryChanged();
+ // The other modes change the tqgeometry so they call resizeEvent.
+ // This one doesn't, so it has to emit tqgeometryChangedby itself.
+ emit tqgeometryChanged();
//kdDebug() << "KoFrame::mouseMoveEvent koFrame position is " << x() << "," << y() << endl;
}
else if ( d->m_mode == 1 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
- int h = QMIN( QMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
+ int h = TQMIN( TQMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
setGeometry( d->m_framePos.x() - w + d->m_width,
d->m_framePos.y() - h + d->m_height, w, h );
}
else if ( d->m_mode == 2 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
- int h = QMIN( QMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
+ int h = TQMIN( TQMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
setGeometry( d->m_framePos.x() - w + d->m_width,
d->m_framePos.y(), w, h );
}
else if ( d->m_mode == 3 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
- int h = QMIN( QMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
+ int h = TQMIN( TQMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
resize( w, h );
}
else if ( d->m_mode == 4 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
- int h = QMIN( QMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
+ int h = TQMIN( TQMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
setGeometry( d->m_framePos.x(),
d->m_framePos.y() - h + d->m_height, w, h );
}
else if ( d->m_mode == 5 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int h = QMIN( QMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int h = TQMIN( TQMAX( d->m_height + d->m_mousePressPos.y() - p.y(), minimumHeight() ), maximumHeight() );
setGeometry( d->m_framePos.x(),
d->m_framePos.y() - h + d->m_height, d->m_width, h );
}
else if ( d->m_mode == 6 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int h = QMIN( QMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int h = TQMIN( TQMAX( d->m_height - d->m_mousePressPos.y() + p.y(), minimumHeight() ), maximumHeight() );
resize( d->m_width, h );
}
else if ( d->m_mode == 7 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width + d->m_mousePressPos.x() - p.x(), minimumWidth() ), maximumWidth() );
setGeometry( d->m_framePos.x() - w + d->m_width,
d->m_framePos.y(), w, d->m_height );
}
else if ( d->m_mode == 8 )
{
- QPoint p = parentWidget()->mapFromGlobal( ev->globalPos() );
- int w = QMIN( QMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
+ TQPoint p = tqparentWidget()->mapFromGlobal( ev->globalPos() );
+ int w = TQMIN( TQMAX( d->m_width - d->m_mousePressPos.x() + p.x(), minimumWidth() ), maximumWidth() );
resize( w, d->m_height );
}
else if ( d->m_state == Selected || d->m_state == Active )
{
- QRect r1( 0, 0, 5, 5 );
- QRect r2( 0, height() - 5, 5, 5 );
- QRect r3( width() - 5, height() - 5, 5, 5 );
- QRect r4( width() - 5, 0, 5, 5 );
- QRect r5( width() / 2 - 3, 0, 5, 5 );
- QRect r6( width() / 2 - 3, height() - 5, 5, 5 );
- QRect r7( 0, height() / 2 - 3, 5, 5 );
- QRect r8( width()- 5, height() / 2 - 3, 5, 5 );
-
- if ( r1.contains( ev->pos() ) || r3.contains( ev->pos() ) )
+ TQRect r1( 0, 0, 5, 5 );
+ TQRect r2( 0, height() - 5, 5, 5 );
+ TQRect r3( width() - 5, height() - 5, 5, 5 );
+ TQRect r4( width() - 5, 0, 5, 5 );
+ TQRect r5( width() / 2 - 3, 0, 5, 5 );
+ TQRect r6( width() / 2 - 3, height() - 5, 5, 5 );
+ TQRect r7( 0, height() / 2 - 3, 5, 5 );
+ TQRect r8( width()- 5, height() / 2 - 3, 5, 5 );
+
+ if ( r1.tqcontains( ev->pos() ) || r3.tqcontains( ev->pos() ) )
setCursor( sizeFDiagCursor );
- else if ( r2.contains( ev->pos() ) || r4.contains( ev->pos() ) )
+ else if ( r2.tqcontains( ev->pos() ) || r4.tqcontains( ev->pos() ) )
setCursor( sizeBDiagCursor );
- else if ( r5.contains( ev->pos() ) || r6.contains( ev->pos() ) )
+ else if ( r5.tqcontains( ev->pos() ) || r6.tqcontains( ev->pos() ) )
setCursor( sizeVerCursor );
- else if ( r7.contains( ev->pos() ) || r8.contains( ev->pos() ) )
+ else if ( r7.tqcontains( ev->pos() ) || r8.tqcontains( ev->pos() ) )
setCursor( sizeHorCursor );
else
setCursor( KCursor::handCursor() );
@@ -342,12 +342,12 @@ void KoFrame::mouseMoveEvent( QMouseEvent* ev )
setCursor( KCursor::handCursor() );
}
-void KoFrame::mouseReleaseEvent( QMouseEvent* )
+void KoFrame::mouseReleaseEvent( TQMouseEvent* )
{
d->m_mode = -1;
}
-void KoFrame::resizeEvent( QResizeEvent* )
+void KoFrame::resizeEvent( TQResizeEvent* )
{
if ( !d->m_view )
return;
@@ -357,12 +357,12 @@ void KoFrame::resizeEvent( QResizeEvent* )
else
d->m_view->setGeometry( 0, 0, width(), height() );
- emit geometryChanged();
+ emit tqgeometryChanged();
}
-bool KoFrame::eventFilter( QObject* obj, QEvent* ev )
+bool KoFrame::eventFilter( TQObject* obj, TQEvent* ev )
{
- if ( obj == d->m_view && KParts::PartActivateEvent::test( ev ) )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->m_view) && KParts::PartActivateEvent::test( ev ) )
{
kdDebug(30003) << "Activate event"<< endl;
KParts::PartActivateEvent* e = (KParts::PartActivateEvent*)ev;
@@ -374,7 +374,7 @@ bool KoFrame::eventFilter( QObject* obj, QEvent* ev )
setState( Inactive );
}
}
- else if ( obj == d->m_view && KParts::PartSelectEvent::test( ev ) )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->m_view) && KParts::PartSelectEvent::test( ev ) )
{
kdDebug(30003) << "Selected event" << endl;
KParts::PartSelectEvent* e = (KParts::PartSelectEvent*)ev;
diff --git a/lib/kofficecore/KoFrame.h b/lib/kofficecore/KoFrame.h
index 7f729bdb..7b372b98 100644
--- a/lib/kofficecore/KoFrame.h
+++ b/lib/kofficecore/KoFrame.h
@@ -20,18 +20,19 @@
#ifndef __koFrame_h__
#define __koFrame_h__
-#include <qwidget.h>
+#include <tqwidget.h>
class KoView;
class KoFramePrivate;
-class KoFrame : public QWidget
+class KoFrame : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum State { Inactive, Selected, Active };
- KoFrame( QWidget *parent, const char *name = 0 );
+ KoFrame( TQWidget *tqparent, const char *name = 0 );
virtual ~KoFrame();
virtual void setView( KoView *view );
@@ -48,15 +49,15 @@ public:
virtual int border() const;
signals:
- void geometryChanged();
+ void tqgeometryChanged();
protected:
- virtual void paintEvent( QPaintEvent* );
- virtual void mousePressEvent( QMouseEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
private:
KoFramePrivate *d;
diff --git a/lib/kofficecore/KoGenStyles.cpp b/lib/kofficecore/KoGenStyles.cpp
index 503b6802..0ee2e730 100644
--- a/lib/kofficecore/KoGenStyles.cpp
+++ b/lib/kofficecore/KoGenStyles.cpp
@@ -29,39 +29,39 @@ KoGenStyles::~KoGenStyles()
{
}
-QString KoGenStyles::lookup( const KoGenStyle& style, const QString& name, int flags )
+TQString KoGenStyles::lookup( const KoGenStyle& style, const TQString& name, int flags )
{
- StyleMap::iterator it = m_styleMap.find( style );
+ StyleMap::iterator it = m_styleMap.tqfind( style );
if ( it == m_styleMap.end() ) {
- // Not found, try if this style is in fact equal to its parent (the find above
+ // Not found, try if this style is in fact equal to its tqparent (the find above
// wouldn't have found it, due to m_parentName being set).
- if ( !style.parentName().isEmpty() ) {
+ if ( !style.tqparentName().isEmpty() ) {
KoGenStyle testStyle( style );
- const KoGenStyle* parentStyle = this->style( style.parentName() ); // ## linear search
- if( !parentStyle ) {
- kdDebug(30003) << "KoGenStyles::lookup(" << name << "): parent style '" << style.parentName() << "' not found in collection" << endl;
+ const KoGenStyle* tqparentStyle = this->style( style.tqparentName() ); // ## linear search
+ if( !tqparentStyle ) {
+ kdDebug(30003) << "KoGenStyles::lookup(" << name << "): tqparent style '" << style.tqparentName() << "' not found in collection" << endl;
} else {
- if ( testStyle.m_familyName != parentStyle->m_familyName )
+ if ( testStyle.m_familyName != tqparentStyle->m_familyName )
{
- kdWarning(30003) << "KoGenStyles::lookup(" << name << ", family=" << testStyle.m_familyName << ") parent style '" << style.parentName() << "' has a different family: " << parentStyle->m_familyName << endl;
+ kdWarning(30003) << "KoGenStyles::lookup(" << name << ", family=" << testStyle.m_familyName << ") tqparent style '" << style.tqparentName() << "' has a different family: " << tqparentStyle->m_familyName << endl;
}
- testStyle.m_parentName = parentStyle->m_parentName;
+ testStyle.m_parentName = tqparentStyle->m_parentName;
// Exclude the type from the comparison. It's ok for an auto style
- // to have a user style as parent; they can still be identical
- testStyle.m_type = parentStyle->m_type;
- // Also it's ok to not have the display name of the parent style
+ // to have a user style as tqparent; they can still be identical
+ testStyle.m_type = tqparentStyle->m_type;
+ // Also it's ok to not have the display name of the tqparent style
// in the auto style
- QMap<QString, QString>::const_iterator it = parentStyle->m_attributes.find( "style:display-name" );
- if ( it != parentStyle->m_attributes.end() )
+ TQMap<TQString, TQString>::const_iterator it = tqparentStyle->m_attributes.tqfind( "style:display-name" );
+ if ( it != tqparentStyle->m_attributes.end() )
testStyle.addAttribute( "style:display-name", *it );
- if ( *parentStyle == testStyle )
- return style.parentName();
+ if ( *tqparentStyle == testStyle )
+ return style.tqparentName();
}
}
- QString styleName( name );
+ TQString styleName( name );
if ( styleName.isEmpty() ) {
styleName = 'A'; // for "auto".
flags &= ~DontForceNumbering; // i.e. force numbering
@@ -80,39 +80,39 @@ QString KoGenStyles::lookup( const KoGenStyle& style, const QString& name, int f
return it.data();
}
-QString KoGenStyles::makeUniqueName( const QString& base, int flags ) const
+TQString KoGenStyles::makeUniqueName( const TQString& base, int flags ) const
{
// If this name is not used yet, and numbering isn't forced, then the given name is ok.
if ( ( flags & DontForceNumbering )
- && m_autoStylesInStylesDotXml.find( base ) == m_autoStylesInStylesDotXml.end()
- && m_styleNames.find( base ) == m_styleNames.end() )
+ && m_autoStylesInStylesDotXml.tqfind( base ) == m_autoStylesInStylesDotXml.end()
+ && m_styleNames.tqfind( base ) == m_styleNames.end() )
return base;
int num = 1;
- QString name;
+ TQString name;
do {
name = base;
- name += QString::number( num++ );
- } while ( m_autoStylesInStylesDotXml.find( name ) != m_autoStylesInStylesDotXml.end()
- || m_styleNames.find( name ) != m_styleNames.end() );
+ name += TQString::number( num++ );
+ } while ( m_autoStylesInStylesDotXml.tqfind( name ) != m_autoStylesInStylesDotXml.end()
+ || m_styleNames.tqfind( name ) != m_styleNames.end() );
return name;
}
-QValueList<KoGenStyles::NamedStyle> KoGenStyles::styles( int type, bool markedForStylesXml ) const
+TQValueList<KoGenStyles::NamedStyle> KoGenStyles::styles( int type, bool markedForStylesXml ) const
{
- QValueList<KoGenStyles::NamedStyle> lst;
+ TQValueList<KoGenStyles::NamedStyle> lst;
const NameMap& nameMap = markedForStylesXml ? m_autoStylesInStylesDotXml : m_styleNames;
StyleArray::const_iterator it = m_styleArray.begin();
const StyleArray::const_iterator end = m_styleArray.end();
for ( ; it != end ; ++it ) {
// Look up if it's marked for styles.xml or not by looking up in the corresponding style map.
- if ( (*it).style->type() == type && nameMap.find((*it).name) != nameMap.end() ) {
+ if ( (*it).style->type() == type && nameMap.tqfind((*it).name) != nameMap.end() ) {
lst.append( *it );
}
}
return lst;
}
-const KoGenStyle* KoGenStyles::style( const QString& name ) const
+const KoGenStyle* KoGenStyles::style( const TQString& name ) const
{
StyleArray::const_iterator it = m_styleArray.begin();
const StyleArray::const_iterator end = m_styleArray.end();
@@ -123,14 +123,14 @@ const KoGenStyle* KoGenStyles::style( const QString& name ) const
return 0;
}
-KoGenStyle* KoGenStyles::styleForModification( const QString& name )
+KoGenStyle* KoGenStyles::styleForModification( const TQString& name )
{
return const_cast<KoGenStyle *>( style( name ) );
}
-void KoGenStyles::markStyleForStylesXml( const QString& name )
+void KoGenStyles::markStyleForStylesXml( const TQString& name )
{
- Q_ASSERT( m_styleNames.find( name ) != m_styleNames.end() );
+ Q_ASSERT( m_styleNames.tqfind( name ) != m_styleNames.end() );
m_styleNames.remove( name );
m_autoStylesInStylesDotXml.insert( name, true );
styleForModification( name )->setAutoStyleInStylesDotXml( true );
@@ -156,10 +156,10 @@ void KoGenStyles::dump()
}
// Returns -1, 0 (equal) or 1
-static int compareMap( const QMap<QString, QString>& map1, const QMap<QString, QString>& map2 )
+static int compareMap( const TQMap<TQString, TQString>& map1, const TQMap<TQString, TQString>& map2 )
{
- QMap<QString, QString>::const_iterator it = map1.begin();
- QMap<QString, QString>::const_iterator oit = map2.begin();
+ TQMap<TQString, TQString>::const_iterator it = map1.begin();
+ TQMap<TQString, TQString>::const_iterator oit = map2.begin();
for ( ; it != map1.end(); ++it, ++oit ) { // both maps have been checked for size already
if ( it.key() != oit.key() )
return it.key() < oit.key() ? -1 : +1;
@@ -173,8 +173,8 @@ static int compareMap( const QMap<QString, QString>& map1, const QMap<QString, Q
KoGenStyle::KoGenStyle( int type, const char* familyName,
- const QString& parentName )
- : m_type( type ), m_familyName( familyName ), m_parentName( parentName ),
+ const TQString& tqparentName )
+ : m_type( type ), m_familyName( familyName ), m_parentName( tqparentName ),
m_autoStyleInStylesDotXml( false ), m_defaultStyle( false )
{
}
@@ -184,40 +184,40 @@ KoGenStyle::~KoGenStyle()
}
void KoGenStyle::writeStyleProperties( KoXmlWriter* writer, PropertyType i,
- const char* elementName, const KoGenStyle* parentStyle ) const
+ const char* elementName, const KoGenStyle* tqparentStyle ) const
{
if ( !m_properties[i].isEmpty() ) {
writer->startElement( elementName );
- QMap<QString, QString>::const_iterator it = m_properties[i].begin();
- const QMap<QString, QString>::const_iterator end = m_properties[i].end();
+ TQMap<TQString, TQString>::const_iterator it = m_properties[i].begin();
+ const TQMap<TQString, TQString>::const_iterator end = m_properties[i].end();
for ( ; it != end; ++it ) {
- if ( !parentStyle || parentStyle->property( it.key(), i ) != it.data() )
+ if ( !tqparentStyle || tqparentStyle->property( it.key(), i ) != it.data() )
writer->addAttribute( it.key().utf8(), it.data().utf8() );
}
writer->endElement();
}
}
-void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const char* elementName, const QString& name, const char* propertiesElementName, bool closeElement, bool drawElement ) const
+void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const char* elementName, const TQString& name, const char* propertiesElementName, bool closeElement, bool drawElement ) const
{
//kdDebug(30003) << "writing out style " << name << " display-name=" << m_attributes["style:display-name"] << " family=" << m_familyName << endl;
writer->startElement( elementName );
- const KoGenStyle* parentStyle = 0;
+ const KoGenStyle* tqparentStyle = 0;
if ( !m_defaultStyle ) {
if ( !drawElement )
writer->addAttribute( "style:name", name );
else
writer->addAttribute( "draw:name", name );
if ( !m_parentName.isEmpty() ) {
- parentStyle = styles.style( m_parentName );
- if ( parentStyle && m_familyName.isEmpty() ) {
- // get family from parent style, just in case
+ tqparentStyle = styles.style( m_parentName );
+ if ( tqparentStyle && m_familyName.isEmpty() ) {
+ // get family from tqparent style, just in case
// Note: this is saving code, don't convert to attributeNS!
const_cast<KoGenStyle *>( this )->
- m_familyName = parentStyle->attribute( "style:family" ).latin1();
- //kdDebug(30003) << "Got familyname " << m_familyName << " from parent" << endl;
+ m_familyName = tqparentStyle->attribute( "style:family" ).latin1();
+ //kdDebug(30003) << "Got familyname " << m_familyName << " from tqparent" << endl;
}
- writer->addAttribute( "style:parent-style-name", m_parentName );
+ writer->addAttribute( "style:tqparent-style-name", m_parentName );
}
} else { // default-style
Q_ASSERT( qstrcmp( elementName, "style:default-style" ) == 0 );
@@ -225,7 +225,7 @@ void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const cha
}
if ( !m_familyName.isEmpty() )
const_cast<KoGenStyle *>( this )->
- addAttribute( "style:family", QString::fromLatin1( m_familyName ) );
+ addAttribute( "style:family", TQString::tqfromLatin1( m_familyName ) );
else {
if ( qstrcmp( elementName, "style:style" ) == 0 )
kdWarning(30003) << "User style " << name << " is without family - invalid. m_type=" << m_type << endl;
@@ -234,21 +234,21 @@ void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const cha
#if 0 // #ifndef NDEBUG
kdDebug() << "style: " << name << endl;
printDebug();
- if ( parentStyle ) {
- kdDebug() << " parent: " << m_parentName << endl;
- parentStyle->printDebug();
+ if ( tqparentStyle ) {
+ kdDebug() << " tqparent: " << m_parentName << endl;
+ tqparentStyle->printDebug();
}
#endif
- // Write attributes [which differ from the parent style]
- // We only look at the direct parent style because we assume
+ // Write attributes [which differ from the tqparent style]
+ // We only look at the direct tqparent style because we assume
// that styles are fully specified, i.e. the inheritance is
// only in the final file, not in the caller's code.
- QMap<QString, QString>::const_iterator it = m_attributes.begin();
+ TQMap<TQString, TQString>::const_iterator it = m_attributes.begin();
for ( ; it != m_attributes.end(); ++it ) {
bool writeit = true;
- if ( parentStyle && it.key() != "style:family" // always write the family out
- && parentStyle->attribute( it.key() ) == it.data() )
+ if ( tqparentStyle && it.key() != "style:family" // always write the family out
+ && tqparentStyle->attribute( it.key() ) == it.data() )
writeit = false;
if ( writeit )
writer->addAttribute( it.key().utf8(), it.data().utf8() );
@@ -261,31 +261,31 @@ void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const cha
writer->startElement( propertiesElementName ); // e.g. paragraph-properties
it = m_properties[i].begin();
for ( ; it != m_properties[i].end(); ++it ) {
- if ( !parentStyle || parentStyle->property( it.key(), i ) != it.data() )
+ if ( !tqparentStyle || tqparentStyle->property( it.key(), i ) != it.data() )
writer->addAttribute( it.key().utf8(), it.data().utf8() );
}
i = KoGenStyle::ChildElement;
it = m_properties[i].begin();
for ( ; it != m_properties[i].end(); ++it ) {
- if ( !parentStyle || parentStyle->property( it.key(), i ) != it.data() ) {
+ if ( !tqparentStyle || tqparentStyle->property( it.key(), i ) != it.data() ) {
writer->addCompleteElement( it.data().utf8() );
}
}
if ( createPropertiesTag )
writer->endElement();
}
- writeStyleProperties( writer, KoGenStyle::GraphicType, "style:graphic-properties", parentStyle );
- writeStyleProperties( writer, KoGenStyle::ParagraphType, "style:paragraph-properties", parentStyle );
- writeStyleProperties( writer, KoGenStyle::TextType, "style:text-properties", parentStyle );
+ writeStyleProperties( writer, KoGenStyle::GraphicType, "style:graphic-properties", tqparentStyle );
+ writeStyleProperties( writer, KoGenStyle::ParagraphType, "style:paragraph-properties", tqparentStyle );
+ writeStyleProperties( writer, KoGenStyle::TextType, "style:text-properties", tqparentStyle );
// And now the style maps
for ( uint i = 0; i < m_maps.count(); ++i ) {
bool writeit = true;
- if ( parentStyle && compareMap( m_maps[i], parentStyle->m_maps[i] ) == 0 )
+ if ( tqparentStyle && compareMap( m_maps[i], tqparentStyle->m_maps[i] ) == 0 )
writeit = false;
if ( writeit ) {
writer->startElement( "style:map" );
- QMap<QString, QString>::const_iterator it = m_maps[i].begin();
+ TQMap<TQString, TQString>::const_iterator it = m_maps[i].begin();
for ( ; it != m_maps[i].end(); ++it ) {
writer->addAttribute( it.key().utf8(), it.data().utf8() );
}
@@ -296,17 +296,17 @@ void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const cha
writer->endElement();
}
-void KoGenStyle::addPropertyPt( const QString& propName, double propValue, PropertyType type )
+void KoGenStyle::addPropertyPt( const TQString& propName, double propValue, PropertyType type )
{
- QString str;
+ TQString str;
str.setNum( propValue, 'g', DBL_DIG );
str += "pt";
m_properties[type].insert( propName, str );
}
-void KoGenStyle::addAttributePt( const QString& attrName, double attrValue )
+void KoGenStyle::addAttributePt( const TQString& attrName, double attrValue )
{
- QString str;
+ TQString str;
str.setNum( attrValue, 'g', DBL_DIG );
str += "pt";
m_attributes.insert( attrName, str );
@@ -317,32 +317,32 @@ void KoGenStyle::printDebug() const
{
int i = DefaultType;
kdDebug() << m_properties[i].count() << " properties." << endl;
- for( QMap<QString,QString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
i = TextType;
kdDebug() << m_properties[i].count() << " text properties." << endl;
- for( QMap<QString,QString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
i = ParagraphType;
kdDebug() << m_properties[i].count() << " paragraph properties." << endl;
- for( QMap<QString,QString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
i = ChildElement;
kdDebug() << m_properties[i].count() << " child elements." << endl;
- for( QMap<QString,QString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_properties[i].begin(); it != m_properties[i].end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
kdDebug() << m_attributes.count() << " attributes." << endl;
- for( QMap<QString,QString>::ConstIterator it = m_attributes.begin(); it != m_attributes.end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_attributes.begin(); it != m_attributes.end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
kdDebug() << m_maps.count() << " maps." << endl;
for ( uint i = 0; i < m_maps.count(); ++i ) {
kdDebug() << "map " << i << ":" << endl;
- for( QMap<QString,QString>::ConstIterator it = m_maps[i].begin(); it != m_maps[i].end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = m_maps[i].begin(); it != m_maps[i].end(); ++it ) {
kdDebug() << " " << it.key() << " = " << it.data() << endl;
}
}
diff --git a/lib/kofficecore/KoGenStyles.h b/lib/kofficecore/KoGenStyles.h
index ad05d6e0..17771c69 100644
--- a/lib/kofficecore/KoGenStyles.h
+++ b/lib/kofficecore/KoGenStyles.h
@@ -19,9 +19,9 @@
#ifndef KOGENSTYLES_H
#define KOGENSTYLES_H
-#include <qdict.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
#include <koffice_export.h>
@@ -76,7 +76,7 @@ public:
ForceNumbering = 0, // it's the default anyway
DontForceNumbering = 1
};
- // KDE4 TODO: use QFlags and change the arg type in lookup
+ // KDE4 TODO: use TQFlags and change the arg type in lookup
/**
* Look up a style in the collection, inserting it if necessary.
@@ -94,9 +94,9 @@ public:
* @return the name for this style
* @todo ### rename lookup to insert
*/
- QString lookup( const KoGenStyle& style, const QString& name = QString::null, int flags = NoFlag );
+ TQString lookup( const KoGenStyle& style, const TQString& name = TQString(), int flags = NoFlag );
- typedef QMap<KoGenStyle, QString> StyleMap;
+ typedef TQMap<KoGenStyle, TQString> StyleMap;
/**
* Return the entire collection of styles
* Use this for saving the styles
@@ -105,7 +105,7 @@ public:
struct NamedStyle {
const KoGenStyle* style; ///< @note owned by the collection
- QString name;
+ TQString name;
};
/**
* Return all styles of a given type
@@ -116,12 +116,12 @@ public:
* otherwise only those NOT marked for styles.xml.
* @see lookup
*/
- QValueList<NamedStyle> styles( int type, bool markedForStylesXml = false ) const;
+ TQValueList<NamedStyle> styles( int type, bool markedForStylesXml = false ) const;
/**
* @return an existing style by name
*/
- const KoGenStyle* style( const QString& name ) const;
+ const KoGenStyle* style( const TQString& name ) const;
/**
* @return an existing style by name, which can be modified.
@@ -130,7 +130,7 @@ public:
* Only do this if you know for sure no other 'user' of that style will
* be affected.
*/
- KoGenStyle* styleForModification( const QString& name );
+ KoGenStyle* styleForModification( const TQString& name );
/**
* Mark a given automatic style as being needed in styles.xml.
@@ -144,7 +144,7 @@ public:
*
* @see styles, KoGenStyle::setAutoStyleInStylesDotXml
*/
- void markStyleForStylesXml( const QString& name );
+ void markStyleForStylesXml( const TQString& name );
/**
* Outputs debug information
@@ -152,7 +152,7 @@ public:
void dump();
private:
- QString makeUniqueName( const QString& base, int flags ) const;
+ TQString makeUniqueName( const TQString& base, int flags ) const;
/// style definition -> name
StyleMap m_styleMap;
@@ -160,12 +160,12 @@ private:
/// Map with the style name as key.
/// This map is mainly used to check for name uniqueness
/// The value of the bool doesn't matter.
- typedef QMap<QString, bool> NameMap; // KDE4: QSet
+ typedef TQMap<TQString, bool> NameMap; // KDE4: TQSet
NameMap m_styleNames;
NameMap m_autoStylesInStylesDotXml;
/// List of styles (used to preserve ordering)
- typedef QValueVector<NamedStyle> StyleArray;
+ typedef TQValueVector<NamedStyle> StyleArray;
StyleArray m_styleArray;
class Private;
@@ -216,10 +216,10 @@ public:
* @param familyName The value for style:family, e.g. text, paragraph, graphic etc.
* The family is for style:style elements only; number styles and list styles don't have one.
*
- * @param parentName If set, name of the parent style from which this one inherits.
+ * @param tqparentName If set, name of the tqparent style from which this one inherits.
*/
explicit KoGenStyle( int type = 0, const char* familyName = 0,
- const QString& parentName = QString::null );
+ const TQString& tqparentName = TQString() );
~KoGenStyle();
/*
@@ -249,8 +249,8 @@ public:
/// Return the family name
const char* familyName() const { return m_familyName.data(); }
- /// Return the name of style's parent, if set
- QString parentName() const { return m_parentName; }
+ /// Return the name of style's tqparent, if set
+ TQString tqparentName() const { return m_parentName; }
/**
* @brief The types of properties
@@ -274,7 +274,7 @@ public:
{
/**
* DefaultType depends on family: e.g. paragraph-properties if family=paragraph
- * or on the type of style (e.g. page-layout -> page-layout-properties).
+ * or on the type of style (e.g. page-tqlayout -> page-tqlayout-properties).
* (In fact that tag name is the one passed to writeStyle)
*/
DefaultType = 0,
@@ -291,80 +291,80 @@ public:
};
/// Add a property to the style
- void addProperty( const QString& propName, const QString& propValue, PropertyType type = DefaultType ) {
+ void addProperty( const TQString& propName, const TQString& propValue, PropertyType type = DefaultType ) {
m_properties[type].insert( propName, propValue );
}
/// Overloaded version of addProperty that takes a char*, usually for "..."
- void addProperty( const QString& propName, const char* propValue, PropertyType type = DefaultType ) {
- m_properties[type].insert( propName, QString::fromUtf8( propValue ) );
+ void addProperty( const TQString& propName, const char* propValue, PropertyType type = DefaultType ) {
+ m_properties[type].insert( propName, TQString::fromUtf8( propValue ) );
}
/// Overloaded version of addProperty that converts an int to a string
- void addProperty( const QString& propName, int propValue, PropertyType type = DefaultType ) {
- m_properties[type].insert( propName, QString::number( propValue ) );
+ void addProperty( const TQString& propName, int propValue, PropertyType type = DefaultType ) {
+ m_properties[type].insert( propName, TQString::number( propValue ) );
}
/// Overloaded version of addProperty that converts a bool to a string (false/true)
- void addProperty( const QString& propName, bool propValue, PropertyType type = DefaultType ) {
+ void addProperty( const TQString& propName, bool propValue, PropertyType type = DefaultType ) {
m_properties[type].insert( propName, propValue ? "true" : "false" );
}
/**
* Add a property which represents a distance, measured in pt
* The number is written out with the highest possible precision
- * (unlike QString::number and setNum, which default to 6 digits),
+ * (unlike TQString::number and setNum, which default to 6 digits),
* and the unit name ("pt") is appended to it.
*/
- void addPropertyPt( const QString& propName, double propValue, PropertyType type = DefaultType );
+ void addPropertyPt( const TQString& propName, double propValue, PropertyType type = DefaultType );
/**
* Add an attribute to the style
* The difference between property and attributes is a bit oasis-format-specific:
* attributes are for the style element itself, and properties are in the style:properties child element
*/
- void addAttribute( const QString& attrName, const QString& attrValue ) {
+ void addAttribute( const TQString& attrName, const TQString& attrValue ) {
m_attributes.insert( attrName, attrValue );
}
/// Overloaded version of addAttribute that takes a char*, usually for "..."
- void addAttribute( const QString& attrName, const char* attrValue ) {
- m_attributes.insert( attrName, QString::fromUtf8( attrValue ) );
+ void addAttribute( const TQString& attrName, const char* attrValue ) {
+ m_attributes.insert( attrName, TQString::fromUtf8( attrValue ) );
}
/// Overloaded version of addAttribute that converts an int to a string
- void addAttribute( const QString& attrName, int attrValue ) {
- m_attributes.insert( attrName, QString::number( attrValue ) );
+ void addAttribute( const TQString& attrName, int attrValue ) {
+ m_attributes.insert( attrName, TQString::number( attrValue ) );
}
/// Overloaded version of addAttribute that converts a bool to a string
- void addAttribute( const QString& attrName, bool attrValue ) {
+ void addAttribute( const TQString& attrName, bool attrValue ) {
m_attributes.insert( attrName, attrValue ? "true" : "false" );
}
/**
* Add an attribute which represents a distance, measured in pt
* The number is written out with the highest possible precision
- * (unlike QString::number and setNum, which default to 6 digits),
+ * (unlike TQString::number and setNum, which default to 6 digits),
* and the unit name ("pt") is appended to it.
*/
- void addAttributePt( const QString& attrName, double attrValue );
+ void addAttributePt( const TQString& attrName, double attrValue );
/**
* @brief Add a child element to the style properties.
*
- * What is meant here is that the contents of the QString
+ * What is meant here is that the contents of the TQString
* will be written out literally. This means you should use
* KoXmlWriter to generate it:
* @code
- * QBuffer buffer;
+ * TQBuffer buffer;
* buffer.open( IO_WriteOnly );
* KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
* elementWriter.startElement( "..." );
* ...
* elementWriter.endElement();
- * QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ * TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
* gs.addChildElement( "...", elementContents );
* @endcode
*
* The value of @p elementName isn't used, except that it must be unique.
*/
- void addChildElement( const QString& elementName, const QString& elementContents ) {
+ void addChildElement( const TQString& elementName, const TQString& elementContents ) {
m_properties[ChildElement].insert( elementName, elementContents );
}
@@ -372,14 +372,14 @@ public:
* @brief Add a style:map to the style.
* @param styleMap the attributes for the map, associated as (name,value).
*/
- void addStyleMap( const QMap<QString, QString>& styleMap ) {
+ void addStyleMap( const TQMap<TQString, TQString>& styleMap ) {
m_maps.append( styleMap );
}
/**
* @return true if the style has no attributes, no properties, no style map etc.
* This can be used by applications which do not save all attributes unconditionally,
- * but only those that differ from the parent. But note that lookup() can't find this out...
+ * but only those that differ from the tqparent. But note that lookup() can't find this out...
*/
bool isEmpty() const {
if ( !m_attributes.isEmpty() || ! m_maps.isEmpty() )
@@ -393,7 +393,7 @@ public:
/**
* Write the definition of this style to @p writer, using the OASIS format.
* @param writer the KoXmlWriter in which @p elementName will be created and filled in
- * @param styles the styles collection, used to look up the parent style
+ * @param styles the styles collection, used to look up the tqparent style
* @param elementName the name of the XML element, e.g. "style:style". Don't forget to
* pass style:default-style if isDefaultStyle().
* @param name must come from the collection. It will be ignored if isDefaultStyle() is true.
@@ -403,11 +403,11 @@ public:
* @param closeElement set it to false to be able to add more child elements to the style element
* @param drawElement set it to true to add "draw:name" (used for gradient/hatch style) otherwise add "style:name"
*/
- void writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const char* elementName, const QString& name,
+ void writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const char* elementName, const TQString& name,
const char* propertiesElementName, bool closeElement = true, bool drawElement = false ) const;
/**
- * QMap requires a complete sorting order.
+ * TQMap requires a complete sorting order.
* Another solution would have been a qdict and a key() here, a la KoTextFormat,
* but the key was difficult to generate.
* Solutions with only a hash value (not representative of the whole data)
@@ -415,26 +415,26 @@ public:
*/
bool operator<( const KoGenStyle &other ) const;
- /// Not needed for QMap, but can still be useful
+ /// Not needed for TQMap, but can still be useful
bool operator==( const KoGenStyle &other ) const;
private:
- QString property( const QString& propName, PropertyType type ) const {
- QMap<QString, QString>::const_iterator it = m_properties[type].find( propName );
+ TQString property( const TQString& propName, PropertyType type ) const {
+ TQMap<TQString, TQString>::const_iterator it = m_properties[type].tqfind( propName );
if ( it != m_properties[type].end() )
return it.data();
- return QString::null;
+ return TQString();
}
- QString attribute( const QString& propName ) const {
- QMap<QString, QString>::const_iterator it = m_attributes.find( propName );
+ TQString attribute( const TQString& propName ) const {
+ TQMap<TQString, TQString>::const_iterator it = m_attributes.tqfind( propName );
if ( it != m_attributes.end() )
return it.data();
- return QString::null;
+ return TQString();
}
void writeStyleProperties( KoXmlWriter* writer, PropertyType i,
- const char* elementName, const KoGenStyle* parentStyle ) const;
+ const char* elementName, const KoGenStyle* tqparentStyle ) const;
#ifndef NDEBUG
void printDebug() const;
@@ -444,13 +444,13 @@ private:
// Note that the copy constructor and assignment operator are allowed.
// Better not use pointers below!
int m_type;
- QCString m_familyName;
- QString m_parentName;
- /// We use QMaps since they provide automatic sorting on the key (important for unicity!)
- QMap<QString, QString> m_properties[N_NumTypes];
- QMap<QString, QString> m_attributes;
- typedef QMap<QString, QString> StyleMap;
- QValueVector<StyleMap> m_maps; // we can't really sort the maps between themselves...
+ TQCString m_familyName;
+ TQString m_parentName;
+ /// We use TQMaps since they provide automatic sorting on the key (important for unicity!)
+ TQMap<TQString, TQString> m_properties[N_NumTypes];
+ TQMap<TQString, TQString> m_attributes;
+ typedef TQMap<TQString, TQString> StyleMap;
+ TQValueVector<StyleMap> m_maps; // we can't really sort the maps between themselves...
bool m_autoStyleInStylesDotXml;
bool m_defaultStyle;
diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp
index 87717172..53c9e4fe 100644
--- a/lib/kofficecore/KoGlobal.cpp
+++ b/lib/kofficecore/KoGlobal.cpp
@@ -21,8 +21,8 @@
#include "config.h"
#include <KoGlobal.h>
#include <kdebug.h>
-#include <qfont.h>
-#include <qfontinfo.h>
+#include <tqfont.h>
+#include <tqfontinfo.h>
#include <kglobalsettings.h>
#include <kglobal.h>
#include <klocale.h>
@@ -47,7 +47,7 @@ KoGlobal* KoGlobal::self()
KoGlobal::KoGlobal()
: m_pointSize( -1 ), m_kofficeConfig( 0L )
{
- // Make sure that QCString::setNum doesn't give us "," as decimal point, e.g. when saving to OpenDocument.
+ // Make sure that TQCString::setNum doesn't give us "," as decimal point, e.g. when saving to OpenDocument.
setlocale( LC_NUMERIC, "C" );
// Install the libkoffice* translations
@@ -61,12 +61,12 @@ KoGlobal::KoGlobal()
// Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice");
- // Another way to get the DPI of the display would be QPaintDeviceMetrics,
+ // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily).
-#ifdef Q_WS_X11
- m_dpiX = QPaintDevice::x11AppDpiX();
- m_dpiY = QPaintDevice::x11AppDpiY();
+#ifdef TQ_WS_X11
+ m_dpiX = TQPaintDevice::x11AppDpiX();
+ m_dpiY = TQPaintDevice::x11AppDpiY();
#else
m_dpiX = 75;
m_dpiY = 75;
@@ -78,31 +78,31 @@ KoGlobal::~KoGlobal()
delete m_kofficeConfig;
}
-QFont KoGlobal::_defaultFont()
+TQFont KoGlobal::_defaultFont()
{
- QFont font = KGlobalSettings::generalFont();
- // we have to use QFontInfo, in case the font was specified with a pixel size
+ TQFont font = KGlobalSettings::generalFont();
+ // we have to use TQFontInfo, in case the font was specified with a pixel size
if ( font.pointSize() == -1 )
{
- // cache size into m_pointSize, since QFontInfo loads the font -> slow
+ // cache size into m_pointSize, since TQFontInfo loads the font -> slow
if ( m_pointSize == -1 )
- m_pointSize = QFontInfo(font).pointSize();
+ m_pointSize = TQFontInfo(font).pointSize();
Q_ASSERT( m_pointSize != -1 );
font.setPointSize( m_pointSize );
}
- //kdDebug()<<k_funcinfo<<"QFontInfo(font).pointSize() :"<<QFontInfo(font).pointSize()<<endl;
+ //kdDebug()<<k_funcinfo<<"TQFontInfo(font).pointSize() :"<<TQFontInfo(font).pointSize()<<endl;
//kdDebug()<<k_funcinfo<<"font.name() :"<<font.family ()<<endl;
return font;
}
-QStringList KoGlobal::_listOfLanguageTags()
+TQStringList KoGlobal::_listOfLanguageTags()
{
if ( m_langMap.isEmpty() )
createListOfLanguages();
return m_langMap.values();
}
-QStringList KoGlobal::_listOfLanguages()
+TQStringList KoGlobal::_listOfLanguages()
{
if ( m_langMap.empty() )
createListOfLanguages();
@@ -114,17 +114,17 @@ void KoGlobal::createListOfLanguages()
KConfig config( "all_languages", true, false, "locale" );
// Note that we could also use KLocale::allLanguagesTwoAlpha
- QMap<QString, bool> seenLanguages;
- const QStringList langlist = config.groupList();
- for ( QStringList::ConstIterator itall = langlist.begin();
+ TQMap<TQString, bool> seenLanguages;
+ const TQStringList langlist = config.groupList();
+ for ( TQStringList::ConstIterator itall = langlist.begin();
itall != langlist.end(); ++itall )
{
- const QString tag = *itall;
+ const TQString tag = *itall;
config.setGroup( tag );
- const QString name = config.readEntry("Name", tag);
+ const TQString name = config.readEntry("Name", tag);
// e.g. name is "French" and tag is "fr"
- // The QMap does the sorting on the display-name, so that
+ // The TQMap does the sorting on the display-name, so that
// comboboxes are sorted.
m_langMap.insert( name, tag );
@@ -135,23 +135,23 @@ void KoGlobal::createListOfLanguages()
// Many of them are already in all_languages but all_languages doesn't
// currently have en_GB or en_US etc.
- const QStringList translationList = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
- for ( QStringList::ConstIterator it = translationList.begin();
+ const TQStringList translationList = KGlobal::dirs()->findAllResources("locale",
+ TQString::tqfromLatin1("*/entry.desktop"));
+ for ( TQStringList::ConstIterator it = translationList.begin();
it != translationList.end(); ++it )
{
// Extract the language tag from the directory name
- QString tag = *it;
- int index = tag.findRev('/');
+ TQString tag = *it;
+ int index = tag.tqfindRev('/');
tag = tag.left(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index+1);
- if ( seenLanguages.find( tag ) == seenLanguages.end() ) {
+ if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) {
KSimpleConfig entry(*it);
entry.setGroup("KCM Locale");
- const QString name = entry.readEntry("Name", tag);
+ const TQString name = entry.readEntry("Name", tag);
// e.g. name is "US English" and tag is "en_US"
m_langMap.insert( name, tag );
@@ -166,20 +166,20 @@ void KoGlobal::createListOfLanguages()
// How to add them?
}
-QString KoGlobal::tagOfLanguage( const QString & _lang)
+TQString KoGlobal::tagOfLanguage( const TQString & _lang)
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.find( _lang );
+ TQMap<TQString,TQString>::ConstIterator it = map.tqfind( _lang );
if ( it != map.end() )
return *it;
- return QString::null;
+ return TQString();
}
-QString KoGlobal::languageFromTag( const QString &langTag )
+TQString KoGlobal::languageFromTag( const TQString &langTag )
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.begin();
- const QMap<QString,QString>::ConstIterator end = map.end();
+ TQMap<TQString,TQString>::ConstIterator it = map.begin();
+ const TQMap<TQString,TQString>::ConstIterator end = map.end();
for ( ; it != end; ++it )
if ( it.data() == langTag )
return it.key();
diff --git a/lib/kofficecore/KoGlobal.h b/lib/kofficecore/KoGlobal.h
index bab9c261..367a150b 100644
--- a/lib/kofficecore/KoGlobal.h
+++ b/lib/kofficecore/KoGlobal.h
@@ -22,9 +22,9 @@
#ifndef koGlobal_h
#define koGlobal_h
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqmap.h>
class KConfig;
#include <koffice_export.h>
@@ -39,9 +39,9 @@ public:
* Return the default font for KOffice programs.
* This is (currently) the same as the KDE-global default font,
* except that it is guaranteed to have a point size set,
- * never a pixel size (see @ref QFont).
+ * never a pixel size (see @ref TQFont).
*/
- static QFont defaultFont() {
+ static TQFont defaultFont() {
return self()->_defaultFont();
}
@@ -66,32 +66,32 @@ public:
/// Return the list of available languages, in their displayable form
/// (translated names)
- static QStringList listOfLanguages() {
+ static TQStringList listOfLanguages() {
return self()->_listOfLanguages();
}
/// Return the list of available languages, in their internal form
/// e.g. "fr" or "en_US", here called "tag"
- static QStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags
+ static TQStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags
return self()->_listOfLanguageTags();
}
/// For a given language display name, return its tag
- static QString tagOfLanguage( const QString & _lang );
+ static TQString tagOfLanguage( const TQString & _lang );
/// For a given language tag, return its display name
- static QString languageFromTag( const QString &_lang );
+ static TQString languageFromTag( const TQString &_lang );
~KoGlobal();
private:
static KoGlobal* self();
KoGlobal();
- QFont _defaultFont();
- QStringList _listOfLanguages();
- QStringList _listOfLanguageTags();
+ TQFont _defaultFont();
+ TQStringList _listOfLanguages();
+ TQStringList _listOfLanguageTags();
KConfig* _kofficeConfig();
void createListOfLanguages();
int m_pointSize;
- typedef QMap<QString, QString> LanguageMap;
+ typedef TQMap<TQString, TQString> LanguageMap;
LanguageMap m_langMap; // display-name -> language tag
KConfig* m_kofficeConfig;
int m_dpiX;
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index bdcfaa6a..b78677f4 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -55,7 +55,7 @@
#include <kglobalsettings.h>
#include <ksharedptr.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <unistd.h>
#include <stdlib.h>
@@ -63,20 +63,20 @@
class KoPartManager : public KParts::PartManager
{
public:
- KoPartManager( QWidget * parent, const char * name = 0L )
- : KParts::PartManager( parent, name )
+ KoPartManager( TQWidget * tqparent, const char * name = 0L )
+ : KParts::PartManager( tqparent, name )
{
setSelectionPolicy( KParts::PartManager::TriState );
setAllowNestedParts( true );
setIgnoreScrollBars( true );
// Allow right-click on embedded objects (without activating them)
- // But beware: this means right-click on parent, from embedded object,
- // doesn't make the parent active first...
+ // But beware: this means right-click on tqparent, from embedded object,
+ // doesn't make the tqparent active first...
setActivationButtonMask( Qt::LeftButton | Qt::MidButton );
}
- virtual bool eventFilter( QObject *obj, QEvent *ev )
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev )
{
- if ( !obj->isWidgetType() || ::qt_cast<KoFrame *>( obj ) )
+ if ( !obj->isWidgetType() || ::tqqt_cast<KoFrame *>( obj ) )
return false;
return KParts::PartManager::eventFilter( obj, ev );
}
@@ -135,25 +135,25 @@ public:
KoDocument *m_rootDoc;
KoDocument *m_docToOpen;
- QPtrList<KoView> m_rootViews;
+ TQPtrList<KoView> m_rootViews;
KParts::PartManager *m_manager;
KParts::Part *m_activePart;
KoView *m_activeView;
- QLabel * statusBarLabel;
+ TQLabel * statusBarLabel;
KProgress *m_progress;
- QPtrList<KAction> m_splitViewActionList;
+ TQPtrList<KAction> m_splitViewActionList;
// This additional list is needed, because we don't plug
// the first list, when an embedded view gets activated (Werner)
- QPtrList<KAction> m_veryHackyActionList;
- QSplitter *m_splitter;
+ TQPtrList<KAction> m_veryHackyActionList;
+ TQSplitter *m_splitter;
KSelectAction *m_orientation;
KAction *m_removeView;
KoMainWindowIface *m_dcopObject;
- QPtrList <KAction> m_toolbarList;
+ TQPtrList <KAction> m_toolbarList;
bool bMainWindowGUIBuilt;
bool m_splitted;
@@ -177,7 +177,7 @@ public:
bool m_isExporting;
KURL m_lastExportURL;
- QCString m_lastExportFormat;
+ TQCString m_lastExportFormat;
int m_lastExportSpecialOutputFlag;
KSharedPtr<KoSpeaker> m_koSpeaker;
@@ -192,54 +192,54 @@ KoMainWindow::KoMainWindow( KInstance *instance, const char* name )
d->m_manager = new KoPartManager( this );
- connect( d->m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( slotActivePartChanged( KParts::Part * ) ) );
+ connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotActivePartChanged( KParts::Part * ) ) );
if ( instance )
setInstance( instance, false ); // don't load plugins! we don't want
// the part's plugins with this shell, even though we are using the
// part's instance! (Simon)
- QString doc;
- QStringList allFiles = KGlobal::dirs()->findAllResources( "data", "koffice/koffice_shell.rc" );
+ TQString doc;
+ TQStringList allFiles = KGlobal::dirs()->findAllResources( "data", "koffice/koffice_shell.rc" );
setXMLFile( findMostRecentXMLFile( allFiles, doc ) );
setLocalXMLFile( locateLocal( "data", "koffice/koffice_shell.rc" ) );
- KStdAction::openNew( this, SLOT( slotFileNew() ), actionCollection(), "file_new" );
- KStdAction::open( this, SLOT( slotFileOpen() ), actionCollection(), "file_open" );
- m_recent = KStdAction::openRecent( this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection() );
- d->m_paSave = KStdAction::save( this, SLOT( slotFileSave() ), actionCollection(), "file_save" );
- d->m_paSaveAs = KStdAction::saveAs( this, SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" );
- d->m_paPrint = KStdAction::print( this, SLOT( slotFilePrint() ), actionCollection(), "file_print" );
- d->m_paPrintPreview = KStdAction::printPreview( this, SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" );
- d->m_sendfile = KStdAction::mail( this, SLOT( slotEmailFile() ), actionCollection(), "file_send_file");
+ KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ), actionCollection(), "file_new" );
+ KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" );
+ m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection() );
+ d->m_paSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection(), "file_save" );
+ d->m_paSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" );
+ d->m_paPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint() ), actionCollection(), "file_print" );
+ d->m_paPrintPreview = KStdAction::printPreview( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" );
+ d->m_sendfile = KStdAction::mail( TQT_TQOBJECT(this), TQT_SLOT( slotEmailFile() ), actionCollection(), "file_send_file");
- d->m_paCloseFile = KStdAction::close( this, SLOT( slotFileClose() ), actionCollection(), "file_close" );
- KStdAction::quit( this, SLOT( slotFileQuit() ), actionCollection(), "file_quit" );
+ d->m_paCloseFile = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotFileClose() ), actionCollection(), "file_close" );
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" );
d->m_reloadfile = new KAction( i18n( "Reload"), 0,
- this, SLOT( slotReloadFile() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotReloadFile() ),
actionCollection(), "file_reload_file");
d->m_versionsfile = new KAction( i18n( "Versions..."), 0,
- this, SLOT( slotVersionsFile() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotVersionsFile() ),
actionCollection(), "file_versions_file");
d->m_importFile = new KAction( i18n( "I&mport..." ), 0, // clashing accel key :(
- this, SLOT( slotImportFile() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotImportFile() ),
actionCollection(), "file_import_file");
d->m_exportFile = new KAction( i18n( "E&xport..." ), 0,
- this, SLOT( slotExportFile() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotExportFile() ),
actionCollection(), "file_export_file");
/* The following entry opens the document information dialog. Since the action is named so it
intends to show data this entry should not have a trailing ellipses (...). */
d->m_paDocInfo = new KAction( i18n( "&Document Information" ), "documentinfo", 0,
- this, SLOT( slotDocumentInfo() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotDocumentInfo() ),
actionCollection(), "file_documentinfo" );
- KStdAction::keyBindings( this, SLOT( slotConfigureKeys() ), actionCollection() );
- KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
+ KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() );
+ KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
d->m_paDocInfo->setEnabled( false );
d->m_paSaveAs->setEnabled( false );
@@ -253,35 +253,35 @@ KoMainWindow::KoMainWindow( KInstance *instance, const char* name )
d->m_sendfile->setEnabled( false);
d->m_paCloseFile->setEnabled( false);
- d->m_splitter=new QSplitter(Qt::Vertical, this, "mw-splitter");
+ d->m_splitter=new TQSplitter(Qt::Vertical, this, "mw-splitter");
setCentralWidget( d->m_splitter );
// Keyboard accessibility enhancements.
new KKbdAccessExtensions(this, "mw-panelSizer");
// set up the action "list" for "Close all Views" (hacky :) (Werner)
d->m_veryHackyActionList.append(
new KAction(i18n("&Close All Views"), "fileclose",
- "ctrl+shift+w", this, SLOT(slotCloseAllViews()),
+ "ctrl+shift+w", TQT_TQOBJECT(this), TQT_SLOT(slotCloseAllViews()),
actionCollection(), "view_closeallviews") );
// set up the action list for the splitter stuff
d->m_splitViewActionList.append(new KAction(i18n("&Split View"), "view_split", 0,
- this, SLOT(slotSplitView()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSplitView()),
actionCollection(), "view_split"));
d->m_removeView=new KAction(i18n("&Remove View"), "view_remove", 0,
- this, SLOT(slotRemoveView()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRemoveView()),
actionCollection(), "view_rm_splitter");
d->m_splitViewActionList.append(d->m_removeView);
d->m_removeView->setEnabled(false);
- d->m_orientation=new KSelectAction(i18n("Splitter &Orientation"), "view_orientation", 0,
- this, SLOT(slotSetOrientation()),
+ d->m_orientation=new KSelectAction(i18n("Splitter &Qt::Orientation"), "view_orientation", 0,
+ TQT_TQOBJECT(this), TQT_SLOT(slotSetOrientation()),
actionCollection(), "view_splitter_orientation");
- QStringList items;
+ TQStringList items;
items << i18n("&Vertical")
<< i18n("&Horizontal");
d->m_orientation->setItems(items);
d->m_orientation->setCurrentItem(static_cast<int>(d->m_splitter->orientation()));
d->m_splitViewActionList.append(d->m_orientation);
- d->m_splitViewActionList.append(new KActionSeparator(this));
+ d->m_splitViewActionList.append(new KActionSeparator(TQT_TQOBJECT(this)));
// Load list of recent files
KConfig * config = instance ? instance->config() : KGlobal::config();
@@ -322,7 +322,7 @@ KoMainWindow::~KoMainWindow()
// safety first ;)
d->m_manager->setActivePart(0);
- if(d->m_rootViews.findRef(d->m_activeView)==-1) {
+ if(d->m_rootViews.tqfindRef(d->m_activeView)==-1) {
delete d->m_activeView;
d->m_activeView=0L;
}
@@ -357,7 +357,7 @@ void KoMainWindow::setRootDocument( KoDocument *doc )
}
//kdDebug(30003) << "KoMainWindow::setRootDocument this = " << this << " doc = " << doc << endl;
- QPtrList<KoView> oldRootViews = d->m_rootViews;
+ TQPtrList<KoView> oldRootViews = d->m_rootViews;
d->m_rootViews.clear();
KoDocument *oldRootDoc = d->m_rootDoc;
@@ -375,7 +375,7 @@ void KoMainWindow::setRootDocument( KoDocument *doc )
d->m_rootViews.current()->show();
// The addShell has been done already if using openURL
- if ( !d->m_rootDoc->shells().contains( this ) )
+ if ( !d->m_rootDoc->shells().tqcontains( this ) )
d->m_rootDoc->addShell( this );
d->m_removeView->setEnabled(false);
d->m_orientation->setEnabled(false);
@@ -417,7 +417,7 @@ void KoMainWindow::updateVersionsFileAction(KoDocument *doc)
}
-void KoMainWindow::setRootDocumentDirect( KoDocument *doc, const QPtrList<KoView> & views )
+void KoMainWindow::setRootDocumentDirect( KoDocument *doc, const TQPtrList<KoView> & views )
{
d->m_rootDoc = doc;
d->m_rootViews = views;
@@ -442,10 +442,10 @@ void KoMainWindow::addRecentURL( const KURL& url )
bool ok = true;
if ( url.isLocalFile() )
{
- QString path = url.path( -1 );
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
- for ( QStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
- if ( path.contains( *it ) )
+ TQString path = url.path( -1 );
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
+ if ( path.tqcontains( *it ) )
ok = false; // it's in the tmp resource
if ( ok )
KRecentDocument::add(path);
@@ -492,32 +492,32 @@ void KoMainWindow::updateCaption()
{
//kdDebug(30003) << "KoMainWindow::updateCaption()" << endl;
if ( !d->m_rootDoc )
- setCaption(QString::null);
+ setCaption(TQString());
else if ( rootDocument()->isCurrent() )
{
- QString caption;
+ TQString caption;
// Get caption from document info (title(), in about page)
if ( rootDocument()->documentInfo() )
{
- KoDocumentInfoPage * page = rootDocument()->documentInfo()->page( QString::fromLatin1("about") );
+ KoDocumentInfoPage * page = rootDocument()->documentInfo()->page( TQString::tqfromLatin1("about") );
if (page)
caption = static_cast<KoDocumentInfoAbout *>(page)->title();
}
- const QString url = rootDocument()->url().prettyURL( 0, KURL::StripFileProtocol );
+ const TQString url = rootDocument()->url().prettyURL( 0, KURL::StripFileProtocol );
if ( !caption.isEmpty() && !url.isEmpty() )
- caption = QString( "%1 - %2" ).arg( caption ).arg( url );
+ caption = TQString( "%1 - %2" ).tqarg( caption ).tqarg( url );
else if ( caption.isEmpty() )
caption = url;
setCaption( caption, rootDocument()->isModified() );
if ( !rootDocument()->url().fileName(false).isEmpty() )
- d->m_paSave->setToolTip( i18n("Save as %1").arg(rootDocument()->url().fileName(false)) );
+ d->m_paSave->setToolTip( i18n("Save as %1").tqarg(rootDocument()->url().fileName(false)) );
else
d->m_paSave->setToolTip( i18n("Save") );
}
}
-void KoMainWindow::updateCaption( QString caption, bool mod )
+void KoMainWindow::updateCaption( TQString caption, bool mod )
{
//kdDebug(30003)<<"KoMainWindow::updateCaption("<<caption<<","<<mod<<")"<<endl;
setCaption( caption, mod );
@@ -530,7 +530,7 @@ KoDocument *KoMainWindow::rootDocument() const
KoView *KoMainWindow::rootView() const
{
- if(d->m_rootViews.find(d->m_activeView)!=-1)
+ if(d->m_rootViews.tqfind(d->m_activeView)!=-1)
return d->m_activeView;
return d->m_rootViews.first();
}
@@ -544,7 +544,7 @@ bool KoMainWindow::openDocument( const KURL & url )
{
if ( !KIO::NetAccess::exists(url,true,0) )
{
- KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(url.url()) );
+ KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(url.url()) );
m_recent->removeURL(url); //remove the file from the recent-opened-file-list
saveRecentFiles();
return false;
@@ -564,7 +564,7 @@ bool KoMainWindow::openDocument( KoDocument *newdoc, const KURL & url )
setRootDocument( newdoc );
newdoc->setURL(url);
- QString mime = KMimeType::findByURL(url)->name();
+ TQString mime = KMimeType::findByURL(url)->name();
if ( mime.isEmpty() || mime == KMimeType::defaultMimeType() )
mime = newdoc->nativeFormatMimeType();
if ( url.isLocalFile() ) // workaround for kde<=3.3 kparts bug, fixed for 3.4
@@ -587,9 +587,9 @@ bool KoMainWindow::openDocumentInternal( const KURL & url, KoDocument *newdoc )
return false;
d->m_firstTime=true;
- connect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- connect(newdoc, SIGNAL(completed()), this, SLOT(slotLoadCompleted()));
- connect(newdoc, SIGNAL(canceled( const QString & )), this, SLOT(slotLoadCanceled( const QString & )));
+ connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ connect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
+ connect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
newdoc->addShell( this ); // used by openURL
bool openRet = (!isImporting ()) ? newdoc->openURL(url) : newdoc->import(url);
if(!openRet)
@@ -630,12 +630,12 @@ void KoMainWindow::slotLoadCompleted()
// We had no document, set the new one
setRootDocument( newdoc );
}
- disconnect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- disconnect(newdoc, SIGNAL(completed()), this, SLOT(slotLoadCompleted()));
- disconnect(newdoc, SIGNAL(canceled( const QString & )), this, SLOT(slotLoadCanceled( const QString & )));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
+ disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
}
-void KoMainWindow::slotLoadCanceled( const QString & errMsg )
+void KoMainWindow::slotLoadCanceled( const TQString & errMsg )
{
kdDebug(30003) << "KoMainWindow::slotLoadCanceled" << endl;
if ( !errMsg.isEmpty() ) // empty when canceled by user
@@ -643,15 +643,15 @@ void KoMainWindow::slotLoadCanceled( const QString & errMsg )
// ... can't delete the document, it's the one who emitted the signal...
KoDocument* newdoc = (KoDocument *)(sender());
- disconnect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- disconnect(newdoc, SIGNAL(completed()), this, SLOT(slotLoadCompleted()));
- disconnect(newdoc, SIGNAL(canceled( const QString & )), this, SLOT(slotLoadCanceled( const QString & )));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted()));
+ disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & )));
newdoc->removeShell(this);
delete newdoc;
}
-void KoMainWindow::slotSaveCanceled( const QString &errMsg )
+void KoMainWindow::slotSaveCanceled( const TQString &errMsg )
{
kdDebug(30003) << "KoMainWindow::slotSaveCanceled" << endl;
if ( !errMsg.isEmpty() ) // empty when canceled by user
@@ -663,21 +663,21 @@ void KoMainWindow::slotSaveCompleted()
{
kdDebug(30003) << "KoMainWindow::slotSaveCompleted" << endl;
KoDocument* pDoc = (KoDocument *)(sender());
- disconnect(pDoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- disconnect(pDoc, SIGNAL(completed()), this, SLOT(slotSaveCompleted()));
- disconnect(pDoc, SIGNAL(canceled( const QString & )),
- this, SLOT(slotSaveCanceled( const QString & )));
+ disconnect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ disconnect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted()));
+ disconnect(pDoc, TQT_SIGNAL(canceled( const TQString & )),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & )));
}
// returns true if we should save, false otherwise.
-bool KoMainWindow::exportConfirmation( const QCString &outputFormat )
+bool KoMainWindow::exportConfirmation( const TQCString &outputFormat )
{
if (!rootDocument()->wantExportConfirmation()) return true;
KMimeType::Ptr mime = KMimeType::mimeType( outputFormat );
const bool neverHeardOfIt = ( mime->name() == KMimeType::defaultMimeType() );
- QString comment = neverHeardOfIt ?
- i18n( "%1 (unknown file type)" ).arg( outputFormat )
+ TQString comment = neverHeardOfIt ?
+ i18n( "%1 (unknown file type)" ).tqarg( outputFormat.data() )
: mime->comment();
// Warn the user
@@ -689,7 +689,7 @@ bool KoMainWindow::exportConfirmation( const QCString &outputFormat )
this,
i18n( "<qt>Saving as a %1 may result in some loss of formatting."
"<p>Do you still want to save in this format?</qt>" )
- .arg( QString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later
+ .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later
i18n( "Confirm Save" ),
KStdGuiItem::save (),
"NonNativeSaveConfirmation",
@@ -703,7 +703,7 @@ bool KoMainWindow::exportConfirmation( const QCString &outputFormat )
this,
i18n( "<qt>Exporting as a %1 may result in some loss of formatting."
"<p>Do you still want to export to this format?</qt>" )
- .arg( QString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later
+ .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later
i18n( "Confirm Export" ),
i18n ("Export"),
"NonNativeExportConfirmation", // different to the one used for Save (above)
@@ -730,20 +730,20 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
else
reset_url = false;
- connect(pDoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- connect(pDoc, SIGNAL(completed()), this, SLOT(slotSaveCompleted()));
- connect(pDoc, SIGNAL(canceled( const QString & )),
- this, SLOT(slotSaveCanceled( const QString & )));
+ connect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ connect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted()));
+ connect(pDoc, TQT_SIGNAL(canceled( const TQString & )),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & )));
KURL oldURL = pDoc->url();
- QString oldFile = pDoc->file();
- QCString _native_format = pDoc->nativeFormatMimeType();
- QCString oldOutputFormat = pDoc->outputMimeType();
+ TQString oldFile = pDoc->file();
+ TQCString _native_format = pDoc->nativeFormatMimeType();
+ TQCString oldOutputFormat = pDoc->outputMimeType();
int oldSpecialOutputFlag = pDoc->specialOutputFlag();
KURL suggestedURL = pDoc->url();
- QStringList mimeFilter = KoFilterManager::mimeFilter( _native_format, KoFilterManager::Export, pDoc->extraNativeMimeTypes() );
- if (mimeFilter.findIndex (oldOutputFormat) < 0 && !isExporting())
+ TQStringList mimeFilter = KoFilterManager::mimeFilter( _native_format, KoFilterManager::Export, pDoc->extraNativeMimeTypes() );
+ if (mimeFilter.tqfindIndex (oldOutputFormat) < 0 && !isExporting())
{
kdDebug(30003) << "KoMainWindow::saveDocument no export filter for '" << oldOutputFormat << "'" << endl;
@@ -751,13 +751,13 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
// dialog and then tries to just plain Save ---
// suggest a different filename extension (yes, we fortunately don't all live in a world of magic :))
- QString suggestedFilename = suggestedURL.fileName ();
+ TQString suggestedFilename = suggestedURL.fileName ();
if ( !suggestedFilename.isEmpty () ) // ".kwd" looks strange for a name
{
- int c = suggestedFilename.findRev ('.');
+ int c = suggestedFilename.tqfindRev ('.');
KMimeType::Ptr mime = KMimeType::mimeType( _native_format );
- QString ext = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString ext = mime->property( "X-KDE-NativeExtension" ).toString();
if (!ext.isEmpty ())
{
if (c < 0)
@@ -790,7 +790,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
bool justChangingFilterOptions = false;
KoFileDialog *dialog = new KoFileDialog( (isExporting() && !d->m_lastExportURL.isEmpty() )? d->m_lastExportURL.url () : suggestedURL.url (),
- QString::null, this, "file dialog", true);
+ TQString(), this, "file dialog", true);
if (!isExporting())
dialog->setCaption( i18n("Save Document As") );
@@ -805,12 +805,12 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
pDoc->supportedSpecialFormats() );
KURL newURL;
- QCString outputFormat = _native_format;
+ TQCString outputFormat = _native_format;
int specialOutputFlag = 0;
bool bOk;
do {
bOk=true;
- if(dialog->exec()==QDialog::Accepted) {
+ if(dialog->exec()==TQDialog::Accepted) {
newURL=dialog->selectedURL();
outputFormat=dialog->currentMimeFilter().latin1();
specialOutputFlag = dialog->specialEntrySelected();
@@ -839,7 +839,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
// adjust URL before doing checks on whether the file exists.
if ( specialOutputFlag == KoDocument::SaveAsDirectoryStore ) {
- QString fileName = newURL.fileName();
+ TQString fileName = newURL.fileName();
if ( fileName != "content.xml" ) {
newURL.addPath( "content.xml" );
}
@@ -884,7 +884,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
// (not Save As) they won't be expecting that they are
// using their File/Export settings
//
- // As a bad side-effect of this, the modified flag will not
+ // As a bad side-effect of TQT_TQOBJECT(this), the modified flag will not
// be updated and it is possible that what is currently on
// their screen is not what is stored on disk (through loss
// of formatting). But if you are dumb enough to change
@@ -979,7 +979,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
return ret;
}
-void KoMainWindow::closeEvent(QCloseEvent *e) {
+void KoMainWindow::closeEvent(TQCloseEvent *e) {
if(queryClose()) {
saveWindowSettings();
setRootDocument(0L);
@@ -1004,7 +1004,7 @@ void KoMainWindow::saveWindowSettings()
}
}
-void KoMainWindow::resizeEvent( QResizeEvent * e )
+void KoMainWindow::resizeEvent( TQResizeEvent * e )
{
d->m_windowSizeDirty = true;
KParts::MainWindow::resizeEvent( e );
@@ -1027,7 +1027,7 @@ bool KoMainWindow::queryClose()
// main doc + internally stored child documents
if ( d->m_rootDoc->isModified() )
{
- QString name;
+ TQString name;
if ( rootDocument()->documentInfo() )
{
name = rootDocument()->documentInfo()->title();
@@ -1039,8 +1039,8 @@ bool KoMainWindow::queryClose()
name = i18n( "Untitled" );
int res = KMessageBox::warningYesNoCancel( this,
- i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name),
- QString::null,
+ i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name),
+ TQString(),
KStdGuiItem::save(),
KStdGuiItem::discard());
@@ -1079,8 +1079,8 @@ void KoMainWindow::chooseNewDocument( int /*KoDocument::InitDocFlags*/ initDocFl
return;
//FIXME: This needs to be handled differently
- connect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
- disconnect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
+ connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
+ disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int)));
if ( ( !doc && ( initDocFlags == KoDocument::InitDocFileNew ) ) || ( doc && !doc->isEmpty() ) )
{
@@ -1108,18 +1108,18 @@ void KoMainWindow::slotFileNew()
void KoMainWindow::slotFileOpen()
{
- KFileDialog *dialog = new KFileDialog(":OpenDialog", QString::null, this, "file dialog", true);
+ KFileDialog *dialog = new KFileDialog(":OpenDialog", TQString(), this, "file dialog", true);
if (!isImporting())
dialog->setCaption( i18n("Open Document") );
else
dialog->setCaption( i18n("Import Document") );
// The few lines below need to be kept in sync with KoTemplateChooseDia::setupFileDialog
- const QStringList mimeFilter = KoFilterManager::mimeFilter( KoDocument::readNativeFormatMimeType(),
+ const TQStringList mimeFilter = KoFilterManager::mimeFilter( KoDocument::readNativeFormatMimeType(),
KoFilterManager::Import,
KoDocument::readExtraNativeMimeTypes() );
dialog->setMimeFilter( mimeFilter );
- if(dialog->exec()!=QDialog::Accepted) {
+ if(dialog->exec()!=TQDialog::Accepted) {
delete dialog;
return;
}
@@ -1194,14 +1194,14 @@ void KoMainWindow::print(bool quick) {
return;
}
- KPrinter printer( true /*, QPrinter::HighResolution*/ );
- QString title = rootView()->koDocument()->documentInfo()->title();
- QString fileName = rootView()->koDocument()->url().fileName();
+ KPrinter printer( true /*, TQPrinter::HighResolution*/ );
+ TQString title = rootView()->koDocument()->documentInfo()->title();
+ TQString fileName = rootView()->koDocument()->url().fileName();
// strip off the native extension (I don't want foobar.kwd.ps when printing into a file)
KMimeType::Ptr mime = KMimeType::mimeType( rootView()->koDocument()->outputMimeType() );
if ( mime ) {
- QString extension = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString extension = mime->property( "X-KDE-NativeExtension" ).toString();
if ( fileName.endsWith( extension ) )
fileName.truncate( fileName.length() - extension.length() );
@@ -1211,8 +1211,8 @@ void KoMainWindow::print(bool quick) {
title = fileName;
if ( title.isEmpty() ) {
// #139905 - breaks message freeze though
- //const QString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName();
- //title = i18n("%1 unsaved document (%2)").arg(programName).arg(KGlobal::locale()->formatDate(QDate::currentDate(), true/*short*/));
+ //const TQString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName();
+ //title = i18n("%1 unsaved document (%2)").tqarg(programName).tqarg(KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true/*short*/));
}
printer.setDocName( title );
printer.setDocFileName( fileName );
@@ -1249,13 +1249,13 @@ void KoMainWindow::slotFilePrintPreview()
printer.setPreviewOnly( true );
rootView()->setupPrinter( printer );
- QString oldFileName = printer.outputFileName();
+ TQString oldFileName = printer.outputFileName();
printer.setOutputFileName( tmpFile.name() );
int oldNumCopies = printer.numCopies();
printer.setNumCopies( 1 );
// Disable kdeprint's own preview, we'd get two. This shows that KPrinter needs
// a "don't use the previous settings" mode. The current way is really too much of a hack.
- QString oldKDEPreview = printer.option( "kde-preview" );
+ TQString oldKDEPreview = printer.option( "kde-preview" );
printer.setOption( "kde-preview", "0" );
rootView()->print(printer);
@@ -1277,7 +1277,7 @@ void KoMainWindow::slotConfigureToolbars()
if (rootDocument())
saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() );
KEditToolbar edit(factory(), this);
- connect(&edit,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
(void) edit.exec();
}
@@ -1296,7 +1296,7 @@ void KoMainWindow::slotNewToolbarConfig()
d->m_veryHackyActionList);
// This one only for root views
- if(d->m_rootViews.findRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
factory->plugActionList(d->m_activeView, "view_split",
d->m_splitViewActionList );
plugActionList( "toolbarlist", d->m_toolbarList );
@@ -1306,7 +1306,7 @@ void KoMainWindow::slotToolbarToggled( bool toggle )
{
//kdDebug(30003) << "KoMainWindow::slotToolbarToggled " << sender()->name() << " toggle=" << true << endl;
// The action (sender) and the toolbar have the same name
- KToolBar * bar = toolBar( sender()->name() );
+ KToolBar * bar = toolBar( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() );
if (bar)
{
if (toggle)
@@ -1318,18 +1318,18 @@ void KoMainWindow::slotToolbarToggled( bool toggle )
saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() );
}
else
- kdWarning(30003) << "slotToolbarToggled : Toolbar " << sender()->name() << " not found!" << endl;
+ kdWarning(30003) << "slotToolbarToggled : Toolbar " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() << " not found!" << endl;
}
bool KoMainWindow::toolbarIsVisible(const char *tbName)
{
- QWidget *tb = toolBar( tbName);
+ TQWidget *tb = toolBar( tbName);
return !tb->isHidden();
}
void KoMainWindow::showToolbar( const char * tbName, bool shown )
{
- QWidget * tb = toolBar( tbName );
+ TQWidget * tb = toolBar( tbName );
if ( !tb )
{
kdWarning(30003) << "KoMainWindow: toolbar " << tbName << " not found." << endl;
@@ -1341,7 +1341,7 @@ void KoMainWindow::showToolbar( const char * tbName, bool shown )
tb->hide();
// Update the action appropriately
- QPtrListIterator<KAction> it( d->m_toolbarList );
+ TQPtrListIterator<KAction> it( d->m_toolbarList );
for ( ; it.current() ; ++it )
if ( !strcmp( it.current()->name(), tbName ) )
{
@@ -1370,7 +1370,7 @@ void KoMainWindow::slotCloseAllViews() {
if(d->m_rootDoc && d->m_rootDoc->isEmbedded()) {
hide();
d->m_rootDoc->removeShell(this);
- QPtrListIterator<KoMainWindow> it(d->m_rootDoc->shells());
+ TQPtrListIterator<KoMainWindow> it(d->m_rootDoc->shells());
while (it.current()) {
it.current()->hide();
delete it.current(); // this updates the lists' current pointer and thus
@@ -1388,7 +1388,7 @@ void KoMainWindow::slotCloseAllViews() {
void KoMainWindow::slotRemoveView() {
KoView *view;
- if(d->m_rootViews.findRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
view=d->m_rootViews.current();
else
view=d->m_rootViews.first();
@@ -1435,10 +1435,10 @@ void KoMainWindow::slotProgress(int value) {
{
// The statusbar might not even be created yet.
// So check for that first, and create it if necessary
- QObjectList *l = queryList( "QStatusBar" );
+ TQObjectList *l = queryList( "TQStatusBar" );
if ( !l || !l->first() ) {
statusBar()->show();
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
+ TQApplication::sendPostedEvents( TQT_TQOBJECT(this), TQEvent::ChildInserted );
setUpLayout();
}
delete l;
@@ -1467,7 +1467,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
// This looks very much like KParts::MainWindow::createGUI, but we have
// to reimplement it because it works with an active part, whereas we work
// with an active view _and_ an active part, depending for what.
- // Both are KXMLGUIClients, but e.g. the plugin query needs a QObject.
+ // Both are KXMLGUIClients, but e.g. the plugin query needs a TQObject.
//kdDebug(30003) << "KoMainWindow::slotActivePartChanged( Part * newPart) newPart = " << newPart << endl;
//kdDebug(30003) << "current active part is " << d->m_activePart << endl;
@@ -1484,8 +1484,8 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
if ( d->m_activeView )
{
KParts::GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
- QApplication::sendEvent( d->m_activeView, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activeView, &ev );
factory->removeClient( d->m_activeView );
@@ -1497,7 +1497,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
if ( !d->bMainWindowGUIBuilt )
{
// Load mainwindow plugins
- KParts::Plugin::loadPlugins( this, this, instance(), true );
+ KParts::Plugin::loadPlugins( TQT_TQOBJECT(this), this, instance(), true );
createShellGUI();
}
@@ -1514,25 +1514,25 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
factory->plugActionList(d->m_activeView, "view_closeallviews",
d->m_veryHackyActionList);
// This one only for root views
- if(d->m_rootViews.findRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
factory->plugActionList(d->m_activeView, "view_split", d->m_splitViewActionList );
// Position and show toolbars according to user's preference
setAutoSaveSettings( newPart->instance()->instanceName(), false );
// Create and plug toolbar list for Settings menu
- //QPtrListIterator<KToolBar> it = toolBarIterator();
- QPtrList<QWidget> toolBarList = factory->containers( "ToolBar" );
- QPtrListIterator<QWidget> it( toolBarList );
+ //TQPtrListIterator<KToolBar> it = toolBarIterator();
+ TQPtrList<TQWidget> toolBarList = factory->containers( "ToolBar" );
+ TQPtrListIterator<TQWidget> it( toolBarList );
for ( ; it.current() ; ++it )
{
if ( it.current()->inherits("KToolBar") )
{
KToolBar * tb = static_cast<KToolBar *>(it.current());
- KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").arg( tb->text() ), 0,
+ KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").tqarg( tb->text() ), 0,
actionCollection(), tb->name() );
- act->setCheckedState(i18n("Hide %1 Toolbar").arg( tb->text() ));
- connect( act, SIGNAL( toggled( bool ) ), this, SLOT( slotToolbarToggled( bool ) ) );
+ act->setCheckedState(i18n("Hide %1 Toolbar").tqarg( tb->text() ));
+ connect( act, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolbarToggled( bool ) ) );
act->setChecked ( !tb->isHidden() );
d->m_toolbarList.append( act );
}
@@ -1544,8 +1544,8 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
// Send the GUIActivateEvent only now, since it might show/hide toolbars too
// (and this has priority over applyMainWindowSettings)
KParts::GUIActivateEvent ev( true );
- QApplication::sendEvent( d->m_activePart, &ev );
- QApplication::sendEvent( d->m_activeView, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activeView, &ev );
}
else
{
@@ -1555,11 +1555,11 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
setUpdatesEnabled( true );
}
-QLabel * KoMainWindow::statusBarLabel()
+TQLabel * KoMainWindow::statusBarLabel()
{
if ( !d->statusBarLabel )
{
- d->statusBarLabel = new QLabel( statusBar() );
+ d->statusBarLabel = new TQLabel( statusBar() );
statusBar()->addWidget( d->statusBarLabel, 1, true );
}
return d->statusBarLabel;
@@ -1588,16 +1588,16 @@ void KoMainWindow::slotEmailFile()
// Subject = Document file name
// Attachment = The current file
// Message Body = The current document in HTML export? <-- This may be an option.
- QString theSubject;
- QStringList urls;
- QString fileURL;
+ TQString theSubject;
+ TQStringList urls;
+ TQString fileURL;
if (rootDocument()->url ().isEmpty () ||
rootDocument()->isModified())
{
//Save the file as a temporary file
bool const tmp_modified = rootDocument()->isModified();
KURL const tmp_url = rootDocument()->url();
- QCString const tmp_mimetype = rootDocument()->outputMimeType();
+ TQCString const tmp_mimetype = rootDocument()->outputMimeType();
KTempFile tmpfile; //TODO: The temorary file should be deleted when the mail program is closed
KURL u;
u.setPath(tmpfile.name());
@@ -1618,7 +1618,7 @@ void KoMainWindow::slotEmailFile()
else
{
fileURL = rootDocument()->url().url();
- theSubject = i18n("Document - %1").arg(rootDocument()->url().fileName(false));
+ theSubject = i18n("Document - %1").tqarg(rootDocument()->url().fileName(false));
urls.append( fileURL );
}
@@ -1626,9 +1626,9 @@ void KoMainWindow::slotEmailFile()
if (!fileURL.isEmpty())
{
- kapp->invokeMailer(QString::null, QString::null, QString::null, theSubject,
- QString::null, //body
- QString::null,
+ kapp->invokeMailer(TQString(), TQString(), TQString(), theSubject,
+ TQString(), //body
+ TQString(),
urls); // attachments
}
}
diff --git a/lib/kofficecore/KoMainWindow.h b/lib/kofficecore/KoMainWindow.h
index 2b738db9..f1dd6419 100644
--- a/lib/kofficecore/KoMainWindow.h
+++ b/lib/kofficecore/KoMainWindow.h
@@ -26,7 +26,7 @@
#include <koffice_export.h>
#include "KoDocument.h"
-class QLabel;
+class TQLabel;
class KoView;
class KoMainWindowPrivate;
class KURL;
@@ -43,7 +43,7 @@ namespace KParts
* @brief Main window for a KOffice application
*
* This class is used to represent a main window
- * of a KOffice component. Each main window contains
+ * of a KOffice component. Each main window tqcontains
* a menubar and some toolbars.
*
* @note This class does NOT need to be subclassed in your application.
@@ -51,6 +51,7 @@ namespace KParts
class KOFFICECORE_EXPORT KoMainWindow : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -111,9 +112,9 @@ public:
/**
* Get hold of the label in the statusbar, to write messages to it.
- * You can also insert other items in the status bar by using QStatusBar::addWidget.
+ * You can also insert other items in the status bar by using TQStatusBar::addWidget.
*/
- QLabel * statusBarLabel();
+ TQLabel * statusBarLabel();
/**
* Sets the maximum number of recent documents entries.
@@ -150,7 +151,7 @@ public:
/**
* Updates the window caption based on the document info and path.
*/
- virtual void updateCaption( const QString caption, bool mod );
+ virtual void updateCaption( const TQString caption, bool mod );
void updateReloadFileAction(KoDocument *doc);
void updateVersionsFileAction(KoDocument *doc);
@@ -298,7 +299,7 @@ protected: // protected methods are mostly for koshell, it's the only one derivi
* Special method for KOShell, to allow switching the root
* document (and its views) among a set of them.
*/
- void setRootDocumentDirect( KoDocument *doc, const QPtrList<KoView> & views );
+ void setRootDocumentDirect( KoDocument *doc, const TQPtrList<KoView> & views );
/**
* Create a new empty document.
@@ -318,8 +319,8 @@ protected: // protected methods are mostly for koshell, it's the only one derivi
*/
virtual bool saveDocument( bool saveas = false, bool silent = false );
- virtual void closeEvent( QCloseEvent * e );
- virtual void resizeEvent( QResizeEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
+ virtual void resizeEvent( TQResizeEvent * e );
/**
* Ask user about saving changes to the document upon exit.
@@ -363,7 +364,7 @@ private:
*
* @return true if the document should be saved
*/
- bool exportConfirmation( const QCString &outputFormat );
+ bool exportConfirmation( const TQCString &outputFormat );
void saveWindowSettings();
@@ -375,9 +376,9 @@ protected slots:
private slots:
void slotProgress(int value);
void slotLoadCompleted();
- void slotLoadCanceled (const QString &);
+ void slotLoadCanceled (const TQString &);
void slotSaveCompleted();
- void slotSaveCanceled(const QString &);
+ void slotSaveCanceled(const TQString &);
private:
KoMainWindowPrivate *d;
diff --git a/lib/kofficecore/KoMainWindowIface.cc b/lib/kofficecore/KoMainWindowIface.cc
index 356bd80b..6d38fae0 100644
--- a/lib/kofficecore/KoMainWindowIface.cc
+++ b/lib/kofficecore/KoMainWindowIface.cc
@@ -27,7 +27,7 @@
#include <kdcopactionproxy.h>
KoMainWindowIface::KoMainWindowIface( KoMainWindow *mainwindow )
- : DCOPObject( mainwindow )
+ : DCOPObject( TQT_TQOBJECT(mainwindow) )
{
m_pMainWindow = mainwindow;
m_actionProxy = new KDCOPActionProxy( mainwindow->actionCollection(), this );
@@ -38,7 +38,7 @@ KoMainWindowIface::~KoMainWindowIface()
delete m_actionProxy;
}
-DCOPRef KoMainWindowIface::action( const QCString &name )
+DCOPRef KoMainWindowIface::action( const TQCString &name )
{
return DCOPRef( kapp->dcopClient()->appId(), m_actionProxy->actionObjectId( name ) );
}
@@ -46,16 +46,16 @@ DCOPRef KoMainWindowIface::action( const QCString &name )
QCStringList KoMainWindowIface::actions()
{
QCStringList res;
- QValueList<KAction *> lst = m_actionProxy->actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = m_actionProxy->actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
res.append( (*it)->name() );
return res;
}
-QMap<QCString,DCOPRef> KoMainWindowIface::actionMap()
+TQMap<TQCString,DCOPRef> KoMainWindowIface::actionMap()
{
return m_actionProxy->actionMap();
}
diff --git a/lib/kofficecore/KoMainWindowIface.h b/lib/kofficecore/KoMainWindowIface.h
index 6b7c3cb6..9a81bc4b 100644
--- a/lib/kofficecore/KoMainWindowIface.h
+++ b/lib/kofficecore/KoMainWindowIface.h
@@ -35,9 +35,9 @@ public:
virtual ~KoMainWindowIface();
k_dcop:
- DCOPRef action( const QCString &name );
+ DCOPRef action( const TQCString &name );
QCStringList actions();
- QMap<QCString,DCOPRef> actionMap();
+ TQMap<TQCString,DCOPRef> actionMap();
ASYNC print(bool quick);
protected:
diff --git a/lib/kofficecore/KoOasisLoadingContext.cpp b/lib/kofficecore/KoOasisLoadingContext.cpp
index fdad0ecc..e5082dc8 100644
--- a/lib/kofficecore/KoOasisLoadingContext.cpp
+++ b/lib/kofficecore/KoOasisLoadingContext.cpp
@@ -31,7 +31,7 @@ KoOasisLoadingContext::KoOasisLoadingContext( KoDocument* doc,
{
// Ideally this should be done by KoDocument and passed as argument here...
KoOasisStore oasisStore( store );
- QString dummy;
+ TQString dummy;
(void)oasisStore.loadAndParse( "tar:/META-INF/manifest.xml", m_manifestDoc, dummy );
}
@@ -41,12 +41,12 @@ KoOasisLoadingContext::~KoOasisLoadingContext()
}
-void KoOasisLoadingContext::fillStyleStack( const QDomElement& object, const char* nsURI, const char* attrName, const char* family )
+void KoOasisLoadingContext::fillStyleStack( const TQDomElement& object, const char* nsURI, const char* attrName, const char* family )
{
// find all styles associated with an object and push them on the stack
if ( object.hasAttributeNS( nsURI, attrName ) ) {
- const QString styleName = object.attributeNS( nsURI, attrName, QString::null );
- const QDomElement* style = 0;
+ const TQString styleName = object.attributeNS( nsURI, attrName, TQString() );
+ const TQDomElement* style = 0;
bool isStyleAutoStyle = false;
if ( m_useStylesAutoStyles ) {
// When loading something from styles.xml, look into the styles.xml auto styles first
@@ -64,39 +64,39 @@ void KoOasisLoadingContext::fillStyleStack( const QDomElement& object, const cha
}
}
-void KoOasisLoadingContext::addStyles( const QDomElement* style, const char* family, bool usingStylesAutoStyles )
+void KoOasisLoadingContext::addStyles( const TQDomElement* style, const char* family, bool usingStylesAutoStyles )
{
Q_ASSERT( style );
if ( !style ) return;
- // this recursive function is necessary as parent styles can have parents themselves
- if ( style->hasAttributeNS( KoXmlNS::style, "parent-style-name" ) ) {
- const QString parentStyleName = style->attributeNS( KoXmlNS::style, "parent-style-name", QString::null );
- const QDomElement* parentStyle = 0;
+ // this recursive function is necessary as tqparent styles can have tqparents themselves
+ if ( style->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) ) {
+ const TQString tqparentStyleName = style->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
+ const TQDomElement* tqparentStyle = 0;
if ( usingStylesAutoStyles ) {
// When loading something from styles.xml, look into the styles.xml auto styles first
- parentStyle = m_styles.findStyleAutoStyle( parentStyleName, family );
+ tqparentStyle = m_styles.findStyleAutoStyle( tqparentStyleName, family );
// and fallback to looking at styles(), which includes the user styles from styles.xml
}
- if ( !parentStyle )
- parentStyle = m_styles.findStyle( parentStyleName, family );
- if ( parentStyle )
- addStyles( parentStyle, family, usingStylesAutoStyles );
+ if ( !tqparentStyle )
+ tqparentStyle = m_styles.findStyle( tqparentStyleName, family );
+ if ( tqparentStyle )
+ addStyles( tqparentStyle, family, usingStylesAutoStyles );
else
- kdWarning(32500) << "Parent style not found: " << parentStyleName << endl;
+ kdWarning(32500) << "Parent style not found: " << tqparentStyleName << endl;
}
else if ( family ) {
- const QDomElement* def = m_styles.defaultStyle( family );
+ const TQDomElement* def = m_styles.defaultStyle( family );
if ( def ) { // on top of all, the default style for this family
- //kdDebug(32500) << "pushing default style " << style->attributeNS( KoXmlNS::style, "name", QString::null ) << endl;
+ //kdDebug(32500) << "pushing default style " << style->attributeNS( KoXmlNS::style, "name", TQString() ) << endl;
m_styleStack.push( *def );
}
}
- //kdDebug(32500) << "pushing style " << style->attributeNS( KoXmlNS::style, "name", QString::null ) << endl;
+ //kdDebug(32500) << "pushing style " << style->attributeNS( KoXmlNS::style, "name", TQString() ) << endl;
m_styleStack.push( *style );
}
-QString KoOasisLoadingContext::generator() const
+TQString KoOasisLoadingContext::generator() const
{
parseMeta();
return m_generator;
@@ -108,13 +108,13 @@ void KoOasisLoadingContext::parseMeta() const
{
if ( m_store->hasFile( "meta.xml" ) )
{
- QDomDocument metaDoc;
+ TQDomDocument metaDoc;
KoOasisStore oasisStore( m_store );
- QString errorMsg;
+ TQString errorMsg;
if ( oasisStore.loadAndParse( "meta.xml", metaDoc, errorMsg ) ) {
- QDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
- QDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
- QDomElement generator = KoDom::namedItemNS( office, KoXmlNS::meta, "generator" );
+ TQDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
+ TQDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
+ TQDomElement generator = KoDom::namedItemNS( office, KoXmlNS::meta, "generator" );
if ( !generator.isNull() )
m_generator = generator.text();
}
diff --git a/lib/kofficecore/KoOasisLoadingContext.h b/lib/kofficecore/KoOasisLoadingContext.h
index cac1786b..880d4117 100644
--- a/lib/kofficecore/KoOasisLoadingContext.h
+++ b/lib/kofficecore/KoOasisLoadingContext.h
@@ -20,15 +20,15 @@
#define KOOASISLOADINGCONTEXT_H
class KoXmlWriter;
-class QDomElement;
+class TQDomElement;
class KoDocument;
class KoOasisStyles;
class KoPictureCollection;
class KoStore;
-#include <qmap.h>
+#include <tqmap.h>
#include <koffice_export.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <KoStyleStack.h>
/**
@@ -57,10 +57,10 @@ public:
KoOasisStyles& oasisStyles() { return m_styles; }
KoStyleStack& styleStack() { return m_styleStack; }
- const QDomDocument& manifestDocument() const { return m_manifestDoc; }
+ const TQDomDocument& manifestDocument() const { return m_manifestDoc; }
/// Return the <meta:generator> of the document, e.g. "KOffice/1.4.0a"
- QString generator() const;
+ TQString generator() const;
/**
* Convenience method for loading the style of an object
@@ -68,21 +68,21 @@ public:
*
* Read attribute (nsURI,attrName) from the given dom element,
* treat that attribute as a style name, and load that style
- * including all its parent styles.
+ * including all its tqparent styles.
* @param element the dom element to read the attribute from
* @param nsURI the namespace URI of the attribute to read
* @param attrName the name of the attribute to read
* @param family the style family used for this object
*/
- void fillStyleStack( const QDomElement& element, const char* nsURI, const char* attrName, const char* family );
+ void fillStyleStack( const TQDomElement& element, const char* nsURI, const char* attrName, const char* family );
/**
- * Add @p style to the stack, as well as all its parent styles
+ * Add @p style to the stack, as well as all its tqparent styles
* and the default style for this style family.
*
* @param style the dom element containing the style to add to the stack
- * @param family the family to use when looking up parent styles
- * @param usingStylesAutoStyles if true, the parent styles are looked up
+ * @param family the family to use when looking up tqparent styles
+ * @param usingStylesAutoStyles if true, the tqparent styles are looked up
* in the automatic styles from styles.xml, instead of looking up
* in the automatic styles from content.xml as we usually do.
* This is useful for loading headers and footers for instance.
@@ -90,7 +90,7 @@ public:
*
* Usually you would call fillStyleStack() instead.
*/
- void addStyles( const QDomElement* style, const char* family, bool usingStylesAutoStyles = false );
+ void addStyles( const TQDomElement* style, const char* family, bool usingStylesAutoStyles = false );
/// Set to true while loading headers and footers, to remember to use auto styles
/// from styles.xml
@@ -106,13 +106,13 @@ private:
KoOasisStyles& m_styles;
KoStyleStack m_styleStack;
- mutable QString m_generator;
+ mutable TQString m_generator;
mutable bool m_metaXmlParsed;
bool m_useStylesAutoStyles;
bool m_unused1; // padding, can be used later
bool m_unused2; // padding, can be used later
- QDomDocument m_manifestDoc;
+ TQDomDocument m_manifestDoc;
class Private;
Private *d;
diff --git a/lib/kofficecore/KoOasisSettings.cpp b/lib/kofficecore/KoOasisSettings.cpp
index 99f63524..37a0acec 100644
--- a/lib/kofficecore/KoOasisSettings.cpp
+++ b/lib/kofficecore/KoOasisSettings.cpp
@@ -22,74 +22,74 @@
#include "KoDom.h"
#include <kdebug.h>
-KoOasisSettings::KoOasisSettings( const QDomDocument& doc )
+KoOasisSettings::KoOasisSettings( const TQDomDocument& doc )
: m_settingsElement( KoDom::namedItemNS( doc.documentElement(), KoXmlNS::office, "settings" ) ),
m_configNSURI( KoXmlNS::config )
{
- const QDomElement contents = doc.documentElement();
+ const TQDomElement contents = doc.documentElement();
if ( m_settingsElement.isNull() )
kdDebug() << " document doesn't have tag 'office:settings'\n";
}
-KoOasisSettings::KoOasisSettings( const QDomDocument& doc, const char* officeNSURI, const char* configNSURI )
+KoOasisSettings::KoOasisSettings( const TQDomDocument& doc, const char* officeNSURI, const char* configNSURI )
: m_settingsElement( KoDom::namedItemNS( doc.documentElement(), officeNSURI, "settings" ) ),
m_configNSURI( configNSURI )
{
- const QDomElement contents = doc.documentElement();
+ const TQDomElement contents = doc.documentElement();
if ( m_settingsElement.isNull() )
kdDebug() << " document doesn't have tag 'office:settings'\n";
}
-KoOasisSettings::Items KoOasisSettings::itemSet( const QString& itemSetName ) const
+KoOasisSettings::Items KoOasisSettings::itemSet( const TQString& itemSetName ) const
{
- QDomElement e;
+ TQDomElement e;
forEachElement( e, m_settingsElement )
{
if ( e.localName() == "config-item-set" &&
e.namespaceURI() == m_configNSURI &&
- e.attributeNS( m_configNSURI, "name", QString::null ) == itemSetName )
+ e.attributeNS( m_configNSURI, "name", TQString() ) == itemSetName )
{
return Items( e, this );
}
}
- return Items( QDomElement(), this );
+ return Items( TQDomElement(), this );
}
-KoOasisSettings::IndexedMap KoOasisSettings::Items::indexedMap( const QString& itemMapName ) const
+KoOasisSettings::IndexedMap KoOasisSettings::Items::indexedMap( const TQString& itemMapName ) const
{
- QDomElement configItem;
+ TQDomElement configItem;
forEachElement( configItem, m_element )
{
if ( configItem.localName() == "config-item-map-indexed" &&
configItem.namespaceURI() == m_settings->m_configNSURI &&
- configItem.attributeNS( m_settings->m_configNSURI, "name", QString::null ) == itemMapName )
+ configItem.attributeNS( m_settings->m_configNSURI, "name", TQString() ) == itemMapName )
{
return IndexedMap( configItem, m_settings );
}
}
- return IndexedMap( QDomElement(), m_settings );
+ return IndexedMap( TQDomElement(), m_settings );
}
-KoOasisSettings::NamedMap KoOasisSettings::Items::namedMap( const QString& itemMapName ) const
+KoOasisSettings::NamedMap KoOasisSettings::Items::namedMap( const TQString& itemMapName ) const
{
- QDomElement configItem;
+ TQDomElement configItem;
forEachElement( configItem, m_element )
{
if ( configItem.localName() == "config-item-map-named" &&
configItem.namespaceURI() == m_settings->m_configNSURI &&
- configItem.attributeNS( m_settings->m_configNSURI, "name", QString::null ) == itemMapName )
+ configItem.attributeNS( m_settings->m_configNSURI, "name", TQString() ) == itemMapName )
{
return NamedMap( configItem, m_settings );
}
}
- return NamedMap( QDomElement(), m_settings );
+ return NamedMap( TQDomElement(), m_settings );
}
KoOasisSettings::Items KoOasisSettings::IndexedMap::entry( int entryIndex ) const
{
int i = 0;
- QDomElement entry;
+ TQDomElement entry;
forEachElement( entry, m_element )
{
if ( entry.localName() == "config-item-map-entry" &&
@@ -101,51 +101,51 @@ KoOasisSettings::Items KoOasisSettings::IndexedMap::entry( int entryIndex ) cons
++i;
}
}
- return Items( QDomElement(), m_settings );
+ return Items( TQDomElement(), m_settings );
}
-KoOasisSettings::Items KoOasisSettings::NamedMap::entry( const QString& entryName ) const
+KoOasisSettings::Items KoOasisSettings::NamedMap::entry( const TQString& entryName ) const
{
- QDomElement entry;
+ TQDomElement entry;
forEachElement( entry, m_element )
{
if ( entry.localName() == "config-item-map-entry" &&
entry.namespaceURI() == m_settings->m_configNSURI &&
- entry.attributeNS( m_settings->m_configNSURI, "name", QString::null ) == entryName )
+ entry.attributeNS( m_settings->m_configNSURI, "name", TQString() ) == entryName )
{
return Items( entry, m_settings );
}
}
- return Items( QDomElement(), m_settings );
+ return Items( TQDomElement(), m_settings );
}
// helper method
-QString KoOasisSettings::Items::findConfigItem( const QDomElement& element,
- const QString& item, bool* ok ) const
+TQString KoOasisSettings::Items::findConfigItem( const TQDomElement& element,
+ const TQString& item, bool* ok ) const
{
- QDomElement it;
+ TQDomElement it;
forEachElement( it, element )
{
if ( it.localName() == "config-item" &&
it.namespaceURI() == m_settings->m_configNSURI &&
- it.attributeNS( m_settings->m_configNSURI, "name", QString::null ) == item )
+ it.attributeNS( m_settings->m_configNSURI, "name", TQString() ) == item )
{
*ok = true;
return it.text();
}
}
*ok = false;
- return QString::null;
+ return TQString();
}
-QString KoOasisSettings::Items::findConfigItem( const QString& item, bool* ok ) const
+TQString KoOasisSettings::Items::findConfigItem( const TQString& item, bool* ok ) const
{
return findConfigItem( m_element, item, ok );
}
#if 0 // does anyone need this one? passing a default value does the job, too
-bool KoOasisSettings::Items::hasConfigItem( const QString& configName ) const
+bool KoOasisSettings::Items::hasConfigItem( const TQString& configName ) const
{
bool ok;
(void)findConfigItem( configName, &ok );
@@ -153,17 +153,17 @@ bool KoOasisSettings::Items::hasConfigItem( const QString& configName ) const
}
#endif
-QString KoOasisSettings::Items::parseConfigItemString( const QString& configName, const QString& defValue ) const
+TQString KoOasisSettings::Items::parseConfigItemString( const TQString& configName, const TQString& defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
return ok ? str : defValue;
}
-int KoOasisSettings::Items::parseConfigItemInt( const QString& configName, int defValue ) const
+int KoOasisSettings::Items::parseConfigItemInt( const TQString& configName, int defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
int value;
if ( ok ) {
value = str.toInt( &ok );
@@ -173,10 +173,10 @@ int KoOasisSettings::Items::parseConfigItemInt( const QString& configName, int d
return defValue;
}
-double KoOasisSettings::Items::parseConfigItemDouble( const QString& configName, double defValue ) const
+double KoOasisSettings::Items::parseConfigItemDouble( const TQString& configName, double defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
double value;
if ( ok ) {
value = str.toDouble( &ok );
@@ -186,10 +186,10 @@ double KoOasisSettings::Items::parseConfigItemDouble( const QString& configName,
return defValue;
}
-bool KoOasisSettings::Items::parseConfigItemBool( const QString& configName, bool defValue ) const
+bool KoOasisSettings::Items::parseConfigItemBool( const TQString& configName, bool defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
if ( str == "true" )
return true;
else if ( str == "false" )
@@ -197,10 +197,10 @@ bool KoOasisSettings::Items::parseConfigItemBool( const QString& configName, boo
return defValue;
}
-short KoOasisSettings::Items::parseConfigItemShort( const QString& configName, short defValue ) const
+short KoOasisSettings::Items::parseConfigItemShort( const TQString& configName, short defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
short value;
if ( ok ) {
value = str.toShort( &ok );
@@ -210,10 +210,10 @@ short KoOasisSettings::Items::parseConfigItemShort( const QString& configName, s
return defValue;
}
-long KoOasisSettings::Items::parseConfigItemLong( const QString& configName, long defValue ) const
+long KoOasisSettings::Items::parseConfigItemLong( const TQString& configName, long defValue ) const
{
bool ok;
- const QString str = findConfigItem( configName, &ok );
+ const TQString str = findConfigItem( configName, &ok );
long value;
if ( ok ) {
value = str.toLong( &ok );
diff --git a/lib/kofficecore/KoOasisSettings.h b/lib/kofficecore/KoOasisSettings.h
index cd1ae112..4a213ca4 100644
--- a/lib/kofficecore/KoOasisSettings.h
+++ b/lib/kofficecore/KoOasisSettings.h
@@ -22,7 +22,7 @@
#ifndef KOOASISSETTINGS_H
#define KOOASISSETTINGS_H
-#include <qdom.h>
+#include <tqdom.h>
#include <koffice_export.h>
/**
@@ -73,12 +73,12 @@ public:
/**
* Normal KoOasisSettings constructor, for an OASIS settings.xml
*/
- explicit KoOasisSettings( const QDomDocument& doc );
+ explicit KoOasisSettings( const TQDomDocument& doc );
/**
* KoOasisSettings constructor for an OpenOffice-1.1 file
*/
- KoOasisSettings( const QDomDocument& doc, const char* officeNSURI, const char* configNSURI );
+ KoOasisSettings( const TQDomDocument& doc, const char* officeNSURI, const char* configNSURI );
class Items;
@@ -86,7 +86,7 @@ public:
* Returns the toplevel item-set named @p itemSetName.
* If not found, the returned items instance is null.
*/
- Items itemSet( const QString& itemSetName ) const;
+ Items itemSet( const TQString& itemSetName ) const;
class IndexedMap;
class NamedMap;
@@ -96,7 +96,7 @@ public:
friend class KoOasisSettings;
friend class IndexedMap;
friend class NamedMap;
- Items( const QDomElement& elem, const KoOasisSettings* settings )
+ Items( const TQDomElement& elem, const KoOasisSettings* settings )
: m_element( elem ), m_settings( settings ) {}
public:
bool isNull() const { return m_element.isNull(); }
@@ -107,7 +107,7 @@ public:
* An indexed map is an array (or sequence), i.e. items are supposed to
* be retrieved by index. This is useful for e.g. "view 0", "view 1" etc.
*/
- IndexedMap indexedMap( const QString& itemMapName ) const;
+ IndexedMap indexedMap( const TQString& itemMapName ) const;
/**
* Look for the config-item-map-named named @p mapItemName and return it.
@@ -115,21 +115,21 @@ public:
* A named map is a map where items are retrieved by entry name, @see selectItemMapEntry
* @return false if no such map was found
*/
- NamedMap namedMap( const QString& itemMapName ) const;
-
- int parseConfigItemInt( const QString& configName, int defValue = 0 ) const;
- double parseConfigItemDouble( const QString& configName, double defValue = 0 ) const;
- QString parseConfigItemString( const QString& configName, const QString& defValue = QString::null ) const;
- bool parseConfigItemBool( const QString& configName, bool defValue = false ) const;
- short parseConfigItemShort( const QString& configName, short defValue = 0 ) const;
- long parseConfigItemLong( const QString& configName, long defValue = 0 ) const;
+ NamedMap namedMap( const TQString& itemMapName ) const;
+
+ int parseConfigItemInt( const TQString& configName, int defValue = 0 ) const;
+ double parseConfigItemDouble( const TQString& configName, double defValue = 0 ) const;
+ TQString parseConfigItemString( const TQString& configName, const TQString& defValue = TQString() ) const;
+ bool parseConfigItemBool( const TQString& configName, bool defValue = false ) const;
+ short parseConfigItemShort( const TQString& configName, short defValue = 0 ) const;
+ long parseConfigItemLong( const TQString& configName, long defValue = 0 ) const;
private:
/// @internal
- QString findConfigItem( const QString& item, bool* ok ) const;
+ TQString findConfigItem( const TQString& item, bool* ok ) const;
/// @internal
- QString findConfigItem( const QDomElement& element, const QString& item, bool* ok ) const;
+ TQString findConfigItem( const TQDomElement& element, const TQString& item, bool* ok ) const;
- QDomElement m_element;
+ TQDomElement m_element;
const KoOasisSettings* m_settings;
};
@@ -139,16 +139,16 @@ public:
public:
bool isNull() const { return m_element.isNull(); }
protected:
- Map( const QDomElement& elem, const KoOasisSettings* settings )
+ Map( const TQDomElement& elem, const KoOasisSettings* settings )
: m_element( elem ), m_settings( settings ) {}
- const QDomElement m_element;
+ const TQDomElement m_element;
const KoOasisSettings* m_settings;
};
class KOFFICECORE_EXPORT IndexedMap : public Map
{
friend class Items;
- IndexedMap( const QDomElement& elem, const KoOasisSettings* settings )
+ IndexedMap( const TQDomElement& elem, const KoOasisSettings* settings )
: Map( elem, settings ) {}
public:
/// Returns an entry in an indexed map
@@ -158,18 +158,18 @@ public:
class KOFFICECORE_EXPORT NamedMap : public Map
{
friend class Items;
- NamedMap( const QDomElement& elem, const KoOasisSettings* settings )
+ NamedMap( const TQDomElement& elem, const KoOasisSettings* settings )
: Map( elem, settings ) {}
public:
/// Returns an entry in a named map
- Items entry( const QString& entryName ) const;
+ Items entry( const TQString& entryName ) const;
};
private:
friend class Items;
friend class IndexedMap;
friend class NamedMap;
- const QDomElement m_settingsElement;
+ const TQDomElement m_settingsElement;
const char* m_configNSURI;
class Private;
diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp
index 1b7537ae..7eec46a5 100644
--- a/lib/kofficecore/KoOasisStore.cpp
+++ b/lib/kofficecore/KoOasisStore.cpp
@@ -29,9 +29,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qxml.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqxml.h>
+#include <tqbuffer.h>
KoOasisStore::KoOasisStore( KoStore* store )
: m_store( store ),
@@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter()
Q_ASSERT( !m_contentTmpFile );
m_contentTmpFile = new KTempFile;
m_contentTmpFile->setAutoDelete( true );
- m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 );
+ m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 );
}
return m_bodyWriter;
}
@@ -90,9 +90,9 @@ bool KoOasisStore::closeContentWriter()
delete m_bodyWriter; m_bodyWriter = 0;
// copy over the contents from the tempfile to the real one
- QFile* tmpFile = m_contentTmpFile->file();
+ TQFile* tmpFile = m_contentTmpFile->file();
tmpFile->close();
- m_contentWriter->addCompleteElement( tmpFile );
+ m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
m_contentTmpFile->close();
delete m_contentTmpFile; m_contentTmpFile = 0;
@@ -111,9 +111,9 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType )
if ( !m_manifestWriter )
{
// the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well
- QBuffer *manifestBuffer = new QBuffer;
+ TQBuffer *manifestBuffer = new TQBuffer;
manifestBuffer->open( IO_WriteOnly );
- m_manifestWriter = new KoXmlWriter( manifestBuffer );
+ m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) );
m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest );
@@ -126,39 +126,39 @@ bool KoOasisStore::closeManifestWriter()
{
m_manifestWriter->endElement();
m_manifestWriter->endDocument();
- QBuffer* buffer = static_cast<QBuffer *>( m_manifestWriter->device() );
+ TQBuffer* buffer = TQT_TQBUFFER( static_cast<QIODevice*>(m_manifestWriter->device()) );
delete m_manifestWriter; m_manifestWriter = 0;
bool ok = false;
if ( m_store->open( "META-INF/manifest.xml" ) )
{
- Q_LONG written = m_store->write( buffer->buffer() );
- ok = ( written == (Q_LONG)buffer->buffer().size() && m_store->close() );
+ TQ_LONG written = m_store->write( buffer->buffer() );
+ ok = ( written == (TQ_LONG)buffer->buffer().size() && m_store->close() );
}
delete buffer;
return ok;
}
-bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QString& errorMessage )
+bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, TQString& errorMessage )
{
//kdDebug(30003) << "loadAndParse: Trying to open " << fileName << endl;
if (!m_store->open(fileName))
{
kdWarning(30003) << "Entry " << fileName << " not found!" << endl;
- errorMessage = i18n( "Could not find %1" ).arg( fileName );
+ errorMessage = i18n( "Could not tqfind %1" ).tqarg( fileName );
return false;
}
- // Error variables for QDomDocument::setContent
- QString errorMsg;
+ // Error variables for TQDomDocument::setContent
+ TQString errorMsg;
int errorLine, errorColumn;
// We need to be able to see the space in <text:span> </text:span>, this is why
// we activate the "report-whitespace-only-CharData" feature.
// Unfortunately this leads to lots of whitespace text nodes in between real
// elements in the rest of the document, watch out for that.
- QXmlInputSource source( m_store->device() );
- // Copied from QDomDocumentPrivate::setContent, to change the whitespace thing
- QXmlSimpleReader reader;
+ TQXmlInputSource source( m_store->device() );
+ // Copied from TQDomDocumentPrivate::setContent, to change the whitespace thing
+ TQXmlSimpleReader reader;
KoDocument::setupXmlReader( reader, true /*namespaceProcessing*/ );
bool ok = doc.setContent( &source, &reader, &errorMsg, &errorLine, &errorColumn );
@@ -168,7 +168,7 @@ bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QSt
<< " In line: " << errorLine << ", column: " << errorColumn << endl
<< " Error message: " << errorMsg << endl;
errorMessage = i18n( "Parsing error in the main document at line %1, column %2\nError message: %3" )
- .arg( errorLine ).arg( errorColumn ).arg( i18n ( "QXml", errorMsg.utf8() ) );
+ .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ) );
}
else
{
@@ -178,17 +178,17 @@ bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QSt
return ok;
}
-QString KoOasisStore::mimeForPath( const QDomDocument& doc, const QString& fullPath )
+TQString KoOasisStore::mimeForPath( const TQDomDocument& doc, const TQString& fullPath )
{
- QDomElement docElem = doc.documentElement();
- QDomElement elem;
+ TQDomElement docElem = doc.documentElement();
+ TQDomElement elem;
forEachElement( elem, docElem )
{
if ( elem.localName() == "file-entry" && elem.namespaceURI() == KoXmlNS::manifest )
{
- if ( elem.attributeNS( KoXmlNS::manifest, "full-path", QString::null ) == fullPath )
- return elem.attributeNS( KoXmlNS::manifest, "media-type", QString::null );
+ if ( elem.attributeNS( KoXmlNS::manifest, "full-path", TQString() ) == fullPath )
+ return elem.attributeNS( KoXmlNS::manifest, "media-type", TQString() );
}
}
- return QString::null;
+ return TQString();
}
diff --git a/lib/kofficecore/KoOasisStore.h b/lib/kofficecore/KoOasisStore.h
index 506700b0..e33e9526 100644
--- a/lib/kofficecore/KoOasisStore.h
+++ b/lib/kofficecore/KoOasisStore.h
@@ -18,13 +18,13 @@
#ifndef KOOASISSTORE_H
#define KOOASISSTORE_H
-class QString;
-class QDomDocument;
+class TQString;
+class TQDomDocument;
class KTempFile;
class KoXmlWriter;
class KoStore;
class KoStoreDevice;
-class QIODevice;
+class TQIODevice;
/**
* Helper class around KoStore for writing out OASIS files.
@@ -79,10 +79,10 @@ public:
bool closeManifestWriter();
/// A completely unrelated method, for loading a file from an oasis store
- bool loadAndParse( const QString& fileName, QDomDocument& doc, QString& errorMessage );
+ bool loadAndParse( const TQString& fileName, TQDomDocument& doc, TQString& errorMessage );
/// Another method for loading: get mimetype from full path, using the manifest
- static QString mimeForPath( const QDomDocument& doc, const QString& fullPath );
+ static TQString mimeForPath( const TQDomDocument& doc, const TQString& fullPath );
private:
KoStore* m_store;
diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp
index 3a018767..d135a501 100644
--- a/lib/kofficecore/KoOasisStyles.cpp
+++ b/lib/kofficecore/KoOasisStyles.cpp
@@ -19,22 +19,22 @@
#include "KoOasisStyles.h"
#include <KoXmlWriter.h>
#include <kdebug.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "KoDom.h"
#include "KoXmlNS.h"
#include "KoGenStyles.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qbrush.h>
+#include <tqbrush.h>
#include <KoStyleStack.h>
class KoOasisStyles::Private
{
public:
// The key of the map is the family
- QMap<QString, QDict<QDomElement> > m_styles;
- QMap<QString, QDict<QDomElement> > m_stylesAutoStyles;
+ TQMap<TQString, TQDict<TQDomElement> > m_styles;
+ TQMap<TQString, TQDict<TQDomElement> > m_stylesAutoStyles;
};
KoOasisStyles::KoOasisStyles()
@@ -51,11 +51,11 @@ KoOasisStyles::~KoOasisStyles()
delete d;
}
-void KoOasisStyles::createStyleMap( const QDomDocument& doc, bool stylesDotXml )
+void KoOasisStyles::createStyleMap( const TQDomDocument& doc, bool stylesDotXml )
{
- const QDomElement docElement = doc.documentElement();
+ const TQDomElement docElement = doc.documentElement();
// We used to have the office:version check here, but better let the apps do that
- QDomElement fontStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "font-decls" );
+ TQDomElement fontStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "font-decls" );
if ( !fontStyles.isNull() ) {
//kdDebug(30003) << "Starting reading in font-decl..." << endl;
@@ -65,7 +65,7 @@ void KoOasisStyles::createStyleMap( const QDomDocument& doc, bool stylesDotXml )
//kdDebug(30003) << "Starting reading in office:automatic-styles. stylesDotXml=" << stylesDotXml << endl;
- QDomElement autoStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "automatic-styles" );
+ TQDomElement autoStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "automatic-styles" );
if ( !autoStyles.isNull() ) {
insertStyles( autoStyles, stylesDotXml );
}// else
@@ -74,17 +74,17 @@ void KoOasisStyles::createStyleMap( const QDomDocument& doc, bool stylesDotXml )
//kdDebug(30003) << "Reading in master styles" << endl;
- QDomNode masterStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "master-styles" );
+ TQDomNode masterStyles = KoDom::namedItemNS( docElement, KoXmlNS::office, "master-styles" );
if ( !masterStyles.isNull() ) {
- QDomElement master;
+ TQDomElement master;
forEachElement( master, masterStyles )
{
if ( master.localName() == "master-page" &&
master.namespaceURI() == KoXmlNS::style ) {
- const QString name = master.attributeNS( KoXmlNS::style, "name", QString::null );
+ const TQString name = master.attributeNS( KoXmlNS::style, "name", TQString() );
kdDebug(30003) << "Master style: '" << name << "' loaded " << endl;
- m_masterPages.insert( name, new QDomElement( master ) );
+ m_masterPages.insert( name, new TQDomElement( master ) );
} else
// OASIS docu mentions style:handout-master and draw:layer-set here
kdWarning(30003) << "Unknown tag " << master.tagName() << " in office:master-styles" << endl;
@@ -94,7 +94,7 @@ void KoOasisStyles::createStyleMap( const QDomDocument& doc, bool stylesDotXml )
kdDebug(30003) << "Starting reading in office:styles" << endl;
- const QDomElement officeStyle = KoDom::namedItemNS( docElement, KoXmlNS::office, "styles" );
+ const TQDomElement officeStyle = KoDom::namedItemNS( docElement, KoXmlNS::office, "styles" );
if ( !officeStyle.isNull() ) {
m_officeStyle = officeStyle;
@@ -105,12 +105,12 @@ void KoOasisStyles::createStyleMap( const QDomDocument& doc, bool stylesDotXml )
//kdDebug(30003) << "Styles read in." << endl;
}
-QValueVector<QDomElement> KoOasisStyles::userStyles() const
+TQValueVector<TQDomElement> KoOasisStyles::userStyles() const
{
- QValueVector<QDomElement> vec;
+ TQValueVector<TQDomElement> vec;
// Collect user styles
unsigned int i = 0;
- QDomElement e;
+ TQDomElement e;
forEachElement( e, m_officeStyle )
{
if ( e.localName() == "style" &&
@@ -123,20 +123,20 @@ QValueVector<QDomElement> KoOasisStyles::userStyles() const
return vec;
}
-const QDict<QDomElement>& KoOasisStyles::styles(const QString& family) const
+const TQDict<TQDomElement>& KoOasisStyles::styles(const TQString& family) const
{
// hmm this can create an empty item in the map, but otherwise we couldn't
// return a const reference.
return d->m_styles[family];
}
-void KoOasisStyles::insertOfficeStyles( const QDomElement& styles )
+void KoOasisStyles::insertOfficeStyles( const TQDomElement& styles )
{
- QDomElement e;
+ TQDomElement e;
forEachElement( e, styles )
{
- const QString localName = e.localName();
- const QString ns = e.namespaceURI();
+ const TQString localName = e.localName();
+ const TQString ns = e.namespaceURI();
if ( ( ns == KoXmlNS::svg && (
localName == "linearGradient"
|| localName == "radialGradient" ) )
@@ -149,9 +149,9 @@ void KoOasisStyles::insertOfficeStyles( const QDomElement& styles )
|| localName == "opacity" ) )
)
{
- const QString name = e.attributeNS( KoXmlNS::draw, "name", QString::null );
+ const TQString name = e.attributeNS( KoXmlNS::draw, "name", TQString() );
Q_ASSERT( !name.isEmpty() );
- QDomElement* ep = new QDomElement( e );
+ TQDomElement* ep = new TQDomElement( e );
m_drawStyles.insert( name, ep );
}
else
@@ -160,53 +160,53 @@ void KoOasisStyles::insertOfficeStyles( const QDomElement& styles )
}
-void KoOasisStyles::insertStyles( const QDomElement& styles, bool styleAutoStyles )
+void KoOasisStyles::insertStyles( const TQDomElement& styles, bool styleAutoStyles )
{
//kdDebug(30003) << "Inserting styles from " << styles.tagName() << endl;
- QDomElement e;
+ TQDomElement e;
forEachElement( e, styles )
insertStyle( e, styleAutoStyles );
}
-void KoOasisStyles::insertStyle( const QDomElement& e, bool styleAutoStyles )
+void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles )
{
- const QString localName = e.localName();
- const QString ns = e.namespaceURI();
+ const TQString localName = e.localName();
+ const TQString ns = e.namespaceURI();
- const QString name = e.attributeNS( KoXmlNS::style, "name", QString::null );
+ const TQString name = e.attributeNS( KoXmlNS::style, "name", TQString() );
if ( ns == KoXmlNS::style && localName == "style" ) {
- const QString family = e.attributeNS( KoXmlNS::style, "family", QString::null );
+ const TQString family = e.attributeNS( KoXmlNS::style, "family", TQString() );
if ( styleAutoStyles ) {
- QDict<QDomElement>& dict = d->m_stylesAutoStyles[ family ];
+ TQDict<TQDomElement>& dict = d->m_stylesAutoStyles[ family ];
dict.setAutoDelete( true );
- if ( dict.find( name ) != 0 )
+ if ( dict.tqfind( name ) != 0 )
kdDebug(30003) << "Auto-style: '" << name << "' already exists" << endl;
- dict.insert( name, new QDomElement( e ) );
+ dict.insert( name, new TQDomElement( e ) );
//kdDebug(30003) << "Style: '" << name << "' loaded as a style auto style" << endl;
} else {
- QDict<QDomElement>& dict = d->m_styles[ family ];
+ TQDict<TQDomElement>& dict = d->m_styles[ family ];
dict.setAutoDelete( true );
- if ( dict.find( name ) != 0 )
+ if ( dict.tqfind( name ) != 0 )
kdDebug(30003) << "Style: '" << name << "' already exists" << endl;
- dict.insert( name, new QDomElement( e ) );
+ dict.insert( name, new TQDomElement( e ) );
//kdDebug(30003) << "Style: '" << name << "' loaded " << endl;
}
} else if ( ns == KoXmlNS::style && (
- localName == "page-layout"
+ localName == "page-tqlayout"
|| localName == "font-decl"
- || localName == "presentation-page-layout" ) )
+ || localName == "presentation-page-tqlayout" ) )
{
- if ( m_styles.find( name ) != 0 )
+ if ( m_styles.tqfind( name ) != 0 )
kdDebug(30003) << "Style: '" << name << "' already exists" << endl;
- m_styles.insert( name, new QDomElement( e ) );
+ m_styles.insert( name, new TQDomElement( e ) );
} else if ( localName == "default-style" && ns == KoXmlNS::style ) {
- const QString family = e.attributeNS( KoXmlNS::style, "family", QString::null );
+ const TQString family = e.attributeNS( KoXmlNS::style, "family", TQString() );
if ( !family.isEmpty() )
- m_defaultStyle.insert( family, new QDomElement( e ) );
+ m_defaultStyle.insert( family, new TQDomElement( e ) );
} else if ( localName == "list-style" && ns == KoXmlNS::text ) {
- m_listStyles.insert( name, new QDomElement( e ) );
+ m_listStyles.insert( name, new TQDomElement( e ) );
//kdDebug(30003) << "List style: '" << name << "' loaded " << endl;
} else if ( ns == KoXmlNS::number && (
localName == "number-style"
@@ -221,14 +221,14 @@ void KoOasisStyles::insertStyle( const QDomElement& e, bool styleAutoStyles )
// The rest (text:*-configuration and text:outline-style) is to be done by the apps.
}
-// OO spec 2.5.4. p68. Conversion to Qt format: see qdate.html
+// OO spec 2.5.4. p68. Conversion to TQt format: see qdate.html
// OpenCalcImport::loadFormat has similar code, but slower, intermixed with other stuff,
// lacking long-textual forms.
-void KoOasisStyles::importDataStyle( const QDomElement& parent )
+void KoOasisStyles::importDataStyle( const TQDomElement& tqparent )
{
NumericStyleFormat dataStyle;
- const QString localName = parent.localName();
+ const TQString localName = tqparent.localName();
if (localName == "number-style")
dataStyle.type = NumericStyleFormat::Number;
else if (localName == "currency-style")
@@ -244,7 +244,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
else if (localName == "time-style")
dataStyle.type = NumericStyleFormat::Time;
- QString format;
+ TQString format;
int precision = -1;
int leadingZ = 1;
bool thousandsSep = false;
@@ -252,26 +252,26 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
//bool negRed = false;
bool ok = false;
int i = 0;
- QDomElement e;
- QString prefix;
- QString suffix;
- forEachElement( e, parent )
+ TQDomElement e;
+ TQString prefix;
+ TQString suffix;
+ forEachElement( e, tqparent )
{
if ( e.namespaceURI() != KoXmlNS::number )
continue;
- QString localName = e.localName();
- const QString numberStyle = e.attributeNS( KoXmlNS::number, "style", QString::null );
+ TQString localName = e.localName();
+ const TQString numberStyle = e.attributeNS( KoXmlNS::number, "style", TQString() );
const bool shortForm = numberStyle == "short" || numberStyle.isEmpty();
if ( localName == "day" ) {
format += shortForm ? "d" : "dd";
} else if ( localName == "day-of-week" ) {
format += shortForm ? "ddd" : "dddd";
} else if ( localName == "month" ) {
- if ( e.attributeNS( KoXmlNS::number, "possessive-form", QString::null ) == "true" ) {
+ if ( e.attributeNS( KoXmlNS::number, "possessive-form", TQString() ) == "true" ) {
format += shortForm ? "PPP" : "PPPP";
}
// TODO the spec has a strange mention of number:format-source
- else if ( e.attributeNS( KoXmlNS::number, "textual", QString::null ) == "true" ) {
+ else if ( e.attributeNS( KoXmlNS::number, "textual", TQString() ) == "true" ) {
format += shortForm ? "MMM" : "MMMM";
} else { // month number
format += shortForm ? "M" : "MM";
@@ -281,7 +281,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
} else if ( localName == "era" ) {
//TODO I don't know what is it... (define into oo spec)
} else if ( localName == "week-of-year" || localName == "quarter") {
- // ### not supported in Qt
+ // ### not supported in TQt
} else if ( localName == "hours" ) {
format += shortForm ? "h" : "hh";
} else if ( localName == "minutes" ) {
@@ -309,13 +309,13 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
// TODO: number:grouping="true"
if ( e.hasAttributeNS( KoXmlNS::number, "decimal-places" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "decimal-places", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "decimal-places", TQString() ).toInt( &ok );
if ( ok )
precision = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "min-integer-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", TQString() ).toInt( &ok );
if ( ok )
leadingZ = d;
}
@@ -345,21 +345,21 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
if ( e.hasAttributeNS( KoXmlNS::number, "decimal-places" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "decimal-places", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "decimal-places", TQString() ).toInt( &ok );
if ( ok )
precision = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "min-integer-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", TQString() ).toInt( &ok );
if ( ok )
leadingZ = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "min-exponent-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-exponent-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-exponent-digits", TQString() ).toInt( &ok );
if ( ok )
exp = d;
if ( exp <= 0 )
@@ -399,25 +399,25 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
int denominatorValue=0;
if ( e.hasAttributeNS( KoXmlNS::number, "min-integer-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-integer-digits", TQString() ).toInt( &ok );
if ( ok )
integer = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "min-numerator-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-numerator-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-numerator-digits", TQString() ).toInt( &ok );
if ( ok )
numerator = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "min-denominator-digits" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "min-denominator-digits", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "min-denominator-digits", TQString() ).toInt( &ok );
if ( ok )
denominator = d;
}
if ( e.hasAttributeNS( KoXmlNS::number, "denominator-value" ) )
{
- int d = e.attributeNS( KoXmlNS::number, "denominator-value", QString::null ).toInt( &ok );
+ int d = e.attributeNS( KoXmlNS::number, "denominator-value", TQString() ).toInt( &ok );
if ( ok )
denominatorValue = d;
}
@@ -433,7 +433,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
format+='/';
if ( denominatorValue != 0 )
- format+=QString::number( denominatorValue );
+ format+=TQString::number( denominatorValue );
else
{
for ( i = 0; i < denominator; ++i )
@@ -446,7 +446,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
}
- const QString styleName = parent.attributeNS( KoXmlNS::style, "name", QString::null );
+ const TQString styleName = tqparent.attributeNS( KoXmlNS::style, "name", TQString() );
kdDebug(30003) << "data style: " << styleName << " qt format=" << format << endl;
if ( !prefix.isEmpty() )
{
@@ -456,7 +456,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
format = format.right( format.length()-prefix.length() );
}
else
- prefix = QString::null;
+ prefix = TQString();
}
if ( !suffix.isEmpty() )
{
@@ -466,7 +466,7 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
format = format.left( format.length()-suffix.length() );
}
else
- suffix = QString::null;
+ suffix = TQString();
}
dataStyle.formatStr = format;
@@ -487,9 +487,9 @@ void KoOasisStyles::importDataStyle( const QDomElement& parent )
} \
}
-void KoOasisStyles::parseOasisTimeKlocale(KoXmlWriter &elementWriter, QString & format, QString & text )
+void KoOasisStyles::parseOasisTimeKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text )
{
- kdDebug(30003)<<"parseOasisTimeKlocale(KoXmlWriter &elementWriter, QString & format, QString & text ) :"<<format<<endl;
+ kdDebug(30003)<<"parseOasisTimeKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text ) :"<<format<<endl;
do
{
if ( !saveOasisKlocaleTimeFormat( elementWriter, format, text ) )
@@ -502,7 +502,7 @@ void KoOasisStyles::parseOasisTimeKlocale(KoXmlWriter &elementWriter, QString &
addTextNumber( text, elementWriter );
}
-bool KoOasisStyles::saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text )
+bool KoOasisStyles::saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text )
{
bool changed = false;
if ( format.startsWith( "%H" ) ) //hh
@@ -571,7 +571,7 @@ bool KoOasisStyles::saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, QStr
}
-bool KoOasisStyles::saveOasisTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text, bool &antislash )
+bool KoOasisStyles::saveOasisTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text, bool &antislash )
{
bool changed = false;
//we can also add time to date.
@@ -654,18 +654,18 @@ bool KoOasisStyles::saveOasisTimeFormat( KoXmlWriter &elementWriter, QString & f
return changed;
}
-QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString & _prefix, const QString & _suffix )
+TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString & _prefix, const TQString & _suffix )
{
Q_UNUSED(_prefix);
Q_UNUSED(_suffix);
- kdDebug(30003)<<"QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
if ( klocaleFormat )
{
parseOasisTimeKlocale( elementWriter, format, text );
@@ -677,7 +677,7 @@ QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QStrin
{
if ( !saveOasisTimeFormat( elementWriter, format, text, antislash ) )
{
- QString elem( format[0] );
+ TQString elem( format[0] );
format = format.remove( 0, 1 );
if ( elem == "\\" )
{
@@ -693,15 +693,15 @@ QString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const QStrin
while ( format.length() > 0 );
addTextNumber( text, elementWriter );
}
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
//convert klocale string to good format
-void KoOasisStyles::parseOasisDateKlocale(KoXmlWriter &elementWriter, QString & format, QString & text )
+void KoOasisStyles::parseOasisDateKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text )
{
- kdDebug(30003)<<"KoOasisStyles::parseOasisDateKlocale(KoXmlWriter &elementWriter, QString & format, QString & text ) :"<<format<<endl;
+ kdDebug(30003)<<"KoOasisStyles::parseOasisDateKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text ) :"<<format<<endl;
do
{
if ( format.startsWith( "%Y" ) )
@@ -806,21 +806,21 @@ void KoOasisStyles::parseOasisDateKlocale(KoXmlWriter &elementWriter, QString &
addTextNumber( text, elementWriter );
}
-QString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString & _prefix, const QString & _suffix )
+TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString & _prefix, const TQString & _suffix )
{
Q_UNUSED(_prefix);
Q_UNUSED(_suffix);
- kdDebug(30003)<<"QString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
- // Not supported into Qt: "era" "week-of-year" "quarter"
+ // Not supported into TQt: "era" "week-of-year" "quarter"
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
if ( klocaleFormat )
{
parseOasisDateKlocale( elementWriter, format, text );
@@ -961,7 +961,7 @@ QString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const QStrin
{
if ( !saveOasisTimeFormat( elementWriter, format, text,antislash ) )
{
- QString elem( format[0] );
+ TQString elem( format[0] );
format = format.remove( 0, 1 );
if ( elem == "\\" )
{
@@ -979,22 +979,22 @@ QString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const QStrin
addTextNumber( text, elementWriter );
}
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const QString & _format, const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &_prefix, const TQString &_suffix )
{
- kdDebug(30003)<<"QString saveOasisFractionStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisFractionStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
int integer = 0;
int numerator = 0;
int denominator = 0;
@@ -1043,22 +1043,22 @@ QString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const QS
text=_suffix;
addTextNumber(text, elementWriter );
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const QString & _format, const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &_prefix, const TQString &_suffix )
{
- kdDebug(30003)<<"QString saveOasisNumberStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisNumberStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
int decimalplaces = 0;
int integerdigits = 0;
bool beforeSeparator = true;
@@ -1088,26 +1088,26 @@ QString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const QStr
addTextNumber(text, elementWriter );
addKofficeNumericStyleExtension( elementWriter, _suffix,_prefix );
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const QString & _format, const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &_prefix, const TQString &_suffix )
{
//<number:percentage-style style:name="N11">
//<number:number number:decimal-places="2" number:min-integer-digits="1"/>
//<number:text>%</number:text>
//</number:percentage-style>
- kdDebug(30003)<<"QString saveOasisPercentageStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisPercentageStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
int decimalplaces = 0;
int integerdigits = 0;
bool beforeSeparator = true;
@@ -1132,36 +1132,36 @@ QString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const
elementWriter.addAttribute( "number:min-integer-digits", integerdigits );
elementWriter.endElement();
- addTextNumber(QString( "%" ), elementWriter );
+ addTextNumber(TQString( "%" ), elementWriter );
text =_suffix ;
addTextNumber(text, elementWriter );
addKofficeNumericStyleExtension( elementWriter, _suffix,_prefix );
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const QString & _format, const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &_prefix, const TQString &_suffix )
{
//<number:number-style style:name="N60">
//<number:scientific-number number:decimal-places="2" number:min-integer-digits="1" number:min-exponent-digits="3"/>
//</number:number-style>
//example 000,000e+0000
- kdDebug(30003)<<"QString saveOasisScientificStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisScientificStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_SCIENTIFIC );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
int decimalplace = 0;
int integerdigits = 0;
int exponentdigits = 0;
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
bool beforeSeparator = true;
bool exponential = false;
bool positive = true;
@@ -1214,14 +1214,14 @@ QString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const
addTextNumber(text, elementWriter );
addKofficeNumericStyleExtension( elementWriter, _suffix,_prefix );
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
- const QString & _format, const QString &symbol,
- const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
+ const TQString & _format, const TQString &symbol,
+ const TQString &_prefix, const TQString &_suffix )
{
//<number:currency-style style:name="N107P0" style:volatile="true">
@@ -1230,14 +1230,14 @@ QString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
//<number:currency-symbol>VEB</number:currency-symbol>
//</number:currency-style>
- kdDebug(30003)<<"QString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
int decimalplaces = 0;
int integerdigits = 0;
bool beforeSeparator = true;
@@ -1274,26 +1274,26 @@ QString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
elementWriter.addTextNode( symbol.utf8() );
elementWriter.endElement();
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
-QString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const QString & _format, const QString &_prefix, const QString &_suffix )
+TQString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &_prefix, const TQString &_suffix )
{
//<number:text-style style:name="N100">
//<number:text-content/>
///</number:text-style>
- kdDebug(30003)<<"QString saveOasisTextStyle( KoGenStyles &mainStyles, const QString & _format ) :"<<_format<<endl;
- QString format( _format );
+ kdDebug(30003)<<"TQString saveOasisTextStyle( KoGenStyles &mainStyles, const TQString & _format ) :"<<_format<<endl;
+ TQString format( _format );
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
- QString text;
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
+ TQString text;
do
{
format.remove( 0,1 );
@@ -1309,13 +1309,13 @@ QString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const QStrin
addKofficeNumericStyleExtension( elementWriter, _suffix,_prefix );
elementWriter.endElement();
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
currentStyle.addChildElement( "number", elementContents );
return mainStyles.lookup( currentStyle, "N" );
}
//This is an extension of numeric style. For the moment we used namespace of oasis format for specific koffice extention. change it for the futur.
-void KoOasisStyles::addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const QString &_suffix, const QString &_prefix )
+void KoOasisStyles::addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const TQString &_suffix, const TQString &_prefix )
{
if ( !_suffix.isEmpty() )
{
@@ -1331,50 +1331,50 @@ void KoOasisStyles::addKofficeNumericStyleExtension( KoXmlWriter & elementWriter
}
}
-void KoOasisStyles::saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const QBrush & brush )
+void KoOasisStyles::saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const TQBrush & brush )
{
- if ( brush.style() == Qt::SolidPattern )
+ if ( brush.style() == TQt::SolidPattern )
{
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense1Pattern )
+ else if ( brush.style() == TQt::Dense1Pattern )
{
styleFill.addProperty( "draw:transparency", "94%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense2Pattern )
+ else if ( brush.style() == TQt::Dense2Pattern )
{
styleFill.addProperty( "draw:transparency", "88%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense3Pattern )
+ else if ( brush.style() == TQt::Dense3Pattern )
{
styleFill.addProperty( "draw:transparency", "63%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense4Pattern )
+ else if ( brush.style() == TQt::Dense4Pattern )
{
styleFill.addProperty( "draw:transparency", "50%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense5Pattern )
+ else if ( brush.style() == TQt::Dense5Pattern )
{
styleFill.addProperty( "draw:transparency", "37%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense6Pattern )
+ else if ( brush.style() == TQt::Dense6Pattern )
{
styleFill.addProperty( "draw:transparency", "12%" );
styleFill.addProperty( "draw:fill","solid" );
styleFill.addProperty( "draw:fill-color", brush.color().name() );
}
- else if ( brush.style() == Qt::Dense7Pattern )
+ else if ( brush.style() == TQt::Dense7Pattern )
{
styleFill.addProperty( "draw:transparency", "6%" );
styleFill.addProperty( "draw:fill","solid" );
@@ -1388,34 +1388,34 @@ void KoOasisStyles::saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& main
}
-QString KoOasisStyles::saveOasisHatchStyle( KoGenStyles& mainStyles, const QBrush &brush )
+TQString KoOasisStyles::saveOasisHatchStyle( KoGenStyles& mainStyles, const TQBrush &brush )
{
KoGenStyle hatchStyle( KoGenStyle::STYLE_HATCH /*no family name*/);
hatchStyle.addAttribute( "draw:color", brush.color().name() );
//hatchStyle.addAttribute( "draw:distance", m_distance ); not implemented into kpresenter
switch( brush.style() )
{
- case Qt::HorPattern:
+ case TQt::HorPattern:
hatchStyle.addAttribute( "draw:style", "single" );
hatchStyle.addAttribute( "draw:rotation", 0);
break;
- case Qt::BDiagPattern:
+ case TQt::BDiagPattern:
hatchStyle.addAttribute( "draw:style", "single" );
hatchStyle.addAttribute( "draw:rotation", 450);
break;
- case Qt::VerPattern:
+ case TQt::VerPattern:
hatchStyle.addAttribute( "draw:style", "single" );
hatchStyle.addAttribute( "draw:rotation", 900);
break;
- case Qt::FDiagPattern:
+ case TQt::FDiagPattern:
hatchStyle.addAttribute( "draw:style", "single" );
hatchStyle.addAttribute( "draw:rotation", 1350);
break;
- case Qt::CrossPattern:
+ case TQt::CrossPattern:
hatchStyle.addAttribute( "draw:style", "double" );
hatchStyle.addAttribute( "draw:rotation", 0);
break;
- case Qt::DiagCrossPattern:
+ case TQt::DiagCrossPattern:
hatchStyle.addAttribute( "draw:style", "double" );
hatchStyle.addAttribute( "draw:rotation", 450);
break;
@@ -1426,9 +1426,9 @@ QString KoOasisStyles::saveOasisHatchStyle( KoGenStyles& mainStyles, const QBrus
return mainStyles.lookup( hatchStyle, "hatch" );
}
-QBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const QString & fill, const KoOasisStyles & oasisStyles )
+TQBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const TQString & fill, const KoOasisStyles & oasisStyles )
{
- QBrush tmpBrush;
+ TQBrush tmpBrush;
if ( fill == "solid" )
{
tmpBrush.setStyle(static_cast<Qt::BrushStyle>( 1 ) );
@@ -1436,7 +1436,7 @@ QBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
tmpBrush.setColor(styleStack.attributeNS( KoXmlNS::draw, "fill-color" ) );
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "transparency" ) )
{
- QString transparency = styleStack.attributeNS( KoXmlNS::draw, "transparency" );
+ TQString transparency = styleStack.attributeNS( KoXmlNS::draw, "transparency" );
if ( transparency == "94%" )
{
tmpBrush.setStyle(Qt::Dense1Pattern);
@@ -1476,25 +1476,25 @@ QBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
}
else if ( fill == "hatch" )
{
- QString style = styleStack.attributeNS( KoXmlNS::draw, "fill-hatch-name" );
+ TQString style = styleStack.attributeNS( KoXmlNS::draw, "fill-hatch-name" );
kdDebug()<<" hatch style is : "<<style<<endl;
//type not defined by default
//try to use style.
- QDomElement* draw = oasisStyles.drawStyles()[style];
+ TQDomElement* draw = oasisStyles.drawStyles()[style];
if ( draw)
{
kdDebug()<<"We have a style\n";
int angle = 0;
if( draw->hasAttributeNS( KoXmlNS::draw, "rotation" ))
{
- angle = (draw->attributeNS( KoXmlNS::draw, "rotation", QString::null ).toInt())/10;
+ angle = (draw->attributeNS( KoXmlNS::draw, "rotation", TQString() ).toInt())/10;
kdDebug()<<"angle :"<<angle<<endl;
}
if(draw->hasAttributeNS( KoXmlNS::draw, "color" ) )
{
- //kdDebug()<<" draw:color :"<<draw->attributeNS( KoXmlNS::draw, "color", QString::null )<<endl;
- tmpBrush.setColor(draw->attributeNS( KoXmlNS::draw, "color", QString::null ) );
+ //kdDebug()<<" draw:color :"<<draw->attributeNS( KoXmlNS::draw, "color", TQString() )<<endl;
+ tmpBrush.setColor(draw->attributeNS( KoXmlNS::draw, "color", TQString() ) );
}
if( draw->hasAttributeNS( KoXmlNS::draw, "distance" ))
{
@@ -1507,7 +1507,7 @@ QBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
if( draw->hasAttributeNS( KoXmlNS::draw, "style" ))
{
//todo implemente it into kpresenter
- QString styleHash = draw->attributeNS( KoXmlNS::draw, "style", QString::null );
+ TQString styleHash = draw->attributeNS( KoXmlNS::draw, "style", TQString() );
if( styleHash == "single")
{
switch( angle )
@@ -1567,21 +1567,21 @@ QBrush KoOasisStyles::loadOasisFillStyle( const KoStyleStack &styleStack, const
return tmpBrush;
}
-const QDomElement* KoOasisStyles::defaultStyle( const QString& family ) const
+const TQDomElement* KoOasisStyles::defaultStyle( const TQString& family ) const
{
return m_defaultStyle[family];
}
-const QDomElement* KoOasisStyles::findStyle( const QString& name ) const
+const TQDomElement* KoOasisStyles::findStyle( const TQString& name ) const
{
return m_styles[ name ];
}
-const QDomElement* KoOasisStyles::findStyle( const QString& styleName, const QString& family ) const
+const TQDomElement* KoOasisStyles::findStyle( const TQString& styleName, const TQString& family ) const
{
- const QDomElement* style = d->m_styles[ family ][ styleName ];
+ const TQDomElement* style = d->m_styles[ family ][ styleName ];
if ( style && !family.isEmpty() ) {
- const QString styleFamily = style->attributeNS( KoXmlNS::style, "family", QString::null );
+ const TQString styleFamily = style->attributeNS( KoXmlNS::style, "family", TQString() );
if ( styleFamily != family ) {
kdWarning() << "KoOasisStyles: was looking for style " << styleName
<< " in family " << family << " but got " << styleFamily << endl;
@@ -1590,11 +1590,11 @@ const QDomElement* KoOasisStyles::findStyle( const QString& styleName, const QSt
return style;
}
-const QDomElement* KoOasisStyles::findStyleAutoStyle( const QString& styleName, const QString& family ) const
+const TQDomElement* KoOasisStyles::findStyleAutoStyle( const TQString& styleName, const TQString& family ) const
{
- const QDomElement* style = d->m_stylesAutoStyles[ family ][ styleName ];
+ const TQDomElement* style = d->m_stylesAutoStyles[ family ][ styleName ];
if ( style ) {
- const QString styleFamily = style->attributeNS( KoXmlNS::style, "family", QString::null );
+ const TQString styleFamily = style->attributeNS( KoXmlNS::style, "family", TQString() );
if ( styleFamily != family ) {
kdWarning() << "KoOasisStyles: was looking for style " << styleName
<< " in family " << family << " but got " << styleFamily << endl;
diff --git a/lib/kofficecore/KoOasisStyles.h b/lib/kofficecore/KoOasisStyles.h
index caa8d513..9a8e64e4 100644
--- a/lib/kofficecore/KoOasisStyles.h
+++ b/lib/kofficecore/KoOasisStyles.h
@@ -19,15 +19,15 @@
#ifndef KOOASISSTYLES_H
#define KOOASISSTYLES_H
-#include <qdom.h>
-#include <qdict.h>
-#include <qvaluevector.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqdict.h>
+#include <tqvaluevector.h>
+#include <tqmap.h>
#include <koffice_export.h>
class KoGenStyles;
class KoXmlWriter;
-class QBrush;
+class TQBrush;
class KoGenStyle;
class KoStyleStack;
@@ -43,119 +43,119 @@ public:
/// Look into @p doc for styles and remember them
/// @param doc document to look into
/// @param stylesDotXml true when loading styles.xml, false otherwise
- void createStyleMap( const QDomDocument& doc, bool stylesDotXml );
+ void createStyleMap( const TQDomDocument& doc, bool stylesDotXml );
/**
* Look up a style by name.
- * This method can find styles defined by the tags "style:page-layout",
- * "style:presentation-page-layout", or "style:font-decl".
+ * This method can find styles defined by the tags "style:page-tqlayout",
+ * "style:presentation-page-tqlayout", or "style:font-decl".
* Do NOT use this method for style:style styles.
*
* @param name the style name
- * @return the dom element representing the style, or QString::null if it wasn't found.
+ * @return the dom element representing the style, or TQString() if it wasn't found.
*/
- const QDomElement* findStyle( const QString& name ) const;
+ const TQDomElement* findStyle( const TQString& name ) const;
/**
* Look up a style:style by name.
* @param name the style name
* @param family the style family (for a style:style, use 0 otherwise)
- * @return the dom element representing the style, or QString::null if it wasn't found.
+ * @return the dom element representing the style, or TQString() if it wasn't found.
*/
- const QDomElement* findStyle( const QString& name, const QString& family ) const;
+ const TQDomElement* findStyle( const TQString& name, const TQString& family ) const;
/// Similar to findStyle but for auto-styles in styles.xml only.
- const QDomElement* findStyleAutoStyle( const QString& name, const QString& family ) const;
+ const TQDomElement* findStyleAutoStyle( const TQString& name, const TQString& family ) const;
/// @return the style:styles that are "user styles", i.e. those from office:styles
/// findStyle() is used for lookup. userStyles() is used to load all user styles upfront.
- QValueVector<QDomElement> userStyles() const;
+ TQValueVector<TQDomElement> userStyles() const;
/// @return the default style for a given family ("graphic","paragraph","table" etc.)
/// Returns 0 if no default style for this family is available
- const QDomElement* defaultStyle( const QString& family ) const;
+ const TQDomElement* defaultStyle( const TQString& family ) const;
/// @return the office:style element
- const QDomElement& officeStyle() const { return m_officeStyle; }
+ const TQDomElement& officeStyle() const { return m_officeStyle; }
/// @return all list styles ("text:list-style" elements), hashed by name
- const QDict<QDomElement>& listStyles() const { return m_listStyles; }
+ const TQDict<TQDomElement>& listStyles() const { return m_listStyles; }
/// @return master pages ("style:master-page" elements), hashed by name
- const QDict<QDomElement>& masterPages() const { return m_masterPages; }
+ const TQDict<TQDomElement>& masterPages() const { return m_masterPages; }
/// @return draw styles, hashed by name
- const QDict<QDomElement>& drawStyles() const { return m_drawStyles; }
+ const TQDict<TQDomElement>& drawStyles() const { return m_drawStyles; }
/// @return all styles ("style:style" elements) for a given family, hashed by name
- const QDict<QDomElement>& styles(const QString& family) const;
+ const TQDict<TQDomElement>& styles(const TQString& family) const;
/// Prefix and suffix are always included into formatStr. Having them as separate fields simply
/// allows to extract them from formatStr, to display them in separate widgets.
struct NumericStyleFormat
{
- QString formatStr;
- QString prefix;
- QString suffix;
+ TQString formatStr;
+ TQString prefix;
+ TQString suffix;
enum { Number, Scientific, Fraction, Currency, Percentage,
Date, Time, Boolean, Text } type;
int precision;
- QString currencySymbol;
+ TQString currencySymbol;
};
- typedef QMap<QString, NumericStyleFormat> DataFormatsMap;
+ typedef TQMap<TQString, NumericStyleFormat> DataFormatsMap;
/// Value (date/time/number...) formats found while parsing styles. Used e.g. for fields.
/// Key: format name. Value:
const DataFormatsMap& dataFormats() const { return m_dataFormats; }
- static QString saveOasisDateStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisTimeStyle( KoGenStyles &mainStyles, const QString & _format, bool klocaleFormat,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisFractionStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisScientificStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisNumberStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisPercentageStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const QString & _format, const QString &symbol,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
- static QString saveOasisTextStyle( KoGenStyles &mainStyles, const QString & _format,
- const QString &_prefix = QString::null , const QString &_suffix= QString::null );
-
- static void saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const QBrush & brush );
- static QString saveOasisHatchStyle( KoGenStyles& mainStyles, const QBrush &brush );
-
- static QBrush loadOasisFillStyle( const KoStyleStack &styleStack, const QString & fill, const KoOasisStyles & oasisStyles );
+ static TQString saveOasisDateStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisTimeStyle( KoGenStyles &mainStyles, const TQString & _format, bool klocaleFormat,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisFractionStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisScientificStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisNumberStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisPercentageStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisCurrencyStyle( KoGenStyles &mainStyles, const TQString & _format, const TQString &symbol,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+ static TQString saveOasisTextStyle( KoGenStyles &mainStyles, const TQString & _format,
+ const TQString &_prefix = TQString() , const TQString &_suffix= TQString() );
+
+ static void saveOasisFillStyle( KoGenStyle &styleFill, KoGenStyles& mainStyles, const TQBrush & brush );
+ static TQString saveOasisHatchStyle( KoGenStyles& mainStyles, const TQBrush &brush );
+
+ static TQBrush loadOasisFillStyle( const KoStyleStack &styleStack, const TQString & fill, const KoOasisStyles & oasisStyles );
private:
/// Add styles to styles map
- void insertStyles( const QDomElement& styles, bool styleAutoStyles = false );
+ void insertStyles( const TQDomElement& styles, bool styleAutoStyles = false );
private:
- void insertOfficeStyles( const QDomElement& styles );
- void insertStyle( const QDomElement& style, bool styleAutoStyles );
- void importDataStyle( const QDomElement& parent );
- static bool saveOasisTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text, bool &antislash );
- static void parseOasisDateKlocale(KoXmlWriter &elementWriter, QString & format, QString & text );
- static bool saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, QString & format, QString & text );
- static void parseOasisTimeKlocale(KoXmlWriter &elementWriter, QString & format, QString & text );
- static void addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const QString &_suffix, const QString &_prefix );
+ void insertOfficeStyles( const TQDomElement& styles );
+ void insertStyle( const TQDomElement& style, bool styleAutoStyles );
+ void importDataStyle( const TQDomElement& tqparent );
+ static bool saveOasisTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text, bool &antislash );
+ static void parseOasisDateKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static bool saveOasisKlocaleTimeFormat( KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static void parseOasisTimeKlocale(KoXmlWriter &elementWriter, TQString & format, TQString & text );
+ static void addKofficeNumericStyleExtension( KoXmlWriter & elementWriter, const TQString &_suffix, const TQString &_prefix );
KoOasisStyles( const KoOasisStyles & ); // forbidden
KoOasisStyles& operator=( const KoOasisStyles & ); // forbidden
private:
- QDict<QDomElement> m_styles; // page-layout, font-decl etc.
- QDict<QDomElement> m_defaultStyle;
- QDomElement m_officeStyle;
+ TQDict<TQDomElement> m_styles; // page-tqlayout, font-decl etc.
+ TQDict<TQDomElement> m_defaultStyle;
+ TQDomElement m_officeStyle;
- QDict<QDomElement> m_masterPages;
- QDict<QDomElement> m_listStyles;
+ TQDict<TQDomElement> m_masterPages;
+ TQDict<TQDomElement> m_listStyles;
- QDict<QDomElement> m_drawStyles;
+ TQDict<TQDomElement> m_drawStyles;
DataFormatsMap m_dataFormats;
class Private;
diff --git a/lib/kofficecore/KoOpenPane.cpp b/lib/kofficecore/KoOpenPane.cpp
index 07c9580d..6c7cbb86 100644
--- a/lib/kofficecore/KoOpenPane.cpp
+++ b/lib/kofficecore/KoOpenPane.cpp
@@ -19,15 +19,15 @@
#include "KoOpenPane.h"
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qwidgetstack.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpen.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqwidgetstack.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpen.h>
#include <klocale.h>
#include <kfiledialog.h>
@@ -45,15 +45,15 @@
#include <limits.h>
-class KoSectionListItem : public QListViewItem
+class KoSectionListItem : public TQListViewItem
{
public:
- KoSectionListItem(KListView* listView, const QString& name, int sortWeight, int widgetIndex = -1)
- : QListViewItem(listView, name), m_sortWeight(sortWeight), m_widgetIndex(widgetIndex)
+ KoSectionListItem(KListView* listView, const TQString& name, int sortWeight, int widgetIndex = -1)
+ : TQListViewItem(listView, name), m_sortWeight(sortWeight), m_widgetIndex(widgetIndex)
{
}
- virtual int compare(QListViewItem* i, int, bool) const
+ virtual int compare(TQListViewItem* i, int, bool) const
{
KoSectionListItem* item = dynamic_cast<KoSectionListItem*>(i);
@@ -63,13 +63,13 @@ class KoSectionListItem : public QListViewItem
return sortWeight() - item->sortWeight();
}
- virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
+ virtual void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{
if(widgetIndex() >= 0) {
- QListViewItem::paintCell(p, cg, column, width, align);
+ TQListViewItem::paintCell(p, cg, column, width, align);
} else {
int ypos = (height() - 2) / 2;
- QPen pen(cg.foreground(), 2);
+ TQPen pen(cg.foreground(), 2);
p->setPen(pen);
p->drawLine(0, ypos, width, ypos);
}
@@ -94,8 +94,8 @@ class KoOpenPanePrivate
KInstance* m_instance;
};
-KoOpenPane::KoOpenPane(QWidget *parent, KInstance* instance, const QString& templateType)
- : KoOpenPaneBase(parent, "OpenPane")
+KoOpenPane::KoOpenPane(TQWidget *tqparent, KInstance* instance, const TQString& templateType)
+ : KoOpenPaneBase(tqparent, "OpenPane")
{
d = new KoOpenPanePrivate;
d->m_instance = instance;
@@ -105,18 +105,18 @@ KoOpenPane::KoOpenPane(QWidget *parent, KInstance* instance, const QString& temp
#if KDE_IS_VERSION(3,4,0)
m_sectionList->setShadeSortColumn(false);
#endif
- connect(m_sectionList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(selectionChanged(QListViewItem*)));
- connect(m_sectionList, SIGNAL(pressed(QListViewItem*)),
- this, SLOT(itemClicked(QListViewItem*)));
- connect(m_sectionList, SIGNAL(spacePressed(QListViewItem*)),
- this, SLOT(itemClicked(QListViewItem*)));
- connect(m_sectionList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(itemClicked(QListViewItem*)));
+ connect(m_sectionList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(selectionChanged(TQListViewItem*)));
+ connect(m_sectionList, TQT_SIGNAL(pressed(TQListViewItem*)),
+ this, TQT_SLOT(itemClicked(TQListViewItem*)));
+ connect(m_sectionList, TQT_SIGNAL(spacePressed(TQListViewItem*)),
+ this, TQT_SLOT(itemClicked(TQListViewItem*)));
+ connect(m_sectionList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(itemClicked(TQListViewItem*)));
KGuiItem openExistingGItem(i18n("Open Existing Document..."), "fileopen");
m_openExistingButton->setGuiItem(openExistingGItem);
- connect(m_openExistingButton, SIGNAL(clicked()), this, SLOT(showOpenFileDialog()));
+ connect(m_openExistingButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showOpenFileDialog()));
initRecentDocs();
initTemplates(templateType);
@@ -127,7 +127,7 @@ KoOpenPane::KoOpenPane(QWidget *parent, KInstance* instance, const QString& temp
m_widgetStack->widget(selectedItem->widgetIndex())->setFocus();
}
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << 20 << width() - 20;
m_splitter->setSizes(sizes);
@@ -136,8 +136,8 @@ KoOpenPane::KoOpenPane(QWidget *parent, KInstance* instance, const QString& temp
sizes = cfgGrp.readIntListEntry("DetailsPaneSplitterSizes");
emit splitterResized(0, sizes);
- connect(this, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)),
- this, SLOT(saveSplitterSizes(KoDetailsPaneBase*, const QValueList<int>&)));
+ connect(this, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)),
+ this, TQT_SLOT(saveSplitterSizes(KoDetailsPaneBase*, const TQValueList<int>&)));
}
KoOpenPane::~KoOpenPane()
@@ -156,7 +156,7 @@ KoOpenPane::~KoOpenPane()
void KoOpenPane::showOpenFileDialog()
{
- const QStringList mimeFilter = KoFilterManager::mimeFilter(KoDocument::readNativeFormatMimeType(),
+ const TQStringList mimeFilter = KoFilterManager::mimeFilter(KoDocument::readNativeFormatMimeType(),
KoFilterManager::Import, KoDocument::readExtraNativeMimeTypes());
KURL url = KFileDialog::getOpenURL(":OpenDialog", mimeFilter.join(" "), this);
@@ -171,12 +171,12 @@ void KoOpenPane::showOpenFileDialog()
void KoOpenPane::initRecentDocs()
{
KoRecentDocumentsPane* recentDocPane = new KoRecentDocumentsPane(this, d->m_instance);
- connect(recentDocPane, SIGNAL(openFile(const QString&)), this, SIGNAL(openExistingFile(const QString&)));
- QListViewItem* item = addPane(i18n("Recent Documents"), "fileopen", recentDocPane, 0);
- connect(recentDocPane, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)),
- this, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)));
- connect(this, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)),
- recentDocPane, SLOT(resizeSplitter(KoDetailsPaneBase*, const QValueList<int>&)));
+ connect(recentDocPane, TQT_SIGNAL(openFile(const TQString&)), this, TQT_SIGNAL(openExistingFile(const TQString&)));
+ TQListViewItem* item = addPane(i18n("Recent Documents"), "fileopen", recentDocPane, 0);
+ connect(recentDocPane, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)),
+ this, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)));
+ connect(this, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)),
+ recentDocPane, TQT_SLOT(resizeSplitter(KoDetailsPaneBase*, const TQValueList<int>&)));
KoSectionListItem* separator = new KoSectionListItem(m_sectionList, "", 1);
separator->setEnabled(false);
@@ -186,10 +186,10 @@ void KoOpenPane::initRecentDocs()
}
}
-void KoOpenPane::initTemplates(const QString& templateType)
+void KoOpenPane::initTemplates(const TQString& templateType)
{
- QListViewItem* selectItem = 0;
- QListViewItem* firstItem = 0;
+ TQListViewItem* selectItem = 0;
+ TQListViewItem* firstItem = 0;
const int templateOffset = 1000;
if(!templateType.isEmpty())
@@ -203,16 +203,16 @@ void KoOpenPane::initTemplates(const QString& templateType)
KoTemplatesPane* pane = new KoTemplatesPane(this, d->m_instance,
group, templateTree.defaultTemplate());
- connect(pane, SIGNAL(openTemplate(const QString&)), this, SIGNAL(openTemplate(const QString&)));
- connect(pane, SIGNAL(alwaysUseChanged(KoTemplatesPane*, const QString&)),
- this, SIGNAL(alwaysUseChanged(KoTemplatesPane*, const QString&)));
- connect(this, SIGNAL(alwaysUseChanged(KoTemplatesPane*, const QString&)),
- pane, SLOT(changeAlwaysUseTemplate(KoTemplatesPane*, const QString&)));
- connect(pane, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)),
- this, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)));
- connect(this, SIGNAL(splitterResized(KoDetailsPaneBase*, const QValueList<int>&)),
- pane, SLOT(resizeSplitter(KoDetailsPaneBase*, const QValueList<int>&)));
- QListViewItem* item = addPane(group->name(), group->first()->loadPicture(d->m_instance),
+ connect(pane, TQT_SIGNAL(openTemplate(const TQString&)), this, TQT_SIGNAL(openTemplate(const TQString&)));
+ connect(pane, TQT_SIGNAL(alwaysUseChanged(KoTemplatesPane*, const TQString&)),
+ this, TQT_SIGNAL(alwaysUseChanged(KoTemplatesPane*, const TQString&)));
+ connect(this, TQT_SIGNAL(alwaysUseChanged(KoTemplatesPane*, const TQString&)),
+ pane, TQT_SLOT(changeAlwaysUseTemplate(KoTemplatesPane*, const TQString&)));
+ connect(pane, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)),
+ this, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)));
+ connect(this, TQT_SIGNAL(splitterResized(KoDetailsPaneBase*, const TQValueList<int>&)),
+ pane, TQT_SLOT(resizeSplitter(KoDetailsPaneBase*, const TQValueList<int>&)));
+ TQListViewItem* item = addPane(group->name(), group->first()->loadPicture(d->m_instance),
pane, group->sortingWeight() + templateOffset);
if(!firstItem) {
@@ -240,12 +240,12 @@ void KoOpenPane::initTemplates(const QString& templateType)
}
}
-void KoOpenPane::setCustomDocumentWidget(QWidget *widget) {
+void KoOpenPane::setCustomDocumentWidget(TQWidget *widget) {
Q_ASSERT(widget);
KoSectionListItem* separator = new KoSectionListItem(m_sectionList, "", INT_MAX-1);
separator->setEnabled(false);
- QListViewItem* item = addPane(i18n("Custom Document"), QString::null, widget, INT_MAX);
+ TQListViewItem* item = addPane(i18n("Custom Document"), TQString(), widget, INT_MAX);
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
@@ -256,13 +256,13 @@ void KoOpenPane::setCustomDocumentWidget(QWidget *widget) {
}
}
-QListViewItem* KoOpenPane::addPane(const QString& title, const QString& icon, QWidget* widget, int sortWeight)
+TQListViewItem* KoOpenPane::addPane(const TQString& title, const TQString& icon, TQWidget* widget, int sortWeight)
{
return addPane(title, SmallIcon(icon, KIcon::SizeLarge, KIcon::DefaultState, d->m_instance),
widget, sortWeight);
}
-QListViewItem* KoOpenPane::addPane(const QString& title, const QPixmap& icon, QWidget* widget, int sortWeight)
+TQListViewItem* KoOpenPane::addPane(const TQString& title, const TQPixmap& icon, TQWidget* widget, int sortWeight)
{
if(!widget) {
return 0;
@@ -272,21 +272,21 @@ QListViewItem* KoOpenPane::addPane(const QString& title, const QPixmap& icon, QW
KoSectionListItem* listItem = new KoSectionListItem(m_sectionList, title, sortWeight, id);
if(!icon.isNull()) {
- QImage image = icon.convertToImage();
+ TQImage image = icon.convertToImage();
if((image.width() > 48) || (image.height() > 48)) {
- image = image.smoothScale(48, 48, QImage::ScaleMin);
+ image = image.smoothScale(48, 48, TQ_ScaleMin);
}
image.setAlphaBuffer(true);
image = image.copy((image.width() - 48) / 2, (image.height() - 48) / 2, 48, 48);
- listItem->setPixmap(0, QPixmap(image));
+ listItem->setPixmap(0, TQPixmap(image));
}
return listItem;
}
-void KoOpenPane::selectionChanged(QListViewItem* item)
+void KoOpenPane::selectionChanged(TQListViewItem* item)
{
KoSectionListItem* section = dynamic_cast<KoSectionListItem*>(item);
@@ -297,13 +297,13 @@ void KoOpenPane::selectionChanged(QListViewItem* item)
m_widgetStack->raiseWidget(section->widgetIndex());
}
-void KoOpenPane::saveSplitterSizes(KoDetailsPaneBase* /*sender*/, const QValueList<int>& sizes)
+void KoOpenPane::saveSplitterSizes(KoDetailsPaneBase* /*sender*/, const TQValueList<int>& sizes)
{
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
cfgGrp.writeEntry("DetailsPaneSplitterSizes", sizes);
}
-void KoOpenPane::itemClicked(QListViewItem* item)
+void KoOpenPane::itemClicked(TQListViewItem* item)
{
KoSectionListItem* selectedItem = static_cast<KoSectionListItem*>(item);
diff --git a/lib/kofficecore/KoOpenPane.h b/lib/kofficecore/KoOpenPane.h
index 20bd425d..818c6e81 100644
--- a/lib/kofficecore/KoOpenPane.h
+++ b/lib/kofficecore/KoOpenPane.h
@@ -26,7 +26,7 @@ class KConfig;
class KoTemplateGroup;
class KoOpenPanePrivate;
class KInstance;
-class QPixmap;
+class TQPixmap;
class KListViewItem;
class KoTemplatesPane;
class KoDetailsPaneBase;
@@ -34,19 +34,20 @@ class KoDetailsPaneBase;
class KoOpenPane : public KoOpenPaneBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param instance the KInstance to be used for KConfig data
* @param templateType the template-type (group) that should be selected on creation.
*/
- KoOpenPane(QWidget *parent, KInstance* instance, const QString& templateType = QString::null);
+ KoOpenPane(TQWidget *tqparent, KInstance* instance, const TQString& templateType = TQString());
virtual ~KoOpenPane();
- QListViewItem* addPane(const QString& title, const QString& icon, QWidget* widget, int sortWeight);
- QListViewItem* addPane(const QString& title, const QPixmap& icon, QWidget* widget, int sortWeight);
+ TQListViewItem* addPane(const TQString& title, const TQString& icon, TQWidget* widget, int sortWeight);
+ TQListViewItem* addPane(const TQString& title, const TQPixmap& icon, TQWidget* widget, int sortWeight);
/**
* If the application has a way to create a document not based on a template, but on user
@@ -54,26 +55,26 @@ class KoOpenPane : public KoOpenPaneBase
* @see KoDocument::createCustomDocumentWidget()
* @param widget the widget.
*/
- void setCustomDocumentWidget(QWidget *widget);
+ void setCustomDocumentWidget(TQWidget *widget);
protected slots:
void showOpenFileDialog();
- void selectionChanged(QListViewItem* item);
- void itemClicked(QListViewItem* item);
+ void selectionChanged(TQListViewItem* item);
+ void itemClicked(TQListViewItem* item);
/// Saves the splitter sizes for KoDetailsPaneBase based panes
- void saveSplitterSizes(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void saveSplitterSizes(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
signals:
- void openExistingFile(const QString&);
- void openTemplate(const QString&);
+ void openExistingFile(const TQString&);
+ void openTemplate(const TQString&);
/// Emitted when the always use template has changed
- void alwaysUseChanged(KoTemplatesPane* sender, const QString& alwaysUse);
+ void alwaysUseChanged(KoTemplatesPane* sender, const TQString& alwaysUse);
/// Emitted when one of the detail panes have changed it's splitter
- void splitterResized(KoDetailsPaneBase* sender, const QValueList<int>& sizes);
+ void splitterResized(KoDetailsPaneBase* sender, const TQValueList<int>& sizes);
protected:
void initRecentDocs();
@@ -81,7 +82,7 @@ class KoOpenPane : public KoOpenPaneBase
* Populate the list with all templates the user can choose.
* @param templateType the template-type (group) that should be selected on creation.
*/
- void initTemplates(const QString& templateType);
+ void initTemplates(const TQString& templateType);
private:
KoOpenPanePrivate* d;
diff --git a/lib/kofficecore/KoPageLayout.cpp b/lib/kofficecore/KoPageLayout.cpp
index 36e447e9..05eff10b 100644
--- a/lib/kofficecore/KoPageLayout.cpp
+++ b/lib/kofficecore/KoPageLayout.cpp
@@ -26,7 +26,7 @@
#include <kglobal.h>
#include <KoDom.h>
#include <KoXmlNS.h>
-#include <qdom.h>
+#include <tqdom.h>
// paper formats ( mm )
#define PG_A3_WIDTH 297.0
@@ -57,21 +57,21 @@ KoGenStyle KoPageLayout::saveOasis() const
return style;
}
-void KoPageLayout::loadOasis(const QDomElement &style)
+void KoPageLayout::loadOasis(const TQDomElement &style)
{
- QDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) );
+ TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) );
if ( !properties.isNull() )
{
- ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", QString::null ) );
- ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", QString::null ) );
- if (properties.attributeNS( KoXmlNS::style, "print-orientation", QString::null)=="portrait")
+ ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) );
+ ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", TQString() ) );
+ if (properties.attributeNS( KoXmlNS::style, "print-orientation", TQString())=="portrait")
orientation=PG_PORTRAIT;
else
orientation=PG_LANDSCAPE;
- ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", QString::null ) );
- ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", QString::null ) );
- ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", QString::null ) );
- ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", QString::null ) );
+ ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", TQString() ) );
+ ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", TQString() ) );
+ ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", TQString() ) );
+ ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", TQString() ) );
// guessFormat takes millimeters
if ( orientation == PG_LANDSCAPE )
format = KoPageFormat::guessFormat( POINT_TO_MM(ptHeight), POINT_TO_MM(ptWidth) );
@@ -82,18 +82,18 @@ void KoPageLayout::loadOasis(const QDomElement &style)
KoPageLayout KoPageLayout::standardLayout()
{
- KoPageLayout layout;
- layout.format = KoPageFormat::defaultFormat();
- layout.orientation = PG_PORTRAIT;
- layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) );
- layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) );
- layout.ptLeft = MM_TO_POINT( 20.0 );
- layout.ptRight = MM_TO_POINT( 20.0 );
- layout.ptTop = MM_TO_POINT( 20.0 );
- layout.ptBottom = MM_TO_POINT( 20.0 );
- layout.ptPageEdge = -1;
- layout.ptBindingSide = -1;
- return layout;
+ KoPageLayout tqlayout;
+ tqlayout.format = KoPageFormat::defaultFormat();
+ tqlayout.orientation = PG_PORTRAIT;
+ tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) );
+ tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) );
+ tqlayout.ptLeft = MM_TO_POINT( 20.0 );
+ tqlayout.ptRight = MM_TO_POINT( 20.0 );
+ tqlayout.ptTop = MM_TO_POINT( 20.0 );
+ tqlayout.ptBottom = MM_TO_POINT( 20.0 );
+ tqlayout.ptPageEdge = -1;
+ tqlayout.ptBindingSide = -1;
+ return tqlayout;
}
struct PageFormatInfo
@@ -149,12 +149,12 @@ int KoPageFormat::printerPageSize( KoFormat format )
{
if ( format == PG_SCREEN )
{
- kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl;
+ kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl;
return KPrinter::A4;
}
else if ( format == PG_CUSTOM )
{
- kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl;
+ kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl;
return KPrinter::A4;
}
else if ( format <= PG_LAST_FORMAT )
@@ -195,18 +195,18 @@ KoFormat KoPageFormat::guessFormat( double width, double height )
return PG_CUSTOM;
}
-QString KoPageFormat::formatString( KoFormat format )
+TQString KoPageFormat::formatString( KoFormat format )
{
if ( format <= PG_LAST_FORMAT )
- return QString::fromLatin1( pageFormatInfo[ format ].shortName );
- return QString::fromLatin1( "A4" );
+ return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName );
+ return TQString::tqfromLatin1( "A4" );
}
-KoFormat KoPageFormat::formatFromString( const QString & string )
+KoFormat KoPageFormat::formatFromString( const TQString & string )
{
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{
- if (string == QString::fromLatin1( pageFormatInfo[ i ].shortName ))
+ if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName ))
return pageFormatInfo[ i ].format;
}
// We do not know the format name, so we have a custom format
@@ -224,16 +224,16 @@ KoFormat KoPageFormat::defaultFormat()
return PG_DIN_A4;
}
-QString KoPageFormat::name( KoFormat format )
+TQString KoPageFormat::name( KoFormat format )
{
if ( format <= PG_LAST_FORMAT )
return i18n( pageFormatInfo[ format ].descriptiveName );
return i18n( pageFormatInfo[ PG_DIN_A4 ].descriptiveName );
}
-QStringList KoPageFormat::allFormats()
+TQStringList KoPageFormat::allFormats()
{
- QStringList lst;
+ TQStringList lst;
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{
lst << i18n( pageFormatInfo[ i ].descriptiveName );
diff --git a/lib/kofficecore/KoPageLayout.h b/lib/kofficecore/KoPageLayout.h
index f9f98fc6..4d4dc6cc 100644
--- a/lib/kofficecore/KoPageLayout.h
+++ b/lib/kofficecore/KoPageLayout.h
@@ -23,15 +23,15 @@
#define KOPAGELAYOUT_H
#include <KoGenStyles.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
/**
* @brief Represents the paper format a document shall be printed on.
*
* For compatibility reasons, and because of screen and custom,
- * this enum doesn't map to QPrinter::PageSize but KoPageFormat::printerPageSize
+ * this enum doesn't map to TQPrinter::PageSize but KoPageFormat::printerPageSize
* does the conversion.
*
* @todo convert DIN to ISO in the names
@@ -108,13 +108,13 @@ namespace KoPageFormat
* Returns the internal name of the given page format.
* Use for saving.
*/
- KOFFICECORE_EXPORT QString formatString( KoFormat format );
+ KOFFICECORE_EXPORT TQString formatString( KoFormat format );
/**
* Convert a format string (internal name) to a page format value.
* Use for loading.
*/
- KOFFICECORE_EXPORT KoFormat formatFromString( const QString & string );
+ KOFFICECORE_EXPORT KoFormat formatFromString( const TQString & string );
/**
* Returns the default format (based on the KControl settings)
@@ -125,12 +125,12 @@ namespace KoPageFormat
* Returns the translated name of the given page format.
* Use for showing the user.
*/
- KOFFICECORE_EXPORT QString name( KoFormat format );
+ KOFFICECORE_EXPORT TQString name( KoFormat format );
/**
* Lists the translated names of all the available formats
*/
- KOFFICECORE_EXPORT QStringList allFormats();
+ KOFFICECORE_EXPORT TQStringList allFormats();
/**
* Try to find the paper format for the given width and height (in mm).
@@ -154,7 +154,7 @@ enum KoHFType {
};
/**
- * This structure defines the page layout, including
+ * This structure defines the page tqlayout, including
* its size in pt, its format (e.g. A4), orientation, unit, margins etc.
*/
struct KoPageLayout
@@ -194,17 +194,17 @@ struct KoPageLayout
}
/**
- * Save this page layout to OASIS.
+ * Save this page tqlayout to OASIS.
*/
KOFFICECORE_EXPORT KoGenStyle saveOasis() const;
/**
- * Load this page layout from OASIS
+ * Load this page tqlayout from OASIS
*/
- KOFFICECORE_EXPORT void loadOasis(const QDomElement &style);
+ KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style);
/**
- * @return a page layout with the default page size depending on the locale settings,
+ * @return a page tqlayout with the default page size depending on the locale settings,
* default margins (2 cm), and portrait orientation.
* @since 1.4
*/
@@ -214,12 +214,12 @@ struct KoPageLayout
/** structure for header-footer */
struct KoHeadFoot
{
- QString headLeft;
- QString headMid;
- QString headRight;
- QString footLeft;
- QString footMid;
- QString footRight;
+ TQString headLeft;
+ TQString headMid;
+ TQString headRight;
+ TQString footLeft;
+ TQString footMid;
+ TQString footRight;
};
/** structure for columns */
@@ -229,11 +229,11 @@ struct KoColumns
double ptColumnSpacing;
bool operator==( const KoColumns& rhs ) const {
return columns == rhs.columns &&
- QABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10;
+ TQABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10;
}
bool operator!=( const KoColumns& rhs ) const {
return columns != rhs.columns ||
- QABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10;
+ TQABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10;
}
};
@@ -247,9 +247,9 @@ struct KoKWHeaderFooter
double ptFootNoteBodySpacing;
bool operator==( const KoKWHeaderFooter& rhs ) const {
return header == rhs.header && footer == rhs.footer &&
- QABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 &&
- QABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 &&
- QABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10;
+ TQABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 &&
+ TQABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 &&
+ TQABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10;
}
bool operator!=( const KoKWHeaderFooter& rhs ) const {
return !( *this == rhs );
diff --git a/lib/kofficecore/KoPicture.cpp b/lib/kofficecore/KoPicture.cpp
index 11bb89dd..8e74c0b5 100644
--- a/lib/kofficecore/KoPicture.cpp
+++ b/lib/kofficecore/KoPicture.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qfile.h>
+#include <tqpainter.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kurl.h>
@@ -35,7 +35,7 @@ uint KoPicture::uniqueValue = 0;
KoPicture::KoPicture(void) : m_sharedData(NULL)
{
- m_uniqueName = "Pictures"+ QString::number(uniqueValue++);
+ m_uniqueName = "Pictures"+ TQString::number(uniqueValue++);
}
KoPicture::~KoPicture(void)
@@ -43,7 +43,7 @@ KoPicture::~KoPicture(void)
unlinkSharedData();
}
-QString KoPicture::uniqueName() const
+TQString KoPicture::uniqueName() const
{
return m_uniqueName;
}
@@ -60,12 +60,12 @@ void KoPicture::assignPictureId( uint _id)
m_sharedData->assignPictureId(_id);
}
-QString KoPicture::uniquePictureId() const
+TQString KoPicture::uniquePictureId() const
{
if ( m_sharedData )
return m_sharedData->uniquePictureId();
else
- return QString::null;
+ return TQString();
}
KoPicture& KoPicture::operator=( const KoPicture &other )
@@ -129,7 +129,7 @@ bool KoPicture::isNull(void) const
return true;
}
-void KoPicture::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
+void KoPicture::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
{
if (m_sharedData)
m_sharedData->draw(painter, x, y, width, height, sx, sy, sw, sh, fastMode);
@@ -138,25 +138,25 @@ void KoPicture::draw(QPainter& painter, int x, int y, int width, int height, int
// Draw a white box
kdWarning(30003) << "Drawing white rectangle! (KoPicture::draw)" << endl;
painter.save();
- painter.setBrush(QColor(255, 255, 255));
+ painter.setBrush(TQColor(255, 255, 255));
painter.drawRect(x,y,width,height);
painter.restore();
}
}
-bool KoPicture::loadXpm(QIODevice* io)
+bool KoPicture::loadXpm(TQIODevice* io)
{
kdDebug(30003) << "KoPicture::loadXpm" << endl;
if (!io)
{
- kdError(30003) << "No QIODevice!" << endl;
+ kdError(30003) << "No TQIODevice!" << endl;
return false;
}
createSharedData();
return m_sharedData->loadXpm(io);
}
-bool KoPicture::save(QIODevice* io) const
+bool KoPicture::save(TQIODevice* io) const
{
if (!io)
return false;
@@ -177,66 +177,66 @@ void KoPicture::clear(void)
unlinkSharedData();
}
-void KoPicture::clearAndSetMode(const QString& newMode)
+void KoPicture::clearAndSetMode(const TQString& newMode)
{
createSharedData();
m_sharedData->clearAndSetMode(newMode);
}
-QString KoPicture::getExtension(void) const
+TQString KoPicture::getExtension(void) const
{
if (m_sharedData)
return m_sharedData->getExtension();
return "null"; // Just a dummy
}
-QString KoPicture::getMimeType(void) const
+TQString KoPicture::getMimeType(void) const
{
if (m_sharedData)
return m_sharedData->getMimeType();
- return QString(NULL_MIME_TYPE);
+ return TQString(NULL_MIME_TYPE);
}
-bool KoPicture::load(QIODevice* io, const QString& extension)
+bool KoPicture::load(TQIODevice* io, const TQString& extension)
{
- kdDebug(30003) << "KoPicture::load(QIODevice*, const QString&) " << extension << endl;
+ kdDebug(30003) << "KoPicture::load(TQIODevice*, const TQString&) " << extension << endl;
createSharedData();
return m_sharedData->load(io,extension);
}
-bool KoPicture::loadFromFile(const QString& fileName)
+bool KoPicture::loadFromFile(const TQString& fileName)
{
kdDebug(30003) << "KoPicture::loadFromFile " << fileName << endl;
createSharedData();
return m_sharedData->loadFromFile(fileName);
}
-bool KoPicture::loadFromBase64( const QCString& str )
+bool KoPicture::loadFromBase64( const TQCString& str )
{
createSharedData();
return m_sharedData->loadFromBase64( str );
}
-QSize KoPicture::getOriginalSize(void) const
+TQSize KoPicture::getOriginalSize(void) const
{
if (m_sharedData)
return m_sharedData->getOriginalSize();
- return QSize(0,0);
+ return TQSize(0,0);
}
-QPixmap KoPicture::generatePixmap(const QSize& size, bool smoothScale)
+TQPixmap KoPicture::generatePixmap(const TQSize& size, bool smoothScale)
{
if (m_sharedData)
return m_sharedData->generatePixmap(size, smoothScale);
- return QPixmap();
+ return TQPixmap();
}
-bool KoPicture::setKeyAndDownloadPicture(const KURL& url, QWidget *window)
+bool KoPicture::setKeyAndDownloadPicture(const KURL& url, TQWidget *window)
{
bool result=false;
- QString tmpFileName;
+ TQString tmpFileName;
if ( KIO::NetAccess::download(url, tmpFileName, window) )
{
KoPictureKey key;
@@ -249,18 +249,18 @@ bool KoPicture::setKeyAndDownloadPicture(const KURL& url, QWidget *window)
return result;
}
-QDragObject* KoPicture::dragObject( QWidget *dragSource, const char *name )
+TQDragObject* KoPicture::dragObject( TQWidget *dragSource, const char *name )
{
if (m_sharedData)
return m_sharedData->dragObject( dragSource, name );
return 0L;
}
-QImage KoPicture::generateImage(const QSize& size)
+TQImage KoPicture::generateImage(const TQSize& size)
{
if (m_sharedData)
return m_sharedData->generateImage( size );
- return QImage();
+ return TQImage();
}
bool KoPicture::hasAlphaBuffer() const
@@ -276,11 +276,11 @@ void KoPicture::setAlphaBuffer(bool enable)
m_sharedData->setAlphaBuffer(enable);
}
-QImage KoPicture::createAlphaMask(int conversion_flags) const
+TQImage KoPicture::createAlphaMask(int conversion_flags) const
{
if (m_sharedData)
return m_sharedData->createAlphaMask(conversion_flags);
- return QImage();
+ return TQImage();
}
void KoPicture::clearCache(void)
diff --git a/lib/kofficecore/KoPicture.h b/lib/kofficecore/KoPicture.h
index e4ed1d5d..3fa355f8 100644
--- a/lib/kofficecore/KoPicture.h
+++ b/lib/kofficecore/KoPicture.h
@@ -20,17 +20,17 @@
#ifndef __koPicture_h__
#define __koPicture_h__
-#include <qstring.h>
-#include <qiodevice.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
+#include <tqpixmap.h>
#include <koffice_export.h>
#include "KoPictureKey.h"
class KoXmlWriter;
-class QPainter;
-class QSize;
-class QDragObject;
+class TQPainter;
+class TQSize;
+class TQDragObject;
class KURL;
class KoPictureShared;
@@ -87,31 +87,31 @@ public:
*
* The parameters @p width, @p height define the desired size for the picture
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in picture that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the picture that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*
*/
- void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0,
+ void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0,
int sw = -1, int sh = -1, bool fastMode = false);
/**
* Create a dragobject containing this picture.
* @param dragSource must be 0 when copying to the clipboard
- * @param name name for the QDragObject
+ * @param name name for the TQDragObject
* @return 0L if the picture is null, or if a dragobject for it isn't implemented [yet]
*/
- QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
+ TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
- bool load(QIODevice* io, const QString& extension);
+ bool load(TQIODevice* io, const TQString& extension);
/**
- * Save picture into a QIODevice
- * @param io QIODevice used for saving
+ * Save picture into a TQIODevice
+ * @param io TQIODevice used for saving
*/
- bool save(QIODevice* io) const;
+ bool save(TQIODevice* io) const;
/**
* OASIS FlatXML support:
@@ -128,24 +128,24 @@ public:
/**
* @return the image extension (e.g. png)
*/
- QString getExtension(void) const;
+ TQString getExtension(void) const;
/**
* @return the image MIME type
*/
- QString getMimeType(void) const;
+ TQString getMimeType(void) const;
/**
* @return the original image size
*/
- QSize getOriginalSize(void) const;
+ TQSize getOriginalSize(void) const;
/**
* Clear and set the mode of this KoPicture
*
* @param newMode a file extension (like "png") giving the wanted mode
*/
- void clearAndSetMode(const QString& newMode);
+ void clearAndSetMode(const TQString& newMode);
/**
* Reset the KoPicture (but not the key!)
@@ -155,43 +155,43 @@ public:
/**
* Load the picture from a file named @p fileName
*/
- bool loadFromFile(const QString& fileName);
+ bool loadFromFile(const TQString& fileName);
/**
* Load the picture from base64-encoded data
*/
- bool loadFromBase64(const QCString& str);
+ bool loadFromBase64(const TQCString& str);
/**
* Load a potentially broken XPM file (for old files of KPresenter)
*/
- bool loadXpm(QIODevice* io);
+ bool loadXpm(TQIODevice* io);
/**
* @deprecated To be replaced by @ref KoPicture::draw
*
- * Returns a QPixmap from an image
- * Returns an empty QPixmap if the KoPicture is not an image.
+ * Returns a TQPixmap from an image
+ * Returns an empty TQPixmap if the KoPicture is not an image.
*/
- QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
/**
* Download and set the key for a possibly remote file.
*
* @param url the url to download from
- * @param window the parent widget for the download. You can pass
- * NULL (0) if you absolutely cannot find a parent
+ * @param window the tqparent widget for the download. You can pass
+ * NULL (0) if you absolutely cannot find a tqparent
* widget to use.
*/
- bool setKeyAndDownloadPicture(const KURL& url, QWidget *window);
+ bool setKeyAndDownloadPicture(const KURL& url, TQWidget *window);
/**
- * Generate a QImage
+ * Generate a TQImage
* (always in slow mode)
*
- * @param size the wanted size for the QImage
+ * @param size the wanted size for the TQImage
*/
- QImage generateImage(const QSize& size);
+ TQImage generateImage(const TQSize& size);
/**
* @return TRUE if the alpha channel processing has been enabled
@@ -204,12 +204,12 @@ public:
void setAlphaBuffer(bool enable);
/**
- * Creates an alpha mask for the picture
+ * Creates an alpha tqmask for the picture
* (first you have to call @ref #setAlphaBuffer).
*
* @see hasAlphaBuffer() setAlphaBuffer()
*/
- QImage createAlphaMask(int conversion_flags = 0) const;
+ TQImage createAlphaMask(int conversion_flags = 0) const;
/**
* @brief Clear any cache
@@ -219,7 +219,7 @@ public:
*/
void clearCache(void);
- QString uniquePictureId() const;
+ TQString uniquePictureId() const;
void assignPictureId( uint _id);
protected:
@@ -238,7 +238,7 @@ protected:
* Creare the shared data if needed
*/
void createSharedData(void);
- QString uniqueName() const;
+ TQString uniqueName() const;
protected:
/**
@@ -253,7 +253,7 @@ protected:
KoPictureShared* m_sharedData;
static uint uniqueValue;
- QString m_uniqueName;
+ TQString m_uniqueName;
};
#endif /* __koPicture_h__ */
diff --git a/lib/kofficecore/KoPictureBase.cpp b/lib/kofficecore/KoPictureBase.cpp
index e608abc2..29ec51b9 100644
--- a/lib/kofficecore/KoPictureBase.cpp
+++ b/lib/kofficecore/KoPictureBase.cpp
@@ -27,10 +27,10 @@
#include <kglobal.h>
#include <kmdcodec.h>
-#include <qpainter.h>
-#include <qpicture.h>
-#include <qpixmap.h>
-#include <qdragobject.h>
+#include <tqpainter.h>
+#include <tqpicture.h>
+#include <tqpixmap.h>
+#include <tqdragobject.h>
static int s_useSlowResizeMode = -1; // unset
@@ -64,28 +64,28 @@ bool KoPictureBase::isNull(void) const
return true; // A KoPictureBase is always null.
}
-void KoPictureBase::draw(QPainter& painter, int x, int y, int width, int height, int, int, int, int, bool /*fastMode*/)
+void KoPictureBase::draw(TQPainter& painter, int x, int y, int width, int height, int, int, int, int, bool /*fastMode*/)
{
// Draw a light red box (easier DEBUG)
kdWarning(30003) << "Drawing light red rectangle! (KoPictureBase::draw)" << endl;
painter.save();
- painter.setBrush(QColor(128,0,0));
+ painter.setBrush(TQColor(128,0,0));
painter.drawRect(x,y,width,height);
painter.restore();
}
-bool KoPictureBase::load(QIODevice* io, const QString& extension)
+bool KoPictureBase::load(TQIODevice* io, const TQString& extension)
{
return loadData(io->readAll(), extension);
}
-bool KoPictureBase::loadData(const QByteArray&, const QString&)
+bool KoPictureBase::loadData(const TQByteArray&, const TQString&)
{
// Nothing to load!
return false;
}
-bool KoPictureBase::save(QIODevice*) const
+bool KoPictureBase::save(TQIODevice*) const
{
// Nothing to save!
return false;
@@ -93,28 +93,28 @@ bool KoPictureBase::save(QIODevice*) const
bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const
{
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open(IO_ReadWrite);
- if ( !save( &buffer ) )
+ if ( !save( TQT_TQIODEVICE(&buffer) ) )
return false;
- QCString encoded = KCodecs::base64Encode( buffer.buffer() );
+ TQCString encoded = KCodecs::base64Encode( buffer.buffer() );
writer.addTextNode( encoded );
return true;
}
-QSize KoPictureBase::getOriginalSize(void) const
+TQSize KoPictureBase::getOriginalSize(void) const
{
- return QSize(0,0);
+ return TQSize(0,0);
}
-QPixmap KoPictureBase::generatePixmap(const QSize&, bool /*smoothScale*/)
+TQPixmap KoPictureBase::generatePixmap(const TQSize&, bool /*smoothScale*/)
{
- return QPixmap();
+ return TQPixmap();
}
-QString KoPictureBase::getMimeType(const QString&) const
+TQString KoPictureBase::getMimeType(const TQString&) const
{
- return QString(NULL_MIME_TYPE);
+ return TQString(NULL_MIME_TYPE);
}
bool KoPictureBase::isSlowResizeModeAllowed(void) const
@@ -122,16 +122,16 @@ bool KoPictureBase::isSlowResizeModeAllowed(void) const
return s_useSlowResizeMode != 0;
}
-QDragObject* KoPictureBase::dragObject( QWidget * dragSource, const char * name )
+TQDragObject* KoPictureBase::dragObject( TQWidget * dragSource, const char * name )
{
- QImage image (generateImage(getOriginalSize()));
+ TQImage image (generateImage(getOriginalSize()));
if (image.isNull())
return 0L;
else
- return new QImageDrag( image, dragSource, name );
+ return new TQImageDrag( image, dragSource, name );
}
-QImage KoPictureBase::generateImage(const QSize& size)
+TQImage KoPictureBase::generateImage(const TQSize& size)
{
return generatePixmap(size,true).convertToImage();
}
diff --git a/lib/kofficecore/KoPictureBase.h b/lib/kofficecore/KoPictureBase.h
index 17a7df96..73056aa6 100644
--- a/lib/kofficecore/KoPictureBase.h
+++ b/lib/kofficecore/KoPictureBase.h
@@ -22,14 +22,14 @@
#include "KoPictureKey.h" // for KoPictureType
-#include <qstring.h>
-#include <qimage.h>
+#include <tqstring.h>
+#include <tqimage.h>
class KoXmlWriter;
-class QPainter;
-class QSize;
-class QIODevice;
-class QDragObject;
+class TQPainter;
+class TQSize;
+class TQIODevice;
+class TQDragObject;
const char NULL_MIME_TYPE[]="application/x-zerosize";
@@ -70,30 +70,30 @@ public:
* Note that the image is being scaled to that size using scale() - except when printing.
* This avoids scaling the image at each paint event.
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
/**
* Create a dragobject containing this picture.
* @param dragSource must be 0 when copying to the clipboard
* @return 0L if the picture is null!
*/
- virtual QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
+ virtual TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
- virtual bool load(QIODevice* io, const QString& extension);
+ virtual bool load(TQIODevice* io, const TQString& extension);
- virtual bool loadData(const QByteArray& array, const QString& extension);
+ virtual bool loadData(const TQByteArray& array, const TQString& extension);
/**
* save file
- * @param io QIODevice used for saving
+ * @param io TQIODevice used for saving
*/
- virtual bool save(QIODevice* io) const;
+ virtual bool save(TQIODevice* io) const;
/**
* OASIS FlatXML support:
@@ -101,26 +101,26 @@ public:
*/
virtual bool saveAsBase64( KoXmlWriter& writer ) const;
- virtual QSize getOriginalSize(void) const;
+ virtual TQSize getOriginalSize(void) const;
- virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- virtual QString getMimeType(const QString& extension) const;
+ virtual TQString getMimeType(const TQString& extension) const;
bool isSlowResizeModeAllowed(void) const;
/**
- * Generate a QImage
+ * Generate a TQImage
* (always in slow mode)
*/
- virtual QImage generateImage(const QSize& size);
+ virtual TQImage generateImage(const TQSize& size);
virtual bool hasAlphaBuffer() const
{ return false; }
virtual void setAlphaBuffer(bool /*enable*/)
{ }
- virtual QImage createAlphaMask(int /*conversion_flags*/ = 0) const
- { return QImage(); }
+ virtual TQImage createAlphaMask(int /*conversion_flags*/ = 0) const
+ { return TQImage(); }
virtual void clearCache(void);
};
diff --git a/lib/kofficecore/KoPictureClipart.cpp b/lib/kofficecore/KoPictureClipart.cpp
index f4d94fd2..d5c482f8 100644
--- a/lib/kofficecore/KoPictureClipart.cpp
+++ b/lib/kofficecore/KoPictureClipart.cpp
@@ -19,10 +19,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuffer.h>
-#include <qpainter.h>
-#include <qpicture.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqpainter.h>
+#include <tqpicture.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -34,7 +34,7 @@
#include "KoPictureBase.h"
#include "KoPictureClipart.h"
-KoPictureClipart::KoPictureClipart(void) : m_clipart(KoPictureType::formatVersionQPicture)
+KoPictureClipart::KoPictureClipart(void) : m_clipart(KoPictureType::formatVersionTQPicture)
{
}
@@ -57,15 +57,15 @@ bool KoPictureClipart::isNull(void) const
return m_clipart.isNull();
}
-void KoPictureClipart::drawQPicture(QPicture& clipart, QPainter& painter,
+void KoPictureClipart::drawTQPicture(TQPicture& clipart, TQPainter& painter,
int x, int y, int width, int height, int sx, int sy, int sw, int sh)
{
kdDebug(30003) << "Drawing KoPictureClipart " << this << endl;
kdDebug(30003) << " x=" << x << " y=" << y << " width=" << width << " height=" << height << endl;
kdDebug(30003) << " sx=" << sx << " sy=" << sy << " sw=" << sw << " sh=" << sh << endl;
painter.save();
- // Thanks to Harri, Qt3 makes it much easier than Qt2 ;)
- QRect br = clipart.boundingRect();
+ // Thanks to Harri, TQt3 makes it much easier than TQt2 ;)
+ TQRect br = clipart.boundingRect();
kdDebug(30003) << " Bounding rect. " << br << endl;
painter.translate(x,y); // Translating must be done before scaling!
@@ -77,17 +77,17 @@ void KoPictureClipart::drawQPicture(QPicture& clipart, QPainter& painter,
painter.restore();
}
-void KoPictureClipart::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool /*fastMode*/)
+void KoPictureClipart::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool /*fastMode*/)
{
- drawQPicture(m_clipart, painter, x, y, width, height, sx, sy, sw, sh);
+ drawTQPicture(m_clipart, painter, x, y, width, height, sx, sy, sw, sh);
}
-bool KoPictureClipart::loadData(const QByteArray& array, const QString& extension)
+bool KoPictureClipart::loadData(const TQByteArray& array, const TQString& extension)
{
// Second, create the original clipart
kdDebug(30003) << "Trying to load clipart... (Size:" << m_rawData.size() << ")" << endl;
m_rawData=array;
- QBuffer buffer(m_rawData);
+ TQBuffer buffer(m_rawData);
buffer.open(IO_ReadOnly);
bool check = true;
if (extension=="svg")
@@ -102,7 +102,7 @@ bool KoPictureClipart::loadData(const QByteArray& array, const QString& extensio
{
if (!m_clipart.load(&buffer, NULL))
{
- kdWarning(30003) << "Loading QPicture has failed! (KoPictureClipart::load)" << endl;
+ kdWarning(30003) << "Loading TQPicture has failed! (KoPictureClipart::load)" << endl;
check = false;
}
}
@@ -110,29 +110,29 @@ bool KoPictureClipart::loadData(const QByteArray& array, const QString& extensio
return check;
}
-bool KoPictureClipart::save(QIODevice* io) const
+bool KoPictureClipart::save(TQIODevice* io) const
{
- // We save the raw data, as the SVG supposrt in QPicture is poor
- Q_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns Q_LONG but size() Q_ULONG!
+ // We save the raw data, as the SVG supposrt in TQPicture is poor
+ TQ_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns TQ_LONG but size() TQ_ULONG!
return (size==m_rawData.size());
}
-QSize KoPictureClipart::getOriginalSize(void) const
+TQSize KoPictureClipart::getOriginalSize(void) const
{
return m_clipart.boundingRect().size();
}
-QPixmap KoPictureClipart::generatePixmap(const QSize& size, bool /*smoothScale*/)
+TQPixmap KoPictureClipart::generatePixmap(const TQSize& size, bool /*smoothScale*/)
{
// Not sure if it works, but it worked for KoPictureFilePreviewWidget::setClipart
- QPixmap pixmap(size);
- QPainter p;
+ TQPixmap pixmap(size);
+ TQPainter p;
p.begin( &pixmap );
- p.setBackgroundColor( Qt::white );
- pixmap.fill( Qt::white );
+ p.setBackgroundColor( TQt::white );
+ pixmap.fill( TQt::white );
- QRect br = m_clipart.boundingRect();
+ TQRect br = m_clipart.boundingRect();
if ( br.width() && br.height() )
p.scale( (double)pixmap.width() / (double)br.width(), (double)pixmap.height() / (double)br.height() );
p.drawPicture( m_clipart );
@@ -140,7 +140,7 @@ QPixmap KoPictureClipart::generatePixmap(const QSize& size, bool /*smoothScale*/
return pixmap;
}
-QString KoPictureClipart::getMimeType(const QString& extension) const
+TQString KoPictureClipart::getMimeType(const TQString& extension) const
{
if (extension=="svg")
return "image/svg+xml";
diff --git a/lib/kofficecore/KoPictureClipart.h b/lib/kofficecore/KoPictureClipart.h
index 9784c673..b390bca3 100644
--- a/lib/kofficecore/KoPictureClipart.h
+++ b/lib/kofficecore/KoPictureClipart.h
@@ -20,11 +20,11 @@
#ifndef __koPictureClipart_h__
#define __koPictureClipart_h__
-#include <qstring.h>
-#include <qpicture.h>
+#include <tqstring.h>
+#include <tqpicture.h>
-class QPainter;
-class QSize;
+class TQPainter;
+class TQSize;
// TODO: fix documentation
@@ -64,39 +64,39 @@ public:
* Note that the image is being scaled to that size using scale() - except when printing.
* This avoids scaling the image at each paint event.
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
- virtual bool loadData(const QByteArray& array, const QString& extension);
+ virtual bool loadData(const TQByteArray& array, const TQString& extension);
/**
* save file
- * @param io QIODevice used for saving
+ * @param io TQIODevice used for saving
*/
- virtual bool save(QIODevice* io) const;
+ virtual bool save(TQIODevice* io) const;
- virtual QSize getOriginalSize(void) const;
+ virtual TQSize getOriginalSize(void) const;
- virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- virtual QString getMimeType(const QString& extension) const;
+ virtual TQString getMimeType(const TQString& extension) const;
protected:
- QPixmap getPixmap(QImage& image);
+ TQPixmap getPixmap(TQImage& image);
/**
* @internal
- * Draw a QPicture
+ * Draw a TQPicture
*/
- void drawQPicture(QPicture& clipart, QPainter& painter,
+ void drawTQPicture(TQPicture& clipart, TQPainter& painter,
int x, int y, int width, int height, int sx, int sy, int sw, int sh);
protected:
- QPicture m_clipart; ///< The clipart as QPicture
- QByteArray m_rawData; ///< Copy of the loaded image file
+ TQPicture m_clipart; ///< The clipart as TQPicture
+ TQByteArray m_rawData; ///< Copy of the loaded image file
};
#endif /* __koPictureClipart_h__ */
diff --git a/lib/kofficecore/KoPictureCollection.cpp b/lib/kofficecore/KoPictureCollection.cpp
index 8941f32e..3d680bf7 100644
--- a/lib/kofficecore/KoPictureCollection.cpp
+++ b/lib/kofficecore/KoPictureCollection.cpp
@@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kurl.h>
@@ -37,7 +37,7 @@ KoPicture KoPictureCollection::findPicture(const KoPictureKey& key) const
#ifdef DEBUG_PICTURES
kdDebug(30003) << "KoPictureCollection::findPicture " << key.toString() << endl;
#endif
- ConstIterator it = find( key );
+ ConstIterator it = tqfind( key );
if ( it == end() )
{
KoPicture picture;
@@ -72,7 +72,7 @@ KoPicture KoPictureCollection::insertPicture(const KoPicture& picture)
return insertPicture(picture.getKey(), picture);
}
-KoPicture KoPictureCollection::downloadPicture(const KURL& url, QWidget *window)
+KoPicture KoPictureCollection::downloadPicture(const KURL& url, TQWidget *window)
{
#ifdef DEBUG_PICTURES
kdDebug(30003) << "KoPictureCollection::downloadPicture " << url.prettyURL() << endl;
@@ -99,7 +99,7 @@ KoPicture KoPictureCollection::downloadPicture(const KURL& url, QWidget *window)
return pic;
}
-KoPicture KoPictureCollection::loadPicture(const QString& fileName)
+KoPicture KoPictureCollection::loadPicture(const TQString& fileName)
{
#ifdef DEBUG_PICTURES
kdDebug(30003) << "KoPictureCollection::loadPicture " << fileName << endl;
@@ -122,23 +122,23 @@ KoPicture KoPictureCollection::loadPicture(const QString& fileName)
return c;
}
-QString KoPictureCollection::getFileName(const Type pictureType, KoPicture& picture, int& counter)
+TQString KoPictureCollection::getFileName(const Type pictureType, KoPicture& picture, int& counter)
{
- QString storeURL;
+ TQString storeURL;
// ### TODO: remove "cliparts" when KPresenter is ready for it
if (pictureType==CollectionClipart)
storeURL="cliparts/clipart";
else
storeURL="pictures/picture";
- storeURL+=QString::number(++counter);
+ storeURL+=TQString::number(++counter);
storeURL+='.';
storeURL+=picture.getExtension();
return storeURL;
}
-QString KoPictureCollection::getOasisFileName(const KoPicture& picture) const
+TQString KoPictureCollection::getOasisFileName(const KoPicture& picture) const
{
- QString storeURL( "Pictures/");
+ TQString storeURL( "Pictures/");
if ( !picture.uniquePictureId().isEmpty() )
storeURL+=picture.uniquePictureId();
else
@@ -148,10 +148,10 @@ QString KoPictureCollection::getOasisFileName(const KoPicture& picture) const
return storeURL;
}
-bool KoPictureCollection::saveToStore(const Type pictureType, KoStore *store, const QValueList<KoPictureKey>& keys)
+bool KoPictureCollection::saveToStore(const Type pictureType, KoStore *store, const TQValueList<KoPictureKey>& keys)
{
int counter=0;
- QValueList<KoPictureKey>::const_iterator it = keys.begin();
+ TQValueList<KoPictureKey>::const_iterator it = keys.begin();
for ( ; it != keys.end(); ++it )
{
KoPicture c = findPicture( *it );
@@ -159,7 +159,7 @@ bool KoPictureCollection::saveToStore(const Type pictureType, KoStore *store, co
kdWarning(30003) << "Picture " << (*it).toString() << " not found in collection !" << endl;
else
{
- QString storeURL=getFileName(pictureType, c, counter);
+ TQString storeURL=getFileName(pictureType, c, counter);
if (store->open(storeURL))
{
@@ -174,9 +174,9 @@ bool KoPictureCollection::saveToStore(const Type pictureType, KoStore *store, co
return true;
}
-bool KoPictureCollection::saveOasisToStore( KoStore *store, QValueList<KoPictureKey> keys, KoXmlWriter* manifestWriter )
+bool KoPictureCollection::saveOasisToStore( KoStore *store, TQValueList<KoPictureKey> keys, KoXmlWriter* manifestWriter )
{
- QValueList<KoPictureKey>::Iterator it = keys.begin();
+ TQValueList<KoPictureKey>::Iterator it = keys.begin();
for ( ; it != keys.end(); ++it )
{
KoPicture c = findPicture( *it );
@@ -184,7 +184,7 @@ bool KoPictureCollection::saveOasisToStore( KoStore *store, QValueList<KoPicture
kdWarning(30003) << "Picture " << (*it).toString() << " not found in collection !" << endl;
else
{
- QString storeURL( getOasisFileName(c) );
+ TQString storeURL( getOasisFileName(c) );
if (store->open(storeURL))
{
KoStoreDevice dev(store);
@@ -199,16 +199,16 @@ bool KoPictureCollection::saveOasisToStore( KoStore *store, QValueList<KoPicture
return true;
}
-QDomElement KoPictureCollection::saveXML(const Type pictureType, QDomDocument &doc, QValueList<KoPictureKey> keys)
+TQDomElement KoPictureCollection::saveXML(const Type pictureType, TQDomDocument &doc, TQValueList<KoPictureKey> keys)
{
- QString strElementName("PICTURES");
+ TQString strElementName("PICTURES");
if (pictureType==CollectionImage)
strElementName="PIXMAPS";
else if (pictureType==CollectionClipart)
strElementName="CLIPARTS";
- QDomElement cliparts = doc.createElement( strElementName );
+ TQDomElement cliparts = doc.createElement( strElementName );
int counter=0;
- QValueList<KoPictureKey>::Iterator it = keys.begin();
+ TQValueList<KoPictureKey>::Iterator it = keys.begin();
for ( ; it != keys.end(); ++it )
{
KoPicture picture = findPicture( *it );
@@ -216,8 +216,8 @@ QDomElement KoPictureCollection::saveXML(const Type pictureType, QDomDocument &d
kdWarning(30003) << "Picture " << (*it).toString() << " not found in collection !" << endl;
else
{
- QString pictureName=getFileName(pictureType, picture, counter);
- QDomElement keyElem = doc.createElement( "KEY" );
+ TQString pictureName=getFileName(pictureType, picture, counter);
+ TQDomElement keyElem = doc.createElement( "KEY" );
cliparts.appendChild(keyElem);
(*it).saveAttributes(keyElem);
keyElem.setAttribute("name", pictureName);
@@ -226,13 +226,13 @@ QDomElement KoPictureCollection::saveXML(const Type pictureType, QDomDocument &d
return cliparts;
}
-void KoPictureCollection::readXML( QDomElement& pixmapsElem, QMap <KoPictureKey, QString>& map )
+void KoPictureCollection::readXML( TQDomElement& pixmapsElem, TQMap <KoPictureKey, TQString>& map )
{
- for( QDomNode n = pixmapsElem.firstChild();
+ for( TQDomNode n = pixmapsElem.firstChild();
!n.isNull();
n = n.nextSibling() )
{
- QDomElement keyElement = n.toElement();
+ TQDomElement keyElement = n.toElement();
if (keyElement.isNull()) continue;
if (keyElement.tagName()=="KEY")
{
@@ -244,7 +244,7 @@ void KoPictureCollection::readXML( QDomElement& pixmapsElem, QMap <KoPictureKey,
}
-KoPictureCollection::StoreMap KoPictureCollection::readXML( QDomElement& pixmapsElem )
+KoPictureCollection::StoreMap KoPictureCollection::readXML( TQDomElement& pixmapsElem )
{
StoreMap map;
readXML(pixmapsElem, map);
@@ -266,7 +266,7 @@ void KoPictureCollection::readFromStore( KoStore * store, const StoreMap & store
//kdDebug(30003) << store << endl;
continue;
}
- QString u(it.data());
+ TQString u(it.data());
if (u.isEmpty())
{
// old naming I suppose ?
@@ -285,13 +285,13 @@ void KoPictureCollection::readFromStore( KoStore * store, const StoreMap & store
}
}
- const int pos=u.findRev('.');
+ const int pos=u.tqfindRev('.');
if (pos==-1)
{
kdError(30003) << "File with no extension! Not supported!" << endl;
return;
}
- const QString extension(u.mid(pos+1));
+ const TQString extension(u.mid(pos+1));
KoStoreDevice dev(store);
picture.load(&dev, extension);
@@ -302,10 +302,10 @@ void KoPictureCollection::readFromStore( KoStore * store, const StoreMap & store
}
}
-KoPicture KoPictureCollection::findOrLoad(const QString& fileName, const QDateTime& dateTime)
+KoPicture KoPictureCollection::findOrLoad(const TQString& fileName, const TQDateTime& dateTime)
{
- // As now all KoPictureKey objects have a valid QDateTime, we must do it without a date/time check.
- ConstIterator it = find( KoPictureKey ( fileName, dateTime ) );
+ // As now all KoPictureKey objects have a valid TQDateTime, we must do it without a date/time check.
+ ConstIterator it = tqfind( KoPictureKey ( fileName, dateTime ) );
if ( it == end() )
{
return loadPicture( fileName );
diff --git a/lib/kofficecore/KoPictureCollection.h b/lib/kofficecore/KoPictureCollection.h
index 22277bdd..8071d564 100644
--- a/lib/kofficecore/KoPictureCollection.h
+++ b/lib/kofficecore/KoPictureCollection.h
@@ -22,9 +22,9 @@
#ifndef koPictureCollection_h
#define koPictureCollection_h
-#include <qmap.h>
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include "KoPicture.h"
@@ -37,7 +37,7 @@ class KoXmlWriter;
* A collection of pictures (a key and the picture itself).
*
*/
-class KOFFICECORE_EXPORT KoPictureCollection : public QMap<KoPictureKey, KoPicture>
+class KOFFICECORE_EXPORT KoPictureCollection : public TQMap<KoPictureKey, KoPicture>
{
public:
enum Type {
@@ -71,10 +71,10 @@ public:
* If this file is really remote, it is always downloaded.
* If the file is local, it acts as @ref #loadPicture.
* @param url the URL to download from
- * @param window the parent window for the download. You can pass NULL (0)
+ * @param window the tqparent window for the download. You can pass NULL (0)
* if you absolutely cannot find anything to use.
*/
- KoPicture downloadPicture(const KURL& url, QWidget *window);
+ KoPicture downloadPicture(const KURL& url, TQWidget *window);
/**
* @brief Load a clipart from a file (and insert into the collection).
@@ -83,7 +83,7 @@ public:
* for this clipart. If this key maps to an existing clipart in the
* collection, then this picture is returned, otherwise the file is loaded.
*/
- KoPicture loadPicture( const QString &fileName );
+ KoPicture loadPicture( const TQString &fileName );
/**
* Save the used picturess from the collection into the store
@@ -96,7 +96,7 @@ public:
*
* @todo Reduce lameness of dox for pictureType.
*/
- bool saveToStore(const Type pictureType, KoStore * store, const QValueList<KoPictureKey>& keys );
+ bool saveToStore(const Type pictureType, KoStore * store, const TQValueList<KoPictureKey>& keys );
/**
* Generate the &lt;PICTURES&gt;, &lt;PIXMAPS> or &lt;CLIPARTS> tag, that saves the key and the related
@@ -106,26 +106,26 @@ public:
* @param doc the DOM document in which the tags are to be generated
* @param keys the list of keys
*/
- QDomElement saveXML(const Type pictureType, QDomDocument &doc,
- QValueList<KoPictureKey> keys );
+ TQDomElement saveXML(const Type pictureType, TQDomDocument &doc,
+ TQValueList<KoPictureKey> keys );
- bool saveOasisToStore( KoStore *store, QValueList<KoPictureKey> keys, KoXmlWriter* manifestWriter );
+ bool saveOasisToStore( KoStore *store, TQValueList<KoPictureKey> keys, KoXmlWriter* manifestWriter );
- typedef QMap<KoPictureKey, QString> StoreMap;
+ typedef TQMap<KoPictureKey, TQString> StoreMap;
/**
* Read the &lt;PICTURES&gt;, &lt;PIXMAPS> or &lt;CLIPARTS> tag, and save the result (key<->store-filename associations)
- * into the QMap. You may want to 'new' a QMap in loadXML, and to use and then delete
+ * into the TQMap. You may want to 'new' a TQMap in loadXML, and to use and then delete
* it in completeLoading (to save memory).
*
* @param pixmapsElem the &lt;PICTURES&gt;, &lt;PIXMAPS> or &lt;CLIPARTS> element
*/
- StoreMap readXML( QDomElement &pixmapsElem );
+ StoreMap readXML( TQDomElement &pixmapsElem );
/**
* Helper method for @ref #readFromStore
*/
- void readXML( QDomElement& pixmapsElem, QMap <KoPictureKey, QString>& map );
+ void readXML( TQDomElement& pixmapsElem, TQMap <KoPictureKey, TQString>& map );
/**
* Read all pictures from the store, into this collection
@@ -144,13 +144,13 @@ public:
*
* Formerly, an invalid date/time meant to read the file from disk. This is not the case anymore.
*/
- KoPicture findOrLoad(const QString& fileName, const QDateTime& dateTime);
+ KoPicture findOrLoad(const TQString& fileName, const TQDateTime& dateTime);
/**
* Return filename as url for picture
*
*/
- QString getOasisFileName(const KoPicture& picture) const;
+ TQString getOasisFileName(const KoPicture& picture) const;
/**
* Call it before to save Oasis file
@@ -162,7 +162,7 @@ private:
/**
* @internal
*/
- QString getFileName(const Type pictureType, KoPicture& picture, int& counter);
+ TQString getFileName(const Type pictureType, KoPicture& picture, int& counter);
class Private;
Private* d;
diff --git a/lib/kofficecore/KoPictureEps.cpp b/lib/kofficecore/KoPictureEps.cpp
index 752e2a45..4b47b228 100644
--- a/lib/kofficecore/KoPictureEps.cpp
+++ b/lib/kofficecore/KoPictureEps.cpp
@@ -21,16 +21,16 @@
#include <unistd.h>
#include <stdio.h>
-#include <qbuffer.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <qdragobject.h>
+#include <tqbuffer.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -48,8 +48,8 @@
KoPictureEps::KoPictureEps(void) : m_psStreamStart(0), m_psStreamLength(0), m_cacheIsInFastMode(true)
{
- // Forbid QPixmap to cache the X-Window resources (Yes, it is slower!)
- m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
+ // Forbid TQPixmap to cache the X-Window resources (Yes, it is slower!)
+ m_cachedPixmap.setOptimization(TQPixmap::MemoryOptim);
}
KoPictureEps::~KoPictureEps(void)
@@ -71,12 +71,12 @@ bool KoPictureEps::isNull(void) const
return m_rawData.isNull();
}
-QImage KoPictureEps::scaleWithGhostScript(const QSize& size, const int resolutionx, const int resolutiony )
+TQImage KoPictureEps::scaleWithGhostScript(const TQSize& size, const int resolutionx, const int resolutiony )
{
if (!m_boundingBox.width() || !m_boundingBox.height())
{
kdDebug(30003) << "EPS image has a null size! (in KoPictureEps::scaleWithGhostScript)" << endl;
- return QImage();
+ return TQImage();
}
// ### TODO: do not call GhostScript up to three times for each re-scaling (one call of GhostScript should be enough to know which device is available: gs --help)
@@ -86,7 +86,7 @@ QImage KoPictureEps::scaleWithGhostScript(const QSize& size, const int resolutio
const char* deviceTable[] = { "png16m", "bmp16m", "ppm", 0 };
- QImage img;
+ TQImage img;
for ( int i = 0; deviceTable[i]; ++i)
{
@@ -103,7 +103,7 @@ QImage KoPictureEps::scaleWithGhostScript(const QSize& size, const int resolutio
// Helper method for scaleWithGhostScript. Returns 1 on success, 0 on error, -1 if nothing generated
// (in which case another 'output device' can be tried)
-int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, const int resolutionx, const int resolutiony, const char* device )
+int KoPictureEps::tryScaleWithGhostScript(TQImage &image, const TQSize& size, const int resolutionx, const int resolutiony, const char* device )
// Based on the code of the file kdelibs/kimgio/eps.cpp
{
kdDebug(30003) << "Sampling with GhostScript, using device \"" << device << "\" (in KoPictureEps::tryScaleWithGhostScript)" << endl;
@@ -124,12 +124,12 @@ int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, cons
// create GS command line
- QString cmdBuf ( "gs -sOutputFile=" );
+ TQString cmdBuf ( "gs -sOutputFile=" );
cmdBuf += KProcess::quote(tmpFile.name());
cmdBuf += " -q -g";
- cmdBuf += QString::number( wantedWidth );
+ cmdBuf += TQString::number( wantedWidth );
cmdBuf += "x";
- cmdBuf += QString::number( wantedHeight );
+ cmdBuf += TQString::number( wantedHeight );
if ( ( resolutionx > 0) && ( resolutiony > 0) )
{
@@ -137,9 +137,9 @@ int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, cons
// Do not play with resolution for now.
// It brings more problems at print than solutions
cmdBuf += " -r";
- cmdBuf += QString::number( resolutionx );
+ cmdBuf += TQString::number( resolutionx );
cmdBuf += "x";
- cmdBuf += QString::number( resolutiony );
+ cmdBuf += TQString::number( resolutiony );
#endif
}
@@ -151,7 +151,7 @@ int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, cons
// run ghostview
- FILE* ghostfd = popen (QFile::encodeName(cmdBuf), "w");
+ FILE* ghostfd = popen (TQFile::encodeName(cmdBuf), "w");
if ( ghostfd == 0 )
{
@@ -160,7 +160,7 @@ int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, cons
}
// The translation is needed as GhostScript (7.07) cannot handle negative values in the bounding box otherwise.
- fprintf (ghostfd, "\n%d %d translate\n", -qRound(m_boundingBox.left()*xScale), -qRound(m_boundingBox.top()*yScale));
+ fprintf (ghostfd, "\n%d %d translate\n", -tqRound(m_boundingBox.left()*xScale), -tqRound(m_boundingBox.top()*yScale));
fprintf (ghostfd, "%g %g scale\n", xScale, yScale);
// write image to gs
@@ -185,9 +185,9 @@ int KoPictureEps::tryScaleWithGhostScript(QImage &image, const QSize& size, cons
return 1; // success
}
-void KoPictureEps::scaleAndCreatePixmap(const QSize& size, bool fastMode, const int resolutionx, const int resolutiony )
+void KoPictureEps::scaleAndCreatePixmap(const TQSize& size, bool fastMode, const int resolutionx, const int resolutiony )
{
- kdDebug(30003) << "KoPictureEps::scaleAndCreatePixmap " << size << " " << (fastMode?QString("fast"):QString("slow"))
+ kdDebug(30003) << "KoPictureEps::scaleAndCreatePixmap " << size << " " << (fastMode?TQString("fast"):TQString("slow"))
<< " resolutionx: " << resolutionx << " resolutiony: " << resolutiony << endl;
if ((size==m_cachedSize)
&& ((fastMode) || (!m_cacheIsInFastMode)))
@@ -211,20 +211,20 @@ void KoPictureEps::scaleAndCreatePixmap(const QSize& size, bool fastMode, const
if ( fastMode && !m_cachedSize.isEmpty())
{
kdDebug(30003) << "Fast scaling!" << endl;
- // Slower than caching a QImage, but faster than re-sampling!
- QImage image( m_cachedPixmap.convertToImage() );
+ // Slower than caching a TQImage, but faster than re-sampling!
+ TQImage image( m_cachedPixmap.convertToImage() );
m_cachedPixmap=image.scale( size );
m_cacheIsInFastMode=true;
m_cachedSize=size;
}
else
{
- QTime time;
+ TQTime time;
time.start();
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
m_cachedPixmap = scaleWithGhostScript( size, resolutionx, resolutiony );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_cacheIsInFastMode=false;
m_cachedSize=size;
@@ -233,22 +233,22 @@ void KoPictureEps::scaleAndCreatePixmap(const QSize& size, bool fastMode, const
kdDebug(30003) << "New size: " << size << endl;
}
-void KoPictureEps::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
+void KoPictureEps::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
{
if ( !width || !height )
return;
- QSize screenSize( width, height );
+ TQSize screenSize( width, height );
//kdDebug() << "KoPictureEps::draw screenSize=" << screenSize.width() << "x" << screenSize.height() << endl;
- QPaintDeviceMetrics metrics (painter.device());
+ TQPaintDeviceMetrics metrics (painter.device());
kdDebug(30003) << "Metrics: X: " << metrics.logicalDpiX() << " x Y: " << metrics.logicalDpiX() << " (in KoPictureEps::draw)" << endl;
- if ( painter.device()->isExtDev() ) // Is it an external device (i.e. printer)
+ if ( painter.tqdevice()->isExtDev() ) // Is it an external device (i.e. printer)
{
kdDebug(30003) << "Drawing for a printer (in KoPictureEps::draw)" << endl;
// For printing, always re-sample the image, as a printer has never the same resolution than a display.
- QImage image( scaleWithGhostScript( screenSize, metrics.logicalDpiX(), metrics.logicalDpiY() ) );
+ TQImage image( scaleWithGhostScript( screenSize, metrics.logicalDpiX(), metrics.logicalDpiY() ) );
// sx,sy,sw,sh is meant to be used as a cliprect on the pixmap, but drawImage
// translates it to the (x,y) point -> we need (x+sx, y+sy).
painter.drawImage( x + sx, y + sy, image, sx, sy, sw, sh );
@@ -266,9 +266,9 @@ void KoPictureEps::draw(QPainter& painter, int x, int y, int width, int height,
bool KoPictureEps::extractPostScriptStream( void )
{
kdDebug(30003) << "KoPictureEps::extractPostScriptStream" << endl;
- QDataStream data( m_rawData, IO_ReadOnly );
- data.setByteOrder( QDataStream::LittleEndian );
- Q_UINT32 magic, offset, length;
+ TQDataStream data( m_rawData, IO_ReadOnly );
+ data.setByteOrder( TQDataStream::LittleEndian );
+ TQ_UINT32 magic, offset, length;
data >> magic;
data >> offset;
data >> length;
@@ -287,10 +287,10 @@ bool KoPictureEps::extractPostScriptStream( void )
return true;
}
-QString KoPictureEps::readLine( const QByteArray& array, const uint start, const uint length, uint& pos, bool& lastCharWasCr )
+TQString KoPictureEps::readLine( const TQByteArray& array, const uint start, const uint length, uint& pos, bool& lastCharWasCr )
{
- QString strLine;
- const uint finish = kMin( start + length, array.size() );
+ TQString strLine;
+ const uint finish = kMin( start + length, (uint)array.size() );
for ( ; pos < finish; ++pos ) // We are starting at pos
{
const char ch = array[ pos ]; // Read one character
@@ -330,7 +330,7 @@ QString KoPictureEps::readLine( const QByteArray& array, const uint start, const
}
-bool KoPictureEps::loadData(const QByteArray& array, const QString& /* extension */ )
+bool KoPictureEps::loadData(const TQByteArray& array, const TQString& /* extension */ )
{
kdDebug(30003) << "KoPictureEps::load" << endl;
@@ -356,17 +356,17 @@ bool KoPictureEps::loadData(const QByteArray& array, const QString& /* extension
m_psStreamLength = m_rawData.size();
}
- QString lineBox; // Line with the bounding box
+ TQString lineBox; // Line with the bounding box
bool lastWasCr = false; // Was the last character of the line a carriage return?
uint pos = m_psStreamStart; // We start to search the bounding box at the start of the PostScript stream
- QString line( readLine( m_rawData, m_psStreamStart, m_psStreamLength, pos, lastWasCr ) );
+ TQString line( readLine( m_rawData, m_psStreamStart, m_psStreamLength, pos, lastWasCr ) );
kdDebug(30003) << "Header: " << line << endl;
if (!line.startsWith("%!"))
{
kdError(30003) << "Not a PostScript file!" << endl;
return false;
}
- QRect rect;
+ TQRect rect;
bool lineIsBoundingBox = false; // Does "line" has a %%BoundingBox line?
for(;;)
{
@@ -390,7 +390,7 @@ bool KoPictureEps::loadData(const QByteArray& array, const QString& /* extension
return false;
}
// Floating point values are not allowed in a Bounding Box, but ther are many such files out there...
- QRegExp exp("(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)");
+ TQRegExp exp("(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)\\s(\\-?[0-9]+\\.?[0-9]*)");
if ( exp.search(line) == -1 )
{
// ### TODO: it might be an "(atend)" and the bounding box is in the trailer
@@ -399,7 +399,7 @@ bool KoPictureEps::loadData(const QByteArray& array, const QString& /* extension
kdError(30003) << "Not standard bounding box: " << line << endl;
return false;
}
- kdDebug(30003) << "Reg. Exp. Found: " << exp.capturedTexts() << endl;
+ kdDebug(30003) << "Reg. Exp. Found: " << exp.tqcapturedTexts() << endl;
rect.setLeft((int)exp.cap(1).toDouble());
rect.setTop((int)exp.cap(2).toDouble());
rect.setRight((int)exp.cap(3).toDouble());
@@ -410,30 +410,30 @@ bool KoPictureEps::loadData(const QByteArray& array, const QString& /* extension
return true;
}
-bool KoPictureEps::save(QIODevice* io) const
+bool KoPictureEps::save(TQIODevice* io) const
{
// We save the raw data, to avoid damaging the file by many load/save cycles
- Q_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns Q_LONG but size() Q_ULONG!
+ TQ_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns TQ_LONG but size() TQ_ULONG!
return (size==m_rawData.size());
}
-QSize KoPictureEps::getOriginalSize(void) const
+TQSize KoPictureEps::getOriginalSize(void) const
{
return m_originalSize;
}
-QPixmap KoPictureEps::generatePixmap(const QSize& size, bool smoothScale)
+TQPixmap KoPictureEps::generatePixmap(const TQSize& size, bool smoothScale)
{
scaleAndCreatePixmap(size,!smoothScale, 0, 0);
return m_cachedPixmap;
}
-QString KoPictureEps::getMimeType(const QString&) const
+TQString KoPictureEps::getMimeType(const TQString&) const
{
return "image/x-eps";
}
-QImage KoPictureEps::generateImage(const QSize& size)
+TQImage KoPictureEps::generateImage(const TQSize& size)
{
// 0, 0 == resolution unknown
return scaleWithGhostScript(size, 0, 0);
@@ -443,5 +443,5 @@ void KoPictureEps::clearCache(void)
{
m_cachedPixmap.resize(0, 0);
m_cacheIsInFastMode=true;
- m_cachedSize=QSize();
+ m_cachedSize=TQSize();
}
diff --git a/lib/kofficecore/KoPictureEps.h b/lib/kofficecore/KoPictureEps.h
index ba2a4cb9..23dfdaf4 100644
--- a/lib/kofficecore/KoPictureEps.h
+++ b/lib/kofficecore/KoPictureEps.h
@@ -20,10 +20,10 @@
#ifndef __koPictureEps_h__
#define __koPictureEps_h__
-#include <qstring.h>
+#include <tqstring.h>
-class QPainter;
-class QSize;
+class TQPainter;
+class TQSize;
class KoPictureEpsPrivate;
// TODO: fix documentation
@@ -66,43 +66,43 @@ public:
* Note that the image is being scaled to that size using scale() - except when printing.
* This avoids scaling the image at each paint event.
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
- virtual bool loadData(const QByteArray& array, const QString& extension);
+ virtual bool loadData(const TQByteArray& array, const TQString& extension);
- virtual bool save(QIODevice* io) const;
+ virtual bool save(TQIODevice* io) const;
- virtual QSize getOriginalSize(void) const;
+ virtual TQSize getOriginalSize(void) const;
- virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- virtual QString getMimeType(const QString& extension) const;
+ virtual TQString getMimeType(const TQString& extension) const;
/**
- * Generate a QImage
+ * Generate a TQImage
* (always in slow mode)
*/
- virtual QImage generateImage(const QSize& size);
+ virtual TQImage generateImage(const TQSize& size);
virtual void clearCache(void);
protected:
- QPixmap getPixmap(QImage& image);
- void scaleAndCreatePixmap(const QSize& size, bool fastMode, const int resolutionx, const int resolutiony );
- QImage scaleWithGhostScript( const QSize& size, const int resolutionx, const int resolutiony );
+ TQPixmap getPixmap(TQImage& image);
+ void scaleAndCreatePixmap(const TQSize& size, bool fastMode, const int resolutionx, const int resolutiony );
+ TQImage scaleWithGhostScript( const TQSize& size, const int resolutionx, const int resolutiony );
bool extractPostScriptStream( void );
private:
- int tryScaleWithGhostScript(QImage &image, const QSize& size, const int resolutionx, const int resolutiony, const char* device );
+ int tryScaleWithGhostScript(TQImage &image, const TQSize& size, const int resolutionx, const int resolutiony, const char* device );
/**
- * @brief Read a line from a PostScript stream in a QByteArray
+ * @brief Read a line from a PostScript stream in a TQByteArray
*
- * The PostScript stream is somewhere in the QByteArray and therefore has to be
+ * The PostScript stream is somewhere in the TQByteArray and therefore has to be
* determined by the start and length of this stream and the current position
*
* @param array the array which is read
@@ -113,17 +113,17 @@ private:
* to skip an eventual Line Feed at the start of this line
* @return the read line
*/
- QString readLine( const QByteArray& array, const uint start, const uint length, uint& pos, bool& lastCharWasCr );
+ TQString readLine( const TQByteArray& array, const uint start, const uint length, uint& pos, bool& lastCharWasCr );
private:
/**
* Copy of the loaded EPS file
*/
- QByteArray m_rawData;
- QPixmap m_cachedPixmap; ///< Cached pixmap
- QSize m_originalSize; ///< Original size of the EPS picture
- QSize m_cachedSize; ///< size of the currently cached pixmap @see m_cachedPixmap
- QRect m_boundingBox; ///< Bounding box, as read from the EPS file
+ TQByteArray m_rawData;
+ TQPixmap m_cachedPixmap; ///< Cached pixmap
+ TQSize m_originalSize; ///< Original size of the EPS picture
+ TQSize m_cachedSize; ///< size of the currently cached pixmap @see m_cachedPixmap
+ TQRect m_boundingBox; ///< Bounding box, as read from the EPS file
uint m_psStreamStart; ///< Start position of the PostScript stream (like if it was a MS-DOS EPS file)
uint m_psStreamLength; ///< Lenght of the PostScript stream (like if it was a MS-DOS EPS file)
/**
diff --git a/lib/kofficecore/KoPictureImage.cpp b/lib/kofficecore/KoPictureImage.cpp
index 02110760..c0775ac7 100644
--- a/lib/kofficecore/KoPictureImage.cpp
+++ b/lib/kofficecore/KoPictureImage.cpp
@@ -24,17 +24,17 @@
#include <kdebug.h>
#include <kmimetype.h>
-#include <qbuffer.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <qdragobject.h>
+#include <tqbuffer.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
KoPictureImage::KoPictureImage(void) : m_cacheIsInFastMode(true)
{
- // Forbid QPixmap to cache the X-Window resources (Yes, it is slower!)
- m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
+ // Forbid TQPixmap to cache the X-Window resources (Yes, it is slower!)
+ m_cachedPixmap.setOptimization(TQPixmap::MemoryOptim);
}
KoPictureImage::~KoPictureImage(void)
@@ -56,7 +56,7 @@ bool KoPictureImage::isNull(void) const
return m_originalImage.isNull();
}
-void KoPictureImage::scaleAndCreatePixmap(const QSize& size, bool fastMode)
+void KoPictureImage::scaleAndCreatePixmap(const TQSize& size, bool fastMode)
{
if ((size==m_cachedSize)
&& ((fastMode) || (!m_cacheIsInFastMode)))
@@ -75,27 +75,27 @@ void KoPictureImage::scaleAndCreatePixmap(const QSize& size, bool fastMode)
fastMode = true;
}
- // Use QImage::scale if we have fastMode==true
+ // Use TQImage::scale if we have fastMode==true
if ( fastMode )
{
- m_cachedPixmap.convertFromImage(m_originalImage.scale( size ), QPixmap::Color); // Always color or else B/W can be reversed
+ m_cachedPixmap.convertFromImage(m_originalImage.scale( size ), TQPixmap::Color); // Always color or else B/W can be reversed
m_cacheIsInFastMode=true;
}
else
{
- m_cachedPixmap.convertFromImage(m_originalImage.smoothScale( size ), QPixmap::Color); // Always color or else B/W can be reversed
+ m_cachedPixmap.convertFromImage(m_originalImage.smoothScale( size ), TQPixmap::Color); // Always color or else B/W can be reversed
m_cacheIsInFastMode=false;
}
m_cachedSize=size;
}
-void KoPictureImage::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
+void KoPictureImage::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
{
//kdDebug() << "KoImage::draw currentSize:" << currentSize.width() << "x" << currentSize.height() << endl;
if ( !width || !height )
return;
- QSize origSize = getOriginalSize();
- const bool scaleImage = painter.device()->isExtDev() // we are printing
+ TQSize origSize = getOriginalSize();
+ const bool scaleImage = painter.tqdevice()->isExtDev() // we are printing
&& ((width <= origSize.width()) || (height <= origSize.height()));
if( scaleImage )
{
@@ -107,14 +107,14 @@ void KoPictureImage::draw(QPainter& painter, int x, int y, int width, int height
painter.translate( x, y );
painter.scale( xScale, yScale );
// Note that sx, sy, sw and sh are unused in this case. Not a problem, since it's about printing.
- // Note 2: we do not cache the QPixmap. As we are printing, the next time we will probably
+ // Note 2: we do not cache the TQPixmap. As we are printing, the next time we will probably
// need again the screen version.
painter.drawImage(0, 0, m_originalImage);
painter.restore();
}
else
{
- QSize screenSize( width, height );
+ TQSize screenSize( width, height );
//kdDebug() << "KoPictureImage::draw screenSize=" << screenSize.width() << "x" << screenSize.height() << endl;
scaleAndCreatePixmap(screenSize, fastMode);
@@ -125,13 +125,13 @@ void KoPictureImage::draw(QPainter& painter, int x, int y, int width, int height
}
}
-bool KoPictureImage::loadData(const QByteArray& array, const QString& /* extension*/ )
+bool KoPictureImage::loadData(const TQByteArray& array, const TQString& /* extension*/ )
{
m_rawData=array;
// Second, create the original image
- QBuffer buffer(m_rawData);
+ TQBuffer buffer(m_rawData);
buffer.open(IO_ReadWrite);
- QImageIO imageIO(&buffer,NULL);
+ TQImageIO imageIO(&buffer,NULL);
if (!imageIO.read())
{
@@ -145,42 +145,42 @@ bool KoPictureImage::loadData(const QByteArray& array, const QString& /* extensi
return true;
}
-bool KoPictureImage::save(QIODevice* io) const
+bool KoPictureImage::save(TQIODevice* io) const
{
kdDebug() << k_funcinfo << "writing raw data. size=" << m_rawData.size() << endl;
// We save the raw data, to avoid damaging the file by many load/save cycles (especially for JPEG)
- Q_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns Q_LONG but size() Q_ULONG!
+ TQ_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns TQ_LONG but size() TQ_ULONG!
return (size==m_rawData.size());
}
-QSize KoPictureImage::getOriginalSize(void) const
+TQSize KoPictureImage::getOriginalSize(void) const
{
return m_originalImage.size();
}
-QPixmap KoPictureImage::generatePixmap(const QSize& size, bool smoothScale)
+TQPixmap KoPictureImage::generatePixmap(const TQSize& size, bool smoothScale)
{
scaleAndCreatePixmap(size,!smoothScale);
return m_cachedPixmap;
}
-QString KoPictureImage::getMimeType(const QString& extension) const
+TQString KoPictureImage::getMimeType(const TQString& extension) const
{
- QString fileName("/tmp/temp.");
+ TQString fileName("/tmp/temp.");
fileName+=extension;
// Find the mimetype only by the extension, not by file content (as the file is empty!)
- const QString mimetype( KMimeType::findByPath( fileName, 0 ,true )->name() );
+ const TQString mimetype( KMimeType::findByPath( fileName, 0 ,true )->name() );
// ### TODO: use KMimeType::findByContent (but then the mimetype probably need to be cached)
kdDebug(30003) << "Image is mime type: " << mimetype << endl;
return mimetype;
}
-QDragObject* KoPictureImage::dragObject( QWidget *dragSource, const char *name )
+TQDragObject* KoPictureImage::dragObject( TQWidget *dragSource, const char *name )
{
- return new QImageDrag( m_originalImage, dragSource, name );
+ return new TQImageDrag( m_originalImage, dragSource, name );
}
-QImage KoPictureImage::generateImage(const QSize& size)
+TQImage KoPictureImage::generateImage(const TQSize& size)
{
// We do not cache the image, as we will seldom need it again.
return m_originalImage.smoothScale( size );
@@ -190,5 +190,5 @@ void KoPictureImage::clearCache(void)
{
m_cachedPixmap.resize(0, 0);
m_cacheIsInFastMode=true;
- m_cachedSize=QSize();
+ m_cachedSize=TQSize();
}
diff --git a/lib/kofficecore/KoPictureImage.h b/lib/kofficecore/KoPictureImage.h
index 98d7d588..4647ba42 100644
--- a/lib/kofficecore/KoPictureImage.h
+++ b/lib/kofficecore/KoPictureImage.h
@@ -21,14 +21,14 @@
#define __koPictureImage_h__
#include "KoPictureBase.h"
-#include <qstring.h>
+#include <tqstring.h>
class KoPictureImagePrivate;
// TODO: fix documentation
/**
* @internal
- * KoPictureImage is a container class for a QImage-based picture
+ * KoPictureImage is a container class for a TQImage-based picture
* \todo remove private class, as the header is not installed
*/
class KoPictureImage : public KoPictureBase
@@ -65,31 +65,31 @@ public:
* Note that the image is being scaled to that size using scale() - except when printing.
* This avoids scaling the image at each paint event.
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
- virtual QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
+ virtual TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
- virtual bool loadData(const QByteArray& array, const QString& extension);
+ virtual bool loadData(const TQByteArray& array, const TQString& extension);
- virtual bool save(QIODevice* io) const;
+ virtual bool save(TQIODevice* io) const;
- virtual QSize getOriginalSize(void) const;
+ virtual TQSize getOriginalSize(void) const;
- virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- virtual QString getMimeType(const QString& extension) const;
+ virtual TQString getMimeType(const TQString& extension) const;
/**
- * Generate a QImage
+ * Generate a TQImage
* (always in slow mode)
*/
- virtual QImage generateImage(const QSize& size);
+ virtual TQImage generateImage(const TQSize& size);
virtual bool hasAlphaBuffer() const
{ return m_originalImage.hasAlphaBuffer(); }
@@ -97,20 +97,20 @@ public:
virtual void setAlphaBuffer(bool enable)
{ m_originalImage.setAlphaBuffer(enable); }
- virtual QImage createAlphaMask(int conversion_flags = 0) const
- { return m_originalImage.createAlphaMask(conversion_flags); }
+ virtual TQImage createAlphaMask(int conversion_flags = 0) const
+ { return m_originalImage.createAlphaMask((Qt::ImageConversionFlags)conversion_flags); }
virtual void clearCache(void);
protected:
- QPixmap getPixmap(QImage& image);
- void scaleAndCreatePixmap(const QSize& size, bool fastMode=false);
+ TQPixmap getPixmap(TQImage& image);
+ void scaleAndCreatePixmap(const TQSize& size, bool fastMode=false);
private:
- QImage m_originalImage; ///< Image as Qimage
- QByteArray m_rawData; ///< Binary copy of the loaded image file
- QPixmap m_cachedPixmap; ///< Cached pixmap
- QSize m_cachedSize; ///< size of the currently cached pixmap @see m_cachedPixmap
+ TQImage m_originalImage; ///< Image as Qimage
+ TQByteArray m_rawData; ///< Binary copy of the loaded image file
+ TQPixmap m_cachedPixmap; ///< Cached pixmap
+ TQSize m_cachedSize; ///< size of the currently cached pixmap @see m_cachedPixmap
/**
* true, if the last cached image was done using fast mode.
* false, if the last cached image was done using slow mode.
diff --git a/lib/kofficecore/KoPictureKey.cpp b/lib/kofficecore/KoPictureKey.cpp
index ef60cfed..0badb429 100644
--- a/lib/kofficecore/KoPictureKey.cpp
+++ b/lib/kofficecore/KoPictureKey.cpp
@@ -19,20 +19,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "KoPictureKey.h"
-static void resetDateTimeToEpoch(QDateTime& dt)
+static void resetDateTimeToEpoch(TQDateTime& dt)
{
// set the time point to 1970-01-01
- dt.setDate(QDate(1970,1,1));
- dt.setTime(QTime(0,0));
- // Note: we cannot use QDateTime;;setTime_t as it makes a local time correction! (### TODO: not true anymore with recent Qt versions)
+ dt.setDate(TQDate(1970,1,1));
+ dt.setTime(TQTime(0,0));
+ // Note: we cannot use TQDateTime;;setTime_t as it makes a local time correction! (### TODO: not true anymore with recent TQt versions)
}
KoPictureKey::KoPictureKey()
@@ -40,7 +40,7 @@ KoPictureKey::KoPictureKey()
resetDateTimeToEpoch(m_lastModified);
}
-KoPictureKey::KoPictureKey( const QString &fn, const QDateTime &mod )
+KoPictureKey::KoPictureKey( const TQString &fn, const TQDateTime &mod )
: m_filename( fn ), m_lastModified( mod )
{
if (!m_lastModified.isValid())
@@ -50,7 +50,7 @@ KoPictureKey::KoPictureKey( const QString &fn, const QDateTime &mod )
}
}
-KoPictureKey::KoPictureKey( const QString &fn )
+KoPictureKey::KoPictureKey( const TQString &fn )
: m_filename( fn )
{
resetDateTimeToEpoch(m_lastModified);
@@ -79,10 +79,10 @@ bool KoPictureKey::operator<( const KoPictureKey &key ) const
return key.toString() < toString();
}
-void KoPictureKey::saveAttributes( QDomElement &elem ) const
+void KoPictureKey::saveAttributes( TQDomElement &elem ) const
{
- QDate date = m_lastModified.date();
- QTime time = m_lastModified.time();
+ TQDate date = m_lastModified.date();
+ TQTime time = m_lastModified.time();
elem.setAttribute( "filename", m_filename );
elem.setAttribute( "year", date.year() );
elem.setAttribute( "month", date.month() );
@@ -93,7 +93,7 @@ void KoPictureKey::saveAttributes( QDomElement &elem ) const
elem.setAttribute( "msec", time.msec() );
}
-void KoPictureKey::loadAttributes( const QDomElement &elem )
+void KoPictureKey::loadAttributes( const TQDomElement &elem )
{
// Default date/time is the *nix epoch: 1970-01-01 00:00:00,000
int year=1970, month=1, day=1;
@@ -125,8 +125,8 @@ void KoPictureKey::loadAttributes( const QDomElement &elem )
if( elem.hasAttribute( "msec" ) )
msec=elem.attribute( "msec" ).toInt();
- m_lastModified.setDate( QDate( year, month, day ) );
- m_lastModified.setTime( QTime( hour, minute, second, msec ) );
+ m_lastModified.setDate( TQDate( year, month, day ) );
+ m_lastModified.setTime( TQTime( hour, minute, second, msec ) );
if (!m_lastModified.isValid())
{
@@ -136,16 +136,16 @@ void KoPictureKey::loadAttributes( const QDomElement &elem )
}
}
-QString KoPictureKey::toString() const
+TQString KoPictureKey::toString() const
{
- // We do not use the default QDateTime::toString has it does not show microseconds
- return QString::fromLatin1( "%1 %2" )
- .arg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") );
+ // We do not use the default TQDateTime::toString has it does not show microseconds
+ return TQString::tqfromLatin1( "%1 %2" )
+ .tqarg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") );
}
-void KoPictureKey::setKeyFromFile (const QString& filename)
+void KoPictureKey::setKeyFromFile (const TQString& filename)
{
- QFileInfo inf(filename);
+ TQFileInfo inf(filename);
m_filename = filename;
m_lastModified = inf.lastModified();
}
diff --git a/lib/kofficecore/KoPictureKey.h b/lib/kofficecore/KoPictureKey.h
index d336215b..09cf6320 100644
--- a/lib/kofficecore/KoPictureKey.h
+++ b/lib/kofficecore/KoPictureKey.h
@@ -20,35 +20,35 @@
#ifndef __koPictureKey_h__
#define __koPictureKey_h__
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <koffice_export.h>
/**
* \file koPictureKey.h
* \todo correct documentation (for example: sed "s/image/picture/g")
*/
-class QDomElement;
+class TQDomElement;
namespace KoPictureType
{
/**
- * QPicture version used by KoPictureClipart
+ * TQPicture version used by KoPictureClipart
*
* Possible values:
- * \li 3 for Qt 2.1.x and later Qt 2.x
- * \li 4 for Qt 3.0
- * \li 5 for Qt 3.1 and later Qt 3.x
- * \li -1 for current Qt
+ * \li 3 for TQt 2.1.x and later TQt 2.x
+ * \li 4 for TQt 3.0
+ * \li 5 for TQt 3.1 and later TQt 3.x
+ * \li -1 for current TQt
*/
- const int formatVersionQPicture=-1;
+ const int formatVersionTQPicture=-1;
enum Type
{
TypeUnknown = 0, ///< Unknown or not-an-image @see KoPictureBase
- TypeImage, ///< Image, QImage-based @see KoPictureImage
+ TypeImage, ///< Image, TQImage-based @see KoPictureImage
TypeEps, ///< Encapsulated Postscript @see KoPictureEps
- TypeClipart, ///< Clipart, QPicture-based @see KoPictureClipart
+ TypeClipart, ///< Clipart, TQPicture-based @see KoPictureClipart
TypeWmf ///< WMF (Windows Meta File) @see KoPictureWmf
};
}
@@ -61,8 +61,8 @@ namespace KoPictureType
* @short Structure describing a picture on disk
*
* @note We use the *nix epoch (1970-01-01) as a time base because it is a valid date.
- * That way we do not depend on a behaviour of the current QDateTime that might change in future versions of Qt
- * and we are also nice to non-Qt programs wanting to read KOffice's files.
+ * That way we do not depend on a behaviour of the current TQDateTime that might change in future versions of TQt
+ * and we are also nice to non-TQt programs wanting to read KOffice's files.
*
* @note This behaviour is also needed for re-saving KWord files having \<FORMAT id="2"\>. When saving again,
* these files get a \<KEY\> element as child of \<PIXMAPS\> but not one as child of \<FORMAT\> and \<IMAGE\>.
@@ -87,13 +87,13 @@ public:
* to update the file and import it into the application again, without
* the application reusing the old copy from the collection.
*/
- KoPictureKey( const QString &fn, const QDateTime &mod );
+ KoPictureKey( const TQString &fn, const TQDateTime &mod );
/**
* Constructs a key from a filename
* @note The modification date is set to 1970-01-01
*/
- KoPictureKey( const QString &fn );
+ KoPictureKey( const TQString &fn );
/**
* Copy constructor
@@ -119,36 +119,36 @@ public:
/**
* Convert this key into a string representation of it
*/
- QString toString() const;
+ TQString toString() const;
/**
* Save this key in XML (as %KOffice 1.3)
*/
- void saveAttributes( QDomElement &elem ) const;
+ void saveAttributes( TQDomElement &elem ) const;
/**
* Load this key from XML (as %KOffice 1.3)
*/
- void loadAttributes( const QDomElement &elem );
+ void loadAttributes( const TQDomElement &elem );
/**
* First part of the key: the filename
*/
- QString filename() const { return m_filename; }
+ TQString filename() const { return m_filename; }
/**
* Second part of the key: the modification date
*/
- QDateTime lastModified() const { return m_lastModified; }
+ TQDateTime lastModified() const { return m_lastModified; }
/**
* Sets the key according to @p filename, including modification time
*/
- void setKeyFromFile (const QString& filename);
+ void setKeyFromFile (const TQString& filename);
protected:
- QString m_filename;
- QDateTime m_lastModified;
+ TQString m_filename;
+ TQDateTime m_lastModified;
};
#endif /* __koPictureKey_h__ */
diff --git a/lib/kofficecore/KoPictureShared.cpp b/lib/kofficecore/KoPictureShared.cpp
index 5c2ff2a2..16fea2ef 100644
--- a/lib/kofficecore/KoPictureShared.cpp
+++ b/lib/kofficecore/KoPictureShared.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qfile.h>
+#include <tqpainter.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kurl.h>
@@ -45,9 +45,9 @@ void KoPictureShared::assignPictureId( uint _id)
m_pictureId = _id;
}
-QString KoPictureShared::uniquePictureId() const
+TQString KoPictureShared::uniquePictureId() const
{
- return "Pictures"+ QString::number(m_pictureId);
+ return "Pictures"+ TQString::number(m_pictureId);
}
KoPictureShared::~KoPictureShared(void)
@@ -56,7 +56,7 @@ KoPictureShared::~KoPictureShared(void)
}
KoPictureShared::KoPictureShared(const KoPictureShared &other)
- : QShared() // Some compilers want it explicitly!
+ : TQShared() // Some compilers want it explicitly!
{
// We need to use newCopy, because we want a real copy, not just a copy of the part of KoPictureBase
if (other.m_base)
@@ -89,7 +89,7 @@ bool KoPictureShared::isNull(void) const
return true;
}
-void KoPictureShared::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
+void KoPictureShared::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
{
if (m_base)
m_base->draw(painter, x, y, width, height, sx, sy, sw, sh, fastMode);
@@ -98,27 +98,27 @@ void KoPictureShared::draw(QPainter& painter, int x, int y, int width, int heigh
// Draw a red box (easier DEBUG)
kdWarning(30003) << "Drawing red rectangle! (KoPictureShared::draw)" << endl;
painter.save();
- painter.setBrush(QColor(255,0,0));
+ painter.setBrush(TQColor(255,0,0));
painter.drawRect(x,y,width,height);
painter.restore();
}
}
-bool KoPictureShared::loadWmf(QIODevice* io)
+bool KoPictureShared::loadWmf(TQIODevice* io)
{
kdDebug(30003) << "KoPictureShared::loadWmf" << endl;
if (!io)
{
- kdError(30003) << "No QIODevice!" << endl;
+ kdError(30003) << "No TQIODevice!" << endl;
return false;
}
clear();
- // The extension .wmf was used (KOffice 1.1.x) for QPicture files
+ // The extension .wmf was used (KOffice 1.1.x) for TQPicture files
// For an extern file or in the storage, .wmf can mean a real Windows Meta File.
- QByteArray array ( io->readAll() );
+ TQByteArray array ( io->readAll() );
if ((array[0]=='Q') && (array[1]=='P') &&(array[2]=='I') && (array[3]=='C'))
{
@@ -133,25 +133,25 @@ bool KoPictureShared::loadWmf(QIODevice* io)
return m_base->loadData(array, m_extension);
}
-bool KoPictureShared::loadTmp(QIODevice* io)
+bool KoPictureShared::loadTmp(TQIODevice* io)
// We have a temp file, probably from a downloaded file
// We must check the file type
{
kdDebug(30003) << "KoPictureShared::loadTmp" << endl;
if (!io)
{
- kdError(30003) << "No QIODevice!" << endl;
+ kdError(30003) << "No TQIODevice!" << endl;
return false;
}
- // The extension .wmf was used (KOffice 1.1.x) for QPicture files
+ // The extension .wmf was used (KOffice 1.1.x) for TQPicture files
// For an extern file or in the storage, .wmf can mean a real Windows Meta File.
- QByteArray array ( io->readAll() );
+ TQByteArray array ( io->readAll() );
return identifyAndLoad( array );
}
-bool KoPictureShared::identifyAndLoad( QByteArray array )
+bool KoPictureShared::identifyAndLoad( TQByteArray array )
{
if ( array.size() < 5 )
{
@@ -159,11 +159,11 @@ bool KoPictureShared::identifyAndLoad( QByteArray array )
return false;
}
- QString strExtension;
+ TQString strExtension;
bool flag=false;
// Try to find the file type by comparing magic on the first few bytes!
- // ### TODO: could not QImageIO::imageFormat do it too? (At least most of them?)
+ // ### TODO: could not TQImageIO::imageFormat do it too? (At least most of them?)
if ((array[0]==char(0x89)) && (array[1]=='P') &&(array[2]=='N') && (array[3]=='G'))
{
strExtension="png";
@@ -205,19 +205,19 @@ bool KoPictureShared::identifyAndLoad( QByteArray array )
else if ( ( array[0] == char( 0037 ) ) && ( array[1] == char( 0213 ) ) )
{
// Gzip
- QBuffer buffer(array);
+ TQBuffer buffer(array);
buffer.open(IO_ReadOnly);
- const bool flag = loadCompressed( &buffer, "application/x-gzip", "tmp" );
+ const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-gzip", "tmp" );
buffer.close();
return flag;
}
else if ( ( array[0] == 'B' ) && ( array[1] == 'Z' ) && ( array[2] == 'h') )
{
// BZip2
- QBuffer buffer(array);
+ TQBuffer buffer(array);
buffer.open(IO_ReadOnly);
- const bool flag = loadCompressed( &buffer, "application/x-bzip2", "tmp" );
+ const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-bzip2", "tmp" );
buffer.close();
return flag;
}
@@ -226,17 +226,17 @@ bool KoPictureShared::identifyAndLoad( QByteArray array )
kdDebug(30003) << "Cannot identify the type of temp file!"
<< " Trying to convert to PNG! (in KoPictureShared::loadTmp" << endl;
- // Do not trust QBuffer and do not work directly on the QByteArray array
+ // Do not trust TQBuffer and do not work directly on the TQByteArray array
// DF: It would be faster to work on array here, and to create a completely
- // different QBuffer for the writing code!
- QBuffer buf( array.copy() );
+ // different TQBuffer for the writing code!
+ TQBuffer buf( array.copy() );
if (!buf.open(IO_ReadOnly))
{
kdError(30003) << "Could not open read buffer!" << endl;
return false;
}
- QImageIO imageIO(&buf,NULL);
+ TQImageIO imageIO(&buf,NULL);
if (!imageIO.read())
{
@@ -252,7 +252,7 @@ bool KoPictureShared::identifyAndLoad( QByteArray array )
return false;
}
- imageIO.setIODevice(&buf);
+ imageIO.setIODevice(TQT_TQIODEVICE(&buf));
imageIO.setFormat("PNG");
if (!imageIO.write())
@@ -279,12 +279,12 @@ bool KoPictureShared::identifyAndLoad( QByteArray array )
-bool KoPictureShared::loadXpm(QIODevice* io)
+bool KoPictureShared::loadXpm(TQIODevice* io)
{
kdDebug(30003) << "KoPictureShared::loadXpm" << endl;
if (!io)
{
- kdError(30003) << "No QIODevice!" << endl;
+ kdError(30003) << "No TQIODevice!" << endl;
return false;
}
@@ -293,13 +293,13 @@ bool KoPictureShared::loadXpm(QIODevice* io)
// Old KPresenter XPM files have char(1) instead of some "
// Therefore we need to treat XPM separately
- QByteArray array=io->readAll();
+ TQByteArray array=io->readAll();
// As XPM files are normally only ASCII files, we can replace it without problems
int pos=0;
- while ((pos=array.find(char(1),pos))!=-1)
+ while ((pos=array.tqfind(char(1),pos))!=-1)
{
array[pos]='"';
}
@@ -308,13 +308,13 @@ bool KoPictureShared::loadXpm(QIODevice* io)
m_base=new KoPictureImage();
- QBuffer buffer(array);
- bool check = m_base->load(&buffer,"xpm");
+ TQBuffer buffer(array);
+ bool check = m_base->load(TQT_TQIODEVICE(&buffer),"xpm");
setExtension("xpm");
return check;
}
-bool KoPictureShared::save(QIODevice* io) const
+bool KoPictureShared::save(TQIODevice* io) const
{
if (!io)
return false;
@@ -337,12 +337,12 @@ void KoPictureShared::clear(void)
m_base=NULL;
}
-void KoPictureShared::clearAndSetMode(const QString& newMode)
+void KoPictureShared::clearAndSetMode(const TQString& newMode)
{
delete m_base;
m_base=NULL;
- const QString mode=newMode.lower();
+ const TQString mode=newMode.lower();
if ((mode=="svg") || (mode=="qpic"))
{
@@ -357,42 +357,42 @@ void KoPictureShared::clearAndSetMode(const QString& newMode)
m_base=new KoPictureEps();
}
else
- { // TODO: test if QImageIO really knows the file format
+ { // TODO: test if TQImageIO really knows the file format
m_base=new KoPictureImage();
}
}
-QString KoPictureShared::getExtension(void) const
+TQString KoPictureShared::getExtension(void) const
{
return m_extension;
}
-void KoPictureShared::setExtension(const QString& extension)
+void KoPictureShared::setExtension(const TQString& extension)
{
m_extension = extension;
}
-QString KoPictureShared::getMimeType(void) const
+TQString KoPictureShared::getMimeType(void) const
{
if (m_base)
return m_base->getMimeType(m_extension);
- return QString(NULL_MIME_TYPE);
+ return TQString(NULL_MIME_TYPE);
}
-bool KoPictureShared::loadFromBase64( const QCString& str )
+bool KoPictureShared::loadFromBase64( const TQCString& str )
{
clear();
- QByteArray data;
+ TQByteArray data;
KCodecs::base64Decode( str, data );
return identifyAndLoad( data );
}
-bool KoPictureShared::load(QIODevice* io, const QString& extension)
+bool KoPictureShared::load(TQIODevice* io, const TQString& extension)
{
- kdDebug(30003) << "KoPictureShared::load(QIODevice*, const QString&) " << extension << endl;
+ kdDebug(30003) << "KoPictureShared::load(TQIODevice*, const TQString&) " << extension << endl;
bool flag=false;
- QString ext(extension.lower());
+ TQString ext(extension.lower());
if (ext=="wmf")
flag=loadWmf(io);
else if (ext=="tmp") // ### TODO: also remote scripts need this, don't they?
@@ -423,7 +423,7 @@ bool KoPictureShared::load(QIODevice* io, const QString& extension)
return flag;
}
-bool KoPictureShared::loadFromFile(const QString& fileName)
+bool KoPictureShared::loadFromFile(const TQString& fileName)
{
kdDebug(30003) << "KoPictureShared::loadFromFile " << fileName << endl;
if ( fileName.isEmpty() )
@@ -431,54 +431,54 @@ bool KoPictureShared::loadFromFile(const QString& fileName)
kdError(30003) << "Cannot load file with empty name!" << endl;
return false;
}
- QFile file(fileName);
+ TQFile file(fileName);
if (!file.open(IO_ReadOnly))
return false;
bool flag = false;
- const int pos=fileName.findRev('.');
+ const int pos=fileName.tqfindRev('.');
if (pos==-1)
{
kdDebug(30003) << "File with no extension!" << endl;
// As we have no extension, consider it like a temporary file
- flag = loadTmp( &file );
+ flag = loadTmp( TQT_TQIODEVICE(&file) );
}
else
{
- const QString extension( fileName.mid( pos+1 ) );
+ const TQString extension( fileName.mid( pos+1 ) );
// ### TODO: check if the extension if gz or bz2 and find the previous extension
- flag = load( &file, extension );
+ flag = load( TQT_TQIODEVICE(&file), extension );
}
file.close();
return flag;
}
-QSize KoPictureShared::getOriginalSize(void) const
+TQSize KoPictureShared::getOriginalSize(void) const
{
if (m_base)
return m_base->getOriginalSize();
- return QSize(0,0);
+ return TQSize(0,0);
}
-QPixmap KoPictureShared::generatePixmap(const QSize& size, bool smoothScale)
+TQPixmap KoPictureShared::generatePixmap(const TQSize& size, bool smoothScale)
{
if (m_base)
return m_base->generatePixmap(size, smoothScale);
- return QPixmap();
+ return TQPixmap();
}
-QDragObject* KoPictureShared::dragObject( QWidget *dragSource, const char *name )
+TQDragObject* KoPictureShared::dragObject( TQWidget *dragSource, const char *name )
{
if (m_base)
return m_base->dragObject( dragSource, name );
return 0L;
}
-QImage KoPictureShared::generateImage(const QSize& size)
+TQImage KoPictureShared::generateImage(const TQSize& size)
{
if (m_base)
return m_base->generateImage( size );
- return QImage();
+ return TQImage();
}
bool KoPictureShared::hasAlphaBuffer() const
@@ -494,11 +494,11 @@ void KoPictureShared::setAlphaBuffer(bool enable)
m_base->setAlphaBuffer(enable);
}
-QImage KoPictureShared::createAlphaMask(int conversion_flags) const
+TQImage KoPictureShared::createAlphaMask(int conversion_flags) const
{
if (m_base)
return m_base->createAlphaMask(conversion_flags);
- return QImage();
+ return TQImage();
}
void KoPictureShared::clearCache(void)
@@ -507,10 +507,10 @@ void KoPictureShared::clearCache(void)
m_base->clearCache();
}
-bool KoPictureShared::loadCompressed( QIODevice* io, const QString& mimeType, const QString& extension )
+bool KoPictureShared::loadCompressed( TQIODevice* io, const TQString& mimeType, const TQString& extension )
{
// ### TODO: check that we do not have an endless recursion
- QIODevice* in = KFilterDev::device( io, mimeType, false);
+ TQIODevice* in = KFilterDev::device( io, mimeType, false);
if ( !in )
{
diff --git a/lib/kofficecore/KoPictureShared.h b/lib/kofficecore/KoPictureShared.h
index da286368..f90c91e4 100644
--- a/lib/kofficecore/KoPictureShared.h
+++ b/lib/kofficecore/KoPictureShared.h
@@ -20,16 +20,16 @@
#ifndef __koPictureShared_h__
#define __koPictureShared_h__
-#include <qshared.h>
-#include <qstring.h>
-#include <qiodevice.h>
-#include <qpixmap.h>
+#include <tqshared.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
+#include <tqpixmap.h>
#include "KoPictureKey.h"
class KoXmlWriter;
-class QPainter;
-class QSize;
+class TQPainter;
+class TQSize;
class KURL;
@@ -39,9 +39,9 @@ class KoPictureBase;
* @internal
* KoPictureShared is the class that contains the shared part for KoPicture
*
- * @warning As with all QShared objects, the sharing is neither automatic nor transparent!
+ * @warning As with all TQShared objects, the sharing is neither automatic nor transparent!
*/
-class KoPictureShared : public QShared
+class KoPictureShared : public TQShared
{
public:
/**
@@ -82,29 +82,29 @@ public:
*
* The parameters @p width, @p height define the desired size for the picture
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
/**
* Create a dragobject containing this picture.
* @param dragSource must be 0 when copying to the clipboard
* @return 0L if the picture is null!
*/
- QDragObject* dragObject( QWidget *dragSource = 0L, const char *name = 0L );
+ TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
- bool load(QIODevice* io, const QString& extension);
- bool loadFromBase64( const QCString& str );
+ bool load(TQIODevice* io, const TQString& extension);
+ bool loadFromBase64( const TQCString& str );
/**
- * Save picture into a QIODevice
- * @param io QIODevice used for saving
+ * Save picture into a TQIODevice
+ * @param io TQIODevice used for saving
*/
- bool save(QIODevice* io) const;
+ bool save(TQIODevice* io) const;
/**
* OASIS FlatXML support:
@@ -112,18 +112,18 @@ public:
*/
bool saveAsBase64( KoXmlWriter& writer ) const;
- void setExtension(const QString& extension);
+ void setExtension(const TQString& extension);
- QString getExtension(void) const;
+ TQString getExtension(void) const;
- QSize getOriginalSize(void) const;
+ TQSize getOriginalSize(void) const;
/**
* Clear and set the mode of this KoPictureShared
*
* @param newMode file extension (like "png") giving the wanted mode
*/
- void clearAndSetMode(const QString& newMode);
+ void clearAndSetMode(const TQString& newMode);
/**
* Reset the KoPictureShared (but not the key!)
@@ -135,35 +135,35 @@ public:
*
* @param fileName the name of the file to load
*/
- bool loadFromFile(const QString& fileName);
+ bool loadFromFile(const TQString& fileName);
/**
* Load a potentially broken XPM file (for KPresenter)
*/
- bool loadXpm(QIODevice* io);
+ bool loadXpm(TQIODevice* io);
/**
* @deprecated
- * Returns a QPixmap from an image
+ * Returns a TQPixmap from an image
*
- * @param size the wanted size for the QPixmap
+ * @param size the wanted size for the TQPixmap
*/
- QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- QString getMimeType(void) const;
+ TQString getMimeType(void) const;
/**
- * Generate a QImage
+ * Generate a TQImage
*
* (always in slow mode)
*
- * @param size the wanted size for the QImage
+ * @param size the wanted size for the TQImage
*/
- QImage generateImage(const QSize& size);
+ TQImage generateImage(const TQSize& size);
bool hasAlphaBuffer() const;
void setAlphaBuffer(bool enable);
- QImage createAlphaMask(int conversion_flags = 0) const;
+ TQImage createAlphaMask(int conversion_flags = 0) const;
/**
* Clear any cache
@@ -173,25 +173,25 @@ public:
*/
void clearCache(void);
- QString uniquePictureId() const;
+ TQString uniquePictureId() const;
void assignPictureId( uint _id);
protected:
/**
* @internal
* Load a WMF file
- * \note In %KOffice 1.1, a .wmf file was a QPicture file
+ * \note In %KOffice 1.1, a .wmf file was a TQPicture file
*/
- bool loadWmf(QIODevice* io);
+ bool loadWmf(TQIODevice* io);
/**
* @internal
* Loads a temporary file, probably from a downloaded file
*/
- bool loadTmp(QIODevice* io);
+ bool loadTmp(TQIODevice* io);
/// Find type of image, create base accordingly, and load data
- bool identifyAndLoad( QByteArray data );
+ bool identifyAndLoad( TQByteArray data );
/**
* @internal
@@ -199,15 +199,15 @@ protected:
*
* @warning risk of endless recurision, be careful when it is called from @see load
*
- * @param io QIODevice of the compressed file/strea,
+ * @param io TQIODevice of the compressed file/strea,
* @param mimeType mimetype of the (de-)compressor
* @param extension extension of the uncompressed file
*/
- bool loadCompressed( QIODevice* io, const QString& mimeType, const QString& extension );
+ bool loadCompressed( TQIODevice* io, const TQString& mimeType, const TQString& extension );
protected:
KoPictureBase* m_base;
- QString m_extension;
+ TQString m_extension;
uint m_pictureId;
};
diff --git a/lib/kofficecore/KoPictureWmf.cpp b/lib/kofficecore/KoPictureWmf.cpp
index 96872af7..ccbab362 100644
--- a/lib/kofficecore/KoPictureWmf.cpp
+++ b/lib/kofficecore/KoPictureWmf.cpp
@@ -19,10 +19,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuffer.h>
-#include <qpainter.h>
-#include <qpicture.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqpainter.h>
+#include <tqpicture.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -35,7 +35,7 @@
#include "KoPictureBase.h"
#include "KoPictureWmf.h"
-KoPictureWmf::KoPictureWmf(void) : m_clipart(KoPictureType::formatVersionQPicture)
+KoPictureWmf::KoPictureWmf(void) : m_clipart(KoPictureType::formatVersionTQPicture)
{
}
@@ -58,15 +58,15 @@ bool KoPictureWmf::isNull(void) const
return m_clipart.isNull();
}
-void KoPictureWmf::drawQPicture(QPicture& clipart, QPainter& painter,
+void KoPictureWmf::drawTQPicture(TQPicture& clipart, TQPainter& painter,
int x, int y, int width, int height, int sx, int sy, int sw, int sh)
{
kdDebug(30003) << "Drawing KoPictureWmf " << this << endl;
kdDebug(30003) << " x=" << x << " y=" << y << " width=" << width << " height=" << height << endl;
kdDebug(30003) << " sx=" << sx << " sy=" << sy << " sw=" << sw << " sh=" << sh << endl;
painter.save();
- // Thanks to Harri, Qt3 makes it much easier than Qt2 ;)
- QRect br = clipart.boundingRect();
+ // Thanks to Harri, TQt3 makes it much easier than TQt2 ;)
+ TQRect br = clipart.boundingRect();
kdDebug(30003) << " Bounding rect. " << br << endl;
painter.translate(x,y); // Translating must be done before scaling!
@@ -78,12 +78,12 @@ void KoPictureWmf::drawQPicture(QPicture& clipart, QPainter& painter,
painter.restore();
}
-void KoPictureWmf::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool /*fastMode*/)
+void KoPictureWmf::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool /*fastMode*/)
{
- drawQPicture(m_clipart, painter, x, y, width, height, sx, sy, sw, sh);
+ drawTQPicture(m_clipart, painter, x, y, width, height, sx, sy, sw, sh);
}
-bool KoPictureWmf::loadData(const QByteArray& array, const QString& /* extension */)
+bool KoPictureWmf::loadData(const TQByteArray& array, const TQString& /* extension */)
{
// Second, create the original clipart
kdDebug(30003) << "Trying to load clipart... (Size:" << array.size() << ")" << endl;
@@ -97,32 +97,32 @@ bool KoPictureWmf::loadData(const QByteArray& array, const QString& /* extension
}
m_originalSize = wmf.boundingRect().size();
// draw wmf file with relative coordinate
- wmf.play(m_clipart, true);
+ wmf.play(*TQT_TQPAINTDEVICE(&m_clipart), true);
return true;
}
-bool KoPictureWmf::save(QIODevice* io) const
+bool KoPictureWmf::save(TQIODevice* io) const
{
- // We save the raw data, as the SVG supposrt in QPicture is poor
- Q_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns Q_LONG but size() Q_ULONG!
+ // We save the raw data, as the SVG supposrt in TQPicture is poor
+ TQ_ULONG size=io->writeBlock(m_rawData); // WARNING: writeBlock returns TQ_LONG but size() TQ_ULONG!
return (size==m_rawData.size());
}
-QSize KoPictureWmf::getOriginalSize(void) const
+TQSize KoPictureWmf::getOriginalSize(void) const
{
return m_originalSize;
}
-QPixmap KoPictureWmf::generatePixmap(const QSize& size, bool /*smoothScale*/)
+TQPixmap KoPictureWmf::generatePixmap(const TQSize& size, bool /*smoothScale*/)
{
// Not sure if it works, but it worked for KoPictureFilePreviewWidget::setClipart
- QPixmap pixmap(size);
- QPainter p;
+ TQPixmap pixmap(size);
+ TQPainter p;
p.begin( &pixmap );
- p.setBackgroundColor( Qt::white );
- pixmap.fill( Qt::white );
+ p.setBackgroundColor( TQt::white );
+ pixmap.fill( TQt::white );
if ( m_originalSize.width() && m_originalSize.height() )
p.scale( (double)pixmap.width() / (double)m_originalSize.width(), (double)pixmap.height() / (double)m_originalSize.height() );
@@ -131,7 +131,7 @@ QPixmap KoPictureWmf::generatePixmap(const QSize& size, bool /*smoothScale*/)
return pixmap;
}
-QString KoPictureWmf::getMimeType(const QString& /* extension */) const
+TQString KoPictureWmf::getMimeType(const TQString& /* extension */) const
{
return "image/x-wmf";
}
diff --git a/lib/kofficecore/KoPictureWmf.h b/lib/kofficecore/KoPictureWmf.h
index f1924d9c..dfe158bf 100644
--- a/lib/kofficecore/KoPictureWmf.h
+++ b/lib/kofficecore/KoPictureWmf.h
@@ -20,12 +20,12 @@
#ifndef __koPictureWmf_h__
#define __koPictureWmf_h__
-#include <qstring.h>
-#include <qpicture.h>
+#include <tqstring.h>
+#include <tqpicture.h>
#include <koffice_export.h>
-class QPainter;
-class QSize;
+class TQPainter;
+class TQSize;
/**
* \file koPictureWmf.h
@@ -68,41 +68,41 @@ public:
* Note that the image is being scaled to that size using scale() - except when printing.
* This avoids scaling the image at each paint event.
*
- * The other parameters are very similar to QPainter::drawPixmap :
+ * The other parameters are very similar to TQPainter::drawPixmap :
* (@p x, @p y) define the position in the painter,
* (@p sx, @p sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0).
* (@p sw, @p sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom
* right of the pixmap.
*/
- virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
+ virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
- virtual bool loadData(const QByteArray& array, const QString& extension);
+ virtual bool loadData(const TQByteArray& array, const TQString& extension);
/**
* save file
- * @param io QIODevice used for saving
+ * @param io TQIODevice used for saving
*/
- virtual bool save(QIODevice* io) const;
+ virtual bool save(TQIODevice* io) const;
- virtual QSize getOriginalSize(void) const;
+ virtual TQSize getOriginalSize(void) const;
- virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
+ virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
- virtual QString getMimeType(const QString& extension) const;
+ virtual TQString getMimeType(const TQString& extension) const;
protected:
- QPixmap getPixmap(QImage& image);
+ TQPixmap getPixmap(TQImage& image);
/**
* @internal
- * Draw a QPicture
+ * Draw a TQPicture
*/
- void drawQPicture(QPicture& clipart, QPainter& painter,
+ void drawTQPicture(TQPicture& clipart, TQPainter& painter,
int x, int y, int width, int height, int sx, int sy, int sw, int sh);
protected:
- QPicture m_clipart;
- QByteArray m_rawData;
- QSize m_size;
- QSize m_originalSize;
+ TQPicture m_clipart;
+ TQByteArray m_rawData;
+ TQSize m_size;
+ TQSize m_originalSize;
};
#endif /* __koPictureWmf_h__ */
diff --git a/lib/kofficecore/KoPoint.h b/lib/kofficecore/KoPoint.h
index 5f39e6c6..a5251638 100644
--- a/lib/kofficecore/KoPoint.h
+++ b/lib/kofficecore/KoPoint.h
@@ -20,23 +20,23 @@
#ifndef koPoint_h
#define koPoint_h
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <math.h>
/**
* A point whose coordinates are floating-point values ( "double"s ).
- * The API isn't documented, it's a perfect mirror of QPoint.
+ * The API isn't documented, it's a perfect mirror of TQPoint.
*/
class KoPoint {
public:
KoPoint() { m_x = 0; m_y = 0; }
KoPoint(const double &x, const double &y) : m_x(x), m_y(y) {}
- explicit KoPoint(const QPoint & p) : m_x(p.x()), m_y(p.y()) {}
+ explicit KoPoint(const TQPoint & p) : m_x(p.x()), m_y(p.y()) {}
~KoPoint() {}
- bool operator==(const KoPoint &rhs) const { return QABS(m_x-rhs.x()) < 1E-10 && QABS(m_y-rhs.y()) < 1E-10; }
- bool operator!=(const KoPoint &rhs) const { return QABS(m_x-rhs.x()) > 1E-10 || QABS(m_y-rhs.y()) > 1E-10; }
+ bool operator==(const KoPoint &rhs) const { return TQABS(m_x-rhs.x()) < 1E-10 && TQABS(m_y-rhs.y()) < 1E-10; }
+ bool operator!=(const KoPoint &rhs) const { return TQABS(m_x-rhs.x()) > 1E-10 || TQABS(m_y-rhs.y()) > 1E-10; }
bool isNull() const { return m_x == 0 && m_y == 0; }
@@ -59,9 +59,9 @@ public:
friend inline KoPoint operator*( const double &, const KoPoint & );
friend inline double operator*( const KoPoint &a, const KoPoint &b );
- // Not in QPoint:
+ // Not in TQPoint:
void setCoords(const double &x, const double &y) { m_x = x; m_y = y; }
- KoPoint transform (const QWMatrix &m) const
+ KoPoint transform (const TQWMatrix &m) const
{
double x, y;
m.map(m_x, m_y, &x, &y);
@@ -80,13 +80,13 @@ public:
double manhattanLength() const
{
- return QABS( m_x ) + QABS( m_y );
+ return TQABS( m_x ) + TQABS( m_y );
}
- /// Convert to a QPoint - with precision loss!
- QPoint toQPoint() const
+ /// Convert to a TQPoint - with precision loss!
+ TQPoint toTQPoint() const
{
- return QPoint( qRound( m_x ), qRound( m_y ) );
+ return TQPoint( tqRound( m_x ), tqRound( m_y ) );
}
private:
@@ -115,7 +115,7 @@ inline double operator*( const KoPoint &a, const KoPoint &b )
#include <kdebug.h>
/** Show a floating point value with great precision (use within kdDebug) */
-#define DEBUGDOUBLE(d) QString::number( (d), 'g', 20 )
+#define DEBUGDOUBLE(d) TQString::number( (d), 'g', 20 )
inline kdbgstream operator<<( kdbgstream str, const KoPoint & r ) {
// should this use DEBUGDOUBLE?
diff --git a/lib/kofficecore/KoQueryTrader.cpp b/lib/kofficecore/KoQueryTrader.cpp
index 00f4379b..e164aa1a 100644
--- a/lib/kofficecore/KoQueryTrader.cpp
+++ b/lib/kofficecore/KoQueryTrader.cpp
@@ -26,7 +26,7 @@
#include <kservicetype.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <limits.h> // UINT_MAX
@@ -48,21 +48,21 @@ KoDocumentEntry::KoDocumentEntry( KService::Ptr service )
{
}
-KoDocument* KoDocumentEntry::createDoc( KoDocument* parent, const char* name ) const
+KoDocument* KoDocumentEntry::createDoc( KoDocument* tqparent, const char* name ) const
{
- KLibFactory* factory = KLibLoader::self()->factory( QFile::encodeName(m_service->library()) );
+ KLibFactory* factory = KLibLoader::self()->factory( TQFile::encodeName(m_service->library()) );
if( !factory ) {
kdWarning(30003) << KLibLoader::self()->lastErrorMessage() << endl;
return 0;
}
- QObject* obj;
+ TQObject* obj;
if ( factory->inherits( "KParts::Factory" ) )
- obj = static_cast<KParts::Factory *>(factory)->createPart( 0L, "", parent, name, "KoDocument" );
+ obj = static_cast<KParts::Factory *>(factory)->createPart( 0L, "", tqparent, name, "KoDocument" );
else {
kdWarning(30003) << "factory doesn't inherit KParts::Factory ! It is a " << factory->className() << endl; // This shouldn't happen...
- obj = factory->create( parent, name, "KoDocument" );
+ obj = factory->create( tqparent, name, "KoDocument" );
}
if ( !obj || !obj->inherits( "KoDocument" ) )
@@ -74,16 +74,16 @@ KoDocument* KoDocumentEntry::createDoc( KoDocument* parent, const char* name ) c
return static_cast<KoDocument*>(obj);
}
-KoDocumentEntry KoDocumentEntry::queryByMimeType( const QString & mimetype )
+KoDocumentEntry KoDocumentEntry::queryByMimeType( const TQString & mimetype )
{
- QString constr = QString::fromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).arg( mimetype ).arg( mimetype );
+ TQString constr = TQString::tqfromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).tqarg( mimetype ).tqarg( mimetype );
- QValueList<KoDocumentEntry> vec = query( false,constr );
+ TQValueList<KoDocumentEntry> vec = query( false,constr );
if ( vec.isEmpty() )
{
kdWarning(30003) << "Got no results with " << constr << endl;
// Fallback to the old way (which was probably wrong, but better be safe)
- QString constr = QString::fromLatin1( "'%1' in ServiceTypes" ).arg( mimetype );
+ TQString constr = TQString::tqfromLatin1( "'%1' in ServiceTypes" ).tqarg( mimetype );
vec = query( constr );
if ( vec.isEmpty() )
{
@@ -105,16 +105,16 @@ KoDocumentEntry KoDocumentEntry::queryByMimeType( const QString & mimetype )
return vec[0];
}
-QValueList<KoDocumentEntry> KoDocumentEntry::query( const QString & _constr )
+TQValueList<KoDocumentEntry> KoDocumentEntry::query( const TQString & _constr )
{
return query(true,_constr);
}
-QValueList<KoDocumentEntry> KoDocumentEntry::query( bool _onlyDocEmb, const QString & _constr )
+TQValueList<KoDocumentEntry> KoDocumentEntry::query( bool _onlyDocEmb, const TQString & _constr )
{
- QValueList<KoDocumentEntry> lst;
- QString constr;
+ TQValueList<KoDocumentEntry> lst;
+ TQString constr;
if ( !_constr.isEmpty() ) {
constr = "(";
constr += _constr;
@@ -169,10 +169,10 @@ KoFilterEntry::KoFilterEntry( KService::Ptr service )
available = service->property( "X-KDE-Available" ).toString();
}
-QValueList<KoFilterEntry::Ptr> KoFilterEntry::query( const QString & _constr )
+TQValueList<KoFilterEntry::Ptr> KoFilterEntry::query( const TQString & _constr )
{
kdDebug(30500) << "KoFilterEntry::query( " << _constr << " )" << endl;
- QValueList<KoFilterEntry::Ptr> lst;
+ TQValueList<KoFilterEntry::Ptr> lst;
KTrader::OfferList offers = KTrader::self()->query( "KOfficeFilter", _constr );
@@ -192,16 +192,16 @@ QValueList<KoFilterEntry::Ptr> KoFilterEntry::query( const QString & _constr )
return lst;
}
-KoFilter* KoFilterEntry::createFilter( KoFilterChain* chain, QObject* parent, const char* name )
+KoFilter* KoFilterEntry::createFilter( KoFilterChain* chain, TQObject* tqparent, const char* name )
{
- KLibFactory* factory = KLibLoader::self()->factory( QFile::encodeName( m_service->library() ) );
+ KLibFactory* factory = KLibLoader::self()->factory( TQFile::encodeName( m_service->library() ) );
if ( !factory ) {
kdWarning(30003) << KLibLoader::self()->lastErrorMessage() << endl;
return 0;
}
- QObject* obj = factory->create( parent, name, "KoFilter" );
+ TQObject* obj = factory->create( tqparent, name, "KoFilter" );
if ( !obj || !obj->inherits( "KoFilter" ) )
{
delete obj;
diff --git a/lib/kofficecore/KoQueryTrader.h b/lib/kofficecore/KoQueryTrader.h
index 55ab8dbe..ff2a5100 100644
--- a/lib/kofficecore/KoQueryTrader.h
+++ b/lib/kofficecore/KoQueryTrader.h
@@ -22,11 +22,11 @@
#include <kservice.h>
#include <ksharedptr.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <koffice_export.h>
-class QObject;
-class QStringList;
+class TQObject;
+class TQStringList;
class KoDocument;
class KoFilter;
class KoFilterChain;
@@ -39,7 +39,7 @@ class KOFFICECORE_EXPORT KoDocumentEntry
{
public:
- KoDocumentEntry() { m_service = 0L; } // for QValueList
+ KoDocumentEntry() { m_service = 0L; } // for TQValueList
KoDocumentEntry( KService::Ptr service );
~KoDocumentEntry() { }
@@ -53,24 +53,24 @@ public:
/**
* @return name of the associated service
*/
- QString name() const { return m_service->name(); }
+ TQString name() const { return m_service->name(); }
/**
* Mimetypes (and other service types) which this document can handle.
*/
- QStringList mimeTypes() const { return m_service->serviceTypes(); }
+ TQStringList mimeTypes() const { return m_service->serviceTypes(); }
/**
* @return TRUE if the document can handle the requested mimetype.
*/
- bool supportsMimeType( const QString & _mimetype ) const
- { return mimeTypes().contains( _mimetype ); }
+ bool supportsMimeType( const TQString & _mimetype ) const
+ { return mimeTypes().tqcontains( _mimetype ); }
/**
* Uses the factory of the component to create
* a document. If that is not possible, 0 is returned.
*/
- KoDocument* createDoc( KoDocument* parent = 0, const char* name = 0 ) const;
+ KoDocument* createDoc( KoDocument* tqparent = 0, const char* name = 0 ) const;
/**
* This function will query ksycoca to find all available components.
@@ -80,7 +80,7 @@ public:
* You can use it to set additional restrictions on the available
* components.
*/
- static QValueList<KoDocumentEntry> query( const QString & _constr = QString::null );
+ static TQValueList<KoDocumentEntry> query( const TQString & _constr = TQString() );
/**
* This function will query the system to find all available filters.
@@ -94,9 +94,9 @@ public:
* components.
*/
// ### TODO: MERGE WITH ABOVE METHODE WHEN BIC+SIC CHANGES ARE ALLOWED
- static QValueList<KoDocumentEntry> query( bool _onlyDocEmb,const QString& _constr);
+ static TQValueList<KoDocumentEntry> query( bool _onlyDocEmb,const TQString& _constr);
/* this is how the signature should be looking after merging
- static QValueList<KoDocumentEntry> query( bool _onlyDocEmb =true, const QString& _constr = QString::null );
+ static TQValueList<KoDocumentEntry> query( bool _onlyDocEmb =true, const TQString& _constr = TQString() );
or better: use an enum for the first arg.
*/
@@ -107,7 +107,7 @@ public:
* @return a document entry for the KOffice component that supports
* the requested mimetype and fits the user best.
*/
- static KoDocumentEntry queryByMimeType( const QString & mimetype );
+ static KoDocumentEntry queryByMimeType( const TQString & mimetype );
private:
KService::Ptr m_service;
@@ -122,21 +122,21 @@ class KoFilterEntry : public KShared
public:
typedef KSharedPtr<KoFilterEntry> Ptr;
- KoFilterEntry() : weight( 0 ) { m_service = 0L; } // for QValueList
+ KoFilterEntry() : weight( 0 ) { m_service = 0L; } // for TQValueList
KoFilterEntry( KService::Ptr service );
~KoFilterEntry() { }
- KoFilter* createFilter( KoFilterChain* chain, QObject* parent = 0, const char* name = 0 );
+ KoFilter* createFilter( KoFilterChain* chain, TQObject* tqparent = 0, const char* name = 0 );
/**
* The imported mimetype(s).
*/
- QStringList import;
+ TQStringList import;
/**
* The exported mimetype(s).
*/
- QStringList export_;
+ TQStringList export_;
/**
* The "weight" of this filter path. Has to be > 0 to be valid.
@@ -146,19 +146,19 @@ public:
/**
* Do we have to check during runtime?
*/
- QString available;
+ TQString available;
/**
* @return TRUE if the filter can import the requested mimetype.
*/
- bool imports( const QString& _mimetype ) const
- { return ( import.contains( _mimetype ) ); }
+ bool imports( const TQString& _mimetype ) const
+ { return ( import.tqcontains( _mimetype ) ); }
/**
* @return TRUE if the filter can export the requested mimetype.
*/
- bool exports( const QString& _m ) const
- { return ( export_.contains( _m ) ); }
+ bool exports( const TQString& _m ) const
+ { return ( export_.tqcontains( _m ) ); }
/**
* This function will query KDED to find all available filters.
@@ -167,7 +167,7 @@ public:
* You can use it to set additional restrictions on the available
* components.
*/
- static QValueList<KoFilterEntry::Ptr> query( const QString& _constr = QString::null );
+ static TQValueList<KoFilterEntry::Ptr> query( const TQString& _constr = TQString() );
KService::Ptr service() const { return m_service; }
diff --git a/lib/kofficecore/KoRect.cpp b/lib/kofficecore/KoRect.cpp
index b93a577d..78a63992 100644
--- a/lib/kofficecore/KoRect.cpp
+++ b/lib/kofficecore/KoRect.cpp
@@ -166,15 +166,15 @@ KoRect &KoRect::operator&=(const KoRect &rhs) {
return *this;
}
-bool KoRect::contains(const KoPoint &p) const {
+bool KoRect::tqcontains(const KoPoint &p) const {
return (p.x() >= m_tl.x() && p.x() <= m_br.x() && p.y() >= m_tl.y() && p.y() <= m_br.y());
}
-bool KoRect::contains(const double &x, const double &y) const {
+bool KoRect::tqcontains(const double &x, const double &y) const {
return (x >= m_tl.x() && x <= m_br.x() && y >= m_tl.y() && y <= m_br.y());
}
-bool KoRect::contains(const KoRect &r) const {
+bool KoRect::tqcontains(const KoRect &r) const {
return (r.left() >= m_tl.x() && r.right() <= m_br.x() && r.top() >= m_tl.y() && r.bottom() <= m_br.y());
}
@@ -188,8 +188,8 @@ KoRect KoRect::intersect(const KoRect &r) const {
}
bool KoRect::intersects(const KoRect &r) const {
- return ( QMAX(m_tl.x(), r.left()) <= QMIN(m_br.x(), r.right()) &&
- QMAX(m_tl.y(), r.top()) <= QMIN(m_br.y(), r.bottom()) );
+ return ( TQMAX(m_tl.x(), r.left()) <= TQMIN(m_br.x(), r.right()) &&
+ TQMAX(m_tl.y(), r.top()) <= TQMIN(m_br.y(), r.bottom()) );
}
KoRect operator|(const KoRect &lhs, const KoRect &rhs) {
@@ -226,7 +226,7 @@ bool operator!=(const KoRect &lhs, const KoRect &rhs) {
lhs.bottomRight()!=rhs.bottomRight() );
}
-KoRect KoRect::transform(const QWMatrix &m) const
+KoRect KoRect::transform(const TQWMatrix &m) const
{
KoRect result;
if(m.m12() == 0.0F && m.m21() == 0.0F)
@@ -248,10 +248,10 @@ KoRect KoRect::transform(const QWMatrix &m) const
for(int i = 1; i < 4; i++)
{
- result.setLeft(QMIN(p[i].x(), result.left()));
- result.setTop(QMIN(p[i].y(), result.top()));
- result.setRight(QMAX(p[i].x(), result.right()));
- result.setBottom(QMAX(p[i].y(), result.bottom()));
+ result.setLeft(TQMIN(p[i].x(), result.left()));
+ result.setTop(TQMIN(p[i].y(), result.top()));
+ result.setRight(TQMAX(p[i].x(), result.right()));
+ result.setBottom(TQMAX(p[i].y(), result.bottom()));
}
}
return result;
@@ -262,13 +262,13 @@ KoRect KoRect::translate(double dx, double dy) const
return KoRect(left() + dx, top() + dy, width(), height());
}
-QRect KoRect::toQRect() const
+TQRect KoRect::toTQRect() const
{
- return QRect( qRound( left() ), qRound( top() ), qRound( width() ), qRound( height() ) );
+ return TQRect( tqRound( left() ), tqRound( top() ), tqRound( width() ), tqRound( height() ) );
}
//static
-KoRect KoRect::fromQRect( const QRect &rect )
+KoRect KoRect::fromTQRect( const TQRect &rect )
{
return KoRect( rect.left(), rect.top(), rect.width(), rect.height() );
}
diff --git a/lib/kofficecore/KoRect.h b/lib/kofficecore/KoRect.h
index dfc63946..b4289088 100644
--- a/lib/kofficecore/KoRect.h
+++ b/lib/kofficecore/KoRect.h
@@ -21,12 +21,12 @@
#include "KoPoint.h"
#include "KoSize.h"
-#include <qrect.h>
+#include <tqrect.h>
#include "koffice_export.h"
/**
* A rect whose coordinates are floating-point values ( "double"s ).
- * The API isn't documented, it's a perfect mirror of QRect.
+ * The API isn't documented, it's a perfect mirror of TQRect.
*/
class KOFFICEUI_EXPORT KoRect {
@@ -42,9 +42,9 @@ public:
~KoRect() {}
bool isNull() const { return m_tl == m_br; }
- // Like QRect, a null KoRect is empty.
+ // Like TQRect, a null KoRect is empty.
bool isEmpty() const { return m_tl.x() > m_br.x() || m_tl.y() > m_br.y() || isNull(); }
- // Unlike QRect, a null KoRect is valid (0-sized).
+ // Unlike TQRect, a null KoRect is valid (0-sized).
bool isValid() const { return m_tl.x() <= m_br.x() && m_tl.y() <= m_br.y(); }
KoRect normalize() const;
@@ -108,20 +108,20 @@ public:
* Note that for KoRect(0, 0, 100, 100) the KoPoint(0, 0) as well as KoPoint(100, 100) are
* mathmatically contained in the rect, this in contrary to pixel based rectangles.
*/
- bool contains(const KoPoint &p) const;
+ bool tqcontains(const KoPoint &p) const;
/// Helper function for the above function.
- bool contains(const double &x, const double &y) const;
+ bool tqcontains(const double &x, const double &y) const;
/// Helper function for the above function.
- bool contains(const KoRect &r) const;
+ bool tqcontains(const KoRect &r) const;
KoRect unite(const KoRect &r) const;
KoRect intersect(const KoRect &r) const;
bool intersects(const KoRect &r) const;
- KoRect transform(const QWMatrix &m) const;
+ KoRect transform(const TQWMatrix &m) const;
KoRect translate(double dx, double dy) const;
- QRect toQRect() const;
- static KoRect fromQRect( const QRect &rect );
+ TQRect toTQRect() const;
+ static KoRect fromTQRect( const TQRect &rect );
private:
KoPoint m_tl, m_br;
@@ -141,7 +141,7 @@ inline kdbgstream operator<<( kdbgstream str, const KoRect & r ) { str << "[" <
inline kndbgstream operator<<( kndbgstream str, const KoRect & ) { return str; }
/** Show the rectangles that form a region (use as a standalone statement) */
-#define DEBUGREGION(reg) { QMemArray<QRect>rs=reg.rects(); for (int i=0;i<rs.size();++i) \
+#define DEBUGREGION(reg) { TQMemArray<TQRect>rs=reg.rects(); for (int i=0;i<rs.size();++i) \
kdDebug()<<" "<<DEBUGRECT(rs[i] )<<endl; }
// You can now use kdDebug() << theregion << endl; (kdebug.h)
diff --git a/lib/kofficecore/KoSetPropCommand.h b/lib/kofficecore/KoSetPropCommand.h
index 53ee73bf..61429bbc 100644
--- a/lib/kofficecore/KoSetPropCommand.h
+++ b/lib/kofficecore/KoSetPropCommand.h
@@ -29,8 +29,8 @@
template<class Property, class Object, void (Object::* Function) (Property)> class KoSetBasicPropCommand : public KNamedCommand {
public:
- KoSetBasicPropCommand(Object *object, const QString &name) : KNamedCommand(name), m_object(object) {}
- KoSetBasicPropCommand(Object *object, const QString &name,
+ KoSetBasicPropCommand(Object *object, const TQString &name) : KNamedCommand(name), m_object(object) {}
+ KoSetBasicPropCommand(Object *object, const TQString &name,
const Property &oldProperty, const Property &newProperty) : KNamedCommand(name),
m_object(object), m_oldProperty(oldProperty), m_newProperty(newProperty) {}
virtual ~KoSetBasicPropCommand() {}
@@ -59,8 +59,8 @@ private:
template<class Property, class Object, void (Object::* Function) (const Property &)> class KoSetPropCommand : public KNamedCommand {
public:
- KoSetPropCommand(Object *object, const QString &name) : KNamedCommand(name), m_object(object) {}
- KoSetPropCommand(Object *object, const QString &name,
+ KoSetPropCommand(Object *object, const TQString &name) : KNamedCommand(name), m_object(object) {}
+ KoSetPropCommand(Object *object, const TQString &name,
const Property &oldProperty, const Property &newProperty) : KNamedCommand(name),
m_object(object), m_oldProperty(oldProperty), m_newProperty(newProperty) {}
virtual ~KoSetPropCommand() {}
diff --git a/lib/kofficecore/KoSize.h b/lib/kofficecore/KoSize.h
index 3cdc30bc..6f8aa253 100644
--- a/lib/kofficecore/KoSize.h
+++ b/lib/kofficecore/KoSize.h
@@ -16,19 +16,19 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
- This file borrows from the QSize class;
+ This file borrows from the TQSize class;
Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
*/
#ifndef koSize_h
#define koSize_h
-#include <qsize.h>
-#include <qtl.h>
+#include <tqsize.h>
+#include <tqtl.h>
/**
* A size whose coordinates are floating-point values ( "double"s ).
- * The API isn't documented, it's a perfect mirror of QSize.
+ * The API isn't documented, it's a perfect mirror of TQSize.
*/
class KoSize
{
@@ -69,21 +69,21 @@ public:
friend inline const KoSize operator/( const KoSize &, int );
friend inline const KoSize operator/( const KoSize &, double );
- inline QSize toQSize() const;
- static KoSize fromQSize( const QSize &size )
+ inline TQSize toTQSize() const;
+ static KoSize fromTQSize( const TQSize &size )
{
return KoSize(size.width(), size.height());
}
void transpose()
{
- qSwap(wd, ht);
+ tqSwap(wd, ht);
}
private:
static void warningDivByZero()
{
-#if defined(QT_CHECK_MATH)
+#if defined(TQT_CHECK_MATH)
qWarning( "KoSize: Division by zero error" );
#endif
}
@@ -168,7 +168,7 @@ inline const KoSize operator*( double c, const KoSize &s )
inline KoSize &KoSize::operator/=( int c )
{
-#if defined(QT_CHECK_MATH)
+#if defined(TQT_CHECK_MATH)
if ( c == 0 )
warningDivByZero();
#endif
@@ -178,7 +178,7 @@ inline KoSize &KoSize::operator/=( int c )
inline KoSize &KoSize::operator/=( double c )
{
-#if defined(QT_CHECK_MATH)
+#if defined(TQT_CHECK_MATH)
if ( c == 0.0 )
warningDivByZero();
#endif
@@ -188,7 +188,7 @@ inline KoSize &KoSize::operator/=( double c )
inline const KoSize operator/( const KoSize &s, int c )
{
-#if defined(QT_CHECK_MATH)
+#if defined(TQT_CHECK_MATH)
if ( c == 0 )
KoSize::warningDivByZero();
#endif
@@ -197,7 +197,7 @@ inline const KoSize operator/( const KoSize &s, int c )
inline const KoSize operator/( const KoSize &s, double c )
{
-#if defined(QT_CHECK_MATH)
+#if defined(TQT_CHECK_MATH)
if ( c == 0.0 )
KoSize::warningDivByZero();
#endif
@@ -206,17 +206,17 @@ inline const KoSize operator/( const KoSize &s, double c )
inline KoSize KoSize::expandedTo( const KoSize & otherSize ) const
{
- return KoSize( QMAX(wd,otherSize.wd), QMAX(ht,otherSize.ht) );
+ return KoSize( TQMAX(wd,otherSize.wd), TQMAX(ht,otherSize.ht) );
}
inline KoSize KoSize::boundedTo( const KoSize & otherSize ) const
{
- return KoSize( QMIN(wd,otherSize.wd), QMIN(ht,otherSize.ht) );
+ return KoSize( TQMIN(wd,otherSize.wd), TQMIN(ht,otherSize.ht) );
}
-inline QSize KoSize::toQSize() const
+inline TQSize KoSize::toTQSize() const
{
- return QSize(qRound(wd), qRound(ht));
+ return TQSize(tqRound(wd), tqRound(ht));
}
/******************************
diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp
index db975623..b8c0c098 100644
--- a/lib/kofficecore/KoSpeaker.cpp
+++ b/lib/kofficecore/KoSpeaker.cpp
@@ -21,26 +21,26 @@
* Boston, MA 02110-1301, USA.
*/
-// Qt includes.
-#include <qtimer.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qmenubar.h>
-#include <qlabel.h>
-#include <qbutton.h>
-#include <qcombobox.h>
-#include <qtabbar.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qlistview.h>
-#include <qlistbox.h>
-#include <qiconview.h>
-#include <qtable.h>
-#include <qgridview.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
+// TQt includes.
+#include <tqtimer.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqmenubar.h>
+#include <tqlabel.h>
+#include <tqbutton.h>
+#include <tqcombobox.h>
+#include <tqtabbar.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqlistview.h>
+#include <tqlistbox.h>
+#include <tqiconview.h>
+#include <tqtable.h>
+#include <tqgridview.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
// KDE includes.
#include <kapplication.h>
@@ -76,29 +76,29 @@ public:
{}
// List of text jobs.
- QValueList<uint> m_jobNums;
+ TQValueList<uint> m_jobNums;
// Whether the version of KTTSD has been requested from the daemon.
bool m_versionChecked;
// KTTSD version string.
- QString m_kttsdVersion;
+ TQString m_kttsdVersion;
// Language code of last spoken text.
- QString m_langCode;
+ TQString m_langCode;
// Word used before speaking an accelerator letter.
- QString m_acceleratorPrefix;
+ TQString m_acceleratorPrefix;
// Whether TTS service is available or not.
bool m_enabled;
// TTS options.
uint m_speakFlags;
// Timer which implements the polling interval.
int m_timeout;
- QTimer* m_timer;
+ TQTimer* m_timer;
// Widget and part of widget for 1) last widget under mouse pointer, 2) last widget with focus, and
// last widget spoken.
- QWidget* m_prevPointerWidget;
+ TQWidget* m_prevPointerWidget;
int m_prevPointerId;
- QWidget* m_prevFocusWidget;
+ TQWidget* m_prevFocusWidget;
int m_prevFocusId;
- QWidget* m_prevWidget;
+ TQWidget* m_prevWidget;
int m_prevId;
// True when cancelSpeakWidget has been called in response to customSpeakWidget signal.
bool m_cancelSpeakWidget;
@@ -132,11 +132,11 @@ bool KoSpeaker::isEnabled() const { return d->m_enabled; }
void KoSpeaker::probe()
{
d->m_timer->stop();
- QWidget* w;
- QPoint pos;
+ TQWidget* w;
+ TQPoint pos;
bool spoke = false;
if ( d->m_speakFlags & SpeakFocusWidget ) {
- w = kapp->focusWidget();
+ w = kapp->tqfocusWidget();
if (w) {
spoke = maybeSayWidget(w);
if (!spoke)
@@ -144,7 +144,7 @@ void KoSpeaker::probe()
}
}
if ( !spoke && d->m_speakFlags & SpeakPointerWidget ) {
- pos = QCursor::pos();
+ pos = TQCursor::pos();
w = kapp->widgetAt(pos, true);
if (w) {
if (!maybeSayWidget(w, pos))
@@ -154,7 +154,7 @@ void KoSpeaker::probe()
d->m_timer->start(d->m_timeout);
}
-void KoSpeaker::queueSpeech(const QString& msg, const QString& langCode /*= QString()*/, bool first /*= true*/)
+void KoSpeaker::queueSpeech(const TQString& msg, const TQString& langCode /*= TQString()*/, bool first /*= true*/)
{
if (!startKttsd()) return;
int jobCount = d->m_jobNums.count();
@@ -164,11 +164,11 @@ void KoSpeaker::queueSpeech(const QString& msg, const QString& langCode /*= QStr
d->m_jobNums.clear();
jobCount = 0;
}
- QString s = msg.stripWhiteSpace();
+ TQString s = msg.stripWhiteSpace();
if (s.isEmpty()) return;
// kdDebug() << "KoSpeaker::queueSpeech: s = [" << s << "]" << endl;
// If no language code given, assume desktop setting.
- QString languageCode = langCode;
+ TQString languageCode = langCode;
if (langCode.isEmpty())
languageCode = KGlobal::locale()->language();
// kdDebug() << "KoSpeaker::queueSpeech:languageCode = " << languageCode << endl;
@@ -209,45 +209,45 @@ void KoSpeaker::readConfig(KConfig* config)
d->m_acceleratorPrefix = config->readEntry("AcceleratorPrefixWord", i18n("Accelerator"));
if (d->m_speakFlags & (SpeakPointerWidget | SpeakFocusWidget)) {
if (startKttsd()) {
- d->m_timer = new QTimer( this );
- connect( d->m_timer, SIGNAL(timeout()), this, SLOT(probe()) );
+ d->m_timer = new TQTimer( this );
+ connect( d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(probe()) );
d->m_timer->start( d->m_timeout );
}
}
}
-bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
+bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/)
{
if (!w) return false;
int id = -1;
- QString text;
+ TQString text;
- if (w->inherits("QViewportWidget")) {
- w = w->parentWidget();
+ if (w->inherits("TQViewportWidget")) {
+ w = w->tqparentWidget();
if (!w) return false;
}
// Handle widgets that have multiple parts.
- if ( w->inherits("QMenuBar") ) {
- QMenuBar* menuBar = dynamic_cast<QMenuBar *>(w);
- if (pos == QPoint()) {
+ if ( w->inherits(TQMENUBAR_OBJECT_NAME_STRING) ) {
+ TQMenuBar* menuBar = dynamic_cast<TQMenuBar *>(w);
+ if (pos == TQPoint()) {
for (uint i = 0; i < menuBar->count(); ++i)
if (menuBar->isItemActive(menuBar->idAt(i))) {
id = menuBar->idAt(i);
break;
}
}
- // TODO: This doesn't work. Need way to figure out the QMenuItem underneath mouse pointer.
+ // TODO: This doesn't work. Need way to figure out the TQMenuItem underneath mouse pointer.
// id = menuBarItemAt(menuBar, pos);
if ( id != -1 )
text = menuBar->text(id);
}
else
- if (w->inherits("QPopupMenu")) {
- QPopupMenu* popupMenu = dynamic_cast<QPopupMenu *>(w);
- if (pos == QPoint()) {
+ if (w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
+ TQPopupMenu* popupMenu = dynamic_cast<TQPopupMenu *>(w);
+ if (pos == TQPoint()) {
for (uint i = 0; i < popupMenu->count(); ++i)
if (popupMenu->isItemActive(popupMenu->idAt(i))) {
id = popupMenu->idAt(i);
@@ -259,10 +259,10 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
text = popupMenu->text(id);
}
else
- if (w->inherits("QTabBar")) {
- QTabBar* tabBar = dynamic_cast<QTabBar *>(w);
- QTab* tab = 0;
- if (pos == QPoint())
+ if (w->inherits(TQTABBAR_OBJECT_NAME_STRING)) {
+ TQTabBar* tabBar = dynamic_cast<TQTabBar *>(w);
+ TQTab* tab = 0;
+ if (pos == TQPoint())
tab = tabBar->tabAt(tabBar->currentTab());
else
tab = tabBar->selectTab(tabBar->mapFromGlobal(pos));
@@ -272,10 +272,10 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
}
else
- if (w->inherits("QListView")) {
- QListView* lv = dynamic_cast<QListView *>(w);
- QListViewItem* item = 0;
- if (pos == QPoint())
+ if (w->inherits(TQLISTVIEW_OBJECT_NAME_STRING)) {
+ TQListView* lv = dynamic_cast<TQListView *>(w);
+ TQListViewItem* item = 0;
+ if (pos == TQPoint())
item = lv->currentItem();
else
item = lv->itemAt(lv->viewport()->mapFromGlobal(pos));
@@ -287,11 +287,11 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
}
else
- if (w->inherits("QListBox")) {
- QListBox* lb = dynamic_cast<QListBox *>(w);
+ if (w->inherits(TQLISTBOX_OBJECT_NAME_STRING)) {
+ TQListBox* lb = dynamic_cast<TQListBox *>(w);
// qt docs say coordinates are in "on-screen" coordinates. What does that mean?
- QListBoxItem* item = 0;
- if (pos == QPoint())
+ TQListBoxItem* item = 0;
+ if (pos == TQPoint())
item = lb->item(lb->currentItem());
else
item = lb->itemAt(lb->mapFromGlobal(pos));
@@ -301,28 +301,28 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
}
else
- if (w->inherits("QIconView")) {
- QIconView* iv = dynamic_cast<QIconView *>(w);
- QIconViewItem* item = 0;
- if (pos == QPoint())
+ if (w->inherits(TQICONVIEW_OBJECT_NAME_STRING)) {
+ TQIconView* iv = dynamic_cast<TQIconView *>(w);
+ TQIconViewItem* item = 0;
+ if (pos == TQPoint())
item = iv->currentItem();
else
- item = iv->findItem(iv->viewportToContents(iv->viewport()->mapFromGlobal(pos)));
+ item = iv->tqfindItem(iv->viewportToContents(iv->viewport()->mapFromGlobal(pos)));
if (item) {
id = item->index();
text = item->text();
}
}
else
- if (w->inherits("QTable")) {
- QTable* tbl = dynamic_cast<QTable *>(w);
+ if (w->inherits(TQTABLE_OBJECT_NAME_STRING)) {
+ TQTable* tbl = dynamic_cast<TQTable *>(w);
int row = -1;
int col = -1;
- if (pos == QPoint()) {
+ if (pos == TQPoint()) {
row = tbl->currentRow();
col = tbl->currentColumn();
} else {
- QPoint p = tbl->viewportToContents(tbl->viewport()->mapFromGlobal(pos));
+ TQPoint p = tbl->viewportToContents(tbl->viewport()->mapFromGlobal(pos));
row = tbl->rowAt(p.y());
col = tbl->columnAt(p.x());
}
@@ -332,13 +332,13 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
}
else
- if (w->inherits("QGridView")) {
- QGridView* gv = dynamic_cast<QGridView *>(w);
- // TODO: QGridView does not have a "current" row or column. Don't think they can even get focus?
+ if (w->inherits(TQGRIDVIEW_OBJECT_NAME_STRING)) {
+ TQGridView* gv = dynamic_cast<TQGridView *>(w);
+ // TODO: TQGridView does not have a "current" row or column. Don't think they can even get focus?
int row = -1;
int col = -1;
- if (pos != QPoint()) {
- QPoint p = gv->viewportToContents(gv->viewport()->mapFromGlobal(pos));
+ if (pos != TQPoint()) {
+ TQPoint p = gv->viewportToContents(gv->viewport()->mapFromGlobal(pos));
row = gv->rowAt(p.y());
col = gv->columnAt(p.x());
}
@@ -346,7 +346,7 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
id = (row * gv->numCols()) + col;
}
- if (pos == QPoint()) {
+ if (pos == TQPoint()) {
if ( w == d->m_prevFocusWidget && id == d->m_prevFocusId) return false;
d->m_prevFocusWidget = w;
d->m_prevFocusId = id;
@@ -366,29 +366,29 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
if (d->m_cancelSpeakWidget) return true;
// Handle simple, single-part widgets.
- if ( w->inherits("QButton") )
- text = dynamic_cast<QButton *>(w)->text();
+ if ( w->inherits(TQBUTTON_OBJECT_NAME_STRING) )
+ text = dynamic_cast<TQButton *>(w)->text();
else
- if (w->inherits("QComboBox"))
- text = dynamic_cast<QComboBox *>(w)->currentText();
+ if (w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
+ text = dynamic_cast<TQComboBox *>(w)->currentText();
else
- if (w->inherits("QLineEdit"))
- text = dynamic_cast<QLineEdit *>(w)->text();
+ if (w->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
+ text = dynamic_cast<TQLineEdit *>(w)->text();
else
- if (w->inherits("QTextEdit"))
- text = dynamic_cast<QTextEdit *>(w)->text();
+ if (w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING))
+ text = dynamic_cast<TQTextEdit *>(w)->text();
else
- if (w->inherits("QLabel"))
- text = dynamic_cast<QLabel *>(w)->text();
+ if (w->inherits(TQLABEL_OBJECT_NAME_STRING))
+ text = dynamic_cast<TQLabel *>(w)->text();
else
- if (w->inherits("QGroupBox")) {
+ if (w->inherits(TQGROUPBOX_OBJECT_NAME_STRING)) {
// TODO: Should calculate this number from font size?
if (w->mapFromGlobal(pos).y() < 30)
- text = dynamic_cast<QGroupBox *>(w)->title();
+ text = dynamic_cast<TQGroupBox *>(w)->title();
}
// else
-// if (w->inherits("QWhatsThat")) {
-// text = dynamic_cast<QWhatsThat *>(w)->text();
+// if (w->inherits("TQWhatsThat")) {
+// text = dynamic_cast<TQWhatsThat *>(w)->text();
// }
text = text.stripWhiteSpace();
@@ -400,9 +400,9 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
if (d->m_speakFlags & SpeakTooltip || text.isEmpty()) {
// kdDebug() << "pos = " << pos << endl;
- // QPoint p = w->mapFromGlobal(pos);
+ // TQPoint p = w->mapFromGlobal(pos);
// kdDebug() << "p = " << p << endl;
- QString t = QToolTip::textFor(w, pos);
+ TQString t = TQToolTip::textFor(w, pos);
t = t.stripWhiteSpace();
if (!t.isEmpty()) {
if (t.right(1) != ".") t += ".";
@@ -411,7 +411,7 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
}
if (d->m_speakFlags & SpeakWhatsThis || text.isEmpty()) {
- QString t = QWhatsThis::textFor(w, pos);
+ TQString t = TQWhatsThis::textFor(w, pos);
t = t.stripWhiteSpace();
if (!t.isEmpty()) {
if (t.right(1) != ".") t += ".";
@@ -427,48 +427,48 @@ bool KoSpeaker::maybeSayWidget(QWidget* w, const QPoint& pos /*=QPoint()*/)
return sayWidget(text);
}
-bool KoSpeaker::sayWidget(const QString& msg)
+bool KoSpeaker::sayWidget(const TQString& msg)
{
- QString s = msg;
+ TQString s = msg;
if (d->m_speakFlags & SpeakAccelerator) {
- int amp = s.find("&");
+ int amp = s.tqfind("&");
if (amp >= 0) {
- QString acc = s.mid(++amp,1);
+ TQString acc = s.mid(++amp,1);
acc = acc.stripWhiteSpace();
if (!acc.isEmpty())
s += ". " + d->m_acceleratorPrefix + " " + acc + ".";
}
}
s.remove("&");
- if (QStyleSheet::mightBeRichText(s)) {
+ if (TQStyleSheet::mightBeRichText(s)) {
// kdDebug() << "richtext" << endl;
- s.replace(QRegExp("</?[pbius]>"), "");
- s.replace(QRegExp("</?h\\d>"), "");
- s.replace(QRegExp("<(br|hr)>"), " ");
- s.replace(QRegExp(
+ s.tqreplace(TQRegExp("</?[pbius]>"), "");
+ s.tqreplace(TQRegExp("</?h\\d>"), "");
+ s.tqreplace(TQRegExp("<(br|hr)>"), " ");
+ s.tqreplace(TQRegExp(
"</?(qt|center|li|pre|div|span|em|strong|big|small|sub|sup|code|tt|font|nobr|ul|ol|dl|dt)>"), "");
- s.replace(QRegExp("</?(table|tr|th|td).*>"), "");
- s.replace(QRegExp("</?a\\s.+>"), "");
+ s.tqreplace(TQRegExp("</?(table|tr|th|td).*>"), "");
+ s.tqreplace(TQRegExp("</?a\\s.+>"), "");
// Replace <img source="small|frame_text"> with "small frame_text image. "
- s.replace(QRegExp("<img\\s.*(?:source=|src=)\"([^|\"]+)[|]?([^|\"]*)\">"), "\\1 \\2 image. ");
+ s.tqreplace(TQRegExp("<img\\s.*(?:source=|src=)\"([^|\"]+)[|]?([^|\"]*)\">"), "\\1 \\2 image. ");
}
if (s.isEmpty()) return false;
- s.replace("Ctrl+", i18n("control plus "));
- s.replace("Alt+", i18n("alt plus "));
- s.replace("+", i18n(" plus "));
+ s.tqreplace("Ctrl+", i18n("control plus "));
+ s.tqreplace("Alt+", i18n("alt plus "));
+ s.tqreplace("+", i18n(" plus "));
sayScreenReaderOutput(s, "");
return true;
}
// This doesn't work. Anybody know how to find the menu item underneath mouse pointer
-// in a QMenuBar?
-// int KoSpeaker::menuBarItemAt(QMenuBar* m, const QPoint& p)
+// in a TQMenuBar?
+// int KoSpeaker::menuBarItemAt(TQMenuBar* m, const TQPoint& p)
// {
// for (uint i = 0; i < m->count(); i++) {
// int id = m->idAt(i);
-// QMenuItem* mi = m->findItem(id);
-// QWidget* w = mi->widget();
-// if (w->rect().contains(w->mapFromGlobal(p))) return id;
+// TQMenuItem* mi = m->findItem(id);
+// TQWidget* w = mi->widget();
+// if (w->rect().tqcontains(w->mapFromGlobal(p))) return id;
// }
// return -1;
// }
@@ -485,8 +485,8 @@ bool KoSpeaker::startKttsd()
// If KTTSD not running, start it.
if (!client->isApplicationRegistered("kttsd"))
{
- QString error;
- if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error)) {
+ TQString error;
+ if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error)) {
kdDebug() << "KoSpeaker::startKttsd: error starting KTTSD service: " << error << endl;
d->m_enabled = false;
} else
@@ -496,18 +496,18 @@ bool KoSpeaker::startKttsd()
return d->m_enabled;
}
-QString KoSpeaker::getKttsdVersion()
+TQString KoSpeaker::getKttsdVersion()
{
// Determine which version of KTTSD is running. Note that earlier versions of KSpeech interface
// did not support version() method, so we must manually marshall this call ourselves.
if (d->m_enabled) {
if (!d->m_versionChecked) {
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
if ( client->call("kttsd", "KSpeech", "version()", data, replyType, replyData, true) ) {
- QDataStream arg(replyData, IO_ReadOnly);
+ TQDataStream arg(replyData, IO_ReadOnly);
arg >> d->m_kttsdVersion;
kdDebug() << "KoSpeaker::startKttsd: KTTSD version = " << d->m_kttsdVersion << endl;
}
@@ -517,56 +517,56 @@ QString KoSpeaker::getKttsdVersion()
return d->m_kttsdVersion;
}
-void KoSpeaker::sayScreenReaderOutput(const QString &msg, const QString &talker)
+void KoSpeaker::sayScreenReaderOutput(const TQString &msg, const TQString &talker)
{
if (msg.isEmpty()) return;
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << msg << talker;
- if ( !client->call("kttsd", "KSpeech", "sayScreenReaderOutput(QString,QString)",
+ if ( !client->call("kttsd", "KSpeech", "sayScreenReaderOutput(TQString,TQString)",
data, replyType, replyData, true) ) {
kdDebug() << "KoSpeaker::sayScreenReaderOutput: failed" << endl;
}
}
-uint KoSpeaker::setText(const QString &text, const QString &talker)
+uint KoSpeaker::setText(const TQString &text, const TQString &talker)
{
if (text.isEmpty()) return 0;
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << text << talker;
uint jobNum = 0;
- if ( !client->call("kttsd", "KSpeech", "setText(QString,QString)",
+ if ( !client->call("kttsd", "KSpeech", "setText(TQString,TQString)",
data, replyType, replyData, true) ) {
kdDebug() << "KoSpeaker::sayText: failed" << endl;
} else {
- QDataStream arg2(replyData, IO_ReadOnly);
+ TQDataStream arg2(replyData, IO_ReadOnly);
arg2 >> jobNum;
}
return jobNum;
}
-int KoSpeaker::appendText(const QString &text, uint jobNum /*=0*/)
+int KoSpeaker::appendText(const TQString &text, uint jobNum /*=0*/)
{
if (text.isEmpty()) return 0;
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << text << jobNum;
int partNum = 0;
- if ( !client->call("kttsd", "KSpeech", "appendText(QString,uint)",
+ if ( !client->call("kttsd", "KSpeech", "appendText(TQString,uint)",
data, replyType, replyData, true) ) {
kdDebug() << "KoSpeaker::appendText: failed" << endl;
} else {
- QDataStream arg2(replyData, IO_ReadOnly);
+ TQDataStream arg2(replyData, IO_ReadOnly);
arg2 >> partNum;
}
return partNum;
@@ -575,10 +575,10 @@ int KoSpeaker::appendText(const QString &text, uint jobNum /*=0*/)
void KoSpeaker::startText(uint jobNum /*=0*/)
{
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << jobNum;
if ( !client->call("kttsd", "KSpeech", "startText(uint)",
data, replyType, replyData, true) ) {
@@ -589,10 +589,10 @@ void KoSpeaker::startText(uint jobNum /*=0*/)
void KoSpeaker::removeText(uint jobNum /*=0*/)
{
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << jobNum;
if ( !client->call("kttsd", "KSpeech", "removeText(uint)",
data, replyType, replyData, true) ) {
diff --git a/lib/kofficecore/KoSpeaker.h b/lib/kofficecore/KoSpeaker.h
index 6f8b430f..1e2d3188 100644
--- a/lib/kofficecore/KoSpeaker.h
+++ b/lib/kofficecore/KoSpeaker.h
@@ -24,9 +24,9 @@
#ifndef KOSPEAKER_H
#define KOSPEAKER_H
-// Qt includes.
-#include <qobject.h>
-#include <qstring.h>
+// TQt includes.
+#include <tqobject.h>
+#include <tqstring.h>
// KDE includes.
#include <ksharedptr.h>
@@ -34,8 +34,8 @@
// KOffice includes.
#include <koffice_export.h>
-class QWidget;
-class QPoint;
+class TQWidget;
+class TQPoint;
class KConfig;
class KoSpeakerPrivate;
@@ -51,7 +51,7 @@ class KoSpeakerPrivate;
* It will be replaced with a proper screen reading capability using the AT-SPI.
*
* This is quite a hack and doesn't work reliably. The following are current problems:
- * 1. Cannot speak menu items in a QMenuBar (top menu of app).
+ * 1. Cannot speak menu items in a TQMenuBar (top menu of app).
* 2. Doesn't understand every possible widget.
*
* This capability is @em not intended for completely blind users. Such users cannot use
@@ -60,9 +60,10 @@ class KoSpeakerPrivate;
*
* KOffice applications can access this object using the kospeaker global.
*/
-class KOFFICECORE_EXPORT KoSpeaker : public QObject, public KShared
+class KOFFICECORE_EXPORT KoSpeaker : public TQObject, public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
KoSpeaker();
~KoSpeaker();
@@ -96,21 +97,21 @@ public:
/**
* Given a widget @p w and its @p pos screen coordinates, tries to extract the text of the widget
* and speak it. If @p pos is not specified, and the widget has multiple parts (such as
- * a QListView), uses the current part.
+ * a TQListView), uses the current part.
* Call @ref isEnabled to ensure TTS is available before calling this method.
*/
- bool maybeSayWidget(QWidget* w, const QPoint& pos = QPoint());
+ bool maybeSayWidget(TQWidget* w, const TQPoint& pos = TQPoint());
/**
* Speak a @p msg that came from a widget, such as the widget's text label, tool tip, etc.
* Speaks using ScreenReaderOutput, which has highest priority, and therefore, should only be
* be used in very time-sensitive contexts and for short messages.
* Certain standard substitutions are performed on the message. For example, "Ctrl+" becomes
- * "control plus". "Qt" markup is stripped.
+ * "control plus". "TQt" markup is stripped.
* @returns true if anything is actually spoken.
* Call @ref isEnabled to ensure TTS is available before calling this method.
*/
- bool sayWidget(const QString& msg);
+ bool sayWidget(const TQString& msg);
/**
* Cancels speaking of widget. Usually called by slots that receive @ref customSpeakNewWidget
@@ -125,7 +126,7 @@ public:
* If @p first is false, appends to the already queued job.
* If the KTTSD daemon is not already running, it is started.
*/
- void queueSpeech(const QString& msg, const QString& langCode = QString(), bool first = true);
+ void queueSpeech(const TQString& msg, const TQString& langCode = TQString(), bool first = true);
/**
* Start speaking queued text job (if any).
@@ -156,7 +157,7 @@ signals:
* IMPORTANT: This signal is emitted from the @ref maybeSayWidget method. Slots who
* call maybeSayWidget should take care to avoid infinite recursion.
*/
- void customSpeakNewWidget(QWidget* w, const QPoint& p, uint flags);
+ void customSpeakNewWidget(TQWidget* w, const TQPoint& p, uint flags);
/**
* This signal is emitted each polling interval when KoSpeaker did not speak the widget
@@ -169,7 +170,7 @@ signals:
*
* IMPORTANT: This signal is emitted frequently. Receivers should be coded efficiently.
*/
- void customSpeakWidget(QWidget* w, const QPoint& p, uint flags);
+ void customSpeakWidget(TQWidget* w, const TQPoint& p, uint flags);
protected:
static KoSpeaker* KSpkr;
@@ -182,19 +183,19 @@ private slots:
void probe();
private:
- // int menuBarItemAt(QMenuBar* m, const QPoint& p);
+ // int menuBarItemAt(TQMenuBar* m, const TQPoint& p);
// Start the KTTSD daemon if not already running.
bool startKttsd();
// Return the KTTSD daemon version string.
- QString getKttsdVersion();
+ TQString getKttsdVersion();
// These methods correspond to dcop interface in kdelibs/interfaces/kspeech/kspeech.h.
// They use manual marshalling, instead of using kspeech_stub, because KOffice
// supports KDE 3.3 and above and kspeech.h didn't appear until 3.4.
- void sayScreenReaderOutput(const QString &msg, const QString &talker);
- uint setText(const QString &text, const QString &talker);
- int appendText(const QString &text, uint jobNum=0);
+ void sayScreenReaderOutput(const TQString &msg, const TQString &talker);
+ uint setText(const TQString &text, const TQString &talker);
+ int appendText(const TQString &text, uint jobNum=0);
void startText(uint jobNum=0);
void removeText(uint jobNum=0);
diff --git a/lib/kofficecore/KoStyleStack.cpp b/lib/kofficecore/KoStyleStack.cpp
index 4b5b807b..22799209 100644
--- a/lib/kofficecore/KoStyleStack.cpp
+++ b/lib/kofficecore/KoStyleStack.cpp
@@ -81,27 +81,27 @@ void KoStyleStack::pop()
#endif
}
-void KoStyleStack::push( const QDomElement& style )
+void KoStyleStack::push( const TQDomElement& style )
{
m_stack.append( style );
#ifdef DEBUG_STYLESTACK
- kdDebug(30003) << "pushed " << style.attributeNS( m_styleNSURI, "name", QString::null ) << " -> count=" << m_stack.count() << endl;
+ kdDebug(30003) << "pushed " << style.attributeNS( m_styleNSURI, "name", TQString() ) << " -> count=" << m_stack.count() << endl;
#endif
}
-bool KoStyleStack::hasAttribute( const QString& name, const QString& detail ) const
+bool KoStyleStack::hasAttribute( const TQString& name, const TQString& detail ) const
{
- QString fullName( name );
+ TQString fullName( name );
if ( !detail.isEmpty() )
{
fullName += '-';
fullName += detail;
}
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
+ TQDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
if ( properties.hasAttribute( name ) ||
( !detail.isEmpty() && properties.hasAttribute( fullName ) ) )
return true;
@@ -109,61 +109,61 @@ bool KoStyleStack::hasAttribute( const QString& name, const QString& detail ) co
return false;
}
-QString KoStyleStack::attribute( const QString& name, const QString& detail ) const
+TQString KoStyleStack::attribute( const TQString& name, const TQString& detail ) const
{
- QString fullName( name );
+ TQString fullName( name );
if ( !detail.isEmpty() )
{
fullName += '-';
fullName += detail;
}
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
+ TQDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
if ( properties.hasAttribute( name ) )
return properties.attribute( name );
if ( !detail.isEmpty() && properties.hasAttribute( fullName ) )
return properties.attribute( fullName );
}
- return QString::null;
+ return TQString();
}
-QString KoStyleStack::attributeNS( const char* nsURI, const char* name, const char* detail ) const
+TQString KoStyleStack::attributeNS( const char* nsURI, const char* name, const char* detail ) const
{
- QString fullName( name );
+ TQString fullName( name );
if ( detail )
{
fullName += '-';
fullName += detail;
}
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
+ TQDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
if ( properties.hasAttributeNS( nsURI, name ) )
- return properties.attributeNS( nsURI, name, QString::null );
+ return properties.attributeNS( nsURI, name, TQString() );
if ( detail && properties.hasAttributeNS( nsURI, fullName ) )
- return properties.attributeNS( nsURI, fullName, QString::null );
+ return properties.attributeNS( nsURI, fullName, TQString() );
}
- return QString::null;
+ return TQString();
}
bool KoStyleStack::hasAttributeNS( const char* nsURI, const char* name, const char* detail ) const
{
- QString fullName( name );
+ TQString fullName( name );
if ( detail )
{
fullName += '-';
fullName += detail;
}
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
+ TQDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
if ( properties.hasAttributeNS( nsURI, name ) ||
( detail && properties.hasAttributeNS( nsURI, fullName ) ) )
return true;
@@ -171,21 +171,21 @@ bool KoStyleStack::hasAttributeNS( const char* nsURI, const char* name, const ch
return false;
}
-// Font size is a bit special. "115%" applies to "the fontsize of the parent style".
+// Font size is a bit special. "115%" applies to "the fontsize of the tqparent style".
// This can be generalized though (hasAttributeThatCanBePercentOfParent() ? :)
// Although, if we also add support for fo:font-size-rel here then it's not general anymore.
double KoStyleStack::fontSize() const
{
- const QString name = "font-size";
+ const TQString name = "font-size";
double percent = 1;
- QValueList<QDomElement>::ConstIterator it = m_stack.end(); // reverse iterator
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end(); // reverse iterator
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName ).toElement();
+ TQDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName ).toElement();
if ( properties.hasAttributeNS( m_foNSURI, name ) ) {
- const QString value = properties.attributeNS( m_foNSURI, name, QString::null );
+ const TQString value = properties.attributeNS( m_foNSURI, name, TQString() );
if ( value.endsWith( "%" ) )
percent *= value.left( value.length() - 1 ).toDouble() / 100.0;
else
@@ -195,13 +195,13 @@ double KoStyleStack::fontSize() const
return 0;
}
-bool KoStyleStack::hasChildNode(const QString & name) const
+bool KoStyleStack::hasChildNode(const TQString & name) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
+ TQDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
if ( !properties.namedItem( name ).isNull() )
return true;
}
@@ -209,28 +209,28 @@ bool KoStyleStack::hasChildNode(const QString & name) const
return false;
}
-QDomElement KoStyleStack::childNode(const QString & name) const
+TQDomElement KoStyleStack::childNode(const TQString & name) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
+ TQDomElement properties = (*it).namedItem( "style:"+m_propertiesTagName ).toElement();
if ( !properties.namedItem( name ).isNull() )
return properties.namedItem( name ).toElement();
}
- return QDomElement(); // a null element
+ return TQDomElement(); // a null element
}
bool KoStyleStack::hasChildNodeNS( const char* nsURI, const char* localName ) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
+ TQDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
if ( !KoDom::namedItemNS( properties, nsURI, localName ).isNull() )
return true;
}
@@ -238,59 +238,59 @@ bool KoStyleStack::hasChildNodeNS( const char* nsURI, const char* localName ) co
return false;
}
-QDomElement KoStyleStack::childNodeNS( const char* nsURI, const char* localName) const
+TQDomElement KoStyleStack::childNodeNS( const char* nsURI, const char* localName) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- QDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
- QDomElement e = KoDom::namedItemNS( properties, nsURI, localName );
+ TQDomElement properties = KoDom::namedItemNS( *it, m_styleNSURI, m_propertiesTagName );
+ TQDomElement e = KoDom::namedItemNS( properties, nsURI, localName );
if ( !e.isNull() )
return e;
}
- return QDomElement(); // a null element
+ return TQDomElement(); // a null element
}
-bool KoStyleStack::isUserStyle( const QDomElement& e, const QString& family ) const
+bool KoStyleStack::isUserStyle( const TQDomElement& e, const TQString& family ) const
{
- if ( e.attributeNS( m_styleNSURI, "family", QString::null ) != family )
+ if ( e.attributeNS( m_styleNSURI, "family", TQString() ) != family )
return false;
- const QDomElement parent = e.parentNode().toElement();
- //kdDebug(30003) << k_funcinfo << "tagName=" << e.tagName() << " parent-tagName=" << parent.tagName() << endl;
- return parent.localName() == "styles" /*&& parent.namespaceURI() == KoXmlNS::office*/;
+ const TQDomElement tqparent = e.tqparentNode().toElement();
+ //kdDebug(30003) << k_funcinfo << "tagName=" << e.tagName() << " tqparent-tagName=" << tqparent.tagName() << endl;
+ return tqparent.localName() == "styles" /*&& tqparent.namespaceURI() == KoXmlNS::office*/;
}
-QString KoStyleStack::userStyleName( const QString& family ) const
+TQString KoStyleStack::userStyleName( const TQString& family ) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
- //kdDebug(30003) << k_funcinfo << (*it).attributeNS( m_styleNSURI, "name", QString::null) << endl;
+ //kdDebug(30003) << k_funcinfo << (*it).attributeNS( m_styleNSURI, "name", TQString()) << endl;
if ( isUserStyle( *it, family ) )
- return (*it).attributeNS( m_styleNSURI, "name", QString::null );
+ return (*it).attributeNS( m_styleNSURI, "name", TQString() );
}
// Can this ever happen?
return "Standard";
}
-QString KoStyleStack::userStyleDisplayName( const QString& family ) const
+TQString KoStyleStack::userStyleDisplayName( const TQString& family ) const
{
- QValueList<QDomElement>::ConstIterator it = m_stack.end();
+ TQValueList<TQDomElement>::ConstIterator it = m_stack.end();
while ( it != m_stack.begin() )
{
--it;
//kdDebug(30003) << k_funcinfo << (*it).attributeNS( m_styleNSURI, "display-name") << endl;
if ( isUserStyle( *it, family ) )
- return (*it).attributeNS( m_styleNSURI, "display-name", QString::null );
+ return (*it).attributeNS( m_styleNSURI, "display-name", TQString() );
}
- return QString::null; // no display name, this can happen since it's optional
+ return TQString(); // no display name, this can happen since it's optional
}
void KoStyleStack::setTypeProperties( const char* typeProperties )
{
- m_propertiesTagName = typeProperties == 0 ? QCString( "properties" ) : ( QCString( typeProperties ) + "-properties" );
+ m_propertiesTagName = typeProperties == 0 ? TQCString( "properties" ) : ( TQCString( typeProperties ) + "-properties" );
}
diff --git a/lib/kofficecore/KoStyleStack.h b/lib/kofficecore/KoStyleStack.h
index f3c5faf1..4e6cfa7e 100644
--- a/lib/kofficecore/KoStyleStack.h
+++ b/lib/kofficecore/KoStyleStack.h
@@ -22,9 +22,9 @@
#define KOSTYLESTACK_H
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qvaluestack.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqvaluestack.h>
#include <kdemacros.h>
@@ -36,7 +36,7 @@
* There can be several styles that are valid for one object. For example
* a textobject on a page has styles 'pr3' and 'P7' and a paragraph in
* that textobject has styles 'P1' and 'T3'. And some styles even have
- * parent-styles...
+ * tqparent-styles...
*
* If you want to know if there is, for example, the attribute 'fo:font-family'
* for this paragraph, you have to look into style 'T3', 'P1', 'P7' and 'pr3'.
@@ -54,7 +54,7 @@
*
* In general though, you wouldn't use push/pop directly, but KoOasisLoadingContext::fillStyleStack
* or KoOasisLoadingContext::addStyles to automatically push a style and all its
- * parent styles onto the stack.
+ * tqparent styles onto the stack.
*/
class KOFFICECORE_EXPORT KoStyleStack
{
@@ -93,25 +93,25 @@ public:
/**
* Pushes the new style onto the stack.
*/
- void push( const QDomElement& style );
+ void push( const TQDomElement& style );
/**
* Check if any of the styles on the stack has an attribute called 'name'-'detail'
* where detail is e.g. left, right, top or bottom.
- * This allows to also find 'name' alone (e.g. padding implies padding-left, padding-right etc.)
+ * This allows to also tqfind 'name' alone (e.g. padding implies padding-left, padding-right etc.)
*/
- bool hasAttribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
+ bool hasAttribute( const TQString& name, const TQString& detail = TQString() ) const KDE_DEPRECATED;
/**
* Search for the attribute called 'name', starting on top of the stack,
* and return it.
*/
- QString attribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
+ TQString attribute( const TQString& name, const TQString& detail = TQString() ) const KDE_DEPRECATED;
/**
* Check if any of the styles on the stack has an attribute called 'name'-'detail'
* where detail is e.g. left, right, top or bottom.
- * This allows to also find 'name' alone (e.g. padding implies padding-left, padding-right etc.)
+ * This allows to also tqfind 'name' alone (e.g. padding implies padding-left, padding-right etc.)
*/
bool hasAttributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
@@ -119,18 +119,18 @@ public:
* Search for the attribute called 'name', starting on top of the stack,
* and return it.
*/
- QString attributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
+ TQString attributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
/**
* Check if any of the styles on the stack has a child node called 'name'.
*/
- bool hasChildNode( const QString & name ) const KDE_DEPRECATED;
+ bool hasChildNode( const TQString & name ) const KDE_DEPRECATED;
/**
* Search for a child node called 'name', starting on top of the stack,
* and return it.
*/
- QDomElement childNode( const QString & name ) const KDE_DEPRECATED;
+ TQDomElement childNode( const TQString & name ) const KDE_DEPRECATED;
/**
* Check if any of the styles on the stack has a child element called 'localName' in the namespace 'nsURI'.
@@ -142,7 +142,7 @@ public:
* in the namespace 'nsURI' starting on top of the stack,
* and return it.
*/
- QDomElement childNodeNS( const char* nsURI, const char* localName ) const;
+ TQDomElement childNodeNS( const char* nsURI, const char* localName ) const;
/**
* Special case for the current font size, due to special handling of fo:font-size="115%".
@@ -155,13 +155,13 @@ public:
* This is used to know e.g. which user-style is associated with the current paragraph.
* There could be none though.
*/
- QString userStyleName( const QString& family ) const;
+ TQString userStyleName( const TQString& family ) const;
/**
* Return the display name of the style specified by the user,
* i.e. not an auto style
*/
- QString userStyleDisplayName( const QString& family ) const;
+ TQString userStyleDisplayName( const TQString& family ) const;
/**
* Set the type of properties that will be looked for.
@@ -173,19 +173,19 @@ public:
void setTypeProperties( const char* typeProperties );
private:
- bool isUserStyle( const QDomElement& e, const QString& family ) const;
+ bool isUserStyle( const TQDomElement& e, const TQString& family ) const;
private:
/// For save/restore: stack of "marks". Each mark is an index in m_stack.
- QValueStack<int> m_marks;
+ TQValueStack<int> m_marks;
/**
- * We use QValueList instead of QValueStack because we need access to all styles
+ * We use TQValueList instead of TQValueStack because we need access to all styles
* not only the top one.
*/
- QValueList<QDomElement> m_stack;
+ TQValueList<TQDomElement> m_stack;
- QCString m_propertiesTagName;
+ TQCString m_propertiesTagName;
const char* m_styleNSURI;
const char* m_foNSURI;
diff --git a/lib/kofficecore/KoTemplates.cpp b/lib/kofficecore/KoTemplates.cpp
index 7fbf3a99..178c6271 100644
--- a/lib/kofficecore/KoTemplates.cpp
+++ b/lib/kofficecore/KoTemplates.cpp
@@ -19,9 +19,9 @@
#include <KoTemplates.h>
-#include <qdir.h>
-#include <qimage.h>
-#include <qprinter.h>
+#include <tqdir.h>
+#include <tqimage.h>
+#include <tqprinter.h>
#include <kdesktopfile.h>
#include <ksimpleconfig.h>
@@ -37,31 +37,31 @@
#include <stdlib.h>
-KoTemplate::KoTemplate(const QString &name, const QString &description, const QString &file,
- const QString &picture, const QString &fileName, const QString &_measureSystem,
+KoTemplate::KoTemplate(const TQString &name, const TQString &description, const TQString &file,
+ const TQString &picture, const TQString &fileName, const TQString &_measureSystem,
bool hidden, bool touched) :
m_name(name), m_descr(description), m_file(file), m_picture(picture), m_fileName(fileName),
m_hidden(hidden), m_touched(touched), m_cached(false), m_measureSystem(_measureSystem)
{
}
-const QPixmap &KoTemplate::loadPicture( KInstance* instance ) {
+const TQPixmap &KoTemplate::loadPicture( KInstance* instance ) {
if(m_cached)
return m_pixmap;
m_cached=true;
if ( m_picture[ 0 ] == '/' )
{
- // ### TODO: use the class KoPicture instead of QImage to support non-image pictures
- QImage img( m_picture );
+ // ### TODO: use the class KoPicture instead of TQImage to support non-image pictures
+ TQImage img( m_picture );
if (img.isNull()) {
kdWarning() << "Couldn't find icon " << m_picture << endl;
- m_pixmap=QPixmap();
+ m_pixmap=TQPixmap();
return m_pixmap;
}
const int maxHeightWidth = 128; // ### TODO: some people would surely like to have 128x128
if (img.width() > maxHeightWidth || img.height() > maxHeightWidth) {
- img = img.smoothScale( maxHeightWidth, maxHeightWidth, QImage::ScaleMax );
+ img = img.smoothScale( maxHeightWidth, maxHeightWidth, TQ_ScaleMax );
}
m_pixmap.convertFromImage(img);
return m_pixmap;
@@ -72,7 +72,7 @@ const QPixmap &KoTemplate::loadPicture( KInstance* instance ) {
}
-KoTemplateGroup::KoTemplateGroup(const QString &name, const QString &dir,
+KoTemplateGroup::KoTemplateGroup(const TQString &name, const TQString &dir,
int _sortingWeight, bool touched) :
m_name(name), m_touched(touched), m_sortingWeight(_sortingWeight)
{
@@ -82,7 +82,7 @@ KoTemplateGroup::KoTemplateGroup(const QString &name, const QString &dir,
bool KoTemplateGroup::isHidden() const {
- QPtrListIterator<KoTemplate> it(m_templates);
+ TQPtrListIterator<KoTemplate> it(m_templates);
bool hidden=true;
while(it.current()!=0L && hidden) {
hidden=it.current()->isHidden();
@@ -93,7 +93,7 @@ bool KoTemplateGroup::isHidden() const {
void KoTemplateGroup::setHidden(bool hidden) const {
- QPtrListIterator<KoTemplate> it(m_templates);
+ TQPtrListIterator<KoTemplate> it(m_templates);
for( ; it.current()!=0L; ++it)
it.current()->setHidden(hidden);
m_touched=true;
@@ -101,7 +101,7 @@ void KoTemplateGroup::setHidden(bool hidden) const {
bool KoTemplateGroup::add(KoTemplate *t, bool force, bool touch) {
- KoTemplate *myTemplate=find(t->name());
+ KoTemplate *myTemplate=tqfind(t->name());
if(myTemplate==0L) {
m_templates.append(t);
m_touched=touch;
@@ -109,9 +109,9 @@ bool KoTemplateGroup::add(KoTemplate *t, bool force, bool touch) {
}
else if(myTemplate && force) {
//kdDebug() << "removing :" << myTemplate->fileName() << endl;
- QFile::remove( myTemplate->fileName() );
- QFile::remove( myTemplate->picture() );
- QFile::remove( myTemplate->file() );
+ TQFile::remove( myTemplate->fileName() );
+ TQFile::remove( myTemplate->picture() );
+ TQFile::remove( myTemplate->file() );
m_templates.removeRef(myTemplate);
m_templates.append(t);
m_touched=touch;
@@ -120,16 +120,16 @@ bool KoTemplateGroup::add(KoTemplate *t, bool force, bool touch) {
return false;
}
-KoTemplate *KoTemplateGroup::find(const QString &name) const {
+KoTemplate *KoTemplateGroup::tqfind(const TQString &name) const {
- QPtrListIterator<KoTemplate> it(m_templates);
+ TQPtrListIterator<KoTemplate> it(m_templates);
while(it.current() && it.current()->name()!=name)
++it;
return it.current();
}
-KoTemplateTree::KoTemplateTree(const QCString &templateType,
+KoTemplateTree::KoTemplateTree(const TQCString &templateType,
KInstance *instance, bool readTree) :
m_templateType(templateType), m_instance(instance), m_defaultGroup(0L),
m_defaultTemplate(0L) {
@@ -146,7 +146,7 @@ void KoTemplateTree::readTemplateTree() {
}
void KoTemplateTree::writeTemplateTree() {
- QString localDir=m_instance->dirs()->saveLocation(m_templateType);
+ TQString localDir=m_instance->dirs()->saveLocation(m_templateType);
for(KoTemplateGroup *group=m_groups.first(); group!=0L; group=m_groups.next()) {
//kdDebug() << "---------------------------------" << endl;
@@ -183,8 +183,8 @@ void KoTemplateTree::writeTemplateTree() {
if(t->isHidden() && t->touched() ) {
//kdDebug() << "+++ delete local template ##############" << endl;
writeTemplate(t, group, localDir);
- QFile::remove(t->file());
- QFile::remove(t->picture());
+ TQFile::remove(t->file());
+ TQFile::remove(t->picture());
}
}
}
@@ -192,16 +192,16 @@ void KoTemplateTree::writeTemplateTree() {
void KoTemplateTree::add(KoTemplateGroup *g) {
- KoTemplateGroup *group=find(g->name());
+ KoTemplateGroup *group=tqfind(g->name());
if(group==0L)
m_groups.append(g);
else
group->addDir(g->dirs().first()); // "...there can be only one..." (Queen)
}
-KoTemplateGroup *KoTemplateTree::find(const QString &name) const {
+KoTemplateGroup *KoTemplateTree::tqfind(const TQString &name) const {
- QPtrListIterator<KoTemplateGroup> it(m_groups);
+ TQPtrListIterator<KoTemplateGroup> it(m_groups);
while(it.current() && it.current()->name()!=name)
++it;
return it.current();
@@ -209,21 +209,21 @@ KoTemplateGroup *KoTemplateTree::find(const QString &name) const {
void KoTemplateTree::readGroups() {
- QStringList dirs = m_instance->dirs()->resourceDirs(m_templateType);
- for(QStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it) {
+ TQStringList dirs = m_instance->dirs()->resourceDirs(m_templateType);
+ for(TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it) {
//kdDebug() << "dir: " << *it << endl;
- QDir dir(*it);
+ TQDir dir(*it);
// avoid the annoying warning
if(!dir.exists())
continue;
- dir.setFilter(QDir::Dirs);
- QStringList templateDirs=dir.entryList();
- for(QStringList::ConstIterator tdirIt=templateDirs.begin(); tdirIt!=templateDirs.end(); ++tdirIt) {
+ dir.setFilter(TQDir::Dirs);
+ TQStringList templateDirs=dir.entryList();
+ for(TQStringList::ConstIterator tdirIt=templateDirs.begin(); tdirIt!=templateDirs.end(); ++tdirIt) {
if(*tdirIt=="." || *tdirIt=="..") // we don't want to check those dirs :)
continue;
- QDir templateDir(*it+*tdirIt);
- QString name=*tdirIt;
- QString defaultTab;
+ TQDir templateDir(*it+*tdirIt);
+ TQString name=*tdirIt;
+ TQString defaultTab;
int sortingWeight = 1000;
if(templateDir.exists(".directory")) {
KSimpleConfig config(templateDir.absPath()+"/.directory", true);
@@ -233,7 +233,7 @@ void KoTemplateTree::readGroups() {
sortingWeight=config.readNumEntry("X-KDE-SortingWeight", 1000);
//kdDebug() << "name: " << name <<endl;
}
- KoTemplateGroup *g=new KoTemplateGroup(name, *it+*tdirIt+QChar('/'), sortingWeight);
+ KoTemplateGroup *g=new KoTemplateGroup(name, *it+*tdirIt+TQChar('/'), sortingWeight);
add(g);
if(defaultTab=="true")
m_defaultGroup=g;
@@ -242,32 +242,32 @@ void KoTemplateTree::readGroups() {
}
void KoTemplateTree::readTemplates() {
- QString dontShow = "imperial";
+ TQString dontShow = "imperial";
- if(KGlobal::locale()->pageSize() == QPrinter::Letter) {
+ if(KGlobal::locale()->pageSize() == TQPrinter::Letter) {
dontShow = "metric";
}
- QPtrListIterator<KoTemplateGroup> groupIt(m_groups);
+ TQPtrListIterator<KoTemplateGroup> groupIt(m_groups);
for( ; groupIt.current()!=0L; ++groupIt) {
- QStringList dirs=groupIt.current()->dirs();
- for(QStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it) {
- QDir d(*it);
+ TQStringList dirs=groupIt.current()->dirs();
+ for(TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it) {
+ TQDir d(*it);
if( !d.exists() )
continue;
- QStringList files=d.entryList( QDir::Files | QDir::Readable, QDir::Name );
+ TQStringList files=d.entryList( TQDir::Files | TQDir::Readable, TQDir::Name );
for(unsigned int i=0; i<files.count(); ++i) {
- QString filePath = *it + files[i];
+ TQString filePath = *it + files[i];
//kdDebug() << "filePath: " << filePath << endl;
- QString icon;
- QString text;
- QString description;
- QString hidden_str;
- QString fileName;
+ TQString icon;
+ TQString text;
+ TQString description;
+ TQString hidden_str;
+ TQString fileName;
bool hidden=false;
bool defaultTemplate = false;
- QString templatePath;
- QString measureSystem;
+ TQString templatePath;
+ TQString measureSystem;
// If a desktop file, then read the name from it.
// Otherwise (or if no name in it?) use file name
if (KDesktopFile::isDesktopFile(filePath)) {
@@ -280,7 +280,7 @@ void KoTemplateTree::readTemplates() {
//kdDebug() << "name: " << text << endl;
icon=config.readEntry("Icon");
if(icon[0]!='/' && // allow absolute paths for icons
- QFile::exists(*it+icon)) // allow icons from icontheme
+ TQFile::exists(*it+icon)) // allow icons from icontheme
icon=*it+icon;
//kdDebug() << "icon2: " << icon << endl;
hidden=config.readBoolEntry("X-KDE-Hidden", false);
@@ -312,7 +312,7 @@ void KoTemplateTree::readTemplates() {
else {
// Found a PNG file - the template must be here in the same dir.
icon = filePath;
- QFileInfo fi(filePath);
+ TQFileInfo fi(filePath);
text = fi.baseName();
templatePath = filePath; // Note that we store the .png file as the template !
// That's the way it's always been done. Then the app replaces the extension...
@@ -330,26 +330,26 @@ void KoTemplateTree::readTemplates() {
}
void KoTemplateTree::writeTemplate(KoTemplate *t, KoTemplateGroup *group,
- const QString &localDir) {
- QString fileName;
+ const TQString &localDir) {
+ TQString fileName;
if ( t->isHidden() )
{
fileName = t->fileName();
// try to remove the file
- if ( QFile::remove(fileName) || !QFile::exists(fileName) )
+ if ( TQFile::remove(fileName) || !TQFile::exists(fileName) )
{
- QFile::remove( t->name() );
- QFile::remove( t->picture() );
+ TQFile::remove( t->name() );
+ TQFile::remove( t->picture() );
return;
}
}
// be sure that the template's file name is unique so we don't overwrite an other
- QString const path = localDir + group->name() + '/';
- QString const name = KoTemplates::stripWhiteSpace( t->name() );
+ TQString const path = localDir + group->name() + '/';
+ TQString const name = KoTemplates::stripWhiteSpace( t->name() );
fileName = path + name + ".desktop";
- if ( t->isHidden() && QFile::exists(fileName) )
+ if ( t->isHidden() && TQFile::exists(fileName) )
return;
- QString fill;
+ TQString fill;
while ( KIO::NetAccess::exists( fileName, true, 0 ) )
{
fill += '_';
@@ -366,11 +366,11 @@ void KoTemplateTree::writeTemplate(KoTemplate *t, KoTemplateGroup *group,
}
namespace KoTemplates {
-QString stripWhiteSpace(const QString &string) {
+TQString stripWhiteSpace(const TQString &string) {
- QString ret;
+ TQString ret;
for(unsigned int i=0; i<string.length(); ++i) {
- QChar tmp(string[i]);
+ TQChar tmp(string[i]);
if(!tmp.isSpace())
ret+=tmp;
}
diff --git a/lib/kofficecore/KoTemplates.h b/lib/kofficecore/KoTemplates.h
index 4c9e3133..7547fd60 100644
--- a/lib/kofficecore/KoTemplates.h
+++ b/lib/kofficecore/KoTemplates.h
@@ -21,9 +21,9 @@
#ifndef koTemplates_h
#define koTemplates_h
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
#include <koffice_export.h>
class KInstance;
@@ -32,57 +32,57 @@ class KInstance;
class KOFFICECORE_EXPORT KoTemplate {
public:
- KoTemplate(const QString &name,
- const QString &description=QString::null,
- const QString &file=QString::null,
- const QString &picture=QString::null,
- const QString &fileName=QString::null,
- const QString &_measureSystem=QString::null,
+ KoTemplate(const TQString &name,
+ const TQString &description=TQString(),
+ const TQString &file=TQString(),
+ const TQString &picture=TQString(),
+ const TQString &fileName=TQString(),
+ const TQString &_measureSystem=TQString(),
bool hidden=false, bool touched=false);
~KoTemplate() {}
- QString name() const { return m_name; }
- QString description() const { return m_descr; };
- QString file() const { return m_file; }
- QString picture() const { return m_picture; }
- QString fileName() const { return m_fileName; }
- const QPixmap &loadPicture( KInstance* instance );
+ TQString name() const { return m_name; }
+ TQString description() const { return m_descr; };
+ TQString file() const { return m_file; }
+ TQString picture() const { return m_picture; }
+ TQString fileName() const { return m_fileName; }
+ const TQPixmap &loadPicture( KInstance* instance );
bool isHidden() const { return m_hidden; }
void setHidden(bool hidden=true) { m_hidden=hidden; m_touched=true; }
bool touched() const { return m_touched; }
- QString measureSystem() const { return m_measureSystem; }
- void setMeasureSystem(const QString& system) { m_measureSystem = system; }
+ TQString measureSystem() const { return m_measureSystem; }
+ void setMeasureSystem(const TQString& system) { m_measureSystem = system; }
private:
- QString m_name, m_descr, m_file, m_picture, m_fileName;
+ TQString m_name, m_descr, m_file, m_picture, m_fileName;
bool m_hidden;
mutable bool m_touched;
bool m_cached;
- QPixmap m_pixmap;
- QString m_measureSystem;
+ TQPixmap m_pixmap;
+ TQString m_measureSystem;
};
class KOFFICECORE_EXPORT KoTemplateGroup {
public:
- KoTemplateGroup(const QString &name,
- const QString &dir=QString::null,
+ KoTemplateGroup(const TQString &name,
+ const TQString &dir=TQString(),
int _sortingWeight=0,
bool touched=false);
~KoTemplateGroup() {}
- QString name() const { return m_name; }
- QStringList dirs() const { return m_dirs; }
- void addDir(const QString &dir) { m_dirs.append(dir); m_touched=true; }
+ TQString name() const { return m_name; }
+ TQStringList dirs() const { return m_dirs; }
+ void addDir(const TQString &dir) { m_dirs.append(dir); m_touched=true; }
int sortingWeight() const { return m_sortingWeight; }
void setSortingWeight(int weight) { m_sortingWeight = weight; }
- /// If all children are hidden, we are hidden too
+ /// If all tqchildren are hidden, we are hidden too
bool isHidden() const;
- /// if we should hide, we hide all the children
+ /// if we should hide, we hide all the tqchildren
void setHidden(bool hidden=true) const;
KoTemplate *first() { return m_templates.first(); }
@@ -92,14 +92,14 @@ public:
KoTemplate *current() { return m_templates.current(); }
bool add(KoTemplate *t, bool force=false, bool touch=true);
- KoTemplate *find(const QString &name) const;
+ KoTemplate *tqfind(const TQString &name) const;
bool touched() const { return m_touched; }
private:
- QString m_name;
- QStringList m_dirs;
- QPtrList<KoTemplate> m_templates;
+ TQString m_name;
+ TQStringList m_dirs;
+ TQPtrList<KoTemplate> m_templates;
mutable bool m_touched;
int m_sortingWeight;
};
@@ -108,11 +108,11 @@ private:
class KoTemplateTree {
public:
- KoTemplateTree(const QCString &templateType, KInstance *instance,
+ KoTemplateTree(const TQCString &templateType, KInstance *instance,
bool readTree=false);
~KoTemplateTree() {}
- QCString templateType() const { return m_templateType; }
+ TQCString templateType() const { return m_templateType; }
KInstance *instance() const { return m_instance; }
void readTemplateTree();
void writeTemplateTree();
@@ -124,7 +124,7 @@ public:
KoTemplateGroup *current() { return m_groups.current(); }
void add(KoTemplateGroup *g);
- KoTemplateGroup *find(const QString &name) const;
+ KoTemplateGroup *tqfind(const TQString &name) const;
KoTemplateGroup *defaultGroup() const { return m_defaultGroup; }
KoTemplate *defaultTemplate() const { return m_defaultTemplate; }
@@ -133,18 +133,18 @@ private:
void readGroups();
void readTemplates();
void writeTemplate(KoTemplate *t, KoTemplateGroup *group,
- const QString &localDir);
+ const TQString &localDir);
- QCString m_templateType;
+ TQCString m_templateType;
KInstance *m_instance;
- QPtrList<KoTemplateGroup> m_groups;
+ TQPtrList<KoTemplateGroup> m_groups;
KoTemplateGroup *m_defaultGroup;
KoTemplate *m_defaultTemplate;
};
namespace KoTemplates {
-QString stripWhiteSpace(const QString &string);
+TQString stripWhiteSpace(const TQString &string);
}
#endif
diff --git a/lib/kofficecore/KoUnit.cpp b/lib/kofficecore/KoUnit.cpp
index fc459c51..51c63499 100644
--- a/lib/kofficecore/KoUnit.cpp
+++ b/lib/kofficecore/KoUnit.cpp
@@ -26,12 +26,12 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qdom.h>
+#include <tqregexp.h>
+#include <tqdom.h>
-QStringList KoUnit::listOfUnitName()
+TQStringList KoUnit::listOfUnitName()
{
- QStringList lst;
+ TQStringList lst;
for ( uint i = 0 ; i <= KoUnit::U_LASTUNIT ; ++i )
{
KoUnit::Unit unit = static_cast<KoUnit::Unit>( i );
@@ -40,7 +40,7 @@ QStringList KoUnit::listOfUnitName()
return lst;
}
-QString KoUnit::unitDescription( Unit _unit )
+TQString KoUnit::unitDescription( Unit _unit )
{
switch ( _unit )
{
@@ -112,7 +112,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit )
}
}
-QString KoUnit::toUserStringValue( double ptValue, Unit unit )
+TQString KoUnit::toUserStringValue( double ptValue, Unit unit )
{
return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) );
}
@@ -140,12 +140,12 @@ double KoUnit::fromUserValue( double value, Unit unit )
}
}
-double KoUnit::fromUserValue( const QString& value, Unit unit, bool* ok )
+double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok )
{
return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit );
}
-double KoUnit::parseValue( QString value, double defaultVal )
+double KoUnit::parseValue( TQString value, double defaultVal )
{
value.simplifyWhiteSpace();
value.remove( ' ' );
@@ -153,11 +153,11 @@ double KoUnit::parseValue( QString value, double defaultVal )
if( value.isEmpty() )
return defaultVal;
- int index = value.find( QRegExp( "[a-z]+$" ) );
+ int index = value.tqfind( TQRegExp( "[a-z]+$" ) );
if ( index == -1 )
return value.toDouble();
- QString unit = value.mid( index );
+ TQString unit = value.mid( index );
value.truncate ( index );
double val = value.toDouble();
@@ -179,34 +179,34 @@ double KoUnit::parseValue( QString value, double defaultVal )
return defaultVal;
}
-KoUnit::Unit KoUnit::unit( const QString &_unitName, bool* ok )
+KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok )
{
if ( ok )
*ok = true;
- if ( _unitName == QString::fromLatin1( "mm" ) ) return U_MM;
- if ( _unitName == QString::fromLatin1( "cm" ) ) return U_CM;
- if ( _unitName == QString::fromLatin1( "dm" ) ) return U_DM;
- if ( _unitName == QString::fromLatin1( "in" )
- || _unitName == QString::fromLatin1("inch") /*compat*/ ) return U_INCH;
- if ( _unitName == QString::fromLatin1( "pi" ) ) return U_PI;
- if ( _unitName == QString::fromLatin1( "dd" ) ) return U_DD;
- if ( _unitName == QString::fromLatin1( "cc" ) ) return U_CC;
- if ( _unitName == QString::fromLatin1( "pt" ) ) return U_PT;
+ if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM;
+ if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM;
+ if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM;
+ if ( _unitName == TQString::tqfromLatin1( "in" )
+ || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH;
+ if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI;
+ if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD;
+ if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC;
+ if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT;
if ( ok )
*ok = false;
return U_PT;
}
-QString KoUnit::unitName( Unit _unit )
+TQString KoUnit::unitName( Unit _unit )
{
- if ( _unit == U_MM ) return QString::fromLatin1( "mm" );
- if ( _unit == U_CM ) return QString::fromLatin1( "cm" );
- if ( _unit == U_DM ) return QString::fromLatin1( "dm" );
- if ( _unit == U_INCH ) return QString::fromLatin1( "in" );
- if ( _unit == U_PI ) return QString::fromLatin1( "pi" );
- if ( _unit == U_DD ) return QString::fromLatin1( "dd" );
- if ( _unit == U_CC ) return QString::fromLatin1( "cc" );
- return QString::fromLatin1( "pt" );
+ if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" );
+ if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" );
+ if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" );
+ if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" );
+ if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" );
+ if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" );
+ if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" );
+ return TQString::tqfromLatin1( "pt" );
}
void KoUnit::saveOasis(KoXmlWriter* settingsWriter, Unit _unit)
diff --git a/lib/kofficecore/KoUnit.h b/lib/kofficecore/KoUnit.h
index 07638215..8757ab09 100644
--- a/lib/kofficecore/KoUnit.h
+++ b/lib/kofficecore/KoUnit.h
@@ -20,13 +20,13 @@
#ifndef kounit_h
#define kounit_h
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <math.h> // for floor
#include <koffice_export.h>
class KoXmlWriter;
-class QDomElement;
+class TQDomElement;
// 1 inch ^= 72 pt
// 1 inch ^= 25.399956 mm (-pedantic ;p)
@@ -137,7 +137,7 @@ public:
/// This method is the one to use to display a value in a dialog
/// @return the value @p ptValue converted to @p unit and rounded, ready to be displayed
/// Old name: userValue
- static QString toUserStringValue( double ptValue, Unit unit );
+ static TQString toUserStringValue( double ptValue, Unit unit );
/// This method is the one to use to read a value from a dialog
/// @return the value in @p unit, converted to points for internal use
@@ -150,20 +150,20 @@ public:
/// @param ok if set, the pointed bool is set to true if the value could be
/// converted to a double, and to false otherwise.
/// @return the value in @p unit, converted to points for internal use
- static double fromUserValue( const QString& value, Unit unit, bool* ok = 0 );
+ static double fromUserValue( const TQString& value, Unit unit, bool* ok = 0 );
/// Convert a unit name into a Unit enum
/// @param _unitName name to convert
/// @param ok if set, it will be true if the unit was known, false if unknown
- static Unit unit( const QString &_unitName, bool* ok = 0 );
+ static Unit unit( const TQString &_unitName, bool* ok = 0 );
/// Get the name of a unit
- static QString unitName( Unit _unit );
+ static TQString unitName( Unit _unit );
/// Get the full (translated) description of a unit
- static QString unitDescription( Unit _unit );
- static QStringList listOfUnitName();
+ static TQString unitDescription( Unit _unit );
+ static TQStringList listOfUnitName();
/// parse common %KOffice and OO values, like "10cm", "5mm" to pt
- static double parseValue( QString value, double defaultVal = 0.0 );
+ static double parseValue( TQString value, double defaultVal = 0.0 );
// Note: the above method doesn't take a const ref, since it modifies the arg.
/// Save a unit in OASIS format
diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp
index 9650192c..cfb508a4 100644
--- a/lib/kofficecore/KoView.cpp
+++ b/lib/kofficecore/KoView.cpp
@@ -33,7 +33,7 @@
#include <assert.h>
#include <kstatusbar.h>
#include <kapplication.h>
-#include <qtimer.h>
+#include <tqtimer.h>
class KoViewPrivate
{
@@ -42,7 +42,7 @@ public:
{
m_inOperation = false;
m_zoom = 1.0;
- m_children.setAutoDelete( true );
+ m_tqchildren.setAutoDelete( true );
m_manager = 0L;
m_tempActiveWidget = 0L;
m_dcopObject = 0;
@@ -53,30 +53,30 @@ public:
{
}
- QGuardedPtr<KoDocument> m_doc; // our KoDocument
- QGuardedPtr<KParts::PartManager> m_manager;
+ TQGuardedPtr<KoDocument> m_doc; // our KoDocument
+ TQGuardedPtr<KParts::PartManager> m_manager;
double m_zoom;
- QPtrList<KoViewChild> m_children;
- QWidget *m_tempActiveWidget;
+ TQPtrList<KoViewChild> m_tqchildren;
+ TQWidget *m_tempActiveWidget;
KoViewIface *m_dcopObject;
bool m_registered; // are we registered at the part manager?
bool m_documentDeleted; // true when m_doc gets deleted [can't use m_doc==0
- // since this only happens in ~QObject, and views
+ // since this only happens in ~TQObject, and views
// get deleted by ~KoDocument].
- QTimer *m_scrollTimer;
+ TQTimer *m_scrollTimer;
// Hmm sorry for polluting the private class with such a big inner class.
// At the beginning it was a little struct :)
class StatusBarItem {
public:
- StatusBarItem() // for QValueList
+ StatusBarItem() // for TQValueList
: m_widget(0), m_visible(false)
{}
- StatusBarItem( QWidget * widget, int stretch, bool permanent )
+ StatusBarItem( TQWidget * widget, int stretch, bool permanent )
: m_widget(widget), m_stretch(stretch), m_permanent(permanent), m_visible(false)
{}
- QWidget * widget() const { return m_widget; }
+ TQWidget * widget() const { return m_widget; }
void ensureItemShown( KStatusBar * sb )
{
@@ -97,46 +97,46 @@ public:
}
}
private:
- QWidget * m_widget;
+ TQWidget * m_widget;
int m_stretch;
bool m_permanent;
bool m_visible; // true when the item has been added to the statusbar
};
- QValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
+ TQValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
bool m_inOperation; //in the middle of an operation (no screen refreshing)?
};
-KoView::KoView( KoDocument *document, QWidget *parent, const char *name )
- : QWidget( parent, name )
+KoView::KoView( KoDocument *document, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
Q_ASSERT( document );
//kdDebug(30003) << "KoView::KoView " << this << endl;
d = new KoViewPrivate;
d->m_doc = document;
- KParts::PartBase::setPartObject( this );
+ KParts::PartBase::setPartObject( TQT_TQOBJECT(this) );
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setMouseTracking( true );
- connect( d->m_doc, SIGNAL( childChanged( KoDocumentChild * ) ),
- this, SLOT( slotChildChanged( KoDocumentChild * ) ) );
+ connect( d->m_doc, TQT_SIGNAL( childChanged( KoDocumentChild * ) ),
+ this, TQT_SLOT( slotChildChanged( KoDocumentChild * ) ) );
- connect( d->m_doc, SIGNAL( sigBeginOperation() ),
- this, SLOT( beginOperation() ) );
+ connect( d->m_doc, TQT_SIGNAL( sigBeginOperation() ),
+ this, TQT_SLOT( beginOperation() ) );
- connect( d->m_doc, SIGNAL( sigEndOperation() ),
- this, SLOT( endOperation() ) );
+ connect( d->m_doc, TQT_SIGNAL( sigEndOperation() ),
+ this, TQT_SLOT( endOperation() ) );
actionCollection()->setWidget( this );
setupGlobalActions();
KActionCollection *coll = actionCollection();
/**** not needed anymore, according to David (Werner)
- QValueList<KAction*> docActions = document->actionCollection()->actions();
- QValueList<KAction*>::ConstIterator it = docActions.begin();
- QValueList<KAction*>::ConstIterator end = docActions.end();
+ TQValueList<KAction*> docActions = document->actionCollection()->actions();
+ TQValueList<KAction*>::ConstIterator it = docActions.begin();
+ TQValueList<KAction*>::ConstIterator end = docActions.end();
for (; it != end; ++it )
coll->insert( *it );
*/
@@ -145,20 +145,20 @@ KoView::KoView( KoDocument *document, QWidget *parent, const char *name )
if ( sb ) // No statusbar in e.g. konqueror
{
coll->setHighlightingEnabled( true );
- connect( coll, SIGNAL( actionStatusText( const QString & ) ),
- this, SLOT( slotActionStatusText( const QString & ) ) );
- connect( coll, SIGNAL( clearStatusText() ),
- this, SLOT( slotClearStatusText() ) );
-
- connect( d->m_doc, SIGNAL( sigStatusBarMessage( const QString& ) ),
- this, SLOT( slotActionStatusText( const QString& ) ) );
- connect( d->m_doc, SIGNAL( sigClearStatusBarMessage() ),
- this, SLOT( slotClearStatusText() ) );
+ connect( coll, TQT_SIGNAL( actionStatusText( const TQString & ) ),
+ this, TQT_SLOT( slotActionStatusText( const TQString & ) ) );
+ connect( coll, TQT_SIGNAL( clearStatusText() ),
+ this, TQT_SLOT( slotClearStatusText() ) );
+
+ connect( d->m_doc, TQT_SIGNAL( sigStatusBarMessage( const TQString& ) ),
+ this, TQT_SLOT( slotActionStatusText( const TQString& ) ) );
+ connect( d->m_doc, TQT_SIGNAL( sigClearStatusBarMessage() ),
+ this, TQT_SLOT( slotClearStatusText() ) );
}
d->m_doc->setCurrent();
- d->m_scrollTimer = new QTimer( this );
- connect (d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ) );
+ d->m_scrollTimer = new TQTimer( this );
+ connect (d->m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() ) );
}
KoView::~KoView()
@@ -203,7 +203,7 @@ void KoView::setPartManager( KParts::PartManager *manager )
{
d->m_manager = manager;
if ( !koDocument()->isSingleViewMode() &&
- manager->parts()->containsRef( koDocument() ) == 0 ) // is there another view registered?
+ manager->parts()->tqcontainsRef( koDocument() ) == 0 ) // is there another view registered?
{
d->m_registered = true; // no, so we have to register now and ungregister again in the DTOR
manager->addPart( koDocument(), false );
@@ -217,10 +217,10 @@ KParts::PartManager *KoView::partManager() const
return d->m_manager;
}
-KAction *KoView::action( const QDomElement &element ) const
+KAction *KoView::action( const TQDomElement &element ) const
{
- static const QString &attrName = KGlobal::staticQString( "name" );
- QString name = element.attribute( attrName );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ TQString name = element.attribute( attrName );
KAction *act = KXMLGUIClient::action( name.utf8() );
@@ -230,22 +230,22 @@ KAction *KoView::action( const QDomElement &element ) const
return act;
}
-KoDocument *KoView::hitTest( const QPoint &viewPos )
+KoDocument *KoView::hitTest( const TQPoint &viewPos )
{
KoViewChild *viewChild;
- QPoint pos = reverseViewTransformations( viewPos );
+ TQPoint pos = reverseViewTransformations( viewPos );
KoDocumentChild *docChild = selectedChild();
if ( docChild )
{
if ( ( viewChild = child( docChild->document() ) ) )
{
- if ( viewChild->frameRegion().contains( pos ) )
+ if ( viewChild->frameRegion().tqcontains( pos ) )
return 0;
}
else
- if ( docChild->frameRegion().contains( pos ) )
+ if ( docChild->frameRegion().tqcontains( pos ) )
return 0;
}
@@ -254,11 +254,11 @@ KoDocument *KoView::hitTest( const QPoint &viewPos )
{
if ( ( viewChild = child( docChild->document() ) ) )
{
- if ( viewChild->frameRegion().contains( pos ) )
+ if ( viewChild->frameRegion().tqcontains( pos ) )
return 0;
}
else
- if ( docChild->frameRegion().contains( pos ) )
+ if ( docChild->frameRegion().tqcontains( pos ) )
return 0;
}
@@ -296,7 +296,7 @@ double KoView::zoom() const
return d->m_zoom;
}
-QWidget *KoView::canvas() const
+TQWidget *KoView::canvas() const
{
//dfaure: since the view plays two roles in this method (the const means "you can modify the canvas
// but not the view", it's just coincidence that the view is the canvas by default ;)
@@ -317,7 +317,7 @@ void KoView::canvasAddChild( KoViewChild * )
{
}
-void KoView::customEvent( QCustomEvent *ev )
+void KoView::customEvent( TQCustomEvent *ev )
{
if ( KParts::PartActivateEvent::test( ev ) )
partActivateEvent( (KParts::PartActivateEvent *)ev );
@@ -339,12 +339,12 @@ void KoView::partActivateEvent( KParts::PartActivateEvent *event )
if ( child->isRectangle() && !child->isTransparent() )
{
KoViewChild *viewChild = new KoViewChild( child, this );
- d->m_children.append( viewChild );
+ d->m_tqchildren.append( viewChild );
- QApplication::setOverrideCursor(waitCursor);
- // This is the long operation (due to toolbar layout stuff)
+ TQApplication::setOverrideCursor(waitCursor);
+ // This is the long operation (due to toolbar tqlayout stuff)
d->m_manager->setActivePart( child->document(), viewChild->frame()->view() );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// Now we can move the frame to the right place
viewChild->setInitialFrameGeometry();
@@ -361,7 +361,7 @@ void KoView::partActivateEvent( KParts::PartActivateEvent *event )
emit childDeactivated( child );
}
else
- emit invalidated();
+ emit tqinvalidated();
}
else
emit activated( event->activated() );
@@ -377,20 +377,20 @@ void KoView::partSelectEvent( KParts::PartSelectEvent *event )
if ( child && event->selected() )
{
- QRegion r = child->frameRegion( matrix() );
+ TQRegion r = child->frameRegion( matrix() );
r.translate( - canvasXOffset(), - canvasYOffset() );
emit regionInvalidated( r, true );
emit childSelected( child );
}
else if ( child )
{
- QRegion r = child->frameRegion( matrix() );
+ TQRegion r = child->frameRegion( matrix() );
r.translate( - canvasXOffset(), - canvasYOffset() );
emit regionInvalidated( r, true );
emit childUnselected( child );
}
else
- emit invalidated();
+ emit tqinvalidated();
}
else
emit selected( event->selected() );
@@ -406,7 +406,7 @@ void KoView::showAllStatusBarItems( bool show )
KStatusBar * sb = statusBar();
if ( !sb )
return;
- QValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.begin();
+ TQValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.begin();
for ( ; it != d->m_statusBarItems.end() ; ++it )
if ( show )
(*it).ensureItemShown( sb );
@@ -414,21 +414,21 @@ void KoView::showAllStatusBarItems( bool show )
(*it).ensureItemHidden( sb );
}
-void KoView::addStatusBarItem( QWidget * widget, int stretch, bool permanent )
+void KoView::addStatusBarItem( TQWidget * widget, int stretch, bool permanent )
{
KoViewPrivate::StatusBarItem item( widget, stretch, permanent );
d->m_statusBarItems.append(item);
- QValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.fromLast();
+ TQValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.fromLast();
KStatusBar * sb = statusBar();
Q_ASSERT(sb);
if (sb)
(*it).ensureItemShown( sb );
}
-void KoView::removeStatusBarItem( QWidget * widget )
+void KoView::removeStatusBarItem( TQWidget * widget )
{
KStatusBar * sb = statusBar();
- QValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.begin();
+ TQValueListIterator<KoViewPrivate::StatusBarItem> it = d->m_statusBarItems.begin();
for ( ; it != d->m_statusBarItems.end() ; ++it )
if ( (*it).widget() == widget )
{
@@ -477,14 +477,14 @@ void KoView::disableAutoScroll( )
d->m_scrollTimer->stop();
}
-void KoView::paintEverything( QPainter &painter, const QRect &rect, bool transparent )
+void KoView::paintEverything( TQPainter &painter, const TQRect &rect, bool transparent )
{
koDocument()->paintEverything( painter, rect, transparent, this );
}
KoViewChild *KoView::child( KoView *view )
{
- QPtrListIterator<KoViewChild> it( d->m_children );
+ TQPtrListIterator<KoViewChild> it( d->m_tqchildren );
for (; it.current(); ++it )
if ( it.current()->frame()->view() == view )
return it.current();
@@ -494,7 +494,7 @@ KoViewChild *KoView::child( KoView *view )
KoViewChild *KoView::child( KoDocument *doc )
{
- QPtrListIterator<KoViewChild> it( d->m_children );
+ TQPtrListIterator<KoViewChild> it( d->m_tqchildren );
for (; it.current(); ++it )
if ( it.current()->documentChild()->document() == doc )
return it.current();
@@ -502,9 +502,9 @@ KoViewChild *KoView::child( KoDocument *doc )
return 0L;
}
-QWMatrix KoView::matrix() const
+TQWMatrix KoView::matrix() const
{
- QWMatrix m;
+ TQWMatrix m;
m.scale( zoom(), zoom() );
//m.translate( canvasXOffset() , canvasYOffset() );
return m;
@@ -522,7 +522,7 @@ void KoView::slotChildActivated( bool a )
KoView* view = ch->frame()->view();
- QWidget *activeWidget = view->d->m_tempActiveWidget;
+ TQWidget *activeWidget = view->d->m_tempActiveWidget;
if ( d->m_manager->activeWidget() )
activeWidget = d->m_manager->activeWidget();
@@ -532,21 +532,21 @@ void KoView::slotChildActivated( bool a )
// Is the new active view a child of this one ?
// In this case we may not delete!
- // QObject *n = d->m_manager->activeWidget();
- QObject *n = activeWidget;
+ // TQObject *n = d->m_manager->activeWidget();
+ TQObject *n = TQT_TQOBJECT(activeWidget);
while( n )
- if ( n == (QObject *)view )
+ if ( n == (TQObject *)view )
return;
else
- n = n->parent();
+ n = n->tqparent();
d->m_tempActiveWidget = activeWidget;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
d->m_manager->setActivePart( 0L );
- QGuardedPtr<KoDocumentChild> docChild = ch->documentChild();
- QGuardedPtr<KoFrame> chFrame = ch->frame();
+ TQGuardedPtr<KoDocumentChild> docChild = ch->documentChild();
+ TQGuardedPtr<KoFrame> chFrame = ch->frame();
if ( docChild && chFrame && chFrame->view() )
{
docChild->setContentsPos( chFrame->view()->canvasXOffset(),
@@ -554,11 +554,11 @@ void KoView::slotChildActivated( bool a )
docChild->document()->setViewBuildDocument( chFrame->view(), chFrame->view()->xmlguiBuildDocument() );
}
- d->m_children.remove( ch );
+ d->m_tqchildren.remove( ch );
d->m_manager->addPart( docChild->document(), false ); // the destruction of the view removed the part from the partmanager. re-add it :)
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// #### HACK
// We want to delete as many views as possible and this
@@ -568,7 +568,7 @@ void KoView::slotChildActivated( bool a )
void KoView::slotChildChanged( KoDocumentChild *child )
{
- QRegion region( child->oldPointArray( matrix() ) );
+ TQRegion region( child->oldPointArray( matrix() ) );
emit regionInvalidated( child->frameRegion( matrix(), true ).unite( region ), true );
}
@@ -582,9 +582,9 @@ int KoView::autoScrollAcceleration( int offset ) const
void KoView::slotAutoScroll( )
{
- QPoint scrollDistance;
+ TQPoint scrollDistance;
bool actuallyDoScroll = false;
- QPoint pos( mapFromGlobal( QCursor::pos() ) );
+ TQPoint pos( mapFromGlobal( TQCursor::pos() ) );
//Provide progressive scrolling depending on the mouse position
if ( pos.y() < topBorder() )
@@ -617,9 +617,9 @@ void KoView::slotAutoScroll( )
#endif
pos = canvas()->mapFrom(this, pos);
- QMouseEvent * event = new QMouseEvent(QEvent::MouseMove, pos, 0, state);
+ TQMouseEvent * event = new TQMouseEvent(TQEvent::MouseMove, pos, 0, state);
- QApplication::postEvent( canvas(), event );
+ TQApplication::postEvent( canvas(), event );
emit autoScroll( scrollDistance );
}
}
@@ -627,7 +627,7 @@ void KoView::slotAutoScroll( )
void KoView::setupGlobalActions() {
actionNewView = new KAction( i18n( "&New View" ), "window_new", 0,
- this, SLOT( newView() ),
+ TQT_TQOBJECT(this), TQT_SLOT( newView() ),
actionCollection(), "view_newview" );
}
@@ -671,12 +671,12 @@ void KoView::endOperation()
KoMainWindow * KoView::shell() const
{
- return dynamic_cast<KoMainWindow *>( topLevelWidget() );
+ return dynamic_cast<KoMainWindow *>( tqtopLevelWidget() );
}
KMainWindow * KoView::mainWindow() const
{
- return dynamic_cast<KMainWindow *>( topLevelWidget() );
+ return dynamic_cast<KMainWindow *>( tqtopLevelWidget() );
}
KStatusBar * KoView::statusBar() const
@@ -685,7 +685,7 @@ KStatusBar * KoView::statusBar() const
return mw ? mw->statusBar() : 0L;
}
-void KoView::slotActionStatusText( const QString &text )
+void KoView::slotActionStatusText( const TQString &text )
{
KStatusBar *sb = statusBar();
if ( sb )
@@ -723,29 +723,29 @@ KoViewChild::KoViewChild( KoDocumentChild *child, KoView *_parentView )
m_parentView = _parentView;
m_child = child;
- m_frame = new KoFrame( parentView()->canvas() );
+ m_frame = new KoFrame( tqparentView()->canvas() );
KoView *view = child->document()->createView( m_frame );
view->setXMLGUIBuildDocument( child->document()->viewBuildDocument( view ) );
- view->setPartManager( parentView()->partManager() );
+ view->setPartManager( tqparentView()->partManager() );
// hack? (Werner)
- view->setZoom( parentView()->zoom() * QMAX(child->xScaling(), child->yScaling()) );
+ view->setZoom( tqparentView()->zoom() * TQMAX(child->xScaling(), child->yScaling()) );
m_frame->setView( view );
m_frame->show();
m_frame->raise();
- parentView()->canvasAddChild( this );
+ tqparentView()->canvasAddChild( this );
/*
KoViewChild has basically three geometries to keep in sync.
- - The KoDocumentChild geometry (i.e. the embedded object's geometry, unzoomed)
- - Its own geometry (used for hit-test etc.)
- - The KoFrame geometry (the graphical widget for moving the object when active)
+ - The KoDocumentChild tqgeometry (i.e. the embedded object's tqgeometry, unzoomed)
+ - Its own tqgeometry (used for hit-test etc.)
+ - The KoFrame tqgeometry (the graphical widget for moving the object when active)
- So we need to subtract the scrollview's offset for the frame geometry, since it's a widget.
+ So we need to subtract the scrollview's offset for the frame tqgeometry, since it's a widget.
The rules are
(R1) frameGeometry = viewGeometry(childGeometry) "+" m_frame->{left|right|top|bottom}Border() - scrollview offset,
@@ -763,8 +763,8 @@ KoViewChild::KoViewChild( KoDocumentChild *child, KoView *_parentView )
// Setting the frameGeometry is done in setInitialFrameGeometry, which is
// also called right after activation.
- connect( view, SIGNAL( activated( bool ) ),
- parentView(), SLOT( slotChildActivated( bool ) ) );
+ connect( view, TQT_SIGNAL( activated( bool ) ),
+ tqparentView(), TQT_SLOT( slotChildActivated( bool ) ) );
}
KoViewChild::~KoViewChild()
@@ -779,28 +779,28 @@ KoViewChild::~KoViewChild()
void KoViewChild::slotFrameGeometryChanged()
{
- // Set our geometry from the frame geometry (R2 reversed)
- QRect geom = m_frame->geometry();
+ // Set our tqgeometry from the frame tqgeometry (R2 reversed)
+ TQRect geom = m_frame->tqgeometry();
int b = m_frame->border();
- QRect borderRect( geom.x() + b + parentView()->canvasXOffset(),
- geom.y() + b + parentView()->canvasYOffset(),
+ TQRect borderRect( geom.x() + b + tqparentView()->canvasXOffset(),
+ geom.y() + b + tqparentView()->canvasYOffset(),
geom.width() - b * 2,
geom.height() - b * 2 );
setGeometry( borderRect );
if(m_child)
{
- // Set the child geometry from the frame geometry (R1 reversed)
- QRect borderLessRect( geom.x() + m_frame->leftBorder() + parentView()->canvasXOffset(),
- geom.y() + m_frame->topBorder() + parentView()->canvasYOffset(),
+ // Set the child tqgeometry from the frame tqgeometry (R1 reversed)
+ TQRect borderLessRect( geom.x() + m_frame->leftBorder() + tqparentView()->canvasXOffset(),
+ geom.y() + m_frame->topBorder() + tqparentView()->canvasYOffset(),
geom.width() - m_frame->leftBorder() - m_frame->rightBorder(),
geom.height() - m_frame->topBorder() - m_frame->bottomBorder() );
// We don't want to trigger slotDocGeometryChanged again
lock();
- QRect childGeom = parentView()->reverseViewTransformations( borderLessRect );
- kdDebug() << "KoChild::slotFrameGeometryChanged child geometry "
- << ( geometry() == childGeom ? "already " : "set to " )
+ TQRect childGeom = tqparentView()->reverseViewTransformations( borderLessRect );
+ kdDebug() << "KoChild::slotFrameGeometryChanged child tqgeometry "
+ << ( tqgeometry() == childGeom ? "already " : "set to " )
<< childGeom << endl;
m_child->setGeometry( childGeom );
unlock();
@@ -811,39 +811,39 @@ void KoViewChild::slotDocGeometryChanged()
{
if ( locked() )
return;
- // Set frame geometry from child geometry (R1)
+ // Set frame tqgeometry from child tqgeometry (R1)
// The frame's resizeEvent will call slotFrameGeometryChanged.
- QRect geom = parentView()->applyViewTransformations( m_child->geometry() );
- QRect borderRect( geom.x() - m_frame->leftBorder() - parentView()->canvasXOffset(),
- geom.y() - m_frame->topBorder() - parentView()->canvasYOffset(),
+ TQRect geom = tqparentView()->applyViewTransformations( m_child->tqgeometry() );
+ TQRect borderRect( geom.x() - m_frame->leftBorder() - tqparentView()->canvasXOffset(),
+ geom.y() - m_frame->topBorder() - tqparentView()->canvasYOffset(),
geom.width() + m_frame->leftBorder() + m_frame->rightBorder(),
geom.height() + m_frame->topBorder() + m_frame->bottomBorder() );
- kdDebug() << "KoViewChild::slotDocGeometryChanged frame geometry "
- << ( m_frame->geometry() == borderRect ? "already " : "set to " )
+ kdDebug() << "KoViewChild::slotDocGeometryChanged frame tqgeometry "
+ << ( m_frame->tqgeometry() == borderRect ? "already " : "set to " )
<< borderRect << endl;
m_frame->setGeometry( borderRect );
}
-QPoint KoView::applyViewTransformations( const QPoint& p ) const
+TQPoint KoView::applyViewTransformations( const TQPoint& p ) const
{
- return QPoint( qRound( p.x() * zoom() ), qRound( p.y() * zoom() ) );
+ return TQPoint( tqRound( p.x() * zoom() ), tqRound( p.y() * zoom() ) );
}
-QPoint KoView::reverseViewTransformations( const QPoint& v ) const
+TQPoint KoView::reverseViewTransformations( const TQPoint& v ) const
{
- return QPoint( qRound( v.x() / zoom() ), qRound( v.y() / zoom() ) );
+ return TQPoint( tqRound( v.x() / zoom() ), tqRound( v.y() / zoom() ) );
}
-QRect KoView::applyViewTransformations( const QRect& r ) const
+TQRect KoView::applyViewTransformations( const TQRect& r ) const
{
- return QRect( applyViewTransformations( r.topLeft() ),
+ return TQRect( applyViewTransformations( r.topLeft() ),
applyViewTransformations( r.bottomRight() ) );
}
-QRect KoView::reverseViewTransformations( const QRect& r ) const
+TQRect KoView::reverseViewTransformations( const TQRect& r ) const
{
- return QRect( reverseViewTransformations( r.topLeft() ),
+ return TQRect( reverseViewTransformations( r.topLeft() ),
reverseViewTransformations( r.bottomRight() ) );
}
@@ -852,10 +852,10 @@ void KoViewChild::setInitialFrameGeometry()
kdDebug() << k_funcinfo << endl;
// Connect only now, so that the GUI building doesn't move us around.
- connect( m_frame, SIGNAL( geometryChanged() ),
- this, SLOT( slotFrameGeometryChanged() ) );
- connect( m_child, SIGNAL( changed( KoChild * ) ),
- this, SLOT( slotDocGeometryChanged() ) );
+ connect( m_frame, TQT_SIGNAL( tqgeometryChanged() ),
+ this, TQT_SLOT( slotFrameGeometryChanged() ) );
+ connect( m_child, TQT_SIGNAL( changed( KoChild * ) ),
+ this, TQT_SLOT( slotDocGeometryChanged() ) );
// Set frameGeometry from childGeometry
slotDocGeometryChanged();
diff --git a/lib/kofficecore/KoView.h b/lib/kofficecore/KoView.h
index c2be52ec..dcab6745 100644
--- a/lib/kofficecore/KoView.h
+++ b/lib/kofficecore/KoView.h
@@ -19,8 +19,8 @@
#ifndef __koView_h__
#define __koView_h__
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include <kparts/part.h>
@@ -29,7 +29,7 @@
class KAction;
class KActionCollection;
-class QCustomEvent;
+class TQCustomEvent;
class KoDocument;
class KoMainWindow;
class KMainWindow;
@@ -54,9 +54,10 @@ namespace KParts
*
* Multiple views can be attached to one document at a time.
*/
-class KOFFICECORE_EXPORT KoView : public QWidget, public KParts::PartBase
+class KOFFICECORE_EXPORT KoView : public TQWidget, public KParts::PartBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new view for the document. Usually you don't create views yourself
@@ -67,12 +68,12 @@ public:
*
* @param document is the document which should be displayed in this view. This pointer
* must not be zero.
- * @param parent parent widget for this view.
+ * @param tqparent tqparent widget for this view.
* @param name Name of the view. The name is used in DCOP, so the name should
* match the pattern [A-Za-z_][A-Za-z_0-9]*.
*
*/
- KoView( KoDocument *document, QWidget *parent = 0, const char *name = 0 );
+ KoView( KoDocument *document, TQWidget *tqparent = 0, const char *name = 0 );
/**
* Destroys the view and unregisters at the document.
*/
@@ -108,7 +109,7 @@ public:
* @see KXMLGUIClient::actionCollection
* @see KoDocument::action
*/
- virtual KAction *action( const QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
/**
* Retrieves the document that is hit. This can be an embedded document.
@@ -120,7 +121,7 @@ public:
* may not succeed for a child that is not on the visible page. In those
* cases you need to reimplement this method.
*/
- virtual KoDocument *hitTest( const QPoint &pos );
+ virtual KoDocument *hitTest( const TQPoint &pos );
/**
* Retrieves the left border width that is displayed around the content if
@@ -159,7 +160,7 @@ public:
* data structures. You can use this mechanism to implement a zoom
* for example.
*
- * The method calls QWidget::update so that the scaled content
+ * The method calls TQWidget::update so that the scaled content
* is automatically displayed.
*
* The default scaling is 1.0 in both orientations.
@@ -178,7 +179,7 @@ public:
*
* By default this function returns a pointer to the view.
*/
- virtual QWidget *canvas() const;
+ virtual TQWidget *canvas() const;
/**
* Overload this function if the content will be displayed
@@ -201,8 +202,8 @@ public:
/**
* Overload this function if you need to perform some actions
* after KoView (the part widget) is inserted into canvas.
- * You should call for example addChild(QWidget*) method
- * of QScrollView here, if canvas is a viewport of QScrollView.
+ * You should call for example addChild(TQWidget*) method
+ * of TQScrollView here, if canvas is a viewport of TQScrollView.
*
* By default this function does nothing.
*/
@@ -233,7 +234,7 @@ public:
/**
* calls KoDocument::paintEverything()
*/
- virtual void paintEverything( QPainter &painter, const QRect &rect, bool transparent = false );
+ virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false );
/**
* @return TRUE if the document @p doc is represented in this view by
@@ -251,7 +252,7 @@ public:
*
* @deprecated, use applyViewTransformations / reverseViewTransformations instead.
*/
- virtual QWMatrix matrix() const KDE_DEPRECATED;
+ virtual TQWMatrix matrix() const KDE_DEPRECATED;
/**
* Apply the transformations that the view makes to its contents.
@@ -259,7 +260,7 @@ public:
* By default this simply applies the zoom().
* Reimplement to add some translation if needed (e.g. to center the page)
*/
- virtual QPoint applyViewTransformations( const QPoint& ) const;
+ virtual TQPoint applyViewTransformations( const TQPoint& ) const;
/**
* Reverse the transformations that the view makes to its contents,
@@ -268,17 +269,17 @@ public:
* By default this simply unzooms the point.
* Reimplement to add some translation if needed (e.g. to center the page)
*/
- virtual QPoint reverseViewTransformations( const QPoint& ) const;
+ virtual TQPoint reverseViewTransformations( const TQPoint& ) const;
/**
- * Overload for QRect, usually it's not needed to reimplement this one.
+ * Overload for TQRect, usually it's not needed to reimplement this one.
*/
- virtual QRect applyViewTransformations( const QRect& ) const;
+ virtual TQRect applyViewTransformations( const TQRect& ) const;
/**
- * Overload for QRect, usually it's not needed to reimplement this one.
+ * Overload for TQRect, usually it's not needed to reimplement this one.
*/
- virtual QRect reverseViewTransformations( const QRect& ) const;
+ virtual TQRect reverseViewTransformations( const TQRect& ) const;
/**
* @return the KoViewChild which is responsible for the @p view or 0.
@@ -337,18 +338,18 @@ public:
* If you use this method instead of using statusBar() directly,
* KoView will take care of removing the items when the view GUI is deactivated
* and readding them when it is reactivated.
- * The parameters are the same as QStatusBar::addWidget().
+ * The parameters are the same as TQStatusBar::addWidget().
*
* Note that you can't use KStatusBar methods (inserting text items by id).
* But you can create a KStatusBarLabel with a dummy id instead, and use
* it directly, to get the same look and feel.
*/
- void addStatusBarItem( QWidget * widget, int stretch = 0, bool permanent = false );
+ void addStatusBarItem( TQWidget * widget, int stretch = 0, bool permanent = false );
/**
* Remove a widget from the statusbar for this view.
*/
- void removeStatusBarItem( QWidget * widget );
+ void removeStatusBarItem( TQWidget * widget );
/**
* Show or hide all statusbar items. Used by KoMainWindow during saving.
@@ -391,13 +392,13 @@ public slots:
virtual void endOperation();
/**
- * Display a message in the status bar (calls QStatusBar::message())
+ * Display a message in the status bar (calls TQStatusBar::message())
* @todo rename to something more generic
*/
- void slotActionStatusText( const QString &text );
+ void slotActionStatusText( const TQString &text );
/**
- * End of the message in the status bar (calls QStatusBar::clear())
+ * End of the message in the status bar (calls TQStatusBar::clear())
* @todo rename to something more generic
*/
void slotClearStatusText();
@@ -408,7 +409,7 @@ protected:
* and KParts::GUIActivateEvent.
* The respective handlers are called if such an event is found.
*/
- virtual void customEvent( QCustomEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
/**
* Handles the event KParts::PartActivateEvent.
@@ -427,7 +428,7 @@ signals:
void activated( bool active );
void selected( bool select );
- void autoScroll(const QPoint &scrollDistance);
+ void autoScroll(const TQPoint &scrollDistance);
void childSelected( KoDocumentChild *child );
void childUnselected( KoDocumentChild *child );
@@ -435,9 +436,9 @@ signals:
void childActivated( KoDocumentChild *child );
void childDeactivated( KoDocumentChild *child );
- void regionInvalidated( const QRegion &region, bool erase );
+ void regionInvalidated( const TQRegion &region, bool erase );
- void invalidated();
+ void tqinvalidated();
// KDE invents public signals :)
#undef signals
@@ -449,7 +450,7 @@ signals:
* the embedding of an image into the current
* document. Used e.g. by the scan-plugin
*/
- void embeddImage(const QString &filename);
+ void embeddImage(const TQString &filename);
#undef signals
#define signals protected
@@ -472,12 +473,13 @@ private:
class KoViewChild : public KoChild
{
Q_OBJECT
+ TQ_OBJECT
public:
KoViewChild( KoDocumentChild *child, KoView *_parentView );
virtual ~KoViewChild();
KoDocumentChild *documentChild() const { return m_child; }
- KoView *parentView() const { return m_parentView; }
+ KoView *tqparentView() const { return m_parentView; }
KoFrame *frame() const { return m_frame; }
void setInitialFrameGeometry();
@@ -492,9 +494,9 @@ private slots:
void slotDocGeometryChanged();
private:
- QGuardedPtr<KoDocumentChild> m_child;
- QGuardedPtr<KoFrame> m_frame;
- QGuardedPtr<KoView> m_parentView;
+ TQGuardedPtr<KoDocumentChild> m_child;
+ TQGuardedPtr<KoFrame> m_frame;
+ TQGuardedPtr<KoView> m_parentView;
class KoViewChildPrivate;
KoViewChildPrivate *d;
};
diff --git a/lib/kofficecore/KoViewIface.cc b/lib/kofficecore/KoViewIface.cc
index 378db1e6..468a677e 100644
--- a/lib/kofficecore/KoViewIface.cc
+++ b/lib/kofficecore/KoViewIface.cc
@@ -28,10 +28,10 @@
#include <kaction.h>
//static
-QCString KoViewIface::newIfaceName()
+TQCString KoViewIface::newIfaceName()
{
static int s_viewIFNumber = 0;
- QCString name; name.setNum( s_viewIFNumber++ ); name.prepend("View-");
+ TQCString name; name.setNum( s_viewIFNumber++ ); name.prepend("View-");
return name;
}
@@ -53,7 +53,7 @@ KoViewIface::~KoViewIface()
delete m_actionProxy;
}
-DCOPRef KoViewIface::action( const QCString &name )
+DCOPRef KoViewIface::action( const TQCString &name )
{
return DCOPRef( kapp->dcopClient()->appId(), m_actionProxy->actionObjectId( name ) );
}
@@ -61,16 +61,16 @@ DCOPRef KoViewIface::action( const QCString &name )
QCStringList KoViewIface::actions()
{
QCStringList res;
- QValueList<KAction *> lst = m_actionProxy->actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = m_actionProxy->actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
res.append( (*it)->name() );
return res;
}
-QMap<QCString,DCOPRef> KoViewIface::actionMap()
+TQMap<TQCString,DCOPRef> KoViewIface::actionMap()
{
return m_actionProxy->actionMap();
}
diff --git a/lib/kofficecore/KoViewIface.h b/lib/kofficecore/KoViewIface.h
index 1d01af64..c1f3f46e 100644
--- a/lib/kofficecore/KoViewIface.h
+++ b/lib/kofficecore/KoViewIface.h
@@ -41,12 +41,12 @@ public:
// Generate a name for this interface. Automatically used if
// the first constructor is used.
- static QCString newIfaceName();
+ static TQCString newIfaceName();
k_dcop:
- DCOPRef action( const QCString &name );
+ DCOPRef action( const TQCString &name );
QCStringList actions();
- QMap<QCString,DCOPRef> actionMap();
+ TQMap<TQCString,DCOPRef> actionMap();
protected:
KoView *m_pView;
diff --git a/lib/kofficecore/KoXmlNS.h b/lib/kofficecore/KoXmlNS.h
index 410519b8..d83a8bf5 100644
--- a/lib/kofficecore/KoXmlNS.h
+++ b/lib/kofficecore/KoXmlNS.h
@@ -23,8 +23,8 @@
#include <koffice_export.h>
/**
* Repository of XML namespaces used for OASIS documents.
- * Note: if we have code which needs often those as QStrings, then maybe
- * we need static const QString& versions of them too. Needs an init() though.
+ * Note: if we have code which needs often those as TQStrings, then maybe
+ * we need static const TQString& versions of them too. Needs an init() though.
*/
class KOFFICECORE_EXPORT KoXmlNS {
public:
diff --git a/lib/kofficecore/KoXmlReader.cpp b/lib/kofficecore/KoXmlReader.cpp
index ae1e2ae6..323d0ad6 100644
--- a/lib/kofficecore/KoXmlReader.cpp
+++ b/lib/kofficecore/KoXmlReader.cpp
@@ -32,25 +32,25 @@
memory read/write and any type of leak occurs. If you are not familiar
with Valgrind then RTFM first and come back again later on.
- * The public API shall remain as compatible as QDom.
+ * The public API shall remain as compatible as TQDom.
- * All QDom-compatible methods should behave the same. All QDom-compatible
+ * All TQDom-compatible methods should behave the same. All TQDom-compatible
functions should return the same result. In case of doubt, run
- koxmlreadertest.cpp but uncomment KOXML_USE_QDOM in koxmlreader.h
- so that the tests are performed with standard QDom.
+ koxmlreadertest.cpp but uncomment KOXML_USE_TQDOM in koxmlreader.h
+ so that the tests are performed with standard TQDom.
- Some differences compared to QDom:
+ Some differences compared to TQDom:
- DOM tree in KoXmlDocument is read-only, you can not modify it. This is
sufficient for KOffice since the tree is only accessed when loading
a document to the application. For saving the document to XML file,
use KoXmlWriter.
- - Comment node (like QDomComment) is not implemented as comments are
+ - Comment node (like TQDomComment) is not implemented as comments are
simply ignored.
- DTD, entity and entity reference are not handled. Thus, the associated
- nodes (like QDomDocumentType, QDomEntity, QDomEntityReference) are also
+ nodes (like TQDomDocumentType, TQDomEntity, TQDomEntityReference) are also
not implemented.
- Attribute mapping node is not implemented. But of course, functions to
@@ -61,46 +61,46 @@
#include "KoXmlReader.h"
-#ifndef KOXML_USE_QDOM
+#ifndef KOXML_USE_TQDOM
-#include <qxml.h>
-#include <qdom.h>
+#include <tqxml.h>
+#include <tqdom.h>
-#include <qmap.h>
-#include <qcstring.h>
+#include <tqmap.h>
+#include <tqcstring.h>
-// double QString, used for hashing against namespace and qualified name pair
-class DQString
+// double TQString, used for hashing against namespace and qualified name pair
+class DTQString
{
public:
- DQString() { }
- DQString( const QString& s1, const QString& s2 ){ str1 = s1; str2 = s2; }
- DQString( const DQString& b ) { str1 = b.str1; str2 = b.str2; }
- DQString& operator=( const DQString& b ){ str1 = b.str1; str2 = b.str2; return *this; }
- bool operator==( const DQString& b ) const { return (str1==b.str1) && (str2==b.str2); }
- bool operator!=( const DQString& b ) const { return (str1!=b.str1) || (str2!=b.str2); }
- bool operator<( const DQString& b ) const
+ DTQString() { }
+ DTQString( const TQString& s1, const TQString& s2 ){ str1 = s1; str2 = s2; }
+ DTQString( const DTQString& b ) { str1 = b.str1; str2 = b.str2; }
+ DTQString& operator=( const DTQString& b ){ str1 = b.str1; str2 = b.str2; return *this; }
+ bool operator==( const DTQString& b ) const { return (str1==b.str1) && (str2==b.str2); }
+ bool operator!=( const DTQString& b ) const { return (str1!=b.str1) || (str2!=b.str2); }
+ bool operator<( const DTQString& b ) const
{ return ( str1 < b.str1 ) ? true : ( str1==b.str1 ) ? str2<b.str2 : false; }
- QString s1() const { return str1; }
- QString s2() const { return str2; }
+ TQString s1() const { return str1; }
+ TQString s2() const { return str2; }
private:
- QString str1, str2;
+ TQString str1, str2;
};
-// just for completeness, this is the self-test for DQString above
+// just for completeness, this is the self-test for DTQString above
#if 0
- DQString b1;
- DQString b2;
+ DTQString b1;
+ DTQString b2;
CHECK( b1==b2, true );
CHECK( b1!=b2, false );
- b1 = DQString( "sweet","princess" );
- b2 = DQString( "sweet","princess" );
+ b1 = DTQString( "sweet","princess" );
+ b2 = DTQString( "sweet","princess" );
CHECK( b1==b2, true );
CHECK( b1!=b2, false );
- b1 = DQString( "sweet","princess" );
- b2 = DQString( "bad","prince" );
+ b1 = DTQString( "sweet","princess" );
+ b2 = DTQString( "bad","prince" );
CHECK( b1==b2, false );
CHECK( b1!=b2, true );
#endif
@@ -109,20 +109,20 @@ class KoXmlStream
{
public:
KoXmlStream(){ saveData = true; data.reserve(1024); pos = 0; }
- QString stringData() const { return data; }
+ TQString stringData() const { return data; }
void setSaveData( bool s ){ saveData = s; }
int at() const { return pos; }
- KoXmlStream& operator<<( const QString& str )
+ KoXmlStream& operator<<( const TQString& str )
{ if(saveData) data.append(str); pos+=str.length(); return *this; }
- KoXmlStream& appendEscape( const QString& str );
+ KoXmlStream& appendEscape( const TQString& str );
private:
bool saveData;
- QString data;
+ TQString data;
int pos;
};
-KoXmlStream& KoXmlStream::appendEscape( const QString& str )
+KoXmlStream& KoXmlStream::appendEscape( const TQString& str )
{
unsigned len = str.length();
@@ -158,10 +158,10 @@ public:
// generic properties
KoXmlNode::NodeType nodeType;
- QString tagName;
- QString namespaceURI;
- QString prefix;
- QString localName;
+ TQString tagName;
+ TQString namespaceURI;
+ TQString prefix;
+ TQString localName;
// reference counting
unsigned long count;
@@ -170,16 +170,16 @@ public:
// type information
virtual const char* typeInfo() const { return "Node"; }
- QString nodeName() const;
+ TQString nodeName() const;
// for tree and linked-list
- KoXmlNodeData* parent;
+ KoXmlNodeData* tqparent;
KoXmlNodeData* prev;
KoXmlNodeData* next;
KoXmlNodeData* first;
KoXmlNodeData* last;
- QString text();
+ TQString text();
// node manipulation
void appendChild( KoXmlNodeData* child );
@@ -187,22 +187,22 @@ public:
KoXmlNodeData* ownerDocument();
// attributes
- void setAttribute( const QString& name, const QString& value );
- QString attribute( const QString& name );
- bool hasAttribute( const QString& name );
- void setAttributeNS( const QString& nsURI, const QString& name, const QString& value );
- QString attributeNS( const QString& nsURI, const QString& name );
- bool hasAttributeNS( const QString& nsURI, const QString& name );
+ void setAttribute( const TQString& name, const TQString& value );
+ TQString attribute( const TQString& name );
+ bool hasAttribute( const TQString& name );
+ void setAttributeNS( const TQString& nsURI, const TQString& name, const TQString& value );
+ TQString attributeNS( const TQString& nsURI, const TQString& name );
+ bool hasAttributeNS( const TQString& nsURI, const TQString& name );
// for text and CDATA
- QString data() const;
- void setData( const QString& data );
+ TQString data() const;
+ void setData( const TQString& data );
// for document node
- QXmlSimpleReader* xmlReader;
- QString buffer;
- bool setContent( QXmlInputSource* source, QXmlReader* reader,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+ TQXmlSimpleReader* xmlReader;
+ TQString buffer;
+ bool setContent( TQXmlInputSource* source, TQXmlReader* reader,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
// used when doing on-demand (re)parse
bool loaded;
@@ -212,13 +212,13 @@ public:
bool fastLoading;
private:
- QMap<QString,QString> attr;
- QMap<DQString,QString> attrNS;
- QString textData;
+ TQMap<TQString,TQString> attr;
+ TQMap<DTQString,TQString> attrNS;
+ TQString textData;
friend class KoXmlHandler;
};
-class KoXmlHandler : public QXmlDefaultHandler
+class KoXmlHandler : public TQXmlDefaultHandler
{
public:
KoXmlHandler( KoXmlNodeData*, bool processNamespace );
@@ -231,38 +231,38 @@ public:
bool startDocument();
bool endDocument();
- bool startElement( const QString& nsURI, const QString& localName,
- const QString& qName, const QXmlAttributes& atts );
- bool endElement( const QString& nsURI, const QString& localName,
- const QString& qName );
+ bool startElement( const TQString& nsURI, const TQString& localName,
+ const TQString& qName, const TQXmlAttributes& atts );
+ bool endElement( const TQString& nsURI, const TQString& localName,
+ const TQString& qName );
- bool characters( const QString& ch );
- bool processingInstruction( const QString& target, const QString& data );
- bool skippedEntity( const QString& name );
+ bool characters( const TQString& ch );
+ bool processingInstruction( const TQString& target, const TQString& data );
+ bool skippedEntity( const TQString& name );
// lexical handler
bool startCDATA();
bool endCDATA();
- bool startEntity( const QString & );
- bool endEntity( const QString & );
- bool startDTD( const QString& name, const QString& publicId,
- const QString& systemId );
- bool comment( const QString& ch );
+ bool startEntity( const TQString & );
+ bool endEntity( const TQString & );
+ bool startDTD( const TQString& name, const TQString& publicId,
+ const TQString& systemId );
+ bool comment( const TQString& ch );
// decl handler
- bool externalEntityDecl( const QString &name, const QString &publicId,
- const QString &systemId ) ;
+ bool externalEntityDecl( const TQString &name, const TQString &publicId,
+ const TQString &systemId ) ;
// DTD handler
- bool notationDecl( const QString & name, const QString & publicId,
- const QString & systemId );
- bool unparsedEntityDecl( const QString &name, const QString &publicId,
- const QString &systemId, const QString &notationName ) ;
+ bool notationDecl( const TQString & name, const TQString & publicId,
+ const TQString & systemId );
+ bool unparsedEntityDecl( const TQString &name, const TQString &publicId,
+ const TQString &systemId, const TQString &notationName ) ;
// error handler
- bool fatalError( const QXmlParseException& exception );
+ bool fatalError( const TQXmlParseException& exception );
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
@@ -270,7 +270,7 @@ private:
bool processNamespace;
KoXmlNodeData* rootNode;
KoXmlNodeData* currentNode;
- QString entityName;
+ TQString entityName;
bool cdata;
int parseOffset;
KoXmlStream bufferStream;
@@ -288,14 +288,14 @@ KoXmlNodeData::KoXmlNodeData()
{
nodeType = KoXmlNode::NullNode;
- tagName = QString::null;
- prefix = QString::null;
- localName = QString::null;
- namespaceURI = QString::null;
- textData = QString::null;
+ tagName = TQString();
+ prefix = TQString();
+ localName = TQString();
+ namespaceURI = TQString();
+ textData = TQString();
count = 1;
- parent = 0;
+ tqparent = 0;
prev = next = 0;
first = last = 0;
@@ -305,7 +305,7 @@ KoXmlNodeData::KoXmlNodeData()
fastLoading = false;
// assume true, it will be set to false by XML parser when this node
- // apparently has children AND the children are not loaded
+ // aptqparently has tqchildren AND the tqchildren are not loaded
loaded = true;
}
@@ -325,26 +325,26 @@ void KoXmlNodeData::clear()
}
nodeType = KoXmlNode::NullNode;
- tagName = QString::null;
- prefix = QString::null;
- namespaceURI = QString::null;
- textData = QString::null;
+ tagName = TQString();
+ prefix = TQString();
+ namespaceURI = TQString();
+ textData = TQString();
attr.clear();
attrNS.clear();
- parent = 0;
+ tqparent = 0;
prev = next = 0;
first = last = 0;
delete xmlReader;
xmlReader = 0;
- buffer = QString::null;
+ buffer = TQString();
}
-QString KoXmlNodeData::text()
+TQString KoXmlNodeData::text()
{
- QString t( "" );
+ TQString t( "" );
loadChildren();
@@ -367,18 +367,18 @@ QString KoXmlNodeData::text()
return t;
}
-QString KoXmlNodeData::nodeName() const
+TQString KoXmlNodeData::nodeName() const
{
- QString n;
+ TQString n;
switch( nodeType )
{
case KoXmlNode::ElementNode:
n = tagName;
if (!prefix.isEmpty()) n.prepend(":").prepend(prefix); break;
- case KoXmlNode::TextNode: return QString("#text");
- case KoXmlNode::CDATASectionNode: return QString("#cdata-section");
- case KoXmlNode::DocumentNode: return QString("#document");
+ case KoXmlNode::TextNode: return TQString("#text");
+ case KoXmlNode::CDATASectionNode: return TQString("#cdata-section");
+ case KoXmlNode::DocumentNode: return TQString("#document");
default: break;
}
@@ -389,15 +389,15 @@ KoXmlNodeData* KoXmlNodeData::ownerDocument()
{
KoXmlNodeData* owner = this;
- while( owner->parent )
- owner = owner->parent;
+ while( owner->tqparent )
+ owner = owner->tqparent;
return (owner->nodeType==KoXmlNode::DocumentNode) ? owner : 0;
}
void KoXmlNodeData::appendChild( KoXmlNodeData* node )
{
- node->parent = this;
+ node->tqparent = this;
if( !last )
first = last = node;
else
@@ -409,27 +409,27 @@ void KoXmlNodeData::appendChild( KoXmlNodeData* node )
}
}
-void KoXmlNodeData::setAttribute( const QString& name, const QString& value )
+void KoXmlNodeData::setAttribute( const TQString& name, const TQString& value )
{
attr[ name ] = value;
}
-QString KoXmlNodeData::attribute( const QString& name )
+TQString KoXmlNodeData::attribute( const TQString& name )
{
return attr[ name ];
}
-bool KoXmlNodeData::hasAttribute( const QString& name )
+bool KoXmlNodeData::hasAttribute( const TQString& name )
{
- return attr.contains( name );
+ return attr.tqcontains( name );
}
-void KoXmlNodeData::setAttributeNS( const QString& nsURI,
-const QString& name, const QString& value )
+void KoXmlNodeData::setAttributeNS( const TQString& nsURI,
+const TQString& name, const TQString& value )
{
- QString prefix;
- QString localName = name;
- int i = name.find( ':' );
+ TQString prefix;
+ TQString localName = name;
+ int i = name.tqfind( ':' );
if( i != -1 )
{
localName = name.mid( i + 1 );
@@ -438,34 +438,34 @@ const QString& name, const QString& value )
if( prefix.isNull() ) return;
- DQString key( nsURI, localName );
+ DTQString key( nsURI, localName );
attrNS[ key ] = value;
}
-QString KoXmlNodeData::attributeNS( const QString& nsURI, const QString& name )
+TQString KoXmlNodeData::attributeNS( const TQString& nsURI, const TQString& name )
{
- DQString key( nsURI, name );
+ DTQString key( nsURI, name );
return attrNS[ key ];
}
-bool KoXmlNodeData::hasAttributeNS( const QString& nsURI, const QString& name )
+bool KoXmlNodeData::hasAttributeNS( const TQString& nsURI, const TQString& name )
{
- DQString key( nsURI, name );
- return attrNS.contains( key );
+ DTQString key( nsURI, name );
+ return attrNS.tqcontains( key );
}
-QString KoXmlNodeData::data() const
+TQString KoXmlNodeData::data() const
{
return textData;
}
-void KoXmlNodeData::setData( const QString& d )
+void KoXmlNodeData::setData( const TQString& d )
{
textData = d;
}
-bool KoXmlNodeData::setContent( QXmlInputSource* source,
-QXmlReader* reader, QString* errorMsg, int* errorLine, int* errorColumn )
+bool KoXmlNodeData::setContent( TQXmlInputSource* source,
+TQXmlReader* reader, TQString* errorMsg, int* errorLine, int* errorColumn )
{
if( nodeType != KoXmlNode::DocumentNode )
return false;
@@ -478,7 +478,7 @@ QXmlReader* reader, QString* errorMsg, int* errorLine, int* errorColumn )
if( !reader ) return false;
// copy the reader for later on-demand loading
- // FIXME this is a workaround because no copy is possible with QXmlReader
+ // FIXME this is a workaround because no copy is possible with TQXmlReader
char* features[] =
{
"http://xml.org/sax/features/namespaces",
@@ -486,7 +486,7 @@ QXmlReader* reader, QString* errorMsg, int* errorLine, int* errorColumn )
"http://trolltech.com/xml/features/report-whitespace-only-CharData",
"http://trolltech.com/xml/features/report-start-end-entity"
};
- xmlReader = new QXmlSimpleReader;
+ xmlReader = new TQXmlSimpleReader;
for( int fi=0; fi<4; fi++ )
xmlReader->setFeature( features[fi], reader->feature( features[fi] ) );
@@ -534,8 +534,8 @@ void KoXmlNodeData::loadChildren( int depth )
!doc->xmlReader->feature( "http://xml.org/sax/features/namespace-prefixes" );
- // XML snippet for the children, including this element
- QString snippet = doc->buffer.mid( startPos, endPos-startPos+1 );
+ // XML snippet for the tqchildren, including this element
+ TQString snippet = doc->buffer.mid( startPos, endPos-startPos+1 );
// now parse all subnodes
KoXmlHandler handler( this, nsProcess );
@@ -547,7 +547,7 @@ void KoXmlNodeData::loadChildren( int depth )
doc->xmlReader->setDeclHandler( &handler );
doc->xmlReader->setDTDHandler( &handler );
- QXmlInputSource source;
+ TQXmlInputSource source;
source.setData( snippet );
if( !doc->xmlReader->parse( source ) )
{
@@ -585,16 +585,16 @@ void KoXmlNodeData::unloadChildren()
// ==================================================================
KoXmlHandler::KoXmlHandler( KoXmlNodeData* n, bool ns ):
-QXmlDefaultHandler()
+TQXmlDefaultHandler()
{
processNamespace = ns;
rootNode = n;
currentNode = n;
cdata = false;
- entityName = QString::null;
+ entityName = TQString();
- errorMsg = QString::null;
+ errorMsg = TQString();
errorLine = 0;
errorColumn = 0;
@@ -614,7 +614,7 @@ bool KoXmlHandler::startDocument()
// just for sanity
currentNode = rootNode;
cdata = false;
- entityName = QString::null;
+ entityName = TQString();
elementDepth = -1;
return true;
@@ -633,8 +633,8 @@ bool KoXmlHandler::endDocument()
return true;
}
-bool KoXmlHandler::startDTD( const QString& name, const QString& publicId,
-const QString& systemId )
+bool KoXmlHandler::startDTD( const TQString& name, const TQString& publicId,
+const TQString& systemId )
{
Q_UNUSED( name );
Q_UNUSED( publicId );
@@ -644,8 +644,8 @@ const QString& systemId )
return true;
}
-bool KoXmlHandler::startElement( const QString& nsURI, const QString& localName,
-const QString& name, const QXmlAttributes& atts )
+bool KoXmlHandler::startElement( const TQString& nsURI, const TQString& localName,
+const TQString& name, const TQXmlAttributes& atts )
{
Q_UNUSED( localName );
@@ -656,7 +656,7 @@ const QString& name, const QXmlAttributes& atts )
// we are going one level deeper
elementDepth++;
- QString nodePrefix, nodeLocalName, nodeTagName;
+ TQString nodePrefix, nodeLocalName, nodeTagName;
KoXmlNodeData* element = 0;
if( processNamespace )
@@ -664,8 +664,8 @@ const QString& name, const QXmlAttributes& atts )
// parse, using namespace
nodeTagName = name;
nodeLocalName = name;
- nodePrefix = nsURI.isNull() ? QString::null : QString("");
- int i = name.find( ':' );
+ nodePrefix = nsURI.isNull() ? TQString() : TQString("");
+ int i = name.tqfind( ':' );
if( i != -1 )
{
nodeTagName = name.mid( i + 1 );
@@ -678,7 +678,7 @@ const QString& name, const QXmlAttributes& atts )
// construct a new element
element = new KoXmlNodeData;
element->nodeType = KoXmlNode::ElementNode;
- element->parent = currentNode;
+ element->tqparent = currentNode;
element->namespaceURI = nsURI;
element->prefix = nodePrefix;
element->localName = nodeLocalName;
@@ -690,12 +690,12 @@ const QString& name, const QXmlAttributes& atts )
// handle the attributes
for( int c=0; c<atts.length(); c++ )
{
- QString prefix;
- QString qName; // with prefix
- QString name; // without prefix, i.e. local name
+ TQString prefix;
+ TQString qName; // with prefix
+ TQString name; // without prefix, i.e. local name
name = qName = atts.qName(c);
- int i = qName.find( ':' );
+ int i = qName.tqfind( ':' );
if( i != -1 ) prefix = qName.left( i );
if( i != -1 ) name = qName.mid( i + 1 );
element->setAttributeNS( atts.uri(c), qName, atts.value(c) );
@@ -718,9 +718,9 @@ const QString& name, const QXmlAttributes& atts )
bufferStream << "\"";
for( int c=0; c<atts.length(); c++ )
{
- QString prefix;
- QString name = atts.qName(c); // qName contains the prefix
- int i = name.find( ':' );
+ TQString prefix;
+ TQString name = atts.qName(c); // qName contains the prefix
+ int i = name.tqfind( ':' );
if( i != -1 ) prefix = name.left( i );
if( i != -1 ) name = atts.qName(c).mid( i + 1 );
if( !atts.uri(c).isEmpty() )
@@ -744,10 +744,10 @@ const QString& name, const QXmlAttributes& atts )
// construct a new element
element = new KoXmlNodeData;
element->nodeType = KoXmlNode::ElementNode;
- element->parent = currentNode;
- element->namespaceURI = QString::null;
- element->prefix = QString::null;
- element->localName = QString::null;
+ element->tqparent = currentNode;
+ element->namespaceURI = TQString();
+ element->prefix = TQString();
+ element->localName = TQString();
element->tagName = nodeTagName;
if( rootNode->nodeType == KoXmlNode::DocumentNode )
@@ -802,15 +802,15 @@ const QString& name, const QXmlAttributes& atts )
return true;
}
-bool KoXmlHandler::endElement( const QString& nsURI, const QString& localName,
-const QString& qName )
+bool KoXmlHandler::endElement( const TQString& nsURI, const TQString& localName,
+const TQString& qName )
{
Q_UNUSED( nsURI );
Q_UNUSED( localName );
// sanity check
if( !currentNode ) return false;
- if( !currentNode->parent ) return false;
+ if( !currentNode->tqparent ) return false;
// see comments in startElement about first element and on-demand loading
if( rootNode->nodeType == KoXmlNode::DocumentNode )
@@ -826,7 +826,7 @@ const QString& qName )
// go up one level
if( elementDepth <= maxDepth )
- currentNode = currentNode->parent;
+ currentNode = currentNode->tqparent;
// we are going up one level
elementDepth--;
@@ -834,7 +834,7 @@ const QString& qName )
return true;
}
-bool KoXmlHandler::characters( const QString& str )
+bool KoXmlHandler::characters( const TQString& str )
{
// sanity check
if( rootNode->nodeType == KoXmlNode::DocumentNode )
@@ -856,7 +856,7 @@ bool KoXmlHandler::characters( const QString& str )
{
KoXmlNodeData* cdata = new KoXmlNodeData;
cdata->nodeType = KoXmlNode::CDATASectionNode;
- cdata->parent = currentNode;
+ cdata->tqparent = currentNode;
cdata->setData( str );
currentNode->appendChild( cdata );
}
@@ -871,7 +871,7 @@ bool KoXmlHandler::characters( const QString& str )
{
KoXmlNodeData* text = new KoXmlNodeData;
text->nodeType = KoXmlNode::TextNode;
- text->parent = currentNode;
+ text->tqparent = currentNode;
text->setData( str );
currentNode->appendChild( text );
}
@@ -884,8 +884,8 @@ bool KoXmlHandler::characters( const QString& str )
return true;
}
-bool KoXmlHandler::processingInstruction( const QString& target,
-const QString& data )
+bool KoXmlHandler::processingInstruction( const TQString& target,
+const TQString& data )
{
// sanity check
if( !currentNode )
@@ -893,7 +893,7 @@ const QString& data )
KoXmlNodeData* instruction = new KoXmlNodeData;
instruction->nodeType = KoXmlNode::ProcessingInstructionNode;
- instruction->parent = currentNode;
+ instruction->tqparent = currentNode;
instruction->tagName = target;
instruction->setData( data );
@@ -902,7 +902,7 @@ const QString& data )
return true;
}
-bool KoXmlHandler::skippedEntity( const QString& name )
+bool KoXmlHandler::skippedEntity( const TQString& name )
{
Q_UNUSED( name );
@@ -922,20 +922,20 @@ bool KoXmlHandler::endCDATA()
return true;
}
-bool KoXmlHandler::startEntity( const QString& name )
+bool KoXmlHandler::startEntity( const TQString& name )
{
entityName = name;
return true;
}
-bool KoXmlHandler::endEntity( const QString& name )
+bool KoXmlHandler::endEntity( const TQString& name )
{
Q_UNUSED( name );
- entityName = QString::null;
+ entityName = TQString();
return true;
}
-bool KoXmlHandler::comment( const QString& comment )
+bool KoXmlHandler::comment( const TQString& comment )
{
Q_UNUSED( comment );
@@ -943,8 +943,8 @@ bool KoXmlHandler::comment( const QString& comment )
return true;
}
-bool KoXmlHandler::unparsedEntityDecl( const QString &name,
-const QString &publicId, const QString &systemId, const QString &notationName )
+bool KoXmlHandler::unparsedEntityDecl( const TQString &name,
+const TQString &publicId, const TQString &systemId, const TQString &notationName )
{
Q_UNUSED( name );
Q_UNUSED( publicId );
@@ -955,8 +955,8 @@ const QString &publicId, const QString &systemId, const QString &notationName )
return true;
}
-bool KoXmlHandler::externalEntityDecl( const QString &name,
-const QString &publicId, const QString &systemId )
+bool KoXmlHandler::externalEntityDecl( const TQString &name,
+const TQString &publicId, const TQString &systemId )
{
Q_UNUSED( name );
Q_UNUSED( publicId );
@@ -966,8 +966,8 @@ const QString &publicId, const QString &systemId )
return true;
}
-bool KoXmlHandler::notationDecl( const QString & name,
-const QString & publicId, const QString & systemId )
+bool KoXmlHandler::notationDecl( const TQString & name,
+const TQString & publicId, const TQString & systemId )
{
Q_UNUSED( name );
Q_UNUSED( publicId );
@@ -977,12 +977,12 @@ const QString & publicId, const QString & systemId )
return true;
}
-bool KoXmlHandler::fatalError( const QXmlParseException& exception )
+bool KoXmlHandler::fatalError( const TQXmlParseException& exception )
{
errorMsg = exception.message();
errorLine = exception.lineNumber();
errorColumn = exception.columnNumber();
- return QXmlDefaultHandler::fatalError( exception );
+ return TQXmlDefaultHandler::fatalError( exception );
}
// ==================================================================
@@ -1078,38 +1078,38 @@ void KoXmlNode::clear()
d = new KoXmlNodeData;
}
-QString KoXmlNode::nodeName() const
+TQString KoXmlNode::nodeName() const
{
return d->nodeName();
}
-QString KoXmlNode::prefix() const
+TQString KoXmlNode::prefix() const
{
- return isElement() ? d->prefix : QString::null;
+ return isElement() ? d->prefix : TQString();
}
-QString KoXmlNode::namespaceURI() const
+TQString KoXmlNode::namespaceURI() const
{
- return isElement() ? d->namespaceURI : QString::null;
+ return isElement() ? d->namespaceURI : TQString();
}
-QString KoXmlNode::localName() const
+TQString KoXmlNode::localName() const
{
- return isElement() ? d->localName : QString::null;
+ return isElement() ? d->localName : TQString();
}
KoXmlDocument KoXmlNode::ownerDocument() const
{
KoXmlNodeData* node = d;
- while( node->parent ) node = node->parent;
+ while( node->tqparent ) node = node->tqparent;
if( node->nodeType != DocumentNode ) return KoXmlDocument();
return KoXmlDocument( node );
}
-KoXmlNode KoXmlNode::parentNode() const
+KoXmlNode KoXmlNode::tqparentNode() const
{
- return d->parent ? KoXmlNode( d->parent ) : KoXmlNode();
+ return d->tqparent ? KoXmlNode( d->tqparent ) : KoXmlNode();
}
bool KoXmlNode::hasChildNodes() const
@@ -1142,7 +1142,7 @@ KoXmlNode KoXmlNode::previousSibling() const
return d->prev ? KoXmlNode( d->prev ) : KoXmlNode();
}
-KoXmlNode KoXmlNode::namedItem( const QString& name ) const
+KoXmlNode KoXmlNode::namedItem( const TQString& name ) const
{
if( !d->fastLoading )
d->loadChildren();
@@ -1159,7 +1159,7 @@ KoXmlNode KoXmlNode::namedItem( const QString& name ) const
return KoXmlNode();
}
-KoXmlNode KoXmlNode::namedItemNS( const QString& nsURI, const QString& name ) const
+KoXmlNode KoXmlNode::namedItemNS( const TQString& nsURI, const TQString& name ) const
{
if( !d->fastLoading )
d->loadChildren();
@@ -1263,12 +1263,12 @@ bool KoXmlElement::operator!= ( const KoXmlElement& element ) const
return (d!=element.d);
}
-QString KoXmlElement::tagName() const
+TQString KoXmlElement::tagName() const
{
- return isElement() ? ((KoXmlNodeData*)d)->tagName: QString::null;
+ return isElement() ? ((KoXmlNodeData*)d)->tagName: TQString();
}
-QString KoXmlElement::text() const
+TQString KoXmlElement::text() const
{
return d->text();
}
@@ -1278,13 +1278,13 @@ bool KoXmlElement::isElement() const
return true;
}
-QString KoXmlElement::attribute( const QString& name ) const
+TQString KoXmlElement::attribute( const TQString& name ) const
{
- return attribute( name, QString::null );
+ return attribute( name, TQString() );
}
-QString KoXmlElement::attribute( const QString& name,
-const QString& defaultValue ) const
+TQString KoXmlElement::attribute( const TQString& name,
+const TQString& defaultValue ) const
{
if( !isElement() )
return defaultValue;
@@ -1295,8 +1295,8 @@ const QString& defaultValue ) const
return ((KoXmlNodeData*)d)->attribute( name );
}
-QString KoXmlElement::attributeNS( const QString& namespaceURI,
-const QString& localName, const QString& defaultValue ) const
+TQString KoXmlElement::attributeNS( const TQString& namespaceURI,
+const TQString& localName, const TQString& defaultValue ) const
{
if( !isElement() )
return defaultValue;
@@ -1307,13 +1307,13 @@ const QString& localName, const QString& defaultValue ) const
return ((KoXmlNodeData*)d)->attributeNS( namespaceURI,localName );
}
-bool KoXmlElement::hasAttribute( const QString& name ) const
+bool KoXmlElement::hasAttribute( const TQString& name ) const
{
return isElement() ? ((KoXmlNodeData*)d)->hasAttribute( name ) : false;
}
-bool KoXmlElement::hasAttributeNS( const QString& namespaceURI,
-const QString& localName ) const
+bool KoXmlElement::hasAttributeNS( const TQString& namespaceURI,
+const TQString& localName ) const
{
return isElement() ? ((KoXmlNodeData*)d)->hasAttributeNS(
namespaceURI, localName ) : false;;
@@ -1357,7 +1357,7 @@ bool KoXmlText::isText() const
return true;
}
-QString KoXmlText::data() const
+TQString KoXmlText::data() const
{
return ((KoXmlNodeData*)d)->data();
}
@@ -1492,8 +1492,8 @@ bool KoXmlDocument::fastLoading() const
return d->fastLoading;
}
-bool KoXmlDocument::setContent( QXmlInputSource *source, QXmlReader *reader,
- QString* errorMsg, int* errorLine, int* errorColumn )
+bool KoXmlDocument::setContent( TQXmlInputSource *source, TQXmlReader *reader,
+ TQString* errorMsg, int* errorLine, int* errorColumn )
{
if( d->nodeType != KoXmlNode::DocumentNode )
return false;
@@ -1502,27 +1502,27 @@ bool KoXmlDocument::setContent( QXmlInputSource *source, QXmlReader *reader,
}
// no namespace processing
-bool KoXmlDocument::setContent( QIODevice* device, QString* errorMsg,
+bool KoXmlDocument::setContent( TQIODevice* device, TQString* errorMsg,
int* errorLine, int* errorColumn )
{
return setContent( device, false, errorMsg, errorLine, errorColumn );
}
-bool KoXmlDocument::setContent( QIODevice* device, bool namespaceProcessing,
-QString* errorMsg, int* errorLine, int* errorColumn )
+bool KoXmlDocument::setContent( TQIODevice* device, bool namespaceProcessing,
+TQString* errorMsg, int* errorLine, int* errorColumn )
{
if( d->nodeType != KoXmlNode::DocumentNode )
return false;
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setFeature( "http://xml.org/sax/features/namespaces", namespaceProcessing );
reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", !namespaceProcessing );
reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", false );
- // FIXME this hack is apparently private
+ // FIXME this hack is aptqparently private
//reader.setUndefEntityInAttrHack(true);
- QXmlInputSource source( device );
+ TQXmlInputSource source( device );
return d->setContent( &source, &reader, errorMsg, errorLine, errorColumn );
}
@@ -1531,8 +1531,8 @@ QString* errorMsg, int* errorLine, int* errorColumn )
KoXmlElement KoXml::namedItemNS( const KoXmlNode& node, const char* nsURI,
const char* localName )
{
-#ifdef KOXML_USE_QDOM
- // David's solution for namedItemNS, only for QDom stuff
+#ifdef KOXML_USE_TQDOM
+ // David's solution for namedItemNS, only for TQDom stuff
KoXmlNode n = node.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() ) {
if ( n.isElement() && n.localName() == localName &&
@@ -1547,8 +1547,8 @@ const char* localName )
void KoXml::load( KoXmlNode& node, int depth )
{
-#ifdef KOXML_USE_QDOM
- // do nothing, QDom has no on-demand loading
+#ifdef KOXML_USE_TQDOM
+ // do nothing, TQDom has no on-demand loading
Q_UNUSED( node );
Q_UNUSED( depth );
#else
@@ -1559,8 +1559,8 @@ void KoXml::load( KoXmlNode& node, int depth )
void KoXml::unload( KoXmlNode& node )
{
-#ifdef KOXML_USE_QDOM
- // do nothing, QDom has no on-demand unloading
+#ifdef KOXML_USE_TQDOM
+ // do nothing, TQDom has no on-demand unloading
Q_UNUSED( node );
#else
node.unload();
diff --git a/lib/kofficecore/KoXmlReader.h b/lib/kofficecore/KoXmlReader.h
index df2f10c9..919e566b 100644
--- a/lib/kofficecore/KoXmlReader.h
+++ b/lib/kofficecore/KoXmlReader.h
@@ -20,27 +20,27 @@
#ifndef KOFFICE_XMLREADER
#define KOFFICE_XMLREADER
-// use standard QDom, useful to test KoXml classes against Qt's QDom
-//#define KOXML_USE_QDOM
+// use standard TQDom, useful to test KoXml classes against TQt's TQDom
+//#define KOXML_USE_TQDOM
-#include <qdom.h>
+#include <tqdom.h>
#include <koffice_export.h>
-#ifdef KOXML_USE_QDOM
+#ifdef KOXML_USE_TQDOM
-#define KoXmlNode QDomNode
-#define KoXmlElement QDomElement
-#define KoXmlText QDomText
-#define KoXmlCDATASection QDomCDATASection
-#define KoXmlDocument QDomDocument
+#define KoXmlNode TQDomNode
+#define KoXmlElement TQDomElement
+#define KoXmlText TQDomText
+#define KoXmlCDATASection TQDomCDATASection
+#define KoXmlDocument TQDomDocument
#else
-class QIODevice;
-class QString;
-class QTextStream;
-class QXmlReader;
-class QXmlInputSource;
+class TQIODevice;
+class TQString;
+class TQTextStream;
+class TQXmlReader;
+class TQXmlInputSource;
class KoXmlElement;
class KoXmlText;
@@ -54,7 +54,7 @@ class KoXmlNodeData;
* KoXmlNode is a base class for KoXmlElement, KoXmlText.
* Often, these subclasses are used for getting the data instead of KoXmlNode.
* However, as base class, KoXmlNode is very helpful when for example iterating
- * all child nodes within one parent node.
+ * all child nodes within one tqparent node.
*
* KoXmlNode implements an explicit sharing, a node shares its data with
* other copies (if exist).
@@ -95,13 +95,13 @@ public:
KoXmlCDATASection toCDATASection();
KoXmlDocument toDocument();
- virtual QString nodeName() const;
- virtual QString namespaceURI() const;
- virtual QString prefix() const;
- virtual QString localName() const;
+ virtual TQString nodeName() const;
+ virtual TQString namespaceURI() const;
+ virtual TQString prefix() const;
+ virtual TQString localName() const;
KoXmlDocument ownerDocument() const;
- KoXmlNode parentNode() const;
+ KoXmlNode tqparentNode() const;
bool hasChildNodes() const;
KoXmlNode firstChild() const;
@@ -109,8 +109,8 @@ public:
KoXmlNode nextSibling() const;
KoXmlNode previousSibling() const;
- KoXmlNode namedItem( const QString& name ) const;
- KoXmlNode namedItemNS( const QString& nsURI, const QString& name ) const;
+ KoXmlNode namedItem( const TQString& name ) const;
+ KoXmlNode namedItemNS( const TQString& nsURI, const TQString& name ) const;
/**
* Loads all child nodes (if any) of this node. Normally you do not need
@@ -147,16 +147,16 @@ public:
bool operator== ( const KoXmlElement& ) const;
bool operator!= ( const KoXmlElement& ) const;
- QString tagName() const;
- QString text() const;
+ TQString tagName() const;
+ TQString text() const;
virtual bool isElement() const;
- QString attribute( const QString& name ) const;
- QString attribute( const QString& name, const QString& defaultValue ) const;
- QString attributeNS( const QString& namespaceURI, const QString& localName,
- const QString& defaultValue ) const;
- bool hasAttribute( const QString& name ) const;
- bool hasAttributeNS( const QString& namespaceURI, const QString& localName ) const;
+ TQString attribute( const TQString& name ) const;
+ TQString attribute( const TQString& name, const TQString& defaultValue ) const;
+ TQString attributeNS( const TQString& namespaceURI, const TQString& localName,
+ const TQString& defaultValue ) const;
+ bool hasAttribute( const TQString& name ) const;
+ bool hasAttributeNS( const TQString& namespaceURI, const TQString& localName ) const;
private:
friend class KoXmlNode;
@@ -176,8 +176,8 @@ public:
KoXmlText& operator=( const KoXmlText& text );
virtual ~KoXmlText();
- QString data() const;
- void setData( const QString& data );
+ TQString data() const;
+ void setData( const TQString& data );
virtual bool isText() const;
private:
@@ -209,8 +209,8 @@ private:
/**
* KoXmlDocument represents an XML document, structured in a DOM tree.
*
- * KoXmlDocument is designed to be memory efficient. Unlike QDomDocument from
- * Qt's XML module, KoXmlDocument does not store all nodes in the DOM tree.
+ * KoXmlDocument is designed to be memory efficient. Unlike TQDomDocument from
+ * TQt's XML module, KoXmlDocument does not store all nodes in the DOM tree.
* Some nodes will be loaded and parsed on-demand only.
*
* KoXmlDocument is read-only, you can not modify its content.
@@ -235,20 +235,20 @@ public:
void setFastLoading( bool f );
bool fastLoading() const;
- bool setContent( QIODevice* device, bool namespaceProcessing,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
- bool setContent( QIODevice* device,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
- bool setContent( QXmlInputSource *source, QXmlReader *reader,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
-
-// bool setContent( const QCString& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QByteArray& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QString& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( QIODevice* dev, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QCString& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QByteArray& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QString& text, QString *errorMsg=0, int *errorLine=0,
+ bool setContent( TQIODevice* device, bool namespaceProcessing,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+ bool setContent( TQIODevice* device,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+ bool setContent( TQXmlInputSource *source, TQXmlReader *reader,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+
+// bool setContent( const TQCString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQByteArray& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( TQIODevice* dev, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQCString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQByteArray& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQString& text, TQString *errorMsg=0, int *errorLine=0,
// int *errorColumn=0 );
@@ -257,28 +257,28 @@ private:
KoXmlDocument( KoXmlNodeData* );
};
-#endif // KOXML_USE_QDOM
+#endif // KOXML_USE_TQDOM
/**
- * This namespace contains a few convenience functions to simplify code using QDom
+ * This namespace contains a few convenience functions to simplify code using TQDom
* (when loading OASIS documents, in particular).
*
* To find the child element with a given name, use KoXml::namedItemNS.
*
* To find all child elements with a given name, use
- * QDomElement e;
- * forEachElement( e, parent )
+ * TQDomElement e;
+ * forEachElement( e, tqparent )
* {
* if ( e.localName() == "..." && e.namespaceURI() == KoXmlNS::... )
* {
* ...
* }
* }
- * Note that this means you don't ever need to use QDomNode nor toElement anymore!
+ * Note that this means you don't ever need to use TQDomNode nor toElement anymore!
* Also note that localName is the part without the prefix, this is the whole point
* of namespace-aware methods.
*
- * To find the attribute with a given name, use QDomElement::attributeNS.
+ * To find the attribute with a given name, use TQDomElement::attributeNS.
*
* Do not use getElementsByTagNameNS, it's recursive (which is never needed in KOffice).
* Do not use tagName() or nodeName() or prefix(), since the prefix isn't fixed.
@@ -288,8 +288,8 @@ private:
namespace KoXml {
/**
- * A namespace-aware version of QDomNode::namedItem(),
- * which also takes care of casting to a QDomElement.
+ * A namespace-aware version of TQDomNode::namedItem(),
+ * which also takes care of casting to a TQDomElement.
* Use this when a domelement is known to have only *one* child element
* with a given tagname.
*
@@ -300,20 +300,20 @@ namespace KoXml {
/**
* Explicitly load child nodes of specified node, up to given depth.
- * This function has no effect if QDom is used.
+ * This function has no effect if TQDom is used.
*/
KOFFICECORE_EXPORT void load( KoXmlNode& node, int depth = 1 );
/**
* Unload child nodes of specified node.
- * This function has no effect if QDom is used.
+ * This function has no effect if TQDom is used.
*/
KOFFICECORE_EXPORT void unload( KoXmlNode& node );
}
-#define forEachElement( elem, parent ) \
- for ( KoXmlNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
+#define forEachElement( elem, tqparent ) \
+ for ( KoXmlNode _node = tqparent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
if ( !( elem = _node.toElement() ).isNull() )
diff --git a/lib/kofficecore/Koversiondialog.cpp b/lib/kofficecore/Koversiondialog.cpp
index b21ae52f..a9fc2182 100644
--- a/lib/kofficecore/Koversiondialog.cpp
+++ b/lib/kofficecore/Koversiondialog.cpp
@@ -18,13 +18,13 @@
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <kbuttonbox.h>
#include <kdebug.h>
@@ -33,18 +33,18 @@
#include <klistview.h>
#include <kdebug.h>
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include "Koversiondialog.h"
-KoVersionDialog::KoVersionDialog( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n("Version"), Ok|Cancel )
+KoVersionDialog::KoVersionDialog( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n("Version"), Ok|Cancel )
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *grid1 = new QGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid1 = new TQGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
list=new KListView(page, "versionlist");
list->addColumn(i18n("Date & Time"));
@@ -53,23 +53,23 @@ KoVersionDialog::KoVersionDialog( QWidget* parent, const char* name )
grid1->addMultiCellWidget(list,0,8,0,0);
- m_pAdd=new QPushButton(i18n("&Add"),page);
+ m_pAdd=new TQPushButton(i18n("&Add"),page);
grid1->addWidget(m_pAdd,1,2);
- m_pRemove=new QPushButton(i18n("&Remove"),page);
+ m_pRemove=new TQPushButton(i18n("&Remove"),page);
grid1->addWidget(m_pRemove,2,2);
- m_pModify=new QPushButton(i18n("&Modify"),page);
+ m_pModify=new TQPushButton(i18n("&Modify"),page);
grid1->addWidget(m_pModify,3,2);
- m_pOpen=new QPushButton(i18n("&Open"),page);
+ m_pOpen=new TQPushButton(i18n("&Open"),page);
grid1->addWidget(m_pOpen,4,2);
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_pAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- connect( m_pOpen, SIGNAL( clicked() ), this, SLOT( slotOpen() ) );
- connect( m_pModify, SIGNAL( clicked() ), this, SLOT( slotModify() ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_pAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdd() ) );
+ connect( m_pOpen, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpen() ) );
+ connect( m_pModify, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotModify() ) );
updateButton();
@@ -101,7 +101,7 @@ void KoVersionDialog::slotRemove()
void KoVersionDialog::slotModify()
{
- KoVersionModifyDialog * dlg = new KoVersionModifyDialog( this /*, const QString &_comment*/ /*TODO add*/ );
+ KoVersionModifyDialog * dlg = new KoVersionModifyDialog( this /*, const TQString &_comment*/ /*TODO add*/ );
if ( dlg->exec() )
{
//TODO
@@ -121,20 +121,20 @@ void KoVersionDialog::slotOk()
accept();
}
-KoVersionModifyDialog::KoVersionModifyDialog( QWidget* parent, const QString &/*comment*/, const char* name )
- : KDialogBase( parent, name, true, i18n("Comment"), Ok|Cancel )
+KoVersionModifyDialog::KoVersionModifyDialog( TQWidget* tqparent, const TQString &/*comment*/, const char* name )
+ : KDialogBase( tqparent, name, true, i18n("Comment"), Ok|Cancel )
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QHBoxLayout *grid1 = new QHBoxLayout( page,KDialog::marginHint(), KDialog::spacingHint());
+ TQHBoxLayout *grid1 = new TQHBoxLayout( page,KDialog::marginHint(), KDialog::spacingHint());
- m_multiline=new QMultiLineEdit(page, "multiline");
+ m_multiline=new TQMultiLineEdit(page, "multiline");
grid1->addWidget( m_multiline );
}
-QString KoVersionModifyDialog::comment() const
+TQString KoVersionModifyDialog::comment() const
{
return m_multiline->text();
}
diff --git a/lib/kofficecore/Koversiondialog.h b/lib/kofficecore/Koversiondialog.h
index 6a8c7fb6..e357e964 100644
--- a/lib/kofficecore/Koversiondialog.h
+++ b/lib/kofficecore/Koversiondialog.h
@@ -22,16 +22,17 @@
#include <kdialogbase.h>
-class QPushButton;
-class QToolButton;
+class TQPushButton;
+class TQToolButton;
class KListView;
-class QMultiLineEdit;
+class TQMultiLineEdit;
class KoVersionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoVersionDialog( QWidget* parent, const char* name = 0L );
+ KoVersionDialog( TQWidget* tqparent, const char* name = 0L );
~KoVersionDialog();
public slots:
@@ -47,22 +48,23 @@ protected:
void updateButton();
KListView * list;
- QPushButton* m_pRemove;
- QPushButton* m_pAdd;
- QPushButton* m_pOpen;
- QPushButton* m_pModify;
+ TQPushButton* m_pRemove;
+ TQPushButton* m_pAdd;
+ TQPushButton* m_pOpen;
+ TQPushButton* m_pModify;
};
class KoVersionModifyDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoVersionModifyDialog( QWidget* parent, const QString &_comment = QString::null , const char* name = 0L );
+ KoVersionModifyDialog( TQWidget* tqparent, const TQString &_comment = TQString() , const char* name = 0L );
- QString comment() const;
+ TQString comment() const;
private:
- QMultiLineEdit *m_multiline;
+ TQMultiLineEdit *m_multiline;
};
#endif
diff --git a/lib/kofficecore/THOUGHTS b/lib/kofficecore/THOUGHTS
index f0121aa9..5d0a9338 100644
--- a/lib/kofficecore/THOUGHTS
+++ b/lib/kofficecore/THOUGHTS
@@ -28,9 +28,9 @@ just agree that this QRect represents screen pixels at the given zoom value(s)
and the app can calculate the requested area to be painted itself. This should
solve zooming and "scrolling" problems.
One ugly problem also is what we will do about performance problems on
-repainting a part. Some time ago we got a mail on KOffice where some guy
+tqrepainting a part. Some time ago we got a mail on KOffice where some guy
asked what to do about making that embedded painting faster. The reason is
-that we *always* repaint the whole area, no matter what. This can easily be
+that we *always* tqrepaint the whole area, no matter what. This can easily be
optimized to a WNorthWestGravity like behavior, because you can't edit those
embedded parts anyway, so even kchart and other non-WNG apps support that.
( we have to translate the painter, of course).
@@ -44,7 +44,7 @@ whether they are the root views (not embedded), or they are
*active* embedded views. There only has to be a KoView object.
There is *one* zoom factor for both axes (x/y) and the whole
-content (text, objects, children,...) is zoomed accordingly.
+content (text, objects, tqchildren,...) is zoomed accordingly.
This kind of zooming is like the zoom support you know from
other applications.
@@ -72,12 +72,12 @@ each axe here. (i.e. x/y zoom factors)
Related to that is child-panning. Indepenent of the zoom factor
the child shouldn't just show the left/top corner, but it should
-"remember" the position inside the document when it's repainted
+"remember" the position inside the document when it's tqrepainted
as inactive child.
###
If a part doesn't support zooming natively we have to fall back to WMartix
-hacks (don't know how we can "ask" a part about that, but I'm sure we find
+hacks (don't know how we can "ask" a part about that, but I'm sure we tqfind
some BC way).
2.2) Widget embedding:
diff --git a/lib/kofficecore/kkbdaccessextensions.cpp b/lib/kofficecore/kkbdaccessextensions.cpp
index aae37203..39f95948 100644
--- a/lib/kofficecore/kkbdaccessextensions.cpp
+++ b/lib/kofficecore/kkbdaccessextensions.cpp
@@ -17,16 +17,16 @@
Boston, MA 02110-1301, USA.
*/
-// Qt includes
-#include <qsplitter.h>
-#include <qdockwindow.h>
-#include <qdockarea.h>
-#include <qevent.h>
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qwidgetlist.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+// TQt includes
+#include <tqsplitter.h>
+#include <tqdockwindow.h>
+#include <tqdockarea.h>
+#include <tqevent.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqwidgetlist.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
// KDE includes
#include <klocale.h>
@@ -41,14 +41,14 @@
// TODO: See eventFilter method.
//#include "kkbdaccessextensions.moc"
-class KPanelKbdSizerIcon : public QCursor
+class KPanelKbdSizerIcon : public TQCursor
{
public:
KPanelKbdSizerIcon() :
- QCursor(Qt::SizeAllCursor),
+ TQCursor(TQt::SizeAllCursor),
isActive(false)
{
- currentPos = QPoint(-1, -1);
+ currentPos = TQPoint(-1, -1);
}
~KPanelKbdSizerIcon()
@@ -56,9 +56,9 @@ class KPanelKbdSizerIcon : public QCursor
hide();
}
- void show(const QPoint p) {
+ void show(const TQPoint p) {
if (!isActive) {
- originalPos = QCursor::pos();
+ originalPos = TQCursor::pos();
kapp->setOverrideCursor(*this);
isActive = true;
}
@@ -70,40 +70,40 @@ class KPanelKbdSizerIcon : public QCursor
void hide() {
if (isActive) {
kapp->restoreOverrideCursor();
- QCursor::setPos(originalPos);
+ TQCursor::setPos(originalPos);
}
isActive = false;
}
void setShape(int shayp)
{
- if (shayp != shape()) {
+ if (shayp != tqshape()) {
// Must restore and override to get the icon to refresh.
if (isActive) kapp->restoreOverrideCursor();
- QCursor::setShape(shayp);
+ TQCursor::setShape((Qt::CursorShape)shayp);
if (isActive) kapp->setOverrideCursor(*this);
}
}
// Return the difference between a position and where icon is supposed to be.
- QSize delta(const QPoint p)
+ TQSize delta(const TQPoint p)
{
- QPoint d = p - currentPos;
- return QSize(d.x(), d.y());
+ TQPoint d = p - currentPos;
+ return TQSize(d.x(), d.y());
}
// Return the difference between where the icon is currently positioned and where
// it is supposed to be.
- QSize delta() { return delta(pos()); }
+ TQSize delta() { return delta(pos()); }
// True if the sizing icon is visible.
bool isActive;
private:
// Icon's current position.
- QPoint currentPos;
+ TQPoint currentPos;
// Mouse cursor's original position when icon is shown.
- QPoint originalPos;
+ TQPoint originalPos;
};
class KKbdAccessExtensionsPrivate
@@ -137,9 +137,9 @@ class KKbdAccessExtensionsPrivate
KAction* accessKeysAction;
// The splitter or dockwindow currently being sized. If 0, sizing is not in progress.
- QWidget* panel;
+ TQWidget* panel;
- // Index of current handle of the panel. When panel is a QDockWindow:
+ // Index of current handle of the panel. When panel is a TQDockWindow:
// 1 = size horizontally
// 2 = size vertically
uint handleNdx;
@@ -150,25 +150,25 @@ class KKbdAccessExtensionsPrivate
// Sizing increment.
int stepSize;
- // List of the access key QLabels. If not 0, access keys are onscreen.
- QPtrList<QLabel>* accessKeyLabels;
+ // List of the access key TQLabels. If not 0, access keys are onscreen.
+ TQPtrList<TQLabel>* accessKeyLabels;
// Pointer to the KMainWindow.
KMainWindow* mainWindow;
};
-KKbdAccessExtensions::KKbdAccessExtensions(KMainWindow* parent, const char* name) :
- QObject(parent, name)
+KKbdAccessExtensions::KKbdAccessExtensions(KMainWindow* tqparent, const char* name) :
+ TQObject(tqparent, name)
{
// kdDebug() << "KKbdAccessExtensions::KKbdAccessExtensions: running." << endl;
d = new KKbdAccessExtensionsPrivate;
- d->mainWindow = parent;
+ d->mainWindow = tqparent;
d->fwdAction = new KAction(i18n("Resize Panel Forward"), KShortcut("F8"),
- 0, 0, parent->actionCollection(), "resize_panel_forward");
+ 0, 0, tqparent->actionCollection(), "resize_panel_forward");
d->revAction = new KAction(i18n("Resize Panel Reverse"), KShortcut("Shift+F8"),
- 0, 0, parent->actionCollection(), "resize_panel_reverse");
+ 0, 0, tqparent->actionCollection(), "resize_panel_reverse");
d->accessKeysAction = new KAction(i18n("Access Keys"), KShortcut("Alt+F8"),
- 0, 0, parent->actionCollection(), "access_keys");
+ 0, 0, tqparent->actionCollection(), "access_keys");
// "Disable" the shortcuts so we can see them in eventFilter.
d->fwdAction->setEnabled(false);
d->revAction->setEnabled(false);
@@ -188,18 +188,18 @@ int KKbdAccessExtensions::stepSize() const { return d->stepSize; }
void KKbdAccessExtensions::setStepSize(int s) { d->stepSize = s; }
-bool KKbdAccessExtensions::eventFilter( QObject *o, QEvent *e )
+bool KKbdAccessExtensions::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress ) {
+ if ( e->type() == TQEvent::KeyPress ) {
// TODO: This permits only a single-key shortcut. For example, Alt+S,R would not work.
// If user configures a multi-key shortcut, it is undefined what will happen here.
// It would be better to handle these as KShortcut activate() signals, but the problem
- // is that once a QDockWindow is undocked and has focus, the KShortcut activate() signals
+ // is that once a TQDockWindow is undocked and has focus, the KShortcut activate() signals
// don't fire anymore.
KShortcut fwdSc = d->fwdAction->shortcut();
KShortcut revSc = d->revAction->shortcut();
KShortcut accessKeysSc = d->accessKeysAction->shortcut();
- QKeyEvent* kev = dynamic_cast<QKeyEvent *>(e);
+ TQKeyEvent* kev = dynamic_cast<TQKeyEvent *>(e);
KKey k = KKey(kev);
KShortcut sc = KShortcut(k);
// kdDebug() << "KKbdAccessExtensions::eventFilter: Key press " << sc << endl;
@@ -239,25 +239,25 @@ bool KKbdAccessExtensions::eventFilter( QObject *o, QEvent *e )
}
return false;
}
- else if (d->icon->isActive && e->type() == QEvent::MouseButtonPress) {
+ else if (d->icon->isActive && e->type() == TQEvent::MouseButtonPress) {
exitSizing();
return true;
}
- else if (d->accessKeyLabels && e->type() == QEvent::MouseButtonPress) {
+ else if (d->accessKeyLabels && e->type() == TQEvent::MouseButtonPress) {
delete d->accessKeyLabels;
d->accessKeyLabels = 0;
return true;
}
-/* else if (e->type() == QEvent::MouseMove && d->icon->isActive) {
+/* else if (e->type() == TQEvent::MouseMove && d->icon->isActive) {
// Lock mouse cursor down.
showIcon();
- dynamic_cast<QMouseEvent *>(e)->accept();
+ dynamic_cast<TQMouseEvent *>(e)->accept();
return true;
}*/
- else if (e->type() == QEvent::MouseMove && d->icon->isActive && d->panel) {
+ else if (e->type() == TQEvent::MouseMove && d->icon->isActive && d->panel) {
// Resize according to mouse movement.
- QMouseEvent* me = dynamic_cast<QMouseEvent *>(e);
- QSize s = d->icon->delta();
+ TQMouseEvent* me = dynamic_cast<TQMouseEvent *>(e);
+ TQSize s = d->icon->delta();
int dx = s.width();
int dy = s.height();
resizePanel(dx, dy, me->state());
@@ -265,27 +265,27 @@ bool KKbdAccessExtensions::eventFilter( QObject *o, QEvent *e )
showIcon();
return true;
}
- else if (e->type() == QEvent::Resize && d->panel && o == d->panel) {
+ else if (e->type() == TQEvent::Resize && d->panel && TQT_BASE_OBJECT(o) == d->panel) {
// TODO: This doesn't always work.
showIcon();
}
return false;
}
-QWidgetList* KKbdAccessExtensions::getAllPanels()
+TQWidgetList* KKbdAccessExtensions::getAllPanels()
{
- QWidgetList* allWidgets = kapp->allWidgets();
- QWidgetList* allPanels = new QWidgetList;
- QWidget* widget = allWidgets->first();
+ TQWidgetList* allWidgets = kapp->tqallWidgets();
+ TQWidgetList* allPanels = new TQWidgetList;
+ TQWidget* widget = allWidgets->first();
while (widget) {
if (widget->isVisible()) {
- if (::qt_cast<QSplitter*>( widget )) {
- // Only size QSplitters with at least two handles (there is always one hidden).
- if (dynamic_cast<QSplitter *>(widget)->sizes().count() >= 2)
+ if (::tqqt_cast<TQSplitter*>( widget )) {
+ // Only size TQSplitters with at least two handles (there is always one hidden).
+ if (dynamic_cast<TQSplitter *>(widget)->sizes().count() >= 2)
allPanels->append(widget);
- } else if (::qt_cast<QDockWindow*>( widget )) {
- if (dynamic_cast<QDockWindow *>(widget)->isResizeEnabled()) {
- // kdDebug() << "KKbdAccessExtensions::getAllPanels: QDockWindow = " << widget->name() << endl;
+ } else if (::tqqt_cast<TQDockWindow*>( widget )) {
+ if (dynamic_cast<TQDockWindow *>(widget)->isResizeEnabled()) {
+ // kdDebug() << "KKbdAccessExtensions::getAllPanels: TQDockWindow = " << widget->name() << endl;
allPanels->append(widget);
}
}
@@ -298,19 +298,19 @@ QWidgetList* KKbdAccessExtensions::getAllPanels()
void KKbdAccessExtensions::nextHandle()
{
- QWidget* panel = d->panel;
+ TQWidget* panel = d->panel;
// See if current panel has another handle. If not, find next panel.
if (panel) {
bool advance = true;
d->handleNdx++;
- if (::qt_cast<QSplitter*>( panel ))
- advance = (d->handleNdx >= dynamic_cast<QSplitter *>(panel)->sizes().count());
+ if (::tqqt_cast<TQSplitter*>( panel ))
+ advance = (d->handleNdx >= dynamic_cast<TQSplitter *>(panel)->sizes().count());
else
// Undocked windows have only one "handle" (center).
- advance = (d->handleNdx > 2 || !dynamic_cast<QDockWindow *>(panel)->area());
+ advance = (d->handleNdx > 2 || !dynamic_cast<TQDockWindow *>(panel)->area());
if (advance) {
- QWidgetList* allWidgets = getAllPanels();
- allWidgets->findRef(panel);
+ TQWidgetList* allWidgets = getAllPanels();
+ allWidgets->tqfindRef(panel);
panel = 0;
if (allWidgets->current()) panel = allWidgets->next();
delete allWidgets;
@@ -318,7 +318,7 @@ void KKbdAccessExtensions::nextHandle()
}
} else {
// Find first panel.
- QWidgetList* allWidgets = getAllPanels();
+ TQWidgetList* allWidgets = getAllPanels();
panel = allWidgets->first();
delete allWidgets;
d->handleNdx = 1;
@@ -332,23 +332,23 @@ void KKbdAccessExtensions::nextHandle()
void KKbdAccessExtensions::prevHandle()
{
- QWidget* panel = d->panel;
+ TQWidget* panel = d->panel;
// See if current panel has another handle. If not, find previous panel.
if (panel) {
bool rewind = true;
d->handleNdx--;
rewind = (d->handleNdx < 1);
if (rewind) {
- QWidgetList* allWidgets = getAllPanels();
- allWidgets->findRef(panel);
+ TQWidgetList* allWidgets = getAllPanels();
+ allWidgets->tqfindRef(panel);
panel = 0;
if (allWidgets->current()) panel = allWidgets->prev();
delete allWidgets;
if (panel) {
- if (::qt_cast<QSplitter*>( panel ))
- d->handleNdx = dynamic_cast<QSplitter *>(panel)->sizes().count() - 1;
+ if (::tqqt_cast<TQSplitter*>( panel ))
+ d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
else {
- if (dynamic_cast<QDockWindow *>(panel)->area())
+ if (dynamic_cast<TQDockWindow *>(panel)->area())
d->handleNdx = 2;
else
d->handleNdx = 1;
@@ -357,14 +357,14 @@ void KKbdAccessExtensions::prevHandle()
}
} else {
// Find last panel.
- QWidgetList* allWidgets = getAllPanels();
+ TQWidgetList* allWidgets = getAllPanels();
panel = allWidgets->last();
delete allWidgets;
if (panel) {
- if (::qt_cast<QSplitter*>( panel ))
- d->handleNdx = dynamic_cast<QSplitter *>(panel)->sizes().count() - 1;
+ if (::tqqt_cast<TQSplitter*>( panel ))
+ d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
else {
- if (dynamic_cast<QDockWindow *>(panel)->area())
+ if (dynamic_cast<TQDockWindow *>(panel)->area())
d->handleNdx = 2;
else
d->handleNdx = 1;
@@ -389,19 +389,19 @@ void KKbdAccessExtensions::exitSizing()
void KKbdAccessExtensions::showIcon()
{
if (!d->panel) return;
- QPoint p;
- // kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl;
- if (::qt_cast<QSplitter*>( d->panel )) {
- QSplitter* splitter = dynamic_cast<QSplitter *>(d->panel);
+ TQPoint p;
+ // kdDebug() << "KKbdAccessExtensions::showIcon: tqtopLevelWidget = " << d->panel->tqtopLevelWidget()->name() << endl;
+ if (::tqqt_cast<TQSplitter*>( d->panel )) {
+ TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
int handleNdx = d->handleNdx - 1;
- QValueList<int> sizes = splitter->sizes();
+ TQValueList<int> sizes = splitter->sizes();
// kdDebug() << "KKbdAccessExtensions::showIcon: sizes = " << sizes << endl;
if (splitter->orientation() == Qt::Horizontal) {
- d->icon->setShape(Qt::SizeHorCursor);
+ d->icon->setShape(TQt::SizeHorCursor);
p.setX(sizes[handleNdx] + (splitter->handleWidth() / 2));
p.setY(splitter->height() / 2);
} else {
- d->icon->setShape(Qt::SizeVerCursor);
+ d->icon->setShape(TQt::SizeVerCursor);
p.setX(splitter->width() / 2);
p.setY(sizes[handleNdx] + (splitter->handleWidth() / 2));
}
@@ -409,17 +409,17 @@ void KKbdAccessExtensions::showIcon()
p = splitter->mapToGlobal(p);
// kdDebug() << "KKbdAccessExtensions::showIcon: mapToGlobal = " << p << endl;
} else {
- QDockWindow* dockWindow = dynamic_cast<QDockWindow *>(d->panel);
+ TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
p = dockWindow->pos();
if (dockWindow->area()) {
- // kdDebug() << "KKbdAccessExtensions::showIcon: pos = " << p << " of window = " << dockWindow->parentWidget()->name() << endl;
- p = dockWindow->parentWidget()->mapTo(dockWindow->topLevelWidget(), p);
- // kdDebug() << "KKbdAccessExtensions::showIcon: mapTo = " << p << " of window = " << dockWindow->topLevelWidget()->name() << endl;
+ // kdDebug() << "KKbdAccessExtensions::showIcon: pos = " << p << " of window = " << dockWindow->tqparentWidget()->name() << endl;
+ p = dockWindow->tqparentWidget()->mapTo(dockWindow->tqtopLevelWidget(), p);
+ // kdDebug() << "KKbdAccessExtensions::showIcon: mapTo = " << p << " of window = " << dockWindow->tqtopLevelWidget()->name() << endl;
// TODO: How to get the handle width?
if (d->handleNdx == 1) {
- d->icon->setShape(Qt::SizeHorCursor);
+ d->icon->setShape(TQt::SizeHorCursor);
if (dockWindow->area()->orientation() == Qt::Vertical) {
- if (dockWindow->area()->handlePosition() == QDockArea::Normal)
+ if (dockWindow->area()->handlePosition() == TQDockArea::Normal)
// Handle is to the right of the dock window.
p.setX(p.x() + dockWindow->width());
// else Handle is to the left of the dock window.
@@ -428,22 +428,22 @@ void KKbdAccessExtensions::showIcon()
p.setX(p.x() + dockWindow->width());
p.setY(p.y() + (dockWindow->height() / 2));
} else {
- d->icon->setShape(Qt::SizeVerCursor);
+ d->icon->setShape(TQt::SizeVerCursor);
p.setX(p.x() + (dockWindow->width() / 2));
if (dockWindow->area()->orientation() == Qt::Vertical)
// Handle is below the dock window.
p.setY(p.y() + dockWindow->height());
else {
- if (dockWindow->area()->handlePosition() == QDockArea::Normal)
+ if (dockWindow->area()->handlePosition() == TQDockArea::Normal)
// Handle is below the dock window.
p.setY(p.y() + dockWindow->height());
// else Handle is above the dock window.
}
}
- p = dockWindow->topLevelWidget()->mapToGlobal(p);
+ p = dockWindow->tqtopLevelWidget()->mapToGlobal(p);
} else {
- d->icon->setShape(Qt::SizeAllCursor);
- p = QPoint(dockWindow->width() / 2, dockWindow->height() / 2);
+ d->icon->setShape(TQt::SizeAllCursor);
+ p = TQPoint(dockWindow->width() / 2, dockWindow->height() / 2);
p = dockWindow->mapToGlobal(p); // Undocked. Position in center of window.
}
}
@@ -461,26 +461,26 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
int adj = dx + dy;
if (adj == 0) return;
// kdDebug() << "KKbdAccessExtensions::resizePanel: panel = " << d->panel->name() << endl;
- if (::qt_cast<QSplitter*>( d->panel )) {
- QSplitter* splitter = dynamic_cast<QSplitter *>(d->panel);
+ if (::tqqt_cast<TQSplitter*>( d->panel )) {
+ TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
int handleNdx = d->handleNdx - 1;
- QValueList<int> sizes = splitter->sizes();
+ TQValueList<int> sizes = splitter->sizes();
// kdDebug() << "KKbdAccessExtensions::resizePanel: before sizes = " << sizes << endl;
sizes[handleNdx] = sizes[handleNdx] + adj;
// kdDebug() << "KKbdAccessExtensions::resizePanel: setSizes = " << sizes << endl;
splitter->setSizes(sizes);
- QApplication::postEvent(splitter, new QEvent(QEvent::LayoutHint));
+ TQApplication::postEvent(splitter, new TQEvent(TQEvent::LayoutHint));
} else {
// TODO: How to get the handle width?
- QDockWindow* dockWindow = dynamic_cast<QDockWindow *>(d->panel);
+ TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
if (dockWindow->area()) {
// kdDebug() << "KKbdAccessExtensions::resizePanel: fixedExtent = " << dockWindow->fixedExtent() << endl;
- QSize fe = dockWindow->fixedExtent();
+ TQSize fe = dockWindow->fixedExtent();
if (d->handleNdx == 1) {
// When vertically oriented and dock area is on right side of screen, pressing
// left arrow increases size.
if (dockWindow->area()->orientation() == Qt::Vertical &&
- dockWindow->area()->handlePosition() == QDockArea::Reverse) adj = -adj;
+ dockWindow->area()->handlePosition() == TQDockArea::Reverse) adj = -adj;
int w = fe.width();
if (w < 0) w = dockWindow->width();
w = w + adj;
@@ -489,23 +489,23 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
// When horizontally oriented and dock area is at bottom of screen,
// pressing up arrow increases size.
if (dockWindow->area()->orientation() == Qt::Horizontal &&
- dockWindow->area()->handlePosition() == QDockArea::Reverse) adj = -adj;
+ dockWindow->area()->handlePosition() == TQDockArea::Reverse) adj = -adj;
int h = fe.height();
if (h < 0) h = dockWindow->height();
h = h + adj;
if (h > 0) dockWindow->setFixedExtentHeight(h);
}
dockWindow->updateGeometry();
- QApplication::postEvent(dockWindow->area(), new QEvent(QEvent::LayoutHint));
+ TQApplication::postEvent(dockWindow->area(), new TQEvent(TQEvent::LayoutHint));
// kdDebug() << "KKbdAccessExtensions::resizePanel: fixedExtent = " << dockWindow->fixedExtent() << endl;
} else {
- if (state == Qt::ShiftButton) {
- QSize s = dockWindow->size();
+ if (state == TQt::ShiftButton) {
+ TQSize s = dockWindow->size();
s.setWidth(s.width() + dx);
s.setHeight(s.height() + dy);
dockWindow->resize(s);
} else {
- QPoint p = dockWindow->pos();
+ TQPoint p = dockWindow->pos();
p.setX(p.x() + dx);
p.setY(p.y() + dy);
dockWindow->move(p);
@@ -522,20 +522,20 @@ void KKbdAccessExtensions::resizePanelFromKey(int key, int state)
int dy = 0;
int stepSize = d->stepSize;
switch (key) {
- case Qt::Key_Left: dx = -stepSize; break;
- case Qt::Key_Right: dx = stepSize; break;
- case Qt::Key_Up: dy = -stepSize; break;
- case Qt::Key_Down: dy = stepSize; break;
- case Qt::Key_Prior: dy = -5 * stepSize; break;
- case Qt::Key_Next: dy = 5 * stepSize; break;
+ case TQt::Key_Left: dx = -stepSize; break;
+ case TQt::Key_Right: dx = stepSize; break;
+ case TQt::Key_Up: dy = -stepSize; break;
+ case TQt::Key_Down: dy = stepSize; break;
+ case TQt::Key_Prior: dy = -5 * stepSize; break;
+ case TQt::Key_Next: dy = 5 * stepSize; break;
}
int adj = dx + dy;
// kdDebug() << "KKbdAccessExtensions::resizePanelFromKey: adj = " << adj << endl;
if (adj != 0)
resizePanel(dx, dy, state);
else {
- if (key == Qt::Key_Enter && ::qt_cast<QDockWindow*>( d->panel )) {
- QDockWindow* dockWindow = dynamic_cast<QDockWindow *>(d->panel);
+ if (key == TQt::Key_Enter && ::tqqt_cast<TQDockWindow*>( d->panel )) {
+ TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
if (dockWindow->area())
dockWindow->undock();
else
@@ -548,9 +548,9 @@ void KKbdAccessExtensions::resizePanelFromKey(int key, int state)
void KKbdAccessExtensions::displayAccessKeys()
{
// Build a list of valid access keys that don't collide with shortcuts.
- QString availableAccessKeys = "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
- QPtrList<KXMLGUIClient> allClients = d->mainWindow->factory()->clients();
- QPtrListIterator<KXMLGUIClient> it( allClients );
+ TQString availableAccessKeys = "ABCDEFGHIJKLMNOPTQRSTUVWXYZ01234567890";
+ TQPtrList<KXMLGUIClient> allClients = d->mainWindow->factory()->clients();
+ TQPtrListIterator<KXMLGUIClient> it( allClients );
KXMLGUIClient *client;
while( (client=it.current()) !=0 )
{
@@ -562,39 +562,39 @@ void KKbdAccessExtensions::displayAccessKeys()
for (int i = 0; i < (int)sc.count(); i++) {
KKeySequence seq = sc.seq(i);
if (seq.count() == 1) {
- QString s = seq.toString();
- if (availableAccessKeys.contains(s))
+ TQString s = seq.toString();
+ if (availableAccessKeys.tqcontains(s))
availableAccessKeys.remove(s);
}
}
}
}
- // Find all visible, focusable widgets and create a QLabel for each. Don't exceed
+ // Find all visible, focusable widgets and create a TQLabel for each. Don't exceed
// available list of access keys.
- QWidgetList* allWidgets = kapp->allWidgets();
- QWidget* widget = allWidgets->first();
+ TQWidgetList* allWidgets = kapp->tqallWidgets();
+ TQWidget* widget = allWidgets->first();
int accessCount = 0;
int maxAccessCount = availableAccessKeys.length();
int overlap = 20;
- QPoint prevGlobalPos = QPoint(-overlap, -overlap);
+ TQPoint prevGlobalPos = TQPoint(-overlap, -overlap);
while (widget && (accessCount < maxAccessCount)) {
if (widget->isVisible() && widget->isFocusEnabled() ) {
- QRect r = widget->rect();
- QPoint p(r.x(), r.y());
+ TQRect r = widget->rect();
+ TQPoint p(r.x(), r.y());
// Don't display an access key if within overlap pixels of previous one.
- QPoint globalPos = widget->mapToGlobal(p);
- QPoint diffPos = globalPos - prevGlobalPos;
+ TQPoint globalPos = widget->mapToGlobal(p);
+ TQPoint diffPos = globalPos - prevGlobalPos;
if (diffPos.manhattanLength() > overlap) {
accessCount++;
- QLabel* lab=new QLabel(widget, "", widget, 0, Qt::WDestructiveClose);
- lab->setPalette(QToolTip::palette());
+ TQLabel* lab=new TQLabel(widget, "", widget, 0, TQt::WDestructiveClose);
+ lab->setPalette(TQToolTip::palette());
lab->setLineWidth(2);
- lab->setFrameStyle(QFrame::Box | QFrame::Plain);
+ lab->setFrameStyle(TQFrame::Box | TQFrame::Plain);
lab->setMargin(3);
lab->adjustSize();
lab->move(p);
if (!d->accessKeyLabels) {
- d->accessKeyLabels = new QPtrList<QLabel>;
+ d->accessKeyLabels = new TQPtrList<TQLabel>;
d->accessKeyLabels->setAutoDelete(true);
}
d->accessKeyLabels->append(lab);
@@ -605,14 +605,14 @@ void KKbdAccessExtensions::displayAccessKeys()
}
if (accessCount > 0) {
// Sort the access keys from left to right and down the screen.
- QValueList<KSortedLabel> sortedLabels;
+ TQValueList<KSortedLabel> sortedLabels;
for (int i = 0; i < accessCount; i++)
sortedLabels.append(KSortedLabel(d->accessKeyLabels->at(i)));
qHeapSort( sortedLabels );
// Assign access key labels.
for (int i = 0; i < accessCount; i++) {
- QLabel* lab = sortedLabels[i].label();
- QChar s = availableAccessKeys[i];
+ TQLabel* lab = sortedLabels[i].label();
+ TQChar s = availableAccessKeys[i];
lab->setText(s);
lab->adjustSize();
lab->show();
@@ -621,12 +621,12 @@ void KKbdAccessExtensions::displayAccessKeys()
}
// Handling of the HTML accesskey attribute.
-bool KKbdAccessExtensions::handleAccessKey( const QKeyEvent* ev )
+bool KKbdAccessExtensions::handleAccessKey( const TQKeyEvent* ev )
{
-// Qt interprets the keyevent also with the modifiers, and ev->text() matches that,
+// TQt interprets the keyevent also with the modifiers, and ev->text() matches that,
// but this code must act as if the modifiers weren't pressed
if (!d->accessKeyLabels) return false;
- QChar c;
+ TQChar c;
if( ev->key() >= Key_A && ev->key() <= Key_Z )
c = 'A' + ev->key() - Key_A;
else if( ev->key() >= Key_0 && ev->key() <= Key_9 )
@@ -640,7 +640,7 @@ bool KKbdAccessExtensions::handleAccessKey( const QKeyEvent* ev )
if( c.isNull())
return false;
- QLabel* lab = d->accessKeyLabels->first();
+ TQLabel* lab = d->accessKeyLabels->first();
while (lab) {
if (lab->text() == c) {
lab->buddy()->setFocus();
@@ -653,7 +653,7 @@ bool KKbdAccessExtensions::handleAccessKey( const QKeyEvent* ev )
return false;
}
-KSortedLabel::KSortedLabel(QLabel* l) :
+KSortedLabel::KSortedLabel(TQLabel* l) :
m_l(l) { }
KSortedLabel::KSortedLabel() :
@@ -661,7 +661,7 @@ KSortedLabel::KSortedLabel() :
bool KSortedLabel::operator<( KSortedLabel l )
{
- QPoint p1 = m_l->mapToGlobal(m_l->pos());
- QPoint p2 = l.label()->mapToGlobal(l.label()->pos());
+ TQPoint p1 = m_l->mapToGlobal(m_l->pos());
+ TQPoint p2 = l.label()->mapToGlobal(l.label()->pos());
return (p1.y() < p2.y() || (p1.y() == p2.y() && p1.x() < p2.x()));
}
diff --git a/lib/kofficecore/kkbdaccessextensions.h b/lib/kofficecore/kkbdaccessextensions.h
index acca057c..bc68cb28 100644
--- a/lib/kofficecore/kkbdaccessextensions.h
+++ b/lib/kofficecore/kkbdaccessextensions.h
@@ -24,28 +24,28 @@
#ifndef __KKBDACCESSEXTENSIONS_H__
#define __KKBDACCESSEXTENSIONS_H__
-// Qt includes.
-#include <qobject.h>
+// TQt includes.
+#include <tqobject.h>
// KOffice includes.
#include <koffice_export.h>
class KKbdAccessExtensionsPrivate;
-class QWidgetList;
+class TQWidgetList;
class KMainWindow;
/** KKbdAccessExtensions is an object that improves accessibility for motor impaired users
* who may not be able to easily use a mouse. It adds two new capabilities using the keyboard:
*
-* - Resizing and positioning of panel widgets derived from QSplitter and QDockWindow.
+* - Resizing and positioning of panel widgets derived from TQSplitter and TQDockWindow.
* - Setting focus to any widget that accepts focus.
*
* @section sizing_mode Sizing Mode
*
* Users may press F8 or Shift-F8 (defaults) to enter sizing mode. A sizing icon appears on the first
-* QSplitter or QDockWindow handle found in the application (F8) or the last such handle (Shift+F8).
+* TQSplitter or TQDockWindow handle found in the application (F8) or the last such handle (Shift+F8).
* (A "handle" is the divider bar that appears to the left, right, above, or below each panel
-* of a QSplitter or QDockArea.)
+* of a TQSplitter or TQDockArea.)
*
* Once in sizing mode, the following functions are available via the keyboard:
*
@@ -62,19 +62,19 @@ class KMainWindow;
* When on a horizontal sizing handle, moves the handle down.
* - PgUp Like LeftArrow or UpArrow, but moves the handle 5X farther to the left or up.
* - PgDn Like RightArrow or DownArrow, but moves the handle 5X farther to the right or down.
-* - Enter (On numeric keypad). When on the handle of a QDockWindow, undocks or docks
-* the widget. Ignored when on the handle of a QSplitter.
+* - Enter (On numeric keypad). When on the handle of a TQDockWindow, undocks or docks
+* the widget. Ignored when on the handle of a TQSplitter.
*
* The default step size for each arrow key press is 10 pixels.
*
-* When a QDockWindow is undocked, the sizing icon appears in the center of the window.
+* When a TQDockWindow is undocked, the sizing icon appears in the center of the window.
* The arrow keys and PgUp/PgDn move the undocked window on the screen. Shifted arrow keys
* and PgUp/PgDn decrease/increase the size of the undocked window.
*
* When the sizing icon is on a sizing handle, the mouse may also be used to move the handle
* without having to click and drag. When moving the mouse while sizing icon is on an undocked
-* QDockWindow, the window moves with the mouse. Holding Shift down while moving the mouse
-* sizes the QDockWindow.
+* TQDockWindow, the window moves with the mouse. Holding Shift down while moving the mouse
+* sizes the TQDockWindow.
*
* @note Users can also move and size undocked windows using the Window Operations Menu (Alt+F3).
*
@@ -83,7 +83,7 @@ class KMainWindow;
* When entering sizing mode, the position of the mouse cursor is saved and restored when
* exiting sizing mode.
*
-* For a QSplitter or QDockWindow to be found, it must be in the kapp::allWidgets() list.
+* For a TQSplitter or TQDockWindow to be found, it must be in the kapp::allWidgets() list.
*
* @section focus_setting Focus Setting
*
@@ -107,17 +107,17 @@ class KMainWindow;
* F8/Shift+F8 are the default shortcuts because these are the keys used for similar
* functionality in GNOME and Java SWT.
*/
-class KOFFICECORE_EXPORT KKbdAccessExtensions : public QObject
+class KOFFICECORE_EXPORT KKbdAccessExtensions : public TQObject
{
- // TODO: A .moc isn't really needed right now, but see TODO in eventFilter method.
- // Q_PROPERTY(int stepSize READ stepSize WRITE setStepSize)
+ // TODO: A .tqmoc isn't really needed right now, but see TODO in eventFilter method.
+ // TQ_PROPERTY(int stepSize READ stepSize WRITE setStepSize)
public:
/** Constructor.
- * @param parent KMainWindow of the application. Required.
+ * @param tqparent KMainWindow of the application. Required.
* @param name (optional) Name of this object.
*/
- KKbdAccessExtensions(KMainWindow* parent, const char* name = 0);
+ KKbdAccessExtensions(KMainWindow* tqparent, const char* name = 0);
/** Destructor. */
virtual ~KKbdAccessExtensions();
@@ -129,10 +129,10 @@ class KOFFICECORE_EXPORT KKbdAccessExtensions : public QObject
protected:
/** Event filter installed on kapp object. */
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
/** Retrieves a list of all Splitter and DockArea widgets in the application. */
- QWidgetList* getAllPanels();
+ TQWidgetList* getAllPanels();
/** Advances to the next Panel handle. If not currently in resizing mode,
turns it on. */
void nextHandle();
@@ -153,23 +153,23 @@ class KOFFICECORE_EXPORT KKbdAccessExtensions : public QObject
/** Displays the access keys. */
void displayAccessKeys();
/** Handles an access keypress. */
- bool handleAccessKey( const QKeyEvent* ev );
+ bool handleAccessKey( const TQKeyEvent* ev );
private:
KKbdAccessExtensionsPrivate* d;
};
-/** Provides a way to sort QLabelss using a QValueList based on their screen position. */
+/** Provides a way to sort TQLabelss using a TQValueList based on their screen position. */
class KSortedLabel
{
public:
- KSortedLabel(QLabel* l);
+ KSortedLabel(TQLabel* l);
KSortedLabel(); // default constructor
bool operator<( KSortedLabel l);
- QLabel* label() { return m_l; }
+ TQLabel* label() { return m_l; }
private:
- QLabel* m_l;
+ TQLabel* m_l;
};
#endif // __KKBDACCESSEXTENSIONS_H__
diff --git a/lib/kofficecore/koDetailsPaneBase.ui b/lib/kofficecore/koDetailsPaneBase.ui
index 282e8bb6..056cd852 100644
--- a/lib/kofficecore/koDetailsPaneBase.ui
+++ b/lib/kofficecore/koDetailsPaneBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoDetailsPaneBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoDetailsPaneBase</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QSplitter" row="0" column="0">
+ <widget class="TQSplitter" row="0" column="0">
<property name="name">
<cstring>m_splitter</cstring>
</property>
@@ -56,9 +56,9 @@
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<grid>
<property name="name">
@@ -75,14 +75,14 @@
<enum>NoFrame</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>m_previewLabel</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -96,7 +96,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>20</height>
@@ -134,7 +134,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="3" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>m_alwaysUseCheckBox</cstring>
</property>
@@ -158,14 +158,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>m_titleLabel</cstring>
</property>
@@ -177,7 +177,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -191,7 +191,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>20</height>
@@ -208,7 +208,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>20</height>
@@ -228,8 +228,8 @@
<tabstop>m_alwaysUseCheckBox</tabstop>
<tabstop>m_detailsLabel</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>ktextbrowser.h</includehint>
diff --git a/lib/kofficecore/koDocumentInfoAboutWidget.ui b/lib/kofficecore/koDocumentInfoAboutWidget.ui
index 29070e54..2581cf07 100644
--- a/lib/kofficecore/koDocumentInfoAboutWidget.ui
+++ b/lib/kofficecore/koDocumentInfoAboutWidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoDocumentInfoAboutWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoDocumentInfoAboutWidget</cstring>
</property>
@@ -19,19 +19,19 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>56</width>
<height>56</height>
@@ -65,9 +65,9 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
@@ -78,7 +78,7 @@
<cstring>leDocKeywords</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -86,7 +86,7 @@
<string>Subject:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -94,15 +94,15 @@
<string>Keywords:</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -120,7 +120,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>31</height>
@@ -147,7 +147,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
@@ -171,9 +171,9 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<grid>
<property name="name">
@@ -189,7 +189,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>90</width>
<height>70</height>
@@ -206,14 +206,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -221,17 +221,17 @@
<string>Modified:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>labelLastPrinted</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>labelModified</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -239,7 +239,7 @@
<string>Created:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -247,12 +247,12 @@
<string>Last printed:</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="1">
+ <widget class="TQLabel" row="5" column="1">
<property name="name">
<cstring>labelRevision</cstring>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -260,12 +260,12 @@
<string>Revision number:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="1">
+ <widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>labelEditing</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -277,13 +277,13 @@
<property name="name">
<cstring>pbReset</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>24</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>24</height>
@@ -293,17 +293,17 @@
<string>Reset</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>labelCreated</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>labelType</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -321,7 +321,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>50</width>
<height>16</height>
@@ -339,8 +339,8 @@
<tabstop>leDocKeywords</tabstop>
<tabstop>meDocAbstract</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/lib/kofficecore/koDocumentInfoAuthorWidget.ui b/lib/kofficecore/koDocumentInfoAuthorWidget.ui
index e442a1e8..cb3a6ce0 100644
--- a/lib/kofficecore/koDocumentInfoAuthorWidget.ui
+++ b/lib/kofficecore/koDocumentInfoAuthorWidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoDocumentInfoAuthorWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoDocumentInfoAuthorWidget</cstring>
</property>
@@ -19,19 +19,19 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelAuthor</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>56</width>
<height>56</height>
@@ -59,15 +59,15 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="9" column="0">
+ <widget class="TQLabel" row="9" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -75,7 +75,7 @@
<string>Postal code:</string>
</property>
</widget>
- <widget class="QLabel" row="6" column="0">
+ <widget class="TQLabel" row="6" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -83,7 +83,7 @@
<string>Telephone (work):</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -101,7 +101,7 @@
<cstring>lePostalCode</cstring>
</property>
</widget>
- <widget class="QLabel" row="10" column="0">
+ <widget class="TQLabel" row="10" column="0">
<property name="name">
<cstring>textLabel11</cstring>
</property>
@@ -129,7 +129,7 @@
<cstring>leTelephoneHome</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -137,7 +137,7 @@
<string>Initials:</string>
</property>
</widget>
- <widget class="QLabel" row="7" column="0">
+ <widget class="TQLabel" row="7" column="0">
<property name="name">
<cstring>textLabel8</cstring>
</property>
@@ -155,7 +155,7 @@
<cstring>leAuthorTitle</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -173,7 +173,7 @@
<cstring>leInitial</cstring>
</property>
</widget>
- <widget class="QLabel" row="11" column="0">
+ <widget class="TQLabel" row="11" column="0">
<property name="name">
<cstring>textLabel12</cstring>
</property>
@@ -181,7 +181,7 @@
<string>Country:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -189,7 +189,7 @@
<string>Title:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -197,7 +197,7 @@
<string>Position:</string>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>textLabel9</cstring>
</property>
@@ -205,7 +205,7 @@
<string>Street:</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -225,9 +225,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@@ -264,7 +264,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -289,8 +289,8 @@
<tabstop>leCountry</tabstop>
<tabstop>pbLoadKABC</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui
index fd91dd5e..7edf0a92 100644
--- a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui
+++ b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoDocumentInfoUserMetadataWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoDocumentInfoUserMetadataWidget</cstring>
</property>
@@ -24,9 +24,9 @@
<cstring>metaListView</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
@@ -36,7 +36,7 @@
<property name="name">
<cstring>kPushButton2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>130</width>
<height>0</height>
@@ -64,7 +64,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>101</height>
@@ -73,7 +73,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -84,7 +84,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>rbNumber</cstring>
</property>
@@ -103,7 +103,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>rString</cstring>
</property>
@@ -122,7 +122,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="0">
+ <widget class="TQRadioButton" row="2" column="0">
<property name="name">
<cstring>rbBoolean</cstring>
</property>
@@ -148,7 +148,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="0">
+ <widget class="TQRadioButton" row="3" column="0">
<property name="name">
<cstring>rbTime</cstring>
</property>
@@ -164,7 +164,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="0">
+ <widget class="TQRadioButton" row="4" column="0">
<property name="name">
<cstring>rbDate</cstring>
</property>
@@ -216,8 +216,8 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/lib/kofficecore/koOpenPaneBase.ui b/lib/kofficecore/koOpenPaneBase.ui
index 64a083a5..1537cada 100644
--- a/lib/kofficecore/koOpenPaneBase.ui
+++ b/lib/kofficecore/koOpenPaneBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoOpenPaneBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoOpenPaneBase</cstring>
</property>
@@ -16,16 +16,16 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSplitter">
+ <widget class="TQSplitter">
<property name="name">
<cstring>m_splitter</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
@@ -69,9 +69,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -80,7 +80,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_headerLabel</cstring>
</property>
@@ -115,11 +115,11 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QWidgetStack">
+ <widget class="TQWidgetStack">
<property name="name">
<cstring>m_widgetStack</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
@@ -135,8 +135,8 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/lib/kofficecore/koffice_export.h b/lib/kofficecore/koffice_export.h
index 37a9e8f7..a0522a2f 100644
--- a/lib/kofficecore/koffice_export.h
+++ b/lib/kofficecore/koffice_export.h
@@ -25,7 +25,7 @@
#include <kdeversion.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
/* workaround for KDElibs < 3.2 on !win32 */
#ifndef KDE_EXPORT
diff --git a/lib/kofficecore/priorityqueue.h b/lib/kofficecore/priorityqueue.h
index 68019143..a9a5c770 100644
--- a/lib/kofficecore/priorityqueue.h
+++ b/lib/kofficecore/priorityqueue.h
@@ -20,8 +20,8 @@
#define priority_queue_h
#include <vector>
-#include <qstring.h>
-#include <qasciidict.h>
+#include <tqstring.h>
+#include <tqasciidict.h>
#include <kdebug.h>
// Better put all those internal classes in some namespace to avoid clashes
@@ -41,7 +41,7 @@ namespace KOffice {
* search for the item where you decreased the key :}
* Just to make it even worse we also use a "int index() const" method
* to fetch the index... well, you most likely would need one anyway ;)
- * Note: This class is pointer based (like QPtr*) - if you create PriorityQueue<X>
+ * Note: This class is pointer based (like TQPtr*) - if you create PriorityQueue<X>
* we actually operate on X* ! We don't care about deleting your pointers at all.
* We don't copy them, we don't create new ones,... - you own them, you have
* to delete them :)
@@ -59,7 +59,7 @@ namespace KOffice {
public:
PriorityQueue() {}
PriorityQueue( const PriorityQueue<T>& rhs ) : m_vector( rhs.m_vector ) {}
- PriorityQueue( const QAsciiDict<T>& items );
+ PriorityQueue( const TQAsciiDict<T>& items );
~PriorityQueue() {}
PriorityQueue<T> &operator=( const PriorityQueue<T>& rhs ) { m_vector = rhs.m_vector; return *this; }
@@ -86,7 +86,7 @@ namespace KOffice {
private:
// Note: We have to use a 1-based index here, and we get/return 0-based ones
- int parent( int i ) { return ( ( i + 1 ) >> 1 ) - 1; }
+ int tqparent( int i ) { return ( ( i + 1 ) >> 1 ) - 1; }
int left( int i ) { return ( ( i + 1 ) << 1 ) - 1; }
int right( int i ) { return ( i + 1 ) << 1; }
@@ -100,10 +100,10 @@ namespace KOffice {
};
template<class T>
- PriorityQueue<T>::PriorityQueue( const QAsciiDict<T>& items ) : m_vector( items.count() )
+ PriorityQueue<T>::PriorityQueue( const TQAsciiDict<T>& items ) : m_vector( items.count() )
{
// First put all items into the vector
- QAsciiDictIterator<T> it( items );
+ TQAsciiDictIterator<T> it( items );
for ( int i = 0; it.current(); ++it, ++i ) {
it.current()->setIndex( i );
m_vector[ i ] = it.current();
@@ -148,13 +148,13 @@ namespace KOffice {
void PriorityQueue<T>::dump() const
{
kdDebug( 30500 ) << "++++++++++ PriorityQueue::dump ++++++++++" << endl;
- QString out;
+ TQString out;
int size = static_cast<int>( m_vector.size() );
for ( int i = 0; i < size; ++i ) {
if ( m_vector[ i ]->index() != i )
- out += " ERROR: index out of sync. Should be " + QString::number( i ) + ", is " +
- QString::number( m_vector[ i ]->index() ) + ". ";
- out += QString::number( m_vector[ i ]->key() );
+ out += " ERROR: index out of sync. Should be " + TQString::number( i ) + ", is " +
+ TQString::number( m_vector[ i ]->index() ) + ". ";
+ out += TQString::number( m_vector[ i ]->key() );
out += ", ";
}
if ( out.isEmpty() )
@@ -190,14 +190,14 @@ namespace KOffice {
template<class T>
void PriorityQueue<T>::bubbleUp( T* item, int i )
{
- int p = parent( i );
+ int p = tqparent( i );
while ( i > 0 && m_vector[ p ]->key() > item->key() ) {
// update the index first
m_vector[ p ]->setIndex( i );
// then move it there
m_vector[ i ] = m_vector[ p ];
i = p;
- p = parent( i );
+ p = tqparent( i );
}
item->setIndex( i );
m_vector[ i ] = item;
diff --git a/lib/kofficecore/tests/filter_graph.cpp b/lib/kofficecore/tests/filter_graph.cpp
index 22323355..ac25c8d7 100644
--- a/lib/kofficecore/tests/filter_graph.cpp
+++ b/lib/kofficecore/tests/filter_graph.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <KoQueryTrader.h>
#include <KoFilterManager.h>
#include <kinstance.h>
@@ -27,51 +27,51 @@ int main( int /*argc*/, char ** /*argv*/ )
{
KInstance instance( "filter_graph" ); // we need an instance when using the trader
- QCString output = "digraph filters {\n";
+ TQCString output = "digraph filters {\n";
// The following code is shamelessly copied over from KOffice::Graph::buildGraph
// It wasn't feasible to do some serious changes in the lib for that tiny bit
// of duplicated code in a test file.
- QValueList<QString> vertices; // to keep track of already inserted values, not performance critical
+ TQValueList<TQString> vertices; // to keep track of already inserted values, not performance critical
// Make sure that all available parts are added to the graph
- QValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
- QValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
- QValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
+ TQValueList<KoDocumentEntry> parts( KoDocumentEntry::query() );
+ TQValueList<KoDocumentEntry>::ConstIterator partIt( parts.begin() );
+ TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
while ( partIt != partEnd ) {
//kdDebug() << ( *partIt ).service()->desktopEntryName() << endl;
- QStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
- QStringList::ConstIterator it = nativeMimeTypes.begin();
- QStringList::ConstIterator end = nativeMimeTypes.end();
+ TQStringList::ConstIterator it = nativeMimeTypes.begin();
+ TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it ) {
- QString key = *it;
+ TQString key = *it;
//kdDebug() << " " << key << endl;
if ( !key.isEmpty() ) {
output += " \"";
output += key.latin1();
- output += "\" [shape=box, style=filled, fillcolor=lightblue];\n";
- if ( vertices.find( key ) == vertices.end() )
+ output += "\" [tqshape=box, style=filled, fillcolor=lightblue];\n";
+ if ( vertices.tqfind( key ) == vertices.end() )
vertices.append( key );
}
}
++partIt;
}
- QValueList<KoFilterEntry::Ptr> filters( KoFilterEntry::query() ); // no constraint here - we want *all* :)
- QValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
- QValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
+ TQValueList<KoFilterEntry::Ptr> filters( KoFilterEntry::query() ); // no constraint here - we want *all* :)
+ TQValueList<KoFilterEntry::Ptr>::ConstIterator it = filters.begin();
+ TQValueList<KoFilterEntry::Ptr>::ConstIterator end = filters.end();
for ( ; it != end; ++it ) {
kdDebug() << "import " << ( *it )->import << " export " << ( *it )->export_ << endl;
// First add the "starting points"
- QStringList::ConstIterator importIt = ( *it )->import.begin();
- QStringList::ConstIterator importEnd = ( *it )->import.end();
+ TQStringList::ConstIterator importIt = ( *it )->import.begin();
+ TQStringList::ConstIterator importEnd = ( *it )->import.end();
for ( ; importIt != importEnd; ++importIt ) {
// already there?
- if ( vertices.find( *importIt ) == vertices.end() ) {
+ if ( vertices.tqfind( *importIt ) == vertices.end() ) {
vertices.append( *importIt );
output += " \"";
output += ( *importIt ).latin1();
@@ -79,12 +79,12 @@ int main( int /*argc*/, char ** /*argv*/ )
}
}
- QStringList::ConstIterator exportIt = ( *it )->export_.begin();
- QStringList::ConstIterator exportEnd = ( *it )->export_.end();
+ TQStringList::ConstIterator exportIt = ( *it )->export_.begin();
+ TQStringList::ConstIterator exportEnd = ( *it )->export_.end();
for ( ; exportIt != exportEnd; ++exportIt ) {
// First make sure the export vertex is in place
- if ( vertices.find( *exportIt ) == vertices.end() ) {
+ if ( vertices.tqfind( *exportIt ) == vertices.end() ) {
output += " \"";
output += ( *exportIt ).latin1();
output += "\";\n";
@@ -107,7 +107,7 @@ int main( int /*argc*/, char ** /*argv*/ )
output += "}\n";
- QFile f( "graph.dot" );
+ TQFile f( "graph.dot" );
if ( f.open( IO_WriteOnly ) )
f.writeBlock( output.data(), output.size() - 1 );
f.close();
diff --git a/lib/kofficecore/tests/filterchain_test.cpp b/lib/kofficecore/tests/filterchain_test.cpp
index 23f620a1..773bd02f 100644
--- a/lib/kofficecore/tests/filterchain_test.cpp
+++ b/lib/kofficecore/tests/filterchain_test.cpp
@@ -32,7 +32,7 @@ int main( int /*argc*/, char ** /*argv*/ )
KoFilterManager *manager = new KoFilterManager( 0 );
kdDebug() << "Trying to build some filter chains..." << endl;
- QCString mimeType( "foo/bar" );
+ TQCString mimeType( "foo/bar" );
KoFilterChain::Ptr chain = g.chain( manager, mimeType );
if ( !chain )
kdDebug() << "Chain for 'foo/bar' is not available, OK" << endl;
@@ -79,9 +79,9 @@ int main( int /*argc*/, char ** /*argv*/ )
}
kdDebug() << "Checking mimeFilter() for Import:" << endl;
- QStringList list = KoFilterManager::mimeFilter( "application/x-kword", KoFilterManager::Import );
- QStringList::ConstIterator it = list.begin();
- QStringList::ConstIterator end = list.end();
+ TQStringList list = KoFilterManager::mimeFilter( "application/x-kword", KoFilterManager::Import );
+ TQStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator end = list.end();
for ( ; it != end; ++it )
kdDebug() << " " << *it << endl;
kdDebug() << " " << list.count() << " entries." << endl;
diff --git a/lib/kofficecore/tests/kodomtest.cpp b/lib/kofficecore/tests/kodomtest.cpp
index c8e3c539..14cae56e 100644
--- a/lib/kofficecore/tests/kodomtest.cpp
+++ b/lib/kofficecore/tests/kodomtest.cpp
@@ -20,17 +20,17 @@
#include "KoDom.h"
#include "KoXmlNS.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <assert.h>
-//static void debugElemNS( const QDomElement& elem )
+//static void debugElemNS( const TQDomElement& elem )
//{
// qDebug( "nodeName=%s tagName=%s localName=%s prefix=%s namespaceURI=%s", elem.nodeName().latin1(), elem.tagName().latin1(), elem.localName().latin1(), elem.prefix().latin1(), elem.namespaceURI().latin1() );
//}
-void testQDom( const QDomDocument& doc )
+void testTQDom( const TQDomDocument& doc )
{
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
//debugElemNS( docElem );
assert( docElem.nodeName() == "o:document-content" );
assert( docElem.tagName() == "document-content" );
@@ -39,21 +39,21 @@ void testQDom( const QDomDocument& doc )
assert( docElem.namespaceURI() == KoXmlNS::office );
// WARNING, elementsByTagNameNS is recursive!!!
- QDomNodeList docElemChildren = docElem.elementsByTagNameNS( KoXmlNS::office, "body" );
+ TQDomNodeList docElemChildren = docElem.elementsByTagNameNS( KoXmlNS::office, "body" );
assert( docElemChildren.length() == 1 );
- QDomElement elem = docElemChildren.item( 0 ).toElement();
+ TQDomElement elem = docElemChildren.item( 0 ).toElement();
//debugElemNS( elem );
assert( elem.tagName() == "body" );
assert( elem.localName() == "body" );
assert( elem.prefix() == "o" );
assert( elem.namespaceURI() == KoXmlNS::office );
- QDomNode n = elem.firstChild();
+ TQDomNode n = elem.firstChild();
for ( ; !n.isNull() ; n = n.nextSibling() ) {
if ( !n.isElement() )
continue;
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
//debugElemNS( e );
assert( e.tagName() == "p" );
assert( e.localName() == "p" );
@@ -61,35 +61,35 @@ void testQDom( const QDomDocument& doc )
assert( e.namespaceURI() == KoXmlNS::text );
}
- qDebug("testQDom... ok");
+ qDebug("testTQDom... ok");
}
-void testKoDom( const QDomDocument& doc )
+void testKoDom( const TQDomDocument& doc )
{
- QDomElement docElem = KoDom::namedItemNS( doc, KoXmlNS::office, "document-content" );
+ TQDomElement docElem = KoDom::namedItemNS( doc, KoXmlNS::office, "document-content" );
assert( !docElem.isNull() );
assert( docElem.localName() == "document-content" );
assert( docElem.namespaceURI() == KoXmlNS::office );
- QDomElement body = KoDom::namedItemNS( docElem, KoXmlNS::office, "body" );
+ TQDomElement body = KoDom::namedItemNS( docElem, KoXmlNS::office, "body" );
assert( !body.isNull() );
assert( body.localName() == "body" );
assert( body.namespaceURI() == KoXmlNS::office );
- QDomElement p = KoDom::namedItemNS( body, KoXmlNS::text, "p" );
+ TQDomElement p = KoDom::namedItemNS( body, KoXmlNS::text, "p" );
assert( !p.isNull() );
assert( p.localName() == "p" );
assert( p.namespaceURI() == KoXmlNS::text );
- const QDomElement officeStyle = KoDom::namedItemNS( docElem, KoXmlNS::office, "styles" );
+ const TQDomElement officeStyle = KoDom::namedItemNS( docElem, KoXmlNS::office, "styles" );
assert( !officeStyle.isNull() );
// Look for a non-existing element
- QDomElement notexist = KoDom::namedItemNS( body, KoXmlNS::text, "notexist" );
+ TQDomElement notexist = KoDom::namedItemNS( body, KoXmlNS::text, "notexist" );
assert( notexist.isNull() );
int count = 0;
- QDomElement elem;
+ TQDomElement elem;
forEachElement( elem, body ) {
assert( elem.localName() == "p" );
assert( elem.namespaceURI() == KoXmlNS::text );
@@ -98,8 +98,8 @@ void testKoDom( const QDomDocument& doc )
assert( count == 2 );
// Attributes
- // ### Qt bug: it doesn't work if using style-name instead of text:style-name in the XML
- const QString styleName = p.attributeNS( KoXmlNS::text, "style-name", QString::null );
+ // ### TQt bug: it doesn't work if using style-name instead of text:style-name in the XML
+ const TQString styleName = p.attributeNS( KoXmlNS::text, "style-name", TQString() );
qDebug( "%s", styleName.latin1() );
assert( styleName == "L1" );
@@ -107,9 +107,9 @@ void testKoDom( const QDomDocument& doc )
}
int main( int argc, char** argv ) {
- QApplication app( argc, argv, QApplication::Tty );
+ TQApplication app( argc, argv, TQApplication::Tty );
- const QCString xml = QCString( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ const TQCString xml = TQCString( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<o:document-content xmlns:o=\"" )
+ KoXmlNS::office
+ "\" xmlns=\"" + KoXmlNS::text
@@ -117,13 +117,13 @@ int main( int argc, char** argv ) {
+ "\">\n"
"<o:body><p text:style-name=\"L1\">foobar</p><p>2nd</p></o:body><o:styles></o:styles>\n"
"</o:document-content>\n";
- QDomDocument doc;
- //QXmlSimpleReader reader;
+ TQDomDocument doc;
+ //TQXmlSimpleReader reader;
//reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE );
//reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE );
bool ok = doc.setContent( xml, true /* namespace processing */ );
assert( ok );
- testQDom(doc);
+ testTQDom(doc);
testKoDom(doc);
}
diff --git a/lib/kofficecore/tests/kogenstylestest.cpp b/lib/kofficecore/tests/kogenstylestest.cpp
index ddfac1f6..1068cdc4 100644
--- a/lib/kofficecore/tests/kogenstylestest.cpp
+++ b/lib/kofficecore/tests/kogenstylestest.cpp
@@ -27,9 +27,9 @@ int testLookup()
kdDebug() << k_funcinfo << endl;
KoGenStyles coll;
- QMap<QString, QString> map1;
+ TQMap<TQString, TQString> map1;
map1.insert( "map1key", "map1value" );
- QMap<QString, QString> map2;
+ TQMap<TQString, TQString> map2;
map2.insert( "map2key1", "map2value1" );
map2.insert( "map2key2", "map2value2" );
@@ -40,7 +40,7 @@ int testLookup()
first.addStyleMap( map1 );
first.addStyleMap( map2 );
- QString firstName = coll.lookup( first );
+ TQString firstName = coll.lookup( first );
kdDebug() << "The first style got assigned the name " << firstName << endl;
assert( firstName == "A1" ); // it's fine if it's something else, but the koxmlwriter tests require a known name
assert( first.type() == KoGenStyle::STYLE_AUTO );
@@ -52,7 +52,7 @@ int testLookup()
second.addStyleMap( map1 );
second.addStyleMap( map2 );
- QString secondName = coll.lookup( second );
+ TQString secondName = coll.lookup( second );
kdDebug() << "The second style got assigned the name " << secondName << endl;
assert( firstName == secondName ); // check that sharing works
@@ -66,18 +66,18 @@ int testLookup()
KoGenStyle third( KoGenStyle::STYLE_AUTO, "paragraph", secondName ); // inherited style
third.addProperty( "style:margin-left", "1.249cm" );
- third.addProperty( "style:page-number", "0" ); // same as parent
- third.addProperty( "style:foobar", "3", KoGenStyle::TextType ); // different from parent
- assert( third.parentName() == secondName );
+ third.addProperty( "style:page-number", "0" ); // same as tqparent
+ third.addProperty( "style:foobar", "3", KoGenStyle::TextType ); // different from tqparent
+ assert( third.tqparentName() == secondName );
- QString thirdName = coll.lookup( third, "P" );
+ TQString thirdName = coll.lookup( third, "P" );
kdDebug() << "The third style got assigned the name " << thirdName << endl;
assert( thirdName == "P1" );
KoGenStyle user( KoGenStyle::STYLE_USER, "paragraph" ); // differs from third since it doesn't inherit second, and has a different type
user.addProperty( "style:margin-left", "1.249cm" );
- QString userStyleName = coll.lookup( user, "User", KoGenStyles::DontForceNumbering );
+ TQString userStyleName = coll.lookup( user, "User", KoGenStyles::DontForceNumbering );
kdDebug() << "The user style got assigned the name " << userStyleName << endl;
assert( userStyleName == "User" );
@@ -87,8 +87,8 @@ int testLookup()
sameAsParent.addProperty( "style:foobar", "2", KoGenStyle::TextType );
sameAsParent.addStyleMap( map1 );
sameAsParent.addStyleMap( map2 );
- QString sapName = coll.lookup( sameAsParent, "foobar" );
- kdDebug() << "The 'same as parent' style got assigned the name " << sapName << endl;
+ TQString sapName = coll.lookup( sameAsParent, "foobar" );
+ kdDebug() << "The 'same as tqparent' style got assigned the name " << sapName << endl;
assert( sapName == secondName );
assert( coll.styles().count() == 3 );
@@ -102,13 +102,13 @@ int testLookup()
headerStyle.addStyleMap( map1 );
headerStyle.addStyleMap( map2 );
headerStyle.setAutoStyleInStylesDotXml( true );
- QString headerStyleName = coll.lookup( headerStyle, "foobar" );
+ TQString headerStyleName = coll.lookup( headerStyle, "foobar" );
assert( coll.styles().count() == 4 );
assert( coll.styles( KoGenStyle::STYLE_AUTO ).count() == 2 );
assert( coll.styles( KoGenStyle::STYLE_USER ).count() == 1 );
- QValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
+ TQValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
assert( stylesXmlStyles.count() == 1 );
KoGenStyles::NamedStyle firstStyle = stylesXmlStyles.first();
assert( firstStyle.name == headerStyleName );
@@ -119,13 +119,13 @@ int testLookup()
TEST_BEGIN( 0, 0 );
third.writeStyle( &writer, coll, "style:style", thirdName, "style:paragraph-properties" );
- TEST_END( "XML for third style", "<r>\n <style:style style:name=\"P1\" style:parent-style-name=\"A1\" style:family=\"paragraph\">\n <style:paragraph-properties style:margin-left=\"1.249cm\"/>\n <style:text-properties style:foobar=\"3\"/>\n </style:style>\n</r>\n" );
+ TEST_END( "XML for third style", "<r>\n <style:style style:name=\"P1\" style:tqparent-style-name=\"A1\" style:family=\"paragraph\">\n <style:paragraph-properties style:margin-left=\"1.249cm\"/>\n <style:text-properties style:foobar=\"3\"/>\n </style:style>\n</r>\n" );
coll.markStyleForStylesXml( firstName );
{
- QValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
+ TQValueList<KoGenStyles::NamedStyle> stylesXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, true );
assert( stylesXmlStyles.count() == 2 );
- QValueList<KoGenStyles::NamedStyle> contentXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, false );
+ TQValueList<KoGenStyles::NamedStyle> contentXmlStyles = coll.styles( KoGenStyle::STYLE_AUTO, false );
assert( contentXmlStyles.count() == 1 );
}
@@ -147,7 +147,7 @@ int testDefaultStyle()
defaultStyle.addAttribute( "style:master-page-name", "Standard" );
defaultStyle.addProperty( "myfont", "isBold" );
defaultStyle.setDefaultStyle( true );
- QString defaultStyleName = coll.lookup( defaultStyle );
+ TQString defaultStyleName = coll.lookup( defaultStyle );
assert( !defaultStyleName.isEmpty() ); // whatever, but not empty
assert( defaultStyle.type() == KoGenStyle::STYLE_AUTO );
assert( defaultStyle.isDefaultStyle() );
@@ -155,7 +155,7 @@ int testDefaultStyle()
KoGenStyle anotherStyle( KoGenStyle::STYLE_AUTO, "paragraph" );
anotherStyle.addAttribute( "style:master-page-name", "Standard" );
anotherStyle.addProperty( "myfont", "isBold" );
- QString anotherStyleName = coll.lookup( anotherStyle );
+ TQString anotherStyleName = coll.lookup( anotherStyle );
assert( anotherStyleName == defaultStyleName );
assert( coll.styles().count() == 1 );
@@ -166,11 +166,11 @@ int testDefaultStyle()
// The kspread case: not writing out all properties, only if they differ
// from the default style.
- // KoGenStyles doesn't fetch info from the parent style when testing
- // for equality, so KSpread uses isEmpty() to check for equality-to-parent.
+ // KoGenStyles doesn't fetch info from the tqparent style when testing
+ // for equality, so KSpread uses isEmpty() to check for equality-to-tqparent.
KoGenStyle dataStyle( KoGenStyle::STYLE_AUTO, "paragraph", defaultStyleName );
assert( dataStyle.isEmpty() );
- // and then it doesn't look up the auto style, but rather uses the parent style directly.
+ // and then it doesn't look up the auto style, but rather uses the tqparent style directly.
return 0;
}
@@ -187,7 +187,7 @@ int testUserStyles()
user1.addAttribute( "style:display-name", "User 1" );
user1.addProperty( "myfont", "isBold" );
- QString user1StyleName = coll.lookup( user1, "User1", KoGenStyles::DontForceNumbering );
+ TQString user1StyleName = coll.lookup( user1, "User1", KoGenStyles::DontForceNumbering );
kdDebug() << "The user style got assigned the name " << user1StyleName << endl;
assert( user1StyleName == "User1" );
@@ -195,25 +195,25 @@ int testUserStyles()
user2.addAttribute( "style:display-name", "User 2" );
user2.addProperty( "myfont", "isBold" );
- QString user2StyleName = coll.lookup( user2, "User2", KoGenStyles::DontForceNumbering );
+ TQString user2StyleName = coll.lookup( user2, "User2", KoGenStyles::DontForceNumbering );
kdDebug() << "The user style got assigned the name " << user2StyleName << endl;
assert( user2StyleName == "User2" );
// And now, what if the data uses that style?
// This is like sameAsParent in the other test, but this time the
- // parent is a STYLE_USER...
+ // tqparent is a STYLE_USER...
KoGenStyle dataStyle( KoGenStyle::STYLE_AUTO, "paragraph", user2StyleName );
dataStyle.addProperty( "myfont", "isBold" );
- QString dataStyleName = coll.lookup( dataStyle, "DataStyle" );
+ TQString dataStyleName = coll.lookup( dataStyle, "DataStyle" );
kdDebug() << "The auto style got assigned the name " << dataStyleName << endl;
- assert( dataStyleName == "User2" ); // it found the parent as equal
+ assert( dataStyleName == "User2" ); // it found the tqparent as equal
// Let's do the opposite test, just to make sure
KoGenStyle dataStyle2( KoGenStyle::STYLE_AUTO, "paragraph", user2StyleName );
dataStyle2.addProperty( "myfont", "isNotBold" );
- QString dataStyle2Name = coll.lookup( dataStyle2, "DataStyle" );
+ TQString dataStyle2Name = coll.lookup( dataStyle2, "DataStyle" );
kdDebug() << "The different auto style got assigned the name " << dataStyle2Name << endl;
assert( dataStyle2Name == "DataStyle1" );
@@ -241,14 +241,14 @@ int testStylesDotXml()
headerStyle.addAttribute( "style:master-page-name", "Standard" );
headerStyle.addProperty( "style:page-number", "0" );
headerStyle.setAutoStyleInStylesDotXml( true );
- QString headerStyleName = coll.lookup( headerStyle, "P" );
+ TQString headerStyleName = coll.lookup( headerStyle, "P" );
assert( headerStyleName == "P1" );
//coll.dump();
KoGenStyle first( KoGenStyle::STYLE_AUTO, "paragraph" );
first.addAttribute( "style:master-page-name", "Standard" );
- QString firstName = coll.lookup( first, "P" );
+ TQString firstName = coll.lookup( first, "P" );
kdDebug() << "The auto style got assigned the name " << firstName << endl;
assert( firstName == "P2" ); // anything but not P1.
return 0;
diff --git a/lib/kofficecore/tests/kooasissettingstest.cpp b/lib/kofficecore/tests/kooasissettingstest.cpp
index ef29536d..a60fbd86 100644
--- a/lib/kofficecore/tests/kooasissettingstest.cpp
+++ b/lib/kofficecore/tests/kooasissettingstest.cpp
@@ -33,7 +33,7 @@ void testSelectItemSet( KoOasisSettings& settings )
void testParseConfigItemString( KoOasisSettings& settings )
{
KoOasisSettings::Items viewSettings = settings.itemSet( "view-settings" );
- const QString unit = viewSettings.parseConfigItemString( "unit" );
+ const TQString unit = viewSettings.parseConfigItemString( "unit" );
qDebug( "%s", unit.latin1() );
assert( unit == "mm" );
kdDebug() << "testParseConfigItemString OK" << endl;
@@ -71,7 +71,7 @@ void testNamedMap( KoOasisSettings& settings )
int main( int, char** ) {
- const QCString xml = "\
+ const TQCString xml = "\
<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
<office:document-settings xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:config=\"urn:oasis:names:tc:opendocument:xmlns:config:1.0\"> \
<office:settings> \
@@ -92,7 +92,7 @@ int main( int, char** ) {
</office:document-settings> \
";
- QDomDocument doc;
+ TQDomDocument doc;
bool ok = doc.setContent( xml, true /* namespace processing */ );
assert( ok );
diff --git a/lib/kofficecore/tests/kooasisstoretest.cpp b/lib/kofficecore/tests/kooasisstoretest.cpp
index 6750904b..be791644 100644
--- a/lib/kofficecore/tests/kooasisstoretest.cpp
+++ b/lib/kofficecore/tests/kooasisstoretest.cpp
@@ -21,9 +21,9 @@
#include <kdebug.h>
#include <assert.h>
-void testMimeForPath( QDomDocument& doc )
+void testMimeForPath( TQDomDocument& doc )
{
- QString mime = KoOasisStore::mimeForPath( doc, "Object 1" );
+ TQString mime = KoOasisStore::mimeForPath( doc, "Object 1" );
kdDebug() << k_funcinfo << mime << endl;
assert( !mime.isNull() );
assert( !mime.isEmpty() );
@@ -33,7 +33,7 @@ void testMimeForPath( QDomDocument& doc )
int main( int, char** ) {
- const QCString xml = "\
+ const TQCString xml = "\
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
<manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\">\n\
<manifest:file-entry manifest:media-type=\"application/vnd.oasis.opendocument.text\" manifest:full-path=\"/\"/>\n\
@@ -42,8 +42,8 @@ int main( int, char** ) {
</manifest:manifest> \
";
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorLine, errorColumn;
bool ok = doc.setContent( xml, true /* namespace processing */, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
diff --git a/lib/kofficecore/tests/kopointtest.cpp b/lib/kofficecore/tests/kopointtest.cpp
index 25286a5d..bf2ff843 100644
--- a/lib/kofficecore/tests/kopointtest.cpp
+++ b/lib/kofficecore/tests/kopointtest.cpp
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <math.h>
-bool check( QString txt, bool res, bool expected )
+bool check( TQString txt, bool res, bool expected )
{
if ( res == expected ) {
kdDebug() << txt << " : checking '" << res << "' against expected value '" << expected << "'... " << "ok" << endl;
@@ -15,7 +15,7 @@ bool check( QString txt, bool res, bool expected )
return true;
}
-bool check( QString txt, double res, double expected )
+bool check( TQString txt, double res, double expected )
{
if ( kAbs(res - expected) < 0.000001 ) {
kdDebug() << txt << " : checking '" << res << "' against expected value '" << expected << "'... " << "ok" << endl;
@@ -39,9 +39,9 @@ int main()
check( "KoPoint::setX()", p1.x(), 2.1 );
check( "KoPoint::setY()", p1.y(), 3.2 );
- KoPoint p2( QPoint( -30, -40 ) );
- check( "KoPoint(const QPoint&)", p2.x(), -30.0 );
- check( "KoPoint(const QPoint&)", p2.y(), -40.0 );
+ KoPoint p2( TQPoint( -30, -40 ) );
+ check( "KoPoint(const TQPoint&)", p2.x(), -30.0 );
+ check( "KoPoint(const TQPoint&)", p2.y(), -40.0 );
p2.rx() = 1.5;
p2.ry() = 2.5;
check( "KoPoint::rx()", p2.x(), 1.5 );
diff --git a/lib/kofficecore/tests/korecttest.cpp b/lib/kofficecore/tests/korecttest.cpp
index 9c2cb8b0..f1a1fd89 100644
--- a/lib/kofficecore/tests/korecttest.cpp
+++ b/lib/kofficecore/tests/korecttest.cpp
@@ -5,7 +5,7 @@
#include <kdebug.h>
#include <kglobal.h>
-bool check(QString txt, bool res, bool expected)
+bool check(TQString txt, bool res, bool expected)
{
if (res == expected) {
kdDebug() << txt << " : checking '" << res << "' against expected value '" << expected << "'... " << "ok" << endl;
@@ -17,12 +17,12 @@ bool check(QString txt, bool res, bool expected)
return true;
}
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString();
if (b.isEmpty())
- b = QString::null;
+ b = TQString();
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/lib/kofficecore/tests/koxmlreadertest.cpp b/lib/kofficecore/tests/koxmlreadertest.cpp
index 213fe0db..f8e6ed89 100644
--- a/lib/kofficecore/tests/koxmlreadertest.cpp
+++ b/lib/kofficecore/tests/koxmlreadertest.cpp
@@ -19,15 +19,15 @@
// xmlreadertest.cpp - test KoXml classes
// Ariya Hidayat, November 2005
-#include <qstring.h>
-#include <qcstring.h>
-#include <qbuffer.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqbuffer.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#include "KoXmlReader.h"
-#include <qxml.h>
+#include <tqxml.h>
#define CHECK(x,y) check(__FILE__,__LINE__,#x,x,y)
@@ -42,8 +42,8 @@ const T& result, const T& expected )
if( result != expected )
{
testFailed++;
- QString message;
- QTextStream ts( &message, IO_WriteOnly );
+ TQString message;
+ TQTextStream ts( &message, IO_WriteOnly );
ts << msg;
ts << " Result:";
ts << result;
@@ -61,8 +61,8 @@ bool expected )
if( result != expected )
{
testFailed++;
- QString message;
- QTextStream ts( &message, IO_WriteOnly );
+ TQString message;
+ TQTextStream ts( &message, IO_WriteOnly );
ts << msg;
ts << " Result: ";
if( result ) ts << "True"; else ts << "False";
@@ -75,13 +75,13 @@ bool expected )
void testNode()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<earth>";
xmlstream << "<continents>";
xmlstream << "<asia/>";
@@ -105,13 +105,13 @@ void testNode()
// null node
KoXmlNode node1;
- CHECK( node1.nodeName(), QString::null );
+ CHECK( node1.nodeName(), TQString() );
CHECK( node1.isNull(), true );
CHECK( node1.isElement(), false );
CHECK( node1.isElement(), false );
CHECK( node1.isDocument(), false );
CHECK( node1.ownerDocument().isNull(), false );
- CHECK( node1.parentNode().isNull(), true );
+ CHECK( node1.tqparentNode().isNull(), true );
CHECK( node1.hasChildNodes(), false );
CHECK( node1.firstChild().isNull(), true );
CHECK( node1.lastChild().isNull(), true );
@@ -126,7 +126,7 @@ void testNode()
// a node which is a document
KoXmlNode node3 = doc;
- CHECK( node3.nodeName(), QString("#document") );
+ CHECK( node3.nodeName(), TQString("#document") );
CHECK( node3.isNull(), false );
CHECK( node3.isElement(), false );
CHECK( node3.isText(), false );
@@ -137,14 +137,14 @@ void testNode()
// convert to document and the compare
KoXmlDocument doc2 = node3.toDocument();
- CHECK( doc2.nodeName(), QString("#document") );
+ CHECK( doc2.nodeName(), TQString("#document") );
CHECK( doc2.isNull(), false );
CHECK( doc2.isDocument(), true );
CHECK( node3==doc2, true );
// a document is of course can't be converted to element
KoXmlElement invalidElement = node3.toElement();
- CHECK( invalidElement.nodeName(), QString::null );
+ CHECK( invalidElement.nodeName(), TQString() );
CHECK( invalidElement.isNull(), true );
CHECK( invalidElement.isElement(), true );
CHECK( invalidElement.isText(), false );
@@ -153,7 +153,7 @@ void testNode()
// clear() makes it a null node again
node3.clear();
CHECK( node3.isNull(), true );
- CHECK( node3.nodeName(), QString::null );
+ CHECK( node3.nodeName(), TQString() );
CHECK( node3.isElement(), false );
CHECK( node3.isText(), false );
CHECK( node3.isDocument(), false );
@@ -182,7 +182,7 @@ void testNode()
// a node which is an element for <continents>
KoXmlNode node5 = doc.firstChild().firstChild();
- CHECK( node5.nodeName(), QString("continents") );
+ CHECK( node5.nodeName(), TQString("continents") );
CHECK( node5.isNull(), false );
CHECK( node5.isElement(), true );
CHECK( node5.isText(), false );
@@ -208,8 +208,8 @@ void testNode()
CHECK( invalidDoc.isDocument(), true );
// node for <europe> using namedItem() function
- KoXmlNode europeNode = continentsElement.namedItem( QString("europe") );
- CHECK( europeNode.nodeName(), QString("europe") );
+ KoXmlNode europeNode = continentsElement.namedItem( TQString("europe") );
+ CHECK( europeNode.nodeName(), TQString("europe") );
CHECK( europeNode.isNull(), false );
CHECK( europeNode.isElement(), true );
CHECK( europeNode.isText(), false );
@@ -217,7 +217,7 @@ void testNode()
CHECK( europeNode.ownerDocument()==doc, true );
// search non-existing node
- KoXmlNode fooNode = continentsElement.namedItem( QString("foobar") );
+ KoXmlNode fooNode = continentsElement.namedItem( TQString("foobar") );
CHECK( fooNode.isNull(), true );
CHECK( fooNode.isElement(), false );
CHECK( fooNode.isText(), false );
@@ -226,14 +226,14 @@ void testNode()
void testElement()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<html>";
xmlstream << "<body bgcolor=\"#000\">";
xmlstream << "<p>";
@@ -251,39 +251,39 @@ void testElement()
// element for <html>
KoXmlElement rootElement;
rootElement = doc.documentElement();
- CHECK( rootElement.nodeName(), QString("html") );
+ CHECK( rootElement.nodeName(), TQString("html") );
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
CHECK( rootElement.isDocument(), false );
CHECK( rootElement.ownerDocument().isNull(), false );
CHECK( rootElement.ownerDocument()==doc, true );
- CHECK( rootElement.parentNode().isNull(), false );
- CHECK( rootElement.parentNode().toDocument()==doc, true );
+ CHECK( rootElement.tqparentNode().isNull(), false );
+ CHECK( rootElement.tqparentNode().toDocument()==doc, true );
CHECK( rootElement.hasChildNodes(), true );
- CHECK( rootElement.tagName(), QString("html") );
+ CHECK( rootElement.tagName(), TQString("html") );
CHECK( rootElement.prefix().isNull(), true );
// element for <body>
KoXmlElement bodyElement;
bodyElement = rootElement.firstChild().toElement();
- CHECK( bodyElement.nodeName(), QString("body") );
+ CHECK( bodyElement.nodeName(), TQString("body") );
CHECK( bodyElement.isNull(), false );
CHECK( bodyElement.isElement(), true );
CHECK( bodyElement.isDocument(), false );
CHECK( bodyElement.ownerDocument().isNull(), false );
CHECK( bodyElement.ownerDocument()==doc, true );
- CHECK( bodyElement.parentNode().isNull(), false );
- CHECK( bodyElement.parentNode()==rootElement, true );
+ CHECK( bodyElement.tqparentNode().isNull(), false );
+ CHECK( bodyElement.tqparentNode()==rootElement, true );
CHECK( bodyElement.hasChildNodes(), true );
- CHECK( bodyElement.tagName(), QString("body") );
+ CHECK( bodyElement.tagName(), TQString("body") );
CHECK( bodyElement.prefix().isNull(), true );
CHECK( bodyElement.hasAttribute("bgcolor"), true );
- CHECK( bodyElement.attribute("bgcolor"), QString("#000") );
+ CHECK( bodyElement.attribute("bgcolor"), TQString("#000") );
// a shared copy of <body>, will still have access to attribute bgcolor
KoXmlElement body2Element;
body2Element = bodyElement;
- CHECK( body2Element.nodeName(), QString("body") );
+ CHECK( body2Element.nodeName(), TQString("body") );
CHECK( body2Element.isNull(), false );
CHECK( body2Element.isElement(), true );
CHECK( body2Element.isDocument(), false );
@@ -292,14 +292,14 @@ void testElement()
CHECK( body2Element==bodyElement, true );
CHECK( body2Element!=bodyElement, false );
CHECK( body2Element.hasChildNodes(), true );
- CHECK( body2Element.tagName(), QString("body") );
+ CHECK( body2Element.tagName(), TQString("body") );
CHECK( body2Element.prefix().isNull(), true );
CHECK( body2Element.hasAttribute("bgcolor"), true );
- CHECK( body2Element.attribute("bgcolor"), QString("#000") );
+ CHECK( body2Element.attribute("bgcolor"), TQString("#000") );
// empty element, by default constructor
KoXmlElement testElement;
- CHECK( testElement.nodeName(), QString::null );
+ CHECK( testElement.nodeName(), TQString() );
CHECK( testElement.isNull(), true );
CHECK( testElement.isElement(), true );
CHECK( testElement.isDocument(), false );
@@ -307,20 +307,20 @@ void testElement()
CHECK( testElement.ownerDocument()!=doc, true );
CHECK( testElement==rootElement, false );
CHECK( testElement!=rootElement, true );
- CHECK( testElement.parentNode().isNull(), true );
+ CHECK( testElement.tqparentNode().isNull(), true );
CHECK( testElement.hasChildNodes(), false );
// check assignment operator
testElement = rootElement;
- CHECK( testElement.nodeName(), QString("html") );
+ CHECK( testElement.nodeName(), TQString("html") );
CHECK( testElement.isNull(), false );
CHECK( testElement.isElement(), true );
CHECK( testElement.isDocument(), false );
CHECK( testElement==rootElement, true );
CHECK( testElement!=rootElement, false );
- CHECK( testElement.parentNode().isNull(), false );
- CHECK( testElement.parentNode().toDocument()==doc, true );
- CHECK( testElement.tagName(), QString("html") );
+ CHECK( testElement.tqparentNode().isNull(), false );
+ CHECK( testElement.tqparentNode().toDocument()==doc, true );
+ CHECK( testElement.tagName(), TQString("html") );
CHECK( testElement.prefix().isNull(), true );
// assigned from another empty element
@@ -336,8 +336,8 @@ void testElement()
CHECK( testElement.ownerDocument().isNull(), false );
CHECK( testElement.ownerDocument()==doc, true );
CHECK( testElement==bodyElement, true );
- CHECK( testElement.parentNode().isNull(), false );
- CHECK( testElement.tagName(), QString("body") );
+ CHECK( testElement.tqparentNode().isNull(), false );
+ CHECK( testElement.tagName(), TQString("body") );
CHECK( testElement.prefix().isNull(), true );
CHECK( testElement.hasChildNodes(), true );
@@ -349,9 +349,9 @@ void testElement()
CHECK( dummyElement.ownerDocument().isNull(), false );
CHECK( dummyElement.ownerDocument()==doc, true );
CHECK( dummyElement==rootElement, true );
- CHECK( dummyElement.parentNode().isNull(), false );
+ CHECK( dummyElement.tqparentNode().isNull(), false );
CHECK( dummyElement.hasChildNodes(), true );
- CHECK( dummyElement.tagName(), QString("html") );
+ CHECK( dummyElement.tagName(), TQString("html") );
CHECK( dummyElement.prefix().isNull(), true );
// clear() turns element to null node
@@ -378,14 +378,14 @@ void testElement()
void testAttributes()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<p>";
xmlstream << "<img src=\"foo.png\" width=\"300\" height=\"150\"/>";
xmlstream << "</p>";
@@ -400,26 +400,26 @@ void testAttributes()
rootElement = doc.documentElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
- CHECK( rootElement.parentNode().isNull(), false );
- CHECK( rootElement.parentNode().toDocument()==doc, true );
- CHECK( rootElement.tagName(), QString("p") );
+ CHECK( rootElement.tqparentNode().isNull(), false );
+ CHECK( rootElement.tqparentNode().toDocument()==doc, true );
+ CHECK( rootElement.tagName(), TQString("p") );
CHECK( rootElement.prefix().isNull(), true );
KoXmlElement imgElement;
imgElement = rootElement.firstChild().toElement();
CHECK( imgElement.isNull(), false );
CHECK( imgElement.isElement(), true );
- CHECK( imgElement.tagName(), QString("img") );
+ CHECK( imgElement.tagName(), TQString("img") );
CHECK( imgElement.prefix().isNull(), true );
CHECK( imgElement.hasAttribute("src"), true );
CHECK( imgElement.hasAttribute("width"), true );
CHECK( imgElement.hasAttribute("height"), true );
CHECK( imgElement.hasAttribute("non-exist"), false );
CHECK( imgElement.hasAttribute("SRC"), false );
- CHECK( imgElement.attribute("src"), QString("foo.png") );
- CHECK( imgElement.attribute("width"), QString("300") );
+ CHECK( imgElement.attribute("src"), TQString("foo.png") );
+ CHECK( imgElement.attribute("width"), TQString("300") );
CHECK( imgElement.attribute("width").toInt(), 300 );
- CHECK( imgElement.attribute("height"), QString("150") );
+ CHECK( imgElement.attribute("height"), TQString("150") );
CHECK( imgElement.attribute("height").toInt(), 150 );
CHECK( imgElement.attribute("border").isEmpty(), true );
CHECK( imgElement.attribute("border","0").toInt(), 0 );
@@ -428,14 +428,14 @@ void testAttributes()
void testText()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<p>";
xmlstream << "Hello ";
xmlstream << "<b>world</b>";
@@ -456,17 +456,17 @@ void testText()
CHECK( parElement.isDocument(), false );
CHECK( parElement.ownerDocument().isNull(), false );
CHECK( parElement.ownerDocument()==doc, true );
- CHECK( parElement.parentNode().isNull(), false );
- CHECK( parElement.parentNode().toDocument()==doc, true );
+ CHECK( parElement.tqparentNode().isNull(), false );
+ CHECK( parElement.tqparentNode().toDocument()==doc, true );
CHECK( parElement.hasChildNodes(), true );
- CHECK( parElement.tagName(), QString("p") );
+ CHECK( parElement.tagName(), TQString("p") );
CHECK( parElement.prefix().isNull(), true );
- CHECK( parElement.text(), QString("Hello world") );
+ CHECK( parElement.text(), TQString("Hello world") );
// node for "Hello"
KoXmlNode helloNode;
helloNode = parElement.firstChild();
- CHECK( helloNode.nodeName(), QString("#text") );
+ CHECK( helloNode.nodeName(), TQString("#text") );
CHECK( helloNode.isNull(), false );
CHECK( helloNode.isElement(), false );
CHECK( helloNode.isText(), true );
@@ -475,12 +475,12 @@ void testText()
// "Hello" text
KoXmlText helloText;
helloText = helloNode.toText();
- CHECK( helloText.nodeName(), QString("#text") );
+ CHECK( helloText.nodeName(), TQString("#text") );
CHECK( helloText.isNull(), false );
CHECK( helloText.isElement(), false );
CHECK( helloText.isText(), true );
CHECK( helloText.isDocument(), false );
- CHECK( helloText.data(), QString("Hello ") );
+ CHECK( helloText.data(), TQString("Hello ") );
// shared copy of the text
KoXmlText hello2Text;
@@ -489,7 +489,7 @@ void testText()
CHECK( hello2Text.isElement(), false );
CHECK( hello2Text.isText(), true );
CHECK( hello2Text.isDocument(), false );
- CHECK( hello2Text.data(), QString("Hello ") );
+ CHECK( hello2Text.data(), TQString("Hello ") );
// element for <b>
KoXmlElement boldElement;
@@ -500,9 +500,9 @@ void testText()
CHECK( boldElement.isDocument(), false );
CHECK( boldElement.ownerDocument().isNull(), false );
CHECK( boldElement.ownerDocument()==doc, true );
- CHECK( boldElement.parentNode().isNull(), false );
+ CHECK( boldElement.tqparentNode().isNull(), false );
CHECK( boldElement.hasChildNodes(), true );
- CHECK( boldElement.tagName(), QString("b") );
+ CHECK( boldElement.tagName(), TQString("b") );
CHECK( boldElement.prefix().isNull(), true );
// "world" text
@@ -512,19 +512,19 @@ void testText()
CHECK( worldText.isElement(), false );
CHECK( worldText.isText(), true );
CHECK( worldText.isDocument(), false );
- CHECK( worldText.data(), QString("world") );
+ CHECK( worldText.data(), TQString("world") );
}
void testCDATA()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<p>";
xmlstream << "Hello ";
xmlstream << "<![CDATA[world]]>";
@@ -545,12 +545,12 @@ void testCDATA()
CHECK( parElement.isDocument(), false );
CHECK( parElement.ownerDocument().isNull(), false );
CHECK( parElement.ownerDocument()==doc, true );
- CHECK( parElement.parentNode().isNull(), false );
- CHECK( parElement.parentNode().toDocument()==doc, true );
+ CHECK( parElement.tqparentNode().isNull(), false );
+ CHECK( parElement.tqparentNode().toDocument()==doc, true );
CHECK( parElement.hasChildNodes(), true );
- CHECK( parElement.tagName(), QString("p") );
+ CHECK( parElement.tagName(), TQString("p") );
CHECK( parElement.prefix().isNull(), true );
- CHECK( parElement.text(), QString("Hello world") );
+ CHECK( parElement.text(), TQString("Hello world") );
// node for "Hello"
KoXmlNode helloNode;
@@ -567,13 +567,13 @@ void testCDATA()
CHECK( helloText.isElement(), false );
CHECK( helloText.isText(), true );
CHECK( helloText.isDocument(), false );
- CHECK( helloText.data(), QString("Hello ") );
+ CHECK( helloText.data(), TQString("Hello ") );
// node for CDATA "world!"
// Note: isText() is also true for CDATA
KoXmlNode worldNode;
worldNode = helloNode.nextSibling();
- CHECK( worldNode.nodeName(), QString("#cdata-section") );
+ CHECK( worldNode.nodeName(), TQString("#cdata-section") );
CHECK( worldNode.isNull(), false );
CHECK( worldNode.isElement(), false );
CHECK( worldNode.isText(), true );
@@ -584,25 +584,25 @@ void testCDATA()
// Note: isText() is also true for CDATA
KoXmlCDATASection worldCDATA;
worldCDATA = worldNode.toCDATASection();
- CHECK( worldCDATA.nodeName(), QString("#cdata-section") );
+ CHECK( worldCDATA.nodeName(), TQString("#cdata-section") );
CHECK( worldCDATA.isNull(), false );
CHECK( worldCDATA.isElement(), false );
CHECK( worldCDATA.isText(), true );
CHECK( worldCDATA.isCDATASection(), true );
CHECK( worldCDATA.isDocument(), false );
- CHECK( worldCDATA.data(), QString("world") );
+ CHECK( worldCDATA.data(), TQString("world") );
}
void testDocument()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<koffice>";
xmlstream << " <kword/>\n";
xmlstream << " <kpresenter/>\n";
@@ -612,11 +612,11 @@ void testDocument()
KoXmlDocument doc;
// empty document
- CHECK( doc.nodeName(), QString("#document") );
+ CHECK( doc.nodeName(), TQString("#document") );
CHECK( doc.isNull(), false );
CHECK( doc.isElement(), false );
CHECK( doc.isDocument(), true );
- CHECK( doc.parentNode().isNull(), true );
+ CHECK( doc.tqparentNode().isNull(), true );
CHECK( doc.firstChild().isNull(), true );
CHECK( doc.lastChild().isNull(), true );
CHECK( doc.previousSibling().isNull(), true );
@@ -629,38 +629,38 @@ void testDocument()
CHECK( errorColumn, 0 );
// this document has something already
- CHECK( doc.nodeName(), QString("#document") );
+ CHECK( doc.nodeName(), TQString("#document") );
CHECK( doc.isNull(), false );
CHECK( doc.isElement(), false );
CHECK( doc.isDocument(), true );
- CHECK( doc.parentNode().isNull(), true );
+ CHECK( doc.tqparentNode().isNull(), true );
CHECK( doc.firstChild().isNull(), false );
CHECK( doc.lastChild().isNull(), false );
CHECK( doc.previousSibling().isNull(), true );
CHECK( doc.nextSibling().isNull(), true );
- // make sure its children are fine
+ // make sure its tqchildren are fine
KoXmlElement rootElement;
rootElement = doc.firstChild().toElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
CHECK( rootElement.isDocument(), false );
- CHECK( rootElement.parentNode().isNull(), false );
- CHECK( rootElement.parentNode().toDocument()==doc, true );
+ CHECK( rootElement.tqparentNode().isNull(), false );
+ CHECK( rootElement.tqparentNode().toDocument()==doc, true );
rootElement = doc.lastChild().toElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
CHECK( rootElement.isDocument(), false );
- CHECK( rootElement.parentNode().isNull(), false );
- CHECK( rootElement.parentNode().toDocument()==doc, true );
+ CHECK( rootElement.tqparentNode().isNull(), false );
+ CHECK( rootElement.tqparentNode().toDocument()==doc, true );
// clear() converts it into null node
doc.clear();
- CHECK( doc.nodeName(), QString::null );
+ CHECK( doc.nodeName(), TQString() );
CHECK( doc.isNull(), true );
CHECK( doc.isElement(), false );
CHECK( doc.isDocument(), true );
- CHECK( doc.parentNode().isNull(), true );
+ CHECK( doc.tqparentNode().isNull(), true );
CHECK( doc.firstChild().isNull(), true );
CHECK( doc.lastChild().isNull(), true );
CHECK( doc.previousSibling().isNull(), true );
@@ -668,24 +668,24 @@ void testDocument()
// assigned from another empty document
doc = KoXmlDocument();
- CHECK( doc.nodeName(), QString("#document") );
+ CHECK( doc.nodeName(), TQString("#document") );
CHECK( doc.isNull(), false );
CHECK( doc.isElement(), false );
CHECK( doc.isDocument(), true );
- CHECK( doc.parentNode().isNull(), true );
+ CHECK( doc.tqparentNode().isNull(), true );
}
void testNamespace()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
- // taken from example in Qt documentation (xml.html)
+ // taken from example in TQt documentation (xml.html)
xmlstream << "<document xmlns:book = \"http://trolltech.com/fnord/book/\"";
xmlstream << " xmlns = \"http://trolltech.com/fnord/\" >";
xmlstream << "<book>";
@@ -715,31 +715,31 @@ void testNamespace()
rootElement = doc.documentElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
- CHECK( rootElement.tagName(), QString("document") );
+ CHECK( rootElement.tagName(), TQString("document") );
CHECK( rootElement.prefix().isNull(), true );
bookElement = rootElement.firstChild().toElement();
CHECK( bookElement.isNull(), false );
CHECK( bookElement.isElement(), true );
- CHECK( bookElement.tagName(), QString("book") );
+ CHECK( bookElement.tagName(), TQString("book") );
CHECK( bookElement.prefix().isNull(), true );
- CHECK( bookElement.localName(), QString::null );
+ CHECK( bookElement.localName(), TQString() );
bookTitleElement = bookElement.firstChild().toElement();
CHECK( bookTitleElement.isNull(), false );
CHECK( bookTitleElement.isElement(), true );
- CHECK( bookTitleElement.tagName(), QString("book:title") );
+ CHECK( bookTitleElement.tagName(), TQString("book:title") );
CHECK( bookTitleElement.prefix().isNull(), true );
- CHECK( bookTitleElement.localName(), QString::null );
+ CHECK( bookTitleElement.localName(), TQString() );
bookAuthorElement = bookTitleElement.nextSibling().toElement();
CHECK( bookAuthorElement.isNull(), false );
CHECK( bookAuthorElement.isElement(), true );
- CHECK( bookAuthorElement.tagName(), QString("book:author") );
+ CHECK( bookAuthorElement.tagName(), TQString("book:author") );
CHECK( bookAuthorElement.prefix().isNull(), true );
- CHECK( bookAuthorElement.attribute("title"), QString("Ms") );
- CHECK( bookAuthorElement.attribute("fnord:title"), QString("Goddess") );
- CHECK( bookAuthorElement.attribute("name"), QString("Eris Kallisti") );
+ CHECK( bookAuthorElement.attribute("title"), TQString("Ms") );
+ CHECK( bookAuthorElement.attribute("fnord:title"), TQString("Goddess") );
+ CHECK( bookAuthorElement.attribute("name"), TQString("Eris Kallisti") );
// ------------- now with namespace processing -----------
xmldevice.at(0); // just to rewind
@@ -757,28 +757,28 @@ void testNamespace()
rootElement = doc.documentElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
- CHECK( rootElement.tagName(), QString("document") );
+ CHECK( rootElement.tagName(), TQString("document") );
CHECK( rootElement.prefix().isEmpty(), true );
- CHECK( rootElement.namespaceURI(), QString( defaultNS ) );
- CHECK( rootElement.localName(), QString("document") );
+ CHECK( rootElement.namespaceURI(), TQString( defaultNS ) );
+ CHECK( rootElement.localName(), TQString("document") );
// <book>
bookElement = rootElement.firstChild().toElement();
CHECK( bookElement.isNull(), false );
CHECK( bookElement.isElement(), true );
- CHECK( bookElement.tagName(), QString("book") );
+ CHECK( bookElement.tagName(), TQString("book") );
CHECK( bookElement.prefix().isEmpty(), true );
- CHECK( bookElement.namespaceURI(), QString( defaultNS ) );
- CHECK( bookElement.localName(), QString("book") );
+ CHECK( bookElement.namespaceURI(), TQString( defaultNS ) );
+ CHECK( bookElement.localName(), TQString("book") );
// <book:title>
bookTitleElement = bookElement.firstChild().toElement();
CHECK( bookTitleElement.isNull(), false );
CHECK( bookTitleElement.isElement(), true );
- CHECK( bookTitleElement.tagName(), QString("title") );
- CHECK( bookTitleElement.prefix(), QString("book") );
- CHECK( bookTitleElement.namespaceURI(), QString(bookNS) );
- CHECK( bookTitleElement.localName(), QString("title") );
+ CHECK( bookTitleElement.tagName(), TQString("title") );
+ CHECK( bookTitleElement.prefix(), TQString("book") );
+ CHECK( bookTitleElement.namespaceURI(), TQString(bookNS) );
+ CHECK( bookTitleElement.localName(), TQString("title") );
// another way, find it using namedItemNS()
KoXmlElement book2TitleElement;
@@ -787,16 +787,16 @@ void testNamespace()
CHECK( book2TitleElement==bookTitleElement, true );
CHECK( book2TitleElement.isNull(), false );
CHECK( book2TitleElement.isElement(), true );
- CHECK( book2TitleElement.tagName(), QString("title") );
+ CHECK( book2TitleElement.tagName(), TQString("title") );
// <book:author>
bookAuthorElement = bookTitleElement.nextSibling().toElement();
CHECK( bookAuthorElement.isNull(), false );
CHECK( bookAuthorElement.isElement(), true );
- CHECK( bookAuthorElement.tagName(), QString("author") );
- CHECK( bookAuthorElement.prefix(), QString("book") );
- CHECK( bookAuthorElement.namespaceURI(), QString(bookNS) );
- CHECK( bookAuthorElement.localName(), QString("author") );
+ CHECK( bookAuthorElement.tagName(), TQString("author") );
+ CHECK( bookAuthorElement.prefix(), TQString("book") );
+ CHECK( bookAuthorElement.namespaceURI(), TQString(bookNS) );
+ CHECK( bookAuthorElement.localName(), TQString("author") );
// another way, find it using namedItemNS()
KoXmlElement book2AuthorElement;
@@ -805,7 +805,7 @@ void testNamespace()
CHECK( book2AuthorElement==bookAuthorElement, true );
CHECK( book2AuthorElement.isNull(), false );
CHECK( book2AuthorElement.isElement(), true );
- CHECK( book2AuthorElement.tagName(), QString("author") );
+ CHECK( book2AuthorElement.tagName(), TQString("author") );
// attributes in <book:author>
// Note: with namespace processing, attribute's prefix is taken out and
@@ -814,9 +814,9 @@ void testNamespace()
CHECK( bookAuthorElement.hasAttribute("title"), true );
CHECK( bookAuthorElement.hasAttribute("fnord:title"), false );
CHECK( bookAuthorElement.hasAttribute("name"), true );
- CHECK( bookAuthorElement.attribute("title"), QString("Goddess") );
+ CHECK( bookAuthorElement.attribute("title"), TQString("Goddess") );
CHECK( bookAuthorElement.attribute("fnord:title").isEmpty(), true );
- CHECK( bookAuthorElement.attribute("name"), QString("Eris Kallisti") );
+ CHECK( bookAuthorElement.attribute("name"), TQString("Eris Kallisti") );
// attributes in <book:author>, with NS family of functions
// those without prefix are not accessible at all, because they do not belong
@@ -826,9 +826,9 @@ void testNamespace()
CHECK( bookAuthorElement.hasAttributeNS(bookNS,"title"), false );
CHECK( bookAuthorElement.hasAttributeNS(fnordNS,"title"), true );
- CHECK( bookAuthorElement.attributeNS(defaultNS,"title",""), QString("Goddess") );
- CHECK( bookAuthorElement.attributeNS(bookNS,"title",""), QString("") );
- CHECK( bookAuthorElement.attributeNS(fnordNS,"title",""), QString("Goddess") );
+ CHECK( bookAuthorElement.attributeNS(defaultNS,"title",""), TQString("Goddess") );
+ CHECK( bookAuthorElement.attributeNS(bookNS,"title",""), TQString("") );
+ CHECK( bookAuthorElement.attributeNS(fnordNS,"title",""), TQString("Goddess") );
CHECK( bookAuthorElement.hasAttributeNS(defaultNS,"fnord:title"), false );
CHECK( bookAuthorElement.hasAttributeNS(bookNS,"fnord:title"), false );
@@ -838,20 +838,20 @@ void testNamespace()
CHECK( bookAuthorElement.hasAttributeNS(bookNS,"name"), false );
CHECK( bookAuthorElement.hasAttributeNS(fnordNS,"name"), false );
- CHECK( bookAuthorElement.attributeNS(defaultNS,"name",QString::null).isEmpty(), true );
- CHECK( bookAuthorElement.attributeNS(bookNS,"name",QString::null).isEmpty(), true );
- CHECK( bookAuthorElement.attributeNS(fnordNS,"name",QString::null).isEmpty(), true );
+ CHECK( bookAuthorElement.attributeNS(defaultNS,"name",TQString()).isEmpty(), true );
+ CHECK( bookAuthorElement.attributeNS(bookNS,"name",TQString()).isEmpty(), true );
+ CHECK( bookAuthorElement.attributeNS(fnordNS,"name",TQString()).isEmpty(), true );
}
void testUnload()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<earth>";
xmlstream << "<continents>";
xmlstream << "<asia/>";
@@ -877,9 +877,9 @@ void testUnload()
earthElement = doc.documentElement().toElement();
CHECK( earthElement.isNull(), false );
CHECK( earthElement.isElement(), true );
- CHECK( earthElement.parentNode().isNull(), false );
+ CHECK( earthElement.tqparentNode().isNull(), false );
CHECK( earthElement.hasChildNodes(), true );
- CHECK( earthElement.tagName(), QString("earth") );
+ CHECK( earthElement.tagName(), TQString("earth") );
CHECK( earthElement.prefix().isNull(), true );
// this ensures that all child nodes of <earth> are loaded
@@ -890,7 +890,7 @@ void testUnload()
// we should get the correct first child
KoXmlElement continentsElement = earthElement.firstChild().toElement();
- CHECK( continentsElement.nodeName(), QString("continents") );
+ CHECK( continentsElement.nodeName(), TQString("continents") );
CHECK( continentsElement.isNull(), false );
CHECK( continentsElement.isElement(), true );
CHECK( continentsElement.isText(), false );
@@ -902,7 +902,7 @@ void testUnload()
// we should get the correct last child
KoXmlElement oceansElement = earthElement.lastChild().toElement();
- CHECK( oceansElement.nodeName(), QString("oceans") );
+ CHECK( oceansElement.nodeName(), TQString("oceans") );
CHECK( oceansElement.isNull(), false );
CHECK( oceansElement.isElement(), true );
CHECK( oceansElement.isText(), false );
@@ -912,14 +912,14 @@ void testUnload()
void testSimpleXML()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<solarsystem>";
xmlstream << " <mercurius/>\n";
xmlstream << " <venus/>\n";
@@ -941,9 +941,9 @@ void testSimpleXML()
rootElement = doc.documentElement();
CHECK( rootElement.isNull(), false );
CHECK( rootElement.isElement(), true );
- CHECK( rootElement.parentNode().isNull(), false );
+ CHECK( rootElement.tqparentNode().isNull(), false );
CHECK( rootElement.hasChildNodes(), true );
- CHECK( rootElement.tagName(), QString("solarsystem") );
+ CHECK( rootElement.tagName(), TQString("solarsystem") );
CHECK( rootElement.prefix().isNull(), true );
// node <mercurius>
@@ -953,9 +953,9 @@ void testSimpleXML()
CHECK( firstPlanetNode.isElement(), true );
CHECK( firstPlanetNode.nextSibling().isNull(), false );
CHECK( firstPlanetNode.previousSibling().isNull(), true );
- CHECK( firstPlanetNode.parentNode().isNull(), false );
- CHECK( firstPlanetNode.parentNode()==rootElement, true );
- CHECK( firstPlanetNode.parentNode()!=rootElement, false );
+ CHECK( firstPlanetNode.tqparentNode().isNull(), false );
+ CHECK( firstPlanetNode.tqparentNode()==rootElement, true );
+ CHECK( firstPlanetNode.tqparentNode()!=rootElement, false );
CHECK( firstPlanetNode.hasChildNodes(), false );
CHECK( firstPlanetNode.firstChild().isNull(), true );
CHECK( firstPlanetNode.lastChild().isNull(), true );
@@ -965,12 +965,12 @@ void testSimpleXML()
firstPlanetElement = firstPlanetNode.toElement();
CHECK( firstPlanetElement.isNull(), false );
CHECK( firstPlanetElement.isElement(), true );
- CHECK( firstPlanetElement.parentNode().isNull(), false );
- CHECK( firstPlanetElement.parentNode()==rootElement, true );
+ CHECK( firstPlanetElement.tqparentNode().isNull(), false );
+ CHECK( firstPlanetElement.tqparentNode()==rootElement, true );
CHECK( firstPlanetElement.hasChildNodes(), false );
CHECK( firstPlanetElement.firstChild().isNull(), true );
CHECK( firstPlanetElement.lastChild().isNull(), true );
- CHECK( firstPlanetElement.tagName(), QString("mercurius") );
+ CHECK( firstPlanetElement.tagName(), TQString("mercurius") );
CHECK( firstPlanetElement.prefix().isNull(), true );
// node <venus>
@@ -982,9 +982,9 @@ void testSimpleXML()
CHECK( secondPlanetNode.previousSibling().isNull(), false );
CHECK( secondPlanetNode.previousSibling()==firstPlanetNode, true );
CHECK( secondPlanetNode.previousSibling()==firstPlanetElement, true );
- CHECK( secondPlanetNode.parentNode().isNull(), false );
- CHECK( secondPlanetNode.parentNode()==rootElement, true );
- CHECK( secondPlanetNode.parentNode()!=rootElement, false );
+ CHECK( secondPlanetNode.tqparentNode().isNull(), false );
+ CHECK( secondPlanetNode.tqparentNode()==rootElement, true );
+ CHECK( secondPlanetNode.tqparentNode()!=rootElement, false );
CHECK( secondPlanetNode.hasChildNodes(), false );
CHECK( secondPlanetNode.firstChild().isNull(), true );
CHECK( secondPlanetNode.lastChild().isNull(), true );
@@ -998,64 +998,64 @@ void testSimpleXML()
CHECK( secondPlanetElement.previousSibling().isNull(), false );
CHECK( secondPlanetElement.previousSibling()==firstPlanetNode, true );
CHECK( secondPlanetElement.previousSibling()==firstPlanetElement, true );
- CHECK( secondPlanetElement.parentNode().isNull(), false );
- CHECK( secondPlanetElement.parentNode()==rootElement, true );
- CHECK( secondPlanetElement.parentNode()!=rootElement, false );
+ CHECK( secondPlanetElement.tqparentNode().isNull(), false );
+ CHECK( secondPlanetElement.tqparentNode()==rootElement, true );
+ CHECK( secondPlanetElement.tqparentNode()!=rootElement, false );
CHECK( secondPlanetElement.hasChildNodes(), false );
CHECK( secondPlanetElement.firstChild().isNull(), true );
CHECK( secondPlanetElement.lastChild().isNull(), true );
- CHECK( secondPlanetElement.tagName(), QString("venus") );
+ CHECK( secondPlanetElement.tagName(), TQString("venus") );
CHECK( secondPlanetElement.prefix().isNull(), true );
}
void testRootError()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
// multiple root nodes are not valid !
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<earth></earth><moon></moon>";
KoXmlDocument doc;
CHECK( doc.setContent( &xmldevice, &errorMsg, &errorLine, &errorColumn ), false );
CHECK( errorMsg.isEmpty(), false );
- CHECK( errorMsg, QString("unexpected character") );
+ CHECK( errorMsg, TQString("unexpected character") );
CHECK( errorLine, 1 );
CHECK( errorColumn, 17 );
}
void testMismatchedTag()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
xmlstream << "<earth></e>";
KoXmlDocument doc;
CHECK( doc.setContent( &xmldevice, &errorMsg, &errorLine, &errorColumn ), false );
CHECK( errorMsg.isEmpty(), false );
- CHECK( errorMsg, QString("tag mismatch") );
+ CHECK( errorMsg, TQString("tag mismatch") );
CHECK( errorLine, 1 );
CHECK( errorColumn, 11 );
}
void testSimpleOpenDocumentText()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
// content.xml from a simple OpenDocument text
// it has only paragraph "Hello, world!"
@@ -1088,119 +1088,119 @@ void testSimpleOpenDocumentText()
contentElement = doc.documentElement();
CHECK( contentElement.isNull(), false );
CHECK( contentElement.isElement(), true );
- CHECK( contentElement.parentNode().isNull(), false );
- CHECK( contentElement.parentNode().toDocument()==doc, true );
+ CHECK( contentElement.tqparentNode().isNull(), false );
+ CHECK( contentElement.tqparentNode().toDocument()==doc, true );
CHECK( contentElement.firstChild().isNull(), false );
CHECK( contentElement.lastChild().isNull(), false );
CHECK( contentElement.previousSibling().isNull(), false );
CHECK( contentElement.nextSibling().isNull(), true );
- CHECK( contentElement.localName(), QString("document-content") );
+ CHECK( contentElement.localName(), TQString("document-content") );
CHECK( contentElement.hasAttributeNS(officeNS,"version"), true );
- CHECK( contentElement.attributeNS(officeNS,"version",""), QString("1.0") );
+ CHECK( contentElement.attributeNS(officeNS,"version",""), TQString("1.0") );
// <office:automatic-styles>
KoXmlElement stylesElement;
stylesElement = KoXml::namedItemNS( contentElement, officeNS, "automatic-styles" );
CHECK( stylesElement.isNull(), false );
CHECK( stylesElement.isElement(), true );
- CHECK( stylesElement.parentNode().isNull(), false );
- CHECK( stylesElement.parentNode()==contentElement, true );
+ CHECK( stylesElement.tqparentNode().isNull(), false );
+ CHECK( stylesElement.tqparentNode()==contentElement, true );
CHECK( stylesElement.firstChild().isNull(), true );
CHECK( stylesElement.lastChild().isNull(), true );
CHECK( stylesElement.previousSibling().isNull(), true );
CHECK( stylesElement.nextSibling().isNull(), false );
- CHECK( stylesElement.localName(), QString("automatic-styles") );
+ CHECK( stylesElement.localName(), TQString("automatic-styles") );
// also same <office:automatic-styles>, but without namedItemNS
KoXmlNode styles2Element;
styles2Element = contentElement.firstChild().toElement();
CHECK( styles2Element.isNull(), false );
CHECK( styles2Element.isElement(), true );
- CHECK( styles2Element.parentNode().isNull(), false );
- CHECK( styles2Element.parentNode()==contentElement, true );
+ CHECK( styles2Element.tqparentNode().isNull(), false );
+ CHECK( styles2Element.tqparentNode()==contentElement, true );
CHECK( styles2Element.firstChild().isNull(), true );
CHECK( styles2Element.lastChild().isNull(), true );
CHECK( styles2Element.previousSibling().isNull(), true );
CHECK( styles2Element.nextSibling().isNull(), false );
- CHECK( styles2Element.localName(), QString("automatic-styles") );
+ CHECK( styles2Element.localName(), TQString("automatic-styles") );
// <office:body>
KoXmlElement bodyElement;
bodyElement = KoXml::namedItemNS( contentElement, officeNS, "body" );
CHECK( bodyElement.isNull(), false );
CHECK( bodyElement.isElement(), true );
- CHECK( bodyElement.parentNode().isNull(), false );
- CHECK( bodyElement.parentNode()==contentElement, true );
+ CHECK( bodyElement.tqparentNode().isNull(), false );
+ CHECK( bodyElement.tqparentNode()==contentElement, true );
CHECK( bodyElement.firstChild().isNull(), false );
CHECK( bodyElement.lastChild().isNull(), false );
CHECK( bodyElement.previousSibling().isNull(), false );
CHECK( bodyElement.nextSibling().isNull(), true );
- CHECK( bodyElement.localName(), QString("body") );
+ CHECK( bodyElement.localName(), TQString("body") );
// also same <office:body>, but without namedItemNS
KoXmlElement body2Element;
body2Element = stylesElement.nextSibling().toElement();
CHECK( body2Element.isNull(), false );
CHECK( body2Element.isElement(), true );
- CHECK( body2Element.parentNode().isNull(), false );
- CHECK( body2Element.parentNode()==contentElement, true );
+ CHECK( body2Element.tqparentNode().isNull(), false );
+ CHECK( body2Element.tqparentNode()==contentElement, true );
CHECK( body2Element.firstChild().isNull(), false );
CHECK( body2Element.lastChild().isNull(), false );
CHECK( body2Element.previousSibling().isNull(), false );
CHECK( body2Element.nextSibling().isNull(), true );
- CHECK( body2Element.localName(), QString("body") );
+ CHECK( body2Element.localName(), TQString("body") );
// <office:text>
KoXmlElement textElement;
textElement = KoXml::namedItemNS( bodyElement, officeNS, "text" );
CHECK( textElement.isNull(), false );
CHECK( textElement.isElement(), true );
- CHECK( textElement.parentNode().isNull(), false );
- CHECK( textElement.parentNode()==bodyElement, true );
+ CHECK( textElement.tqparentNode().isNull(), false );
+ CHECK( textElement.tqparentNode()==bodyElement, true );
CHECK( textElement.firstChild().isNull(), false );
CHECK( textElement.lastChild().isNull(), false );
CHECK( textElement.previousSibling().isNull(), true );
CHECK( textElement.nextSibling().isNull(), true );
- CHECK( textElement.localName(), QString("text") );
+ CHECK( textElement.localName(), TQString("text") );
// the same <office:text>, but without namedItemNS
KoXmlElement text2Element;
text2Element = bodyElement.firstChild().toElement();
CHECK( text2Element.isNull(), false );
CHECK( text2Element.isElement(), true );
- CHECK( text2Element.parentNode().isNull(), false );
- CHECK( text2Element.parentNode()==bodyElement, true );
+ CHECK( text2Element.tqparentNode().isNull(), false );
+ CHECK( text2Element.tqparentNode()==bodyElement, true );
CHECK( text2Element.firstChild().isNull(), false );
CHECK( text2Element.lastChild().isNull(), false );
CHECK( text2Element.previousSibling().isNull(), true );
CHECK( text2Element.nextSibling().isNull(), true );
- CHECK( text2Element.localName(), QString("text") );
+ CHECK( text2Element.localName(), TQString("text") );
// <text:p>
KoXmlElement parElement;
parElement = textElement.firstChild().toElement();
CHECK( parElement.isNull(), false );
CHECK( parElement.isElement(), true );
- CHECK( parElement.parentNode().isNull(), false );
- CHECK( parElement.parentNode()==textElement, true );
+ CHECK( parElement.tqparentNode().isNull(), false );
+ CHECK( parElement.tqparentNode()==textElement, true );
CHECK( parElement.firstChild().isNull(), false );
CHECK( parElement.lastChild().isNull(), false );
CHECK( parElement.previousSibling().isNull(), true );
CHECK( parElement.nextSibling().isNull(), true );
- CHECK( parElement.tagName(), QString("p") );
- CHECK( parElement.text(), QString("Hello, world!") );
- CHECK( parElement.attributeNS( QString(textNS),"style-name",""), QString("Standard") );
+ CHECK( parElement.tagName(), TQString("p") );
+ CHECK( parElement.text(), TQString("Hello, world!") );
+ CHECK( parElement.attributeNS( TQString(textNS),"style-name",""), TQString("Standard") );
}
void testSimpleOpenDocumentSpreadsheet()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
// content.xml from a simple OpenDocument spreadsheet
// the document has three worksheets, the last two are empty.
@@ -1244,65 +1244,65 @@ void testSimpleOpenDocumentSpreadsheet()
CHECK( errorLine, 0 );
CHECK( errorColumn, 0 );
- QString officeNS = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
- QString tableNS = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
- QString textNS = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
+ TQString officeNS = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
+ TQString tableNS = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
+ TQString textNS = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
// <office:document-content>
KoXmlElement contentElement;
contentElement = doc.documentElement();
CHECK( contentElement.isNull(), false );
CHECK( contentElement.isElement(), true );
- CHECK( contentElement.parentNode().isNull(), false );
- CHECK( contentElement.parentNode().toDocument()==doc, true );
+ CHECK( contentElement.tqparentNode().isNull(), false );
+ CHECK( contentElement.tqparentNode().toDocument()==doc, true );
CHECK( contentElement.firstChild().isNull(), false );
CHECK( contentElement.lastChild().isNull(), false );
CHECK( contentElement.previousSibling().isNull(), false );
CHECK( contentElement.nextSibling().isNull(), true );
- CHECK( contentElement.localName(), QString("document-content") );
+ CHECK( contentElement.localName(), TQString("document-content") );
// <office:body>
KoXmlElement bodyElement;
bodyElement = contentElement.firstChild().toElement();
CHECK( bodyElement.isNull(), false );
CHECK( bodyElement.isElement(), true );
- CHECK( bodyElement.parentNode().isNull(), false );
- CHECK( bodyElement.parentNode()==contentElement, true );
+ CHECK( bodyElement.tqparentNode().isNull(), false );
+ CHECK( bodyElement.tqparentNode()==contentElement, true );
CHECK( bodyElement.firstChild().isNull(), false );
CHECK( bodyElement.lastChild().isNull(), false );
CHECK( bodyElement.previousSibling().isNull(), true );
CHECK( bodyElement.nextSibling().isNull(), true );
- CHECK( bodyElement.localName(), QString("body") );
+ CHECK( bodyElement.localName(), TQString("body") );
// <office:spreadsheet>
KoXmlElement spreadsheetElement;
spreadsheetElement = bodyElement.firstChild().toElement();
CHECK( spreadsheetElement.isNull(), false );
CHECK( spreadsheetElement.isElement(), true );
- CHECK( spreadsheetElement.parentNode().isNull(), false );
- CHECK( spreadsheetElement.parentNode()==bodyElement, true );
+ CHECK( spreadsheetElement.tqparentNode().isNull(), false );
+ CHECK( spreadsheetElement.tqparentNode()==bodyElement, true );
CHECK( spreadsheetElement.firstChild().isNull(), false );
CHECK( spreadsheetElement.lastChild().isNull(), false );
CHECK( spreadsheetElement.previousSibling().isNull(), true );
CHECK( spreadsheetElement.nextSibling().isNull(), true );
- CHECK( spreadsheetElement.localName(), QString("spreadsheet") );
+ CHECK( spreadsheetElement.localName(), TQString("spreadsheet") );
// <table:table> for Sheet1
KoXmlElement sheet1Element;
sheet1Element = spreadsheetElement.firstChild().toElement();
CHECK( sheet1Element.isNull(), false );
CHECK( sheet1Element.isElement(), true );
- CHECK( sheet1Element.parentNode().isNull(), false );
- CHECK( sheet1Element.parentNode()==spreadsheetElement, true );
+ CHECK( sheet1Element.tqparentNode().isNull(), false );
+ CHECK( sheet1Element.tqparentNode()==spreadsheetElement, true );
CHECK( sheet1Element.firstChild().isNull(), false );
CHECK( sheet1Element.lastChild().isNull(), false );
CHECK( sheet1Element.previousSibling().isNull(), true );
CHECK( sheet1Element.nextSibling().isNull(), false );
- CHECK( sheet1Element.tagName(), QString("table") );
+ CHECK( sheet1Element.tagName(), TQString("table") );
CHECK( sheet1Element.hasAttributeNS(tableNS,"name"), true );
- CHECK( sheet1Element.attributeNS(tableNS,"name",""), QString("Sheet1") );
- CHECK( sheet1Element.attributeNS(tableNS,"style-name",""), QString("ta1") );
- CHECK( sheet1Element.attributeNS(tableNS,"print",""), QString("false") );
+ CHECK( sheet1Element.attributeNS(tableNS,"name",""), TQString("Sheet1") );
+ CHECK( sheet1Element.attributeNS(tableNS,"style-name",""), TQString("ta1") );
+ CHECK( sheet1Element.attributeNS(tableNS,"print",""), TQString("false") );
KoXml::load( sheet1Element, 100 );
@@ -1311,94 +1311,94 @@ void testSimpleOpenDocumentSpreadsheet()
columnElement = sheet1Element.firstChild().toElement();
CHECK( columnElement.isNull(), false );
CHECK( columnElement.isElement(), true );
- CHECK( columnElement.parentNode().isNull(), false );
- CHECK( columnElement.parentNode()==sheet1Element, true );
+ CHECK( columnElement.tqparentNode().isNull(), false );
+ CHECK( columnElement.tqparentNode()==sheet1Element, true );
CHECK( columnElement.firstChild().isNull(), true );
CHECK( columnElement.lastChild().isNull(), true );
CHECK( columnElement.previousSibling().isNull(), true );
CHECK( columnElement.nextSibling().isNull(), false );
- CHECK( columnElement.tagName(), QString("table-column") );
- CHECK( columnElement.attributeNS(tableNS,"style-name",""), QString("co1") );
- CHECK( columnElement.attributeNS(tableNS,"default-cell-style-name",""), QString("Default") );
+ CHECK( columnElement.tagName(), TQString("table-column") );
+ CHECK( columnElement.attributeNS(tableNS,"style-name",""), TQString("co1") );
+ CHECK( columnElement.attributeNS(tableNS,"default-cell-style-name",""), TQString("Default") );
// <table:table-row>
KoXmlElement rowElement;
rowElement = columnElement.nextSibling().toElement();
CHECK( rowElement.isNull(), false );
CHECK( rowElement.isElement(), true );
- CHECK( rowElement.parentNode().isNull(), false );
- CHECK( rowElement.parentNode()==sheet1Element, true );
+ CHECK( rowElement.tqparentNode().isNull(), false );
+ CHECK( rowElement.tqparentNode()==sheet1Element, true );
CHECK( rowElement.firstChild().isNull(), false );
CHECK( rowElement.lastChild().isNull(), false );
CHECK( rowElement.previousSibling().isNull(), false );
CHECK( rowElement.nextSibling().isNull(), true );
- CHECK( rowElement.tagName(), QString("table-row") );
- CHECK( rowElement.attributeNS(tableNS,"style-name",""), QString("ro1") );
+ CHECK( rowElement.tagName(), TQString("table-row") );
+ CHECK( rowElement.attributeNS(tableNS,"style-name",""), TQString("ro1") );
// <table:table-cell>
KoXmlElement cellElement;
cellElement = rowElement.firstChild().toElement();
CHECK( cellElement.isNull(), false );
CHECK( cellElement.isElement(), true );
- CHECK( cellElement.parentNode().isNull(), false );
- CHECK( cellElement.parentNode()==rowElement, true );
+ CHECK( cellElement.tqparentNode().isNull(), false );
+ CHECK( cellElement.tqparentNode()==rowElement, true );
CHECK( cellElement.firstChild().isNull(), false );
CHECK( cellElement.lastChild().isNull(), false );
CHECK( cellElement.previousSibling().isNull(), true );
CHECK( cellElement.nextSibling().isNull(), true );
- CHECK( cellElement.tagName(), QString("table-cell") );
- CHECK( cellElement.attributeNS(officeNS,"value-type",""), QString("string") );
+ CHECK( cellElement.tagName(), TQString("table-cell") );
+ CHECK( cellElement.attributeNS(officeNS,"value-type",""), TQString("string") );
// <text:p>
KoXmlElement parElement;
parElement = cellElement.firstChild().toElement();
CHECK( parElement.isNull(), false );
CHECK( parElement.isElement(), true );
- CHECK( parElement.parentNode().isNull(), false );
- CHECK( parElement.parentNode()==cellElement, true );
+ CHECK( parElement.tqparentNode().isNull(), false );
+ CHECK( parElement.tqparentNode()==cellElement, true );
CHECK( parElement.firstChild().isNull(), false );
CHECK( parElement.lastChild().isNull(), false );
CHECK( parElement.previousSibling().isNull(), true );
CHECK( parElement.nextSibling().isNull(), true );
- CHECK( parElement.tagName(), QString("p") );
- CHECK( parElement.text(), QString("Hello, world") );
+ CHECK( parElement.tagName(), TQString("p") );
+ CHECK( parElement.text(), TQString("Hello, world") );
// <table:table> for Sheet2
KoXmlElement sheet2Element;
sheet2Element = sheet1Element.nextSibling().toElement();
CHECK( sheet2Element.isNull(), false );
CHECK( sheet2Element.isElement(), true );
- CHECK( sheet2Element.parentNode().isNull(), false );
- CHECK( sheet2Element.parentNode()==spreadsheetElement, true );
+ CHECK( sheet2Element.tqparentNode().isNull(), false );
+ CHECK( sheet2Element.tqparentNode()==spreadsheetElement, true );
CHECK( sheet2Element.firstChild().isNull(), false );
CHECK( sheet2Element.lastChild().isNull(), false );
CHECK( sheet2Element.previousSibling().isNull(), false );
CHECK( sheet2Element.nextSibling().isNull(), false );
- CHECK( sheet2Element.tagName(), QString("table") );
+ CHECK( sheet2Element.tagName(), TQString("table") );
// </table:table> for Sheet3
KoXmlElement sheet3Element;
sheet3Element = sheet2Element.nextSibling().toElement();
CHECK( sheet3Element.isNull(), false );
CHECK( sheet3Element.isElement(), true );
- CHECK( sheet3Element.parentNode().isNull(), false );
- CHECK( sheet3Element.parentNode()==spreadsheetElement, true );
+ CHECK( sheet3Element.tqparentNode().isNull(), false );
+ CHECK( sheet3Element.tqparentNode()==spreadsheetElement, true );
CHECK( sheet3Element.firstChild().isNull(), false );
CHECK( sheet3Element.lastChild().isNull(), false );
CHECK( sheet3Element.previousSibling().isNull(), false );
CHECK( sheet3Element.nextSibling().isNull(), true );
- CHECK( sheet3Element.tagName(), QString("table") );
+ CHECK( sheet3Element.tagName(), TQString("table") );
}
void testSimpleOpenDocumentPresentation()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
// content.xml from a simple OpenDocument presentation
// styles, declarations and unnecessary namespaces are omitted
@@ -1419,9 +1419,9 @@ void testSimpleOpenDocumentPresentation()
xmlstream << " <office:presentation>";
xmlstream << " <draw:page draw:name=\"Title\" draw:style-name=\"dp1\" ";
xmlstream << " draw:master-page-name=\"lyt-cool\" ";
- xmlstream << " presentation:presentation-page-layout-name=\"AL1T0\">";
+ xmlstream << " presentation:presentation-page-tqlayout-name=\"AL1T0\">";
xmlstream << " <draw:frame presentation:style-name=\"pr1\" ";
- xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"layout\" ";
+ xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"tqlayout\" ";
xmlstream << " svg:width=\"23.912cm\" svg:height=\"3.508cm\" ";
xmlstream << " svg:x=\"2.058cm\" svg:y=\"1.543cm\" ";
xmlstream << " presentation:class=\"title\" ";
@@ -1431,7 +1431,7 @@ void testSimpleOpenDocumentPresentation()
xmlstream << " </draw:text-box>";
xmlstream << " </draw:frame>";
xmlstream << " <draw:frame presentation:style-name=\"pr2\" ";
- xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"layout\"";
+ xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"tqlayout\"";
xmlstream << " svg:width=\"23.912cm\" svg:height=\"13.231cm\"";
xmlstream << " svg:x=\"2.058cm\" svg:y=\"5.838cm\" ";
xmlstream << " presentation:class=\"subtitle\">";
@@ -1440,8 +1440,8 @@ void testSimpleOpenDocumentPresentation()
xmlstream << " </draw:text-box>";
xmlstream << " </draw:frame>";
xmlstream << " <presentation:notes draw:style-name=\"dp2\">";
- xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"layout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>";
- xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"layout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">";
+ xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"tqlayout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>";
+ xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"tqlayout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">";
xmlstream << " <draw:text-box/>";
xmlstream << " </draw:frame>";
xmlstream << " </presentation:notes>";
@@ -1469,236 +1469,236 @@ void testSimpleOpenDocumentPresentation()
CHECK( contentElement.isNull(), false );
CHECK( contentElement.isElement(), true );
- CHECK( contentElement.parentNode().isNull(), false );
- CHECK( contentElement.parentNode().toDocument()==doc, true );
+ CHECK( contentElement.tqparentNode().isNull(), false );
+ CHECK( contentElement.tqparentNode().toDocument()==doc, true );
CHECK( contentElement.firstChild().isNull(), false );
CHECK( contentElement.lastChild().isNull(), false );
CHECK( contentElement.previousSibling().isNull(), false );
CHECK( contentElement.nextSibling().isNull(), true );
- CHECK( contentElement.localName(), QString("document-content") );
+ CHECK( contentElement.localName(), TQString("document-content") );
CHECK( contentElement.hasAttributeNS(officeNS,"version"), true );
- CHECK( contentElement.attributeNS(officeNS,"version",""), QString("1.0") );
+ CHECK( contentElement.attributeNS(officeNS,"version",""), TQString("1.0") );
// <office:scripts>
KoXmlElement scriptsElement;
scriptsElement = KoXml::namedItemNS( contentElement, officeNS, "scripts" );
CHECK( scriptsElement.isNull(), false );
CHECK( scriptsElement.isElement(), true );
- CHECK( scriptsElement.parentNode().isNull(), false );
- CHECK( scriptsElement.parentNode()==contentElement, true );
+ CHECK( scriptsElement.tqparentNode().isNull(), false );
+ CHECK( scriptsElement.tqparentNode()==contentElement, true );
CHECK( scriptsElement.firstChild().isNull(), true );
CHECK( scriptsElement.lastChild().isNull(), true );
CHECK( scriptsElement.previousSibling().isNull(), true );
CHECK( scriptsElement.nextSibling().isNull(), false );
- CHECK( scriptsElement.localName(), QString("scripts") );
+ CHECK( scriptsElement.localName(), TQString("scripts") );
// <office:automatic-styles>
KoXmlElement stylesElement;
stylesElement = KoXml::namedItemNS( contentElement, officeNS, "automatic-styles" );
CHECK( stylesElement.isNull(), false );
CHECK( stylesElement.isElement(), true );
- CHECK( stylesElement.parentNode().isNull(), false );
- CHECK( stylesElement.parentNode()==contentElement, true );
+ CHECK( stylesElement.tqparentNode().isNull(), false );
+ CHECK( stylesElement.tqparentNode()==contentElement, true );
CHECK( stylesElement.firstChild().isNull(), true );
CHECK( stylesElement.lastChild().isNull(), true );
CHECK( stylesElement.previousSibling().isNull(), false );
CHECK( stylesElement.nextSibling().isNull(), false );
- CHECK( stylesElement.localName(), QString("automatic-styles") );
+ CHECK( stylesElement.localName(), TQString("automatic-styles") );
// also same <office:automatic-styles>, but without namedItemNS
KoXmlNode styles2Element;
styles2Element = scriptsElement.nextSibling().toElement();
CHECK( styles2Element.isNull(), false );
CHECK( styles2Element.isElement(), true );
- CHECK( styles2Element.parentNode().isNull(), false );
- CHECK( styles2Element.parentNode()==contentElement, true );
+ CHECK( styles2Element.tqparentNode().isNull(), false );
+ CHECK( styles2Element.tqparentNode()==contentElement, true );
CHECK( styles2Element.firstChild().isNull(), true );
CHECK( styles2Element.lastChild().isNull(), true );
CHECK( styles2Element.previousSibling().isNull(), false );
CHECK( styles2Element.nextSibling().isNull(), false );
- CHECK( styles2Element.localName(), QString("automatic-styles") );
+ CHECK( styles2Element.localName(), TQString("automatic-styles") );
// <office:body>
KoXmlElement bodyElement;
bodyElement = KoXml::namedItemNS( contentElement, officeNS, "body" );
CHECK( bodyElement.isNull(), false );
CHECK( bodyElement.isElement(), true );
- CHECK( bodyElement.parentNode().isNull(), false );
- CHECK( bodyElement.parentNode()==contentElement, true );
+ CHECK( bodyElement.tqparentNode().isNull(), false );
+ CHECK( bodyElement.tqparentNode()==contentElement, true );
CHECK( bodyElement.firstChild().isNull(), false );
CHECK( bodyElement.lastChild().isNull(), false );
CHECK( bodyElement.previousSibling().isNull(), false );
CHECK( bodyElement.nextSibling().isNull(), true );
- CHECK( bodyElement.localName(), QString("body") );
+ CHECK( bodyElement.localName(), TQString("body") );
// also same <office:body>, but without namedItemNS
KoXmlElement body2Element;
body2Element = stylesElement.nextSibling().toElement();
CHECK( body2Element.isNull(), false );
CHECK( body2Element.isElement(), true );
- CHECK( body2Element.parentNode().isNull(), false );
- CHECK( body2Element.parentNode()==contentElement, true );
+ CHECK( body2Element.tqparentNode().isNull(), false );
+ CHECK( body2Element.tqparentNode()==contentElement, true );
CHECK( body2Element.firstChild().isNull(), false );
CHECK( body2Element.lastChild().isNull(), false );
CHECK( body2Element.previousSibling().isNull(), false );
CHECK( body2Element.nextSibling().isNull(), true );
- CHECK( body2Element.localName(), QString("body") );
+ CHECK( body2Element.localName(), TQString("body") );
// <office:presentation>
KoXmlElement presentationElement;
presentationElement = KoXml::namedItemNS( bodyElement, officeNS, "presentation" );
CHECK( presentationElement.isNull(), false );
CHECK( presentationElement.isElement(), true );
- CHECK( presentationElement.parentNode().isNull(), false );
- CHECK( presentationElement.parentNode()==bodyElement, true );
+ CHECK( presentationElement.tqparentNode().isNull(), false );
+ CHECK( presentationElement.tqparentNode()==bodyElement, true );
CHECK( presentationElement.firstChild().isNull(), false );
CHECK( presentationElement.lastChild().isNull(), false );
CHECK( presentationElement.previousSibling().isNull(), true );
CHECK( presentationElement.nextSibling().isNull(), true );
- CHECK( presentationElement.localName(), QString("presentation") );
+ CHECK( presentationElement.localName(), TQString("presentation") );
// the same <office:presentation>, but without namedItemNS
KoXmlElement presentation2Element;
presentation2Element = bodyElement.firstChild().toElement();
CHECK( presentation2Element.isNull(), false );
CHECK( presentation2Element.isElement(), true );
- CHECK( presentation2Element.parentNode().isNull(), false );
- CHECK( presentation2Element.parentNode()==bodyElement, true );
+ CHECK( presentation2Element.tqparentNode().isNull(), false );
+ CHECK( presentation2Element.tqparentNode()==bodyElement, true );
CHECK( presentation2Element.firstChild().isNull(), false );
CHECK( presentation2Element.lastChild().isNull(), false );
CHECK( presentation2Element.previousSibling().isNull(), true );
CHECK( presentation2Element.nextSibling().isNull(), true );
- CHECK( presentation2Element.localName(), QString("presentation") );
+ CHECK( presentation2Element.localName(), TQString("presentation") );
// <draw:page> for "Title"
KoXmlElement titlePageElement;
titlePageElement = presentationElement.firstChild().toElement();
CHECK( titlePageElement.isNull(), false );
CHECK( titlePageElement.isElement(), true );
- CHECK( titlePageElement.parentNode().isNull(), false );
- CHECK( titlePageElement.parentNode()==presentationElement, true );
+ CHECK( titlePageElement.tqparentNode().isNull(), false );
+ CHECK( titlePageElement.tqparentNode()==presentationElement, true );
CHECK( titlePageElement.firstChild().isNull(), false );
CHECK( titlePageElement.lastChild().isNull(), false );
CHECK( titlePageElement.previousSibling().isNull(), true );
CHECK( titlePageElement.nextSibling().isNull(), false );
- CHECK( titlePageElement.localName(), QString("page") );
- CHECK( titlePageElement.attributeNS(drawNS,"name",""), QString("Title") );
- CHECK( titlePageElement.attributeNS(drawNS,"style-name",""), QString("dp1") );
- CHECK( titlePageElement.attributeNS(drawNS,"master-page-name",""), QString("lyt-cool") );
+ CHECK( titlePageElement.localName(), TQString("page") );
+ CHECK( titlePageElement.attributeNS(drawNS,"name",""), TQString("Title") );
+ CHECK( titlePageElement.attributeNS(drawNS,"style-name",""), TQString("dp1") );
+ CHECK( titlePageElement.attributeNS(drawNS,"master-page-name",""), TQString("lyt-cool") );
CHECK( titlePageElement.attributeNS(presentationNS,
- "presentation-page-layout-name",""), QString("AL1T0") );
+ "presentation-page-tqlayout-name",""), TQString("AL1T0") );
// <draw:frame> for the title frame
KoXmlElement titleFrameElement;
titleFrameElement = titlePageElement.firstChild().toElement();
CHECK( titleFrameElement.isNull(), false );
CHECK( titleFrameElement.isElement(), true );
- CHECK( titleFrameElement.parentNode().isNull(), false );
- CHECK( titleFrameElement.parentNode()==titlePageElement, true );
+ CHECK( titleFrameElement.tqparentNode().isNull(), false );
+ CHECK( titleFrameElement.tqparentNode()==titlePageElement, true );
CHECK( titleFrameElement.firstChild().isNull(), false );
CHECK( titleFrameElement.lastChild().isNull(), false );
CHECK( titleFrameElement.previousSibling().isNull(), true );
CHECK( titleFrameElement.nextSibling().isNull(), false );
- CHECK( titleFrameElement.localName(), QString("frame") );
- CHECK( titleFrameElement.attributeNS(presentationNS,"style-name",""), QString("pr1") );
- CHECK( titleFrameElement.attributeNS(presentationNS,"class",""), QString("title") );
- CHECK( titleFrameElement.attributeNS(presentationNS,"user-transformed",""), QString("true") );
- CHECK( titleFrameElement.attributeNS(drawNS,"text-style-name",""), QString("P2") );
- CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), QString("layout") );
- CHECK( titleFrameElement.attributeNS(svgNS,"width",""), QString("23.912cm") );
- CHECK( titleFrameElement.attributeNS(svgNS,"height",""), QString("3.508cm") );
- CHECK( titleFrameElement.attributeNS(svgNS,"x",""), QString("2.058cm") );
- CHECK( titleFrameElement.attributeNS(svgNS,"y",""), QString("1.543cm") );
+ CHECK( titleFrameElement.localName(), TQString("frame") );
+ CHECK( titleFrameElement.attributeNS(presentationNS,"style-name",""), TQString("pr1") );
+ CHECK( titleFrameElement.attributeNS(presentationNS,"class",""), TQString("title") );
+ CHECK( titleFrameElement.attributeNS(presentationNS,"user-transformed",""), TQString("true") );
+ CHECK( titleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P2") );
+ CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") );
+ CHECK( titleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") );
+ CHECK( titleFrameElement.attributeNS(svgNS,"height",""), TQString("3.508cm") );
+ CHECK( titleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") );
+ CHECK( titleFrameElement.attributeNS(svgNS,"y",""), TQString("1.543cm") );
// <draw:text-box> of the title frame
KoXmlElement titleBoxElement;
titleBoxElement = titleFrameElement.firstChild().toElement();
CHECK( titleBoxElement.isNull(), false );
CHECK( titleBoxElement.isElement(), true );
- CHECK( titleBoxElement.parentNode().isNull(), false );
- CHECK( titleBoxElement.parentNode()==titleFrameElement, true );
+ CHECK( titleBoxElement.tqparentNode().isNull(), false );
+ CHECK( titleBoxElement.tqparentNode()==titleFrameElement, true );
CHECK( titleBoxElement.firstChild().isNull(), false );
CHECK( titleBoxElement.lastChild().isNull(), false );
CHECK( titleBoxElement.previousSibling().isNull(), true );
CHECK( titleBoxElement.nextSibling().isNull(), true );
- CHECK( titleBoxElement.localName(), QString("text-box") );
+ CHECK( titleBoxElement.localName(), TQString("text-box") );
// <text:p> for the title text-box
KoXmlElement titleParElement;
titleParElement = titleBoxElement.firstChild().toElement();
CHECK( titleParElement.isNull(), false );
CHECK( titleParElement.isElement(), true );
- CHECK( titleParElement.parentNode().isNull(), false );
- CHECK( titleParElement.parentNode()==titleBoxElement, true );
+ CHECK( titleParElement.tqparentNode().isNull(), false );
+ CHECK( titleParElement.tqparentNode()==titleBoxElement, true );
CHECK( titleParElement.firstChild().isNull(), false );
CHECK( titleParElement.lastChild().isNull(), false );
CHECK( titleParElement.previousSibling().isNull(), true );
CHECK( titleParElement.nextSibling().isNull(), true );
- CHECK( titleParElement.localName(), QString("p") );
- CHECK( titleParElement.attributeNS(textNS,"style-name",""), QString("P1") );
- CHECK( titleParElement.text(), QString("Foobar") );
+ CHECK( titleParElement.localName(), TQString("p") );
+ CHECK( titleParElement.attributeNS(textNS,"style-name",""), TQString("P1") );
+ CHECK( titleParElement.text(), TQString("Foobar") );
// <draw:frame> for the subtitle frame
KoXmlElement subtitleFrameElement;
subtitleFrameElement = titleFrameElement.nextSibling().toElement();
CHECK( subtitleFrameElement.isNull(), false );
CHECK( subtitleFrameElement.isElement(), true );
- CHECK( subtitleFrameElement.parentNode().isNull(), false );
- CHECK( subtitleFrameElement.parentNode()==titlePageElement, true );
+ CHECK( subtitleFrameElement.tqparentNode().isNull(), false );
+ CHECK( subtitleFrameElement.tqparentNode()==titlePageElement, true );
CHECK( subtitleFrameElement.firstChild().isNull(), false );
CHECK( subtitleFrameElement.lastChild().isNull(), false );
CHECK( subtitleFrameElement.previousSibling().isNull(), false );
CHECK( subtitleFrameElement.nextSibling().isNull(), false );
- CHECK( subtitleFrameElement.localName(), QString("frame") );
- CHECK( subtitleFrameElement.attributeNS(presentationNS,"style-name",""), QString("pr2") );
- CHECK( subtitleFrameElement.attributeNS(presentationNS,"class",""), QString("subtitle") );
+ CHECK( subtitleFrameElement.localName(), TQString("frame") );
+ CHECK( subtitleFrameElement.attributeNS(presentationNS,"style-name",""), TQString("pr2") );
+ CHECK( subtitleFrameElement.attributeNS(presentationNS,"class",""), TQString("subtitle") );
CHECK( subtitleFrameElement.hasAttributeNS(presentationNS,"user-transformed"), false );
- CHECK( subtitleFrameElement.attributeNS(drawNS,"text-style-name",""), QString("P3") );
- CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), QString("layout") );
- CHECK( subtitleFrameElement.attributeNS(svgNS,"width",""), QString("23.912cm") );
- CHECK( subtitleFrameElement.attributeNS(svgNS,"height",""), QString("13.231cm") );
- CHECK( subtitleFrameElement.attributeNS(svgNS,"x",""), QString("2.058cm") );
- CHECK( subtitleFrameElement.attributeNS(svgNS,"y",""), QString("5.838cm") );
+ CHECK( subtitleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P3") );
+ CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") );
+ CHECK( subtitleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") );
+ CHECK( subtitleFrameElement.attributeNS(svgNS,"height",""), TQString("13.231cm") );
+ CHECK( subtitleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") );
+ CHECK( subtitleFrameElement.attributeNS(svgNS,"y",""), TQString("5.838cm") );
// <draw:text-box> of the subtitle frame
KoXmlElement subtitleBoxElement;
subtitleBoxElement = subtitleFrameElement.firstChild().toElement();
CHECK( subtitleBoxElement.isNull(), false );
CHECK( subtitleBoxElement.isElement(), true );
- CHECK( subtitleBoxElement.parentNode().isNull(), false );
- CHECK( subtitleBoxElement.parentNode()==subtitleFrameElement, true );
+ CHECK( subtitleBoxElement.tqparentNode().isNull(), false );
+ CHECK( subtitleBoxElement.tqparentNode()==subtitleFrameElement, true );
CHECK( subtitleBoxElement.firstChild().isNull(), false );
CHECK( subtitleBoxElement.lastChild().isNull(), false );
CHECK( subtitleBoxElement.previousSibling().isNull(), true );
CHECK( subtitleBoxElement.nextSibling().isNull(), true );
- CHECK( subtitleBoxElement.localName(), QString("text-box") );
+ CHECK( subtitleBoxElement.localName(), TQString("text-box") );
// <text:p> for the subtitle text-box
KoXmlElement subtitleParElement;
subtitleParElement = subtitleBoxElement.firstChild().toElement();
CHECK( subtitleParElement.isNull(), false );
CHECK( subtitleParElement.isElement(), true );
- CHECK( subtitleParElement.parentNode().isNull(), false );
- CHECK( subtitleParElement.parentNode()==subtitleBoxElement, true );
+ CHECK( subtitleParElement.tqparentNode().isNull(), false );
+ CHECK( subtitleParElement.tqparentNode()==subtitleBoxElement, true );
CHECK( subtitleParElement.firstChild().isNull(), false );
CHECK( subtitleParElement.lastChild().isNull(), false );
CHECK( subtitleParElement.previousSibling().isNull(), true );
CHECK( subtitleParElement.nextSibling().isNull(), true );
- CHECK( subtitleParElement.localName(), QString("p") );
- CHECK( subtitleParElement.attributeNS(textNS,"style-name",""), QString("P3") );
- CHECK( subtitleParElement.text(), QString("Foo") );
+ CHECK( subtitleParElement.localName(), TQString("p") );
+ CHECK( subtitleParElement.attributeNS(textNS,"style-name",""), TQString("P3") );
+ CHECK( subtitleParElement.text(), TQString("Foo") );
}
void testSimpleOpenDocumentFormula()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
// content.xml from a simple OpenDocument formula
// this is essentially MathML
@@ -1731,141 +1731,141 @@ void testSimpleOpenDocumentFormula()
mathElement = doc.documentElement();
CHECK( mathElement.isNull(), false );
CHECK( mathElement.isElement(), true );
- CHECK( mathElement.parentNode().isNull(), false );
- CHECK( mathElement.parentNode().toDocument()==doc, true );
+ CHECK( mathElement.tqparentNode().isNull(), false );
+ CHECK( mathElement.tqparentNode().toDocument()==doc, true );
CHECK( mathElement.firstChild().isNull(), false );
CHECK( mathElement.lastChild().isNull(), false );
CHECK( mathElement.previousSibling().isNull(), false );
CHECK( mathElement.nextSibling().isNull(), true );
- CHECK( mathElement.localName(), QString("math") );
+ CHECK( mathElement.localName(), TQString("math") );
// <math:semantics>
KoXmlElement semanticsElement;
semanticsElement = KoXml::namedItemNS( mathElement, mathNS, "semantics" );
CHECK( semanticsElement.isNull(), false );
CHECK( semanticsElement.isElement(), true );
- CHECK( semanticsElement.parentNode().isNull(), false );
- CHECK( semanticsElement.parentNode().toElement()==mathElement, true );
+ CHECK( semanticsElement.tqparentNode().isNull(), false );
+ CHECK( semanticsElement.tqparentNode().toElement()==mathElement, true );
CHECK( semanticsElement.firstChild().isNull(), false );
CHECK( semanticsElement.lastChild().isNull(), false );
CHECK( semanticsElement.previousSibling().isNull(), true );
CHECK( semanticsElement.nextSibling().isNull(), true );
- CHECK( semanticsElement.localName(), QString("semantics") );
+ CHECK( semanticsElement.localName(), TQString("semantics") );
// the same <math:semantics> but without namedItemNS
KoXmlElement semantics2Element;
semantics2Element = mathElement.firstChild().toElement();
CHECK( semantics2Element.isNull(), false );
CHECK( semantics2Element.isElement(), true );
- CHECK( semantics2Element.parentNode().isNull(), false );
- CHECK( semantics2Element.parentNode().toElement()==mathElement, true );
+ CHECK( semantics2Element.tqparentNode().isNull(), false );
+ CHECK( semantics2Element.tqparentNode().toElement()==mathElement, true );
CHECK( semantics2Element.firstChild().isNull(), false );
CHECK( semantics2Element.lastChild().isNull(), false );
CHECK( semantics2Element.previousSibling().isNull(), true );
CHECK( semantics2Element.nextSibling().isNull(), true );
- CHECK( semantics2Element.localName(), QString("semantics") );
+ CHECK( semantics2Element.localName(), TQString("semantics") );
// <math:mrow>
KoXmlElement mrowElement;
mrowElement = semanticsElement.firstChild().toElement();
CHECK( mrowElement.isNull(), false );
CHECK( mrowElement.isElement(), true );
- CHECK( mrowElement.parentNode().isNull(), false );
- CHECK( mrowElement.parentNode().toElement()==semanticsElement, true );
+ CHECK( mrowElement.tqparentNode().isNull(), false );
+ CHECK( mrowElement.tqparentNode().toElement()==semanticsElement, true );
CHECK( mrowElement.firstChild().isNull(), false );
CHECK( mrowElement.lastChild().isNull(), false );
CHECK( mrowElement.previousSibling().isNull(), true );
CHECK( mrowElement.nextSibling().isNull(), false );
- CHECK( mrowElement.localName(), QString("mrow") );
+ CHECK( mrowElement.localName(), TQString("mrow") );
// <math:mi> for "E"
KoXmlElement miElement;
miElement = mrowElement.firstChild().toElement();
CHECK( miElement.isNull(), false );
CHECK( miElement.isElement(), true );
- CHECK( miElement.parentNode().isNull(), false );
- CHECK( miElement.parentNode().toElement()==mrowElement, true );
+ CHECK( miElement.tqparentNode().isNull(), false );
+ CHECK( miElement.tqparentNode().toElement()==mrowElement, true );
CHECK( miElement.firstChild().isNull(), false );
CHECK( miElement.lastChild().isNull(), false );
CHECK( miElement.previousSibling().isNull(), true );
CHECK( miElement.nextSibling().isNull(), false );
- CHECK( miElement.localName(), QString("mi") );
+ CHECK( miElement.localName(), TQString("mi") );
// <math:mo> for "="
KoXmlElement moElement;
moElement = miElement.nextSibling().toElement();
CHECK( moElement.isNull(), false );
CHECK( moElement.isElement(), true );
- CHECK( moElement.parentNode().isNull(), false );
- CHECK( moElement.parentNode().toElement()==mrowElement, true );
+ CHECK( moElement.tqparentNode().isNull(), false );
+ CHECK( moElement.tqparentNode().toElement()==mrowElement, true );
CHECK( moElement.firstChild().isNull(), false );
CHECK( moElement.lastChild().isNull(), false );
CHECK( moElement.previousSibling().isNull(), false );
CHECK( moElement.nextSibling().isNull(), false );
- CHECK( moElement.localName(), QString("mo") );
- CHECK( moElement.attributeNS(mathNS,"stretchy",""), QString("false") );
+ CHECK( moElement.localName(), TQString("mo") );
+ CHECK( moElement.attributeNS(mathNS,"stretchy",""), TQString("false") );
// <math:msup> for "mc" and superscripted "2"
KoXmlElement msupElement;
msupElement = moElement.nextSibling().toElement();
CHECK( msupElement.isNull(), false );
CHECK( msupElement.isElement(), true );
- CHECK( msupElement.parentNode().isNull(), false );
- CHECK( msupElement.parentNode().toElement()==mrowElement, true );
+ CHECK( msupElement.tqparentNode().isNull(), false );
+ CHECK( msupElement.tqparentNode().toElement()==mrowElement, true );
CHECK( msupElement.firstChild().isNull(), false );
CHECK( msupElement.lastChild().isNull(), false );
CHECK( msupElement.previousSibling().isNull(), false );
CHECK( msupElement.nextSibling().isNull(), true );
- CHECK( msupElement.localName(), QString("msup") );
+ CHECK( msupElement.localName(), TQString("msup") );
// <math:mi> inside the <math:msup> for "mc"
KoXmlElement mcElement;
mcElement = msupElement.firstChild().toElement();
CHECK( mcElement.isNull(), false );
CHECK( mcElement.isElement(), true );
- CHECK( mcElement.parentNode().isNull(), false );
- CHECK( mcElement.parentNode().toElement()==msupElement, true );
+ CHECK( mcElement.tqparentNode().isNull(), false );
+ CHECK( mcElement.tqparentNode().toElement()==msupElement, true );
CHECK( mcElement.firstChild().isNull(), false );
CHECK( mcElement.lastChild().isNull(), false );
CHECK( mcElement.previousSibling().isNull(), true );
CHECK( mcElement.nextSibling().isNull(), false );
- CHECK( mcElement.localName(), QString("mi") );
- CHECK( mcElement.text(), QString("mc") );
- CHECK( mcElement.attributeNS(mathNS,"fontstyle",""), QString("italic") );
+ CHECK( mcElement.localName(), TQString("mi") );
+ CHECK( mcElement.text(), TQString("mc") );
+ CHECK( mcElement.attributeNS(mathNS,"fontstyle",""), TQString("italic") );
// <math:mn> inside the <math:msup> for "2" (superscript)
KoXmlElement mnElement;
mnElement = mcElement.nextSibling().toElement();
CHECK( mnElement.isNull(), false );
CHECK( mnElement.isElement(), true );
- CHECK( mnElement.parentNode().isNull(), false );
- CHECK( mnElement.parentNode().toElement()==msupElement, true );
+ CHECK( mnElement.tqparentNode().isNull(), false );
+ CHECK( mnElement.tqparentNode().toElement()==msupElement, true );
CHECK( mnElement.firstChild().isNull(), false );
CHECK( mnElement.lastChild().isNull(), false );
CHECK( mnElement.previousSibling().isNull(), false );
CHECK( mnElement.nextSibling().isNull(), true );
- CHECK( mnElement.localName(), QString("mn") );
- CHECK( mnElement.text(), QString("2") );
+ CHECK( mnElement.localName(), TQString("mn") );
+ CHECK( mnElement.text(), TQString("2") );
// <math:annotation>
KoXmlElement annotationElement;
annotationElement = semanticsElement.lastChild().toElement();
CHECK( annotationElement.isNull(), false );
CHECK( annotationElement.isElement(), true );
- CHECK( annotationElement.parentNode().isNull(), false );
- CHECK( annotationElement.parentNode().toElement()==semanticsElement, true );
+ CHECK( annotationElement.tqparentNode().isNull(), false );
+ CHECK( annotationElement.tqparentNode().toElement()==semanticsElement, true );
CHECK( annotationElement.firstChild().isNull(), false );
CHECK( annotationElement.lastChild().isNull(), false );
CHECK( annotationElement.previousSibling().isNull(), false );
CHECK( annotationElement.nextSibling().isNull(), true );
- CHECK( annotationElement.localName(), QString("annotation") );
- CHECK( annotationElement.text(), QString("E = mc^2 ") );
- CHECK( annotationElement.attributeNS(mathNS,"encoding",""), QString("StarMath 5.0") );
+ CHECK( annotationElement.localName(), TQString("annotation") );
+ CHECK( annotationElement.text(), TQString("E = mc^2 ") );
+ CHECK( annotationElement.attributeNS(mathNS,"encoding",""), TQString("StarMath 5.0") );
}
void testLargeOpenDocumentSpreadsheet()
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine = 0;
int errorColumn = 0;
@@ -1873,9 +1873,9 @@ void testLargeOpenDocumentSpreadsheet()
int rowCount = 200;
int colCount = 200*2;
- QByteArray xmlbuf;
- QBuffer xmldevice( xmlbuf );
- QTextStream xmlstream( xmlbuf, IO_WriteOnly );
+ TQByteArray xmlbuf;
+ TQBuffer xmldevice( xmlbuf );
+ TQTextStream xmlstream( xmlbuf, IO_WriteOnly );
// content.xml
xmlstream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
@@ -1887,7 +1887,7 @@ void testLargeOpenDocumentSpreadsheet()
xmlstream << "<office:spreadsheet>";
for( int i = 0; i < sheetCount; i++ )
{
- QString sheetName = QString("Sheet%1").arg(i+1);
+ TQString sheetName = TQString("Sheet%1").tqarg(i+1);
xmlstream << "<table:table table:name=\"" << sheetName;
xmlstream << "\" table:print=\"false\">";
for( int j = 0; j < rowCount; j++ )
@@ -1909,24 +1909,24 @@ void testLargeOpenDocumentSpreadsheet()
printf("Raw XML size: %d KB\n", xmlbuf.size()/1024 );
- QTime timer;
+ TQTime timer;
timer.start();
#if 1
// just to test parsing speed with plain dumb handler
- QXmlSimpleReader* reader = new QXmlSimpleReader;
+ TQXmlSimpleReader* reader = new TQXmlSimpleReader;
reader->setFeature( "http://xml.org/sax/features/namespaces", true );
- QXmlDefaultHandler handler;
+ TQXmlDefaultHandler handler;
reader->setContentHandler( &handler );
reader->setErrorHandler( &handler );
reader->setLexicalHandler( &handler );
reader->setDeclHandler( &handler );
reader->setDTDHandler( &handler );
- QXmlInputSource xmlSource;
- xmlSource.setData( QString::fromUtf8( xmlbuf.data(), xmlbuf.size() ) );
+ TQXmlInputSource xmlSource;
+ xmlSource.setData( TQString::fromUtf8( xmlbuf.data(), xmlbuf.size() ) );
timer.start();
reader->parse( &xmlSource );
- printf("Large spreadsheet: QXmlDefaultHandler parsing time is %d ms\n", timer.elapsed() );
+ printf("Large spreadsheet: TQXmlDefaultHandler parsing time is %d ms\n", timer.elapsed() );
delete reader;
#endif
@@ -1935,7 +1935,7 @@ void testLargeOpenDocumentSpreadsheet()
// uncomment to see the performance if on-demand/lazy loading is not used
// will definitely eat more memory
-#ifndef KOXML_USE_QDOM
+#ifndef KOXML_USE_TQDOM
doc.setFastLoading( true );
#endif
@@ -1950,30 +1950,30 @@ void testLargeOpenDocumentSpreadsheet()
xmlbuf.resize( 0 );
// namespaces that will be used
- QString officeNS = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
- QString tableNS = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
- QString textNS = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
+ TQString officeNS = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
+ TQString tableNS = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
+ TQString textNS = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
// <office:document-content>
KoXmlElement contentElement;
contentElement = doc.documentElement();
CHECK( contentElement.isNull(), false );
CHECK( contentElement.isElement(), true );
- CHECK( contentElement.localName(), QString("document-content") );
+ CHECK( contentElement.localName(), TQString("document-content") );
// <office:body>
KoXmlElement bodyElement;
bodyElement = contentElement.firstChild().toElement();
CHECK( bodyElement.isNull(), false );
CHECK( bodyElement.isElement(), true );
- CHECK( bodyElement.localName(), QString("body") );
+ CHECK( bodyElement.localName(), TQString("body") );
// <office:spreadsheet>
KoXmlElement spreadsheetElement;
spreadsheetElement = bodyElement.firstChild().toElement();
CHECK( spreadsheetElement.isNull(), false );
CHECK( spreadsheetElement.isElement(), true );
- CHECK( spreadsheetElement.localName(), QString("spreadsheet") );
+ CHECK( spreadsheetElement.localName(), TQString("spreadsheet") );
// now we visit every sheet, every row, every cell
timer.start();
@@ -1981,19 +1981,19 @@ void testLargeOpenDocumentSpreadsheet()
tableElement = spreadsheetElement.firstChild().toElement();
for( int table=0; table < sheetCount; table++ )
{
- QString tableName = QString("Sheet%1").arg(table+1);
+ TQString tableName = TQString("Sheet%1").tqarg(table+1);
CHECK( tableElement.isNull(), false );
CHECK( tableElement.isElement(), true );
- CHECK( tableElement.localName(), QString("table") );
+ CHECK( tableElement.localName(), TQString("table") );
CHECK( tableElement.hasAttributeNS(tableNS,"name"), true );
CHECK( tableElement.attributeNS(tableNS,"name",""), tableName );
- CHECK( tableElement.attributeNS(tableNS,"print",""), QString("false") );
+ CHECK( tableElement.attributeNS(tableNS,"print",""), TQString("false") );
// load everything for this table
KoXml::load( tableElement, 99 );
- CHECK( tableElement.parentNode().isNull(), false );
- CHECK( tableElement.parentNode()==spreadsheetElement, true );
+ CHECK( tableElement.tqparentNode().isNull(), false );
+ CHECK( tableElement.tqparentNode()==spreadsheetElement, true );
CHECK( tableElement.firstChild().isNull(), false );
CHECK( tableElement.lastChild().isNull(), false );
@@ -2003,9 +2003,9 @@ void testLargeOpenDocumentSpreadsheet()
{
CHECK( rowElement.isNull(), false );
CHECK( rowElement.isElement(), true );
- CHECK( rowElement.localName(), QString("table-row") );
- CHECK( rowElement.parentNode().isNull(), false );
- CHECK( rowElement.parentNode()==tableElement, true );
+ CHECK( rowElement.localName(), TQString("table-row") );
+ CHECK( rowElement.tqparentNode().isNull(), false );
+ CHECK( rowElement.tqparentNode()==tableElement, true );
CHECK( rowElement.firstChild().isNull(), false );
CHECK( rowElement.lastChild().isNull(), false );
@@ -2015,12 +2015,12 @@ void testLargeOpenDocumentSpreadsheet()
{
CHECK( cellElement.isNull(), false );
CHECK( cellElement.isElement(), true );
- CHECK( cellElement.localName(), QString("table-cell") );
- CHECK( cellElement.text(), QString("Hello, world") );
+ CHECK( cellElement.localName(), TQString("table-cell") );
+ CHECK( cellElement.text(), TQString("Hello, world") );
CHECK( cellElement.hasAttributeNS(officeNS,"value-type"), true );
- CHECK( cellElement.attributeNS(officeNS,"value-type",""), QString("string" ) );
- CHECK( cellElement.parentNode().isNull(), false );
- CHECK( cellElement.parentNode()==rowElement, true );
+ CHECK( cellElement.attributeNS(officeNS,"value-type",""), TQString("string" ) );
+ CHECK( cellElement.tqparentNode().isNull(), false );
+ CHECK( cellElement.tqparentNode()==rowElement, true );
CHECK( cellElement.firstChild().isNull(), false );
CHECK( cellElement.lastChild().isNull(), false );
cellElement = cellElement.nextSibling().toElement();
@@ -2063,8 +2063,8 @@ int main( int argc, char** argv )
// testLargeOpenDocumentSpreadsheet();
-#ifdef KOXML_USE_QDOM
- printf("Using QDom: ");
+#ifdef KOXML_USE_TQDOM
+ printf("Using TQDom: ");
#else
printf("Using KoXml: ");
#endif
diff --git a/lib/kofficecore/tests/priorityqueue_test.cpp b/lib/kofficecore/tests/priorityqueue_test.cpp
index d2c7eafd..4f49e752 100644
--- a/lib/kofficecore/tests/priorityqueue_test.cpp
+++ b/lib/kofficecore/tests/priorityqueue_test.cpp
@@ -19,8 +19,8 @@
#include <priorityqueue.h>
#include <kdebug.h>
-#include <qptrlist.h>
-#include <qasciidict.h>
+#include <tqptrlist.h>
+#include <tqasciidict.h>
#include <stdlib.h>
#include <time.h>
@@ -43,9 +43,9 @@ static const char* const keys[] = { "one", "two", "three", "four", "five",
int main( int /*argc*/, char **/*argv*/ )
{
- QPtrList<Node> list;
+ TQPtrList<Node> list;
list.setAutoDelete( true );
- QAsciiDict<Node> dict;
+ TQAsciiDict<Node> dict;
KOffice::PriorityQueue<Node> queue;