summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/highlight/highlightconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/highlight/highlightconfig.cpp')
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
index ba97e6a8..d6e04d7f 100644
--- a/kopete/plugins/highlight/highlightconfig.cpp
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -16,11 +16,11 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqdom.h>
#include <ksavefile.h>
#include <kstandarddirs.h>
@@ -53,7 +53,7 @@ void HighlightConfig::appendFilter(Filter *f)
m_filters.append(f);
}
-QPtrList<Filter> HighlightConfig::filters() const
+TQPtrList<Filter> HighlightConfig::filters() const
{
return m_filters;
}
@@ -78,68 +78,68 @@ void HighlightConfig::load()
{
m_filters.clear(); //clear filters
- QString filename = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
if( filename.isEmpty() )
return ;
- QDomDocument filterList( QString::fromLatin1( "highlight-plugin" ) );
+ TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) );
- QFile filterListFile( filename );
+ TQFile filterListFile( filename );
filterListFile.open( IO_ReadOnly );
filterList.setContent( &filterListFile );
- QDomElement list = filterList.documentElement();
+ TQDomElement list = filterList.documentElement();
- QDomNode node = list.firstChild();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
-// if( element.tagName() == QString::fromLatin1("filter")
+// if( element.tagName() == TQString::fromLatin1("filter")
// {
Filter *filtre=newFilter();
- QDomNode filterNode = node.firstChild();
+ TQDomNode filterNode = node.firstChild();
while( !filterNode.isNull() )
{
- QDomElement filterElement = filterNode.toElement();
+ TQDomElement filterElement = filterNode.toElement();
if( !filterElement.isNull() )
{
- if( filterElement.tagName() == QString::fromLatin1( "display-name" ) )
+ if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) )
{
filtre->displayName = filterElement.text();
}
- else if( filterElement.tagName() == QString::fromLatin1( "search" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "search" ) )
{
filtre->search = filterElement.text();
- filtre->caseSensitive= ( filterElement.attribute( QString::fromLatin1( "caseSensitive" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ) );
- filtre->isRegExp= ( filterElement.attribute( QString::fromLatin1( "regExp" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "FG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) )
{
filtre->FG = filterElement.text();
- filtre->setFG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "BG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) )
{
filtre->BG = filterElement.text();
- filtre->setBG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "importance" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) )
{
filtre->importance = filterElement.text().toUInt();
- filtre->setImportance= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "sound" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) )
{
filtre->soundFN = filterElement.text();
- filtre->playSound = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "raise" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) )
{
- filtre->raiseView = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
}
filterNode = filterNode.nextSibling();
@@ -154,50 +154,50 @@ void HighlightConfig::load()
void HighlightConfig::save()
{
- QString fileName = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+ TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
KSaveFile file( fileName );
if( file.status() == 0 )
{
- QTextStream *stream = file.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = file.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
- QString xml = QString::fromLatin1(
+ TQString xml = TQString::fromLatin1(
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE kopete-highlight-plugin>\n"
"<highlight-plugin>\n" );
// Save metafilter information.
- QPtrListIterator<Filter> filtreIt( m_filters );
+ TQPtrListIterator<Filter> filtreIt( m_filters );
for( ; filtreIt.current(); ++filtreIt )
{
Filter *filtre = *filtreIt;
- xml += QString::fromLatin1( " <filter>\n <display-name>" )
- + QStyleSheet::escape(filtre->displayName)
- + QString::fromLatin1( "</display-name>\n" );
+ xml += TQString::fromLatin1( " <filter>\n <display-name>" )
+ + TQStyleSheet::escape(filtre->displayName)
+ + TQString::fromLatin1( "</display-name>\n" );
- xml += QString::fromLatin1(" <search caseSensitive=\"") + QString::number( static_cast<int>( filtre->caseSensitive ) ) +
- QString::fromLatin1("\" regExp=\"") + QString::number( static_cast<int>( filtre->isRegExp ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "</search>\n" );
+ xml += TQString::fromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "</search>\n" );
- xml += QString::fromLatin1(" <BG set=\"") + QString::number( static_cast<int>( filtre->setBG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "</BG>\n" );
- xml += QString::fromLatin1(" <FG set=\"") + QString::number( static_cast<int>( filtre->setFG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "</FG>\n" );
+ xml += TQString::fromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "</BG>\n" );
+ xml += TQString::fromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "</FG>\n" );
- xml += QString::fromLatin1(" <importance set=\"") + QString::number( static_cast<int>( filtre->setImportance ) ) +
- QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "</importance>\n" );
+ xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
+ TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" );
- xml += QString::fromLatin1(" <sound set=\"") + QString::number( static_cast<int>( filtre->playSound ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "</sound>\n" );
+ xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" );
- xml += QString::fromLatin1(" <raise set=\"") + QString::number( static_cast<int>( filtre->raiseView ) ) +
- QString::fromLatin1( "\"></raise>\n" );
+ xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::fromLatin1( "\"></raise>\n" );
- xml += QString::fromLatin1( " </filter>\n" );
+ xml += TQString::fromLatin1( " </filter>\n" );
}
- xml += QString::fromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::fromLatin1( "</highlight-plugin>\n" );
*stream << xml;
}