summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/highlight
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/plugins/highlight
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/highlight')
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp72
-rw-r--r--kopete/plugins/highlight/highlightplugin.cpp10
-rw-r--r--kopete/plugins/highlight/highlightplugin.h3
-rw-r--r--kopete/plugins/highlight/highlightpreferences.cpp4
-rw-r--r--kopete/plugins/highlight/highlightpreferences.h3
-rw-r--r--kopete/plugins/highlight/highlightprefsbase.ui68
6 files changed, 81 insertions, 79 deletions
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
index d6e04d7f..2cfab23b 100644
--- a/kopete/plugins/highlight/highlightconfig.cpp
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -78,11 +78,11 @@ void HighlightConfig::load()
{
m_filters.clear(); //clear filters
- TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) );
if( filename.isEmpty() )
return ;
- TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) );
+ TQDomDocument filterList( TQString::tqfromLatin1( "highlight-plugin" ) );
TQFile filterListFile( filename );
filterListFile.open( IO_ReadOnly );
@@ -96,7 +96,7 @@ void HighlightConfig::load()
TQDomElement element = node.toElement();
if( !element.isNull() )
{
-// if( element.tagName() == TQString::fromLatin1("filter")
+// if( element.tagName() == TQString::tqfromLatin1("filter")
// {
Filter *filtre=newFilter();
TQDomNode filterNode = node.firstChild();
@@ -106,40 +106,40 @@ void HighlightConfig::load()
TQDomElement filterElement = filterNode.toElement();
if( !filterElement.isNull() )
{
- if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) )
+ if( filterElement.tagName() == TQString::tqfromLatin1( "display-name" ) )
{
filtre->displayName = filterElement.text();
}
- else if( filterElement.tagName() == TQString::fromLatin1( "search" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "search" ) )
{
filtre->search = filterElement.text();
- 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" ) );
+ filtre->caseSensitive= ( filterElement.attribute( TQString::tqfromLatin1( "caseSensitive" ), TQString::tqfromLatin1( "1" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->isRegExp= ( filterElement.attribute( TQString::tqfromLatin1( "regExp" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "FG" ) )
{
filtre->FG = filterElement.text();
- filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setFG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "BG" ) )
{
filtre->BG = filterElement.text();
- filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setBG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "importance" ) )
{
filtre->importance = filterElement.text().toUInt();
- filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setImportance= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "sound" ) )
{
filtre->soundFN = filterElement.text();
- filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->playSound = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "raise" ) )
{
- filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->raiseView = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
}
filterNode = filterNode.nextSibling();
@@ -154,7 +154,7 @@ void HighlightConfig::load()
void HighlightConfig::save()
{
- TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
+ TQString fileName = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) );
KSaveFile file( fileName );
if( file.status() == 0 )
@@ -162,7 +162,7 @@ void HighlightConfig::save()
TQTextStream *stream = file.textStream();
stream->setEncoding( TQTextStream::UnicodeUTF8 );
- TQString xml = TQString::fromLatin1(
+ TQString xml = TQString::tqfromLatin1(
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE kopete-highlight-plugin>\n"
"<highlight-plugin>\n" );
@@ -172,32 +172,32 @@ void HighlightConfig::save()
for( ; filtreIt.current(); ++filtreIt )
{
Filter *filtre = *filtreIt;
- xml += TQString::fromLatin1( " <filter>\n <display-name>" )
+ xml += TQString::tqfromLatin1( " <filter>\n <display-name>" )
+ TQStyleSheet::escape(filtre->displayName)
- + TQString::fromLatin1( "</display-name>\n" );
+ + TQString::tqfromLatin1( "</display-name>\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 += TQString::tqfromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ TQString::tqfromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
+ TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::tqfromLatin1( "</search>\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 += TQString::tqfromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
+ TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::tqfromLatin1( "</BG>\n" );
+ xml += TQString::tqfromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
+ TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::tqfromLatin1( "</FG>\n" );
- xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
- TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" );
+ xml += TQString::tqfromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
+ TQString::tqfromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::tqfromLatin1( "</importance>\n" );
- xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
- TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" );
+ xml += TQString::tqfromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
+ TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::tqfromLatin1( "</sound>\n" );
- xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
- TQString::fromLatin1( "\"></raise>\n" );
+ xml += TQString::tqfromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::tqfromLatin1( "\"></raise>\n" );
- xml += TQString::fromLatin1( " </filter>\n" );
+ xml += TQString::tqfromLatin1( " </filter>\n" );
}
- xml += TQString::fromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::tqfromLatin1( "</highlight-plugin>\n" );
*stream << xml;
}
diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp
index 7ec6ba5e..843d7ed5 100644
--- a/kopete/plugins/highlight/highlightplugin.cpp
+++ b/kopete/plugins/highlight/highlightplugin.cpp
@@ -29,8 +29,8 @@
typedef KGenericFactory<HighlightPlugin> HighlightPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) )
-HighlightPlugin::HighlightPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
-: Kopete::Plugin( HighlightPluginFactory::instance(), parent, name )
+HighlightPlugin::HighlightPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ )
+: Kopete::Plugin( HighlightPluginFactory::instance(), tqparent, name )
{
if( !pluginStatic_ )
pluginStatic_=this;
@@ -70,8 +70,8 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg )
{
++it;
if(f->isRegExp ?
- msg.plainBody().contains(TQRegExp(f->search , f->caseSensitive)) :
- msg.plainBody().contains(f->search , f->caseSensitive) )
+ msg.plainBody().tqcontains(TQRegExp(f->search , f->caseSensitive)) :
+ msg.plainBody().tqcontains(f->search , f->caseSensitive) )
{
if(f->setBG)
msg.setBg(f->BG);
@@ -80,7 +80,7 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg )
if(f->setImportance)
msg.setImportance((Kopete::Message::MessageImportance)f->importance);
if(f->playSound)
- KNotifyClient::userEvent (TQString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN );
+ KNotifyClient::userEvent (TQString(), KNotifyClient::Sound, KNotifyClient::Default, f->soundFN );
if (f->raiseView &&
msg.manager() && msg.manager()->view()) {
diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h
index f5b0f671..866e69d1 100644
--- a/kopete/plugins/highlight/highlightplugin.h
+++ b/kopete/plugins/highlight/highlightplugin.h
@@ -43,11 +43,12 @@ class Filter;
class HighlightPlugin : public Kopete::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
static HighlightPlugin *plugin();
- HighlightPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ HighlightPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
~HighlightPlugin();
public slots:
diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp
index 5e8da39c..128ed822 100644
--- a/kopete/plugins/highlight/highlightpreferences.cpp
+++ b/kopete/plugins/highlight/highlightpreferences.cpp
@@ -39,8 +39,8 @@
typedef KGenericFactory<HighlightPreferences> HighlightPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) )
-HighlightPreferences::HighlightPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
- : KCModule(HighlightPreferencesFactory::instance(), parent, args)
+HighlightPreferences::HighlightPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args)
+ : KCModule(HighlightPreferencesFactory::instance(), tqparent, args)
{
donttouch=true;
( new TQVBoxLayout( this ) )->setAutoAdd( true );
diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h
index ff51aa1f..8d7d8242 100644
--- a/kopete/plugins/highlight/highlightpreferences.h
+++ b/kopete/plugins/highlight/highlightpreferences.h
@@ -31,9 +31,10 @@ class TQListViewItem;
class HighlightPreferences : public KCModule {
Q_OBJECT
+ TQ_OBJECT
public:
- HighlightPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
+ HighlightPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~HighlightPreferences();
virtual void save();
diff --git a/kopete/plugins/highlight/highlightprefsbase.ui b/kopete/plugins/highlight/highlightprefsbase.ui
index b8150c56..2d853f0e 100644
--- a/kopete/plugins/highlight/highlightprefsbase.ui
+++ b/kopete/plugins/highlight/highlightprefsbase.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>HighlightPrefsUI</class>
<author>Olivier Goffart</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>HighlighPrefsUI</cstring>
</property>
@@ -20,7 +20,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -39,7 +39,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>m_add</cstring>
</property>
@@ -47,7 +47,7 @@
<string>Add</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>m_remove</cstring>
</property>
@@ -58,7 +58,7 @@
<string>Remove</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>m_rename</cstring>
</property>
@@ -95,7 +95,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -114,7 +114,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -127,7 +127,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>If the message contains:</string>
+ <string>If the message tqcontains:</string>
</property>
</widget>
<widget class="KLineEdit">
@@ -135,15 +135,15 @@
<cstring>m_search</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_regexp</cstring>
</property>
@@ -151,7 +151,7 @@
<string>Regular expression</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_editregexp</cstring>
</property>
@@ -177,7 +177,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -186,7 +186,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_case</cstring>
</property>
@@ -196,7 +196,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup2</cstring>
</property>
@@ -215,15 +215,15 @@
<property name="name">
<cstring>unnamed</cstring>
</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="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_setImportance</cstring>
</property>
@@ -277,7 +277,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>21</height>
@@ -286,15 +286,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_setBG</cstring>
</property>
@@ -328,7 +328,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>21</height>
@@ -337,15 +337,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_setFG</cstring>
</property>
@@ -379,7 +379,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>21</height>
@@ -388,15 +388,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_sound</cstring>
</property>
@@ -411,15 +411,15 @@
</widget>
</hbox>
</widget>
- <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="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_raise</cstring>
</property>
@@ -452,7 +452,7 @@
<tabstop>m_soundFN</tabstop>
<tabstop>m_raise</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>klineedit.h</includehint>