summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoUserStyleCollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoUserStyleCollection.cpp')
-rw-r--r--lib/kotext/KoUserStyleCollection.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/kotext/KoUserStyleCollection.cpp b/lib/kotext/KoUserStyleCollection.cpp
index 1b9b8ccf..1cf5b333 100644
--- a/lib/kotext/KoUserStyleCollection.cpp
+++ b/lib/kotext/KoUserStyleCollection.cpp
@@ -20,20 +20,20 @@
#include "KoUserStyle.h"
#include <kdebug.h>
-KoUserStyleCollection::KoUserStyleCollection( const QString& prefix )
+KoUserStyleCollection::KoUserStyleCollection( const TQString& prefix )
: m_prefix( prefix ),
m_lastStyle( 0 ),
m_default( false /*to be safe*/ )
{
}
-KoUserStyle* KoUserStyleCollection::findStyle( const QString & _name, const QString& defaultStyleName ) const
+KoUserStyle* KoUserStyleCollection::findStyle( const TQString & _name, const TQString& defaultStyleName ) const
{
// Caching, to speed things up
if ( m_lastStyle && m_lastStyle->name() == _name )
return m_lastStyle;
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt ) {
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt ) {
if ( (*styleIt)->name() == _name ) {
m_lastStyle = *styleIt;
return m_lastStyle;
@@ -46,12 +46,12 @@ KoUserStyle* KoUserStyleCollection::findStyle( const QString & _name, const QStr
return 0;
}
-KoUserStyle* KoUserStyleCollection::findStyleByDisplayName( const QString& displayName ) const
+KoUserStyle* KoUserStyleCollection::findStyleByDisplayName( const TQString& displayName ) const
{
if ( m_lastStyle && m_lastStyle->displayName() == displayName )
return m_lastStyle;
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt ) {
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt ) {
if ( (*styleIt)->displayName() == displayName ) {
m_lastStyle = *styleIt;
return m_lastStyle;
@@ -61,13 +61,13 @@ KoUserStyle* KoUserStyleCollection::findStyleByDisplayName( const QString& displ
return 0;
}
-QString KoUserStyleCollection::generateUniqueName() const
+TQString KoUserStyleCollection::generateUniqueName() const
{
int count = 1;
- QString name;
+ TQString name;
do {
- name = m_prefix + QString::number( count++ );
- } while ( findStyle( name, QString::null ) );
+ name = m_prefix + TQString::number( count++ );
+ } while ( findStyle( name, TQString() ) );
return name;
}
@@ -79,19 +79,19 @@ KoUserStyleCollection::~KoUserStyleCollection()
void KoUserStyleCollection::clear()
{
// KDE4: qDeleteAll
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
delete *styleIt;
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_deletedStyles.begin(), styleEnd = m_deletedStyles.end() ; styleIt != styleEnd ; ++styleIt )
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_deletedStyles.begin(), styleEnd = m_deletedStyles.end() ; styleIt != styleEnd ; ++styleIt )
delete *styleIt;
m_styleList.clear();
m_deletedStyles.clear();
m_lastStyle = 0;
}
-QStringList KoUserStyleCollection::displayNameList() const
+TQStringList KoUserStyleCollection::displayNameList() const
{
- QStringList lst;
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
+ TQStringList lst;
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
lst.append( (*styleIt)->displayName() );
return lst;
}
@@ -99,7 +99,7 @@ QStringList KoUserStyleCollection::displayNameList() const
KoUserStyle* KoUserStyleCollection::addStyle( KoUserStyle* sty )
{
// First check for duplicates.
- for ( QValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
+ for ( TQValueList<KoUserStyle *>::const_iterator styleIt = m_styleList.begin(), styleEnd = m_styleList.end() ; styleIt != styleEnd ; ++styleIt )
{
KoUserStyle* p = *styleIt;
if ( p->name() == sty->name() ) {
@@ -129,12 +129,12 @@ void KoUserStyleCollection::removeStyle ( KoUserStyle *style ) {
}
}
-void KoUserStyleCollection::updateStyleListOrder( const QStringList &lst )
+void KoUserStyleCollection::updateStyleListOrder( const TQStringList &lst )
{
- QValueList<KoUserStyle *> orderStyle;
- for ( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it )
+ TQValueList<KoUserStyle *> orderStyle;
+ for ( TQStringList::const_iterator it = lst.begin(); it != lst.end(); ++it )
{
- KoUserStyle* style = findStyle( *it, QString::null );
+ KoUserStyle* style = findStyle( *it, TQString() );
if ( style )
orderStyle.append( style );
else