summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoPictureCollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoPictureCollection.cpp')
-rw-r--r--lib/kofficecore/KoPictureCollection.cpp62
1 files changed, 31 insertions, 31 deletions
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 );