summaryrefslogtreecommitdiffstats
path: root/kopete/kopete
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/kopete
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/kopete')
-rw-r--r--kopete/kopete/addaccountwizard/addaccountwizard.cpp44
-rw-r--r--kopete/kopete/addaccountwizard/addaccountwizard.h10
-rw-r--r--kopete/kopete/addcontactwizard/addcontactwizard.cpp76
-rw-r--r--kopete/kopete/addcontactwizard/addcontactwizard.h20
-rw-r--r--kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp32
-rw-r--r--kopete/kopete/addcontactwizard/fastaddcontactwizard.h14
-rw-r--r--kopete/kopete/chatwindow/chatmemberslistwidget.cpp74
-rw-r--r--kopete/kopete/chatwindow/chatmemberslistwidget.h20
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.cpp366
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.h36
-rw-r--r--kopete/kopete/chatwindow/chattexteditpart.cpp114
-rw-r--r--kopete/kopete/chatwindow/chattexteditpart.h16
-rw-r--r--kopete/kopete/chatwindow/chatview.cpp252
-rw-r--r--kopete/kopete/chatwindow/chatview.h54
-rw-r--r--kopete/kopete/chatwindow/emoticonselector.cpp50
-rw-r--r--kopete/kopete/chatwindow/emoticonselector.h28
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.cpp294
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.h36
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstyle.cpp148
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstyle.h36
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp68
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstylemanager.h16
-rw-r--r--kopete/kopete/chatwindow/kopeteemailwindow.cpp156
-rw-r--r--kopete/kopete/chatwindow/kopeteemailwindow.h8
-rw-r--r--kopete/kopete/chatwindow/kopeteemoticonaction.cpp46
-rw-r--r--kopete/kopete/chatwindow/kopeteemoticonaction.h8
-rw-r--r--kopete/kopete/chatwindow/krichtexteditpart.cpp128
-rw-r--r--kopete/kopete/chatwindow/krichtexteditpart.h32
-rw-r--r--kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp34
-rw-r--r--kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp98
-rw-r--r--kopete/kopete/config/accounts/kopeteaccountconfig.cpp48
-rw-r--r--kopete/kopete/config/accounts/kopeteaccountconfig.h8
-rw-r--r--kopete/kopete/config/appearance/appearanceconfig.cpp290
-rw-r--r--kopete/kopete/config/appearance/appearanceconfig.h8
-rw-r--r--kopete/kopete/config/appearance/emoticonseditdialog.cpp102
-rw-r--r--kopete/kopete/config/appearance/emoticonseditdialog.h28
-rw-r--r--kopete/kopete/config/appearance/tooltipeditdialog.cpp72
-rw-r--r--kopete/kopete/config/appearance/tooltipeditdialog.h8
-rw-r--r--kopete/kopete/config/avdevice/avdeviceconfig.cpp52
-rw-r--r--kopete/kopete/config/avdevice/avdeviceconfig.h20
-rw-r--r--kopete/kopete/config/behavior/behaviorconfig.cpp166
-rw-r--r--kopete/kopete/config/behavior/behaviorconfig.h8
-rw-r--r--kopete/kopete/config/identity/globalidentitiesmanager.cpp72
-rw-r--r--kopete/kopete/config/identity/globalidentitiesmanager.h26
-rw-r--r--kopete/kopete/config/identity/kopeteidentityconfig.cpp130
-rw-r--r--kopete/kopete/config/identity/kopeteidentityconfig.h6
-rw-r--r--kopete/kopete/config/plugins/kopetepluginconfig.cpp16
-rw-r--r--kopete/kopete/config/plugins/kopetepluginconfig.h2
-rw-r--r--kopete/kopete/contactlist/customnotificationprops.cpp28
-rw-r--r--kopete/kopete/contactlist/customnotificationprops.h6
-rw-r--r--kopete/kopete/contactlist/kabcexport.cpp60
-rw-r--r--kopete/kopete/contactlist/kabcexport.h8
-rw-r--r--kopete/kopete/contactlist/kopeteaddrbookexport.cpp46
-rw-r--r--kopete/kopete/contactlist/kopeteaddrbookexport.h18
-rw-r--r--kopete/kopete/contactlist/kopetecontactlistview.cpp352
-rw-r--r--kopete/kopete/contactlist/kopetecontactlistview.h62
-rw-r--r--kopete/kopete/contactlist/kopetegrouplistaction.cpp18
-rw-r--r--kopete/kopete/contactlist/kopetegrouplistaction.h6
-rw-r--r--kopete/kopete/contactlist/kopetegroupviewitem.cpp36
-rw-r--r--kopete/kopete/contactlist/kopetegroupviewitem.h16
-rw-r--r--kopete/kopete/contactlist/kopetelviprops.cpp148
-rw-r--r--kopete/kopete/contactlist/kopetelviprops.h10
-rw-r--r--kopete/kopete/contactlist/kopetemetacontactlvi.cpp226
-rw-r--r--kopete/kopete/contactlist/kopetemetacontactlvi.h40
-rw-r--r--kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp6
-rw-r--r--kopete/kopete/contactlist/kopetestatusgroupviewitem.h4
-rw-r--r--kopete/kopete/kconf_update/kopete-account-kconf_update.cpp64
-rw-r--r--kopete/kopete/kconf_update/kopete-nameTracking.cpp74
-rw-r--r--kopete/kopete/kconf_update/kopete-pluginloader2.cpp30
-rw-r--r--kopete/kopete/kimiface.h48
-rw-r--r--kopete/kopete/kimifaceimpl.cpp120
-rw-r--r--kopete/kopete/kimifaceimpl.h50
-rw-r--r--kopete/kopete/kopeteaccountstatusbaricon.cpp20
-rw-r--r--kopete/kopete/kopeteaccountstatusbaricon.h14
-rw-r--r--kopete/kopete/kopeteapplication.cpp44
-rw-r--r--kopete/kopete/kopeteapplication.h6
-rw-r--r--kopete/kopete/kopeteballoon.cpp104
-rw-r--r--kopete/kopete/kopeteballoon.h14
-rw-r--r--kopete/kopete/kopeteeditglobalidentitywidget.cpp74
-rw-r--r--kopete/kopete/kopeteeditglobalidentitywidget.h14
-rw-r--r--kopete/kopete/kopeteiface.cpp78
-rw-r--r--kopete/kopete/kopeteiface.h50
-rw-r--r--kopete/kopete/kopetewindow.cpp304
-rw-r--r--kopete/kopete/kopetewindow.h54
-rw-r--r--kopete/kopete/systemtray.cpp92
-rw-r--r--kopete/kopete/systemtray.h32
86 files changed, 2876 insertions, 2876 deletions
diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.cpp b/kopete/kopete/addaccountwizard/addaccountwizard.cpp
index 5518c536..1c42acf2 100644
--- a/kopete/kopete/addaccountwizard/addaccountwizard.cpp
+++ b/kopete/kopete/addaccountwizard/addaccountwizard.cpp
@@ -18,8 +18,8 @@
#include "addaccountwizard.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -37,7 +37,7 @@
#include "kopeteprotocol.h"
#include "kopetepluginmanager.h"
-AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool modal, bool firstRun )
+AddAccountWizard::AddAccountWizard( TQWidget *parent, const char *name, bool modal, bool firstRun )
:
KWizard(parent, name, modal, WDestructiveClose),
m_accountPage(0),
@@ -58,10 +58,10 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda
setFinishEnabled(m_finish, true);
// add the available messanger services to the dialogs list
- QValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins("Protocols");
- for (QValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it)
+ TQValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins("Protocols");
+ for (TQValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it)
{
- QListViewItem *pluginItem = new QListViewItem(m_selectService->protocolListView);
+ TQListViewItem *pluginItem = new TQListViewItem(m_selectService->protocolListView);
pluginItem->setPixmap(0, SmallIcon((*it)->icon()));
pluginItem->setText(0, (*it)->name());
pluginItem->setText(1, (*it)->comment());
@@ -70,7 +70,7 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda
}
// focus the ListView and select the first item
- QListView &protocol_list = *m_selectService->protocolListView;
+ TQListView &protocol_list = *m_selectService->protocolListView;
protocol_list.setFocus();
if (protocol_list.childCount() > 0)
{
@@ -78,21 +78,21 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda
}
// hook up the user input
- connect(m_selectService->protocolListView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotProtocolListClicked(QListViewItem *)));
- connect(m_selectService->protocolListView, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT( slotProtocolListClicked(QListViewItem *)));
- connect(m_selectService->protocolListView, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(slotProtocolListDoubleClicked(QListViewItem *)));
+ connect(m_selectService->protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
+ connect(m_selectService->protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT( slotProtocolListClicked(TQListViewItem *)));
+ connect(m_selectService->protocolListView, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(slotProtocolListDoubleClicked(TQListViewItem *)));
}
-void AddAccountWizard::slotProtocolListClicked( QListViewItem * )
+void AddAccountWizard::slotProtocolListClicked( TQListViewItem * )
{
// Make sure a protocol is selected before allowing the user to continue
setNextEnabled(m_selectService, m_selectService->protocolListView->selectedItem() != 0);
}
-void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi )
+void AddAccountWizard::slotProtocolListDoubleClicked( TQListViewItem *lvi )
{
// proceed to the next wizard page if we double click a protocol
next();
@@ -100,7 +100,7 @@ void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi )
void AddAccountWizard::back()
{
- if (currentPage() == dynamic_cast<QWidget *>(m_accountPage))
+ if (currentPage() == dynamic_cast<TQWidget *>(m_accountPage))
{
// Deletes the accountPage, KWizard does not like deleting pages
// using different pointers, it only seems to watch its own pointer
@@ -122,7 +122,7 @@ void AddAccountWizard::next()
if ( currentPage() == m_selectService &&
( m_selectService->protocolListView->selectedItem() ) )
{
- QListViewItem *lvi = m_selectService->protocolListView->selectedItem();
+ TQListViewItem *lvi = m_selectService->protocolListView->selectedItem();
m_proto = dynamic_cast<Kopete::Protocol *>(Kopete::PluginManager::self()->loadPlugin(m_protocolItems[lvi]->pluginName()));
if (!m_proto)
@@ -142,10 +142,10 @@ void AddAccountWizard::next()
return;
}
- insertPage(dynamic_cast<QWidget *>(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish));
+ insertPage(dynamic_cast<TQWidget *>(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish));
KWizard::next();
}
- else if (currentPage() == dynamic_cast<QWidget *>(m_accountPage))
+ else if (currentPage() == dynamic_cast<TQWidget *>(m_accountPage))
{
// check the data of the page is valid
if (!m_accountPage->validateData())
@@ -153,7 +153,7 @@ void AddAccountWizard::next()
return;
}
- QColor col = Kopete::AccountManager::self()->guessColor(m_proto);
+ TQColor col = Kopete::AccountManager::self()->guessColor(m_proto);
m_finish->mColorButton->setColor(col);
m_finish->mUseColor->setChecked(col.isValid());
@@ -186,7 +186,7 @@ void AddAccountWizard::accept()
}
// Make sure the protocol is correctly enabled. This is not really needed, but still good
- const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower();
+ const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower();
Kopete::PluginManager::self()->setPluginEnabled(PROTO_NAME , true);
// setup the custom colour
@@ -209,7 +209,7 @@ void AddAccountWizard::reject()
// if we have a protocol plugin loaded and its not being used, unload it
if (m_proto && Kopete::AccountManager::self()->accounts(m_proto).isEmpty())
{
- const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower();
+ const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower();
Kopete::PluginManager::self()->unloadPlugin(PROTO_NAME);
}
diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.h b/kopete/kopete/addaccountwizard/addaccountwizard.h
index f4d204ec..3f8cccbf 100644
--- a/kopete/kopete/addaccountwizard/addaccountwizard.h
+++ b/kopete/kopete/addaccountwizard/addaccountwizard.h
@@ -19,7 +19,7 @@
#ifndef ADDACCOUNTWIZARD_H
#define ADDACCOUNTWIZARD_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kwizard.h>
@@ -44,11 +44,11 @@ class AddAccountWizard : public KWizard
Q_OBJECT
public:
- AddAccountWizard( QWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false );
+ AddAccountWizard( TQWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false );
private slots:
- void slotProtocolListClicked( QListViewItem *item );
- void slotProtocolListDoubleClicked( QListViewItem *lvi );
+ void slotProtocolListClicked( TQListViewItem *item );
+ void slotProtocolListDoubleClicked( TQListViewItem *lvi );
protected slots:
virtual void back();
@@ -57,7 +57,7 @@ protected slots:
virtual void reject();
private:
- QMap<QListViewItem *, KPluginInfo *> m_protocolItems;
+ TQMap<TQListViewItem *, KPluginInfo *> m_protocolItems;
KopeteEditAccountWidget *m_accountPage;
AddAccountWizardPage1 *m_selectService;
AddAccountWizardPage2 *m_finish;
diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.cpp b/kopete/kopete/addcontactwizard/addcontactwizard.cpp
index 9b1ca28e..7198d53c 100644
--- a/kopete/kopete/addcontactwizard/addcontactwizard.cpp
+++ b/kopete/kopete/addcontactwizard/addcontactwizard.cpp
@@ -42,9 +42,9 @@
// Finish
// true
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <klocale.h>
@@ -71,10 +71,10 @@
#include "kopeteaccount.h"
#include "kopetegroup.h"
-AddContactWizard::AddContactWizard( QWidget *parent, const char *name )
+AddContactWizard::AddContactWizard( TQWidget *parent, const char *name )
: AddContactWizard_Base( parent, name )
{
- //QVBox *kabcPageVbox = new QVBox(this->page(1));
+ //TQVBox *kabcPageVbox = new TQVBox(this->page(1));
m_addressbookSelectorWidget = new Kopete::UI::AddressBookSelectorWidget(this->page(1));
selectAddresseeLayout->addWidget(m_addressbookSelectorWidget);
@@ -82,21 +82,21 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name )
Kopete::GroupList groups=Kopete::ContactList::self()->groups();
for( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
- QString groupname = it->displayName();
+ TQString groupname = it->displayName();
if ( !groupname.isEmpty() )
- m_groupItems.insert(new QCheckListItem( groupList, groupname, QCheckListItem::CheckBox) , it ) ;
+ m_groupItems.insert(new TQCheckListItem( groupList, groupname, TQCheckListItem::CheckBox) , it ) ;
}
protocolListView->clear();
m_accountItems.clear();
// Populate the accounts list
- QCheckListItem* accountLVI = 0;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQCheckListItem* accountLVI = 0;
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() )
{
- accountLVI= new QCheckListItem( protocolListView, i->accountLabel(), QCheckListItem::CheckBox);
- accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") );
+ accountLVI= new TQCheckListItem( protocolListView, i->accountLabel(), TQCheckListItem::CheckBox);
+ accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") );
//FIXME - I'm not sure the column 1 is a right place for the colored icon -Olivier
accountLVI->setPixmap( 1, i->accountIcon() );
m_accountItems.insert(accountLVI,i);
@@ -115,17 +115,17 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name )
setFinishEnabled( finis, true );
// Addressee validation connections
- connect( chkAddressee, SIGNAL( toggled( bool ) ),
- SLOT( slotCheckAddresseeChoice( bool ) ) );
- connect( m_addressbookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotAddresseeListClicked( QListViewItem * )) );
+ connect( chkAddressee, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotCheckAddresseeChoice( bool ) ) );
+ connect( m_addressbookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotAddresseeListClicked( TQListViewItem * )) );
// Group manipulation connection
- connect( addGroupButton, SIGNAL(clicked()) , SLOT(slotAddGroupClicked()) );
+ connect( addGroupButton, TQT_SIGNAL(clicked()) , TQT_SLOT(slotAddGroupClicked()) );
// Account choice validation connections
- connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
- connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
- connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
// read sticky settings
KConfig *config = kapp->config();
@@ -147,7 +147,7 @@ void AddContactWizard::slotCheckAddresseeChoice( bool on )
setAppropriate( selectAddressee, on );
}
-void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ )
+void AddContactWizard::slotAddresseeListClicked( TQListViewItem */*addressee*/ )
{
// enable next if a valid addressee is selected
bool selected = m_addressbookSelectorWidget->addresseeSelected();
@@ -159,22 +159,22 @@ void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ )
void AddContactWizard::slotAddGroupClicked()
{
- QString groupName = KInputDialog::getText(
+ TQString groupName = KInputDialog::getText(
i18n( "New Group" ),
i18n( "Please enter the name for the new group:" )
);
if ( !groupName.isNull() )
- ( new QCheckListItem( groupList, groupName, QCheckListItem::CheckBox ) )->setOn( true );
+ ( new TQCheckListItem( groupList, groupName, TQCheckListItem::CheckBox ) )->setOn( true );
}
-void AddContactWizard::slotProtocolListClicked( QListViewItem *)
+void AddContactWizard::slotProtocolListClicked( TQListViewItem *)
{
// Just makes sure a protocol is selected before allowing the user to continue
bool oneIsChecked = false;
- for (QListViewItemIterator it(protocolListView); it.current(); ++it)
+ for (TQListViewItemIterator it(protocolListView); it.current(); ++it)
{
- QCheckListItem *check = dynamic_cast<QCheckListItem *>(it.current());
+ TQCheckListItem *check = dynamic_cast<TQCheckListItem *>(it.current());
if (check && check->isOn())
{
oneIsChecked = true;
@@ -197,9 +197,9 @@ void AddContactWizard::accept()
// set the metacontact's groups
bool topLevel = true;
- for ( QListViewItemIterator it( groupList ); it.current(); ++it )
+ for ( TQListViewItemIterator it( groupList ); it.current(); ++it )
{
- QCheckListItem *check = dynamic_cast<QCheckListItem *>( it.current() );
+ TQCheckListItem *check = dynamic_cast<TQCheckListItem *>( it.current() );
if ( check && check->isOn() )
{
if(m_groupItems.contains(check))
@@ -215,7 +215,7 @@ void AddContactWizard::accept()
bool ok = protocolPages.isEmpty();
// get each protocol's contact
- QMap <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::Iterator it;
for ( it = protocolPages.begin(); it != protocolPages.end(); ++it )
ok = ok || it.data()->apply( it.key(), metaContact );
@@ -246,7 +246,7 @@ void AddContactWizard::accept()
void AddContactWizard::reject()
{
- QWizard::reject();
+ TQWizard::reject();
}
void AddContactWizard::next()
@@ -257,11 +257,11 @@ void AddContactWizard::next()
if (currentPage() == selectService ||
(currentPage() == intro && !appropriate( selectService )))
{
- QStringList usedAccounts;
+ TQStringList usedAccounts;
// We don't keep track of this pointer because it gets deleted when the wizard does (which is what we want)
- for (QListViewItemIterator it(protocolListView); it.current(); ++it)
+ for (TQListViewItemIterator it(protocolListView); it.current(); ++it)
{
- QCheckListItem *item = dynamic_cast<QCheckListItem *>(it.current());
+ TQCheckListItem *item = dynamic_cast<TQCheckListItem *>(it.current());
if (item && item->isOn())
{
Kopete::Account *i=m_accountItems[item];
@@ -278,8 +278,8 @@ void AddContactWizard::next()
if (!addPage)
continue;
- connect(addPage, SIGNAL(dataValid( AddContactPage *, bool )),
- this, SLOT( slotDataValid( AddContactPage *, bool )));
+ connect(addPage, TQT_SIGNAL(dataValid( AddContactPage *, bool )),
+ this, TQT_SLOT( slotDataValid( AddContactPage *, bool )));
addPage->show();
insertPage( addPage, i18n( "The user has to select the contact to add to the given account name",
@@ -289,7 +289,7 @@ void AddContactWizard::next()
}
//remove pages that were eventualy added previusely, and needs to be removed if the user pressed back.
- QMap <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::Iterator it;
for ( it = protocolPages.begin(); it != protocolPages.end(); ++it )
{
Kopete::Account *i=it.key();
@@ -299,7 +299,7 @@ void AddContactWizard::next()
protocolPages.remove(it);
}
}
- QWizard::next();
+ TQWizard::next();
return;
}
@@ -316,15 +316,15 @@ void AddContactWizard::next()
return;
}
- QWizard::next();
+ TQWizard::next();
}
-void AddContactWizard::showPage( QWidget *page )
+void AddContactWizard::showPage( TQWidget *page )
{
if ( page == intro )
setNextEnabled( page, true); // make sure the first page's Next is always enabled
- QWizard::showPage( page );
+ TQWizard::showPage( page );
if ( page == finis )
finishButton()->setFocus();
diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.h b/kopete/kopete/addcontactwizard/addcontactwizard.h
index 427bb1e3..646353a3 100644
--- a/kopete/kopete/addcontactwizard/addcontactwizard.h
+++ b/kopete/kopete/addcontactwizard/addcontactwizard.h
@@ -20,9 +20,9 @@
#ifndef ADDCONTACTWIZARD_H
#define ADDCONTACTWIZARD_H
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <kabc/addressbook.h>
@@ -52,30 +52,30 @@ class AddContactWizard : public AddContactWizard_Base
Q_OBJECT
public:
- AddContactWizard( QWidget *parent = 0, const char *name = 0 );
+ AddContactWizard( TQWidget *parent = 0, const char *name = 0 );
~AddContactWizard();
- virtual void showPage( QWidget *page );
+ virtual void showPage( TQWidget *page );
private:
//Kopete::Protocol *currentProtocol;
//AddContactPage *currentDataWidget;
- QMap <Kopete::Account*,AddContactPage*> protocolPages;
- QMap <QCheckListItem*,Kopete::Account*> m_accountItems;
- QMap <QCheckListItem*,Kopete::Group*> m_groupItems;
+ TQMap <Kopete::Account*,AddContactPage*> protocolPages;
+ TQMap <TQCheckListItem*,Kopete::Account*> m_accountItems;
+ TQMap <TQCheckListItem*,Kopete::Group*> m_groupItems;
Kopete::UI::AddressBookSelectorWidget *m_addressbookSelectorWidget;
public slots:
virtual void accept();
virtual void reject();
- void slotProtocolListClicked( QListViewItem * );
+ void slotProtocolListClicked( TQListViewItem * );
void slotAddGroupClicked();
protected slots:
virtual void next();
void slotCheckAddresseeChoice( bool on );
- void slotAddresseeListClicked( QListViewItem *addressee );
+ void slotAddresseeListClicked( TQListViewItem *addressee );
void slotDataValid( AddContactPage *onPage, bool bOn);
};
diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp
index 43c499d6..48e1b159 100644
--- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp
+++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp
@@ -17,7 +17,7 @@
* *
*************************************************************************
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <addcontactpage.h>
#include <kiconloader.h>
@@ -30,18 +30,18 @@
#include "fastaddcontactwizard.h"
-FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name )
+FastAddContactWizard::FastAddContactWizard( TQWidget *parent, const char *name )
: FastAddContactWizard_Base( parent, name )
{
m_accountItems.clear();
// Populate the accounts list
- QListViewItem* accountLVI = 0L;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQListViewItem* accountLVI = 0L;
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() )
{
- accountLVI= new QListViewItem( protocolListView, i->accountLabel() );
- accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") );
+ accountLVI= new TQListViewItem( protocolListView, i->accountLabel() );
+ accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") );
accountLVI->setPixmap( 1, SmallIcon( i->protocol()->pluginIcon() ) );
m_accountItems.insert(accountLVI,i);
}
@@ -50,9 +50,9 @@ FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name )
protocolListView->setCurrentItem( accountLVI );
// Account choice validation connections
- connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
- connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
- connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
+ connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *)));
setNextEnabled( selectService, false );
setFinishEnabled(finis, true);
@@ -62,7 +62,7 @@ FastAddContactWizard::~FastAddContactWizard()
{
}
-void FastAddContactWizard::slotProtocolListClicked( QListViewItem *account)
+void FastAddContactWizard::slotProtocolListClicked( TQListViewItem *account)
{
setNextEnabled( selectService, account? account->isSelected() : false );
}
@@ -74,25 +74,25 @@ void FastAddContactWizard::next()
// the chosen protocol
if ( currentPage() == selectService )
{
- QMap <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::Iterator it;
for ( it = protocolPages.begin(); it != protocolPages.end(); ++it )
{
delete it.data();
}
protocolPages.clear();
- QListViewItem* item = protocolListView->selectedItem();
+ TQListViewItem* item = protocolListView->selectedItem();
AddContactPage *addPage = m_accountItems[item]->protocol()->createAddContactWidget(this, m_accountItems[item] );
if (addPage)
{
- QString title = i18n( "The account name is prepended here",
+ TQString title = i18n( "The account name is prepended here",
"%1 contact information" )
.arg( item->text(0) );
addPage->show();
insertPage( addPage, title, indexOf( finis ) );
protocolPages.insert( m_accountItems[item] , addPage );
}
- QWizard::next();
+ TQWizard::next();
return;
}
@@ -105,7 +105,7 @@ void FastAddContactWizard::next()
return;
}
- QWizard::next();
+ TQWizard::next();
}
void FastAddContactWizard::accept()
@@ -117,7 +117,7 @@ void FastAddContactWizard::accept()
bool ok = protocolPages.isEmpty();
// get each protocol's contact
- QMap <Kopete::Account*,AddContactPage*>::Iterator it;
+ TQMap <Kopete::Account*,AddContactPage*>::Iterator it;
for ( it = protocolPages.begin(); it != protocolPages.end(); ++it )
ok |= it.data()->apply( it.key(), metaContact );
diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h
index ac8db23d..496a282f 100644
--- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h
+++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h
@@ -23,9 +23,9 @@
#include <kdebug.h>
#include <klistview.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <klistview.h>
@@ -49,14 +49,14 @@ class FastAddContactWizard : public FastAddContactWizard_Base
{
Q_OBJECT
public:
- FastAddContactWizard( QWidget *parent = 0, const char *name = 0 );
+ FastAddContactWizard( TQWidget *parent = 0, const char *name = 0 );
~FastAddContactWizard();
private:
- QMap <Kopete::Account*,AddContactPage*> protocolPages;
- QMap <QListViewItem*,Kopete::Account*> m_accountItems;
+ TQMap <Kopete::Account*,AddContactPage*> protocolPages;
+ TQMap <TQListViewItem*,Kopete::Account*> m_accountItems;
public slots:
virtual void accept();
- void slotProtocolListClicked( QListViewItem * );
+ void slotProtocolListClicked( TQListViewItem * );
protected slots:
virtual void next();
};
diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp
index 16e37991..b215bb66 100644
--- a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp
+++ b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp
@@ -32,8 +32,8 @@
#include <kmultipledrag.h>
#include <kpopupmenu.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
//BEGIN ChatMembersListWidget::ToolTip
@@ -41,7 +41,7 @@ class ChatMembersListWidget::ToolTip : public QToolTip
{
public:
ToolTip( KListView *parent )
- : QToolTip( parent->viewport() ), m_listView ( parent )
+ : TQToolTip( parent->viewport() ), m_listView ( parent )
{
}
@@ -50,11 +50,11 @@ public:
remove( m_listView->viewport() );
}
- void maybeTip( const QPoint &pos )
+ void maybeTip( const TQPoint &pos )
{
- if( QListViewItem *item = m_listView->itemAt( pos ) )
+ if( TQListViewItem *item = m_listView->itemAt( pos ) )
{
- QRect itemRect = m_listView->itemRect( item );
+ TQRect itemRect = m_listView->itemRect( item );
if( itemRect.contains( pos ) )
tip( itemRect, static_cast<ContactItem*>( item )->contact()->toolTip() );
}
@@ -72,21 +72,21 @@ private:
ChatMembersListWidget::ContactItem::ContactItem( ChatMembersListWidget *parent, Kopete::Contact *contact )
: KListViewItem( parent ), m_contact( contact )
{
- QString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString();
+ TQString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString();
if ( nick.isEmpty() )
nick = m_contact->contactId();
setText( 0, nick );
setDragEnabled(true);
- connect( m_contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ;
+ connect( m_contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ;
setStatus( parent->session()->contactOnlineStatus(m_contact) );
reposition();
}
void ChatMembersListWidget::ContactItem::slotPropertyChanged( Kopete::Contact*,
- const QString &key, const QVariant&, const QVariant &newValue )
+ const TQString &key, const TQVariant&, const TQVariant &newValue )
{
if ( key == Kopete::Global::Properties::self()->nickName().key() )
{
@@ -109,9 +109,9 @@ void ChatMembersListWidget::ContactItem::reposition()
// In particular, this makes adding N items O(N^2) not O(N^2 log N).
Kopete::ChatSession *session = static_cast<ChatMembersListWidget*>( listView() )->session();
int ourWeight = session->contactOnlineStatus(m_contact).weight();
- QListViewItem *after = 0;
+ TQListViewItem *after = 0;
- for ( QListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() )
+ for ( TQListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() )
{
ChatMembersListWidget::ContactItem *item = static_cast<ChatMembersListWidget::ContactItem*>(it);
int theirWeight = session->contactOnlineStatus(item->m_contact).weight();
@@ -133,7 +133,7 @@ void ChatMembersListWidget::ContactItem::reposition()
//BEGIN ChatMembersListWidget
-ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name )
+ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name )
: KListView( parent, name ), m_session( session )
{
// use our own custom tooltips
@@ -142,7 +142,7 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid
// set up display: no header
setAllColumnsShowFocus( true );
- addColumn( QString::null, -1 );
+ addColumn( TQString::null, -1 );
header()->setStretchEnabled( true, 0 );
header()->hide();
@@ -151,32 +151,32 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid
// add chat members
slotContactAdded( session->myself() );
- for ( QPtrListIterator<Kopete::Contact> it( session->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> it( session->members() ); it.current(); ++it )
slotContactAdded( *it );
- connect( this, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &) ),
- SLOT( slotContextMenu(KListView*, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( executed( QListViewItem* ) ),
- SLOT( slotExecute( QListViewItem * ) ) );
-
- connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
- this, SLOT( slotContactAdded(const Kopete::Contact*) ) );
- connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ),
- this, SLOT( slotContactRemoved(const Kopete::Contact*) ) );
- connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
- this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) );
+ connect( this, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &) ),
+ TQT_SLOT( slotContextMenu(KListView*, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ TQT_SLOT( slotExecute( TQListViewItem * ) ) );
+
+ connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
+ this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) );
+ connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ),
+ this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) );
+ connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
+ this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) );
}
ChatMembersListWidget::~ChatMembersListWidget()
{
}
-void ChatMembersListWidget::slotContextMenu( KListView*, QListViewItem *item, const QPoint &point )
+void ChatMembersListWidget::slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point )
{
if ( ContactItem *contactItem = dynamic_cast<ContactItem*>(item) )
{
KPopupMenu *p = contactItem->contact()->popupMenu( session() );
- connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) );
+ connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) );
p->popup( point );
}
}
@@ -203,7 +203,7 @@ void ChatMembersListWidget::slotContactStatusChanged( Kopete::Contact *contact,
m_members[contact]->setStatus( status );
}
-void ChatMembersListWidget::slotExecute( QListViewItem *item )
+void ChatMembersListWidget::slotExecute( TQListViewItem *item )
{
if ( ContactItem *contactItem = dynamic_cast<ContactItem*>(item ) )
{
@@ -216,9 +216,9 @@ void ChatMembersListWidget::slotExecute( QListViewItem *item )
}
}
-QDragObject *ChatMembersListWidget::dragObject()
+TQDragObject *ChatMembersListWidget::dragObject()
{
- QListViewItem *currentLVI = currentItem();
+ TQListViewItem *currentLVI = currentItem();
if( !currentLVI )
return 0L;
@@ -228,22 +228,22 @@ QDragObject *ChatMembersListWidget::dragObject()
Kopete::Contact *c = lvi->contact();
KMultipleDrag *drag = new KMultipleDrag( this );
- drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) );
+ drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) );
- QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L );
- d->setEncodedData( QString( c->protocol()->pluginId()+QChar( 0xE000 )+c->account()->accountId()+QChar( 0xE000 )+ c->contactId() ).utf8() );
+ TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L );
+ d->setEncodedData( TQString( c->protocol()->pluginId()+TQChar( 0xE000 )+c->account()->accountId()+TQChar( 0xE000 )+ c->contactId() ).utf8() );
drag->addDragObject( d );
KABC::Addressee address = KABC::StdAddressBook::self()->findByUid(c->metaContact()->metaContactId());
if( !address.isEmpty() )
{
- drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) );
+ drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) );
KABC::VCardConverter converter;
- QString vcard = converter.createVCard( address );
+ TQString vcard = converter.createVCard( address );
if( !vcard.isNull() )
{
- QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L );
+ TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L );
vcardDrag->setEncodedData( vcard.utf8() );
drag->addDragObject( vcardDrag );
}
diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.h b/kopete/kopete/chatwindow/chatmemberslistwidget.h
index 71084554..c8af44a4 100644
--- a/kopete/kopete/chatwindow/chatmemberslistwidget.h
+++ b/kopete/kopete/chatwindow/chatmemberslistwidget.h
@@ -20,7 +20,7 @@
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
namespace Kopete
{
@@ -36,7 +36,7 @@ class ChatMembersListWidget : public KListView
{
Q_OBJECT
public:
- ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 );
+ ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 );
virtual ~ChatMembersListWidget();
Kopete::ChatSession *session() { return m_session; }
@@ -49,18 +49,18 @@ protected:
/**
* Start a drag operation
* @return a KMultipleDrag containing:
- * 1) A QStoredDrag of type "application/x-qlistviewitem",
+ * 1) A TQStoredDrag of type "application/x-qlistviewitem",
* 2) If the contact is associated with a KABC entry,
- * i) a QTextDrag containing their email address, and
+ * i) a TQTextDrag containing their email address, and
* ii) their vCard representation.
*/
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
private slots:
/**
* Show the context menu for @p item at @p point
*/
- void slotContextMenu( KListView*, QListViewItem *item, const QPoint &point );
+ void slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point );
/**
* Called when a contact is added to the chat session.
@@ -87,15 +87,15 @@ private slots:
* Called when a contact is clicked.
* @param item The list view item representing the clicked contact
*/
- void slotExecute( QListViewItem *contact );
+ void slotExecute( TQListViewItem *contact );
private:
Kopete::ChatSession *m_session;
- QMap<const Kopete::Contact*, ContactItem*> m_members;
+ TQMap<const Kopete::Contact*, ContactItem*> m_members;
ToolTip *m_toolTip;
};
-class ChatMembersListWidget::ContactItem : public QObject, public KListViewItem
+class ChatMembersListWidget::ContactItem : public TQObject, public KListViewItem
{
Q_OBJECT
public:
@@ -103,7 +103,7 @@ public:
Kopete::Contact *contact() const { return m_contact; }
private slots:
- void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue );
+ void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue );
private:
friend class ChatMembersListWidget;
diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp
index 3cf70b8a..379ead44 100644
--- a/kopete/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/kopete/chatwindow/chatmessagepart.cpp
@@ -26,15 +26,15 @@
#include <ctime>
// Qt includes
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qrect.h>
-#include <qcursor.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqrect.h>
+#include <tqcursor.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
// KHTML::DOM includes
#include <dom/dom_doc.h>
@@ -43,7 +43,7 @@
#include <dom/html_base.h>
#include <dom/html_document.h>
#include <dom/html_inline.h>
-#include <qurloperator.h>
+#include <tqurloperator.h>
// KDE includes
@@ -155,32 +155,32 @@ public:
Kopete::Message::MessageType latestType;
// Yep I know it will take memory, but I don't have choice
// to enable on-the-fly style changing.
- QValueList<Kopete::Message> allMessages;
+ TQValueList<Kopete::Message> allMessages;
};
class ChatMessagePart::ToolTip : public QToolTip
{
public:
- ToolTip( ChatMessagePart *c ) : QToolTip( c->view()->viewport() )
+ ToolTip( ChatMessagePart *c ) : TQToolTip( c->view()->viewport() )
{
m_chat = c;
}
- void maybeTip( const QPoint &/*p*/ )
+ void maybeTip( const TQPoint &/*p*/ )
{
// FIXME: it's wrong to look for the node under the mouse - this makes too many
// assumptions about how tooltips work. but there is no nodeAtPoint.
DOM::Node node = m_chat->nodeUnderMouse();
Kopete::Contact *contact = m_chat->contactFromNode( node );
- QString toolTipText;
+ TQString toolTipText;
if(node.isNull())
return;
// this tooltip is attached to the viewport widget, so translate the node's rect
// into its coordinates.
- QRect rect = node.getRect();
- rect = QRect( m_chat->view()->contentsToViewport( rect.topLeft() ),
+ TQRect rect = node.getRect();
+ rect = TQRect( m_chat->view()->contentsToViewport( rect.topLeft() ),
m_chat->view()->contentsToViewport( rect.bottomRight() ) );
if( contact )
@@ -213,7 +213,7 @@ private:
ChatMessagePart *m_chat;
};
-ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, const char *name)
+ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name)
: KHTMLPart( parent, name ), d( new Private )
{
d->manager = mgr;
@@ -231,40 +231,40 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, con
// Write the template to KHTMLPart
writeTemplate();
- view()->setFocusPolicy( QWidget::NoFocus );
+ view()->setFocusPolicy( TQWidget::NoFocus );
d->tt=new ToolTip( this );
// It is not possible to drag and drop on our widget
view()->setAcceptDrops(false);
- connect( KopetePrefs::prefs(), SIGNAL(messageAppearanceChanged()),
- this, SLOT( slotAppearanceChanged() ) );
- connect( KopetePrefs::prefs(), SIGNAL(windowAppearanceChanged()),
- this, SLOT( slotRefreshView() ) );
- connect( KopetePrefs::prefs(), SIGNAL(styleChanged(const QString &)),
- this, SLOT( setStyle(const QString &) ) );
- connect( KopetePrefs::prefs(), SIGNAL(styleVariantChanged(const QString &)),
- this, SLOT( setStyleVariant(const QString &) ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL(messageAppearanceChanged()),
+ this, TQT_SLOT( slotAppearanceChanged() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL(windowAppearanceChanged()),
+ this, TQT_SLOT( slotRefreshView() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL(styleChanged(const TQString &)),
+ this, TQT_SLOT( setStyle(const TQString &) ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL(styleVariantChanged(const TQString &)),
+ this, TQT_SLOT( setStyleVariant(const TQString &) ) );
// Refresh the style if the display name change.
- connect( d->manager, SIGNAL(displayNameChanged()), this, SLOT(slotUpdateHeaderDisplayName()) );
- connect( d->manager, SIGNAL(photoChanged()), this, SLOT(slotUpdateHeaderPhoto()) );
+ connect( d->manager, TQT_SIGNAL(displayNameChanged()), this, TQT_SLOT(slotUpdateHeaderDisplayName()) );
+ connect( d->manager, TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotUpdateHeaderPhoto()) );
- connect ( browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect ( browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
- connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)),
- this, SLOT(slotRightClick(const QString &, const QPoint &)) );
- connect( view(), SIGNAL(contentsMoving(int,int)),
- this, SLOT(slotScrollingTo(int,int)) );
+ connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),
+ this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &)) );
+ connect( view(), TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(slotScrollingTo(int,int)) );
//initActions
- d->copyAction = KStdAction::copy( this, SLOT(copy()), actionCollection() );
- d->saveAction = KStdAction::saveAs( this, SLOT(save()), actionCollection() );
- d->printAction = KStdAction::print( this, SLOT(print()),actionCollection() );
- d->closeAction = KStdAction::close( this, SLOT(slotCloseView()),actionCollection() );
- d->importEmoticon = new KAction( i18n( "Import Emoticon"), QString::fromLatin1( "importemot" ), 0, this, SLOT( slotImportEmoticon() ), actionCollection() );
- d->copyURLAction = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), actionCollection() );
+ d->copyAction = KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() );
+ d->saveAction = KStdAction::saveAs( this, TQT_SLOT(save()), actionCollection() );
+ d->printAction = KStdAction::print( this, TQT_SLOT(print()),actionCollection() );
+ d->closeAction = KStdAction::close( this, TQT_SLOT(slotCloseView()),actionCollection() );
+ d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::fromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() );
+ d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() );
// read formatting override flags
readOverrides();
@@ -288,38 +288,38 @@ void ChatMessagePart::slotScrollingTo( int /*x*/, int y )
void ChatMessagePart::slotImportEmoticon()
{
- QString emoticonString = KInputDialog::getText( i18n("Import Emoticon"),
+ TQString emoticonString = KInputDialog::getText( i18n("Import Emoticon"),
i18n("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").arg( d->activeElement.getAttribute("src").string() ) );
if (emoticonString.isNull() )
return;
- QString emo = d->activeElement.getAttribute("src").string();
- QString themeName = KopetePrefs::prefs()->iconTheme();
+ TQString emo = d->activeElement.getAttribute("src").string();
+ TQString themeName = KopetePrefs::prefs()->iconTheme();
KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false ));
- QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
+ TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
- QDomDocument themeXml;
+ TQDomDocument themeXml;
if(!fp->exists() || !fp->open( IO_ReadOnly ) || !themeXml.setContent(fp))
return;
fp->close();
- QDomNode lc = themeXml.lastChild();
+ TQDomNode lc = themeXml.lastChild();
if(lc.isNull())
return;
- QDomElement emoticon = themeXml.createElement("emoticon");
- emoticon.setAttribute("file", QFileInfo(emo).baseName());
+ TQDomElement emoticon = themeXml.createElement("emoticon");
+ emoticon.setAttribute("file", TQFileInfo(emo).baseName());
lc.appendChild(emoticon);
- QStringList splitted = QStringList::split(" ", emoticonString);
- QStringList::const_iterator constIterator;
+ TQStringList splitted = TQStringList::split(" ", emoticonString);
+ TQStringList::const_iterator constIterator;
for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++)
{
- QDomElement emotext = themeXml.createElement("string");
- QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace());
+ TQDomElement emotext = themeXml.createElement("string");
+ TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace());
emotext.appendChild(txt);
emoticon.appendChild(emotext);
}
@@ -327,32 +327,32 @@ void ChatMessagePart::slotImportEmoticon()
if(!fp->open( IO_WriteOnly ))
return;
- QTextStream emoStream(fp);
+ TQTextStream emoStream(fp);
emoStream << themeXml.toString(4);
fp->close();
- QTimer::singleShot( 1500, Kopete::Emoticons::self(), SLOT( reload() ) );
+ TQTimer::singleShot( 1500, Kopete::Emoticons::self(), TQT_SLOT( reload() ) );
}
void ChatMessagePart::save()
{
- KFileDialog dlg( QString::null, QString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false );
+ KFileDialog dlg( TQString::null, TQString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false );
dlg.setCaption( i18n( "Save Conversation" ) );
dlg.setOperationMode( KFileDialog::Saving );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
KURL saveURL = dlg.selectedURL();
KTempFile tempFile;
tempFile.setAutoDelete( true );
- QFile* file = tempFile.file();
+ TQFile* file = tempFile.file();
- QTextStream stream ( file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream ( file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
- if ( dlg.currentFilter() == QString::fromLatin1( "text/plain" ) )
+ if ( dlg.currentFilter() == TQString::fromLatin1( "text/plain" ) )
{
- QValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
+ TQValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
for(it = d->allMessages.constBegin(); it != itEnd; ++it)
{
Kopete::Message tempMessage = *it;
@@ -392,7 +392,7 @@ void ChatMessagePart::pageDown()
void ChatMessagePart::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/)
{
kdDebug(14000) << k_funcinfo << "url=" << url.url() << endl;
- if ( url.protocol() == QString::fromLatin1("kopetemessage") )
+ if ( url.protocol() == TQString::fromLatin1("kopetemessage") )
{
Kopete::Contact *contact = d->manager->account()->contacts()[ url.host() ];
if ( contact )
@@ -413,14 +413,14 @@ void ChatMessagePart::readOverrides()
d->rtfOverride = KopetePrefs::prefs()->rtfOverride();
}
-void ChatMessagePart::setStyle( const QString &stylePath )
+void ChatMessagePart::setStyle( const TQString &stylePath )
{
// Create a new ChatWindowStyle
d->currentChatStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath);
// Do the actual style switch
// Wait for the event loop before switching the style
- QTimer::singleShot( 0, this, SLOT(changeStyle()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) );
}
void ChatMessagePart::setStyle( ChatWindowStyle *style )
@@ -430,14 +430,14 @@ void ChatMessagePart::setStyle( ChatWindowStyle *style )
// Do the actual style switch
// Wait for the event loop before switching the style
- QTimer::singleShot( 0, this, SLOT(changeStyle()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) );
}
-void ChatMessagePart::setStyleVariant( const QString &variantPath )
+void ChatMessagePart::setStyleVariant( const TQString &variantPath )
{
- DOM::HTMLElement variantNode = document().getElementById( QString::fromUtf8("mainStyle") );
+ DOM::HTMLElement variantNode = document().getElementById( TQString::fromUtf8("mainStyle") );
if( !variantNode.isNull() )
- variantNode.setInnerText( QString("@import url(\"%1\");").arg(variantPath) );
+ variantNode.setInnerText( TQString("@import url(\"%1\");").arg(variantPath) );
}
void ChatMessagePart::slotAppearanceChanged()
@@ -459,10 +459,10 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring )
message.setBody( message.parsedBody() , Kopete::Message::ParsedHTML );
#ifdef STYLE_TIMETEST
- QTime beforeMessage = QTime::currentTime();
+ TQTime beforeMessage = TQTime::currentTime();
#endif
- QString formattedMessageHtml;
+ TQString formattedMessageHtml;
bool isConsecutiveMessage = false;
uint bufferLen = (uint)KopetePrefs::prefs()->chatViewBufferSize();
@@ -549,11 +549,11 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring )
// newMessageNode is common to both code path
// FIXME: Find a better than to create a dummy span.
- DOM::HTMLElement newMessageNode = document().createElement( QString::fromUtf8("span") );
+ DOM::HTMLElement newMessageNode = document().createElement( TQString::fromUtf8("span") );
newMessageNode.setInnerHTML( formattedMessageHtml );
// Find the insert Node
- DOM::HTMLElement insertNode = document().getElementById( QString::fromUtf8("insert") );
+ DOM::HTMLElement insertNode = document().getElementById( TQString::fromUtf8("insert") );
if( isConsecutiveMessage && !insertNode.isNull() )
{
@@ -593,16 +593,16 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring )
}
if ( !d->scrollPressed )
- QTimer::singleShot( 1, this, SLOT( slotScrollView() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) );
#ifdef STYLE_TIMETEST
- kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( QTime::currentTime()) << endl;
+ kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( TQTime::currentTime()) << endl;
#endif
}
void ChatMessagePart::slotRefreshView()
{
- DOM::HTMLElement kopeteNode = document().getElementById( QString::fromUtf8("KopeteStyle") );
+ DOM::HTMLElement kopeteNode = document().getElementById( TQString::fromUtf8("KopeteStyle") );
if( !kopeteNode.isNull() )
kopeteNode.setInnerText( styleHTML() );
@@ -613,28 +613,28 @@ void ChatMessagePart::slotRefreshView()
void ChatMessagePart::keepScrolledDown()
{
if ( !d->scrollPressed )
- QTimer::singleShot( 1, this, SLOT( slotScrollView() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) );
}
-const QString ChatMessagePart::styleHTML() const
+const TQString ChatMessagePart::styleHTML() const
{
KopetePrefs *p = KopetePrefs::prefs();
int fontSize = 0;
- QString fontSizeCss;
- // Use correct font size unit, depending of how the QFont was build.
+ TQString fontSizeCss;
+ // Use correct font size unit, depending of how the TQFont was build.
if( p->fontFace().pointSize() != -1 )
{
fontSize = p->fontFace().pointSize();
- fontSizeCss = QString::fromUtf8("%1pt;").arg(fontSize);
+ fontSizeCss = TQString::fromUtf8("%1pt;").arg(fontSize);
}
else if( p->fontFace().pixelSize() != -1 )
{
fontSize = p->fontFace().pixelSize();
- fontSizeCss = QString::fromUtf8("%1px;").arg(fontSize);
+ fontSizeCss = TQString::fromUtf8("%1px;").arg(fontSize);
}
- QString style = QString::fromLatin1(
+ TQString style = TQString::fromLatin1(
"body{background-color:%1;font-family:%2;font-size:%3;color:%4}"
"td{font-family:%5;font-size:%6;color:%7}"
"a{color:%8}a.visited{color:%9}"
@@ -682,15 +682,15 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const
if ( element.hasAttribute( "contactid" ) )
{
- QString contactId = element.getAttribute( "contactid" ).string();
- for ( QPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
+ TQString contactId = element.getAttribute( "contactid" ).string();
+ for ( TQPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
if ( (*it)->contactId() == contactId )
return *it;
}
else
{
- QString nick = element.innerText().string().stripWhiteSpace();
- for ( QPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
+ TQString nick = element.innerText().string().stripWhiteSpace();
+ for ( TQPtrListIterator<Kopete::Contact> it ( d->manager->members() ); it.current(); ++it )
if ( (*it)->property( Kopete::Global::Properties::self()->nickName().key() ).value().toString() == nick )
return *it;
}
@@ -698,7 +698,7 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const
return 0;
}
-void ChatMessagePart::slotRightClick( const QString &, const QPoint &point )
+void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point )
{
// look through parents until we find an Element
DOM::Node activeNode = nodeUnderMouse();
@@ -715,7 +715,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point )
if ( Kopete::Contact *contact = contactFromNode( d->activeElement ) )
{
chatWindowPopup = contact->popupMenu( d->manager );
- connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup , SLOT( deleteLater() ) );
+ connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup , TQT_SLOT( deleteLater() ) );
}
else
{
@@ -727,7 +727,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point )
chatWindowPopup->setItemEnabled( 1, false );
chatWindowPopup->insertSeparator();
}
- else if ( d->activeElement.tagName().lower() == QString::fromLatin1( "a" ) )
+ else if ( d->activeElement.tagName().lower() == TQString::fromLatin1( "a" ) )
{
d->copyURLAction->plug( chatWindowPopup );
chatWindowPopup->insertSeparator();
@@ -741,7 +741,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point )
chatWindowPopup->insertSeparator();
d->closeAction->plug( chatWindowPopup );
- connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) );
+ connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) );
chatWindowPopup->popup( point );
}
@@ -751,26 +751,26 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point )
chatWindowPopup->popup( point );
}
-QString ChatMessagePart::textUnderMouse()
+TQString ChatMessagePart::textUnderMouse()
{
DOM::Node activeNode = nodeUnderMouse();
if( activeNode.nodeType() != DOM::Node::TEXT_NODE )
- return QString::null;
+ return TQString::null;
DOM::Text textNode = activeNode;
- QString data = textNode.data().string();
+ TQString data = textNode.data().string();
//Ok, we have the whole node. Now, find the text under the mouse.
- int mouseLeft = view()->mapFromGlobal( QCursor::pos() ).x(),
+ int mouseLeft = view()->mapFromGlobal( TQCursor::pos() ).x(),
nodeLeft = activeNode.getRect().x(),
cPos = 0,
dataLen = data.length();
- QFontMetrics metrics( KopetePrefs::prefs()->fontFace() );
- QString buffer;
+ TQFontMetrics metrics( KopetePrefs::prefs()->fontFace() );
+ TQString buffer;
while( cPos < dataLen && nodeLeft < mouseLeft )
{
- QChar c = data[cPos++];
+ TQChar c = data[cPos++];
if( c.isSpace() )
buffer.truncate(0);
else
@@ -781,7 +781,7 @@ QString ChatMessagePart::textUnderMouse()
if( cPos < dataLen )
{
- QChar c = data[cPos++];
+ TQChar c = data[cPos++];
while( cPos < dataLen && !c.isSpace() )
{
buffer += c;
@@ -797,8 +797,8 @@ void ChatMessagePart::slotCopyURL()
DOM::HTMLAnchorElement a = d->activeElement;
if ( !a.isNull() )
{
- QApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard );
- QApplication::clipboard()->setText( a.href().string(), QClipboard::Selection );
+ TQApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard );
+ TQApplication::clipboard()->setText( a.href().string(), QClipboard::Selection );
}
}
@@ -818,8 +818,8 @@ void ChatMessagePart::copy(bool justselection /* default false */)
* This also copies the text as type text/html
* RangeImpl::toHTML was not implemented before KDE 3.4
*/
- QString text;
- QString htmltext;
+ TQString text;
+ TQString htmltext;
#if KDE_IS_VERSION(3,3,90)
htmltext = selectedTextAsHTML();
@@ -842,7 +842,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
{
if(n.nodeType() == DOM::Node::TEXT_NODE /*&& n.handle()->renderer()*/)
{
- QString str = n.nodeValue().string();
+ TQString str = n.nodeValue().string();
hasNewLine = false;
if(n == startNode && n == endNode)
text = str.mid(startOffset, endOffset - startOffset);
@@ -941,29 +941,29 @@ void ChatMessagePart::copy(bool justselection /* default false */)
if(text.isEmpty()) return;
- disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), this, SLOT( slotClearSelection()));
+ disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection()));
#ifndef QT_NO_MIMECLIPBOARD
if(!justselection)
{
- QTextDrag *textdrag = new QTextDrag(text, 0L);
+ TQTextDrag *textdrag = new TQTextDrag(text, 0L);
KMultipleDrag *drag = new KMultipleDrag( );
drag->addDragObject( textdrag );
if(!htmltext.isEmpty()) {
- htmltext.replace( QChar( 0xa0 ), ' ' );
- QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L);
+ htmltext.replace( TQChar( 0xa0 ), ' ' );
+ TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L);
htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag );
}
- QApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
}
- QApplication::clipboard()->setText( text, QClipboard::Selection );
+ TQApplication::clipboard()->setText( text, QClipboard::Selection );
#else
if(!justselection)
- QApplication::clipboard()->setText( text, QClipboard::Clipboard );
- QApplication::clipboard()->setText( text, QClipboard::Selection );
+ TQApplication::clipboard()->setText( text, QClipboard::Clipboard );
+ TQApplication::clipboard()->setText( text, QClipboard::Selection );
#endif
- connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection()));
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
}
@@ -982,17 +982,17 @@ void ChatMessagePart::slotCloseView( bool force )
d->manager->view()->closeView( force );
}
-void ChatMessagePart::emitTooltipEvent( const QString &textUnderMouse, QString &toolTip )
+void ChatMessagePart::emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTip )
{
emit tooltipEvent( textUnderMouse, toolTip );
}
// Style formatting for messages(incoming, outgoing, status)
-QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &_message )
+TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &_message )
{
Kopete::Message message=_message; //we will eventually need to modify it before showing it.
- QString resultHTML = sourceHTML;
- QString nick, contactId, service, protocolIcon, nickLink;
+ TQString resultHTML = sourceHTML;
+ TQString nick, contactId, service, protocolIcon, nickLink;
if( message.from() )
{
@@ -1014,8 +1014,8 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
//
// Use default if protocol() and protocol()->displayName() is NULL.
// For preview and unit tests.
- QString iconName = QString::fromUtf8("kopete");
- service = QString::fromUtf8("Kopete");
+ TQString iconName = TQString::fromUtf8("kopete");
+ service = TQString::fromUtf8("Kopete");
if(message.from()->protocol() && !message.from()->protocol()->displayName().isNull())
{
service = message.from()->protocol()->displayName();
@@ -1024,10 +1024,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small );
- nickLink=QString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
- .arg( QStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
- QStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"&quot;"),
- QStyleSheet::escape(message.from()->account()->accountId() ).replace('"',"&quot;"));
+ nickLink=TQString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
+ .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',"&quot;"));
}
else
{
@@ -1036,22 +1036,22 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
// Replace sender (contact nick)
- resultHTML = resultHTML.replace( QString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
// Replace time, by default display only time and display seconds(that was true means).
- resultHTML = resultHTML.replace( QString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) );
// Replace %screenName% (contact ID)
- resultHTML = resultHTML.replace( QString::fromUtf8("%senderScreenName%"), nickLink+QStyleSheet::escape(contactId)+"</a>" );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" );
// Replace service name (protocol name)
- resultHTML = resultHTML.replace( QString::fromUtf8("%service%"), QStyleSheet::escape(service) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) );
// Replace protocolIcon (sender statusIcon)
- resultHTML = resultHTML.replace( QString::fromUtf8("%senderStatusIcon%"), QStyleSheet::escape(protocolIcon).replace('"',"&quot;") );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',"&quot;") );
// Look for %time{X}%
- QRegExp timeRegExp("%time\\{([^}]*)\\}%");
+ TQRegExp timeRegExp("%time\\{([^}]*)\\}%");
int pos=0;
while( (pos=timeRegExp.search(resultHTML , pos) ) != -1 )
{
- QString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() );
+ TQString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() );
resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword );
}
@@ -1059,13 +1059,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
// TODO: use the X value.
// Replace with user-selected highlight color if to be highlighted or
// with "inherit" otherwise to keep CSS clean
- QString bgColor = QString::fromUtf8("inherit");
+ TQString bgColor = TQString::fromUtf8("inherit");
if( message.importance() == Kopete::Message::Highlight && KopetePrefs::prefs()->highlightEnabled() )
{
bgColor = KopetePrefs::prefs()->highlightBackground().name();
}
- QRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%");
+ TQRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%");
int textPos=0;
while( (textPos=textBackgroundRegExp.search(resultHTML, textPos) ) != -1 )
{
@@ -1075,30 +1075,30 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
// Replace userIconPath
if( message.from() )
{
- QString photoPath;
+ TQString photoPath;
#if 0
photoPath = message.from()->property(Kopete::Global::Properties::self()->photo().key()).value().toString();
// If the photo path is empty, set the default buddy icon for the theme
if( photoPath.isEmpty() )
{
if(message.direction() == Kopete::Message::Inbound)
- photoPath = QString::fromUtf8("Incoming/buddy_icon.png");
+ photoPath = TQString::fromUtf8("Incoming/buddy_icon.png");
else if(message.direction() == Kopete::Message::Outbound)
- photoPath = QString::fromUtf8("Outgoing/buddy_icon.png");
+ photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png");
}
#endif
if( !message.from()->metaContact()->picture().isNull() )
{
- photoPath = QString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64();
+ photoPath = TQString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64();
}
else
{
if(message.direction() == Kopete::Message::Inbound)
- photoPath = QString::fromUtf8("Incoming/buddy_icon.png");
+ photoPath = TQString::fromUtf8("Incoming/buddy_icon.png");
else if(message.direction() == Kopete::Message::Outbound)
- photoPath = QString::fromUtf8("Outgoing/buddy_icon.png");
+ photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png");
}
- resultHTML = resultHTML.replace(QString::fromUtf8("%userIconPath%"), photoPath);
+ resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath);
}
// Replace messages.
@@ -1107,13 +1107,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
{
kdDebug(14000) << k_funcinfo << "Map Action message to Status template. " << endl;
- QString boldNick = QString::fromUtf8("%1<b>%2</b></a> ").arg(nickLink,nick);
- QString newBody = boldNick + message.parsedBody();
+ TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").arg(nickLink,nick);
+ TQString newBody = boldNick + message.parsedBody();
message.setBody(newBody, Kopete::Message::ParsedHTML );
}
// Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right))
- resultHTML = resultHTML.replace( QString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" );
// These colors are used for coloring nicknames. I tried to use
// colors both visible on light and dark background.
@@ -1131,10 +1131,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
int hash = 0;
for( uint f = 0; f < contactId.length(); ++f )
hash += contactId[f].unicode() * f;
- const QString colorName = nameColors[ hash % nameColorsLen ];
- QString lightColorName; // Do not initialize, QColor::name() is expensive!
+ const TQString colorName = nameColors[ hash % nameColorsLen ];
+ TQString lightColorName; // Do not initialize, TQColor::name() is expensive!
kdDebug(14000) << k_funcinfo << "Hash " << hash << " has color " << colorName << endl;
- QRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%");
+ TQRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%");
textPos=0;
while( (textPos=senderColorRegExp.search(resultHTML, textPos) ) != -1 )
{
@@ -1147,14 +1147,14 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
// Lazily init light color
if ( doLight && lightColorName.isNull() )
- lightColorName = QColor( colorName ).light( light ).name();
+ lightColorName = TQColor( colorName ).light( light ).name();
resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(),
doLight ? lightColorName : colorName );
}
// Replace message at the end, maybe someone could put a Adium keyword in his message :P
- resultHTML = resultHTML.replace( QString::fromUtf8("%message%"), formatMessageBody(message) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) );
// TODO: %status
// resultHTML = addNickLinks( resultHTML );
@@ -1162,16 +1162,16 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
}
// Style formatting for header and footer.
-QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML )
+TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
{
- QString resultHTML = sourceHTML;
+ TQString resultHTML = sourceHTML;
Kopete::Contact *remoteContact = d->manager->members().getFirst();
// Verify that all contacts are not null before doing anything
if( remoteContact && d->manager->myself() )
{
- QString sourceName, destinationName;
+ TQString sourceName, destinationName;
// Use contact nickname for ourselfs, Myself metacontact display name isn't a reliable source.
sourceName = d->manager->myself()->nickName();
if( remoteContact->metaContact() )
@@ -1180,64 +1180,64 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML )
destinationName = remoteContact->nickName();
// Replace %chatName%, create a internal span to update it by DOM when asked.
- resultHTML = resultHTML.replace( QString::fromUtf8("%chatName%"), QString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").arg( formatName(d->manager->displayName()) ) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").arg( formatName(d->manager->displayName()) ) );
// Replace %sourceName%
- resultHTML = resultHTML.replace( QString::fromUtf8("%sourceName%"), formatName(sourceName) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) );
// Replace %destinationName%
- resultHTML = resultHTML.replace( QString::fromUtf8("%destinationName%"), formatName(destinationName) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) );
// For %timeOpened%, display the date and time (also the seconds).
- resultHTML = resultHTML.replace( QString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) );
// Look for %timeOpened{X}%
- QRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%");
+ TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%");
int pos=0;
while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 )
{
- QString timeKeyword = formatTime( timeRegExp.cap(1), QDateTime::currentDateTime() );
+ TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::currentDateTime() );
resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword );
}
// Get contact image paths
#if 0
- QString photoIncomingPath, photoOutgoingPath;
+ TQString photoIncomingPath, photoOutgoingPath;
photoIncomingPath = remoteContact->property( Kopete::Global::Properties::self()->photo().key()).value().toString();
photoOutgoingPath = d->manager->myself()->property(Kopete::Global::Properties::self()->photo().key()).value().toString();
if( photoIncomingPath.isEmpty() )
- photoIncomingPath = QString::fromUtf8("Incoming/buddy_icon.png");
+ photoIncomingPath = TQString::fromUtf8("Incoming/buddy_icon.png");
if( photoOutgoingPath.isEmpty() )
- photoOutgoingPath = QString::fromUtf8("Outgoing/buddy_icon.png");
+ photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png");
- resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncomingPath);
- resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath);
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath);
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath);
#endif
- QString photoIncoming, photoOutgoing;
+ TQString photoIncoming, photoOutgoing;
if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() )
{
- photoIncoming = QString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() );
+ photoIncoming = TQString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() );
}
else
{
- photoIncoming = QString::fromUtf8("Incoming/buddy_icon.png");
+ photoIncoming = TQString::fromUtf8("Incoming/buddy_icon.png");
}
if( d->manager->myself()->metaContact() && !d->manager->myself()->metaContact()->picture().isNull() )
{
- photoOutgoing = QString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() );
+ photoOutgoing = TQString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() );
}
else
{
- photoOutgoing = QString::fromUtf8("Outgoing/buddy_icon.png");
+ photoOutgoing = TQString::fromUtf8("Outgoing/buddy_icon.png");
}
- resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncoming);
- resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoing );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming);
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing );
}
return resultHTML;
}
-QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime &dateTime)
+TQString ChatMessagePart::formatTime(const TQString &timeFormat, const TQDateTime &dateTime)
{
char buffer[256];
@@ -1249,12 +1249,12 @@ QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime &
loctime = localtime (&timeT);
strftime (buffer, 256, timeFormat.ascii(), loctime);
- return QString(buffer);
+ return TQString(buffer);
}
-QString ChatMessagePart::formatName(const QString &sourceName)
+TQString ChatMessagePart::formatName(const TQString &sourceName)
{
- QString formattedName = sourceName;
+ TQString formattedName = sourceName;
// Escape the name.
formattedName = Kopete::Message::escape(formattedName);
@@ -1267,14 +1267,14 @@ QString ChatMessagePart::formatName(const QString &sourceName)
return formattedName;
}
-QString ChatMessagePart::formatMessageBody(const Kopete::Message &message)
+TQString ChatMessagePart::formatMessageBody(const Kopete::Message &message)
{
- QString formattedBody("<span ");
+ TQString formattedBody("<span ");
formattedBody += message.getHtmlStyleAttribute();
// Affect the parsed body.
- formattedBody += QString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").arg(message.parsedBody());
+ formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").arg(message.parsedBody());
return formattedBody;
}
@@ -1282,7 +1282,7 @@ QString ChatMessagePart::formatMessageBody(const Kopete::Message &message)
void ChatMessagePart::slotUpdateHeaderDisplayName()
{
kdDebug(14000) << k_funcinfo << endl;
- DOM::HTMLElement kopeteChatNameNode = document().getElementById( QString::fromUtf8("KopeteHeaderChatNameInternal") );
+ DOM::HTMLElement kopeteChatNameNode = document().getElementById( TQString::fromUtf8("KopeteHeaderChatNameInternal") );
if( !kopeteChatNameNode.isNull() )
kopeteChatNameNode.setInnerText( formatName(d->manager->displayName()) );
}
@@ -1291,13 +1291,13 @@ void ChatMessagePart::slotUpdateHeaderPhoto()
{
// Do the actual style switch
// Wait for the event loop before switching the style
- QTimer::singleShot( 0, this, SLOT(changeStyle()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) );
}
void ChatMessagePart::changeStyle()
{
#ifdef STYLE_TIMETEST
- QTime beforeChange = QTime::currentTime();
+ TQTime beforeChange = TQTime::currentTime();
#endif
// Make latestContact null to reset consecutives messages.
d->latestContact = 0;
@@ -1306,7 +1306,7 @@ void ChatMessagePart::changeStyle()
writeTemplate();
// Readd all current messages.
- QValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
+ TQValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
for(it = d->allMessages.constBegin(); it != itEnd; ++it)
{
Kopete::Message tempMessage = *it;
@@ -1314,7 +1314,7 @@ void ChatMessagePart::changeStyle()
}
kdDebug(14000) << k_funcinfo << "Finish changing style." << endl;
#ifdef STYLE_TIMETEST
- kdDebug(14000) << "Change time: " << beforeChange.msecsTo( QTime::currentTime()) << endl;
+ kdDebug(14000) << "Change time: " << beforeChange.msecsTo( TQTime::currentTime()) << endl;
#endif
}
@@ -1323,7 +1323,7 @@ void ChatMessagePart::writeTemplate()
kdDebug(14000) << k_funcinfo << endl;
#ifdef STYLE_TIMETEST
- QTime beforeHeader = QTime::currentTime();
+ TQTime beforeHeader = TQTime::currentTime();
#endif
// Clear all the page, and begin a new page.
begin();
@@ -1338,8 +1338,8 @@ void ChatMessagePart::writeTemplate()
// mainStyle: Currrent variant CSS url.
// FIXME: Maybe this string should be load from a file, then parsed for args.
- QString xhtmlBase;
- xhtmlBase += QString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ TQString xhtmlBase;
+ xhtmlBase += TQString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n"
"\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
@@ -1371,7 +1371,7 @@ void ChatMessagePart::writeTemplate()
write(xhtmlBase);
end();
#ifdef STYLE_TIMETEST
- kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( QTime::currentTime()) << endl;
+ kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( TQTime::currentTime()) << endl;
#endif
}
diff --git a/kopete/kopete/chatwindow/chatmessagepart.h b/kopete/kopete/chatwindow/chatmessagepart.h
index ad14d3e3..5314d776 100644
--- a/kopete/kopete/chatwindow/chatmessagepart.h
+++ b/kopete/kopete/chatwindow/chatmessagepart.h
@@ -22,7 +22,7 @@
#include <khtml_part.h>
#include <dom/html_element.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace Kopete
{
@@ -43,7 +43,7 @@ public:
/**
* Create a new ChatMessage Part.
*/
- ChatMessagePart( Kopete::ChatSession *manager, QWidget *parent, const char *name = 0);
+ ChatMessagePart( Kopete::ChatSession *manager, TQWidget *parent, const char *name = 0);
~ChatMessagePart();
/**
@@ -104,7 +104,7 @@ public slots:
*
* @param stylePath absolute path to the style.
*/
- void setStyle( const QString &stylePath );
+ void setStyle( const TQString &stylePath );
/**
* Change the current style
@@ -121,18 +121,18 @@ public slots:
* Change the current variant for the current style
* @param variantPath relative path to the style variant.
*/
- void setStyleVariant( const QString &variantPath );
+ void setStyleVariant( const TQString &variantPath );
signals:
/**
* Emits before the context menu is about to show
*/
- void contextMenuEvent( const QString &textUnderMouse, KPopupMenu *popupMenu );
+ void contextMenuEvent( const TQString &textUnderMouse, KPopupMenu *popupMenu );
/**
* Emits before the tooltip is about to show
*/
- void tooltipEvent( const QString &textUnderMouse, QString &toolTip );
+ void tooltipEvent( const TQString &textUnderMouse, TQString &toolTip );
private slots:
void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args );
@@ -143,7 +143,7 @@ private slots:
void slotRefreshView();
- void slotRightClick( const QString &, const QPoint &point );
+ void slotRightClick( const TQString &, const TQPoint &point );
void slotCopyURL();
@@ -170,49 +170,49 @@ protected:
private:
void readOverrides();
- const QString styleHTML() const;
+ const TQString styleHTML() const;
Kopete::Contact *contactFromNode( const DOM::Node &n ) const;
/**
* Emits before the tooltip is about to show
*/
- void emitTooltipEvent( const QString &textUnderMouse, QString &toolTipString );
+ void emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTipString );
/**
* Returns the text currently under the mouse
*/
- QString textUnderMouse();
+ TQString textUnderMouse();
/**
* Format(replace) style keywords for messages (incoming, outgoing, internal)
- * Use formatStyleKeywords(const QString &sourceHTML) for header and footer.
+ * Use formatStyleKeywords(const TQString &sourceHTML) for header and footer.
*
* @param sourceHTML the source html which contains the keywords
* @param message the current Message.
*
* @return the resulting HTML with replaced keywords.
*/
- QString formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &message );
+ TQString formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &message );
/**
* Format(replace) style keywords for header and footers.
- * For messages, use formatStyleKeywords(const QString &sourceHTML, Kopete::Message &message) instead.
+ * For messages, use formatStyleKeywords(const TQString &sourceHTML, Kopete::Message &message) instead.
*
* @param sourceHTML HTML source needed to be replaced.
*
* @return the resulting HTML with replaced keywords.
*/
- QString formatStyleKeywords( const QString &sourceHTML );
+ TQString formatStyleKeywords( const TQString &sourceHTML );
/**
* Helper function to parse time in correct format.
* Use glibc strftime function.
*
* @param timeFormat the time format to parse.
- * @param dateTime the QDateTime which contains the datetime to format.
+ * @param dateTime the TQDateTime which contains the datetime to format.
* @return the formatted time string.
*/
- QString formatTime(const QString &timeFormat, const QDateTime &dateTime);
+ TQString formatTime(const TQString &timeFormat, const TQDateTime &dateTime);
/**
* Format a nickname/displayname according to preferences.
@@ -220,7 +220,7 @@ private:
* @param sourceName Source name to format.
* @return the formatted name.
*/
- QString formatName( const QString &sourceName );
+ TQString formatName( const TQString &sourceName );
/**
* Format a message body according to the style included
@@ -229,7 +229,7 @@ private:
* @param message Kopete::Message to format.
* @return a span tag with a style attribute.
*/
- QString formatMessageBody( const Kopete::Message &message );
+ TQString formatMessageBody( const Kopete::Message &message );
/**
* Write the template file to KHTMLPart
diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp
index bac31bcf..e284903d 100644
--- a/kopete/kopete/chatwindow/chattexteditpart.cpp
+++ b/kopete/kopete/chatwindow/chattexteditpart.cpp
@@ -28,10 +28,10 @@
#include <ktextedit.h>
#include <ksyntaxhighlighter.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
-ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name )
+ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name )
: KopeteRichTextEditPart( parent, name, session->protocol()->capabilities() ), m_session(session)
{
historyPos = -1;
@@ -43,30 +43,30 @@ ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *paren
mComplete->setOrder( KCompletion::Weighted );
// set params on the edit widget
- edit()->setMinimumSize( QSize( 75, 20 ) );
- edit()->setWordWrap( QTextEdit::WidgetWidth );
- edit()->setWrapPolicy( QTextEdit::AtWhiteSpace );
- edit()->setAutoFormatting( QTextEdit::AutoNone );
+ edit()->setMinimumSize( TQSize( 75, 20 ) );
+ edit()->setWordWrap( TQTextEdit::WidgetWidth );
+ edit()->setWrapPolicy( TQTextEdit::AtWhiteSpace );
+ edit()->setAutoFormatting( TQTextEdit::AutoNone );
// some signals and slots connections
- connect( edit(), SIGNAL( textChanged()), this, SLOT( slotTextChanged() ) );
+ connect( edit(), TQT_SIGNAL( textChanged()), this, TQT_SLOT( slotTextChanged() ) );
// timers for typing notifications
- m_typingRepeatTimer = new QTimer(this, "m_typingRepeatTimer");
- m_typingStopTimer = new QTimer(this, "m_typingStopTimer");
-
- connect( m_typingRepeatTimer, SIGNAL( timeout() ), this, SLOT( slotRepeatTypingTimer() ) );
- connect( m_typingStopTimer, SIGNAL( timeout() ), this, SLOT( slotStoppedTypingTimer() ) );
-
- connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
- this, SLOT( slotContactAdded(const Kopete::Contact*) ) );
- connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ),
- this, SLOT( slotContactRemoved(const Kopete::Contact*) ) );
- connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
- this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
+ m_typingRepeatTimer = new TQTimer(this, "m_typingRepeatTimer");
+ m_typingStopTimer = new TQTimer(this, "m_typingStopTimer");
+
+ connect( m_typingRepeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRepeatTypingTimer() ) );
+ connect( m_typingStopTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotStoppedTypingTimer() ) );
+
+ connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
+ this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) );
+ connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ),
+ this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) );
+ connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
+ this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
slotContactAdded( session->myself() );
- for ( QPtrListIterator<Kopete::Contact> it( session->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> it( session->members() ); it.current(); ++it )
slotContactAdded( *it );
}
@@ -101,7 +101,7 @@ bool ChatTextEditPart::autoSpellCheckEnabled() const
KDictSpellingHighlighter* ChatTextEditPart::spellHighlighter()
{
- QSyntaxHighlighter *qsh = edit()->syntaxHighlighter();
+ TQSyntaxHighlighter *qsh = edit()->syntaxHighlighter();
KDictSpellingHighlighter* kdsh = dynamic_cast<KDictSpellingHighlighter*>( qsh );
return kdsh;
}
@@ -112,9 +112,9 @@ class EvilTextEdit : public KTextEdit
{
public:
// grab the paragraph as plain text - very very evil.
- QString plainText( int para )
+ TQString plainText( int para )
{
- QString str = document()->paragAt( para )->string()->toString();
+ TQString str = document()->paragAt( para )->string()->toString();
// str includes an extra space on the end (from the newline character?) - remove it
return str.left( str.length() - 1 );
}
@@ -126,24 +126,24 @@ void ChatTextEditPart::complete()
edit()->getCursorPosition( &para, &parIdx);
// FIXME: strips out all formatting
- QString txt = static_cast<EvilTextEdit*>(edit())->plainText( para );
+ TQString txt = static_cast<EvilTextEdit*>(edit())->plainText( para );
if ( parIdx > 0 )
{
- int firstSpace = txt.findRev( QRegExp( QString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1;
- int lastSpace = txt.find( QRegExp( QString::fromLatin1("[\\s\\:]") ), firstSpace );
+ int firstSpace = txt.findRev( TQRegExp( TQString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1;
+ int lastSpace = txt.find( TQRegExp( TQString::fromLatin1("[\\s\\:]") ), firstSpace );
if( lastSpace == -1 )
lastSpace = txt.length();
- QString word = txt.mid( firstSpace, lastSpace - firstSpace );
- QString match;
+ TQString word = txt.mid( firstSpace, lastSpace - firstSpace );
+ TQString match;
kdDebug(14000) << k_funcinfo << word << " from '" << txt << "'" << endl;
if ( word != m_lastMatch )
{
match = mComplete->makeCompletion( word );
- m_lastMatch = QString::null;
+ m_lastMatch = TQString::null;
parIdx -= word.length();
}
else
@@ -154,11 +154,11 @@ void ChatTextEditPart::complete()
if ( !match.isNull() && !match.isEmpty() )
{
- QString rightText = txt.right( txt.length() - lastSpace );
+ TQString rightText = txt.right( txt.length() - lastSpace );
- if ( para == 0 && firstSpace == 0 && rightText[0] != QChar(':') )
+ if ( para == 0 && firstSpace == 0 && rightText[0] != TQChar(':') )
{
- rightText = match + QString::fromLatin1(": ") + rightText;
+ rightText = match + TQString::fromLatin1(": ") + rightText;
parIdx += 2;
}
else
@@ -172,7 +172,7 @@ void ChatTextEditPart::complete()
edit()->removeParagraph( para + 1 );
edit()->setCursorPosition( para, parIdx + match.length() );
edit()->setUpdatesEnabled( true );
- // must call this rather than update because QTextEdit is broken :(
+ // must call this rather than update because TQTextEdit is broken :(
edit()->updateContents();
m_lastMatch = match;
}
@@ -183,8 +183,8 @@ void ChatTextEditPart::complete()
}
}
-void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key,
- const QVariant& oldValue, const QVariant &newValue )
+void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const TQString &key,
+ const TQVariant& oldValue, const TQVariant &newValue )
{
if ( key == Kopete::Global::Properties::self()->nickName().key() )
{
@@ -195,19 +195,19 @@ void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key
void ChatTextEditPart::slotContactAdded( const Kopete::Contact *contact )
{
- connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ;
+ connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ;
- QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString();
mComplete->addItem( contactName );
}
void ChatTextEditPart::slotContactRemoved( const Kopete::Contact *contact )
{
- disconnect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ;
+ disconnect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ;
- QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString();
mComplete->removeItem( contactName );
}
@@ -227,7 +227,7 @@ bool ChatTextEditPart::canSend()
bool reachableContactFound = false;
//TODO: does this perform badly in large / busy IRC channels? - no, doesn't seem to
- QPtrListIterator<Kopete::Contact> it ( members );
+ TQPtrListIterator<Kopete::Contact> it ( members );
for( ; it.current(); ++it )
{
if ( (*it)->isReachable() )
@@ -257,17 +257,17 @@ void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete
void ChatTextEditPart::sendMessage()
{
- QString txt = text( Qt::PlainText );
+ TQString txt = text( Qt::PlainText );
// avoid sending emtpy messages or enter keys (see bug 100334)
if ( txt.isEmpty() || txt == "\n" )
return;
- if ( m_lastMatch.isNull() && ( txt.find( QRegExp( QString::fromLatin1("^\\w+:\\s") ) ) > -1 ) )
+ if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::fromLatin1("^\\w+:\\s") ) ) > -1 ) )
{ //no last match and it finds something of the form of "word:" at the start of a line
- QString search = txt.left( txt.find(':') );
+ TQString search = txt.left( txt.find(':') );
if( !search.isEmpty() )
{
- QString match = mComplete->makeCompletion( search );
+ TQString match = mComplete->makeCompletion( search );
if( !match.isNull() )
edit()->setText( txt.replace(0,search.length(),match) );
}
@@ -277,7 +277,7 @@ void ChatTextEditPart::sendMessage()
{
//FIXME: what is the next line for?
mComplete->addItem( m_lastMatch );
- m_lastMatch = QString::null;
+ m_lastMatch = TQString::null;
}
slotStoppedTypingTimer();
@@ -291,9 +291,9 @@ void ChatTextEditPart::sendMessage()
bool ChatTextEditPart::isTyping()
{
- QString txt = text( Qt::PlainText );
+ TQString txt = text( Qt::PlainText );
- //Make sure the message is empty. QString::isEmpty()
+ //Make sure the message is empty. TQString::isEmpty()
//returns false if a message contains just whitespace
//which is the reason why we strip the whitespace
return !txt.stripWhiteSpace().isEmpty();
@@ -322,7 +322,7 @@ void ChatTextEditPart::historyUp()
if ( historyList.empty() || historyPos == historyList.count() - 1 )
return;
- QString text = edit()->text();
+ TQString text = edit()->text();
bool empty = text.stripWhiteSpace().isEmpty();
// got text? save it
@@ -341,12 +341,12 @@ void ChatTextEditPart::historyUp()
historyPos++;
- QString newText = historyList[historyPos];
+ TQString newText = historyList[historyPos];
TextFormat format=edit()->textFormat();
edit()->setTextFormat(AutoText); //workaround bug 115690
edit()->setText( newText );
edit()->setTextFormat(format);
- edit()->moveCursor( QTextEdit::MoveEnd, false );
+ edit()->moveCursor( TQTextEdit::MoveEnd, false );
}
void ChatTextEditPart::historyDown()
@@ -354,7 +354,7 @@ void ChatTextEditPart::historyDown()
if ( historyList.empty() || historyPos == -1 )
return;
- QString text = edit()->text();
+ TQString text = edit()->text();
bool empty = text.stripWhiteSpace().isEmpty();
// got text? save it
@@ -365,7 +365,7 @@ void ChatTextEditPart::historyDown()
historyPos--;
- QString newText = ( historyPos >= 0 ? historyList[historyPos] : QString::null );
+ TQString newText = ( historyPos >= 0 ? historyList[historyPos] : TQString::null );
TextFormat format=edit()->textFormat();
@@ -375,10 +375,10 @@ void ChatTextEditPart::historyDown()
- edit()->moveCursor( QTextEdit::MoveEnd, false );
+ edit()->moveCursor( TQTextEdit::MoveEnd, false );
}
-void ChatTextEditPart::addText( const QString &text )
+void ChatTextEditPart::addText( const TQString &text )
{
edit()->insert( text );
}
diff --git a/kopete/kopete/chatwindow/chattexteditpart.h b/kopete/kopete/chatwindow/chattexteditpart.h
index 3391b8a7..d16567ad 100644
--- a/kopete/kopete/chatwindow/chattexteditpart.h
+++ b/kopete/kopete/chatwindow/chattexteditpart.h
@@ -20,7 +20,7 @@
#include "krichtexteditpart.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QTimer;
@@ -48,7 +48,7 @@ class ChatTextEditPart : public KopeteRichTextEditPart
{
Q_OBJECT
public:
- ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 );
+ ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 );
~ChatTextEditPart();
/**
@@ -67,7 +67,7 @@ public:
* Adds text into the edit area. Used when an emoticon is selected.
* @param text The text to be inserted
*/
- void addText( const QString &text );
+ void addText( const TQString &text );
/**
* Can we send messages now?
@@ -177,7 +177,7 @@ private slots:
/**
* Update completion to follow changes in users' nicknames
*/
- void slotPropertyChanged( Kopete::Contact *, const QString &key, const QVariant &oldValue, const QVariant &newValue );
+ void slotPropertyChanged( Kopete::Contact *, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue );
private:
KDictSpellingHighlighter* spellHighlighter();
@@ -193,14 +193,14 @@ private:
* index -1 is treated specially; when it is modified, changes are saved to
* a new message placed at index 0.
*/
- QStringList historyList;
+ TQStringList historyList;
int historyPos;
KCompletion *mComplete;
- QString m_lastMatch;
+ TQString m_lastMatch;
- QTimer *m_typingRepeatTimer;
- QTimer *m_typingStopTimer;
+ TQTimer *m_typingRepeatTimer;
+ TQTimer *m_typingStopTimer;
bool m_autoSpellCheckEnabled;
};
diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp
index 62c1206d..514aaac8 100644
--- a/kopete/kopete/chatwindow/chatview.cpp
+++ b/kopete/kopete/chatwindow/chatview.cpp
@@ -45,13 +45,13 @@
#include <kgenericfactory.h>
#include <khtmlview.h>
#include <ksyntaxhighlighter.h>
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
typedef KGenericFactory<ChatWindowPlugin> ChatWindowPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_chatwindow, ChatWindowPluginFactory( "kopete_chatwindow" ) )
-ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const char *name, const QStringList &) :
+ChatWindowPlugin::ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &) :
Kopete::ViewPlugin( ChatWindowPluginFactory::instance(), parent, name )
{}
@@ -63,8 +63,8 @@ KopeteView* ChatWindowPlugin::createView( Kopete::ChatSession *manager )
class KopeteChatViewPrivate
{
public:
- QString captionText;
- QString statusText;
+ TQString captionText;
+ TQString statusText;
bool isActive;
bool sendInProgress;
bool visibleMembers;
@@ -89,8 +89,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch
hide();
//Create the view dock widget (KHTML Part), and set it to no docking (lock it in place)
- viewDock = createDockWidget(QString::fromLatin1( "viewDock" ), QPixmap(),
- 0L,QString::fromLatin1("viewDock"), QString::fromLatin1(" "));
+ viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(),
+ 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" "));
m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" );
viewDock->setWidget(messagePart()->widget());
@@ -98,19 +98,19 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch
viewDock->setEnableDocking(KDockWidget::DockNone);
//Create the bottom dock widget, with the edit area, statusbar and send button
- editDock = createDockWidget( QString::fromLatin1( "editDock" ), QPixmap(),
- 0L, QString::fromLatin1("editDock"), QString::fromLatin1(" ") );
+ editDock = createDockWidget( TQString::fromLatin1( "editDock" ), TQPixmap(),
+ 0L, TQString::fromLatin1("editDock"), TQString::fromLatin1(" ") );
m_editPart = new ChatTextEditPart( mgr, editDock, "kopeterichtexteditpart" );
// FIXME: is this used these days? it seems totally unnecessary
- connect( editPart(), SIGNAL( toggleToolbar(bool)), this, SLOT(slotToggleRtfToolbar(bool)) );
+ connect( editPart(), TQT_SIGNAL( toggleToolbar(bool)), this, TQT_SLOT(slotToggleRtfToolbar(bool)) );
- connect( editPart(), SIGNAL( messageSent( Kopete::Message & ) ),
- this, SIGNAL( messageSent( Kopete::Message & ) ) );
- connect( editPart(), SIGNAL( canSendChanged( bool ) ),
- this, SIGNAL( canSendChanged(bool) ) );
- connect( editPart(), SIGNAL( typing(bool) ),
- mgr, SLOT( typing(bool) ) );
+ connect( editPart(), TQT_SIGNAL( messageSent( Kopete::Message & ) ),
+ this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) );
+ connect( editPart(), TQT_SIGNAL( canSendChanged( bool ) ),
+ this, TQT_SIGNAL( canSendChanged(bool) ) );
+ connect( editPart(), TQT_SIGNAL( typing(bool) ),
+ mgr, TQT_SLOT( typing(bool) ) );
//Make the edit area dockable for now
editDock->setWidget( editPart()->widget() );
@@ -129,40 +129,40 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch
m_remoteTypingMap.setAutoDelete( true );
//Manager signals
- connect( mgr, SIGNAL( displayNameChanged() ),
- this, SLOT( slotChatDisplayNameChanged() ) );
- connect( mgr, SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
- this, SLOT( slotContactAdded(const Kopete::Contact*, bool) ) );
- connect( mgr, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ),
- this, SLOT( slotContactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ) );
- connect( mgr, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
- this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
- connect( mgr, SIGNAL( remoteTyping( const Kopete::Contact *, bool) ),
- this, SLOT( remoteTyping(const Kopete::Contact *, bool) ) );
- connect( mgr, SIGNAL( eventNotification( const QString& ) ),
- this, SLOT( setStatusText( const QString& ) ) );
+ connect( mgr, TQT_SIGNAL( displayNameChanged() ),
+ this, TQT_SLOT( slotChatDisplayNameChanged() ) );
+ connect( mgr, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ),
+ this, TQT_SLOT( slotContactAdded(const Kopete::Contact*, bool) ) );
+ connect( mgr, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ),
+ this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ) );
+ connect( mgr, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ),
+ this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
+ connect( mgr, TQT_SIGNAL( remoteTyping( const Kopete::Contact *, bool) ),
+ this, TQT_SLOT( remoteTyping(const Kopete::Contact *, bool) ) );
+ connect( mgr, TQT_SIGNAL( eventNotification( const TQString& ) ),
+ this, TQT_SLOT( setStatusText( const TQString& ) ) );
//Connections to the manager and the ViewManager that every view should have
- connect( this, SIGNAL( closing( KopeteView * ) ),
- KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) );
- connect( this, SIGNAL( activated( KopeteView * ) ),
- KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) );
- connect( this, SIGNAL( messageSent(Kopete::Message &) ),
- mgr, SLOT( sendMessage(Kopete::Message &) ) );
- connect( mgr, SIGNAL( messageSuccess() ),
- this, SLOT( messageSentSuccessfully() ));
+ connect( this, TQT_SIGNAL( closing( KopeteView * ) ),
+ KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) );
+ connect( this, TQT_SIGNAL( activated( KopeteView * ) ),
+ KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) );
+ connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ),
+ mgr, TQT_SLOT( sendMessage(Kopete::Message &) ) );
+ connect( mgr, TQT_SIGNAL( messageSuccess() ),
+ this, TQT_SLOT( messageSentSuccessfully() ));
// add contacts
slotContactAdded( mgr->myself(), true );
- for ( QPtrListIterator<Kopete::Contact> it( mgr->members() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Contact> it( mgr->members() ); it.current(); ++it )
slotContactAdded( *it, true );
setFocusProxy( editPart()->widget() );
editPart()->widget()->setFocus();
// init actions
- KStdAction::copy( this, SLOT(copy()), actionCollection() );
- KStdAction::close( this, SLOT(closeView()),actionCollection() );
+ KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() );
+ KStdAction::close( this, TQT_SLOT(closeView()),actionCollection() );
setCaption( m_manager->displayName(), false );
@@ -187,7 +187,7 @@ KTextEdit *ChatView::editWidget()
return editPart()->widget();
}
-QWidget *ChatView::mainWidget()
+TQWidget *ChatView::mainWidget()
{
return this;
}
@@ -230,7 +230,7 @@ void ChatView::nickComplete()
return editPart()->complete();
}
-void ChatView::addText( const QString &text )
+void ChatView::addText( const TQString &text )
{
editPart()->addText( text );
}
@@ -240,7 +240,7 @@ void ChatView::clear()
messagePart()->clear();
}
-void ChatView::setBgColor( const QColor &newColor )
+void ChatView::setBgColor( const TQColor &newColor )
{
editPart()->setBgColor( newColor );
}
@@ -250,17 +250,17 @@ void ChatView::setFont()
editPart()->setFont();
}
-QFont ChatView::font()
+TQFont ChatView::font()
{
return editPart()->font();
}
-void ChatView::setFont( const QFont &font )
+void ChatView::setFont( const TQFont &font )
{
editPart()->setFont( font );
}
-void ChatView::setFgColor( const QColor &newColor )
+void ChatView::setFgColor( const TQColor &newColor )
{
editPart()->setFgColor( newColor );
}
@@ -349,26 +349,26 @@ bool ChatView::closeView( bool force )
{
if ( m_manager->members().count() > 1 )
{
- QString shortCaption = d->captionText;
+ TQString shortCaption = d->captionText;
shortCaption = KStringHandler::rsqueeze( shortCaption );
response = KMessageBox::warningContinueCancel( this, i18n("<qt>You are about to leave the group chat session <b>%1</b>.<br>"
"You will not receive future messages from this conversation.</qt>").arg( shortCaption ), i18n( "Closing Group Chat" ),
- i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseGroupChat" ) );
+ i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseGroupChat" ) );
}
if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to close this chat?</qt>").arg( unreadMessageFrom ), i18n( "Unread Message" ),
- i18n( "Cl&ose Chat" ), QString::fromLatin1("AskCloseChatRecentMessage" ) );
+ i18n( "Cl&ose Chat" ), TQString::fromLatin1("AskCloseChatRecentMessage" ) );
}
if ( d->sendInProgress && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be "
"aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ),
- i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseChatMessageInProgress" ) );
+ i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) );
}
}
@@ -418,8 +418,8 @@ void ChatView::createMembersList()
if ( !membersDock )
{
//Create the chat members list
- membersDock = createDockWidget( QString::fromLatin1( "membersDock" ), QPixmap(), 0L,
- QString::fromLatin1( "membersDock" ), QString::fromLatin1( " " ) );
+ membersDock = createDockWidget( TQString::fromLatin1( "membersDock" ), TQPixmap(), 0L,
+ TQString::fromLatin1( "membersDock" ), TQString::fromLatin1( " " ) );
m_membersList = new ChatMembersListWidget( m_manager, this, "m_membersList" );
membersDock->setWidget( m_membersList );
@@ -431,7 +431,7 @@ void ChatView::createMembersList()
membersStatus = static_cast<MembersListPolicy>
(
members.first()->metaContact()->pluginData
- ( m_manager->protocol(), QString::fromLatin1( "MembersListPolicy" ) ).toInt()
+ ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt()
);
}
else
@@ -459,7 +459,7 @@ void ChatView::toggleMembersVisibility()
if ( members.first()->metaContact() )
{
members.first()->metaContact()->setPluginData( m_manager->protocol(),
- QString::fromLatin1( "MembersListPolicy" ), QString::number(membersStatus) );
+ TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) );
}
//refreshView();
}
@@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp )
// look up the dock width
int dockWidth;
- KGlobal::config()->setGroup( QString::fromLatin1( "ChatViewDock" ) );
+ KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
if( membersDockPosition == KDockWidget::DockLeft )
{
dockWidth = KGlobal::config()->readNumEntry(
- QString::fromLatin1( "membersDock,viewDock:sepPos" ), 30);
+ TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30);
}
else
{
dockWidth = KGlobal::config()->readNumEntry(
- QString::fromLatin1( "viewDock,membersDock:sepPos" ), 70);
+ TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70);
}
// Make sure it is shown then place it wherever
@@ -519,19 +519,19 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping )
m_remoteTypingMap.remove( key );
if( isTyping )
{
- m_remoteTypingMap.insert( key, new QTimer(this) );
- connect( m_remoteTypingMap[ key ], SIGNAL( timeout() ), SLOT( slotRemoteTypingTimeout() ) );
+ m_remoteTypingMap.insert( key, new TQTimer(this) );
+ connect( m_remoteTypingMap[ key ], TQT_SIGNAL( timeout() ), TQT_SLOT( slotRemoteTypingTimeout() ) );
m_remoteTypingMap[ key ]->start( 6000, true );
}
// Loop through the map, constructing a string of people typing
- QStringList typingList;
- QPtrDictIterator<QTimer> it( m_remoteTypingMap );
+ TQStringList typingList;
+ TQPtrDictIterator<TQTimer> it( m_remoteTypingMap );
for( ; it.current(); ++it )
{
Kopete::Contact *c = static_cast<Kopete::Contact*>( it.currentKey() );
- QString nick;
+ TQString nick;
if( c->metaContact() && c->metaContact() != Kopete::ContactList::self()->myself() )
{
nick = c->metaContact()->displayName();
@@ -550,7 +550,7 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping )
setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) );
else
{
- QString statusTyping = typingList.join( QString::fromLatin1( ", " ) );
+ TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) );
setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) );
}
updateChatState( Typing );
@@ -561,14 +561,14 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping )
}
}
-void ChatView::setStatusText( const QString &status )
+void ChatView::setStatusText( const TQString &status )
{
d->statusText = status;
if ( d->isActive )
m_mainWindow->setStatus( status );
}
-const QString& ChatView::statusText()
+const TQString& ChatView::statusText()
{
return d->statusText;
}
@@ -578,18 +578,18 @@ void ChatView::slotChatDisplayNameChanged()
// This fires whenever a contact or MC changes displayName, so only
// update the caption if it changed to avoid unneeded updates that
// could cause flickering
- QString chatName = m_manager->displayName();
+ TQString chatName = m_manager->displayName();
if ( chatName != d->captionText )
setCaption( chatName, true );
}
-void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key,
- const QVariant& oldValue, const QVariant &newValue )
+void ChatView::slotPropertyChanged( Kopete::Contact*, const TQString &key,
+ const TQVariant& oldValue, const TQVariant &newValue )
{
if ( key == Kopete::Global::Properties::self()->nickName().key() )
{
- QString newName=newValue.toString();
- QString oldName=oldValue.toString();
+ TQString newName=newValue.toString();
+ TQString oldName=oldValue.toString();
if(KopetePrefs::prefs()->showEvents())
if ( oldName != newName && !oldName.isEmpty())
@@ -597,7 +597,7 @@ void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key,
}
}
-void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &newValue )
+void ChatView::slotDisplayNameChanged( const TQString &oldValue, const TQString &newValue )
{
if( KopetePrefs::prefs()->showEvents() )
{
@@ -608,7 +608,7 @@ void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &n
void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress)
{
- QString contactName;
+ TQString contactName;
// Myself metacontact is not a reliable source.
if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() )
{
@@ -621,13 +621,13 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress)
if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() )
{
- connect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ),
- this, SLOT( slotDisplayNameChanged(const QString &, const QString &) ) );
+ connect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotDisplayNameChanged(const TQString &, const TQString &) ) );
}
else
{
- connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ;
+ connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ;
}
if( !suppress && m_manager->members().count() > 1 )
@@ -647,14 +647,14 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress)
emit updateStatusIcon( this );
}
-void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format, bool suppressNotification )
+void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format, bool suppressNotification )
{
// kdDebug(14000) << k_funcinfo << endl;
if ( contact != m_manager->myself() )
{
m_remoteTypingMap.remove( const_cast<Kopete::Contact *>( contact ) );
- QString contactName;
+ TQString contactName;
if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() )
{
contactName = contact->metaContact()->displayName();
@@ -669,13 +669,13 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString
{
if( contact->metaContact() )
{
- disconnect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ),
- this, SLOT( slotDisplayNameChanged(const QString&, const QString&) ) );
+ disconnect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotDisplayNameChanged(const TQString&, const TQString&) ) );
}
else
{
- disconnect(contact,SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & )),
- this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ;
+ disconnect(contact,TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & )),
+ this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ;
}
}
@@ -692,15 +692,15 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString
emit updateStatusIcon( this );
}
-QString& ChatView::caption() const
+TQString& ChatView::caption() const
{
return d->captionText;
}
-void ChatView::setCaption( const QString &text, bool modified )
+void ChatView::setCaption( const TQString &text, bool modified )
{
// kdDebug(14000) << k_funcinfo << endl;
- QString newCaption = text;
+ TQString newCaption = text;
//Save this caption
d->captionText = text;
@@ -711,7 +711,7 @@ void ChatView::setCaption( const QString &text, bool modified )
//Call the original set caption
KDockMainWindow::setCaption( newCaption, false );
- emit updateChatTooltip( this, QString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) );
+ emit updateChatTooltip( this, TQString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) );
emit updateChatLabel( this, newCaption );
//Blink icon if modified and not active
if( !d->isActive && modified )
@@ -757,15 +757,15 @@ void ChatView::appendMessage(Kopete::Message &message)
{
unreadMessageFrom = message.from()->nickName();
}
- QTimer::singleShot( 1000, this, SLOT( slotMarkMessageRead() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotMarkMessageRead() ) );
}
else
- unreadMessageFrom = QString::null;
+ unreadMessageFrom = TQString::null;
}
void ChatView::slotMarkMessageRead()
{
- unreadMessageFrom = QString::null;
+ unreadMessageFrom = TQString::null;
}
void ChatView::slotToggleRtfToolbar( bool enabled )
@@ -796,7 +796,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete:
}
else
{
- QString nick=contact->nickName();
+ TQString nick=contact->nickName();
sendInternalMessage( i18n( "%2 is now %1." )
.arg( newStatus.description(), nick ) );
}
@@ -808,7 +808,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete:
emit updateStatusIcon( this );
}
-void ChatView::sendInternalMessage(const QString &msg, Kopete::Message::MessageFormat format )
+void ChatView::sendInternalMessage(const TQString &msg, Kopete::Message::MessageFormat format )
{
// When closing kopete, some internal message may be sent because some contact are deleted
// these contacts can already be deleted
@@ -835,9 +835,9 @@ void ChatView::saveOptions()
{
KConfig *config = KGlobal::config();
- writeDockConfig ( config, QString::fromLatin1( "ChatViewDock" ) );
- config->setGroup( QString::fromLatin1( "ChatViewDock" ) );
- config->writeEntry( QString::fromLatin1( "membersDockPosition" ), membersDockPosition );
+ writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) );
+ config->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
+ config->writeEntry( TQString::fromLatin1( "membersDockPosition" ), membersDockPosition );
saveChatSettings();
config->sync();
}
@@ -859,7 +859,7 @@ void ChatView::saveChatSettings()
KConfig* config = KGlobal::config();
- QString contactListGroup = QString::fromLatin1("chatwindow_") +
+ TQString contactListGroup = TQString::fromLatin1("chatwindow_") +
mc->metaContactId();
config->setGroup( contactListGroup );
@@ -875,7 +875,7 @@ void ChatView::loadChatSettings()
return; //can't load with more than one other person in the chat
//read settings for metacontact
- QString contactListGroup = QString::fromLatin1("chatwindow_") +
+ TQString contactListGroup = TQString::fromLatin1("chatwindow_") +
contacts.first()->metaContact()->metaContactId();
KConfig* config = KGlobal::config();
config->setGroup( contactListGroup );
@@ -891,24 +891,24 @@ void ChatView::readOptions()
KConfig *config = KGlobal::config();
/** THIS IS BROKEN !!! */
- //dockManager->readConfig ( config, QString::fromLatin1("ChatViewDock") );
+ //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") );
//Work-around to restore dock widget positions
- config->setGroup( QString::fromLatin1( "ChatViewDock" ) );
+ config->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
membersDockPosition = static_cast<KDockWidget::DockPosition>(
- config->readNumEntry( QString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) );
+ config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) );
- QString dockKey = QString::fromLatin1( "viewDock" );
+ TQString dockKey = TQString::fromLatin1( "viewDock" );
if ( d->visibleMembers )
{
if( membersDockPosition == KDockWidget::DockLeft )
- dockKey.prepend( QString::fromLatin1( "membersDock," ) );
+ dockKey.prepend( TQString::fromLatin1( "membersDock," ) );
else if( membersDockPosition == KDockWidget::DockRight )
- dockKey.append( QString::fromLatin1( ",membersDock" ) );
+ dockKey.append( TQString::fromLatin1( ",membersDock" ) );
}
- dockKey.append( QString::fromLatin1( ",editDock:sepPos" ) );
+ dockKey.append( TQString::fromLatin1( ",editDock:sepPos" ) );
//kdDebug(14000) << k_funcinfo << "reading splitterpos from key: " << dockKey << endl;
int splitterPos = config->readNumEntry( dockKey, 70 );
editDock->manualDock( viewDock, KDockWidget::DockBottom, splitterPos );
@@ -928,23 +928,23 @@ void ChatView::setActive( bool value )
void ChatView::slotRemoteTypingTimeout()
{
- // Remove the topmost timer from the list. Why does QPtrDict use void* keys and not typed keys? *sigh*
+ // Remove the topmost timer from the list. Why does TQPtrDict use void* keys and not typed keys? *sigh*
if ( !m_remoteTypingMap.isEmpty() )
- remoteTyping( reinterpret_cast<const Kopete::Contact *>( QPtrDictIterator<QTimer>(m_remoteTypingMap).currentKey() ), false );
+ remoteTyping( reinterpret_cast<const Kopete::Contact *>( TQPtrDictIterator<TQTimer>(m_remoteTypingMap).currentKey() ), false );
}
-void ChatView::dragEnterEvent ( QDragEnterEvent * event )
+void ChatView::dragEnterEvent ( TQDragEnterEvent * event )
{
if( event->provides( "kopete/x-contact" ) )
{
- QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) );
+ TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) );
if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1])
{
- QString contact=lst[2];
+ TQString contact=lst[2];
bool found =false;
- QPtrList<Kopete::Contact> cts=m_manager->members();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m_manager->members();
+ for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
{
if(it.current()->contactId() == contact)
{
@@ -959,13 +959,13 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event )
}
else if( event->provides( "kopete/x-metacontact" ) )
{
- QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" ));
+ TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" ));
Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID);
if( m && m_manager->mayInvite())
{
- QPtrList<Kopete::Contact> cts=m->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
{
Kopete::Contact *c=it.current();
if(c && c->account() == m_manager->account())
@@ -978,7 +978,7 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event )
}
// make sure it doesn't come from the current chat view - then it's an emoticon
else if ( event->provides( "text/uri-list" ) && m_manager->members().count() == 1 &&
- ( event->source() != (QWidget*)m_messagePart->view()->viewport() ) )
+ ( event->source() != (TQWidget*)m_messagePart->view()->viewport() ) )
{
Kopete::ContactPtrList members = m_manager->members();
Kopete::Contact *contact = members.first();
@@ -989,18 +989,18 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event )
KDockMainWindow::dragEnterEvent(event);
}
-void ChatView::dropEvent ( QDropEvent * event )
+void ChatView::dropEvent ( TQDropEvent * event )
{
if( event->provides( "kopete/x-contact" ) )
{
- QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) );
+ TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) );
if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1])
{
- QString contact=lst[2];
+ TQString contact=lst[2];
bool found =false;
- QPtrList<Kopete::Contact> cts=m_manager->members();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m_manager->members();
+ for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
{
if(it.current()->contactId() == contact)
{
@@ -1014,12 +1014,12 @@ void ChatView::dropEvent ( QDropEvent * event )
}
else if( event->provides( "kopete/x-metacontact" ) )
{
- QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" ));
+ TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" ));
Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID);
if(m && m_manager->mayInvite())
{
- QPtrList<Kopete::Contact> cts=m->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> cts=m->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> it( cts ); it.current(); ++it )
{
Kopete::Contact *c=it.current();
if(c && c->account() == m_manager->account() && c->isOnline())
@@ -1035,7 +1035,7 @@ void ChatView::dropEvent ( QDropEvent * event )
Kopete::ContactPtrList members = m_manager->members();
Kopete::Contact *contact = members.first();
- if ( !contact || !contact->canAcceptFiles() || !QUriDrag::canDecode( event ) )
+ if ( !contact || !contact->canAcceptFiles() || !TQUriDrag::canDecode( event ) )
{
event->ignore();
return;
@@ -1063,19 +1063,19 @@ void ChatView::dropEvent ( QDropEvent * event )
}
-void ChatView::registerContextMenuHandler( QObject *target, const char* slot )
+void ChatView::registerContextMenuHandler( TQObject *target, const char* slot )
{
connect( m_messagePart,
- SIGNAL( contextMenuEvent( Kopete::Message &, const QString &, KPopupMenu * ) ),
+ TQT_SIGNAL( contextMenuEvent( Kopete::Message &, const TQString &, KPopupMenu * ) ),
target,
slot
);
}
-void ChatView::registerTooltipHandler( QObject *target, const char* slot )
+void ChatView::registerTooltipHandler( TQObject *target, const char* slot )
{
connect( m_messagePart,
- SIGNAL( tooltipEvent( Kopete::Message &, const QString &, QString & ) ),
+ TQT_SIGNAL( tooltipEvent( Kopete::Message &, const TQString &, TQString & ) ),
target,
slot
);
diff --git a/kopete/kopete/chatwindow/chatview.h b/kopete/kopete/chatwindow/chatview.h
index ef10320b..7e083d80 100644
--- a/kopete/kopete/chatwindow/chatview.h
+++ b/kopete/kopete/chatwindow/chatview.h
@@ -22,7 +22,7 @@
#include "kopeteviewplugin.h"
#include <kdockwidget.h>
#include <ktextedit.h> // for covariant return type of editWidget
-#include <qptrdict.h>
+#include <tqptrdict.h>
class QTimer;
@@ -69,7 +69,7 @@ public:
* Adds text into the edit area. Used when you select an emoticon
* @param text The text to be inserted
*/
- void addText( const QString &text );
+ void addText( const TQString &text );
/**
* Saves window settings such as splitter positions
@@ -101,7 +101,7 @@ public:
/**
* Sets the text to be displayed on tab label and window caption
*/
- void setCaption( const QString &text, bool modified );
+ void setCaption( const TQString &text, bool modified );
/**
* Changes the pointer to the chat window. Used to re-parent the view
@@ -155,9 +155,9 @@ public:
*/
bool visibleMembersList();
- const QString &statusText();
+ const TQString &statusText();
- QString &caption() const;
+ TQString &caption() const;
bool sendInProgress();
@@ -171,17 +171,17 @@ public:
virtual bool isVisible();
/** Reimplemented from KopeteView **/
- virtual QWidget *mainWidget();
+ virtual TQWidget *mainWidget();
KTextEdit *editWidget();
bool canSend();
/** Reimplemented from KopeteView **/
- virtual void registerContextMenuHandler( QObject *target, const char* slot );
+ virtual void registerContextMenuHandler( TQObject *target, const char* slot );
/** Reimplemented from KopeteView **/
- virtual void registerTooltipHandler( QObject *target, const char* slot );
+ virtual void registerTooltipHandler( TQObject *target, const char* slot );
public slots:
/**
@@ -205,16 +205,16 @@ public slots:
/**
* Sets the foreground color of the entry area, and outgoing messages
- * @param newColor The new foreground color. If this is QColor(), then
+ * @param newColor The new foreground color. If this is TQColor(), then
* a color chooser dialog is opened
*/
- void setFgColor( const QColor &newColor = QColor() );
+ void setFgColor( const TQColor &newColor = TQColor() );
/**
* Sets the font of the edit area and outgoing messages to the specified value.
* @param newFont The new font to use.
*/
- void setFont( const QFont &newFont );
+ void setFont( const TQFont &newFont );
/**
* show a Font dialog and set the font selected by the user
@@ -224,14 +224,14 @@ public slots:
/**
* Get the font used in the format toolbar for Rich Text formatting
*/
- QFont font();
+ TQFont font();
/**
* Sets the background color of the entry area, and outgoing messages
- * @param newColor The new background color. If this is QColor(), then
+ * @param newColor The new background color. If this is TQColor(), then
* a color chooser dialog is opened
*/
- void setBgColor( const QColor &newColor = QColor() );
+ void setBgColor( const TQColor &newColor = TQColor() );
/**
* Sends the text currently entered into the edit area
@@ -256,7 +256,7 @@ public slots:
* Sets the text to be displayed on the status label
* @param text The text to be displayed
*/
- void setStatusText( const QString &text );
+ void setStatusText( const TQString &text );
/** Reimplemented from KopeteView **/
virtual void messageSentSuccessfully();
@@ -286,13 +286,13 @@ signals:
void updateStatusIcon( ChatView* );
/** Emitted when a possible tab tooltip needs updating */
- void updateChatTooltip( ChatView*, const QString& );
+ void updateChatTooltip( ChatView*, const TQString& );
/** Emitted when the state of the chat changes */
void updateChatState( ChatView*, int );
/** Emitted when a possible tab label needs updating */
- void updateChatLabel( ChatView*, const QString& );
+ void updateChatLabel( ChatView*, const TQString& );
/**
* Our send-button-enabled flag has changed
@@ -316,7 +316,7 @@ private slots:
/**
* Show that a contact changed his nickname when a metacontact is not avaiable.
*/
- void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue );
+ void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue );
/**
* Called when a contact is added to the chat session.
@@ -334,7 +334,7 @@ private slots:
* @param format The format of the reason message
* @param suppressNotification mean that no notifications are showed
*/
- void slotContactRemoved( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false );
+ void slotContactRemoved( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false );
/**
* Called when a contact changes status, updates the display name, status icon and tab bar state.
@@ -357,11 +357,11 @@ private slots:
/**
* Show that a (meta)contact change his display name.
*/
- void slotDisplayNameChanged(const QString &oldValue, const QString &newValue);
+ void slotDisplayNameChanged(const TQString &oldValue, const TQString &newValue);
protected:
- virtual void dragEnterEvent ( QDragEnterEvent * );
- virtual void dropEvent ( QDropEvent * );
+ virtual void dragEnterEvent ( TQDragEnterEvent * );
+ virtual void dropEvent ( TQDropEvent * );
private:
// widget stuff
@@ -384,9 +384,9 @@ private:
MembersListPolicy membersStatus;
// miscellany
- QPtrDict<QTimer> m_remoteTypingMap;
- QString unreadMessageFrom;
- QString m_status;
+ TQPtrDict<TQTimer> m_remoteTypingMap;
+ TQString unreadMessageFrom;
+ TQString m_status;
void updateChatState( KopeteTabState state = Undefined );
@@ -400,7 +400,7 @@ private:
*/
void readOptions();
- void sendInternalMessage( const QString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText );
+ void sendInternalMessage( const TQString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText );
KopeteChatViewPrivate *d;
};
@@ -411,7 +411,7 @@ private:
class ChatWindowPlugin : public Kopete::ViewPlugin
{
public:
- ChatWindowPlugin(QObject *parent, const char *name, const QStringList &args);
+ ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &args);
KopeteView* createView( Kopete::ChatSession *manager );
};
diff --git a/kopete/kopete/chatwindow/emoticonselector.cpp b/kopete/kopete/chatwindow/emoticonselector.cpp
index e6802b45..47dd1a59 100644
--- a/kopete/kopete/chatwindow/emoticonselector.cpp
+++ b/kopete/kopete/chatwindow/emoticonselector.cpp
@@ -24,25 +24,25 @@
#include <math.h>
-#include <qmovie.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qtooltip.h>
-#include <qobjectlist.h>
+#include <tqmovie.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqtooltip.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent, const char *name)
- : QLabel(parent,name)
+EmoticonLabel::EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent, const char *name)
+ : TQLabel(parent,name)
{
mText = emoticonText;
- setMovie( QMovie(pixmapPath) );
+ setMovie( TQMovie(pixmapPath) );
setAlignment(Qt::AlignCenter);
- QToolTip::add(this,emoticonText);
- // Somehow QLabel doesn't tell a reasonable size when you use setMovie
+ TQToolTip::add(this,emoticonText);
+ // Somehow TQLabel doesn't tell a reasonable size when you use setMovie
// although it does it correctly for setPixmap. Therefore here is a little workaround
// to tell our minimum size.
- QPixmap p(pixmapPath);
+ TQPixmap p(pixmapPath);
//
// Some of the custom icons are rather large
// so lets limit them to a maximum size for this display panel
@@ -52,13 +52,13 @@ EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapP
setMinimumSize(p.size());
}
-void EmoticonLabel::mouseReleaseEvent(QMouseEvent*)
+void EmoticonLabel::mouseReleaseEvent(TQMouseEvent*)
{
emit clicked(mText);
}
-EmoticonSelector::EmoticonSelector(QWidget *parent, const char *name)
- : QWidget(parent, name)
+EmoticonSelector::EmoticonSelector(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
// kdDebug(14000) << k_funcinfo << "called." << endl;
lay = 0L;
@@ -69,13 +69,13 @@ void EmoticonSelector::prepareList(void)
// kdDebug(14000) << k_funcinfo << "called." << endl;
int row = 0;
int col = 0;
- QMap<QString, QStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
+ TQMap<TQString, TQStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
int emoticonsPerRow = static_cast<int>(sqrt(list.count()));
//kdDebug(14000) << "emoticonsPerRow=" << emoticonsPerRow << endl;
if ( lay )
{
- QObjectList *objList = queryList( "EmoticonLabel" );
+ TQObjectList *objList = queryList( "EmoticonLabel" );
//kdDebug(14000) << k_funcinfo << "There are " << objList->count() << " EmoticonLabels to delete." << endl;
objList->setAutoDelete(true);
objList->clear();
@@ -83,13 +83,13 @@ void EmoticonSelector::prepareList(void)
delete lay;
}
- lay = new QGridLayout(this, 0, 0, 4, 4, "emoticonLayout");
+ lay = new TQGridLayout(this, 0, 0, 4, 4, "emoticonLayout");
movieList.clear();
- for (QMap<QString, QStringList>::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
+ for (TQMap<TQString, TQStringList>::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
{
- QWidget *w = new EmoticonLabel(it.data().first(), it.key(), this);
- movieList.push_back( ((QLabel*)w)->movie() );
- connect(w, SIGNAL(clicked(const QString&)), this, SLOT(emoticonClicked(const QString&)));
+ TQWidget *w = new EmoticonLabel(it.data().first(), it.key(), this);
+ movieList.push_back( ((TQLabel*)w)->movie() );
+ connect(w, TQT_SIGNAL(clicked(const TQString&)), this, TQT_SLOT(emoticonClicked(const TQString&)));
// kdDebug(14000) << "adding Emoticon to row=" << row << ", col=" << col << "." << endl;
lay->addWidget(w, row, col);
if ( col == emoticonsPerRow )
@@ -103,19 +103,19 @@ void EmoticonSelector::prepareList(void)
resize(minimumSizeHint());
}
-void EmoticonSelector::emoticonClicked(const QString &str)
+void EmoticonSelector::emoticonClicked(const TQString &str)
{
// kdDebug(14000) << "selected emoticon '" << str << "'" << endl;
// KDE4/Qt TODO: use qobject_cast instead.
emit ItemSelected ( str );
if ( isVisible() && parentWidget() &&
- parentWidget()->inherits("QPopupMenu") )
+ parentWidget()->inherits("TQPopupMenu") )
{
parentWidget()->close();
}
}
-void EmoticonSelector::hideEvent( QHideEvent* )
+void EmoticonSelector::hideEvent( TQHideEvent* )
{
kdDebug( 14000 ) << k_funcinfo << endl;
MovieList::iterator it;
@@ -125,7 +125,7 @@ void EmoticonSelector::hideEvent( QHideEvent* )
}
}
-void EmoticonSelector::showEvent( QShowEvent* )
+void EmoticonSelector::showEvent( TQShowEvent* )
{
kdDebug( 14000 ) << k_funcinfo << endl;
MovieList::iterator it;
diff --git a/kopete/kopete/chatwindow/emoticonselector.h b/kopete/kopete/chatwindow/emoticonselector.h
index 7d7b4842..df51a5b6 100644
--- a/kopete/kopete/chatwindow/emoticonselector.h
+++ b/kopete/kopete/chatwindow/emoticonselector.h
@@ -20,8 +20,8 @@
#ifndef __emoticonselector_h__
#define __emoticonselector_h__
-#include <qlabel.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
class QGridLayout;
class QHideEvent;
class QShowEvent;
@@ -31,15 +31,15 @@ class EmoticonLabel : public QLabel
Q_OBJECT
public:
- EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent=0, const char *name=0);
+ EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent=0, const char *name=0);
// ~EmoticonLabel();
signals:
- void clicked(const QString &text);
+ void clicked(const TQString &text);
protected:
- void mouseReleaseEvent(QMouseEvent*);
- QString mText;
+ void mouseReleaseEvent(TQMouseEvent*);
+ TQString mText;
};
class EmoticonSelector : public QWidget
@@ -48,28 +48,28 @@ class EmoticonSelector : public QWidget
public:
- EmoticonSelector ( QWidget *parent = 0, const char *name = 0 );
+ EmoticonSelector ( TQWidget *parent = 0, const char *name = 0 );
// ~EmoticonSelector();
- typedef QValueList<QMovie*> MovieList;
+ typedef TQValueList<TQMovie*> MovieList;
signals:
/**
* gets emitted when an emoticon has been selected from the list
- * the QString holds the emoticon as a string or is 0L if nothing was selected
+ * the TQString holds the emoticon as a string or is 0L if nothing was selected
**/
- void ItemSelected(const QString &);
+ void ItemSelected(const TQString &);
public slots:
void prepareList();
protected:
- virtual void hideEvent( QHideEvent* );
- virtual void showEvent( QShowEvent* );
+ virtual void hideEvent( TQHideEvent* );
+ virtual void showEvent( TQShowEvent* );
MovieList movieList;
- QGridLayout *lay;
+ TQGridLayout *lay;
protected slots:
- void emoticonClicked(const QString &);
+ void emoticonClicked(const TQString &);
};
#endif
diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp
index 2af1426d..ad002edc 100644
--- a/kopete/kopete/chatwindow/kopetechatwindow.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp
@@ -19,12 +19,12 @@
*************************************************************************
*/
-#include <qtimer.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfileinfo.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kcursor.h>
@@ -63,13 +63,13 @@
#include "kopetestdaction.h"
#include "kopeteviewmanager.h"
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kactionclasses.h>
-typedef QMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
-typedef QMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
-typedef QMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
-typedef QPtrList<KopeteChatWindow> WindowList;
+typedef TQMap<Kopete::Account*,KopeteChatWindow*> AccountMap;
+typedef TQMap<Kopete::Group*,KopeteChatWindow*> GroupMap;
+typedef TQMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
+typedef TQPtrList<KopeteChatWindow> WindowList;
namespace
{
@@ -164,7 +164,7 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager )
return myWindow;
}
-KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
+KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name )
: KParts::MainWindow( parent, name )
{
m_activeView = 0L;
@@ -175,28 +175,28 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
initActions();
- QVBox *vBox = new QVBox( this );
+ TQVBox *vBox = new TQVBox( this );
vBox->setLineWidth( 0 );
vBox->setSpacing( 0 );
- vBox->setFrameStyle( QFrame::NoFrame );
+ vBox->setFrameStyle( TQFrame::NoFrame );
// set default window size. This could be removed by fixing the size hints of the contents
resize( 500, 500 );
setCentralWidget( vBox );
- mainArea = new QFrame( vBox );
+ mainArea = new TQFrame( vBox );
mainArea->setLineWidth( 0 );
- mainArea->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- mainLayout = new QVBoxLayout( mainArea );
+ mainArea->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
+ mainLayout = new TQVBoxLayout( mainArea );
if ( KopetePrefs::prefs()->chatWShowSend() )
{
//Send Button
m_button_send = new KPushButton( i18n("Send"), statusBar() );
- m_button_send->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ m_button_send->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
m_button_send->setEnabled( false );
m_button_send->setFont( statusBar()->font() );
m_button_send->setFixedHeight( statusBar()->sizeHint().height() );
- connect( m_button_send, SIGNAL( clicked() ), this, SLOT( slotSendMessage() ) );
+ connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) );
statusBar()->addWidget( m_button_send, 0, true );
}
else
@@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name )
windows.append( this );
windowListChanged();
- KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") );
- m_alwaysShowTabs = KGlobal::config()->readBoolEntry( QString::fromLatin1("AlwaysShowTabs"), false );
- m_showFormatToolbar = KGlobal::config()->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true );
+ KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
+ m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false );
+ m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true );
adjustingFormatToolbar = false;
// kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl;
kapp->ref();
@@ -273,7 +273,7 @@ KopeteChatWindow::~KopeteChatWindow()
void KopeteChatWindow::windowListChanged()
{
// update all windows' Move Tab to Window action
- for ( QPtrListIterator<KopeteChatWindow> it( windows ); *it; ++it )
+ for ( TQPtrListIterator<KopeteChatWindow> it( windows ); *it; ++it )
(*it)->checkDetachEnable();
}
@@ -283,7 +283,7 @@ void KopeteChatWindow::slotNickComplete()
m_activeView->nickComplete();
}
-void KopeteChatWindow::slotTabContextMenu( QWidget *tab, const QPoint &pos )
+void KopeteChatWindow::slotTabContextMenu( TQWidget *tab, const TQPoint &pos )
{
m_popupView = static_cast<ChatView*>( tab );
@@ -313,101 +313,101 @@ void KopeteChatWindow::initActions(void)
createStandardStatusBarAction();
- chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), QKeySequence(Key_Return) ,
- this, SLOT( slotSendMessage() ), coll, "chat_send" );
+ chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) ,
+ this, TQT_SLOT( slotSendMessage() ), coll, "chat_send" );
chatSend->setEnabled( false );
- KStdAction::save ( this, SLOT(slotChatSave()), coll );
- KStdAction::print ( this, SLOT(slotChatPrint()), coll );
- KAction* quitAction = KStdAction::quit ( this, SLOT(close()), coll );
+ KStdAction::save ( this, TQT_SLOT(slotChatSave()), coll );
+ KStdAction::print ( this, TQT_SLOT(slotChatPrint()), coll );
+ KAction* quitAction = KStdAction::quit ( this, TQT_SLOT(close()), coll );
quitAction->setText( i18n("Close All Chats") );
- tabClose = KStdAction::close ( this, SLOT(slotChatClosed()), coll, "tabs_close" );
+ tabClose = KStdAction::close ( this, TQT_SLOT(slotChatClosed()), coll, "tabs_close" );
tabRight=new KAction( i18n( "&Activate Next Tab" ), 0, KStdAccel::tabNext(),
- this, SLOT( slotNextTab() ), coll, "tabs_right" );
+ this, TQT_SLOT( slotNextTab() ), coll, "tabs_right" );
tabLeft=new KAction( i18n( "&Activate Previous Tab" ), 0, KStdAccel::tabPrev(),
- this, SLOT( slotPreviousTab() ), coll, "tabs_left" );
+ this, TQT_SLOT( slotPreviousTab() ), coll, "tabs_left" );
tabLeft->setEnabled( false );
tabRight->setEnabled( false );
- nickComplete = new KAction( i18n( "Nic&k Completion" ), QString::null, 0, this, SLOT( slotNickComplete() ), coll , "nick_compete");
- nickComplete->setShortcut( QKeySequence( Key_Tab ) );
+ nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString::null, 0, this, TQT_SLOT( slotNickComplete() ), coll , "nick_compete");
+ nickComplete->setShortcut( TQKeySequence( Key_Tab ) );
- tabDetach = new KAction( i18n( "&Detach Chat" ), QString::fromLatin1( "tab_breakoff" ), 0,
- this, SLOT( slotDetachChat() ), coll, "tabs_detach" );
+ tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0,
+ this, TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" );
tabDetach->setEnabled( false );
- actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), QString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" );
+ actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" );
actionDetachMenu->setDelayed( false );
- connect ( actionDetachMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareDetachMenu()) );
- connect ( actionDetachMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotDetachChat(int)) );
+ connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) );
+ connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDetachChat(int)) );
actionTabPlacementMenu = new KActionMenu( i18n( "&Tab Placement" ), coll, "tabs_placement" );
- connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPreparePlacementMenu()) );
- connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotPlaceTabs(int)) );
+ connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPreparePlacementMenu()) );
+ connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPlaceTabs(int)) );
- tabDetach->setShortcut( QKeySequence(CTRL + SHIFT + Key_B) );
+ tabDetach->setShortcut( TQKeySequence(CTRL + SHIFT + Key_B) );
- KStdAction::cut( this, SLOT(slotCut()), coll);
- KStdAction::copy( this, SLOT(slotCopy()), coll);
- KStdAction::paste( this, SLOT(slotPaste()), coll);
+ KStdAction::cut( this, TQT_SLOT(slotCut()), coll);
+ KStdAction::copy( this, TQT_SLOT(slotCopy()), coll);
+ KStdAction::paste( this, TQT_SLOT(slotPaste()), coll);
- new KAction( i18n( "Set Default &Font..." ), QString::fromLatin1( "charset" ), 0, this, SLOT( slotSetFont() ), coll, "format_font" );
- new KAction( i18n( "Set Default Text &Color..." ), QString::fromLatin1( "pencil" ), 0, this, SLOT( slotSetFgColor() ), coll, "format_fgcolor" );
- new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, this, SLOT( slotSetBgColor() ), coll, "format_bgcolor" );
+ new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, this, TQT_SLOT( slotSetFont() ), coll, "format_font" );
+ new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, this, TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" );
+ new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, this, TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" );
- historyUp = new KAction( i18n( "Previous History" ), QString::null, 0,
- this, SLOT( slotHistoryUp() ), coll, "history_up" );
- historyUp->setShortcut( QKeySequence(CTRL + Key_Up) );
+ historyUp = new KAction( i18n( "Previous History" ), TQString::null, 0,
+ this, TQT_SLOT( slotHistoryUp() ), coll, "history_up" );
+ historyUp->setShortcut( TQKeySequence(CTRL + Key_Up) );
- historyDown = new KAction( i18n( "Next History" ), QString::null, 0,
- this, SLOT( slotHistoryDown() ), coll, "history_down" );
- historyDown->setShortcut( QKeySequence(CTRL + Key_Down) );
+ historyDown = new KAction( i18n( "Next History" ), TQString::null, 0,
+ this, TQT_SLOT( slotHistoryDown() ), coll, "history_down" );
+ historyDown->setShortcut( TQKeySequence(CTRL + Key_Down) );
- KStdAction::prior( this, SLOT( slotPageUp() ), coll, "scroll_up" );
- KStdAction::next( this, SLOT( slotPageDown() ), coll, "scroll_down" );
+ KStdAction::prior( this, TQT_SLOT( slotPageUp() ), coll, "scroll_up" );
+ KStdAction::next( this, TQT_SLOT( slotPageDown() ), coll, "scroll_down" );
- KStdAction::showMenubar( this, SLOT(slotViewMenuBar()), coll );
+ KStdAction::showMenubar( this, TQT_SLOT(slotViewMenuBar()), coll );
- membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), QString::null, 0,
- this, SLOT( slotViewMembersLeft() ), coll, "options_membersleft" );
- membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), QString::null, 0,
- this, SLOT( slotViewMembersRight() ), coll, "options_membersright" );
- toggleMembers = new KToggleAction( i18n( "Show" ), QString::null, 0,
- this, SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" );
+ membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), TQString::null, 0,
+ this, TQT_SLOT( slotViewMembersLeft() ), coll, "options_membersleft" );
+ membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), TQString::null, 0,
+ this, TQT_SLOT( slotViewMembersRight() ), coll, "options_membersright" );
+ toggleMembers = new KToggleAction( i18n( "Show" ), TQString::null, 0,
+ this, TQT_SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" );
toggleMembers->setCheckedState(i18n("Hide"));
- toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), QString::null, 0,
- this, SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" );
+ toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), TQString::null, 0,
+ this, TQT_SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" );
toggleAutoSpellCheck->setChecked( true );
actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" );
actionSmileyMenu->setDelayed( false );
- connect(actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &)));
+ connect(actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &)));
actionContactMenu = new KActionMenu(i18n("Co&ntacts"), coll, "contacts_menu" );
actionContactMenu->setDelayed( false );
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareContactMenu()) );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareContactMenu()) );
// add configure key bindings menu item
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll );
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll );
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), coll);
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), coll);
KopeteStdAction::preferences( coll , "settings_prefs" );
//The Sending movie
- normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) );
- animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar);
+ normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) );
+ animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
// Pause the animation because otherwise it's running even when we're not
// showing it. This eats resources, and also triggers a pixmap leak in
- // QMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta
+ // TQMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta
if( !animIcon.isNull() ) //and another QT bug: it crash if we pause a null movie
animIcon.pause();
// we can't set the tool bar as parent, if we do, it will be deleted when we configure toolbars
- anim = new QLabel( QString::null, 0L ,"kde toolbar widget" );
+ anim = new TQLabel( TQString::null, 0L ,"kde toolbar widget" );
anim->setMargin(5);
anim->setPixmap( normalIcon );
@@ -418,20 +418,20 @@ void KopeteChatWindow::initActions(void)
//toolBar()->alignItemRight( 99 );
setStandardToolBarMenuEnabled( true );
- setXMLFile( QString::fromLatin1( "kopetechatwindow.rc" ) );
+ setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) );
createGUI( 0L );
// Special handling for remembering whether the format toolbar is visible or not
- connect ( toolBar("formatToolBar"), SIGNAL(visibilityChanged(bool)), this, SLOT(slotToggleFormatToolbar(bool)) );
+ connect ( toolBar("formatToolBar"), TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotToggleFormatToolbar(bool)) );
}
-const QString KopeteChatWindow::fileContents( const QString &path ) const
+const TQString KopeteChatWindow::fileContents( const TQString &path ) const
{
- QString contents;
- QFile file( path );
+ TQString contents;
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
contents = stream.read();
file.close();
}
@@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor()
m_activeView->setBgColor();
}
-void KopeteChatWindow::setStatus(const QString &text)
+void KopeteChatWindow::setStatus(const TQString &text)
{
m_status_text->setText(text);
}
@@ -590,28 +590,28 @@ void KopeteChatWindow::createTabBar()
{
if( !m_tabBar )
{
- KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") );
+ KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
m_tabBar = new KTabWidget( mainArea );
- m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( QString::fromLatin1("HoverClose"), false ));
+ m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
+ m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false ));
m_tabBar->setTabReorderingEnabled(true);
#if KDE_IS_VERSION(3,4,0)
m_tabBar->setAutomaticResizeTabs(true);
#endif
- connect( m_tabBar, SIGNAL( closeRequest( QWidget* )), this, SLOT( slotCloseChat( QWidget* ) ) );
+ connect( m_tabBar, TQT_SIGNAL( closeRequest( TQWidget* )), this, TQT_SLOT( slotCloseChat( TQWidget* ) ) );
- QToolButton* m_rightWidget = new QToolButton( m_tabBar );
- connect( m_rightWidget, SIGNAL( clicked() ), this, SLOT( slotChatClosed() ) );
+ TQToolButton* m_rightWidget = new TQToolButton( m_tabBar );
+ connect( m_rightWidget, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChatClosed() ) );
m_rightWidget->setIconSet( SmallIcon( "tab_remove" ) );
m_rightWidget->adjustSize();
- QToolTip::add( m_rightWidget, i18n("Close the current tab"));
- m_tabBar->setCornerWidget( m_rightWidget, QWidget::TopRight );
+ TQToolTip::add( m_rightWidget, i18n("Close the current tab"));
+ m_tabBar->setCornerWidget( m_rightWidget, TQWidget::TopRight );
mainLayout->addWidget( m_tabBar );
m_tabBar->show();
- connect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) );
- connect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) );
+ connect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) );
+ connect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) );
for( ChatView *view = chatViewList.first(); view; view = chatViewList.next() )
addTab( view );
@@ -621,35 +621,35 @@ void KopeteChatWindow::createTabBar()
else
setActiveView( chatViewList.first() );
- int tabPosition = KGlobal::config()->readNumEntry( QString::fromLatin1("Tab Placement") , 0 );
+ int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 );
slotPlaceTabs( tabPosition );
}
}
-void KopeteChatWindow::slotCloseChat( QWidget *chatView )
+void KopeteChatWindow::slotCloseChat( TQWidget *chatView )
{
static_cast<ChatView*>( chatView )->closeView();
}
void KopeteChatWindow::addTab( ChatView *view )
{
- QPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
Kopete::Contact *c=0L;
for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() )
{
if(!c || c->onlineStatus() < contact->onlineStatus())
c=contact;
}
- QPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() );
+ TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() );
- view->reparent( m_tabBar, 0, QPoint(), true );
+ view->reparent( m_tabBar, 0, TQPoint(), true );
m_tabBar->addTab( view, pluginIcon, view->caption() );
if( view == m_activeView )
view->show();
else
view->hide();
- connect( view, SIGNAL( captionChanged( bool ) ), this, SLOT( updateChatLabel() ) );
- connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
+ connect( view, TQT_SIGNAL( captionChanged( bool ) ), this, TQT_SLOT( updateChatLabel() ) );
+ connect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
view->setCaption( view->caption(), false );
}
@@ -657,8 +657,8 @@ void KopeteChatWindow::setPrimaryChatView( ChatView *view )
{
//TODO figure out what else we have to save here besides the font
//reparent clears a lot of stuff out
- QFont savedFont = view->font();
- view->reparent( mainArea, 0, QPoint(), true );
+ TQFont savedFont = view->font();
+ view->reparent( mainArea, 0, TQPoint(), true );
view->setFont( savedFont );
view->show();
@@ -670,8 +670,8 @@ void KopeteChatWindow::deleteTabBar()
{
if( m_tabBar )
{
- disconnect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) );
- disconnect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) );
+ disconnect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) );
+ disconnect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) );
if( !chatViewList.isEmpty() )
setPrimaryChatView( chatViewList.first() );
@@ -700,17 +700,17 @@ void KopeteChatWindow::attachChatView( ChatView* newView )
newView->editWidget()->installEventFilter( this );
KCursor::setAutoHideCursor( newView->editWidget(), true, true );
- connect( newView, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) );
- connect( newView, SIGNAL(messageSuccess( ChatView* )), this, SLOT(slotStopAnimation( ChatView* )) );
- connect( newView, SIGNAL(rtfEnabled( ChatView*, bool ) ), this, SLOT( slotRTFEnabled( ChatView*, bool ) ) );
- connect( newView, SIGNAL(updateStatusIcon( ChatView* ) ), this, SLOT(slotUpdateCaptionIcons( ChatView* ) ) );
- connect( newView, SIGNAL(updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) );
+ connect( newView, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) );
+ connect( newView, TQT_SIGNAL(messageSuccess( ChatView* )), this, TQT_SLOT(slotStopAnimation( ChatView* )) );
+ connect( newView, TQT_SIGNAL(rtfEnabled( ChatView*, bool ) ), this, TQT_SLOT( slotRTFEnabled( ChatView*, bool ) ) );
+ connect( newView, TQT_SIGNAL(updateStatusIcon( ChatView* ) ), this, TQT_SLOT(slotUpdateCaptionIcons( ChatView* ) ) );
+ connect( newView, TQT_SIGNAL(updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) );
updateSpellCheckAction();
checkDetachEnable();
newView->loadChatSettings();
- connect( newView, SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ),
- this, SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) );
+ connect( newView, TQT_SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ),
+ this, TQT_SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) );
}
void KopeteChatWindow::checkDetachEnable()
@@ -730,15 +730,15 @@ void KopeteChatWindow::detachChatView( ChatView *view )
if( !chatViewList.removeRef( view ) )
return;
- disconnect( view, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) );
- disconnect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
- disconnect( view, SIGNAL( updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) );
+ disconnect( view, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) );
+ disconnect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) );
+ disconnect( view, TQT_SIGNAL( updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) );
view->editWidget()->removeEventFilter( this );
if( m_tabBar )
{
int curPage = m_tabBar->currentPageIndex();
- QWidget *page = m_tabBar->page( curPage );
+ TQWidget *page = m_tabBar->page( curPage );
// if the current view is to be detached, switch to a different one
if( page == view )
@@ -818,7 +818,7 @@ void KopeteChatWindow::slotSetCaption( bool active )
}
}
-void KopeteChatWindow::updateBackground( const QPixmap &pm )
+void KopeteChatWindow::updateBackground( const TQPixmap &pm )
{
if( updateBg )
{
@@ -829,13 +829,13 @@ void KopeteChatWindow::updateBackground( const QPixmap &pm )
backgroundFile->unlink();
}
- backgroundFile = new KTempFile( QString::null, QString::fromLatin1( ".bmp" ) );
+ backgroundFile = new KTempFile( TQString::null, TQString::fromLatin1( ".bmp" ) );
pm.save( backgroundFile->name(), "BMP" );
- QTimer::singleShot( 100, this, SLOT( slotEnableUpdateBg() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) );
}
}
-void KopeteChatWindow::setActiveView( QWidget *widget )
+void KopeteChatWindow::setActiveView( TQWidget *widget )
{
ChatView *view = static_cast<ChatView*>(widget);
@@ -844,7 +844,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget )
if(m_activeView)
{
- disconnect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) );
+ disconnect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) );
guiFactory()->removeClient(m_activeView->msgManager());
m_activeView->saveChatSettings();
}
@@ -860,7 +860,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget )
if( !chatViewList.contains( view ) )
attachChatView( view );
- connect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) );
+ connect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) );
//Tell it it is active
m_activeView->setActive( true );
@@ -905,7 +905,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view )
if ( !view )
return; //(pas de charité)
- QPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
+ TQPtrList<Kopete::Contact> chatMembers=view->msgManager()->members();
Kopete::Contact *c=0L;
for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() )
{
@@ -915,9 +915,9 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view )
if ( view == m_activeView )
{
- QPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) :
+ TQPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) :
SmallIcon( view->msgManager()->protocol()->pluginIcon() );
- QPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) :
+ TQPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) :
SmallIcon( view->msgManager()->protocol()->pluginIcon() );
KWin::setIcons( winId(), icon32, icon16 );
}
@@ -937,7 +937,7 @@ void KopeteChatWindow::slotChatClosed()
void KopeteChatWindow::slotPrepareDetachMenu(void)
{
- QPopupMenu *detachMenu = actionDetachMenu->popupMenu();
+ TQPopupMenu *detachMenu = actionDetachMenu->popupMenu();
detachMenu->clear();
for ( unsigned id=0; id < windows.count(); id++ )
@@ -963,7 +963,7 @@ void KopeteChatWindow::slotSendMessage()
void KopeteChatWindow::slotPrepareContactMenu(void)
{
- QPopupMenu *contactsMenu = actionContactMenu->popupMenu();
+ TQPopupMenu *contactsMenu = actionContactMenu->popupMenu();
contactsMenu->clear();
Kopete::Contact *contact;
@@ -982,8 +982,8 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
for ( contact = m_them.first(); contact; contact = m_them.next() )
{
KPopupMenu *p = contact->popupMenu();
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()),
- p, SLOT(deleteLater() ) );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()),
+ p, TQT_SLOT(deleteLater() ) );
if( contact->metaContact() )
contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p );
@@ -994,9 +994,9 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
if( ++contactCount == 15 && contact != m_them.getLast() )
{
KActionMenu *moreMenu = new KActionMenu( i18n("More..."),
- QString::fromLatin1("folder_open"), contactsMenu );
- connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()),
- moreMenu, SLOT(deleteLater() ) );
+ TQString::fromLatin1("folder_open"), contactsMenu );
+ connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()),
+ moreMenu, TQT_SLOT(deleteLater() ) );
moreMenu->plug( contactsMenu );
contactsMenu = moreMenu->popupMenu();
contactCount = 0;
@@ -1006,7 +1006,7 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
void KopeteChatWindow::slotPreparePlacementMenu()
{
- QPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu();
+ TQPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu();
placementMenu->clear();
placementMenu->insertItem( i18n("Top"), 0 );
@@ -1019,9 +1019,9 @@ void KopeteChatWindow::slotPlaceTabs( int placement )
{
if( placement == 0 )
- m_tabBar->setTabPosition( QTabWidget::Top );
+ m_tabBar->setTabPosition( TQTabWidget::Top );
else
- m_tabBar->setTabPosition( QTabWidget::Bottom );
+ m_tabBar->setTabPosition( TQTabWidget::Bottom );
saveOptions();
}
@@ -1032,9 +1032,9 @@ void KopeteChatWindow::readOptions()
// load and apply config file settings affecting the appearance of the UI
// kdDebug(14010) << k_funcinfo << endl;
KConfig *config = KGlobal::config();
- applyMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) );
- config->setGroup( QString::fromLatin1("ChatWindowSettings") );
- m_showFormatToolbar = config->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true );
+ applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) );
+ config->setGroup( TQString::fromLatin1("ChatWindowSettings") );
+ m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true );
}
void KopeteChatWindow::saveOptions()
@@ -1044,12 +1044,12 @@ void KopeteChatWindow::saveOptions()
KConfig *config = KGlobal::config();
// saves menubar,toolbar and statusbar setting
- saveMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) );
- config->setGroup( QString::fromLatin1("ChatWindowSettings") );
+ saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) );
+ config->setGroup( TQString::fromLatin1("ChatWindowSettings") );
if( m_tabBar )
- config->writeEntry ( QString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() );
+ config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() );
- config->writeEntry( QString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar );
+ config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar );
config->sync();
}
@@ -1094,7 +1094,7 @@ void KopeteChatWindow::slotViewMenuBar()
menuBar()->show();
}
-void KopeteChatWindow::slotSmileyActivated(const QString &sm)
+void KopeteChatWindow::slotSmileyActivated(const TQString &sm)
{
if ( !sm.isNull() )
m_activeView->addText( " " + sm + " " );
@@ -1130,10 +1130,10 @@ bool KopeteChatWindow::queryClose()
bool canClose = true;
// kdDebug( 14010 ) << " Windows left open:" << endl;
-// for( QPtrListIterator<ChatView> it( chatViewList ); it; ++it)
+// for( TQPtrListIterator<ChatView> it( chatViewList ); it; ++it)
// kdDebug( 14010 ) << " " << *it << " (" << (*it)->caption() << ")" << endl;
- for( QPtrListIterator<ChatView> it( chatViewList ); it; )
+ for( TQPtrListIterator<ChatView> it( chatViewList ); it; )
{
ChatView *view = *it;
// move out of the way before view is removed
@@ -1169,7 +1169,7 @@ bool KopeteChatWindow::queryExit()
return false;
}
-void KopeteChatWindow::closeEvent( QCloseEvent * e )
+void KopeteChatWindow::closeEvent( TQCloseEvent * e )
{
// if there's a system tray applet and we are not shutting down then just do what needs to be done if a
// window is closed.
@@ -1197,7 +1197,7 @@ void KopeteChatWindow::slotConfKeys()
if( m_activeView )
{
dlg.insert(m_activeView->msgManager()->actionCollection() , i18n("Plugin Actions") );
- QPtrListIterator<KXMLGUIClient> it( *m_activeView->msgManager()->childClients() );
+ TQPtrListIterator<KXMLGUIClient> it( *m_activeView->msgManager()->childClients() );
KXMLGUIClient *c = 0;
while( (c = it.current()) != 0 )
{
@@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys()
void KopeteChatWindow::slotConfToolbar()
{
- saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" ));
+ saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
KEditToolbar *dlg = new KEditToolbar(factory(), this );
if (dlg->exec())
{
@@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar()
createGUI( m_activeView->editPart() );
else
createGUI( 0L );
- applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" ));
+ applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
}
delete dlg;
}
@@ -1256,7 +1256,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState )
void KopeteChatWindow::updateChatTooltip( ChatView* cv )
{
if ( m_tabBar )
- m_tabBar->setTabToolTip( cv, QString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
+ m_tabBar->setTabToolTip( cv, TQString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
}
void KopeteChatWindow::updateChatLabel()
@@ -1269,7 +1269,7 @@ void KopeteChatWindow::updateChatLabel()
if ( m_tabBar )
{
m_tabBar->setTabLabel( chat, chat->caption() );
- if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast<const QWidget *>(cv) )
+ if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast<const TQWidget *>(cv) )
setCaption( chat->caption() );
}
}
diff --git a/kopete/kopete/chatwindow/kopetechatwindow.h b/kopete/kopete/chatwindow/kopetechatwindow.h
index 39277d86..6b896d81 100644
--- a/kopete/kopete/chatwindow/kopetechatwindow.h
+++ b/kopete/kopete/chatwindow/kopetechatwindow.h
@@ -20,7 +20,7 @@
#define KOPETECHATWINDOW_H
#include <kparts/mainwindow.h>
-#include <qmovie.h>
+#include <tqmovie.h>
#include "kopetecontact.h"
#include "kdeversion.h"
@@ -48,7 +48,7 @@ class Message;
class ChatSession;
class Contact;
class Protocol;
-typedef QPtrList<Contact> ContactPtrList;
+typedef TQPtrList<Contact> ContactPtrList;
}
class KopeteChatWindow : public KParts::MainWindow
@@ -92,7 +92,7 @@ public:
ChatView *activeView();
void updateMembersActions();
- void setStatus( const QString & );
+ void setStatus( const TQString & );
/**
* Reimplemented from KMainWindow - asks each ChatView in the window if it is ok to close the window
@@ -102,11 +102,11 @@ public:
virtual bool queryExit();
KTempFile *backgroundFile;
- QPtrList<ChatView> chatViewList;
+ TQPtrList<ChatView> chatViewList;
private:
// All KopeteChatWindows are created by the window function
- KopeteChatWindow( QWidget *parent = 0, const char* name = "KopeteChatWindow" );
+ KopeteChatWindow( TQWidget *parent = 0, const char* name = "KopeteChatWindow" );
/**
* The window list has changed:
@@ -122,7 +122,7 @@ private:
void deleteTabBar();
void addTab( ChatView* );
void setPrimaryChatView( ChatView* );
- const QString fileContents( const QString &file ) const;
+ const TQString fileContents( const TQString &file ) const;
ChatView *m_activeView;
ChatView *m_popupView;
@@ -133,11 +133,11 @@ private:
KTabWidget *m_tabBar;
KPushButton *m_button_send;
KSqueezedTextLabel *m_status_text;
- QVBoxLayout *mainLayout;
- QFrame *mainArea;
- QLabel *anim;
- QMovie animIcon;
- QPixmap normalIcon;
+ TQVBoxLayout *mainLayout;
+ TQFrame *mainArea;
+ TQLabel *anim;
+ TQMovie animIcon;
+ TQPixmap normalIcon;
KAction *chatSend;
KAction *historyUp;
@@ -161,15 +161,15 @@ private:
KActionMenu *actionContactMenu;
KActionMenu *actionDetachMenu;
KActionMenu *actionTabPlacementMenu;
- QString statusMsg;
+ TQString statusMsg;
signals:
void closing( KopeteChatWindow* );
public slots:
- void slotSmileyActivated( const QString & );
- void setActiveView( QWidget *active );
- void updateBackground( const QPixmap &pm );
+ void slotSmileyActivated( const TQString & );
+ void setActiveView( TQWidget *active );
+ void updateBackground( const TQPixmap &pm );
private slots:
// void slotPrepareSmileyMenu();
@@ -219,10 +219,10 @@ private slots:
void slotSetCaption( bool );
void slotUpdateCaptionIcons( ChatView * );
void slotChatClosed();
- void slotTabContextMenu( QWidget*, const QPoint & );
+ void slotTabContextMenu( TQWidget*, const TQPoint & );
void slotStopAnimation( ChatView* );
void slotNickComplete();
- void slotCloseChat( QWidget* );
+ void slotCloseChat( TQWidget* );
//slots for tabs from the chatview widget
void updateChatState( ChatView* cv, int state );
@@ -233,7 +233,7 @@ private:
void updateSpellCheckAction();
protected:
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
virtual void windowActivationChange( bool );
};
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp
index 3e15281f..76e7fd54 100644
--- a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp
@@ -18,10 +18,10 @@
#include "kopetechatwindowstyle.h"
// Qt includes
-#include <qfile.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
// KDE includes
#include <kdebug.h>
@@ -30,39 +30,39 @@
class ChatWindowStyle::Private
{
public:
- QString stylePath;
+ TQString stylePath;
StyleVariants variantsList;
- QString baseHref;
- QString currentVariantPath;
+ TQString baseHref;
+ TQString currentVariantPath;
- QString headerHtml;
- QString footerHtml;
- QString incomingHtml;
- QString nextIncomingHtml;
- QString outgoingHtml;
- QString nextOutgoingHtml;
- QString statusHtml;
- QString actionIncomingHtml;
- QString actionOutgoingHtml;
+ TQString headerHtml;
+ TQString footerHtml;
+ TQString incomingHtml;
+ TQString nextIncomingHtml;
+ TQString outgoingHtml;
+ TQString nextOutgoingHtml;
+ TQString statusHtml;
+ TQString actionIncomingHtml;
+ TQString actionOutgoingHtml;
};
-ChatWindowStyle::ChatWindowStyle(const QString &stylePath, int styleBuildMode)
+ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, int styleBuildMode)
: d(new Private)
{
init(stylePath, styleBuildMode);
}
-ChatWindowStyle::ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode)
+ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode)
: d(new Private)
{
d->currentVariantPath = variantPath;
init(stylePath, styleBuildMode);
}
-void ChatWindowStyle::init(const QString &stylePath, int styleBuildMode)
+void ChatWindowStyle::init(const TQString &stylePath, int styleBuildMode)
{
d->stylePath = stylePath;
- d->baseHref = stylePath + QString::fromUtf8("/Contents/Resources/");
+ d->baseHref = stylePath + TQString::fromUtf8("/Contents/Resources/");
readStyleFiles();
if(styleBuildMode & StyleBuildNormal)
{
@@ -86,57 +86,57 @@ ChatWindowStyle::StyleVariants ChatWindowStyle::getVariants()
return d->variantsList;
}
-QString ChatWindowStyle::getStylePath() const
+TQString ChatWindowStyle::getStylePath() const
{
return d->stylePath;
}
-QString ChatWindowStyle::getStyleBaseHref() const
+TQString ChatWindowStyle::getStyleBaseHref() const
{
return d->baseHref;
}
-QString ChatWindowStyle::getHeaderHtml() const
+TQString ChatWindowStyle::getHeaderHtml() const
{
return d->headerHtml;
}
-QString ChatWindowStyle::getFooterHtml() const
+TQString ChatWindowStyle::getFooterHtml() const
{
return d->footerHtml;
}
-QString ChatWindowStyle::getIncomingHtml() const
+TQString ChatWindowStyle::getIncomingHtml() const
{
return d->incomingHtml;
}
-QString ChatWindowStyle::getNextIncomingHtml() const
+TQString ChatWindowStyle::getNextIncomingHtml() const
{
return d->nextIncomingHtml;
}
-QString ChatWindowStyle::getOutgoingHtml() const
+TQString ChatWindowStyle::getOutgoingHtml() const
{
return d->outgoingHtml;
}
-QString ChatWindowStyle::getNextOutgoingHtml() const
+TQString ChatWindowStyle::getNextOutgoingHtml() const
{
return d->nextOutgoingHtml;
}
-QString ChatWindowStyle::getStatusHtml() const
+TQString ChatWindowStyle::getStatusHtml() const
{
return d->statusHtml;
}
-QString ChatWindowStyle::getActionIncomingHtml() const
+TQString ChatWindowStyle::getActionIncomingHtml() const
{
return d->actionIncomingHtml;
}
-QString ChatWindowStyle::getActionOutgoingHtml() const
+TQString ChatWindowStyle::getActionOutgoingHtml() const
{
return d->actionOutgoingHtml;
}
@@ -148,131 +148,131 @@ bool ChatWindowStyle::hasActionTemplate() const
void ChatWindowStyle::listVariants()
{
- QString variantDirPath = d->baseHref + QString::fromUtf8("Variants/");
- QDir variantDir(variantDirPath);
+ TQString variantDirPath = d->baseHref + TQString::fromUtf8("Variants/");
+ TQDir variantDir(variantDirPath);
- QStringList variantList = variantDir.entryList("*.css");
- QStringList::ConstIterator it, itEnd = variantList.constEnd();
+ TQStringList variantList = variantDir.entryList("*.css");
+ TQStringList::ConstIterator it, itEnd = variantList.constEnd();
for(it = variantList.constBegin(); it != itEnd; ++it)
{
- QString variantName = *it, variantPath;
+ TQString variantName = *it, variantPath;
// Retrieve only the file name.
variantName = variantName.left(variantName.findRev("."));
// variantPath is relative to baseHref.
- variantPath = QString("Variants/%1").arg(*it);
+ variantPath = TQString("Variants/%1").arg(*it);
d->variantsList.insert(variantName, variantPath);
}
}
void ChatWindowStyle::readStyleFiles()
{
- QString headerFile = d->baseHref + QString("Header.html");
- QString footerFile = d->baseHref + QString("Footer.html");
- QString incomingFile = d->baseHref + QString("Incoming/Content.html");
- QString nextIncomingFile = d->baseHref + QString("Incoming/NextContent.html");
- QString outgoingFile = d->baseHref + QString("Outgoing/Content.html");
- QString nextOutgoingFile = d->baseHref + QString("Outgoing/NextContent.html");
- QString statusFile = d->baseHref + QString("Status.html");
- QString actionIncomingFile = d->baseHref + QString("Incoming/Action.html");
- QString actionOutgoingFile = d->baseHref + QString("Outgoing/Action.html");
+ TQString headerFile = d->baseHref + TQString("Header.html");
+ TQString footerFile = d->baseHref + TQString("Footer.html");
+ TQString incomingFile = d->baseHref + TQString("Incoming/Content.html");
+ TQString nextIncomingFile = d->baseHref + TQString("Incoming/NextContent.html");
+ TQString outgoingFile = d->baseHref + TQString("Outgoing/Content.html");
+ TQString nextOutgoingFile = d->baseHref + TQString("Outgoing/NextContent.html");
+ TQString statusFile = d->baseHref + TQString("Status.html");
+ TQString actionIncomingFile = d->baseHref + TQString("Incoming/Action.html");
+ TQString actionOutgoingFile = d->baseHref + TQString("Outgoing/Action.html");
- QFile fileAccess;
+ TQFile fileAccess;
// First load header file.
- if( QFile::exists(headerFile) )
+ if( TQFile::exists(headerFile) )
{
fileAccess.setName(headerFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->headerHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "Header HTML: " << d->headerHtml << endl;
fileAccess.close();
}
// Load Footer file
- if( QFile::exists(footerFile) )
+ if( TQFile::exists(footerFile) )
{
fileAccess.setName(footerFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->footerHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "Footer HTML: " << d->footerHtml << endl;
fileAccess.close();
}
// Load incoming file
- if( QFile::exists(incomingFile) )
+ if( TQFile::exists(incomingFile) )
{
fileAccess.setName(incomingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->incomingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "Incoming HTML: " << d->incomingHtml << endl;
fileAccess.close();
}
// Load next Incoming file
- if( QFile::exists(nextIncomingFile) )
+ if( TQFile::exists(nextIncomingFile) )
{
fileAccess.setName(nextIncomingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->nextIncomingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "NextIncoming HTML: " << d->nextIncomingHtml << endl;
fileAccess.close();
}
// Load outgoing file
- if( QFile::exists(outgoingFile) )
+ if( TQFile::exists(outgoingFile) )
{
fileAccess.setName(outgoingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->outgoingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "Outgoing HTML: " << d->outgoingHtml << endl;
fileAccess.close();
}
// Load next outgoing file
- if( QFile::exists(nextOutgoingFile) )
+ if( TQFile::exists(nextOutgoingFile) )
{
fileAccess.setName(nextOutgoingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->nextOutgoingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "NextOutgoing HTML: " << d->nextOutgoingHtml << endl;
fileAccess.close();
}
// Load status file
- if( QFile::exists(statusFile) )
+ if( TQFile::exists(statusFile) )
{
fileAccess.setName(statusFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->statusHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "Status HTML: " << d->statusHtml << endl;
fileAccess.close();
}
// Load Action Incoming file
- if( QFile::exists(actionIncomingFile) )
+ if( TQFile::exists(actionIncomingFile) )
{
fileAccess.setName(actionIncomingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->actionIncomingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "ActionIncoming HTML: " << d->actionIncomingHtml << endl;
fileAccess.close();
}
// Load Action Outgoing file
- if( QFile::exists(actionOutgoingFile) )
+ if( TQFile::exists(actionOutgoingFile) )
{
fileAccess.setName(actionOutgoingFile);
fileAccess.open(IO_ReadOnly);
- QTextStream headerStream(&fileAccess);
- headerStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream headerStream(&fileAccess);
+ headerStream.setEncoding(TQTextStream::UnicodeUTF8);
d->actionOutgoingHtml = headerStream.read();
kdDebug(14000) << k_funcinfo << "ActionOutgoing HTML: " << d->actionOutgoingHtml << endl;
fileAccess.close();
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.h b/kopete/kopete/chatwindow/kopetechatwindowstyle.h
index ca5a0863..43c54887 100644
--- a/kopete/kopete/chatwindow/kopetechatwindowstyle.h
+++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.h
@@ -17,8 +17,8 @@
#ifndef KOPETECHATWINDOWSTYLE_H
#define KOPETECHATWINDOWSTYLE_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
/**
@@ -35,7 +35,7 @@ public:
* value = Path to variant CSS file.
* Path is relative to Ressources directory.
*/
- typedef QMap<QString,QString> StyleVariants;
+ typedef TQMap<TQString,TQString> StyleVariants;
/**
* This enum specifies the mode of the constructor
@@ -48,8 +48,8 @@ public:
* @brief Build a single chat window style.
*
*/
- ChatWindowStyle(const QString &stylePath, int styleBuildMode = StyleBuildNormal);
- ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode = StyleBuildFast);
+ ChatWindowStyle(const TQString &stylePath, int styleBuildMode = StyleBuildNormal);
+ ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode = StyleBuildFast);
~ChatWindowStyle();
/**
@@ -58,7 +58,7 @@ public:
* before returning the list of the Variants.
* If the variant are listed, it just return the cached
* variant list.
- * @return the StyleVariants QMap.
+ * @return the StyleVariants TQMap.
*/
StyleVariants getVariants();
@@ -69,7 +69,7 @@ public:
*
* @return the style path based.
*/
- QString getStylePath() const;
+ TQString getStylePath() const;
/**
* Get the style ressource directory.
@@ -82,18 +82,18 @@ public:
*
* @return the path to the the ressource directory.
*/
- QString getStyleBaseHref() const;
+ TQString getStyleBaseHref() const;
- QString getHeaderHtml() const;
- QString getFooterHtml() const;
- QString getIncomingHtml() const;
- QString getNextIncomingHtml() const;
- QString getOutgoingHtml() const;
- QString getNextOutgoingHtml() const;
- QString getStatusHtml() const;
+ TQString getHeaderHtml() const;
+ TQString getFooterHtml() const;
+ TQString getIncomingHtml() const;
+ TQString getNextIncomingHtml() const;
+ TQString getOutgoingHtml() const;
+ TQString getNextOutgoingHtml() const;
+ TQString getStatusHtml() const;
- QString getActionIncomingHtml() const;
- QString getActionOutgoingHtml() const;
+ TQString getActionIncomingHtml() const;
+ TQString getActionOutgoingHtml() const;
/**
* Check if the style has the support for Kopete Action template (Kopete extension)
@@ -114,7 +114,7 @@ private:
/**
* Init this class
*/
- void init(const QString &stylePath, int styleBuildMode);
+ void init(const TQString &stylePath, int styleBuildMode);
/**
* List available variants for the current style.
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
index 71032ea3..cb3291e7 100644
--- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
@@ -18,7 +18,7 @@
#include "kopetechatwindowstylemanager.h"
// Qt includes
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
// KDE includes
#include <kstandarddirs.h>
@@ -51,7 +51,7 @@ public:
styleDirLister->deleteLater();
}
- QMap<QString, ChatWindowStyle*>::Iterator styleIt, styleItEnd = stylePool.end();
+ TQMap<TQString, ChatWindowStyle*>::Iterator styleIt, styleItEnd = stylePool.end();
for(styleIt = stylePool.begin(); styleIt != styleItEnd; ++styleIt)
{
delete styleIt.data();
@@ -62,9 +62,9 @@ public:
StyleList availableStyles;
// key = style path, value = ChatWindowStyle instance
- QMap<QString, ChatWindowStyle*> stylePool;
+ TQMap<TQString, ChatWindowStyle*> stylePool;
- QValueStack<KURL> styleDirs;
+ TQValueStack<KURL> styleDirs;
};
static KStaticDeleter<ChatWindowStyleManager> ChatWindowStyleManagerstaticDeleter;
@@ -81,8 +81,8 @@ ChatWindowStyleManager *ChatWindowStyleManager::self()
return s_self;
}
-ChatWindowStyleManager::ChatWindowStyleManager(QObject *parent, const char *name)
- : QObject(parent, name), d(new Private())
+ChatWindowStyleManager::ChatWindowStyleManager(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new Private())
{
kdDebug(14000) << k_funcinfo << endl;
loadStyles();
@@ -96,12 +96,12 @@ ChatWindowStyleManager::~ChatWindowStyleManager()
void ChatWindowStyleManager::loadStyles()
{
- QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QString::fromUtf8( "styles" ) );
- QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/"),true) );
+ TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) );
+ TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) );
if( !chatStyles.contains(localStyleDir))
chatStyles<<localStyleDir;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for(it = chatStyles.constBegin(); it != chatStyles.constEnd(); ++it)
{
kdDebug(14000) << k_funcinfo << *it << endl;
@@ -111,8 +111,8 @@ void ChatWindowStyleManager::loadStyles()
d->styleDirLister = new KDirLister(this);
d->styleDirLister->setDirOnlyMode(true);
- connect(d->styleDirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewStyles(const KFileItemList &)));
- connect(d->styleDirLister, SIGNAL(completed()), this, SLOT(slotDirectoryFinished()));
+ connect(d->styleDirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewStyles(const KFileItemList &)));
+ connect(d->styleDirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotDirectoryFinished()));
if( !d->styleDirs.isEmpty() )
d->styleDirLister->openURL(d->styleDirs.pop(), true);
@@ -123,9 +123,9 @@ ChatWindowStyleManager::StyleList ChatWindowStyleManager::getAvailableStyles()
return d->availableStyles;
}
-int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
+int ChatWindowStyleManager::installStyle(const TQString &styleBundlePath)
{
- QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/") ) );
+ TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/") ) );
KArchiveEntry *currentEntry = 0L;
KArchiveDirectory* currentDir = 0L;
@@ -137,7 +137,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
}
// Find mimetype for current bundle. ZIP and KTar need separate constructor
- QString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name();
+ TQString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name();
if(currentBundleMimeType == "application/x-zip")
{
archive = new KZip(styleBundlePath);
@@ -167,9 +167,9 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
// main.css, Footer.html, Header.html, Status.html files in Contents/Ressources.
// So for a style bundle to be valid, it must have a result greather than 8, because we test for 8 required entry.
int validResult = 0;
- QStringList entries = rootDir->entries();
+ TQStringList entries = rootDir->entries();
// Will be reused later.
- QStringList::Iterator entriesIt, entriesItEnd = entries.end();
+ TQStringList::Iterator entriesIt, entriesItEnd = entries.end();
for(entriesIt = entries.begin(); entriesIt != entries.end(); ++entriesIt)
{
currentEntry = const_cast<KArchiveEntry*>(rootDir->entry(*entriesIt));
@@ -179,52 +179,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
currentDir = dynamic_cast<KArchiveDirectory*>( currentEntry );
if (currentDir)
{
- if( currentDir->entry(QString::fromUtf8("Contents")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents")) )
{
// kdDebug() << k_funcinfo << "Contents found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Incoming found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Outgoing found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/main.css")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/main.css")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/main.css found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Footer.html")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Footer.html")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Footer.html found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Status.html")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Status.html")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Status.html found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Header.html")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Header.html")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Header.html found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming/Content.html")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming/Content.html")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Incoming/Content.html found" << endl;
validResult += 1;
}
- if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing/Content.html")) )
+ if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing/Content.html")) )
{
// kdDebug() << k_funcinfo << "Contents/Resources/Outgoing/Content.html found" << endl;
validResult += 1;
@@ -232,7 +232,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
}
}
}
-// kdDebug() << k_funcinfo << "Valid result: " << QString::number(validResult) << endl;
+// kdDebug() << k_funcinfo << "Valid result: " << TQString::number(validResult) << endl;
// The archive is a valid style bundle.
if(validResult >= 8)
{
@@ -243,7 +243,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
if(currentEntry && currentEntry->isDirectory())
{
// Ignore this MacOS X "garbage" directory in zip.
- if(currentEntry->name() == QString::fromUtf8("__MACOSX"))
+ if(currentEntry->name() == TQString::fromUtf8("__MACOSX"))
{
continue;
}
@@ -284,13 +284,13 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath)
return StyleUnknow;
}
-bool ChatWindowStyleManager::removeStyle(const QString &stylePath)
+bool ChatWindowStyleManager::removeStyle(const TQString &stylePath)
{
// Find for the current style in avaiableStyles map.
KURL urlStyle(stylePath);
- QString styleName=urlStyle.fileName();
+ TQString styleName=urlStyle.fileName();
StyleList::Iterator foundStyle = d->availableStyles.find(styleName);
- // QMap iterator return end() if it found no item.
+ // TQMap iterator return end() if it found no item.
if(foundStyle != d->availableStyles.end())
{
d->availableStyles.remove(foundStyle);
@@ -312,7 +312,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &stylePath)
}
}
-ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePath)
+ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &stylePath)
{
if( d->stylePool.contains(stylePath) )
{
@@ -344,11 +344,11 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePa
void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList)
{
KFileItem *item;
- QPtrListIterator<KFileItem> it( dirList );
+ TQPtrListIterator<KFileItem> it( dirList );
while( (item = it.current()) != 0 )
{
// Ignore data dir(from deprecated XSLT themes)
- if( !item->url().fileName().contains(QString::fromUtf8("data")) )
+ if( !item->url().fileName().contains(TQString::fromUtf8("data")) )
{
kdDebug(14000) << k_funcinfo << "Listing: " << item->url().fileName() << endl;
// If the style path is already in the pool, that's mean the style was updated on disk
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h
index 4b21c79b..dcc56cf0 100644
--- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h
+++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h
@@ -18,8 +18,8 @@
#ifndef KOPETECHATWINDOWSTYLEMANAGER_H
#define KOPETECHATWINDOWSTYLEMANAGER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kfileitem.h>
#include <kopete_export.h>
@@ -46,11 +46,11 @@ class KOPETE_EXPORT ChatWindowStyleManager : public QObject
Q_OBJECT
public:
/**
- * StyleList typedef (a QMap)
+ * StyleList typedef (a TQMap)
* key = Name of the style (currently the directory name)
* value = Path to the style
*/
- typedef QMap<QString, QString> StyleList;
+ typedef TQMap<TQString, TQString> StyleList;
/**
* The StyleInstallStatus enum. It gives better return value for installStyle().
@@ -92,7 +92,7 @@ public slots:
* @param styleBundlePath Path to the container file to install.
* @return A status code from StyleInstallStatus enum.
*/
- int installStyle(const QString &styleBundlePath);
+ int installStyle(const TQString &styleBundlePath);
/**
* Remove a style from user style directory
@@ -100,7 +100,7 @@ public slots:
* @param stylePath the path of the style to remove.
* @return true if the deletion went without problems.
*/
- bool removeStyle(const QString &stylePath);
+ bool removeStyle(const TQString &stylePath);
/**
* Get a instance of a ChatWindowStyle from the pool.
@@ -110,7 +110,7 @@ public slots:
* @param stylePath Path for the specified style. Name can be ambigous.
* @return the instance of ChatWindow for the specified style. DO NOT DELETE IT.
*/
- ChatWindowStyle *getStyleFromPool(const QString &stylePath);
+ ChatWindowStyle *getStyleFromPool(const TQString &stylePath);
signals:
/**
@@ -136,7 +136,7 @@ private:
* Private constructor(it's a singleton class)
* Call loadStyles() to list all avaiable styles.
*/
- ChatWindowStyleManager(QObject *parent = 0, const char *name = 0);
+ ChatWindowStyleManager(TQObject *parent = 0, const char *name = 0);
static ChatWindowStyleManager *s_self;
diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/kopete/chatwindow/kopeteemailwindow.cpp
index 84b71b16..89f99eb9 100644
--- a/kopete/kopete/chatwindow/kopeteemailwindow.cpp
+++ b/kopete/kopete/chatwindow/kopeteemailwindow.cpp
@@ -54,15 +54,15 @@
#include <kwin.h>
#include <kgenericfactory.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
typedef KGenericFactory<EmailWindowPlugin> EmailWindowPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_emailwindow, EmailWindowPluginFactory( "kopete_emailwindow" ) )
-EmailWindowPlugin::EmailWindowPlugin(QObject *parent, const char *name, const QStringList &) :
+EmailWindowPlugin::EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &) :
Kopete::ViewPlugin( EmailWindowPluginFactory::instance(), parent, name )
{}
@@ -75,7 +75,7 @@ KopeteView* EmailWindowPlugin::createView( Kopete::ChatSession *manager )
class KopeteEmailWindow::Private
{
public:
- QValueList<Kopete::Message> messageQueue;
+ TQValueList<Kopete::Message> messageQueue;
bool showingMessage;
bool sendInProgress;
bool visible;
@@ -83,14 +83,14 @@ public:
KPushButton *btnReplySend;
KPushButton *btnReadNext;
KPushButton *btnReadPrev;
- QSplitter *split;
+ TQSplitter *split;
ChatMessagePart *messagePart;
KopeteEmailWindow::WindowMode mode;
KAction *chatSend;
- QLabel *anim;
- QMovie animIcon;
- QPixmap normalIcon;
- QString unreadMessageFrom;
+ TQLabel *anim;
+ TQMovie animIcon;
+ TQPixmap normalIcon;
+ TQString unreadMessageFrom;
ChatTextEditPart *editPart;
KActionMenu *actionActionMenu;
@@ -100,27 +100,27 @@ public:
KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowPlugin *parent, bool foreignMessage )
: KParts::MainWindow( ), KopeteView( manager, parent ), d( new Private )
{
- QVBox *v = new QVBox( this );
+ TQVBox *v = new TQVBox( this );
setCentralWidget( v );
- setMinimumSize( QSize( 75, 20 ) );
+ setMinimumSize( TQSize( 75, 20 ) );
- d->split = new QSplitter( v );
- d->split->setOrientation( QSplitter::Vertical );
+ d->split = new TQSplitter( v );
+ d->split->setOrientation( TQSplitter::Vertical );
d->messagePart = new ChatMessagePart( manager, d->split, "messagePart" );
// FIXME: should this be in ChatView too? maybe move to ChatMessagePart?
d->messagePart->view()->setMarginWidth( 4 );
d->messagePart->view()->setMarginHeight( 4 );
- d->messagePart->view()->setMinimumSize( QSize( 75, 20 ) );
+ d->messagePart->view()->setMinimumSize( TQSize( 75, 20 ) );
d->editPart = new ChatTextEditPart( manager, d->split, "editPart" );
/*
FIXME: dude, wtf?
- QDomDocument doc = d->editPart->domDocument();
- QDomNode menu = doc.documentElement().firstChild();
+ TQDomDocument doc = d->editPart->domDocument();
+ TQDomNode menu = doc.documentElement().firstChild();
menu.removeChild( menu.firstChild() ); // Remove File
menu.removeChild( menu.firstChild() ); // Remove Edit
menu.removeChild( menu.firstChild() ); // Remove View
@@ -129,40 +129,40 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP
doc.documentElement().removeChild( doc.documentElement().childNodes().item(1) ); //Remove MainToolbar
doc.documentElement().removeChild( doc.documentElement().lastChild() ); // Remove Edit popup
*/
- connect( d->editPart, SIGNAL( messageSent( Kopete::Message & ) ),
- this, SIGNAL( messageSent( Kopete::Message & ) ) );
- connect( d->editPart, SIGNAL( canSendChanged( bool ) ),
- this, SLOT( slotUpdateReplySend() ) );
- connect( d->editPart, SIGNAL( typing(bool) ),
- manager, SIGNAL( typing(bool) ) );
+ connect( d->editPart, TQT_SIGNAL( messageSent( Kopete::Message & ) ),
+ this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) );
+ connect( d->editPart, TQT_SIGNAL( canSendChanged( bool ) ),
+ this, TQT_SLOT( slotUpdateReplySend() ) );
+ connect( d->editPart, TQT_SIGNAL( typing(bool) ),
+ manager, TQT_SIGNAL( typing(bool) ) );
//Connections to the manager and the ViewManager that every view should have
- connect( this, SIGNAL( closing( KopeteView * ) ),
- KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) );
- connect( this, SIGNAL( activated( KopeteView * ) ),
- KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) );
- connect( this, SIGNAL( messageSent(Kopete::Message &) ),
- manager, SLOT( sendMessage(Kopete::Message &) ) );
- connect( manager, SIGNAL( messageSuccess() ),
- this, SLOT( messageSentSuccessfully() ));
-
- QWidget *containerWidget = new QWidget( v );
- containerWidget->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) );
-
- QHBoxLayout *h = new QHBoxLayout( containerWidget, 4, 4 );
+ connect( this, TQT_SIGNAL( closing( KopeteView * ) ),
+ KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) );
+ connect( this, TQT_SIGNAL( activated( KopeteView * ) ),
+ KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) );
+ connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ),
+ manager, TQT_SLOT( sendMessage(Kopete::Message &) ) );
+ connect( manager, TQT_SIGNAL( messageSuccess() ),
+ this, TQT_SLOT( messageSentSuccessfully() ));
+
+ TQWidget *containerWidget = new TQWidget( v );
+ containerWidget->setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) );
+
+ TQHBoxLayout *h = new TQHBoxLayout( containerWidget, 4, 4 );
h->addStretch();
d->btnReadPrev = new KPushButton( i18n( "<< Prev" ), containerWidget );
- connect( d->btnReadPrev, SIGNAL( pressed() ), this, SLOT( slotReadPrev() ) );
+ connect( d->btnReadPrev, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadPrev() ) );
h->addWidget( d->btnReadPrev, 0, Qt::AlignRight | Qt::AlignVCenter );
d->btnReadPrev->setEnabled( false );
d->btnReadNext = new KPushButton( i18n( "(0) Next >>" ), containerWidget );
- connect( d->btnReadNext, SIGNAL( pressed() ), this, SLOT( slotReadNext() ) );
+ connect( d->btnReadNext, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadNext() ) );
h->addWidget( d->btnReadNext, 0, Qt::AlignRight | Qt::AlignVCenter );
d->btnReplySend = new KPushButton( containerWidget );
- connect( d->btnReplySend, SIGNAL( pressed() ), this, SLOT( slotReplySend() ) );
+ connect( d->btnReplySend, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReplySend() ) );
h->addWidget( d->btnReplySend, 0, Qt::AlignRight | Qt::AlignVCenter );
initActions();
@@ -176,7 +176,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP
toggleMode( Send );
KConfig *config = KGlobal::config();
- applyMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) );
+ applyMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) );
d->sendInProgress = false;
@@ -196,7 +196,7 @@ KopeteEmailWindow::~KopeteEmailWindow()
// saves menubar, toolbar and statusbar setting
KConfig *config = KGlobal::config();
- saveMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) );
+ saveMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) );
config->sync();
delete d;
@@ -206,54 +206,54 @@ void KopeteEmailWindow::initActions(void)
{
KActionCollection *coll = actionCollection();
- d->chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), 0,
- this, SLOT( slotReplySend() ), coll, "chat_send" );
+ d->chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), 0,
+ this, TQT_SLOT( slotReplySend() ), coll, "chat_send" );
//Default to 'Return' for sending messages
- d->chatSend->setShortcut( QKeySequence( Key_Return ) );
+ d->chatSend->setShortcut( TQKeySequence( Key_Return ) );
- KStdAction::quit ( this, SLOT( slotCloseView() ), coll );
+ KStdAction::quit ( this, TQT_SLOT( slotCloseView() ), coll );
- KStdAction::cut( d->editPart->widget(), SLOT( cut() ), coll );
- KStdAction::copy( this, SLOT(slotCopy()), coll);
- KStdAction::paste( d->editPart->widget(), SLOT( paste() ), coll );
+ KStdAction::cut( d->editPart->widget(), TQT_SLOT( cut() ), coll );
+ KStdAction::copy( this, TQT_SLOT(slotCopy()), coll);
+ KStdAction::paste( d->editPart->widget(), TQT_SLOT( paste() ), coll );
- new KAction( i18n( "&Set Font..." ), QString::fromLatin1( "charset" ), 0,
- d->editPart, SLOT( setFont() ), coll, "format_font" );
- new KAction( i18n( "Set Text &Color..." ), QString::fromLatin1( "pencil" ), 0,
- d->editPart, SLOT( setFgColor() ), coll, "format_color" );
- new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0,
- d->editPart, SLOT( setBgColor() ), coll, "format_bgcolor" );
+ new KAction( i18n( "&Set Font..." ), TQString::fromLatin1( "charset" ), 0,
+ d->editPart, TQT_SLOT( setFont() ), coll, "format_font" );
+ new KAction( i18n( "Set Text &Color..." ), TQString::fromLatin1( "pencil" ), 0,
+ d->editPart, TQT_SLOT( setFgColor() ), coll, "format_color" );
+ new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0,
+ d->editPart, TQT_SLOT( setBgColor() ), coll, "format_bgcolor" );
- KStdAction::showMenubar( this, SLOT( slotViewMenuBar() ), coll );
+ KStdAction::showMenubar( this, TQT_SLOT( slotViewMenuBar() ), coll );
setStandardToolBarMenuEnabled( true );
d->actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" );
d->actionSmileyMenu->setDelayed( false );
- connect(d->actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &)));
+ connect(d->actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &)));
// add configure key bindings menu item
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll );
- KStdAction::configureToolbars(this, SLOT( slotConfToolbar() ), coll);
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll );
+ KStdAction::configureToolbars(this, TQT_SLOT( slotConfToolbar() ), coll);
//FIXME: no longer works?
KopeteStdAction::preferences( coll , "settings_prefs" );
// The animated toolbarbutton
- d->normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) );
- d->animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar);
+ d->normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) );
+ d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
d->animIcon.pause();
- d->anim = new QLabel( this, "kde toolbar widget" );
+ d->anim = new TQLabel( this, "kde toolbar widget" );
d->anim->setMargin( 5 );
d->anim->setPixmap( d->normalIcon );
new KWidgetAction( d->anim, i18n("Toolbar Animation"), 0, 0, 0, coll, "toolbar_animation" );
- setXMLFile( QString::fromLatin1( "kopeteemailwindow.rc" ) );
+ setXMLFile( TQString::fromLatin1( "kopeteemailwindow.rc" ) );
createGUI( d->editPart );
- //createGUI( QString::fromLatin1( "kopeteemailwindow.rc" ) );
+ //createGUI( TQString::fromLatin1( "kopeteemailwindow.rc" ) );
guiFactory()->addClient(m_manager);
}
-void KopeteEmailWindow::closeEvent( QCloseEvent *e )
+void KopeteEmailWindow::closeEvent( TQCloseEvent *e )
{
// DO NOT call base class's closeEvent - see comment in KopeteApplication constructor for reason
@@ -272,7 +272,7 @@ void KopeteEmailWindow::slotViewMenuBar()
menuBar()->show();
}
-void KopeteEmailWindow::slotSmileyActivated(const QString &sm )
+void KopeteEmailWindow::slotSmileyActivated(const TQString &sm )
{
if ( !sm.isNull() )
d->editPart->addText( sm );
@@ -280,12 +280,12 @@ void KopeteEmailWindow::slotSmileyActivated(const QString &sm )
void KopeteEmailWindow::slotConfToolbar()
{
- saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" ));
- KEditToolbar *dlg = new KEditToolbar(actionCollection(), QString::fromLatin1("kopeteemailwindow.rc") );
+ saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
+ KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::fromLatin1("kopeteemailwindow.rc") );
if (dlg->exec())
{
createGUI( d->editPart );
- applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" ));
+ applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
}
delete dlg;
}
@@ -313,19 +313,19 @@ void KopeteEmailWindow::appendMessage(Kopete::Message &message)
slotReadNext();
else
{
- d->btnReadNext->setPaletteForegroundColor( QColor("red") );
+ d->btnReadNext->setPaletteForegroundColor( TQColor("red") );
updateNextButton();
}
d->unreadMessageFrom = message.from()->metaContact() ?
message.from()->metaContact()->displayName() : message.from()->contactId();
- QTimer::singleShot( 1000, this, SLOT(slotMarkMessageRead()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(slotMarkMessageRead()) );
}
}
void KopeteEmailWindow::slotMarkMessageRead()
{
- d->unreadMessageFrom = QString::null;
+ d->unreadMessageFrom = TQString::null;
}
void KopeteEmailWindow::updateNextButton()
@@ -418,27 +418,27 @@ bool KopeteEmailWindow::closeView( bool force )
{
if( m_manager->members().count() > 1 )
{
- QString shortCaption = caption();
+ TQString shortCaption = caption();
if( shortCaption.length() > 40 )
- shortCaption = shortCaption.left( 40 ) + QString::fromLatin1("...");
+ shortCaption = shortCaption.left( 40 ) + TQString::fromLatin1("...");
response = KMessageBox::warningContinueCancel(this, i18n("<qt>You are about to leave the group chat session <b>%1</b>.<br>"
"You will not receive future messages from this conversation.</qt>").arg(shortCaption), i18n("Closing Group Chat"),
- i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseGroupChat"));
+ i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseGroupChat"));
}
if( !d->unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel(this, i18n("<qt>You have received a message from <b>%1</b> in the last "
"second. Are you sure you want to close this chat?</qt>").arg(d->unreadMessageFrom), i18n("Unread Message"),
- i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatRecentMessage"));
+ i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatRecentMessage"));
}
if( d->sendInProgress && ( response == KMessageBox::Continue ) )
{
response = KMessageBox::warningContinueCancel(this, i18n("You have a message send in progress, which will be "
"aborted if this chat is closed. Are you sure you want to close this chat?"), i18n("Message in Transit"),
- i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatMessageInProgress") );
+ i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatMessageInProgress") );
}
}
@@ -477,7 +477,7 @@ void KopeteEmailWindow::toggleMode( WindowMode newMode )
d->btnReadPrev->show();
break;
case Reply:
- QValueList<int> splitPercent;
+ TQValueList<int> splitPercent;
// FIXME: should be saved and restored
splitPercent.append(50);
splitPercent.append(50);
diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.h b/kopete/kopete/chatwindow/kopeteemailwindow.h
index 43908645..165ee53a 100644
--- a/kopete/kopete/chatwindow/kopeteemailwindow.h
+++ b/kopete/kopete/chatwindow/kopeteemailwindow.h
@@ -44,7 +44,7 @@ public:
virtual void makeVisible();
virtual bool closeView( bool force = false );
virtual bool isVisible();
- virtual QWidget *mainWidget() { return this; }
+ virtual TQWidget *mainWidget() { return this; }
public slots:
virtual void sendMessage();
@@ -58,7 +58,7 @@ signals:
virtual void activated( KopeteView *view );
protected:
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
virtual void windowActivationChange( bool activated );
private slots:
@@ -68,7 +68,7 @@ private slots:
void slotReadPrev();
void slotCloseView();
- void slotSmileyActivated( const QString & );
+ void slotSmileyActivated( const TQString & );
void slotCopy();
void slotViewMenuBar();
@@ -94,7 +94,7 @@ private:
class EmailWindowPlugin : public Kopete::ViewPlugin
{
public:
- EmailWindowPlugin(QObject *parent, const char *name, const QStringList &args);
+ EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &args);
KopeteView* createView( Kopete::ChatSession *manager );
};
diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
index 3e14e66d..bb440ef2 100644
--- a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
+++ b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
@@ -22,7 +22,7 @@
#include <math.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@ public:
emoticonSelector = new EmoticonSelector( m_popup, "KopeteEmoticonActionPrivate::emoticonSelector");
m_popup->insertItem( emoticonSelector );
// TODO: Maybe connect to kopeteprefs and redo list only on config changes
- connect( m_popup, SIGNAL( aboutToShow() ), emoticonSelector, SLOT( prepareList() ) );
+ connect( m_popup, TQT_SIGNAL( aboutToShow() ), emoticonSelector, TQT_SLOT( prepareList() ) );
}
~KopeteEmoticonActionPrivate()
@@ -61,16 +61,16 @@ public:
bool m_stickyMenu;
};
-KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name )
+KopeteEmoticonAction::KopeteEmoticonAction( TQObject* parent, const char* name )
: KAction( i18n( "Add Smiley" ), 0, parent, name )
{
d = new KopeteEmoticonActionPrivate;
// Try to load the icon for our current emoticon theme, when it fails
// fall back to our own default
- QString icon;
- QMap<QString, QStringList> emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList();
- for( QMap<QString, QStringList>::const_iterator it = emoticonsMap.constBegin();
+ TQString icon;
+ TQMap<TQString, TQStringList> emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList();
+ for( TQMap<TQString, TQStringList>::const_iterator it = emoticonsMap.constBegin();
it != emoticonsMap.constEnd(); ++it )
{
if( ( *it ).contains( ":)" ) || ( *it ).contains( ":-)" ) )
@@ -83,11 +83,11 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name )
if ( icon.isNull() )
setIcon( "emoticon" );
else
- setIconSet( QIconSet( icon ) );
+ setIconSet( TQIconSet( icon ) );
setShortcutConfigurable( false );
- connect( d->emoticonSelector, SIGNAL( ItemSelected( const QString & ) ),
- this, SIGNAL( activated( const QString & ) ) );
+ connect( d->emoticonSelector, TQT_SIGNAL( ItemSelected( const TQString & ) ),
+ this, TQT_SIGNAL( activated( const TQString & ) ) );
}
KopeteEmoticonAction::~KopeteEmoticonAction()
@@ -98,7 +98,7 @@ KopeteEmoticonAction::~KopeteEmoticonAction()
d = 0;
}
-void KopeteEmoticonAction::popup( const QPoint& global )
+void KopeteEmoticonAction::popup( const TQPoint& global )
{
popupMenu()->popup( global );
}
@@ -128,7 +128,7 @@ void KopeteEmoticonAction::setStickyMenu(bool sticky)
d->m_stickyMenu = sticky;
}
-int KopeteEmoticonAction::plug( QWidget* widget, int index )
+int KopeteEmoticonAction::plug( TQWidget* widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -136,9 +136,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
// kdDebug(14010) << "KopeteEmoticonAction::plug( " << widget << ", " << index << " )" << endl;
// KDE4/Qt TODO: Use qobject_cast instead.
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("TQPopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIcon() )
id = menu->insertItem( iconSet(KIcon::Small), text(), d->m_popup, -1, index );
@@ -149,7 +149,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
menu->setItemEnabled( id, false );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( menu, this );
@@ -166,8 +166,8 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
if ( icon().isEmpty() && !iconSet(KIcon::Small).isNull() )
{
bar->insertButton(
- iconSet(KIcon::Small).pixmap(), id_, SIGNAL(clicked()), this,
- SLOT(slotActivated()), isEnabled(), plainText(),
+ iconSet(KIcon::Small).pixmap(), id_, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotActivated()), isEnabled(), plainText(),
index );
}
else
@@ -179,17 +179,17 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
if (!whatsThis().isEmpty())
- QWhatsThis::add( bar->getButton(id_), whatsThis() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThis() );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if (delayed())
bar->setDelayedPopup(id_, popupMenu(), stickyMenu());
@@ -202,9 +202,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
return containerCount() - 1;
}
// KDE4/Qt TODO: Use qobject_cast instead.
- else if ( widget->inherits( "QMenuBar" ) )
+ else if ( widget->inherits( "TQMenuBar" ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( widget );
int id;
@@ -214,7 +214,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index )
bar->setItemEnabled( id, false );
addContainer( bar, id );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.h b/kopete/kopete/chatwindow/kopeteemoticonaction.h
index d420518a..15b1fd14 100644
--- a/kopete/kopete/chatwindow/kopeteemoticonaction.h
+++ b/kopete/kopete/chatwindow/kopeteemoticonaction.h
@@ -31,11 +31,11 @@ class KopeteEmoticonAction : public KAction
Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
public:
- KopeteEmoticonAction( QObject *parent = 0, const char *name = 0 );
+ KopeteEmoticonAction( TQObject *parent = 0, const char *name = 0 );
virtual ~KopeteEmoticonAction();
KPopupMenu * popupMenu() const;
- void popup( const QPoint &global );
+ void popup( const TQPoint &global );
/**
* Returns true if this action creates a delayed popup menu
@@ -74,10 +74,10 @@ public:
*/
void setStickyMenu( bool sticky );
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
signals:
- void activated( const QString &item );
+ void activated( const TQString &item );
private:
class KopeteEmoticonActionPrivate;
diff --git a/kopete/kopete/chatwindow/krichtexteditpart.cpp b/kopete/kopete/chatwindow/krichtexteditpart.cpp
index 001096b9..a08fa7e3 100644
--- a/kopete/kopete/chatwindow/krichtexteditpart.cpp
+++ b/kopete/kopete/chatwindow/krichtexteditpart.cpp
@@ -6,9 +6,9 @@
#include <kdebug.h>
#include <kconfig.h>
#include <kdeversion.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qevent.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqevent.h>
#include <kparts/genericfactory.h>
#include <private/qrichtext_p.h>
@@ -23,25 +23,25 @@ K_EXPORT_COMPONENT_FACTORY( libkopeterichtexteditpart, KopeteRichTextEditPartFac
class KopeteTextEdit : public KTextEdit
{
public:
- KopeteTextEdit( QWidget *parent ) : KTextEdit( parent ) {}
+ KopeteTextEdit( TQWidget *parent ) : KTextEdit( parent ) {}
const QTextCursor * cursor() { return textCursor(); }
- bool event(QEvent *event)
+ bool event(TQEvent *event)
{
- // don't allow QTextEdit to override accels
- if ( event->type() == QEvent::AccelOverride )
- return QWidget::event(event);
+ // don't allow TQTextEdit to override accels
+ if ( event->type() == TQEvent::AccelOverride )
+ return TQWidget::event(event);
else
return KTextEdit::event(event);
}
};
-KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& )
+KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& )
: KParts::ReadOnlyPart( wparent, wname ? wname : "rich_text_part" )
{
KopeteRichTextEditPart::KopeteRichTextEditPart( wparent, wname, false );
}
-KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities )
+KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *parent, const char *name, int capabilities )
: KParts::ReadOnlyPart( parent, name ? name : "rich_text_part" ),
m_capabilities( capabilities ),
m_richTextEnabled( true )
@@ -127,86 +127,86 @@ void KopeteRichTextEditPart::createActions( KActionCollection *ac )
enableRichText = new KToggleAction(i18n("Enable &Rich Text"), "pencil", 0,
ac, "enableRichText" );
enableRichText->setCheckedState(i18n("Disable &Rich Text"));
- connect( enableRichText, SIGNAL( toggled(bool) ),
- this, SLOT( slotSetRichTextEnabled(bool) ) );
+ connect( enableRichText, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotSetRichTextEnabled(bool) ) );
checkSpelling = new KAction( i18n("Check &Spelling"), "spellcheck", 0,
- editor, SLOT( checkSpelling() ), ac, "check_spelling" );
+ editor, TQT_SLOT( checkSpelling() ), ac, "check_spelling" );
//Fg Color
actionFgColor = new KAction( i18n("Text &Color..."), "color_line", 0,
- this, SLOT( setFgColor() ),
+ this, TQT_SLOT( setFgColor() ),
ac, "format_color" );
//BG Color
actionBgColor = new KAction( i18n("Background Co&lor..."), "color_fill", 0,
- this, SLOT( setBgColor() ),
+ this, TQT_SLOT( setBgColor() ),
ac, "format_bgcolor" );
//Font Family
action_font = new KFontAction( i18n("&Font"), 0,
ac, "format_font" );
- connect( action_font, SIGNAL( activated( const QString & ) ),
- this, SLOT( setFont( const QString & ) ) );
+ connect( action_font, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( setFont( const TQString & ) ) );
//Font Size
action_font_size = new KFontSizeAction( i18n("Font &Size"), 0,
ac, "format_font_size" );
- connect( action_font_size, SIGNAL( fontSizeChanged(int) ),
- this, SLOT( setFontSize(int) ) );
+ connect( action_font_size, TQT_SIGNAL( fontSizeChanged(int) ),
+ this, TQT_SLOT( setFontSize(int) ) );
//Formatting
action_bold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
ac, "format_bold" );
- connect( action_bold, SIGNAL( toggled(bool) ),
- this, SLOT( setBold(bool) ) );
+ connect( action_bold, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setBold(bool) ) );
action_italic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
ac, "format_italic" );
- connect( action_italic, SIGNAL( toggled(bool) ),
- this, SLOT( setItalic(bool) ) );
+ connect( action_italic, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setItalic(bool) ) );
action_underline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
ac, "format_underline" );
- connect( action_underline, SIGNAL( toggled(bool) ),
- this, SLOT( setUnderline(bool) ) );
+ connect( action_underline, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setUnderline(bool) ) );
- connect( editor, SIGNAL( currentFontChanged( const QFont & ) ),
- this, SLOT( updateCharFmt() ) );
+ connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ),
+ this, TQT_SLOT( updateCharFmt() ) );
updateCharFmt();
- connect( editor, SIGNAL( currentFontChanged( const QFont & ) ),
- this, SLOT( updateFont() ) );
+ connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ),
+ this, TQT_SLOT( updateFont() ) );
updateFont();
//Alignment
action_align_left = new KToggleAction( i18n("Align &Left"), "text_left", 0,
ac, "format_align_left" );
- connect( action_align_left, SIGNAL( toggled(bool) ),
- this, SLOT( setAlignLeft(bool) ) );
+ connect( action_align_left, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setAlignLeft(bool) ) );
action_align_center = new KToggleAction( i18n("Align &Center"), "text_center", 0,
ac, "format_align_center" );
- connect( action_align_center, SIGNAL( toggled(bool) ),
- this, SLOT( setAlignCenter(bool) ) );
+ connect( action_align_center, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setAlignCenter(bool) ) );
action_align_right = new KToggleAction( i18n("Align &Right"), "text_right", 0,
ac, "format_align_right" );
- connect( action_align_right, SIGNAL( toggled(bool) ),
- this, SLOT( setAlignRight(bool) ) );
+ connect( action_align_right, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setAlignRight(bool) ) );
action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0,
ac, "format_align_justify" );
- connect( action_align_justify, SIGNAL( toggled(bool) ),
- this, SLOT( setAlignJustify(bool) ) );
+ connect( action_align_justify, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( setAlignJustify(bool) ) );
action_align_left->setExclusiveGroup( "alignment" );
action_align_center->setExclusiveGroup( "alignment" );
action_align_right->setExclusiveGroup( "alignment" );
action_align_justify->setExclusiveGroup( "alignment" );
- connect( editor, SIGNAL( cursorPositionChanged( int,int ) ),
- this, SLOT( updateAligment() ) );
+ connect( editor, TQT_SIGNAL( cursorPositionChanged( int,int ) ),
+ this, TQT_SLOT( updateAligment() ) );
updateAligment();
}
@@ -248,7 +248,7 @@ void KopeteRichTextEditPart::updateCharFmt()
void KopeteRichTextEditPart::clear()
{
- editor->setText( QString::null );
+ editor->setText( TQString::null );
setFont( mFont );
setFgColor( mFgColor );
@@ -303,13 +303,13 @@ void KopeteRichTextEditPart::readConfig()
KConfig *config = KGlobal::config();
config->setGroup("RichTextEditor");
- QColor tmpColor = KGlobalSettings::textColor();
+ TQColor tmpColor = KGlobalSettings::textColor();
setFgColor( config->readColorEntry("FgColor", &tmpColor ) );
tmpColor = KGlobalSettings::baseColor();
setBgColor( config->readColorEntry("BgColor", &tmpColor ) );
- QFont tmpFont = KopetePrefs::prefs()->fontFace();
+ TQFont tmpFont = KopetePrefs::prefs()->fontFace();
setFont( config->readFontEntry("Font", &tmpFont ) );
int tmp = KGlobalSettings::generalFont().pixelSize();
@@ -357,12 +357,12 @@ void KopeteRichTextEditPart::writeConfig()
void KopeteRichTextEditPart::setFgColor()
{
- QColor col=editor->color();
+ TQColor col=editor->color();
int s = KColorDialog::getColor( col, KGlobalSettings::textColor() , editor );
if(!col.isValid())
col= KGlobalSettings::textColor() ;
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
setFgColor( col );
@@ -370,17 +370,17 @@ void KopeteRichTextEditPart::setFgColor()
writeConfig();
}
-void KopeteRichTextEditPart::setFgColor( const QColor &newColor )
+void KopeteRichTextEditPart::setFgColor( const TQColor &newColor )
{
mFgColor = newColor;
if( !(m_capabilities & Kopete::Protocol::RichColor) )
{
- QPalette pal = editor->palette();
- pal.setColor(QPalette::Active, QColorGroup::Text, mFgColor );
- pal.setColor(QPalette::Inactive, QColorGroup::Text, mFgColor );
+ TQPalette pal = editor->palette();
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, mFgColor );
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Text, mFgColor );
- if ( pal == QApplication::palette( editor ) )
+ if ( pal == TQApplication::palette( editor ) )
editor->unsetPalette();
else
editor->setPalette(pal);
@@ -389,16 +389,16 @@ void KopeteRichTextEditPart::setFgColor( const QColor &newColor )
editor->setColor( mFgColor );
}
-QColor KopeteRichTextEditPart::fgColor()
+TQColor KopeteRichTextEditPart::fgColor()
{
if( mFgColor == KGlobalSettings::textColor())
- return QColor();
+ return TQColor();
return mFgColor;
}
void KopeteRichTextEditPart::setBgColor()
{
- QColor col=mBgColor;
+ TQColor col=mBgColor;
int s = KColorDialog::getColor( col, KGlobalSettings::baseColor(), editor );
if(!col.isValid())
@@ -406,7 +406,7 @@ void KopeteRichTextEditPart::setBgColor()
col=KGlobalSettings::baseColor();
}
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
setBgColor( col );
@@ -414,25 +414,25 @@ void KopeteRichTextEditPart::setBgColor()
writeConfig();
}
-void KopeteRichTextEditPart::setBgColor( const QColor &newColor )
+void KopeteRichTextEditPart::setBgColor( const TQColor &newColor )
{
mBgColor = newColor;
- QPalette pal = editor->palette();
- pal.setColor(QPalette::Active, QColorGroup::Base, mBgColor );
- pal.setColor(QPalette::Inactive, QColorGroup::Base, mBgColor );
- pal.setColor(QPalette::Disabled, QColorGroup::Base, mBgColor );
+ TQPalette pal = editor->palette();
+ pal.setColor(TQPalette::Active, TQColorGroup::Base, mBgColor );
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Base, mBgColor );
+ pal.setColor(TQPalette::Disabled, TQColorGroup::Base, mBgColor );
- if ( pal == QApplication::palette( editor ) )
+ if ( pal == TQApplication::palette( editor ) )
editor->unsetPalette();
else
editor->setPalette(pal);
}
-QColor KopeteRichTextEditPart::bgColor()
+TQColor KopeteRichTextEditPart::bgColor()
{
if( mBgColor == KGlobalSettings::baseColor())
- return QColor();
+ return TQColor();
return mBgColor;
}
@@ -453,14 +453,14 @@ void KopeteRichTextEditPart::setFont()
writeConfig();
}
-void KopeteRichTextEditPart::setFont( const QFont &newFont )
+void KopeteRichTextEditPart::setFont( const TQFont &newFont )
{
mFont = newFont;
editor->setFont(mFont);
updateFont();
}
-void KopeteRichTextEditPart::setFont( const QString &newFont )
+void KopeteRichTextEditPart::setFont( const TQString &newFont )
{
mFont.setFamily( newFont );
if( m_capabilities & Kopete::Protocol::RichFont)
@@ -540,7 +540,7 @@ void KopeteRichTextEditPart::setAlignJustify( bool yes )
writeConfig();
}
-QString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const
+TQString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const
{
if( fmt == editor->textFormat() || fmt != Qt::PlainText )
return editor->text();
diff --git a/kopete/kopete/chatwindow/krichtexteditpart.h b/kopete/kopete/chatwindow/krichtexteditpart.h
index cd32993c..06c4b80d 100644
--- a/kopete/kopete/chatwindow/krichtexteditpart.h
+++ b/kopete/kopete/chatwindow/krichtexteditpart.h
@@ -5,8 +5,8 @@
#include <kparts/part.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqfont.h>
+#include <tqcolor.h>
class KAboutData;
class KTextEdit;
@@ -16,7 +16,7 @@ class KToggleAction;
class KopeteTextEdit;
/**
- * KParts wrapper for QTextEdit.
+ * KParts wrapper for TQTextEdit.
*
* Originally by Richard Moore, rich@kde.org
* forked by Jason Keirstead
@@ -26,21 +26,21 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart
Q_OBJECT
public:
- KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& );
- KopeteRichTextEditPart( QWidget *wparent, const char *wname, int capabilities );
+ KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& );
+ KopeteRichTextEditPart( TQWidget *wparent, const char *wname, int capabilities );
/**
* Returns the current editor widget.
*/
KTextEdit *widget() const { return (KTextEdit*)editor; }
- QString text( Qt::TextFormat = Qt::AutoText ) const;
+ TQString text( Qt::TextFormat = Qt::AutoText ) const;
- QFont font() { return mFont; }
+ TQFont font() { return mFont; }
- QColor fgColor();
+ TQColor fgColor();
- QColor bgColor();
+ TQColor bgColor();
void clear();
@@ -57,14 +57,14 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart
public slots:
void setFgColor();
- void setFgColor( const QColor & );
+ void setFgColor( const TQColor & );
void setBgColor();
- void setBgColor( const QColor & );
+ void setBgColor( const TQColor & );
void setFont();
- void setFont( const QFont & );
- void setFont( const QString & );
+ void setFont( const TQFont & );
+ void setFont( const TQString & );
void setFontSize( int );
@@ -131,9 +131,9 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart
bool m_configWriteLock;
- QFont mFont;
- QColor mBgColor;
- QColor mFgColor;
+ TQFont mFont;
+ TQColor mBgColor;
+ TQColor mFgColor;
};
#endif // KRICHTEXTEDITPART_H
diff --git a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp
index 26dba26b..31535603 100644
--- a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp
+++ b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp
@@ -20,8 +20,8 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kopetechatwindowstyle.h>
@@ -30,10 +30,10 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyle_Test );
void ChatWindowStyle_Test::allTests()
{
- testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle"));
+ testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle"));
// change user data dir to avoid messing with user's .kde dir
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true );
testPaths();
testHtml();
@@ -43,8 +43,8 @@ void ChatWindowStyle_Test::allTests()
void ChatWindowStyle_Test::testPaths()
{
- QString expectedStylePath = SRCDIR + QString::fromUtf8("/TestStyle");
- QString expectedBaseHref = expectedStylePath + QString::fromUtf8("/Contents/Resources/");
+ TQString expectedStylePath = SRCDIR + TQString::fromUtf8("/TestStyle");
+ TQString expectedBaseHref = expectedStylePath + TQString::fromUtf8("/Contents/Resources/");
CHECK(testStyle->getStylePath(), expectedStylePath);
CHECK(testStyle->getStyleBaseHref(), expectedBaseHref);
@@ -52,7 +52,7 @@ void ChatWindowStyle_Test::testPaths()
void ChatWindowStyle_Test::testHtml()
{
- QString exceptedHeader = QString::fromUtf8(
+ TQString exceptedHeader = TQString::fromUtf8(
"<div>%chatName%</div>\n"
"<div>%sourceName%</div>\n"
"<div>%destinationName%</div>\n"
@@ -61,8 +61,8 @@ void ChatWindowStyle_Test::testHtml()
"<div>%timeOpened%</div>\n"
"<div>%timeOpened{%H:%M}%</div>");
// Footer is empty on purpose, this is to test if the file doesn't exist.
- QString exceptedFooter;
- QString exceptedIncoming = QString::fromUtf8(
+ TQString exceptedFooter;
+ TQString exceptedIncoming = TQString::fromUtf8(
"Incoming:\n"
"<div>%userIconPath%</div>\n"
"<div>%senderScreenName%</div>\n"
@@ -72,12 +72,12 @@ void ChatWindowStyle_Test::testHtml()
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>\n"
"<div id=\"insert\">");
- QString exceptedNextIncoming = QString::fromUtf8(
+ TQString exceptedNextIncoming = TQString::fromUtf8(
"Incoming:\n"
"<div>%message%</div>\n"
"<div id=\"insert\">"
);
- QString exceptedOutgoing = QString::fromUtf8(
+ TQString exceptedOutgoing = TQString::fromUtf8(
"Outgoing:\n"
"<div>%userIconPath%</div>\n"
"<div>%senderScreenName%</div>\n"
@@ -87,12 +87,12 @@ void ChatWindowStyle_Test::testHtml()
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>\n"
"<div id=\"insert\">");
- QString exceptedNextOutgoing = QString::fromUtf8(
+ TQString exceptedNextOutgoing = TQString::fromUtf8(
"Outgoing:\n"
"<div>%message%</div>\n"
"<div id=\"insert\">"
);
- QString exceptedStatus = QString::fromUtf8(
+ TQString exceptedStatus = TQString::fromUtf8(
"<div>%message%</div>\n"
"<div>%time%</div>\n"
"<div>%time{%H:%M}%</div>");
@@ -113,10 +113,10 @@ void ChatWindowStyle_Test::testAction()
void ChatWindowStyle_Test::testVariants()
{
- QString expectedNameResult("Variant1;Variant2");
- QString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css");
- QStringList variantNameList;
- QStringList variantPathList;
+ TQString expectedNameResult("Variant1;Variant2");
+ TQString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css");
+ TQStringList variantNameList;
+ TQStringList variantPathList;
ChatWindowStyle::StyleVariants variantList;
ChatWindowStyle::StyleVariants::ConstIterator it;
variantList = testStyle->getVariants();
diff --git a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
index af0f6b81..9fe66c06 100644
--- a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
+++ b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
@@ -21,10 +21,10 @@
#include <stdlib.h>
// Qt includes
-#include <qdir.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
// KDE includes
#include <kapplication.h>
@@ -53,7 +53,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyleRendering_Test );
class FakeContact : public Kopete::Contact
{
public:
- FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {}
+ FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {}
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; }
virtual void slotUserInfo() {};
};
@@ -61,22 +61,22 @@ public:
class FakeProtocol : public Kopete::Protocol
{
public:
-FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name)
+FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name)
{
}
-Account* createNewAccount( const QString &/*accountId*/ )
+Account* createNewAccount( const TQString &/*accountId*/ )
{
return 0L;
}
-AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/)
+AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/)
{
return 0L;
}
-KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */)
+KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */)
{
return 0L;
}
@@ -86,7 +86,7 @@ KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/,
class FakeAccount : public Kopete::Account
{
public:
-FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name)
+FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name)
{
}
@@ -96,7 +96,7 @@ FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name
}
-bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ )
+bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ )
{
return true;
}
@@ -111,7 +111,7 @@ void disconnect()
// do nothing
}
-void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/)
+void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/)
{
// do nothing
}
@@ -122,8 +122,8 @@ class ChatWindowStyleRendering_Test::Private
public:
Private()
{
- protocol = new FakeProtocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message");
- account = new FakeAccount(protocol, QString("testaccount"), 0);
+ protocol = new FakeProtocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message");
+ account = new FakeAccount(protocol, TQString("testaccount"), 0);
// Create fake meta/contacts
myselfMetaContact = new Kopete::MetaContact();
@@ -144,7 +144,7 @@ public:
fakeChatSession->setDisplayName("Test Session");
// Create testStyle
- testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle"));
+ testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle"));
}
~Private()
{
@@ -163,7 +163,7 @@ public:
Kopete::ChatSession *fakeChatSession;
ChatWindowStyle *testStyle;
- QString resultHTML;
+ TQString resultHTML;
};
@@ -181,7 +181,7 @@ ChatWindowStyleRendering_Test::~ChatWindowStyleRendering_Test()
void ChatWindowStyleRendering_Test::allTests()
{
// change user data dir to avoid messing with user's .kde dir
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true );
KApplication::disableAutoDcopRegistration();
//KCmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0);
@@ -197,7 +197,7 @@ void ChatWindowStyleRendering_Test::allTests()
void ChatWindowStyleRendering_Test::testHeaderRendering()
{
- QString expectedHtml = QString(
+ TQString expectedHtml = TQString(
"<div><span id=\"KopeteHeaderChatNameInternal\">Test Session</span></div>\n"
"<div>Bob</div>\n"
"<div>Audrey</div>\n"
@@ -205,11 +205,11 @@ void ChatWindowStyleRendering_Test::testHeaderRendering()
"<div>Outgoing/buddy_icon.png</div>\n"
"<div>%1</div>\n"
"<div>%2</div>"
- ).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) )
- .arg(QDateTime::currentDateTime().toString("hh:mm"));
+ ).arg(KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) )
+ .arg(TQDateTime::currentDateTime().toString("hh:mm"));
- QString headerHtml = d->testStyle->getHeaderHtml();
- QString resultHtml;
+ TQString headerHtml = d->testStyle->getHeaderHtml();
+ TQString resultHtml;
resultHtml = chatPart->formatStyleKeywords(headerHtml);
@@ -220,7 +220,7 @@ void ChatWindowStyleRendering_Test::testHeaderRendering()
void ChatWindowStyleRendering_Test::testMessageRendering()
{
- QString expectedIncomingHtml = QString(
+ TQString expectedIncomingHtml = TQString(
"Incoming:\n"
"<div>Incoming/buddy_icon.png</div>\n"
"<div><a href=\"kopetemessage://audrey@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" class=\"KopeteDisplayName\">audrey@localhost</a></div>\n"
@@ -230,9 +230,9 @@ void ChatWindowStyleRendering_Test::testMessageRendering()
"<div>%1</div>\n"
"<div>%2</div>\n"
"<div id=\"insert\">"
- ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) );
+ ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) );
- QString expectedOutgoingHtml = QString(
+ TQString expectedOutgoingHtml = TQString(
"Outgoing:\n"
"<div>Outgoing/buddy_icon.png</div>\n"
"<div><a href=\"kopetemessage://bob@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" class=\"KopeteDisplayName\">bob@localhost</a></div>\n"
@@ -242,14 +242,14 @@ void ChatWindowStyleRendering_Test::testMessageRendering()
"<div>%1</div>\n"
"<div>%2</div>\n"
"<div id=\"insert\">"
- ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) );
+ ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) );
- QString tempHtml;
- QString resultHtml;
+ TQString tempHtml;
+ TQString resultHtml;
- Kopete::Message msgIn(d->other, d->myself, QString::fromUtf8("Test"), Kopete::Message::Inbound );
- Kopete::Message msgOut(d->myself, d->other, QString::fromUtf8("Hello there"), Kopete::Message::Outbound);
+ Kopete::Message msgIn(d->other, d->myself, TQString::fromUtf8("Test"), Kopete::Message::Inbound );
+ Kopete::Message msgOut(d->myself, d->other, TQString::fromUtf8("Hello there"), Kopete::Message::Outbound);
tempHtml = d->testStyle->getIncomingHtml();
resultHtml = chatPart->formatStyleKeywords(tempHtml, msgIn);
@@ -268,16 +268,16 @@ void ChatWindowStyleRendering_Test::testMessageRendering()
void ChatWindowStyleRendering_Test::testStatusRendering()
{
- QString expectedStatusHtml = QString(
+ TQString expectedStatusHtml = TQString(
"<div><span style=\"\"class=\"KopeteMessageBody\">A contact went offline.</span></div>\n"
"<div>%1</div>\n"
"<div>%2</div>"
- ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) );
+ ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) );
- QString statusHtml = d->testStyle->getStatusHtml();
- QString resultHtml;
+ TQString statusHtml = d->testStyle->getStatusHtml();
+ TQString resultHtml;
- Kopete::Message msgStatus(0,0, QString::fromUtf8("A contact went offline."), Kopete::Message::Internal);
+ Kopete::Message msgStatus(0,0, TQString::fromUtf8("A contact went offline."), Kopete::Message::Internal);
resultHtml = chatPart->formatStyleKeywords(statusHtml, msgStatus);
CHECK(resultHtml, expectedStatusHtml);
@@ -285,17 +285,17 @@ void ChatWindowStyleRendering_Test::testStatusRendering()
void ChatWindowStyleRendering_Test::testFullRendering()
{
- QString expectedFullHtml;
- QString resultHtml;
-
- Kopete::Message msgIn1(d->myself, d->other, QString("Hello there !"), Kopete::Message::Inbound);
- Kopete::Message msgIn2(d->myself, d->other, QString("How are you doing ?"), Kopete::Message::Inbound);
- Kopete::Message msgOut1(d->other, d->myself, QString("Fine and you ?"), Kopete::Message::Outbound);
- Kopete::Message msgStatus1(d->myself,d->other, QString("You are now marked as away."), Kopete::Message::Internal);
- Kopete::Message msgStatus2(d->myself,d->other, QString("You are now marked as online."), Kopete::Message::Internal);
- Kopete::Message msgIn3(d->myself, d->other, QString("Well, doing some tests."), Kopete::Message::Internal);
- Kopete::Message msgOut2(d->other, d->myself, QString("All your bases are belong to us."), Kopete::Message::Outbound);
- Kopete::Message msgOut3(d->other, d->myself, QString("You are on the way to destruction"), Kopete::Message::Outbound);
+ TQString expectedFullHtml;
+ TQString resultHtml;
+
+ Kopete::Message msgIn1(d->myself, d->other, TQString("Hello there !"), Kopete::Message::Inbound);
+ Kopete::Message msgIn2(d->myself, d->other, TQString("How are you doing ?"), Kopete::Message::Inbound);
+ Kopete::Message msgOut1(d->other, d->myself, TQString("Fine and you ?"), Kopete::Message::Outbound);
+ Kopete::Message msgStatus1(d->myself,d->other, TQString("You are now marked as away."), Kopete::Message::Internal);
+ Kopete::Message msgStatus2(d->myself,d->other, TQString("You are now marked as online."), Kopete::Message::Internal);
+ Kopete::Message msgIn3(d->myself, d->other, TQString("Well, doing some tests."), Kopete::Message::Internal);
+ Kopete::Message msgOut2(d->other, d->myself, TQString("All your bases are belong to us."), Kopete::Message::Outbound);
+ Kopete::Message msgOut3(d->other, d->myself, TQString("You are on the way to destruction"), Kopete::Message::Outbound);
// Change style on the fly in ChatMessagePart so this test would run
chatPart->setStyle(d->testStyle);
@@ -313,11 +313,11 @@ void ChatWindowStyleRendering_Test::testFullRendering()
resultHtml = chatPart->htmlDocument().toHTML();
// Read the expected(sample) HTML from file.
- QFile sampleHtml(QString(SRCDIR)+"sample.html");
+ TQFile sampleHtml(TQString(SRCDIR)+"sample.html");
if(sampleHtml.open(IO_ReadOnly))
{
- QTextStream stream(&sampleHtml);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&sampleHtml);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
expectedFullHtml = stream.read();
sampleHtml.close();
}
diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp
index 3d86fb8d..feaa88fd 100644
--- a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp
+++ b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp
@@ -18,9 +18,9 @@
#include "kopeteaccountconfig.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qguardedptr.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqguardedptr.h>
#include <kcolorbutton.h>
#include <kpushbutton.h>
@@ -47,31 +47,31 @@ class KopeteAccountLVI : public KListViewItem
private:
//need to be guarded because some accounts may be linked (that's the case of jabber transports)
- QGuardedPtr<Kopete::Account> m_account;
+ TQGuardedPtr<Kopete::Account> m_account;
};
-typedef KGenericFactory<KopeteAccountConfig, QWidget> KopeteAccountConfigFactory;
+typedef KGenericFactory<KopeteAccountConfig, TQWidget> KopeteAccountConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_accountconfig, KopeteAccountConfigFactory( "kcm_kopete_accountconfig" ) )
-KopeteAccountConfig::KopeteAccountConfig( QWidget *parent, const char * /* name */, const QStringList &args )
+KopeteAccountConfig::KopeteAccountConfig( TQWidget *parent, const char * /* name */, const TQStringList &args )
: KCModule( KopeteAccountConfigFactory::instance(), parent, args )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
m_view = new KopeteAccountConfigBase( this, "KopeteAccountConfig::m_view" );
m_view->mButtonUp->setIconSet( SmallIconSet( "up" ) );
m_view->mButtonDown->setIconSet( SmallIconSet( "down" ) );
- connect( m_view->mButtonNew, SIGNAL( clicked() ), this, SLOT( slotAddAccount() ) );
- connect( m_view->mButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEditAccount() ) );
- connect( m_view->mButtonRemove, SIGNAL( clicked() ), this, SLOT( slotRemoveAccount() ) );
- connect( m_view->mButtonUp, SIGNAL( clicked() ), this, SLOT( slotAccountUp() ) );
- connect( m_view->mButtonDown, SIGNAL( clicked() ), this, SLOT( slotAccountDown() ) );
- connect( m_view->mAccountList, SIGNAL( selectionChanged() ), this, SLOT( slotItemSelected() ) );
- connect( m_view->mAccountList, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotEditAccount() ) );
- connect( m_view->mUseColor, SIGNAL( toggled( bool ) ), this, SLOT( slotColorChanged() ) );
- connect( m_view->mColorButton, SIGNAL( changed( const QColor & ) ), this, SLOT( slotColorChanged() ) );
+ connect( m_view->mButtonNew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAccount() ) );
+ connect( m_view->mButtonEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditAccount() ) );
+ connect( m_view->mButtonRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveAccount() ) );
+ connect( m_view->mButtonUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountUp() ) );
+ connect( m_view->mButtonDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountDown() ) );
+ connect( m_view->mAccountList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotItemSelected() ) );
+ connect( m_view->mAccountList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), this, TQT_SLOT( slotEditAccount() ) );
+ connect( m_view->mUseColor, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotColorChanged() ) );
+ connect( m_view->mColorButton, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( slotColorChanged() ) );
m_view->mAccountList->setSorting(-1);
@@ -92,7 +92,7 @@ void KopeteAccountConfig::save()
i = static_cast<KopeteAccountLVI*>( i->nextSibling() );
}
- QMap<Kopete::Account *, QColor>::Iterator it;
+ TQMap<Kopete::Account *, TQColor>::Iterator it;
for(it=m_newColors.begin() ; it != m_newColors.end() ; ++it)
it.key()->setColor(it.data());
m_newColors.clear();
@@ -108,7 +108,7 @@ void KopeteAccountConfig::load()
m_view->mAccountList->clear();
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for ( Kopete::Account *i = accounts.first() ; i; i = accounts.next() )
{
// Insert the item after the previous one
@@ -136,7 +136,7 @@ void KopeteAccountConfig::slotItemSelected()
m_view->mButtonDown->setEnabled( itemSelected->itemBelow() );
Kopete::Account *account = itemSelected->account();
- QColor color= m_newColors.contains(account) ? m_newColors[account] : account->color();
+ TQColor color= m_newColors.contains(account) ? m_newColors[account] : account->color();
m_view->mUseColor->setEnabled( true );
m_view->mUseColor->setChecked( color.isValid() );
m_view->mColorButton->setColor( color );
@@ -181,7 +181,7 @@ void KopeteAccountConfig::slotAccountDown()
void KopeteAccountConfig::slotAddAccount()
{
AddAccountWizard *m_addwizard = new AddAccountWizard( this, "addAccountWizard", true );
- connect( m_addwizard, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotAddWizardDone() ) );
+ connect( m_addwizard, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotAddWizardDone() ) );
m_addwizard->show();
}
@@ -204,15 +204,15 @@ void KopeteAccountConfig::slotEditAccount()
// FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting
// is braindead and error-prone. Looking at MSN the only reason I can see is
// because it allows direct subclassing of designer widgets. But what is
- // wrong with embedding the designer widget in an empty QWidget instead?
+ // wrong with embedding the designer widget in an empty TQWidget instead?
// Also, if this REALLY has to be a pure class and not a widget, then the
// class should at least be renamed to EditAccountIface instead - Martijn
- QWidget *w = dynamic_cast<QWidget *>( m_accountWidget );
+ TQWidget *w = dynamic_cast<TQWidget *>( m_accountWidget );
if ( !w )
return;
editDialog->setMainWidget( w );
- if ( editDialog->exec() == QDialog::Accepted )
+ if ( editDialog->exec() == TQDialog::Accepted )
{
if( m_accountWidget->validateData() )
m_accountWidget->apply();
@@ -263,7 +263,7 @@ void KopeteAccountConfig::slotColorChanged()
}
else if(!m_view->mUseColor->isChecked())
{ //the user disabled account coloring, but it was activated before
- m_newColors[account]=QColor();
+ m_newColors[account]=TQColor();
emit changed(true);
return;
}
diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.h b/kopete/kopete/config/accounts/kopeteaccountconfig.h
index 9aec2a60..cfaf1064 100644
--- a/kopete/kopete/config/accounts/kopeteaccountconfig.h
+++ b/kopete/kopete/config/accounts/kopeteaccountconfig.h
@@ -17,8 +17,8 @@
#define __ACCOUNTCONFIG_H
#include <kcmodule.h>
-#include <qmap.h>
-#include <qcolor.h>
+#include <tqmap.h>
+#include <tqcolor.h>
namespace Kopete
{
@@ -35,7 +35,7 @@ class KopeteAccountConfig : public KCModule
Q_OBJECT
public:
- KopeteAccountConfig(QWidget *parent, const char *name, const QStringList &args );
+ KopeteAccountConfig(TQWidget *parent, const char *name, const TQStringList &args );
public slots:
virtual void save();
@@ -43,7 +43,7 @@ public slots:
private:
KopeteAccountConfigBase *m_view;
- QMap<Kopete::Account* , QColor> m_newColors;
+ TQMap<Kopete::Account* , TQColor> m_newColors;
bool m_protected;
private slots:
diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp
index d83b0801..2f7a5eaf 100644
--- a/kopete/kopete/config/appearance/appearanceconfig.cpp
+++ b/kopete/kopete/config/appearance/appearanceconfig.cpp
@@ -29,13 +29,13 @@
#include "tooltipeditdialog.h"
#include "emoticonseditdialog.h"
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqlabel.h>
#include <kdeversion.h>
#include <kinputdialog.h>
@@ -84,9 +84,9 @@
#include "kopeteemoticons.h"
#include "kopeteglobal.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-typedef KGenericFactory<AppearanceConfig, QWidget> KopeteAppearanceConfigFactory;
+typedef KGenericFactory<AppearanceConfig, TQWidget> KopeteAppearanceConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_appearanceconfig, KopeteAppearanceConfigFactory( "kcm_kopete_appearanceconfig" ) )
class FakeProtocol;
@@ -102,7 +102,7 @@ public:
styleChanged(false)
{}
- QTabWidget *mAppearanceTabCtl;
+ TQTabWidget *mAppearanceTabCtl;
ChatMessagePart *preview;
AppearanceConfig_Emoticons *mPrfsEmoticons;
@@ -111,7 +111,7 @@ public:
AppearanceConfig_ContactList *mPrfsContactList;
// value is the style path
- QMap<QListBoxItem*,QString> styleItemMap;
+ TQMap<TQListBoxItem*,TQString> styleItemMap;
ChatWindowStyle::StyleVariants currentVariantMap;
ChatWindowStyle *currentStyle;
bool loading;
@@ -130,16 +130,16 @@ public:
class KopeteStyleNewStuff : public KNewStuff
{
public:
- KopeteStyleNewStuff(const QString &type, QWidget *parentWidget = 0)
+ KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0)
: KNewStuff( type, parentWidget)
{}
- bool createUploadFile(const QString &)
+ bool createUploadFile(const TQString &)
{
return false;
}
- bool install(const QString &styleFilename)
+ bool install(const TQString &styleFilename)
{
int styleInstallReturn = 0;
styleInstallReturn = ChatWindowStyleManager::self()->installStyle( styleFilename );
@@ -179,59 +179,59 @@ public:
};
// TODO: Someday, this configuration dialog must(not should) use KConfigXT
-AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const QStringList &args )
+AppearanceConfig::AppearanceConfig(TQWidget *parent, const char* /*name*/, const TQStringList &args )
: KCModule( KopeteAppearanceConfigFactory::instance(), parent, args )
{
d = new Private;
- (new QVBoxLayout(this))->setAutoAdd(true);
- d->mAppearanceTabCtl = new QTabWidget(this, "mAppearanceTabCtl");
+ (new TQVBoxLayout(this))->setAutoAdd(true);
+ d->mAppearanceTabCtl = new TQTabWidget(this, "mAppearanceTabCtl");
KConfig *config = KGlobal::config();
config->setGroup( "ChatWindowSettings" );
// "Emoticons" TAB ==========================================================
d->mPrfsEmoticons = new AppearanceConfig_Emoticons(d->mAppearanceTabCtl);
- connect(d->mPrfsEmoticons->chkUseEmoticons, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsEmoticons->chkRequireSpaces, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsEmoticons->icon_theme_list, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectedEmoticonsThemeChanged()));
- connect(d->mPrfsEmoticons->btnInstallTheme, SIGNAL(clicked()),
- this, SLOT(installEmoticonTheme()));
-
- connect(d->mPrfsEmoticons->btnGetThemes, SIGNAL(clicked()),
- this, SLOT(slotGetEmoticonThemes()));
- connect(d->mPrfsEmoticons->btnRemoveTheme, SIGNAL(clicked()),
- this, SLOT(removeSelectedEmoticonTheme()));
- connect(d->mPrfsEmoticons->btnEditThemes, SIGNAL(clicked()),
- this, SLOT(editSelectedEmoticonTheme()));
+ connect(d->mPrfsEmoticons->chkUseEmoticons, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsEmoticons->chkRequireSpaces, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsEmoticons->icon_theme_list, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectedEmoticonsThemeChanged()));
+ connect(d->mPrfsEmoticons->btnInstallTheme, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(installEmoticonTheme()));
+
+ connect(d->mPrfsEmoticons->btnGetThemes, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotGetEmoticonThemes()));
+ connect(d->mPrfsEmoticons->btnRemoveTheme, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeSelectedEmoticonTheme()));
+ connect(d->mPrfsEmoticons->btnEditThemes, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editSelectedEmoticonTheme()));
d->mAppearanceTabCtl->addTab(d->mPrfsEmoticons, i18n("&Emoticons"));
// "Chat Window" TAB ========================================================
d->mPrfsChatWindow = new AppearanceConfig_ChatWindow(d->mAppearanceTabCtl);
- connect(d->mPrfsChatWindow->styleList, SIGNAL(selectionChanged(QListBoxItem *)),
- this, SLOT(slotChatStyleSelected()));
- connect(d->mPrfsChatWindow->variantList, SIGNAL(activated(const QString&)),
- this, SLOT(slotChatStyleVariantSelected(const QString &)));
- connect(d->mPrfsChatWindow->deleteButton, SIGNAL(clicked()),
- this, SLOT(slotDeleteChatStyle()));
- connect(d->mPrfsChatWindow->installButton, SIGNAL(clicked()),
- this, SLOT(slotInstallChatStyle()));
- connect(d->mPrfsChatWindow->btnGetStyles, SIGNAL(clicked()),
- this, SLOT(slotGetChatStyles()));
- connect(d->mPrfsChatWindow->groupConsecutiveMessages, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
+ connect(d->mPrfsChatWindow->styleList, TQT_SIGNAL(selectionChanged(TQListBoxItem *)),
+ this, TQT_SLOT(slotChatStyleSelected()));
+ connect(d->mPrfsChatWindow->variantList, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotChatStyleVariantSelected(const TQString &)));
+ connect(d->mPrfsChatWindow->deleteButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteChatStyle()));
+ connect(d->mPrfsChatWindow->installButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotInstallChatStyle()));
+ connect(d->mPrfsChatWindow->btnGetStyles, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotGetChatStyles()));
+ connect(d->mPrfsChatWindow->groupConsecutiveMessages, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
// Show the available styles when the Manager has finish to load the styles.
- connect(ChatWindowStyleManager::self(), SIGNAL(loadStylesFinished()), this, SLOT(slotLoadChatStyles()));
+ connect(ChatWindowStyleManager::self(), TQT_SIGNAL(loadStylesFinished()), this, TQT_SLOT(slotLoadChatStyles()));
- d->mPrfsChatWindow->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ d->mPrfsChatWindow->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
// Create the fake Chat Session
createPreviewChatSession();
- QVBoxLayout *l = new QVBoxLayout(d->mPrfsChatWindow->htmlFrame);
+ TQVBoxLayout *l = new TQVBoxLayout(d->mPrfsChatWindow->htmlFrame);
d->preview = new ChatMessagePart(d->previewChatSession, d->mPrfsChatWindow->htmlFrame, "preview");
d->preview->setJScriptEnabled(false);
d->preview->setJavaEnabled(false);
@@ -242,7 +242,7 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const
htmlWidget->setMarginHeight(4);
htmlWidget->setFocusPolicy(NoFocus);
htmlWidget->setSizePolicy(
- QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
l->addWidget(htmlWidget);
// Add the preview message to the ChatMessagePart
createPreviewMessages();
@@ -251,28 +251,28 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const
// "Contact List" TAB =======================================================
d->mPrfsContactList = new AppearanceConfig_ContactList(d->mAppearanceTabCtl);
- connect(d->mPrfsContactList->mTreeContactList, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mSortByGroup, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mEditTooltips, SIGNAL(clicked()),
- this, SLOT(slotEditTooltips()));
- connect(d->mPrfsContactList->mIndentContacts, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mDisplayMode, SIGNAL(clicked(int)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mIconMode, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mAnimateChanges, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mFadeVisibility, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mFoldVisibility, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mAutoHide, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsContactList->mAutoHideTimeout, SIGNAL(valueChanged(int)),
- this, SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mTreeContactList, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mSortByGroup, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mEditTooltips, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditTooltips()));
+ connect(d->mPrfsContactList->mIndentContacts, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mDisplayMode, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mIconMode, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mAnimateChanges, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mFadeVisibility, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mFoldVisibility, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mAutoHide, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsContactList->mAutoHideTimeout, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(emitChanged()));
// don't enable the checkbox if XRender is not available
#ifdef HAVE_XRENDER
@@ -285,37 +285,37 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const
// "Colors and Fonts" TAB ===================================================
d->mPrfsColors = new AppearanceConfig_Colors(d->mAppearanceTabCtl);
- connect(d->mPrfsColors->foregroundColor, SIGNAL(changed(const QColor &)),
- this, SLOT(slotHighlightChanged()));
- connect(d->mPrfsColors->backgroundColor, SIGNAL(changed(const QColor &)),
- this, SLOT(slotHighlightChanged()));
- connect(d->mPrfsColors->fontFace, SIGNAL(fontSelected(const QFont &)),
- this, SLOT(slotChangeFont()));
- connect(d->mPrfsColors->textColor, SIGNAL(changed(const QColor &)),
- this, SLOT(slotUpdateChatPreview()));
- connect(d->mPrfsColors->bgColor, SIGNAL(changed(const QColor &)),
- this, SLOT(slotUpdateChatPreview()));
- connect(d->mPrfsColors->linkColor, SIGNAL(changed(const QColor &)),
- this, SLOT(slotUpdateChatPreview()));
- connect(d->mPrfsColors->mGreyIdleMetaContacts, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->idleContactColor, SIGNAL(changed(const QColor &)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mUseCustomFonts, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mSmallFont, SIGNAL(fontSelected(const QFont &)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mNormalFont, SIGNAL(fontSelected(const QFont &)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mGroupNameColor, SIGNAL(changed(const QColor &)),
- this, SLOT(emitChanged()));
-
- connect(d->mPrfsColors->mBgOverride, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mFgOverride, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
- connect(d->mPrfsColors->mRtfOverride, SIGNAL(toggled(bool)),
- this, SLOT(emitChanged()));
+ connect(d->mPrfsColors->foregroundColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(slotHighlightChanged()));
+ connect(d->mPrfsColors->backgroundColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(slotHighlightChanged()));
+ connect(d->mPrfsColors->fontFace, TQT_SIGNAL(fontSelected(const TQFont &)),
+ this, TQT_SLOT(slotChangeFont()));
+ connect(d->mPrfsColors->textColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(slotUpdateChatPreview()));
+ connect(d->mPrfsColors->bgColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(slotUpdateChatPreview()));
+ connect(d->mPrfsColors->linkColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(slotUpdateChatPreview()));
+ connect(d->mPrfsColors->mGreyIdleMetaContacts, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->idleContactColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mUseCustomFonts, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mSmallFont, TQT_SIGNAL(fontSelected(const TQFont &)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mNormalFont, TQT_SIGNAL(fontSelected(const TQFont &)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mGroupNameColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(emitChanged()));
+
+ connect(d->mPrfsColors->mBgOverride, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mFgOverride, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
+ connect(d->mPrfsColors->mRtfOverride, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(emitChanged()));
d->mAppearanceTabCtl->addTab(d->mPrfsColors, i18n("Colors && Fonts"));
@@ -331,8 +331,8 @@ AppearanceConfig::~AppearanceConfig()
void AppearanceConfig::updateEmoticonsButton(bool _b)
{
- QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText();
- QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/"));
+ TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText();
+ TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/"));
d->mPrfsEmoticons->btnRemoveTheme->setEnabled( _b && fileInf.isWritable());
d->mPrfsEmoticons->btnGetThemes->setEnabled( false );
}
@@ -499,28 +499,28 @@ void AppearanceConfig::updateEmoticonlist()
d->mPrfsEmoticons->icon_theme_list->clear(); // Wipe out old list
// Get a list of directories in our icon theme dir
- QStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", "");
+ TQStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", "");
// loop adding themes from all dirs into theme-list
for(unsigned int x = 0;x < themeDirs.count();x++)
{
- QDir themeQDir(themeDirs[x]);
- themeQDir.setFilter( QDir::Dirs ); // only scan for subdirs
- themeQDir.setSorting( QDir::Name ); // I guess name is as good as any
+ TQDir themeQDir(themeDirs[x]);
+ themeQDir.setFilter( TQDir::Dirs ); // only scan for subdirs
+ themeQDir.setSorting( TQDir::Name ); // I guess name is as good as any
for(unsigned int y = 0; y < themeQDir.count(); y++)
{
- QStringList themes = themeQDir.entryList(QDir::Dirs, QDir::Name);
+ TQStringList themes = themeQDir.entryList(TQDir::Dirs, TQDir::Name);
// We don't care for '.' and '..'
if ( themeQDir[y] != "." && themeQDir[y] != ".." )
{
// Add ourselves to the list, using our directory name FIXME: use the first emoticon of the theme.
- QPixmap previewPixmap = QPixmap(locate("emoticons", themeQDir[y]+"/smile.png"));
+ TQPixmap previewPixmap = TQPixmap(locate("emoticons", themeQDir[y]+"/smile.png"));
d->mPrfsEmoticons->icon_theme_list->insertItem(previewPixmap,themeQDir[y]);
}
}
}
// Where is that theme in our big-list-o-themes?
- QListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() );
+ TQListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() );
if (item) // found it... make it the currently selected theme
d->mPrfsEmoticons->icon_theme_list->setCurrentItem( item );
@@ -530,18 +530,18 @@ void AppearanceConfig::updateEmoticonlist()
void AppearanceConfig::slotSelectedEmoticonsThemeChanged()
{
- QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText();
- QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/"));
+ TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText();
+ TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/"));
d->mPrfsEmoticons->btnRemoveTheme->setEnabled( fileInf.isWritable() );
Kopete::Emoticons emoticons( themeName );
- QStringList smileys = emoticons.emoticonAndPicList().keys();
- QString newContentText = "<qt>";
+ TQStringList smileys = emoticons.emoticonAndPicList().keys();
+ TQString newContentText = "<qt>";
- for(QStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it )
- newContentText += QString::fromLatin1("<img src=\"%1\"> ").arg(*it);
+ for(TQStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it )
+ newContentText += TQString::fromLatin1("<img src=\"%1\"> ").arg(*it);
- newContentText += QString::fromLatin1("</qt>");
+ newContentText += TQString::fromLatin1("</qt>");
d->mPrfsEmoticons->icon_theme_preview->setText(newContentText);
emitChanged();
}
@@ -563,7 +563,7 @@ void AppearanceConfig::slotChangeFont()
void AppearanceConfig::slotChatStyleSelected()
{
// Retrieve variant list.
- QString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()];
+ TQString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()];
d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool( stylePath );
if(d->currentStyle)
@@ -603,7 +603,7 @@ void AppearanceConfig::slotChatStyleSelected()
}
}
-void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName)
+void AppearanceConfig::slotChatStyleVariantSelected(const TQString &variantName)
{
// kdDebug(14000) << k_funcinfo << variantName << endl;
// kdDebug(14000) << k_funcinfo << d->currentVariantMap[variantName] << endl;
@@ -615,11 +615,11 @@ void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName)
void AppearanceConfig::slotInstallChatStyle()
{
- KURL styleToInstall = KFileDialog::getOpenURL( QString::null, QString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") );
+ KURL styleToInstall = KFileDialog::getOpenURL( TQString::null, TQString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") );
if( !styleToInstall.isEmpty() )
{
- QString stylePath;
+ TQString stylePath;
if( KIO::NetAccess::download( styleToInstall, stylePath, this ) )
{
int styleInstallReturn = 0;
@@ -660,14 +660,14 @@ void AppearanceConfig::slotInstallChatStyle()
void AppearanceConfig::slotDeleteChatStyle()
{
- QString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text();
- QString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()];
+ TQString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text();
+ TQString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()];
if( ChatWindowStyleManager::self()->removeStyle(stylePathToDelete) )
{
KMessageBox::queuedMessageBox(this, KMessageBox::Information, i18n("It's the deleted style name", "The style %1 was successfully deleted.").arg(styleName));
// Get the first item in the stye List.
- QString stylePath = (*d->styleItemMap.begin());
+ TQString stylePath = (*d->styleItemMap.begin());
d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath);
emitChanged();
}
@@ -686,7 +686,7 @@ void AppearanceConfig::slotGetChatStyles()
downloadDialog->setType( "kopete/chatstyle" );
// you have to do this by hand when providing your own Engine
KNS::ProviderLoader *provider = new KNS::ProviderLoader( this );
- QObject::connect( provider, SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, SLOT( slotProviders (Provider::List *) ) );
+ TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) );
provider->load( "kopete/chatstyle", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml" );
downloadDialog->exec();
}
@@ -696,7 +696,7 @@ void AppearanceConfig::slotGetChatStyles()
class FakeContact : public Kopete::Contact
{
public:
- FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {}
+ FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {}
virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; }
virtual void slotUserInfo() {};
};
@@ -705,29 +705,29 @@ public:
class FakeProtocol : public Kopete::Protocol
{
public:
-FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){}
-Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;}
-AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;}
-KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;}
+FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){}
+Kopete::Account* createNewAccount( const TQString &/*accountId*/ ){return 0L;}
+AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/){return 0L;}
+KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */){return 0L;}
};
// This is for style preview.
class FakeAccount : public Kopete::Account
{
public:
-FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name){}
+FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name){}
~FakeAccount()
{}
-bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;}
+bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;}
void connect( const Kopete::OnlineStatus& /*initialStatus*/){}
void disconnect(){}
-void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/){}
+void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/){}
};
void AppearanceConfig::createPreviewChatSession()
{
- d->previewProtocol = new FakeProtocol( new KInstance(QCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle");
- d->previewAccount = new FakeAccount(d->previewProtocol, QString("previewaccount"), 0);
+ d->previewProtocol = new FakeProtocol( new KInstance(TQCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle");
+ d->previewAccount = new FakeAccount(d->previewProtocol, TQString("previewaccount"), 0);
// Create fake meta/contacts
d->myselfMetaContact = new Kopete::MetaContact();
@@ -757,11 +757,11 @@ void AppearanceConfig::createPreviewMessages()
Kopete::Message msgOut2( d->myself, d->jack, i18n( "Ok, a outgoing consecutive message." ), Kopete::Message::Outbound );
Kopete::Message msgCol( d->jack, d->myself, i18n( "Here is an incoming colored message" ), Kopete::Message::Inbound );
- msgCol.setFg( QColor( "DodgerBlue" ) );
- msgCol.setBg( QColor( "LightSteelBlue" ) );
+ msgCol.setFg( TQColor( "DodgerBlue" ) );
+ msgCol.setBg( TQColor( "LightSteelBlue" ) );
Kopete::Message msgInt( d->jack, d->myself, i18n( "This is an internal message" ), Kopete::Message::Internal );
Kopete::Message msgAct( d->jack, d->myself, i18n( "performed an action" ), Kopete::Message::Inbound,
- Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction );
+ Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction );
Kopete::Message msgHigh( d->jack, d->myself, i18n( "This is a highlighted message" ), Kopete::Message::Inbound );
msgHigh.setImportance( Kopete::Message::Highlight );
// This is a UTF-8 string btw.
@@ -801,7 +801,7 @@ void AppearanceConfig::emitChanged()
void AppearanceConfig::installEmoticonTheme()
{
- KURL themeURL = KURLRequesterDlg::getURL(QString::null, this,
+ KURL themeURL = KURLRequesterDlg::getURL(TQString::null, this,
i18n("Drag or Type Emoticon Theme URL"));
if ( themeURL.isEmpty() )
return;
@@ -820,13 +820,13 @@ void AppearanceConfig::installEmoticonTheme()
void AppearanceConfig::removeSelectedEmoticonTheme()
{
- QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem();
+ TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem();
if(selected==0)
return;
- QString themeName = selected->text();
+ TQString themeName = selected->text();
- QString question=i18n("<qt>Are you sure you want to remove the "
+ TQString question=i18n("<qt>Are you sure you want to remove the "
"<strong>%1</strong> emoticon theme?<br>"
"<br>"
"This will delete the files installed by this theme.</qt>").
@@ -864,18 +864,18 @@ void AppearanceConfig::slotGetEmoticonThemes()
void AppearanceConfig::slotEditTooltips()
{
TooltipEditDialog *dlg = new TooltipEditDialog(this);
- connect(dlg, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ connect(dlg, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
dlg->exec();
delete dlg;
}
void AppearanceConfig::editSelectedEmoticonTheme()
{
- QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem();
+ TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem();
if(selected==0)
return;
- QString themeName = selected->text();
+ TQString themeName = selected->text();
EmoticonsEditDialog *dlg = new EmoticonsEditDialog(this, themeName);
dlg->exec();
diff --git a/kopete/kopete/config/appearance/appearanceconfig.h b/kopete/kopete/config/appearance/appearanceconfig.h
index 747117c6..e380542d 100644
--- a/kopete/kopete/config/appearance/appearanceconfig.h
+++ b/kopete/kopete/config/appearance/appearanceconfig.h
@@ -20,8 +20,8 @@
#define __APPEARANCE_H
#include "kcmodule.h"
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
/**
* @author Duncan Mac-Vicar P. <duncan@kde.org>
@@ -34,7 +34,7 @@ class AppearanceConfig : public KCModule
friend class KopeteStyleNewStuff;
public:
- AppearanceConfig( QWidget *parent, const char *name, const QStringList &args );
+ AppearanceConfig( TQWidget *parent, const char *name, const TQStringList &args );
~AppearanceConfig();
virtual void save();
@@ -48,7 +48,7 @@ private slots:
void slotInstallChatStyle();
void slotDeleteChatStyle();
void slotChatStyleSelected();
- void slotChatStyleVariantSelected(const QString &variantName);
+ void slotChatStyleVariantSelected(const TQString &variantName);
void slotEditTooltips();
void emitChanged();
void installEmoticonTheme();
diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.cpp b/kopete/kopete/config/appearance/emoticonseditdialog.cpp
index 21e12231..af62e4ff 100644
--- a/kopete/kopete/config/appearance/emoticonseditdialog.cpp
+++ b/kopete/kopete/config/appearance/emoticonseditdialog.cpp
@@ -25,19 +25,19 @@
#include <kstandarddirs.h>
#include <kfiledialog.h>
#include <kio/job.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-EditDialog::EditDialog(QWidget *parent, const char* name)
+EditDialog::EditDialog(TQWidget *parent, const char* name)
: KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true)
{
setupDlg();
}
-EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file)
+EditDialog::EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file)
: KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true)
{
setupDlg();
@@ -48,19 +48,19 @@ EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString
void EditDialog::setupDlg()
{
- wdg = new QWidget(this);
- QVBoxLayout *vl = new QVBoxLayout(wdg, 11, 6);
- QHBoxLayout *hb = new QHBoxLayout(wdg, 0, 6);
+ wdg = new TQWidget(this);
+ TQVBoxLayout *vl = new TQVBoxLayout(wdg, 11, 6);
+ TQHBoxLayout *hb = new TQHBoxLayout(wdg, 0, 6);
leText = new KLineEdit(wdg);
btnIcon = new KPushButton(wdg);
- btnIcon->setFixedSize(QSize(64, 64));
+ btnIcon->setFixedSize(TQSize(64, 64));
- vl->addWidget(new QLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg));
+ vl->addWidget(new TQLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg));
hb->addWidget(btnIcon);
hb->addWidget(leText);
vl->addLayout(hb);
setMainWidget(wdg);
- connect(btnIcon, SIGNAL(clicked()), this, SLOT(btnIconClicked()));
+ connect(btnIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(btnIconClicked()));
}
void EditDialog::btnIconClicked()
@@ -75,17 +75,17 @@ void EditDialog::btnIconClicked()
if(emoticon.isEmpty())
return;
- btnIcon->setPixmap(QPixmap(emoticon));
+ btnIcon->setPixmap(TQPixmap(emoticon));
}
-EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const char* name)
+EmoticonsEditDialog::EmoticonsEditDialog(TQWidget *parent, TQString theme, const char* name)
: KDialogBase(parent, name, true, i18n("Emoticons Editor"), Ok|Cancel, Ok, true)
{
themeName = theme;
mMainWidget = new EmoticonsEditWidget(this, "EmoticonsEditDialog::mMainWidget");
setMainWidget(mMainWidget);
- resize(QSize(450, 350));
+ resize(TQSize(450, 350));
mMainWidget->btnAdd->setGuiItem(KStdGuiItem::add());
mMainWidget->btnEdit->setText(i18n("Edit..."));
mMainWidget->btnRemove->setGuiItem(KStdGuiItem::remove());
@@ -96,22 +96,22 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c
mMainWidget->klvEmoticons->addColumn("File", 0);
mMainWidget->klvEmoticons->header()->hide();
Kopete::Emoticons emoticons( theme );
- QMap<QString, QStringList> smileys = emoticons.emoticonAndPicList();
+ TQMap<TQString, TQStringList> smileys = emoticons.emoticonAndPicList();
- for(QMap<QString, QStringList>::Iterator it = smileys.begin(); it != smileys.end(); ++it )
+ for(TQMap<TQString, TQStringList>::Iterator it = smileys.begin(); it != smileys.end(); ++it )
{
KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons);
- itm->setPixmap(0, QPixmap(it.key()));
- itm->setText(2, QFileInfo(it.key()).baseName());
- QString text = *it.data().at(0);
+ itm->setPixmap(0, TQPixmap(it.key()));
+ itm->setText(2, TQFileInfo(it.key()).baseName());
+ TQString text = *it.data().at(0);
for(uint i = 1; i < it.data().size(); i++) {
text += " " + *it.data().at(i);
}
itm->setText(1, text);
}
- QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
+ TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
if( !fp->exists() ) {
kdWarning() << "EmoticonsEditDialog::EmoticonsEditDialog() " << fp->name() << " doesn't exist!" << endl;
@@ -131,18 +131,18 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c
fp->close();
- mMainWidget->klvEmoticons->setColumnWidth(0, QListView::Maximum);
- mMainWidget->klvEmoticons->setColumnWidth(1, QListView::Maximum);
+ mMainWidget->klvEmoticons->setColumnWidth(0, TQListView::Maximum);
+ mMainWidget->klvEmoticons->setColumnWidth(1, TQListView::Maximum);
- connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked()));
- connect(mMainWidget->btnAdd, SIGNAL(clicked()), this, SLOT(slotAddClicked()));
- connect(mMainWidget->btnEdit, SIGNAL(clicked()), this, SLOT(slotEditClicked()));
- connect(mMainWidget->btnRemove, SIGNAL(clicked()), this, SLOT(slotRemoveClicked()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked()));
+ connect(mMainWidget->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddClicked()));
+ connect(mMainWidget->btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditClicked()));
+ connect(mMainWidget->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveClicked()));
}
void EmoticonsEditDialog::slotOkClicked()
{
- QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
+ TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
if( !fp->exists() ) {
kdWarning() << "EmoticonsEditDialog::slotOkClicked() " << fp->name() << " doesn't exist!" << endl;
@@ -154,7 +154,7 @@ void EmoticonsEditDialog::slotOkClicked()
return;
}
- QTextStream emoStream(fp);
+ TQTextStream emoStream(fp);
emoStream << themeXml.toString(4);
fp->close();
}
@@ -163,7 +163,7 @@ void EmoticonsEditDialog::slotAddClicked()
{
EditDialog *dlg = new EditDialog(this, "Add emoticon");
- if(dlg->exec() == QDialog::Rejected)
+ if(dlg->exec() == TQDialog::Rejected)
return;
if(dlg->getText().isEmpty() || !dlg->getEmoticon())
@@ -182,29 +182,29 @@ void EmoticonsEditDialog::slotEditClicked()
dlg = new EditDialog(this, "Edit emoticon", *mMainWidget->klvEmoticons->selectedItem()->pixmap(0), mMainWidget->klvEmoticons->selectedItem()->text(1), mMainWidget->klvEmoticons->selectedItem()->text(2));
- if(dlg->exec() == QDialog::Rejected)
+ if(dlg->exec() == TQDialog::Rejected)
return;
if(dlg->getText().isEmpty() || !dlg->getEmoticon())
return;
bool copy;
- QString emo = dlg->getEmoticon();
+ TQString emo = dlg->getEmoticon();
if(mMainWidget->klvEmoticons->selectedItem()->text(2) != dlg->getEmoticon()) {
copy = true;
} else {
copy = false;
- QString f = mMainWidget->klvEmoticons->selectedItem()->text(2);
+ TQString f = mMainWidget->klvEmoticons->selectedItem()->text(2);
KStandardDirs *dir = KGlobal::dirs();
- emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f );
+ emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f );
if( emo.isNull() )
- emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".mng" ) );
+ emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".mng" ) );
if ( emo.isNull() )
- emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".png" ) );
+ emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".png" ) );
if ( emo.isNull() )
- emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".gif" ) );
+ emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".gif" ) );
if ( emo.isNull() )
return;
}
@@ -223,44 +223,44 @@ void EmoticonsEditDialog::slotRemoveClicked()
removeEmoticon(mMainWidget->klvEmoticons->selectedItem()->text(2));
}
-void EmoticonsEditDialog::addEmoticon(QString emo, QString text, bool copy)
+void EmoticonsEditDialog::addEmoticon(TQString emo, TQString text, bool copy)
{
if(copy)
KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false ));
KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons);
- itm->setPixmap(0, QPixmap(emo));
+ itm->setPixmap(0, TQPixmap(emo));
itm->setText(1, text);
- itm->setText(2, QFileInfo(emo).baseName());
+ itm->setText(2, TQFileInfo(emo).baseName());
- QDomNode lc = themeXml.lastChild();
+ TQDomNode lc = themeXml.lastChild();
if(lc.isNull())
return;
- QDomElement emoticon = themeXml.createElement("emoticon");
- emoticon.setAttribute("file", QFileInfo(emo).baseName());
+ TQDomElement emoticon = themeXml.createElement("emoticon");
+ emoticon.setAttribute("file", TQFileInfo(emo).baseName());
lc.appendChild(emoticon);
- QStringList splitted = QStringList::split(" ", text);
- QStringList::const_iterator constIterator;
+ TQStringList splitted = TQStringList::split(" ", text);
+ TQStringList::const_iterator constIterator;
for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++)
{
- QDomElement emotext = themeXml.createElement("string");
- QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace());
+ TQDomElement emotext = themeXml.createElement("string");
+ TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace());
emotext.appendChild(txt);
emoticon.appendChild(emotext);
}
}
-void EmoticonsEditDialog::removeEmoticon(QString emo)
+void EmoticonsEditDialog::removeEmoticon(TQString emo)
{
- QDomNode lc = themeXml.lastChild();
+ TQDomNode lc = themeXml.lastChild();
if(lc.isNull())
return;
- QDomNodeList nl = lc.childNodes();
+ TQDomNodeList nl = lc.childNodes();
for(uint i = 0; i < nl.length(); i++) {
- QDomElement de = nl.item(i).toElement();
+ TQDomElement de = nl.item(i).toElement();
if(!de.isNull() && de.tagName() == "emoticon" && de.attribute("file") == emo) {
lc.removeChild(de);
delete mMainWidget->klvEmoticons->selectedItem();
diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.h b/kopete/kopete/config/appearance/emoticonseditdialog.h
index 4bbaccda..fe5b8426 100644
--- a/kopete/kopete/config/appearance/emoticonseditdialog.h
+++ b/kopete/kopete/config/appearance/emoticonseditdialog.h
@@ -17,12 +17,12 @@
#define EMOTICONSEDITDIALOG_H
#include <kdebug.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kdialogbase.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qfile.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqdom.h>
class EmoticonsEditWidget;
@@ -31,18 +31,18 @@ class EditDialog : public KDialogBase
Q_OBJECT
public:
- EditDialog(QWidget *parent, const char* name);
- EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file);
- const QString getText() { return leText->text(); };
- const QString getEmoticon() { return emoticon; };
+ EditDialog(TQWidget *parent, const char* name);
+ EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file);
+ const TQString getText() { return leText->text(); };
+ const TQString getEmoticon() { return emoticon; };
private slots:
void btnIconClicked();
private:
void setupDlg();
- QWidget *wdg;
+ TQWidget *wdg;
KLineEdit *leText;
KPushButton *btnIcon;
- QString emoticon;
+ TQString emoticon;
};
class EmoticonsEditDialog : public KDialogBase
@@ -50,8 +50,8 @@ class EmoticonsEditDialog : public KDialogBase
Q_OBJECT
public:
- EmoticonsEditDialog(QWidget *parent=0, QString theme = QString::null, const char* name="EmoticonsEditDialog");
- void addEmoticon(QString emo, QString text, bool copy);
+ EmoticonsEditDialog(TQWidget *parent=0, TQString theme = TQString::null, const char* name="EmoticonsEditDialog");
+ void addEmoticon(TQString emo, TQString text, bool copy);
private slots:
void slotOkClicked();
@@ -60,11 +60,11 @@ class EmoticonsEditDialog : public KDialogBase
void slotRemoveClicked();
private:
- void removeEmoticon(QString emo);
+ void removeEmoticon(TQString emo);
EmoticonsEditWidget *mMainWidget;
- QString themeName;
+ TQString themeName;
EditDialog *dlg;
- QDomDocument themeXml;
+ TQDomDocument themeXml;
};
#endif
diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.cpp b/kopete/kopete/config/appearance/tooltipeditdialog.cpp
index c8ed8a5d..eef1ccb0 100644
--- a/kopete/kopete/config/appearance/tooltipeditdialog.cpp
+++ b/kopete/kopete/config/appearance/tooltipeditdialog.cpp
@@ -21,10 +21,10 @@
#include "kopeteglobal.h"
#include "kopeteprefs.h"
-#include <qapplication.h>
-#include <qtoolbutton.h>
-#include <qheader.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqtoolbutton.h>
+#include <tqheader.h>
+#include <tqstringlist.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -33,26 +33,26 @@
class TooltipItem : public KListViewItem
{
public:
- TooltipItem(KListView *parent, const QString& label, const QString& propertyName)
+ TooltipItem(KListView *parent, const TQString& label, const TQString& propertyName)
: KListViewItem(parent, label),
mPropName(propertyName)
{
}
- TooltipItem(KListView *parent, QListViewItem *item, const QString& label, const QString& propertyName)
+ TooltipItem(KListView *parent, TQListViewItem *item, const TQString& label, const TQString& propertyName)
: KListViewItem(parent, item, label),
mPropName(propertyName)
{
}
- QString propertyName() const { return mPropName; }
+ TQString propertyName() const { return mPropName; }
private:
- QString mPropName;
+ TQString mPropName;
};
-TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name)
+TooltipEditDialog::TooltipEditDialog(TQWidget *parent, const char* name)
: KDialogBase(parent, name, true, i18n("Tooltip Editor"), Ok|Cancel, Ok, true)
{
mMainWidget = new TooltipEditWidget(this, "TooltipEditDialog::mMainWidget");
@@ -64,13 +64,13 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name)
const Kopete::ContactPropertyTmpl::Map propmap(
Kopete::Global::Properties::self()->templateMap());
- QStringList usedKeys = KopetePrefs::prefs()->toolTipContents();
+ TQStringList usedKeys = KopetePrefs::prefs()->toolTipContents();
- connect(mMainWidget->lstUnusedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotAddButton()));
- connect(mMainWidget->lstUsedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotRemoveButton()));
+ connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotAddButton()));
+ connect(mMainWidget->lstUsedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotRemoveButton()));
// first fill the "used" list
- QStringList::Iterator usedIt=usedKeys.end();
+ TQStringList::Iterator usedIt=usedKeys.end();
do
{
usedIt--;
@@ -91,45 +91,45 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name)
new TooltipItem(mMainWidget->lstUnusedItems, it.data().label(), it.key());
}
- connect(mMainWidget->lstUnusedItems, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotUnusedSelected(QListViewItem *)));
- connect(mMainWidget->lstUsedItems, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotUsedSelected(QListViewItem *)));
+ connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotUnusedSelected(TQListViewItem *)));
+ connect(mMainWidget->lstUsedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotUsedSelected(TQListViewItem *)));
- QIconSet iconSet;
+ TQIconSet iconSet;
iconSet = SmallIconSet("up");
mMainWidget->tbUp->setIconSet(iconSet);
mMainWidget->tbUp->setEnabled(false);
mMainWidget->tbUp->setAutoRepeat(true);
- connect(mMainWidget->tbUp, SIGNAL(clicked()), SLOT(slotUpButton()));
+ connect(mMainWidget->tbUp, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton()));
iconSet = SmallIconSet("down");
mMainWidget->tbDown->setIconSet(iconSet);
mMainWidget->tbDown->setEnabled(false);
mMainWidget->tbDown->setAutoRepeat(true);
- connect(mMainWidget->tbDown, SIGNAL(clicked()), SLOT(slotDownButton()));
+ connect(mMainWidget->tbDown, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton()));
- iconSet = QApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward");
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward");
mMainWidget->tbAdd->setIconSet(iconSet);
mMainWidget->tbAdd->setEnabled(false);
- connect(mMainWidget->tbAdd, SIGNAL(clicked()), SLOT(slotAddButton()));
+ connect(mMainWidget->tbAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddButton()));
- iconSet = QApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back");
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back");
mMainWidget->tbRemove->setIconSet(iconSet);
mMainWidget->tbRemove->setEnabled(false);
- connect(mMainWidget->tbRemove, SIGNAL(clicked()), SLOT(slotRemoveButton()));
+ connect(mMainWidget->tbRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton()));
- connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked()));
- resize(QSize(450, 450));
+ resize(TQSize(450, 450));
}
void TooltipEditDialog::slotOkClicked()
{
- QStringList oldList = KopetePrefs::prefs()->toolTipContents();
- QStringList newList;
- QListViewItemIterator it(mMainWidget->lstUsedItems);
- QString keyname;
+ TQStringList oldList = KopetePrefs::prefs()->toolTipContents();
+ TQStringList newList;
+ TQListViewItemIterator it(mMainWidget->lstUsedItems);
+ TQString keyname;
while(it.current())
{
@@ -149,13 +149,13 @@ void TooltipEditDialog::slotOkClicked()
}
-void TooltipEditDialog::slotUnusedSelected(QListViewItem *item)
+void TooltipEditDialog::slotUnusedSelected(TQListViewItem *item)
{
//mMainWidget->tbRemove->setEnabled(false);
mMainWidget->tbAdd->setEnabled(item!=0);
}
-void TooltipEditDialog::slotUsedSelected(QListViewItem *item)
+void TooltipEditDialog::slotUsedSelected(TQListViewItem *item)
{
mMainWidget->tbRemove->setEnabled(item!=0);
//mMainWidget->tbAdd->setEnabled(false);
@@ -173,8 +173,8 @@ void TooltipEditDialog::slotUsedSelected(QListViewItem *item)
void TooltipEditDialog::slotUpButton()
{
- QListViewItem *item = mMainWidget->lstUsedItems->currentItem();
- QListViewItem *prev = item->itemAbove();
+ TQListViewItem *item = mMainWidget->lstUsedItems->currentItem();
+ TQListViewItem *prev = item->itemAbove();
if(prev == 0) // we are first item already
return;
@@ -184,8 +184,8 @@ void TooltipEditDialog::slotUpButton()
void TooltipEditDialog::slotDownButton()
{
- QListViewItem *item = mMainWidget->lstUsedItems->currentItem();
- QListViewItem *next = item->itemBelow();
+ TQListViewItem *item = mMainWidget->lstUsedItems->currentItem();
+ TQListViewItem *next = item->itemBelow();
if(next == 0) // we are last item already
return;
diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.h b/kopete/kopete/config/appearance/tooltipeditdialog.h
index 92d75aa9..54807df4 100644
--- a/kopete/kopete/config/appearance/tooltipeditdialog.h
+++ b/kopete/kopete/config/appearance/tooltipeditdialog.h
@@ -18,7 +18,7 @@
#define TOOLTIPEDITDIALOG_H
#include <kdebug.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kdialogbase.h>
class TooltipEditWidget;
@@ -27,11 +27,11 @@ class TooltipEditDialog : public KDialogBase
Q_OBJECT
public:
- TooltipEditDialog(QWidget *parent=0, const char* name="ToolTipEditDialog");
+ TooltipEditDialog(TQWidget *parent=0, const char* name="ToolTipEditDialog");
private slots:
- void slotUnusedSelected(QListViewItem *);
- void slotUsedSelected(QListViewItem *);
+ void slotUnusedSelected(TQListViewItem *);
+ void slotUsedSelected(TQListViewItem *);
void slotUpButton();
void slotDownButton();
void slotAddButton();
diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.cpp b/kopete/kopete/config/avdevice/avdeviceconfig.cpp
index a2c474e0..dec03277 100644
--- a/kopete/kopete/config/avdevice/avdeviceconfig.cpp
+++ b/kopete/kopete/config/avdevice/avdeviceconfig.cpp
@@ -19,13 +19,13 @@
#include "avdeviceconfig_videoconfig.h"
#include "videodevice.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qslider.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
#include <kplugininfo.h>
#include <klocale.h>
@@ -34,35 +34,35 @@
#include <ktrader.h>
#include <kconfig.h>
#include <kcombobox.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
//#include "videodevice.h"
-typedef KGenericFactory<AVDeviceConfig, QWidget> KopeteAVDeviceConfigFactory;
+typedef KGenericFactory<AVDeviceConfig, TQWidget> KopeteAVDeviceConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_avdeviceconfig, KopeteAVDeviceConfigFactory( "kcm_kopete_avdeviceconfig" ) )
-AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args)
+AVDeviceConfig::AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args)
: KCModule( KopeteAVDeviceConfigFactory::instance(), parent, args )
{
kdDebug() << "kopete:config (avdevice): KopeteAVDeviceConfigFactory::instance() called. " << endl;
- (new QVBoxLayout(this))->setAutoAdd(true);
- mAVDeviceTabCtl = new QTabWidget(this, "mAVDeviceTabCtl");
+ (new TQVBoxLayout(this))->setAutoAdd(true);
+ mAVDeviceTabCtl = new TQTabWidget(this, "mAVDeviceTabCtl");
// "Video" TAB ============================================================
mPrfsVideoDevice = new AVDeviceConfig_VideoDevice(mAVDeviceTabCtl);
- connect(mPrfsVideoDevice->mDeviceKComboBox, SIGNAL(activated(int)), this, SLOT(slotDeviceKComboBoxChanged(int)));
- connect(mPrfsVideoDevice->mInputKComboBox, SIGNAL(activated(int)), this, SLOT(slotInputKComboBoxChanged(int)));
- connect(mPrfsVideoDevice->mStandardKComboBox, SIGNAL(activated(int)), this, SLOT(slotStandardKComboBoxChanged(int)));
- connect(mPrfsVideoDevice->mBrightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBrightnessSliderChanged(int)));
- connect(mPrfsVideoDevice->mContrastSlider, SIGNAL(valueChanged(int)), this, SLOT(slotContrastSliderChanged(int)));
- connect(mPrfsVideoDevice->mSaturationSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSaturationSliderChanged(int)));
- connect(mPrfsVideoDevice->mWhitenessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotWhitenessSliderChanged(int)));
- connect(mPrfsVideoDevice->mHueSlider, SIGNAL(valueChanged(int)), this, SLOT(slotHueSliderChanged(int)));
- connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoBrightnessContrastChanged(bool)));
- connect(mPrfsVideoDevice->mImageAutoColorCorrection, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoColorCorrectionChanged(bool)));
- connect(mPrfsVideoDevice->mImageAsMirror, SIGNAL(toggled(bool)), this, SLOT(slotImageAsMirrorChanged(bool)));
+ connect(mPrfsVideoDevice->mDeviceKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDeviceKComboBoxChanged(int)));
+ connect(mPrfsVideoDevice->mInputKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInputKComboBoxChanged(int)));
+ connect(mPrfsVideoDevice->mStandardKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStandardKComboBoxChanged(int)));
+ connect(mPrfsVideoDevice->mBrightnessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBrightnessSliderChanged(int)));
+ connect(mPrfsVideoDevice->mContrastSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotContrastSliderChanged(int)));
+ connect(mPrfsVideoDevice->mSaturationSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSaturationSliderChanged(int)));
+ connect(mPrfsVideoDevice->mWhitenessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWhitenessSliderChanged(int)));
+ connect(mPrfsVideoDevice->mHueSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHueSliderChanged(int)));
+ connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoBrightnessContrastChanged(bool)));
+ connect(mPrfsVideoDevice->mImageAutoColorCorrection, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoColorCorrectionChanged(bool)));
+ connect(mPrfsVideoDevice->mImageAsMirror, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAsMirrorChanged(bool)));
// why is this here?
// mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap);
@@ -81,7 +81,7 @@ AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStri
mVideoDevicePool->getImage(&qimage);
if (qpixmap.convertFromImage(qimage,0) == true)
mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap);
- connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) );
+ connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) );
qtimer.start(0,FALSE);
}
diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.h b/kopete/kopete/config/avdevice/avdeviceconfig.h
index d732b1a7..3648a913 100644
--- a/kopete/kopete/config/avdevice/avdeviceconfig.h
+++ b/kopete/kopete/config/avdevice/avdeviceconfig.h
@@ -20,12 +20,12 @@
#include "kcmodule.h"
#include "videodevicepool.h"
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#ifdef HAVE_GL
-# include <qgl.h>
+# include <tqgl.h>
#endif
class QFrame;
@@ -41,7 +41,7 @@ class AVDeviceConfig : public KCModule
{
Q_OBJECT
public:
- AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args);
+ AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args);
~AVDeviceConfig();
virtual void save();
@@ -63,16 +63,16 @@ private slots:
void slotImageAsMirrorChanged(bool);
void slotUpdateImage();
private:
- QTabWidget* mAVDeviceTabCtl;
+ TQTabWidget* mAVDeviceTabCtl;
AVDeviceConfig_VideoDevice *mPrfsVideoDevice;
AVDeviceConfig_AudioDevice *mPrfsAudioDevice;
Kopete::AV::VideoDevicePool *mVideoDevicePool ;
- QImage qimage;
- QPixmap qpixmap;
- QTimer qtimer;
+ TQImage qimage;
+ TQPixmap qpixmap;
+ TQTimer qtimer;
void setVideoInputParameters();
#ifdef HAVE_GL
- QGLWidget m_video_gl;
+ TQGLWidget m_video_gl;
#endif
};
diff --git a/kopete/kopete/config/behavior/behaviorconfig.cpp b/kopete/kopete/config/behavior/behaviorconfig.cpp
index 379e762a..b133a64b 100644
--- a/kopete/kopete/config/behavior/behaviorconfig.cpp
+++ b/kopete/kopete/config/behavior/behaviorconfig.cpp
@@ -18,14 +18,14 @@
#include "behaviorconfig_events.h"
#include "behaviorconfig_chat.h"
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbuttongroup.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
#include <kplugininfo.h>
@@ -42,17 +42,17 @@
#include "kopetepluginmanager.h"
#include "kopeteaway.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-typedef KGenericFactory<BehaviorConfig, QWidget> KopeteBehaviorConfigFactory;
+typedef KGenericFactory<BehaviorConfig, TQWidget> KopeteBehaviorConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_behaviorconfig, KopeteBehaviorConfigFactory( "kcm_kopete_behaviorconfig" ) )
-BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const QStringList &args) :
+BehaviorConfig::BehaviorConfig(TQWidget *parent, const char * /* name */, const TQStringList &args) :
KCModule( KopeteBehaviorConfigFactory::instance(), parent, args )
{
- (new QVBoxLayout(this))->setAutoAdd(true);
- mBehaviorTabCtl = new QTabWidget(this, "mBehaviorTabCtl");
+ (new TQVBoxLayout(this))->setAutoAdd(true);
+ mBehaviorTabCtl = new TQTabWidget(this, "mBehaviorTabCtl");
// "General" TAB ============================================================
mPrfsGeneral = new BehaviorConfig_General(mBehaviorTabCtl);
@@ -77,81 +77,81 @@ BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const Q
// "General" TAB ============================================================
- connect(mPrfsGeneral->mShowTrayChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsGeneral->mStartDockedChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsGeneral->mUseQueueChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsGeneral->mUseStackChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsGeneral->mQueueUnreadMessagesChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsGeneral->mAutoConnect, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mShowTrayChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mStartDockedChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mUseQueueChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mUseStackChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mQueueUnreadMessagesChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsGeneral->mAutoConnect, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
// "Events" TAB ============================================================
- connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mBalloonNotifyChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mCloseBalloonChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mBalloonCloseDelay, SIGNAL(valueChanged(int)),
- this, SLOT(slotValueChanged(int)));
- connect(mPrfsEvents->mTrayflashNotifyChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mSoundIfAwayChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mEventIfActive, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect(mPrfsEvents->mRaiseMsgWindowChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mBalloonNotifyChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mCloseBalloonChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mBalloonCloseDelay, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect(mPrfsEvents->mTrayflashNotifyChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mSoundIfAwayChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mEventIfActive, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect(mPrfsEvents->mRaiseMsgWindowChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
// "Chat" TAB ===============================================================
- connect( mPrfsChat->cb_ShowEventsChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mPrfsChat->highlightEnabled, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mPrfsChat->cb_SpellCheckChk, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mPrfsChat->cmbChatGroupingPolicy, SIGNAL(activated(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mPrfsChat->mChatViewBufferSize, SIGNAL(valueChanged(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mPrfsChat->truncateContactNameEnabled, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mPrfsChat->mMaxContactNameLength, SIGNAL(valueChanged(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)),
- this, SLOT(slotUpdatePluginLabel(int)));
+ connect( mPrfsChat->cb_ShowEventsChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mPrfsChat->highlightEnabled, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mPrfsChat->cb_SpellCheckChk, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mPrfsChat->cmbChatGroupingPolicy, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mPrfsChat->mChatViewBufferSize, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mPrfsChat->truncateContactNameEnabled, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mPrfsChat->mMaxContactNameLength, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotUpdatePluginLabel(int)));
// "Away" TAB ===============================================================
- connect( mAwayConfigUI->rememberedMessages, SIGNAL(valueChanged(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mAwayConfigUI->mAutoAwayTimeout, SIGNAL(valueChanged(int)),
- this, SLOT(slotValueChanged(int)));
- connect( mAwayConfigUI->mGoAvailable, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mAwayConfigUI->mUseAutoAway, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mAwayConfigUI->mDisplayLastAwayMessage, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mAwayConfigUI->mDisplayCustomAwayMessage, SIGNAL(toggled(bool)),
- this, SLOT(slotSettingsChanged(bool)));
- connect( mAwayConfigUI->mAutoAwayMessageEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotTextChanged(const QString&)));
+ connect( mAwayConfigUI->rememberedMessages, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mAwayConfigUI->mAutoAwayTimeout, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotValueChanged(int)));
+ connect( mAwayConfigUI->mGoAvailable, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mAwayConfigUI->mUseAutoAway, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mAwayConfigUI->mDisplayLastAwayMessage, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mAwayConfigUI->mDisplayCustomAwayMessage, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSettingsChanged(bool)));
+ connect( mAwayConfigUI->mAutoAwayMessageEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotTextChanged(const TQString&)));
}
void BehaviorConfig::save()
@@ -270,7 +270,7 @@ void BehaviorConfig::load()
mPrfsChat->viewPlugin->clear();
int selectedIdx = 0, i = 0;
- for( QValueList<KPluginInfo*>::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it )
+ for( TQValueList<KPluginInfo*>::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it )
{
if( (*it)->pluginName() == p->interfacePreference() )
selectedIdx = i;
@@ -296,7 +296,7 @@ void BehaviorConfig::slotValueChanged(int)
emit changed( true );
}
-void BehaviorConfig::slotTextChanged(const QString&)
+void BehaviorConfig::slotTextChanged(const TQString&)
{
emit changed( true );
}
diff --git a/kopete/kopete/config/behavior/behaviorconfig.h b/kopete/kopete/config/behavior/behaviorconfig.h
index 5a981784..8fead0ed 100644
--- a/kopete/kopete/config/behavior/behaviorconfig.h
+++ b/kopete/kopete/config/behavior/behaviorconfig.h
@@ -37,7 +37,7 @@ class BehaviorConfig : public KCModule
Q_OBJECT
public:
- BehaviorConfig(QWidget *parent, const char * name , const QStringList &args) ;
+ BehaviorConfig(TQWidget *parent, const char * name , const TQStringList &args) ;
virtual void save();
virtual void load();
@@ -46,15 +46,15 @@ class BehaviorConfig : public KCModule
void slotSettingsChanged(bool);
void slotValueChanged(int);
void slotUpdatePluginLabel(int);
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
private:
- QTabWidget* mBehaviorTabCtl;
+ TQTabWidget* mBehaviorTabCtl;
BehaviorConfig_General *mPrfsGeneral;
BehaviorConfig_Events *mPrfsEvents;
BehaviorConfig_Chat *mPrfsChat;
KopeteAwayConfigBaseUI *mAwayConfigUI;
- QValueList<KPluginInfo*> viewPlugins;
+ TQValueList<KPluginInfo*> viewPlugins;
Kopete::Away* awayInstance;
};
#endif
diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.cpp b/kopete/kopete/config/identity/globalidentitiesmanager.cpp
index 192849e4..52da32a7 100644
--- a/kopete/kopete/config/identity/globalidentitiesmanager.cpp
+++ b/kopete/kopete/config/identity/globalidentitiesmanager.cpp
@@ -17,9 +17,9 @@
#include "globalidentitiesmanager.h"
// Qt includes
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE includes
#include <kdebug.h>
@@ -37,7 +37,7 @@
class GlobalIdentitiesManager::Private
{
public:
- QMap<QString, Kopete::MetaContact*> identitiesList;
+ TQMap<TQString, Kopete::MetaContact*> identitiesList;
};
GlobalIdentitiesManager *GlobalIdentitiesManager::s_self = 0L;
@@ -49,8 +49,8 @@ GlobalIdentitiesManager *GlobalIdentitiesManager::self()
return s_self;
}
-GlobalIdentitiesManager::GlobalIdentitiesManager(QObject *parent, const char *name)
- : QObject(parent, name)
+GlobalIdentitiesManager::GlobalIdentitiesManager(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
d = new Private;
}
@@ -62,7 +62,7 @@ GlobalIdentitiesManager::~GlobalIdentitiesManager()
delete d;
}
-void GlobalIdentitiesManager::createNewIdentity(const QString &identityName)
+void GlobalIdentitiesManager::createNewIdentity(const TQString &identityName)
{
// Create new identity metacontact based on myself to get the sub-contacts.
Kopete::MetaContact *newIdentity = createNewMetaContact();
@@ -71,21 +71,21 @@ void GlobalIdentitiesManager::createNewIdentity(const QString &identityName)
d->identitiesList.insert(identityName, newIdentity);
}
-void GlobalIdentitiesManager::copyIdentity(const QString &copyIdentityName, const QString &sourceIdentity)
+void GlobalIdentitiesManager::copyIdentity(const TQString &copyIdentityName, const TQString &sourceIdentity)
{
Kopete::MetaContact *copyIdentity = createCopyMetaContact(d->identitiesList[sourceIdentity]);
d->identitiesList.insert(copyIdentityName, copyIdentity);
}
-void GlobalIdentitiesManager::renameIdentity(const QString &oldName, const QString &newName)
+void GlobalIdentitiesManager::renameIdentity(const TQString &oldName, const TQString &newName)
{
Kopete::MetaContact *renamedIdentity = d->identitiesList[oldName];
d->identitiesList.remove(oldName);
d->identitiesList.insert(newName, renamedIdentity);
}
-void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity)
+void GlobalIdentitiesManager::removeIdentity(const TQString &removedIdentity)
{
// Clear from memory the identity metacontact.
delete d->identitiesList[removedIdentity];
@@ -93,15 +93,15 @@ void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity)
d->identitiesList.remove(removedIdentity);
}
-void GlobalIdentitiesManager::updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact)
+void GlobalIdentitiesManager::updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact)
{
copyMetaContact(d->identitiesList[updatedIdentity], sourceMetaContact);
}
-bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName)
+bool GlobalIdentitiesManager::isIdentityPresent(const TQString &identityName)
{
- QMapIterator<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = d->identitiesList.end();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> end = d->identitiesList.end();
for(it = d->identitiesList.begin(); it != end; ++it)
{
@@ -114,7 +114,7 @@ bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName)
return false;
}
-Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const QString &identityName)
+Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const TQString &identityName)
{
// Check if the identity is present.
return isIdentityPresent(identityName) ? d->identitiesList[identityName] : 0;
@@ -124,26 +124,26 @@ void GlobalIdentitiesManager::loadXML()
{
kdDebug() << k_funcinfo << "Loading global identities list from XML." << endl;
- QString filename = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") );
+ TQString filename = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") );
if( filename.isEmpty() )
{
return;
}
- QDomDocument globalIdentitiesList( QString::fromUtf8( "kopete-global-identities-list" ) );
+ TQDomDocument globalIdentitiesList( TQString::fromUtf8( "kopete-global-identities-list" ) );
- QFile globalIdentitiesListFile( filename );
+ TQFile globalIdentitiesListFile( filename );
globalIdentitiesListFile.open( IO_ReadOnly );
globalIdentitiesList.setContent( &globalIdentitiesListFile );
- QDomElement list = globalIdentitiesList.documentElement();
- QDomElement element = list.firstChild().toElement();
+ TQDomElement list = globalIdentitiesList.documentElement();
+ TQDomElement element = list.firstChild().toElement();
while( !element.isNull() )
{
- if( element.tagName() == QString::fromUtf8("identity") )
+ if( element.tagName() == TQString::fromUtf8("identity") )
{
Kopete::MetaContact *metaContact = createNewMetaContact();
- QString identityName = element.attribute(QString::fromUtf8("name"));
+ TQString identityName = element.attribute(TQString::fromUtf8("name"));
if(!metaContact->fromXML(element))
{
@@ -169,12 +169,12 @@ void GlobalIdentitiesManager::saveXML()
{
kdDebug() << k_funcinfo << "Saving global identities list to XML." << endl;
- QString globalIdentitiesListFileName = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") );
+ TQString globalIdentitiesListFileName = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") );
KSaveFile globalIdentitiesListFile(globalIdentitiesListFileName);
if( globalIdentitiesListFile.status() == 0 )
{
- QTextStream *stream = globalIdentitiesListFile.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = globalIdentitiesListFile.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
toXML().save( *stream, 4 );
if ( globalIdentitiesListFile.close() )
@@ -193,20 +193,20 @@ void GlobalIdentitiesManager::saveXML()
}
}
-const QDomDocument GlobalIdentitiesManager::toXML()
+const TQDomDocument GlobalIdentitiesManager::toXML()
{
- QDomDocument doc;
+ TQDomDocument doc;
- doc.appendChild(doc.createElement(QString::fromUtf8("kopete-global-identities-list")));
+ doc.appendChild(doc.createElement(TQString::fromUtf8("kopete-global-identities-list")));
- QMapIterator<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = d->identitiesList.end();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> end = d->identitiesList.end();
for(it = d->identitiesList.begin(); it != end; ++it)
{
kdDebug(14000) << k_funcinfo << "Saving " << it.key() << endl;
- QDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information.
- identityMetaContactElement.setTagName(QString::fromUtf8("identity"));
- identityMetaContactElement.setAttribute(QString::fromUtf8("name"), it.key());
+ TQDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information.
+ identityMetaContactElement.setTagName(TQString::fromUtf8("identity"));
+ identityMetaContactElement.setAttribute(TQString::fromUtf8("name"), it.key());
doc.documentElement().appendChild(doc.importNode(identityMetaContactElement, true));
}
@@ -216,11 +216,11 @@ const QDomDocument GlobalIdentitiesManager::toXML()
Kopete::MetaContact *GlobalIdentitiesManager::createNewMetaContact()
{
Kopete::MetaContact *newMetaContact = new Kopete::MetaContact();
- QPtrList<Kopete::Contact> contactList = Kopete::ContactList::self()->myself()->contacts();
+ TQPtrList<Kopete::Contact> contactList = Kopete::ContactList::self()->myself()->contacts();
// Copy the contacts list to the new metacontact, so Kopete::Contact for SourceContact
// will not be null.
- QPtrListIterator<Kopete::Contact> it( contactList);
+ TQPtrListIterator<Kopete::Contact> it( contactList);
for ( ; it.current(); ++it )
{
newMetaContact->addContact(it.current());
@@ -252,7 +252,7 @@ void GlobalIdentitiesManager::copyMetaContact(Kopete::MetaContact *destination,
destination->setPhotoSourceContact(source->photoSourceContact());
}
-QMap<QString, Kopete::MetaContact*> GlobalIdentitiesManager::getGlobalIdentitiesList()
+TQMap<TQString, Kopete::MetaContact*> GlobalIdentitiesManager::getGlobalIdentitiesList()
{
return d->identitiesList;
}
diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.h b/kopete/kopete/config/identity/globalidentitiesmanager.h
index c188d497..71e890b0 100644
--- a/kopete/kopete/config/identity/globalidentitiesmanager.h
+++ b/kopete/kopete/config/identity/globalidentitiesmanager.h
@@ -18,8 +18,8 @@
#ifndef GLOBALIDENTITIESMANAGER_H
#define GLOBALIDENTITIESMANAGER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
namespace Kopete
{
@@ -54,7 +54,7 @@ public:
/**
* @brief Create a new identity and add it to the internal list.
*/
- void createNewIdentity(const QString &identityName);
+ void createNewIdentity(const TQString &identityName);
/**
* @brief Copy a identity
@@ -62,7 +62,7 @@ public:
* @param copyIdentityName Name for the copy identity.
* @param sourceIdentity Name of the source identity.
*/
- void copyIdentity(const QString &copyIdentityName, const QString &sourceIdentity);
+ void copyIdentity(const TQString &copyIdentityName, const TQString &sourceIdentity);
/**
* @brief Rename a identity
@@ -70,14 +70,14 @@ public:
* @param oldName Identity to rename.
* @param newName New identity name.
*/
- void renameIdentity(const QString &oldName, const QString &newName);
+ void renameIdentity(const TQString &oldName, const TQString &newName);
/**
* @brief Delete identity
*
* @param removedIdentity Identity name to remove.
*/
- void removeIdentity(const QString &removedIdentity);
+ void removeIdentity(const TQString &removedIdentity);
/**
* @brief Update the specified identity using the source MetaContact
@@ -85,7 +85,7 @@ public:
* @param updatedIdentity Identity to update.
* @param sourceMetaContact Source of data.
*/
- void updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact);
+ void updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact);
/**
* @brief Check if the specified identityName exists.
@@ -93,7 +93,7 @@ public:
* This is a helper method to avoid duplicated entries.
* @return if the identityName is in the internal list.
*/
- bool isIdentityPresent(const QString &identityName);
+ bool isIdentityPresent(const TQString &identityName);
/**
* @brief Return the specified identity.
@@ -101,7 +101,7 @@ public:
* @param identityName Identity to retrive.
* @return Identity data as Kopete::MetaContact.
*/
- Kopete::MetaContact *getIdentity(const QString &identityName);
+ Kopete::MetaContact *getIdentity(const TQString &identityName);
/**
* @brief Load the XML file where global identities metacontacts are stored.
@@ -117,17 +117,17 @@ public:
* @brief Return the list of global identities metacontact.
* @return The pointer list of metacontact as QValueList
*/
- QMap<QString, Kopete::MetaContact*> getGlobalIdentitiesList();
+ TQMap<TQString, Kopete::MetaContact*> getGlobalIdentitiesList();
private:
- GlobalIdentitiesManager(QObject *parent = 0, const char *name = 0);
+ GlobalIdentitiesManager(TQObject *parent = 0, const char *name = 0);
/**
* @brief Return a XML representation of the global identities list.
*
- * @return the XML represention as QDomDocument.
+ * @return the XML represention as TQDomDocument.
*/
- const QDomDocument toXML();
+ const TQDomDocument toXML();
Kopete::MetaContact *createNewMetaContact();
Kopete::MetaContact *createCopyMetaContact(Kopete::MetaContact *source);
diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.cpp b/kopete/kopete/config/identity/kopeteidentityconfig.cpp
index 26613b87..0f718e70 100644
--- a/kopete/kopete/config/identity/kopeteidentityconfig.cpp
+++ b/kopete/kopete/config/identity/kopeteidentityconfig.cpp
@@ -18,15 +18,15 @@
#include "kopeteidentityconfig.h"
// Qt includes
-#include <qlayout.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
// KDE includes
#include <kcombobox.h>
@@ -78,17 +78,17 @@ public:
Kopete::MetaContact *myself;
Kopete::MetaContact *currentIdentity;
- QMap<int, Kopete::Contact*> contactPhotoSourceList;
- QString selectedIdentity;
+ TQMap<int, Kopete::Contact*> contactPhotoSourceList;
+ TQString selectedIdentity;
};
-typedef KGenericFactory<KopeteIdentityConfig, QWidget> KopeteIdentityConfigFactory;
+typedef KGenericFactory<KopeteIdentityConfig, TQWidget> KopeteIdentityConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_identityconfig, KopeteIdentityConfigFactory( "kcm_kopete_identityconfig" ) )
-KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/, const QStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args)
+KopeteIdentityConfig::KopeteIdentityConfig(TQWidget *parent, const char */*name*/, const TQStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args)
{
d = new Private;
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
d->m_view = new KopeteIdentityConfigBase( this, "KopeteIdentityConfig::m_view" );
// Setup KConfigXT link with GUI.
@@ -109,7 +109,7 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/
// If the latest selected Identity is not present anymore, use a fallback identity.
if( !GlobalIdentitiesManager::self()->isIdentityPresent(d->selectedIdentity) )
{
- QMapIterator<QString, Kopete::MetaContact*> it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin();
+ TQMapIterator<TQString, Kopete::MetaContact*> it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin();
d->selectedIdentity = it.key();
}
else
@@ -124,33 +124,33 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/
d->m_view->buttonCopyIdentity->setIconSet(SmallIconSet("editcopy"));
d->m_view->buttonRenameIdentity->setIconSet(SmallIconSet("edit"));
d->m_view->buttonRemoveIdentity->setIconSet(SmallIconSet("delete_user"));
- d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
+ d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
load(); // Load Configuration
// Action signal/slots
- connect(d->m_view->buttonChangeAddressee, SIGNAL(clicked()), this, SLOT(slotChangeAddressee()));
- connect(d->m_view->comboSelectIdentity, SIGNAL(activated(const QString &)), this, SLOT(slotUpdateCurrentIdentity(const QString& )));
- connect(d->m_view->buttonNewIdentity, SIGNAL(clicked()), this, SLOT(slotNewIdentity()));
- connect(d->m_view->buttonCopyIdentity, SIGNAL(clicked()), this, SLOT(slotCopyIdentity()));
- connect(d->m_view->buttonRenameIdentity, SIGNAL(clicked()), this, SLOT(slotRenameIdentity()));
- connect(d->m_view->buttonRemoveIdentity, SIGNAL(clicked()), this, SLOT(slotRemoveIdentity()));
- connect(d->m_view->comboPhotoURL, SIGNAL(urlSelected(const QString& )), this, SLOT(slotChangePhoto(const QString& )));
- connect(d->m_view->buttonClearPhoto, SIGNAL(clicked()), this, SLOT(slotClearPhoto()));
+ connect(d->m_view->buttonChangeAddressee, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChangeAddressee()));
+ connect(d->m_view->comboSelectIdentity, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdateCurrentIdentity(const TQString& )));
+ connect(d->m_view->buttonNewIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewIdentity()));
+ connect(d->m_view->buttonCopyIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyIdentity()));
+ connect(d->m_view->buttonRenameIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenameIdentity()));
+ connect(d->m_view->buttonRemoveIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveIdentity()));
+ connect(d->m_view->comboPhotoURL, TQT_SIGNAL(urlSelected(const TQString& )), this, TQT_SLOT(slotChangePhoto(const TQString& )));
+ connect(d->m_view->buttonClearPhoto, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearPhoto()));
// Settings signal/slots
- connect(d->m_view->radioNicknameContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
- connect(d->m_view->radioNicknameCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
- connect(d->m_view->radioNicknameKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
-
- connect(d->m_view->radioPhotoContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
- connect(d->m_view->radioPhotoCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
- connect(d->m_view->radioPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets()));
-
- connect(d->m_view->checkSyncPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotSettingsChanged()));
- connect(d->m_view->lineNickname, SIGNAL(textChanged(const QString& )), this, SLOT(slotSettingsChanged()));
- connect(d->m_view->comboNameContact, SIGNAL(activated(int )), this, SLOT(slotSettingsChanged()));
- connect(d->m_view->comboPhotoContact, SIGNAL(activated(int )), this, SLOT(slotEnableAndDisableWidgets()));
+ connect(d->m_view->radioNicknameContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect(d->m_view->radioNicknameCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect(d->m_view->radioNicknameKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+
+ connect(d->m_view->radioPhotoContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect(d->m_view->radioPhotoCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect(d->m_view->radioPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
+
+ connect(d->m_view->checkSyncPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotSettingsChanged()));
+ connect(d->m_view->lineNickname, TQT_SIGNAL(textChanged(const TQString& )), this, TQT_SLOT(slotSettingsChanged()));
+ connect(d->m_view->comboNameContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotSettingsChanged()));
+ connect(d->m_view->comboPhotoContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotEnableAndDisableWidgets()));
}
KopeteIdentityConfig::~KopeteIdentityConfig()
@@ -220,9 +220,9 @@ void KopeteIdentityConfig::loadIdentities()
{
d->m_view->comboSelectIdentity->clear();
- QMap<QString, Kopete::MetaContact*> identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList();
- QMapIterator<QString, Kopete::MetaContact*> it;
- QMapIterator<QString, Kopete::MetaContact*> end = identitiesList.end();
+ TQMap<TQString, Kopete::MetaContact*> identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList();
+ TQMapIterator<TQString, Kopete::MetaContact*> it;
+ TQMapIterator<TQString, Kopete::MetaContact*> end = identitiesList.end();
int count=0, selectedIndex=0;
for(it = identitiesList.begin(); it != end; ++it)
@@ -266,15 +266,15 @@ void KopeteIdentityConfig::slotLoadNameSources()
{
Kopete::Contact *nameSourceContact = d->currentIdentity->displayNameSourceContact();
- QPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
- QPtrListIterator<Kopete::Contact> it(contactList);
+ TQPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
+ TQPtrListIterator<Kopete::Contact> it(contactList);
d->m_view->comboNameContact->clear();
for(; it.current(); ++it)
{
- QString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">";
- QPixmap accountIcon = it.current()->account()->accountIcon();
+ TQString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">";
+ TQPixmap accountIcon = it.current()->account()->accountIcon();
d->m_view->comboNameContact->insertItem(accountIcon, account);
// Select this item if it's the one we're tracking.
@@ -297,8 +297,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources()
{
Kopete::Contact *photoSourceContact = d->currentIdentity->photoSourceContact();
- QPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
- QPtrListIterator<Kopete::Contact> it(contactList);
+ TQPtrList<Kopete::Contact> contactList = d->myself->contacts(); // Use myself contact PtrList. Safer.
+ TQPtrListIterator<Kopete::Contact> it(contactList);
d->m_view->comboPhotoContact->clear();
d->m_view->comboPhotoURL->clear();
@@ -309,8 +309,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources()
Kopete::Contact *currentContact = it.current();
if(currentContact->hasProperty(Kopete::Global::Properties::self()->photo().key()))
{
- QString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">";
- QPixmap accountIcon = currentContact->account()->accountIcon();
+ TQString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">";
+ TQPixmap accountIcon = currentContact->account()->accountIcon();
d->m_view->comboPhotoContact->insertItem(accountIcon, account);
d->contactPhotoSourceList.insert(d->m_view->comboPhotoContact->count() - 1, currentContact);
@@ -368,7 +368,7 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets()
d->m_view->comboPhotoContact->setEnabled(false);
}
- QImage photo;
+ TQImage photo;
switch ( selectedPhotoSource() )
{
case Kopete::MetaContact::SourceKABC:
@@ -378,19 +378,19 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets()
photo = Kopete::photoFromContact(selectedNameSourceContact());
break;
case Kopete::MetaContact::SourceCustom:
- photo = QImage(d->m_view->comboPhotoURL->url());
+ photo = TQImage(d->m_view->comboPhotoURL->url());
break;
}
if(!photo.isNull())
- d->m_view->labelPhoto->setPixmap(QPixmap(photo.smoothScale(64, 92, QImage::ScaleMin)));
+ d->m_view->labelPhoto->setPixmap(TQPixmap(photo.smoothScale(64, 92, TQImage::ScaleMin)));
else
- d->m_view->labelPhoto->setPixmap(QPixmap());
+ d->m_view->labelPhoto->setPixmap(TQPixmap());
emit changed(true);
}
-void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIdentity)
+void KopeteIdentityConfig::slotUpdateCurrentIdentity(const TQString &selectedIdentity)
{
kdDebug() << k_funcinfo << "Updating current identity." << endl;
@@ -413,7 +413,7 @@ void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIden
void KopeteIdentityConfig::slotNewIdentity()
{
bool ok;
- QString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , QString::null , &ok);
+ TQString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , TQString::null , &ok);
if(newIdentityName.isEmpty() || !ok)
return;
@@ -428,7 +428,7 @@ void KopeteIdentityConfig::slotNewIdentity()
void KopeteIdentityConfig::slotCopyIdentity()
{
bool ok;
- QString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , QString::null, &ok);
+ TQString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , TQString::null, &ok);
if(copyName.isEmpty() || !ok)
return;
@@ -453,7 +453,7 @@ void KopeteIdentityConfig::slotRenameIdentity()
return;
bool ok;
- QString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok);
+ TQString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok);
if(renamedName.isEmpty() || !ok)
return;
@@ -515,20 +515,20 @@ void KopeteIdentityConfig::slotChangeAddressee()
emit changed(true);
}
-void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl)
+void KopeteIdentityConfig::slotChangePhoto(const TQString &photoUrl)
{
- QString saveLocation;
+ TQString saveLocation;
- QImage photo(photoUrl);
+ TQImage photo(photoUrl);
// use KABC photo size 100x140
- photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this );
+ photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this );
if(!photo.isNull())
{
if(photo.width() > 96 || photo.height() > 96)
{
// Scale and crop the picture.
- photo = photo.smoothScale( 96, 96, QImage::ScaleMin );
+ photo = photo.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(photo.width() < photo.height())
photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96);
@@ -539,7 +539,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl)
else if (photo.width() < 32 || photo.height() < 32)
{
// Scale and crop the picture.
- photo = photo.smoothScale( 32, 32, QImage::ScaleMin );
+ photo = photo.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(photo.width() < photo.height())
photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32);
@@ -557,14 +557,14 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl)
// Use MD5 hash to save the filename, so no problems will occur with the filename because of non-ASCII characters.
// Bug 124175: My personnal picture doesn't appear cause of l10n
- QByteArray tempArray;
- QBuffer tempBuffer(tempArray);
+ TQByteArray tempArray;
+ TQBuffer tempBuffer(tempArray);
tempBuffer.open( IO_WriteOnly );
photo.save(&tempBuffer, "PNG");
KMD5 context(tempArray);
// Save the image to a file.
saveLocation = context.hexDigest() + ".png";
- saveLocation = locateLocal( "appdata", QString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) );
+ saveLocation = locateLocal( "appdata", TQString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) );
if(!photo.save(saveLocation, "PNG"))
{
@@ -585,7 +585,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl)
void KopeteIdentityConfig::slotClearPhoto()
{
- d->m_view->comboPhotoURL->setURL( QString::null );
+ d->m_view->comboPhotoURL->setURL( TQString::null );
slotEnableAndDisableWidgets();
}
diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.h b/kopete/kopete/config/identity/kopeteidentityconfig.h
index f18c5a8c..88644be8 100644
--- a/kopete/kopete/config/identity/kopeteidentityconfig.h
+++ b/kopete/kopete/config/identity/kopeteidentityconfig.h
@@ -37,7 +37,7 @@ class KopeteIdentityConfig : public KCModule
{
Q_OBJECT
public:
- KopeteIdentityConfig(QWidget *parent, const char *name, const QStringList &args );
+ KopeteIdentityConfig(TQWidget *parent, const char *name, const TQStringList &args );
~KopeteIdentityConfig();
public slots:
@@ -58,14 +58,14 @@ private slots:
void slotLoadPhotoSources();
void slotEnableAndDisableWidgets();
- void slotUpdateCurrentIdentity(const QString &selectedIdentity);
+ void slotUpdateCurrentIdentity(const TQString &selectedIdentity);
void slotNewIdentity();
void slotCopyIdentity();
void slotRenameIdentity();
void slotRemoveIdentity();
void slotChangeAddressee();
- void slotChangePhoto(const QString &photoUrl);
+ void slotChangePhoto(const TQString &photoUrl);
void slotClearPhoto();
void slotSettingsChanged();
diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.cpp b/kopete/kopete/config/plugins/kopetepluginconfig.cpp
index 9949f70e..7f790a0b 100644
--- a/kopete/kopete/config/plugins/kopetepluginconfig.cpp
+++ b/kopete/kopete/config/plugins/kopetepluginconfig.cpp
@@ -17,8 +17,8 @@
#include "kopetepluginconfig.h"
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -39,7 +39,7 @@ KopetePluginConfig::~KopetePluginConfig()
delete d;
}
-KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name )
+KopetePluginConfig::KopetePluginConfig( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Configure Plugins" ), /*Help |*/ Cancel | Apply | Ok | User1,
Ok, parent, name, false, true, KGuiItem( i18n( "&Reset" ), "undo" ) )
{
@@ -50,14 +50,14 @@ KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name )
// FIXME: Implement this - Martijn
enableButton( KDialogBase::Help, false );
- setInitialSize( QSize( 640, 480 ) );
+ setInitialSize( TQSize( 640, 480 ) );
- ( new QVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true );
d->pluginSelector = new KPluginSelector( plainPage() );
setMainWidget( d->pluginSelector );
- connect( d->pluginSelector, SIGNAL( changed( bool ) ), this, SLOT( setChanged( bool ) ) );
- connect( d->pluginSelector, SIGNAL( configCommitted( const QCString & ) ),
- KSettings::Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->pluginSelector, TQT_SIGNAL( changed( bool ) ), this, TQT_SLOT( setChanged( bool ) ) );
+ connect( d->pluginSelector, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ KSettings::Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
d->pluginSelector->addPlugins( Kopete::PluginManager::self()->availablePlugins( "Plugins" ), i18n( "General Plugins" ), "Plugins" );
}
diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.h b/kopete/kopete/config/plugins/kopetepluginconfig.h
index e8853a1c..04d1cfa1 100644
--- a/kopete/kopete/config/plugins/kopetepluginconfig.h
+++ b/kopete/kopete/config/plugins/kopetepluginconfig.h
@@ -32,7 +32,7 @@ class KopetePluginConfig : public KDialogBase
Q_OBJECT
public:
- KopetePluginConfig( QWidget *parent, const char *name = 0L );
+ KopetePluginConfig( TQWidget *parent, const char *name = 0L );
~KopetePluginConfig();
void apply();
diff --git a/kopete/kopete/contactlist/customnotificationprops.cpp b/kopete/kopete/contactlist/customnotificationprops.cpp
index 87833fa7..2f341426 100644
--- a/kopete/kopete/contactlist/customnotificationprops.cpp
+++ b/kopete/kopete/contactlist/customnotificationprops.cpp
@@ -18,9 +18,9 @@
*************************************************************************
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -33,32 +33,32 @@
#include "customnotificationprops.h"
-CustomNotificationProps::CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name )
-: QObject( parent, name )
+CustomNotificationProps::CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name )
+: TQObject( parent, name )
{
m_notifyWidget = new CustomNotificationWidget( parent, "notificationWidget" );
m_item = item;
- QString path = "kopete/eventsrc";
+ TQString path = "kopete/eventsrc";
KConfig eventsfile( path, true, false, "data" );
m_eventList = eventsfile.groupList();
- QStringList contactSpecificEvents; // we are only interested in events that relate to contacts
- QStringList::Iterator it = m_eventList.begin();
- QStringList::Iterator end = m_eventList.end();
+ TQStringList contactSpecificEvents; // we are only interested in events that relate to contacts
+ TQStringList::Iterator it = m_eventList.begin();
+ TQStringList::Iterator end = m_eventList.end();
for ( ; it != end; ++it )
{
- if ( !(*it).startsWith( QString::fromLatin1( "kopete_contact_" ) ) )
+ if ( !(*it).startsWith( TQString::fromLatin1( "kopete_contact_" ) ) )
continue;
contactSpecificEvents.append( *it );
- QMap<QString, QString> entries = eventsfile.entryMap( *it );
+ TQMap<TQString, TQString> entries = eventsfile.entryMap( *it );
eventsfile.setGroup( *it );
- QString comment = eventsfile.readEntry( "Comment", QString::fromLatin1( "Found nothing!" ) );
+ TQString comment = eventsfile.readEntry( "Comment", TQString::fromLatin1( "Found nothing!" ) );
m_notifyWidget->cmbEvents->insertItem( comment );
}
m_eventList = contactSpecificEvents;
slotEventsComboChanged( m_notifyWidget->cmbEvents->currentItem() );
// we have to do this after adding items
- connect( m_notifyWidget->cmbEvents, SIGNAL( activated( int ) ), this, SLOT( slotEventsComboChanged( int ) ) );
+ connect( m_notifyWidget->cmbEvents, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotEventsComboChanged( int ) ) );
}
void CustomNotificationProps::slotEventsComboChanged( int itemNo )
@@ -152,7 +152,7 @@ void CustomNotificationProps::storeCurrentCustoms()
evt->setPresentation( Kopete::EventPresentation::Message, eventNotify );
// set chat attributes
eventNotify = new Kopete::EventPresentation( Kopete::EventPresentation::Chat,
- QString::null,
+ TQString::null,
m_notifyWidget->chkChatSS->isChecked(),
m_notifyWidget->chkCustomChat->isChecked() );
evt->setPresentation( Kopete::EventPresentation::Chat, eventNotify );
diff --git a/kopete/kopete/contactlist/customnotificationprops.h b/kopete/kopete/contactlist/customnotificationprops.h
index 5d6c1dea..f28ada4c 100644
--- a/kopete/kopete/contactlist/customnotificationprops.h
+++ b/kopete/kopete/contactlist/customnotificationprops.h
@@ -31,7 +31,7 @@ class CustomNotificationProps : public QObject
{
Q_OBJECT
public:
- CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 );
+ CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 );
~CustomNotificationProps() {}
void dumpData();
void resetEventWidgets();
@@ -44,8 +44,8 @@ protected slots:
private:
CustomNotificationWidget* m_notifyWidget;
Kopete::NotifyDataObject * m_item;
- QStringList m_eventList;
- QString m_event;
+ TQStringList m_eventList;
+ TQString m_event;
};
#endif
diff --git a/kopete/kopete/contactlist/kabcexport.cpp b/kopete/kopete/contactlist/kabcexport.cpp
index 73f67344..0051f585 100644
--- a/kopete/kopete/contactlist/kabcexport.cpp
+++ b/kopete/kopete/contactlist/kabcexport.cpp
@@ -19,11 +19,11 @@
*************************************************************************
*/
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -48,27 +48,27 @@
class ContactLVI : public QCheckListItem
{
public:
- ContactLVI ( Kopete::MetaContact * mc, QListView * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem( parent, text, tt ), mc( mc )
+ ContactLVI ( Kopete::MetaContact * mc, TQListView * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem( parent, text, tt ), mc( mc )
{ }
Kopete::MetaContact * mc;
- QString uid;
+ TQString uid;
};
// ctor populates the resource list and contact list, and enables the next button on the first page
-KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name )
+KabcExportWizard::KabcExportWizard( TQWidget *parent, const char *name )
: KabcExportWizard_Base( parent, name )
{
- connect( m_addrBooks, SIGNAL( selectionChanged( QListBoxItem * ) ), SLOT( slotResourceSelectionChanged( QListBoxItem * ) ) );
+ connect( m_addrBooks, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), TQT_SLOT( slotResourceSelectionChanged( TQListBoxItem * ) ) );
- connect( m_btnSelectAll, SIGNAL( clicked() ), SLOT( slotSelectAll() ) );
- connect( m_btnDeselectAll, SIGNAL( clicked() ), SLOT( slotDeselectAll() ) );
+ connect( m_btnSelectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAll() ) );
+ connect( m_btnDeselectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDeselectAll() ) );
// fill resource selector
m_addressBook = Kopete::KABCPersistence::self()->addressBook();
- QPtrList<KABC::Resource> kabcResources = m_addressBook->resources();
+ TQPtrList<KABC::Resource> kabcResources = m_addressBook->resources();
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
uint counter = 0;
@@ -82,8 +82,8 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name )
counter++;
}
}
- setNextEnabled( QWizard::page( 0 ), false );
- setFinishEnabled( QWizard::page( 1 ), true );
+ setNextEnabled( TQWizard::page( 0 ), false );
+ setFinishEnabled( TQWizard::page( 1 ), true );
// if there were no writable address books, tell the user
if ( counter == 0 )
{
@@ -96,15 +96,15 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name )
m_addrBooks->setSelected( 0, true );
// fill contact list
- QPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( contacts );
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( contacts );
counter = 0;
- QString alreadyIn = i18n( " (already in address book)" );
+ TQString alreadyIn = i18n( " (already in address book)" );
for (; it.current(); ++it)
{
m_contactMap.insert( counter, it.current() );
- QCheckListItem * lvi = new ContactLVI( it.current(), m_contactList,
- it.current()->displayName(), QCheckListItem::CheckBox );
+ TQCheckListItem * lvi = new ContactLVI( it.current(), m_contactList,
+ it.current()->displayName(), TQCheckListItem::CheckBox );
lvi->setOn( false );
if ( it.current()->metaContactId().contains(':') )
{
@@ -123,7 +123,7 @@ KabcExportWizard::~KabcExportWizard()
void KabcExportWizard::slotDeselectAll()
{
- QListViewItemIterator it( m_contactList );
+ TQListViewItemIterator it( m_contactList );
while ( it.current() )
{
ContactLVI *item = static_cast<ContactLVI *>( it.current() );
@@ -134,7 +134,7 @@ void KabcExportWizard::slotDeselectAll()
void KabcExportWizard::slotSelectAll()
{
- QListViewItemIterator it( m_contactList );
+ TQListViewItemIterator it( m_contactList );
while ( it.current() )
{
ContactLVI *item = static_cast<ContactLVI *>( it.current() );
@@ -145,9 +145,9 @@ void KabcExportWizard::slotSelectAll()
}
}
-void KabcExportWizard::slotResourceSelectionChanged( QListBoxItem * lbi )
+void KabcExportWizard::slotResourceSelectionChanged( TQListBoxItem * lbi )
{
- setNextEnabled( QWizard::page( 0 ), lbi->isSelected() );
+ setNextEnabled( TQWizard::page( 0 ), lbi->isSelected() );
}
// accept runs the export algorithm
@@ -159,7 +159,7 @@ void KabcExportWizard::accept()
m_resourceMap[ ( m_addrBooks->index( m_addrBooks->selectedItem() ) ) ];
// for each item checked
{
- QListViewItemIterator it( m_contactList );
+ TQListViewItemIterator it( m_contactList );
while ( it.current() )
{
ContactLVI *item = static_cast<ContactLVI *>( it.current() );
@@ -175,7 +175,7 @@ void KabcExportWizard::accept()
addr.setResource( selectedResource );
// set name
- QPtrList<Kopete::Contact> contacts = item->mc->contacts();
+ TQPtrList<Kopete::Contact> contacts = item->mc->contacts();
if ( contacts.count() == 1 )
{
Kopete::ContactProperty prop;
@@ -207,14 +207,14 @@ void KabcExportWizard::accept()
}
// request a write in case we only changed details on existing linked addressee
Kopete::KABCPersistence::self()->writeAddressBook( selectedResource );
- QDialog::accept();
+ TQDialog::accept();
}
void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr )
{
// for each contact
- QPtrList<Kopete::Contact> contacts = mc->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
Kopete::ContactProperty prop;
@@ -241,7 +241,7 @@ void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee
}
// metacontact photo
- QImage photo = mc->photo();
+ TQImage photo = mc->photo();
if ( !photo.isNull() )
addr.setPhoto( KABC::Picture( photo ) );
}
diff --git a/kopete/kopete/contactlist/kabcexport.h b/kopete/kopete/contactlist/kabcexport.h
index bad1d8e6..0ebfb75b 100644
--- a/kopete/kopete/contactlist/kabcexport.h
+++ b/kopete/kopete/contactlist/kabcexport.h
@@ -37,20 +37,20 @@ class KabcExportWizard : public KabcExportWizard_Base
{
Q_OBJECT
public:
- KabcExportWizard( QWidget *parent = 0, const char *name = 0 );
+ KabcExportWizard( TQWidget *parent = 0, const char *name = 0 );
~KabcExportWizard();
public slots:
void accept();
protected slots:
void slotDeselectAll();
void slotSelectAll();
- void slotResourceSelectionChanged( QListBoxItem * lbi );
+ void slotResourceSelectionChanged( TQListBoxItem * lbi );
protected:
void exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr );
private:
KABC::AddressBook* m_addressBook;
- QMap<int, KABC::Resource*> m_resourceMap;
- QMap<int, Kopete::MetaContact*> m_contactMap;
+ TQMap<int, KABC::Resource*> m_resourceMap;
+ TQMap<int, Kopete::MetaContact*> m_contactMap;
};
#endif
diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp
index d752f71e..bcb9c434 100644
--- a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp
+++ b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp
@@ -19,8 +19,8 @@
*/
#include <kabc/phonenumber.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include <kiconloader.h>
@@ -35,7 +35,7 @@
#include "kopeteaddrbookexport.h"
#include "kopeteaddrbookexportui.h"
-KopeteAddressBookExport::KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ) : QObject( parent )
+KopeteAddressBookExport::KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ) : TQObject( parent )
{
// instantiate dialog and populate widgets
mParent = parent;
@@ -69,30 +69,30 @@ void KopeteAddressBookExport::fetchKABCData()
mAddrBookIcon = SmallIcon( "kaddressbook" );
// given name
- QString given = mAddressee.givenName();
+ TQString given = mAddressee.givenName();
if ( !given.isEmpty() )
mUI->mFirstName->insertItem( mAddrBookIcon, given );
else
mUI->mFirstName->insertItem( mAddrBookIcon, i18n("<Not Set>") );
// family name
- QString family = mAddressee.familyName();
+ TQString family = mAddressee.familyName();
if ( !family.isEmpty() )
mUI->mLastName->insertItem( mAddrBookIcon, family );
else
mUI->mLastName->insertItem( mAddrBookIcon, i18n("<Not Set>") );
// url
- QString url = mAddressee.url().url();
+ TQString url = mAddressee.url().url();
if ( !url.isEmpty() )
mUI->mUrl->insertItem( mAddrBookIcon, url );
else
mUI->mUrl->insertItem( mAddrBookIcon, i18n("<Not Set>") );
// emails
- QStringList emails = mAddressee.emails();
+ TQStringList emails = mAddressee.emails();
numEmails = emails.count();
- for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it )
+ for ( TQStringList::Iterator it = emails.begin(); it != emails.end(); ++it )
mUI->mEmails->insertItem( mAddrBookIcon, *it );
if ( numEmails == 0 )
{
@@ -123,13 +123,13 @@ void KopeteAddressBookExport::fetchPhoneNumbers( KListBox * listBox, int type, u
void KopeteAddressBookExport::fetchIMData()
{
- QPtrList<Kopete::Contact> contacts = mMetaContact->contacts();
- QPtrListIterator<Kopete::Contact> cit( contacts );
+ TQPtrList<Kopete::Contact> contacts = mMetaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> cit( contacts );
for( ; cit.current(); ++cit )
{
// for each contact, get the property content
Kopete::Contact* c = cit.current();
- QPixmap contactIcon = c->account()->accountIcon( 16 );
+ TQPixmap contactIcon = c->account()->accountIcon( 16 );
// given name
populateIM( c, contactIcon, mUI->mFirstName, Kopete::Global::Properties::self()->firstName() );
// family name
@@ -147,7 +147,7 @@ void KopeteAddressBookExport::fetchIMData()
}
}
-void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, QComboBox *combo, const Kopete::ContactPropertyTmpl &property )
+void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, TQComboBox *combo, const Kopete::ContactPropertyTmpl &property )
{
Kopete::ContactProperty prop = contact->property( property );
if ( !prop.isNull() )
@@ -156,7 +156,7 @@ void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const
}
}
-void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property )
+void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property )
{
Kopete::ContactProperty prop = contact->property( property );
if ( !prop.isNull() )
@@ -178,7 +178,7 @@ int KopeteAddressBookExport::showDialog()
mUI = new AddressBookExportUI( mDialog );
mDialog->setMainWidget( mUI );
mDialog->setButtonOK( KGuiItem( i18n( "Export" ),
- QString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) );
+ TQString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) );
initLabels();
// fetch existing data from kabc
@@ -189,7 +189,7 @@ int KopeteAddressBookExport::showDialog()
return mDialog->exec();
}
else
- return QDialog::Rejected;
+ return TQDialog::Rejected;
}
void KopeteAddressBookExport::exportData()
@@ -216,31 +216,31 @@ void KopeteAddressBookExport::exportData()
mAddressee.setUrl( KURL( mUI->mUrl->currentText() ) );
}
- QStringList newVals;
+ TQStringList newVals;
// email
newVals = newValues( mUI->mEmails, numEmails );
- for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
+ for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertEmail( *it );
}
// home phone
newVals = newValues( mUI->mHomePhones, numHomePhones );
- for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
+ for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Home ) );
}
// work phone
newVals = newValues( mUI->mWorkPhones, numWorkPhones );
- for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
+ for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Work ) );
}
// mobile
newVals = newValues( mUI->mMobilePhones, numMobilePhones );
- for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
+ for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it )
{
dirty = true;
mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Cell ) );
@@ -266,7 +266,7 @@ void KopeteAddressBookExport::exportData()
}
}
-bool KopeteAddressBookExport::newValue( QComboBox *combo )
+bool KopeteAddressBookExport::newValue( TQComboBox *combo )
{
// all data in position 0 is from KABC, so if position 0 is selected,
// or if the selection is the same as the data at 0, return false
@@ -274,9 +274,9 @@ bool KopeteAddressBookExport::newValue( QComboBox *combo )
( combo->text( combo->currentItem() ) == combo->text( 0 ) ) );
}
-QStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter )
+TQStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter )
{
- QStringList newValues;
+ TQStringList newValues;
// need to iterate all items except those from KABC and check if selected and not same as the first
// counter is the number of KABC items, and hence the index of the first non KABC item
for ( uint i = counter; i < listBox->count(); ++i )
diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.h b/kopete/kopete/contactlist/kopeteaddrbookexport.h
index b4437c4e..131dad96 100644
--- a/kopete/kopete/contactlist/kopeteaddrbookexport.h
+++ b/kopete/kopete/contactlist/kopeteaddrbookexport.h
@@ -40,12 +40,12 @@ class MetaContact;
class KopeteAddressBookExport : public QObject
{
public:
- KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc );
+ KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc );
~KopeteAddressBookExport();
/**
* Display the dialog
- * @return a QDialog return code
+ * @return a TQDialog return code
*/
int showDialog();
/**
@@ -73,22 +73,22 @@ protected:
/**
* Populate a combobox with a contact's IM data
*/
- void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
- QComboBox *combo, const Kopete::ContactPropertyTmpl &property );
+ void populateIM( const Kopete::Contact *contact, const TQPixmap &icon,
+ TQComboBox *combo, const Kopete::ContactPropertyTmpl &property );
/**
* Populate a listbox with a contact's IM data
*/
- void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
+ void populateIM( const Kopete::Contact *contact, const TQPixmap &icon,
KListBox *combo, const Kopete::ContactPropertyTmpl &property );
/** Check the selected item is not the first (existing KABC) item, or the same as it */
- bool newValue( QComboBox *combo );
- QStringList newValues( KListBox *listBox, uint counter );
+ bool newValue( TQComboBox *combo );
+ TQStringList newValues( KListBox *listBox, uint counter );
// the GUI
- QWidget *mParent;
+ TQWidget *mParent;
KDialogBase * mDialog;
- QPixmap mAddrBookIcon;
+ TQPixmap mAddrBookIcon;
AddressBookExportUI *mUI;
Kopete::MetaContact *mMetaContact;
KABC::AddressBook *mAddressBook;
diff --git a/kopete/kopete/contactlist/kopetecontactlistview.cpp b/kopete/kopete/contactlist/kopetecontactlistview.cpp
index b6b01a2f..4e45f602 100644
--- a/kopete/kopete/contactlist/kopetecontactlistview.cpp
+++ b/kopete/kopete/contactlist/kopetecontactlistview.cpp
@@ -25,13 +25,13 @@
#include "kopetecontactlistview.h"
#include "kopeteuiglobal.h"
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qheader.h>
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qguardedptr.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqguardedptr.h>
#include <kaction.h>
#include <kapplication.h>
@@ -97,13 +97,13 @@ public:
void addCurrentItems()
{
// Add the already existing groups now
- QPtrList<Kopete::Group> grps = Kopete::ContactList::self()->groups();
- for ( QPtrListIterator<Kopete::Group> groupIt( grps ); groupIt.current(); ++groupIt )
+ TQPtrList<Kopete::Group> grps = Kopete::ContactList::self()->groups();
+ for ( TQPtrListIterator<Kopete::Group> groupIt( grps ); groupIt.current(); ++groupIt )
addGroup( groupIt.current() );
// Add the already existing meta contacts now
- QPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts();
- for ( QPtrListIterator<Kopete::MetaContact> it( metaContacts ); it.current(); ++it )
+ TQPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts();
+ for ( TQPtrListIterator<Kopete::MetaContact> it( metaContacts ); it.current(); ++it )
addMetaContact( it.current() );
}
@@ -119,13 +119,13 @@ public:
virtual void metaContactStatusChanged( Kopete::MetaContact *mc ) = 0;
protected:
- // work around QListView design stupidity.
+ // work around TQListView design stupidity.
// GroupViewItem will be QListView-derived, or QListViewItem-derived.
template<typename GroupViewItem>
void addMetaContactToGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi )
{
// check if the contact isn't already in the group
- for( QListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() )
+ for( TQListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() )
if ( KopeteMetaContactLVI *mci = dynamic_cast<KopeteMetaContactLVI*>(item) )
if ( mci->metaContact() == mc )
return;
@@ -136,7 +136,7 @@ protected:
void removeMetaContactFromGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi )
{
KopeteMetaContactLVI* mci;
- QListViewItem* item = gpi->firstChild();
+ TQListViewItem* item = gpi->firstChild();
while(item) {
mci = dynamic_cast<KopeteMetaContactLVI*>(item);
item = item->nextSibling();
@@ -220,7 +220,7 @@ private:
KopeteGroupViewItem *findGroupItem( Kopete::Group *gp )
{
if ( gp->type() == Kopete::Group::TopLevel ) return 0;
- for( QListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() )
+ for( TQListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() )
if ( KopeteGroupViewItem *gvi = dynamic_cast<KopeteGroupViewItem*>(item) )
if ( gvi->group() == gp )
return gvi;
@@ -327,15 +327,15 @@ private:
}
// check if the contact is already in the correct "group"
- QListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem;
- for( QListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() )
+ TQListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem;
+ for( TQListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() )
if ( KopeteMetaContactLVI *kc = dynamic_cast<KopeteMetaContactLVI*>( lvi ) )
if ( kc->metaContact() == mc )
return;
// item not found in the right group; look for it in the other group
- QListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem;
- for( QListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() )
+ TQListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem;
+ for( TQListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() )
{
if ( KopeteMetaContactLVI *kc = dynamic_cast<KopeteMetaContactLVI*>( lvi ) )
{
@@ -354,7 +354,7 @@ private:
}
KopeteStatusGroupViewItem *m_onlineItem, *m_offlineItem;
- QGuardedPtr<KopeteGroupViewItem> m_temporaryItem;
+ TQGuardedPtr<KopeteGroupViewItem> m_temporaryItem;
};
void KopeteContactListViewPrivate::updateViewStrategy( KListView *view )
@@ -376,9 +376,9 @@ void KopeteContactListViewPrivate::updateViewStrategy( KListView *view )
// returns the next item in a depth-first descent of the list view.
// much like QLVI::itemBelow but does not depend on visibility of items, etc.
-static QListViewItem *nextItem( QListViewItem *item )
+static TQListViewItem *nextItem( TQListViewItem *item )
{
- if ( QListViewItem *it = item->firstChild() )
+ if ( TQListViewItem *it = item->firstChild() )
return it;
while ( item && !item->nextSibling() )
item = item->parent();
@@ -389,7 +389,7 @@ static QListViewItem *nextItem( QListViewItem *item )
-KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name )
+KopeteContactListView::KopeteContactListView( TQWidget *parent, const char *name )
: Kopete::UI::ListView::ListView( parent, name )
{
d = new KopeteContactListViewPrivate;
@@ -411,38 +411,38 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name
setFullWidth( true );
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( expanded( QListViewItem * ) ),
- SLOT( slotExpanded( QListViewItem * ) ) );
- connect( this, SIGNAL( collapsed( QListViewItem * ) ),
- SLOT( slotCollapsed( QListViewItem * ) ) );
- connect( this, SIGNAL( executed( QListViewItem *, const QPoint &, int ) ),
- SLOT( slotExecuted( QListViewItem *, const QPoint &, int ) ) );
- connect( this, SIGNAL( selectionChanged() ), SLOT( slotViewSelectionChanged() ) );
- connect( this, SIGNAL( itemRenamed( QListViewItem * ) ),
- SLOT( slotItemRenamed( QListViewItem * ) ) );
-
- connect( KopetePrefs::prefs(), SIGNAL( saved() ), SLOT( slotSettingsChanged() ) );
-
- connect( Kopete::ContactList::self(), SIGNAL( selectionChanged() ),
- SLOT( slotListSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ),
+ TQT_SLOT( slotExpanded( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ TQT_SLOT( slotCollapsed( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( executed( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( slotExecuted( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotViewSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem * ) ),
+ TQT_SLOT( slotItemRenamed( TQListViewItem * ) ) );
+
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), TQT_SLOT( slotSettingsChanged() ) );
+
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotListSelectionChanged() ) );
connect( Kopete::ContactList::self(),
- SIGNAL( metaContactAdded( Kopete::MetaContact * ) ),
- SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) );
+ TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ),
+ TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) );
connect( Kopete::ContactList::self(),
- SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ),
- SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) );
- connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ),
- SLOT( slotGroupAdded( Kopete::Group * ) ) );
+ TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ),
+ TQT_SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ),
+ TQT_SLOT( slotGroupAdded( Kopete::Group * ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( newEvent( Kopete::MessageEvent * ) ),
- this, SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( newEvent( Kopete::MessageEvent * ) ),
+ this, TQT_SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) );
- connect( this, SIGNAL( dropped( QDropEvent *, QListViewItem *, QListViewItem * ) ),
- this, SLOT( slotDropped( QDropEvent *, QListViewItem *, QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( dropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ),
+ this, TQT_SLOT( slotDropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ) );
- connect( &undoTimer, SIGNAL(timeout()) , this, SLOT (slotTimeout() ) );
+ connect( &undoTimer, TQT_SIGNAL(timeout()) , this, TQT_SLOT (slotTimeout() ) );
addColumn( i18n( "Contacts" ), 0 ); //add an unique colums to add every contact
header()->hide(); // and hide the ugly header which show the single word "Contacts"
@@ -453,7 +453,7 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name
setItemsMovable( false );
setDropVisualizer( false );
setDropHighlighter( true );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
// Load in the user's initial settings
slotSettingsChanged();
@@ -461,49 +461,49 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name
void KopeteContactListView::initActions( KActionCollection *ac )
{
- actionUndo = KStdAction::undo( this , SLOT( slotUndo() ) , ac );
- actionRedo = KStdAction::redo( this , SLOT( slotRedo() ) , ac );
+ actionUndo = KStdAction::undo( this , TQT_SLOT( slotUndo() ) , ac );
+ actionRedo = KStdAction::redo( this , TQT_SLOT( slotRedo() ) , ac );
actionUndo->setEnabled(false);
actionRedo->setEnabled(false);
- new KAction( i18n( "Create New Group..." ), 0, 0, this, SLOT( addGroup() ),
+ new KAction( i18n( "Create New Group..." ), 0, 0, this, TQT_SLOT( addGroup() ),
ac, "AddGroup" );
actionSendMessage = KopeteStdAction::sendMessage(
- this, SLOT( slotSendMessage() ), ac, "contactSendMessage" );
- actionStartChat = KopeteStdAction::chat( this, SLOT( slotStartChat() ),
+ this, TQT_SLOT( slotSendMessage() ), ac, "contactSendMessage" );
+ actionStartChat = KopeteStdAction::chat( this, TQT_SLOT( slotStartChat() ),
ac, "contactStartChat" );
- actionMove = new KopeteGroupListAction( i18n( "&Move To" ), QString::fromLatin1( "editcut" ),
- 0, this, SLOT( slotMoveToGroup() ), ac, "contactMove" );
- actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), QString::fromLatin1( "editcopy" ), 0,
- this, SLOT( slotCopyToGroup() ), ac, "contactCopy" );
+ actionMove = new KopeteGroupListAction( i18n( "&Move To" ), TQString::fromLatin1( "editcut" ),
+ 0, this, TQT_SLOT( slotMoveToGroup() ), ac, "contactMove" );
+ actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), TQString::fromLatin1( "editcopy" ), 0,
+ this, TQT_SLOT( slotCopyToGroup() ), ac, "contactCopy" );
- actionRemove = KopeteStdAction::deleteContact( this, SLOT( slotRemove() ),
+ actionRemove = KopeteStdAction::deleteContact( this, TQT_SLOT( slotRemove() ),
ac, "contactRemove" );
- actionSendEmail = new KAction( i18n( "Send Email..." ), QString::fromLatin1( "mail_generic" ),
- 0, this, SLOT( slotSendEmail() ), ac, "contactSendEmail" );
+ actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ),
+ 0, this, TQT_SLOT( slotSendEmail() ), ac, "contactSendEmail" );
/* this actionRename is buggy, and useless with properties, removed in kopeteui.rc*/
actionRename = new KAction( i18n( "Rename" ), "filesaveas", 0,
- this, SLOT( slotRename() ), ac, "contactRename" );
- actionSendFile = KopeteStdAction::sendFile( this, SLOT( slotSendFile() ),
+ this, TQT_SLOT( slotRename() ), ac, "contactRename" );
+ actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( slotSendFile() ),
ac, "contactSendFile" );
actionAddContact = new KActionMenu( i18n( "&Add Contact" ),
- QString::fromLatin1( "add_user" ), ac , "contactAddContact" );
+ TQString::fromLatin1( "add_user" ), ac , "contactAddContact" );
actionAddContact->popupMenu()->insertTitle( i18n("Select Account") );
actionAddTemporaryContact = new KAction( i18n( "Add to Your Contact List" ), "add_user", 0,
- this, SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" );
+ this, TQT_SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" );
- connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotMetaContactSelected( bool ) ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotMetaContactSelected( bool ) ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered( Kopete::Account* )), SLOT(slotAddSubContactActionNewAccount(Kopete::Account*)));
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered( const Kopete::Account* )), SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered( Kopete::Account* )), TQT_SLOT(slotAddSubContactActionNewAccount(Kopete::Account*)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered( const Kopete::Account* )), TQT_SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *)));
actionProperties = new KAction( i18n( "&Properties" ), "edit_user", Qt::Key_Alt + Qt::Key_Return,
- this, SLOT( slotProperties() ), ac, "contactProperties" );
+ this, TQT_SLOT( slotProperties() ), ac, "contactProperties" );
// Update enabled/disabled actions
slotViewSelectionChanged();
@@ -516,7 +516,7 @@ KopeteContactListView::~KopeteContactListView()
void KopeteContactListView::slotAddSubContactActionNewAccount(Kopete::Account* account)
{
- KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, SLOT(slotAddContact()), account);
+ KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, TQT_SLOT(slotAddContact()), account);
m_accountAddContactMap.insert( account, action);
actionAddContact->insert( action );
}
@@ -536,14 +536,14 @@ void KopeteContactListView::slotMetaContactAdded( Kopete::MetaContact *mc )
{
d->viewStrategy->addMetaContact( mc );
- connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ),
- SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
- connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ),
- SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
- connect( mc, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ),
- SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) );
- connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
- SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) );
+ connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ),
+ TQT_SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
+ connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ),
+ TQT_SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) );
+ connect( mc, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ),
+ TQT_SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) );
+ connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
+ TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) );
}
void KopeteContactListView::slotMetaContactDeleted( Kopete::MetaContact *mc )
@@ -595,7 +595,7 @@ void KopeteContactListView::removeContact( Kopete::MetaContact *c )
void KopeteContactListView::addGroup()
{
- QString groupName =
+ TQString groupName =
KInputDialog::getText( i18n( "New Group" ),
i18n( "Please enter the name for the new group:" ) );
@@ -603,7 +603,7 @@ void KopeteContactListView::addGroup()
addGroup( groupName );
}
-void KopeteContactListView::addGroup( const QString &groupName )
+void KopeteContactListView::addGroup( const TQString &groupName )
{
d->viewStrategy->addGroup( Kopete::ContactList::self()->findGroup(groupName) );
}
@@ -613,7 +613,7 @@ void KopeteContactListView::slotGroupAdded( Kopete::Group *group )
d->viewStrategy->addGroup( group );
}
-void KopeteContactListView::slotExpanded( QListViewItem *item )
+void KopeteContactListView::slotExpanded( TQListViewItem *item )
{
KopeteGroupViewItem *groupLVI = dynamic_cast<KopeteGroupViewItem *>( item );
if ( groupLVI )
@@ -626,7 +626,7 @@ void KopeteContactListView::slotExpanded( QListViewItem *item )
delayedSort();
}
-void KopeteContactListView::slotCollapsed( QListViewItem *item )
+void KopeteContactListView::slotCollapsed( TQListViewItem *item )
{
KopeteGroupViewItem *groupLVI = dynamic_cast<KopeteGroupViewItem*>( item );
if ( groupLVI )
@@ -637,7 +637,7 @@ void KopeteContactListView::slotCollapsed( QListViewItem *item )
}
void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
- QListViewItem *item, const QPoint &point )
+ TQListViewItem *item, const TQPoint &point )
{
// FIXME: this code should be moved to the various list view item classes.
KopeteMetaContactLVI *metaLVI = dynamic_cast<KopeteMetaContactLVI *>( item );
@@ -653,7 +653,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
{
clearSelection();
//Clear selection doesn't update lists of selected contact if the item is onlt heilighted (see bug 106090)
- Kopete::ContactList::self()->setSelectedItems( QPtrList<Kopete::MetaContact>() , QPtrList<Kopete::Group>() );
+ Kopete::ContactList::self()->setSelectedItems( TQPtrList<Kopete::MetaContact>() , TQPtrList<Kopete::Group>() );
}
int nb = Kopete::ContactList::self()->selectedMetaContacts().count() +
@@ -674,11 +674,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
int py = mapFromGlobal( point ).y() - itemRect( item ).y() - (header()->isVisible() ? header()->height() : 0) ;
//kdDebug( 14000 ) << k_funcinfo << "x: " << px << ", y: " << py << endl;
- Kopete::Contact *c = metaLVI->contactForPoint( QPoint( px, py ) ) ;
+ Kopete::Contact *c = metaLVI->contactForPoint( TQPoint( px, py ) ) ;
if ( c )
{
KPopupMenu *p = c->popupMenu();
- connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) );
+ connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) );
p->popup( point );
}
else
@@ -687,11 +687,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
window->factory()->container( "contact_popup", window ) );
if ( popup )
{
- QString title = i18n( "Translators: format: '<nickname> (<online status>)'", "%1 (%2)" ).
+ TQString title = i18n( "Translators: format: '<nickname> (<online status>)'", "%1 (%2)" ).
arg( metaLVI->metaContact()->displayName(), metaLVI->metaContact()->statusString() );
if ( title.length() > 43 )
- title = title.left( 40 ) + QString::fromLatin1( "..." );
+ title = title.left( 40 ) + TQString::fromLatin1( "..." );
if ( popup->title( 0 ).isNull() )
popup->insertTitle ( title, 0, 0 );
@@ -700,7 +700,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
// Submenus for separate contact actions
bool sep = false; //FIXME: find if there is already a separator in the end - Olivier
- QPtrList<Kopete::Contact> it = metaLVI->metaContact()->contacts();
+ TQPtrList<Kopete::Contact> it = metaLVI->metaContact()->contacts();
for( Kopete::Contact *c = it.first(); c; c = it.next() )
{
if( sep )
@@ -710,13 +710,13 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
}
KPopupMenu *contactMenu = it.current()->popupMenu();
- connect( popup, SIGNAL( aboutToHide() ), contactMenu, SLOT( deleteLater() ) );
- QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString();
- QString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: '<displayName> (<id>)'", "%2 <%1>" ). arg( c->contactId(), nick );
+ connect( popup, TQT_SIGNAL( aboutToHide() ), contactMenu, TQT_SLOT( deleteLater() ) );
+ TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: '<displayName> (<id>)'", "%2 <%1>" ). arg( c->contactId(), nick );
text=text.replace("&","&&"); // cf BUG 115449
if ( text.length() > 41 )
- text = text.left( 38 ) + QString::fromLatin1( "..." );
+ text = text.left( 38 ) + TQString::fromLatin1( "..." );
popup->insertItem( c->onlineStatus().iconFor( c, 16 ), text , contactMenu );
}
@@ -731,9 +731,9 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
window->factory()->container( "group_popup", window ) );
if ( popup )
{
- QString title = groupvi->group()->displayName();
+ TQString title = groupvi->group()->displayName();
if ( title.length() > 32 )
- title = title.left( 30 ) + QString::fromLatin1( "..." );
+ title = title.left( 30 ) + TQString::fromLatin1( "..." );
if( popup->title( 0 ).isNull() )
popup->insertTitle( title, 0, 0 );
@@ -798,24 +798,24 @@ void KopeteContactListView::slotUpdateAllGroupIcons()
{
// FIXME: groups can (should?) do this for themselves
// HACK: assume all groups are top-level. works for now, until the fixme above is dealt with
- for ( QListViewItem *it = firstChild(); it; it = it->nextSibling() )
+ for ( TQListViewItem *it = firstChild(); it; it = it->nextSibling() )
if ( KopeteGroupViewItem *gpi = dynamic_cast<KopeteGroupViewItem*>( it ) )
gpi->updateIcon();
}
-void KopeteContactListView::slotExecuted( QListViewItem *item, const QPoint &p, int /* col */ )
+void KopeteContactListView::slotExecuted( TQListViewItem *item, const TQPoint &p, int /* col */ )
{
item->setSelected( false );
KopeteMetaContactLVI *metaContactLVI = dynamic_cast<KopeteMetaContactLVI *>( item );
- QPoint pos = viewport()->mapFromGlobal( p );
+ TQPoint pos = viewport()->mapFromGlobal( p );
Kopete::Contact *c = 0L;
if ( metaContactLVI )
{
// Try if we are clicking a protocol icon. If so, open a direct
// connection for that protocol
- QRect r = itemRect( item );
- QPoint relativePos( pos.x() - r.left() - ( treeStepSize() *
+ TQRect r = itemRect( item );
+ TQPoint relativePos( pos.x() - r.left() - ( treeStepSize() *
( item->depth() + ( rootIsDecorated() ? 1 : 0 ) ) +
itemMargin() ), pos.y() - r.top() );
c = metaContactLVI->contactForPoint( relativePos );
@@ -831,7 +831,7 @@ void KopeteContactListView::slotContactStatusChanged( Kopete::MetaContact *mc )
d->viewStrategy->metaContactStatusChanged( mc );
}
-void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListViewItem *after)
+void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQListViewItem *after)
{
if(!acceptDrag(e))
return;
@@ -839,9 +839,9 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie
KopeteMetaContactLVI *dest_metaLVI=dynamic_cast<KopeteMetaContactLVI*>(after);
KopeteGroupViewItem *dest_groupLVI=dynamic_cast<KopeteGroupViewItem*>(after);
- if( const_cast<const QWidget *>( e->source() ) == this )
+ if( const_cast<const TQWidget *>( e->source() ) == this )
{
- QPtrListIterator<KopeteMetaContactLVI> it( m_selectedContacts );
+ TQPtrListIterator<KopeteMetaContactLVI> it( m_selectedContacts );
while ( it.current() )
{
@@ -905,17 +905,17 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie
}
else if( e->provides("kopete/x-contact") )
{
- QString contactInfo = QString::fromUtf8( e->encodedData("kopete/x-contact") );
- QString protocolId = contactInfo.section( QChar( 0xE000 ), 0, 0 );
- QString accountId = contactInfo.section( QChar( 0xE000 ), 1, 1 );
- QString contactId = contactInfo.section( QChar( 0xE000 ), 2 );
+ TQString contactInfo = TQString::fromUtf8( e->encodedData("kopete/x-contact") );
+ TQString protocolId = contactInfo.section( TQChar( 0xE000 ), 0, 0 );
+ TQString accountId = contactInfo.section( TQChar( 0xE000 ), 1, 1 );
+ TQString contactId = contactInfo.section( TQChar( 0xE000 ), 2 );
addDraggedContactByInfo( protocolId, accountId, contactId, after );
}
else if( e->provides("text/uri-list") )
{
- if ( !QUriDrag::canDecode( e ) )
+ if ( !TQUriDrag::canDecode( e ) )
{
e->ignore();
return;
@@ -927,7 +927,7 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie
for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it )
{
KURL url = (*it);
- if( url.protocol() == QString::fromLatin1("kopetemessage") )
+ if( url.protocol() == TQString::fromLatin1("kopetemessage") )
{
//Add a contact
addDraggedContactByInfo( url.queryItem("protocolId"),
@@ -935,12 +935,12 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie
}
else if( dest_metaLVI )
{
- QPoint p = contentsToViewport(e->pos());
+ TQPoint p = contentsToViewport(e->pos());
int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) +
treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() );
int py = p.y() - itemRect( dest_metaLVI ).y();
- Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) );
+ Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) );
if( url.isLocalFile() )
{
@@ -1018,8 +1018,8 @@ void KopeteContactListView::addDraggedContactToMetaContact( Kopete::Contact *con
}
}
-void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, const QString &accountId,
- const QString &contactId, QListViewItem *after )
+void KopeteContactListView::addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId,
+ const TQString &contactId, TQListViewItem *after )
{
kdDebug(14000) << k_funcinfo << "protocolId=" << protocolId <<
", accountId=" << accountId << ", contactId=" << contactId << endl;
@@ -1027,7 +1027,7 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId,
Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId,accountId );
if( account )
{
- QDict<Kopete::Contact> contacts = account->contacts();
+ TQDict<Kopete::Contact> contacts = account->contacts();
Kopete::Contact *source_contact = contacts[ contactId ];
if( source_contact )
@@ -1061,11 +1061,11 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId,
}
}
-bool KopeteContactListView::acceptDrag(QDropEvent *e) const
+bool KopeteContactListView::acceptDrag(TQDropEvent *e) const
{
- QListViewItem *source=currentItem();
- QListViewItem *parent;
- QListViewItem *afterme;
+ TQListViewItem *source=currentItem();
+ TQListViewItem *parent;
+ TQListViewItem *afterme;
// Due to a little design problem in KListView::findDrop() we can't
// call it directly from a const method until KDE 4.0, but as the
// method is in fact const we can of course get away with a
@@ -1074,7 +1074,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
KopeteMetaContactLVI *dest_metaLVI=dynamic_cast<KopeteMetaContactLVI*>(afterme);
- if( const_cast<const QWidget *>( e->source() ) == this )
+ if( const_cast<const TQWidget *>( e->source() ) == this )
{
KopeteMetaContactLVI *source_metaLVI=dynamic_cast<KopeteMetaContactLVI*>(source);
KopeteGroupViewItem *dest_groupLVI=dynamic_cast<KopeteGroupViewItem*>(afterme);
@@ -1143,11 +1143,11 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
//we are sending a file (or dragging from the chat view)
if( dest_metaLVI )
{
- QPoint p=contentsToViewport(e->pos());
+ TQPoint p=contentsToViewport(e->pos());
int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) +
treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() );
int py = p.y() - itemRect( dest_metaLVI ).y();
- Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) ) ;
+ Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ) ;
if( c ? !c->isReachable() : !dest_metaLVI->metaContact()->isReachable() )
return false; //If the pointed contact is not reachable, abort
@@ -1160,7 +1160,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
}
}
- if ( !QUriDrag::canDecode(e) )
+ if ( !TQUriDrag::canDecode(e) )
return false;
KURL::List urlList;
@@ -1168,7 +1168,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it )
{
- if( (*it).protocol() != QString::fromLatin1("kopetemessage") && (*it).isLocalFile() )
+ if( (*it).protocol() != TQString::fromLatin1("kopetemessage") && (*it).isLocalFile() )
return false; //we can't send links if a locale file is in link
}
@@ -1181,8 +1181,8 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
}
else
{
- QString text;
- QTextDrag::decode(e, text);
+ TQString text;
+ TQTextDrag::decode(e, text);
kdDebug(14000) << k_funcinfo << "drop with mimetype:" << e->format() << " data as text:" << text << endl;
}
@@ -1191,24 +1191,24 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const
return false;
}
-void KopeteContactListView::findDrop(const QPoint &pos, QListViewItem *&parent,
- QListViewItem *&after)
+void KopeteContactListView::findDrop(const TQPoint &pos, TQListViewItem *&parent,
+ TQListViewItem *&after)
{
//Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open.
//This woraround allow us to keep the highlight of the item, and give always a correct position
parent=0L;
- QPoint p (contentsToViewport(pos));
+ TQPoint p (contentsToViewport(pos));
after=itemAt(p);
}
-void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e )
+void KopeteContactListView::contentsMousePressEvent( TQMouseEvent *e )
{
KListView::contentsMousePressEvent( e );
if (e->button() == LeftButton )
{
- QPoint p=contentsToViewport(e->pos());
- QListViewItem *i=itemAt( p );
+ TQPoint p=contentsToViewport(e->pos());
+ TQListViewItem *i=itemAt( p );
if( i )
{
//Maybe we are starting a drag?
@@ -1218,7 +1218,7 @@ void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e )
treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() );
int py = p.y() - itemRect( i ).y();
- m_startDragPos = QPoint( px , py );
+ m_startDragPos = TQPoint( px , py );
}
}
}
@@ -1233,14 +1233,14 @@ void KopeteContactListView::slotNewMessageEvent(Kopete::MessageEvent *event)
if(!m)
return;
- for ( QListViewItem *item = firstChild(); item; item = nextItem(item) )
+ for ( TQListViewItem *item = firstChild(); item; item = nextItem(item) )
if ( KopeteMetaContactLVI *li = dynamic_cast<KopeteMetaContactLVI*>(item) )
if ( li->metaContact() == m )
li->catchEvent(event);
}
}
-QDragObject *KopeteContactListView::dragObject()
+TQDragObject *KopeteContactListView::dragObject()
{
// Discover what the drag started on.
// If it's a MetaContactLVI, it was either on the MCLVI itself
@@ -1249,7 +1249,7 @@ QDragObject *KopeteContactListView::dragObject()
// we set the pixmap for the drag to the MC's pixmap
// or the child contact's small icon
- QListViewItem *currentLVI = currentItem();
+ TQListViewItem *currentLVI = currentItem();
if( !currentLVI )
return 0L;
@@ -1257,19 +1257,19 @@ QDragObject *KopeteContactListView::dragObject()
if( !metaLVI )
return 0L;
- QPixmap pm;
+ TQPixmap pm;
Kopete::Contact *c = metaLVI->contactForPoint( m_startDragPos );
KMultipleDrag *drag = new KMultipleDrag( this );
- drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) );
+ drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) );
- QStoredDrag *d = new QStoredDrag("kopete/x-metacontact", 0L );
+ TQStoredDrag *d = new TQStoredDrag("kopete/x-metacontact", 0L );
d->setEncodedData( metaLVI->metaContact()->metaContactId().utf8() );
drag->addDragObject( d );
if ( c ) // dragging a contact
{
- QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L );
- d->setEncodedData( QString( c->protocol()->pluginId() +QChar( 0xE000 )+ c->account()->accountId() +QChar( 0xE000 )+ c->contactId() ).utf8() );
+ TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L );
+ d->setEncodedData( TQString( c->protocol()->pluginId() +TQChar( 0xE000 )+ c->account()->accountId() +TQChar( 0xE000 )+ c->contactId() ).utf8() );
drag->addDragObject( d );
pm = c->onlineStatus().iconFor( c, 12 ); // FIXME: fixed icon scaling
@@ -1278,7 +1278,7 @@ QDragObject *KopeteContactListView::dragObject()
{
// FIXME: first start at rendering the whole MC incl small icons
// into a pixmap to drag - anyone know how to complete this?
- //QPainter p( pm );
+ //TQPainter p( pm );
//source_metaLVI->paintCell( p, cg?, width(), 0, 0 );
pm = SmallIcon( metaLVI->metaContact()->statusIcon() );
}
@@ -1289,35 +1289,35 @@ QDragObject *KopeteContactListView::dragObject()
if( !address.isEmpty() )
{
- drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) );
+ drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) );
KABC::VCardConverter converter;
- QString vcard = converter.createVCard( address );
+ TQString vcard = converter.createVCard( address );
if( !vcard.isNull() )
{
- QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L );
+ TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L );
vcardDrag->setEncodedData( vcard.utf8() );
drag->addDragObject( vcardDrag );
}
}
- //QSize s = pm.size();
- drag->setPixmap( pm /*, QPoint( s.width() , s.height() )*/ );
+ //TQSize s = pm.size();
+ drag->setPixmap( pm /*, TQPoint( s.width() , s.height() )*/ );
return drag;
}
void KopeteContactListView::slotViewSelectionChanged()
{
- QPtrList<Kopete::MetaContact> contacts;
- QPtrList<Kopete::Group> groups;
+ TQPtrList<Kopete::MetaContact> contacts;
+ TQPtrList<Kopete::Group> groups;
m_selectedContacts.clear();
m_selectedGroups.clear();
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() )
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
++it;
if ( item->isSelected() )
@@ -1346,8 +1346,8 @@ void KopeteContactListView::slotViewSelectionChanged()
void KopeteContactListView::slotListSelectionChanged()
{
- QPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
- QPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
+ TQPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
//TODO: update the list to select the items that should be selected.
// make sure slotViewSelectionChanged is *not* called.
@@ -1355,13 +1355,13 @@ void KopeteContactListView::slotListSelectionChanged()
}
void KopeteContactListView::updateActionsForSelection(
- QPtrList<Kopete::MetaContact> contacts, QPtrList<Kopete::Group> groups )
+ TQPtrList<Kopete::MetaContact> contacts, TQPtrList<Kopete::Group> groups )
{
bool singleContactSelected = groups.isEmpty() && contacts.count() == 1;
bool inkabc=false;
if(singleContactSelected)
{
- QString kabcid=contacts.first()->metaContactId();
+ TQString kabcid=contacts.first()->metaContactId();
inkabc= !kabcid.isEmpty() && !kabcid.contains(":");
}
@@ -1439,11 +1439,11 @@ void KopeteContactListView::slotSendFile()
KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( m->metaContactId() );
if ( !addressee.isEmpty() )
{
- QString emailAddr = addressee.fullEmail();
+ TQString emailAddr = addressee.fullEmail();
kdDebug( 14000 ) << "Email: " << emailAddr << "!" << endl;
if ( !emailAddr.isEmpty() )
- kapp->invokeMailer( emailAddr, QString::null );
+ kapp->invokeMailer( emailAddr, TQString::null );
else
KMessageBox::queuedMessageBox( this, KMessageBox::Sorry, i18n( "There is no email address set for this contact in the KDE address book." ), i18n( "No Email Address in Address Book" ) );
}
@@ -1529,13 +1529,13 @@ void KopeteContactListView::slotCopyToGroup()
void KopeteContactListView::slotRemove()
{
- QPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
- QPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
+ TQPtrList<Kopete::MetaContact> contacts = Kopete::ContactList::self()->selectedMetaContacts();
+ TQPtrList<Kopete::Group> groups = Kopete::ContactList::self()->selectedGroups();
if(groups.count() + contacts.count() == 0)
return;
- QStringList items;
+ TQStringList items;
for( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
if(!it->displayName().isEmpty())
@@ -1550,7 +1550,7 @@ void KopeteContactListView::slotRemove()
if( items.count() <= 1 )
{
// we are deleting an empty contact
- QString msg;
+ TQString msg;
if( !contacts.isEmpty() )
{
msg = i18n( "<qt>Are you sure you want to remove the contact <b>%1</b>" \
@@ -1575,7 +1575,7 @@ void KopeteContactListView::slotRemove()
}
else
{
- QString msg = groups.isEmpty() ?
+ TQString msg = groups.isEmpty() ?
i18n( "Are you sure you want to remove these contacts " \
"from your contact list?" ) :
i18n( "Are you sure you want to remove these groups and " \
@@ -1598,10 +1598,10 @@ void KopeteContactListView::slotRemove()
else
{
//try to guess from what group we are removing that contact.
- QListViewItemIterator lvi_it( this );
+ TQListViewItemIterator lvi_it( this );
while ( lvi_it.current() )
{
- QListViewItem *item = lvi_it.current();
+ TQListViewItem *item = lvi_it.current();
++lvi_it;
if ( item->isSelected() )
@@ -1630,7 +1630,7 @@ void KopeteContactListView::slotRemove()
for( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
- QPtrList<Kopete::MetaContact> list = it->members();
+ TQPtrList<Kopete::MetaContact> list = it->members();
for( list.first(); list.current(); list.next() )
{
Kopete::MetaContact *mc = list.current();
@@ -1700,7 +1700,7 @@ void KopeteContactListView::slotAddContact()
else
{
addDialog->setMainWidget( addContactPage );
- if( addDialog->exec() == QDialog::Accepted )
+ if( addDialog->exec() == TQDialog::Accepted )
{
if( addContactPage->validateData() )
{
@@ -1786,7 +1786,7 @@ void KopeteContactListView::slotProperties()
}
}
-void KopeteContactListView::slotItemRenamed( QListViewItem */*item*/ )
+void KopeteContactListView::slotItemRenamed( TQListViewItem */*item*/ )
{
//everithing is now done in KopeteMetaContactLVI::rename
@@ -1867,7 +1867,7 @@ void KopeteContactListView::slotUndo()
if( m )
{
// make a copy
- QStringList undoArgs = m_undo->args;
+ TQStringList undoArgs = m_undo->args;
Kopete::MetaContact::PropertySource undoSource = m_undo->nameSource;
// set undo undo
// set the source first
@@ -1915,7 +1915,7 @@ void KopeteContactListView::slotUndo()
{
if( m_undo->group )
{
- const QString old=m_undo->group->displayName();
+ const TQString old=m_undo->group->displayName();
m_undo->group->setDisplayName( m_undo->args[0] );
m_undo->args[0]=old;
success=true;
@@ -2027,10 +2027,10 @@ void KopeteContactListView::slotRedo()
Kopete::MetaContact *m=m_redo->metacontact;
if( m )
{
- const QString old=m->displayName();
+ const TQString old=m->displayName();
if( m_redo->args[1].isEmpty() )
{
- const QString name = m_redo->args[0];
+ const TQString name = m_redo->args[0];
m_redo->args[0] = m->displayNameSource()->contactId();
m_redo->args[1] = m->displayNameSource()->protocol()->pluginId();
m_redo->args[2] = m->displayNameSource()->account()->accountId();
@@ -2038,9 +2038,9 @@ void KopeteContactListView::slotRedo()
}
else
{
- const QString oldName = m->displayName();
- QPtrList< Kopete::Contact > cList = m->contacts();
- QPtrListIterator< Kopete::Contact > it (cList);
+ const TQString oldName = m->displayName();
+ TQPtrList< Kopete::Contact > cList = m->contacts();
+ TQPtrListIterator< Kopete::Contact > it (cList);
Kopete::Contact *c = Kopete::ContactList::self()->findContact( args[0], args[2], args[1]);
if ( !c)
return;
@@ -2060,7 +2060,7 @@ void KopeteContactListView::slotRedo()
{
if( m_redo->group )
{
- const QString old=m_redo->group->displayName();
+ const TQString old=m_redo->group->displayName();
m_redo->group->setDisplayName( m_redo->args[0] );
m_redo->args[0]=old;
success=true;
diff --git a/kopete/kopete/contactlist/kopetecontactlistview.h b/kopete/kopete/contactlist/kopetecontactlistview.h
index 43c60ebe..4c5a8d37 100644
--- a/kopete/kopete/contactlist/kopetecontactlistview.h
+++ b/kopete/kopete/contactlist/kopetecontactlistview.h
@@ -27,12 +27,12 @@
#include "kopetelistview.h"
#include "kopetemetacontact.h"
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
class KopeteMetaContactLVI;
class KopeteGroupViewItem;
@@ -61,7 +61,7 @@ class KopeteContactListView : public Kopete::UI::ListView::ListView
Q_OBJECT
public:
- KopeteContactListView( QWidget *parent = 0, const char *name = 0 );
+ KopeteContactListView( TQWidget *parent = 0, const char *name = 0 );
~KopeteContactListView();
/**
@@ -72,7 +72,7 @@ public:
/**
* Add a given group name and return it
*/
- void addGroup( const QString &groupName );
+ void addGroup( const TQString &groupName );
/**
* Are we displaying as a tree view (true), or in a flat list (false)?
@@ -92,26 +92,26 @@ public slots:
void addGroup();
protected:
- virtual void contentsMousePressEvent( QMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
- virtual bool acceptDrag(QDropEvent *e) const;
+ virtual bool acceptDrag(TQDropEvent *e) const;
/**
* Start a drag operation
- * @return a KMultipleDrag containing: 1) A QStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a QTextDrag containing their email address, and ii) their vCard representation.
+ * @return a KMultipleDrag containing: 1) A TQStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a TQTextDrag containing their email address, and ii) their vCard representation.
*/
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
/**
* Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open.
* This woraround allow us to keep the highlight of the item, and give always a correct position
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
* The selected items have changed; update our actions to show what's possible.
*/
- void updateActionsForSelection( QPtrList<Kopete::MetaContact> contacts, QPtrList<Kopete::Group> groups );
+ void updateActionsForSelection( TQPtrList<Kopete::MetaContact> contacts, TQPtrList<Kopete::Group> groups );
private slots:
/**
@@ -126,13 +126,13 @@ private slots:
void slotViewSelectionChanged();
void slotListSelectionChanged();
- void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point );
- void slotExpanded( QListViewItem *item );
- void slotCollapsed( QListViewItem *item );
+ void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point );
+ void slotExpanded( TQListViewItem *item );
+ void slotCollapsed( TQListViewItem *item );
void slotSettingsChanged( void );
void slotUpdateAllGroupIcons();
- void slotExecuted( QListViewItem *item, const QPoint &pos, int c );
+ void slotExecuted( TQListViewItem *item, const TQPoint &pos, int c );
void slotAddedToGroup( Kopete::MetaContact *mc, Kopete::Group *to );
void slotRemovedFromGroup( Kopete::MetaContact *mc, Kopete::Group *from );
@@ -149,7 +149,7 @@ private slots:
void slotContactStatusChanged( Kopete::MetaContact *mc );
- void slotDropped(QDropEvent *e, QListViewItem *parent, QListViewItem*);
+ void slotDropped(TQDropEvent *e, TQListViewItem *parent, TQListViewItem*);
void slotShowAddContactDialog();
void slotNewMessageEvent(Kopete::MessageEvent *);
@@ -157,7 +157,7 @@ private slots:
/**
* Handle renamed items by renaming the meta contact
*/
- void slotItemRenamed( QListViewItem *item );
+ void slotItemRenamed( TQListViewItem *item );
/** Actions related slots **/
void slotSendMessage();
@@ -180,15 +180,15 @@ private:
bool mShowAsTree;
// TODO: do we really need to store these?
- QPtrList<KopeteMetaContactLVI> m_selectedContacts;
- QPtrList<KopeteGroupViewItem> m_selectedGroups;
+ TQPtrList<KopeteMetaContactLVI> m_selectedContacts;
+ TQPtrList<KopeteGroupViewItem> m_selectedGroups;
bool mSortByGroup;
KRootPixmap *root;
- QRect m_onItem;
+ TQRect m_onItem;
- QPoint m_startDragPos;
+ TQPoint m_startDragPos;
/* ACTIONS */
KAction *actionSendMessage;
@@ -209,29 +209,29 @@ private:
void moveDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *from, Kopete::Group *to );
void addDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *group );
void addDraggedContactToMetaContact( Kopete::Contact *contact, Kopete::MetaContact *parent );
- void addDraggedContactByInfo( const QString &protocolId, const QString &accountId,
- const QString &contactId, QListViewItem *after );
+ void addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId,
+ const TQString &contactId, TQListViewItem *after );
public:
struct UndoItem;
UndoItem *m_undo;
UndoItem *m_redo;
void insertUndoItem(UndoItem *u);
- QTimer undoTimer;
+ TQTimer undoTimer;
public:
// This is public so the chatwinodw can handle sub actions
// FIXME: do we not believe in accessor functions any more?
KActionMenu *actionAddContact;
- QMap<const Kopete::Account *, KAction *> m_accountAddContactMap;
+ TQMap<const Kopete::Account *, KAction *> m_accountAddContactMap;
};
struct KopeteContactListView::UndoItem
{
enum Type { MetaContactAdd, MetaContactRemove , MetaContactCopy , MetaContactRename, MetaContactChange, ContactAdd, GroupRename } type;
- QStringList args;
- QGuardedPtr<Kopete::MetaContact> metacontact;
- QGuardedPtr<Kopete::Group> group;
+ TQStringList args;
+ TQGuardedPtr<Kopete::MetaContact> metacontact;
+ TQGuardedPtr<Kopete::Group> group;
UndoItem *next;
bool isStep;
Kopete::MetaContact::PropertySource nameSource;
diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.cpp b/kopete/kopete/contactlist/kopetegrouplistaction.cpp
index 1556f9b6..802df117 100644
--- a/kopete/kopete/contactlist/kopetegrouplistaction.cpp
+++ b/kopete/kopete/contactlist/kopetegrouplistaction.cpp
@@ -29,15 +29,15 @@
#include "kopetecontactlist.h"
#include "kopetegroup.h"
-KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const KShortcut &cut, const QObject *receiver,
- const char *slot, QObject *parent, const char *name )
+KopeteGroupListAction::KopeteGroupListAction( const TQString &text, const TQString &pix, const KShortcut &cut, const TQObject *receiver,
+ const char *slot, TQObject *parent, const char *name )
: KListAction( text, pix, cut, parent, name )
{
- connect( this, SIGNAL( activated() ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated() ), receiver, slot );
- connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) );
- connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) );
- connect( Kopete::ContactList::self(), SIGNAL( groupRenamed(Kopete::Group*, const QString& ) ), this, SLOT( slotUpdateList() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed(Kopete::Group*, const TQString& ) ), this, TQT_SLOT( slotUpdateList() ) );
slotUpdateList();
}
@@ -47,10 +47,10 @@ KopeteGroupListAction::~KopeteGroupListAction()
void KopeteGroupListAction::slotUpdateList()
{
- QStringList groupList;
+ TQStringList groupList;
// Add groups to our list
- QPtrList<Kopete::Group> groups = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groups = Kopete::ContactList::self()->groups();
for ( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
if(it->type() == Kopete::Group::Normal)
@@ -58,7 +58,7 @@ void KopeteGroupListAction::slotUpdateList()
}
groupList.sort();
- groupList.prepend(QString::null); //add a separator;
+ groupList.prepend(TQString::null); //add a separator;
groupList.prepend( i18n("Top Level") ); //the top-level group, with the id 0
setItems( groupList );
}
diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.h b/kopete/kopete/contactlist/kopetegrouplistaction.h
index 3576f3ed..2b852632 100644
--- a/kopete/kopete/contactlist/kopetegrouplistaction.h
+++ b/kopete/kopete/contactlist/kopetegrouplistaction.h
@@ -31,14 +31,14 @@ class KopeteGroupListAction : public KListAction
Q_OBJECT
public:
- KopeteGroupListAction( const QString &, const QString &, const KShortcut &,
- const QObject *, const char *, QObject *, const char * );
+ KopeteGroupListAction( const TQString &, const TQString &, const KShortcut &,
+ const TQObject *, const char *, TQObject *, const char * );
~KopeteGroupListAction();
protected slots:
void slotUpdateList();
private:
- QStringList m_groupList;
+ TQStringList m_groupList;
};
#endif
diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.cpp b/kopete/kopete/contactlist/kopetegroupviewitem.cpp
index 21b1cf79..6b65b0ef 100644
--- a/kopete/kopete/contactlist/kopetegroupviewitem.cpp
+++ b/kopete/kopete/contactlist/kopetegroupviewitem.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -55,7 +55,7 @@ public:
: group( gp )
{
}
- QString operator()( ComponentBase *, const QPoint &, QRect & )
+ TQString operator()( ComponentBase *, const TQPoint &, TQRect & )
{
return group->toolTip();
}
@@ -67,14 +67,14 @@ private:
} // END namespace UI
} // END namespace Kopete
-KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListView *parent, const char *name )
+KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListView *parent, const char *name )
: Kopete::UI::ListView::Item( parent, group_, name )
{
m_group = group_;
initLVI();
}
-KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListViewItem *parent, const char *name )
+KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListViewItem *parent, const char *name )
: Kopete::UI::ListView::Item( parent, group_, name )
{
m_group = group_;
@@ -102,14 +102,14 @@ void KopeteGroupViewItem::initLVI()
d->name->setToolTipSource( d->toolTipSource.get() );
d->count->setToolTipSource( d->toolTipSource.get() );
- connect( m_group, SIGNAL( displayNameChanged( Kopete::Group*, const QString& ) ),
- this, SLOT( refreshDisplayName() ) );
+ connect( m_group, TQT_SIGNAL( displayNameChanged( Kopete::Group*, const TQString& ) ),
+ this, TQT_SLOT( refreshDisplayName() ) );
- connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ),
- SLOT( slotConfigChanged() ) );
- connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ),
+ TQT_SLOT( slotConfigChanged() ) );
+ connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) );
- connect( m_group, SIGNAL( iconAppearanceChanged() ), SLOT( updateIcon() ) );
+ connect( m_group, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( updateIcon() ) );
refreshDisplayName();
slotConfigChanged();
@@ -120,7 +120,7 @@ Kopete::Group* KopeteGroupViewItem::group() const
return m_group;
}
-QString KopeteGroupViewItem::toolTip() const
+TQString KopeteGroupViewItem::toolTip() const
{
// TODO: add icon, and some more information than that which
// is already displayed in the list view item
@@ -136,7 +136,7 @@ void KopeteGroupViewItem::slotConfigChanged()
d->name->setColor( KopetePrefs::prefs()->contactListGroupNameColor() );
- QFont font = listView()->font();
+ TQFont font = listView()->font();
if ( KopetePrefs::prefs()->contactListUseCustomFonts() )
font = KopetePrefs::prefs()->contactListCustomNormalFont();
d->name->setFont( font );
@@ -149,7 +149,7 @@ void KopeteGroupViewItem::refreshDisplayName()
totalMemberCount = 0;
onlineMemberCount = 0;
- for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() )
+ for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() )
{
if ( KopeteMetaContactLVI *kc = dynamic_cast<KopeteMetaContactLVI*>( lvi ) )
{
@@ -161,7 +161,7 @@ void KopeteGroupViewItem::refreshDisplayName()
d->name->setText( m_group->displayName() );
d->count->setText( i18n( "(NUMBER OF ONLINE CONTACTS/NUMBER OF CONTACTS IN GROUP)", "(%1/%2)" )
- .arg( QString::number( onlineMemberCount ), QString::number( totalMemberCount ) ) );
+ .arg( TQString::number( onlineMemberCount ), TQString::number( totalMemberCount ) ) );
updateVisibility();
@@ -175,7 +175,7 @@ void KopeteGroupViewItem::refreshDisplayName()
listView()->sort();
}
-QString KopeteGroupViewItem::key( int, bool ) const
+TQString KopeteGroupViewItem::key( int, bool ) const
{
//Groups are placed after topLevel contact.
//Exepted Temporary group which is the first group
@@ -223,7 +223,7 @@ void KopeteGroupViewItem::updateVisibility()
// When calling setVisible(true) EVERY child item will be shown,
// even if they should be hidden.
// We just re-update the visibility of all child items
- for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() )
+ for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() )
{
if ( KopeteMetaContactLVI *kmc = dynamic_cast<KopeteMetaContactLVI *>( lvi ) )
kmc->updateVisibility();
@@ -255,7 +255,7 @@ void KopeteGroupViewItem::updateIcon()
}
}
-QString KopeteGroupViewItem::text( int column ) const
+TQString KopeteGroupViewItem::text( int column ) const
{
if ( column == 0 )
return d->name->text();
@@ -263,7 +263,7 @@ QString KopeteGroupViewItem::text( int column ) const
return KListViewItem::text( column );
}
-void KopeteGroupViewItem::setText( int column, const QString &text )
+void KopeteGroupViewItem::setText( int column, const TQString &text )
{
if ( column == 0 )
{
diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.h b/kopete/kopete/contactlist/kopetegroupviewitem.h
index 777ea2e8..8891f992 100644
--- a/kopete/kopete/contactlist/kopetegroupviewitem.h
+++ b/kopete/kopete/contactlist/kopetegroupviewitem.h
@@ -19,7 +19,7 @@
#define KOPETEGROUPVIEWITEM_H
#include "kopetelistviewitem.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
#define KOPETE_GROUP_DEFAULT_OPEN_ICON "folder_open"
#define KOPETE_GROUP_DEFAULT_CLOSED_ICON "folder"
@@ -36,8 +36,8 @@ class KopeteGroupViewItem : public Kopete::UI::ListView::Item
{
Q_OBJECT
public:
- KopeteGroupViewItem( Kopete::Group *group , QListView *parent, const char *name = 0 );
- KopeteGroupViewItem( Kopete::Group *group , QListViewItem *parent, const char *name = 0 );
+ KopeteGroupViewItem( Kopete::Group *group , TQListView *parent, const char *name = 0 );
+ KopeteGroupViewItem( Kopete::Group *group , TQListViewItem *parent, const char *name = 0 );
~KopeteGroupViewItem();
Kopete::Group * group() const;
@@ -47,10 +47,10 @@ public:
/**
* reimplemented from KListViewItem to take into account our alternate text storage
*/
- virtual QString text( int column ) const;
- virtual void setText( int column, const QString &text );
+ virtual TQString text( int column ) const;
+ virtual void setText( int column, const TQString &text );
- QString toolTip() const;
+ TQString toolTip() const;
public slots:
void refreshDisplayName();
@@ -65,9 +65,9 @@ private:
void initLVI();
Kopete::Group *m_group;
- QPixmap open, closed;
+ TQPixmap open, closed;
- QString key( int column, bool ascending ) const;
+ TQString key( int column, bool ascending ) const;
unsigned int onlineMemberCount;
unsigned int totalMemberCount;
diff --git a/kopete/kopete/contactlist/kopetelviprops.cpp b/kopete/kopete/contactlist/kopetelviprops.cpp
index bf5431bf..1867dea5 100644
--- a/kopete/kopete/contactlist/kopetelviprops.cpp
+++ b/kopete/kopete/contactlist/kopetelviprops.cpp
@@ -23,14 +23,14 @@
#include <kdebug.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
#include <kfiledialog.h>
@@ -65,7 +65,7 @@ const char MC_AW[] = "metacontact_away";
const char MC_UNK[] = "metacontact_unknown";
-KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name)
+KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Properties of Group %1").arg(gvi->group()->displayName()), Ok|Cancel, Ok, false)
{
mainWidget = new KopeteGVIPropsWidget(this, "mainWidget");
@@ -83,22 +83,22 @@ KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const
mainWidget->chkUseCustomIcons->setChecked( item->group()->useCustomIcon() );
- QString openName = item->group()->icon( Kopete::ContactListElement::Open );
+ TQString openName = item->group()->icon( Kopete::ContactListElement::Open );
if(openName.isEmpty())
openName = KOPETE_GROUP_DEFAULT_OPEN_ICON;
- QString closeName = item->group()->icon( Kopete::ContactListElement::Closed );
+ TQString closeName = item->group()->icon( Kopete::ContactListElement::Closed );
if(closeName.isEmpty())
closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON;
mainWidget->icnbOpen->setIcon( openName );
mainWidget->icnbClosed->setIcon( closeName );
- connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) );
- connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUseCustomIconsToggled( bool ) ) );
- connect( mainWidget->icnbOpen, SIGNAL( iconChanged( QString ) ),
- SLOT( slotIconChanged() ) );
- connect( mainWidget->icnbClosed, SIGNAL( iconChanged( QString ) ),
- SLOT( slotIconChanged() ) );
+ connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) );
+ connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) );
+ connect( mainWidget->icnbOpen, TQT_SIGNAL( iconChanged( TQString ) ),
+ TQT_SLOT( slotIconChanged() ) );
+ connect( mainWidget->icnbClosed, TQT_SIGNAL( iconChanged( TQString ) ),
+ TQT_SLOT( slotIconChanged() ) );
slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() );
}
@@ -145,7 +145,7 @@ void KopeteGVIProps::slotIconChanged()
// =============================================================================
-KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *parent, const char *name)
+KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Properties of Meta Contact %1").arg(lvi->metaContact()->displayName()), Ok|Cancel, Ok, false)
{
m_countPhotoCapable = 0;
@@ -158,10 +158,10 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
mNotificationProps = new CustomNotificationProps( this, lvi->metaContact() );
// add a button to the notification props to get the sound from KABC
// the widget's vert box layout, horiz box layout containing button, spacer, followed by a spacer
- QBoxLayout * vb = static_cast<QVBoxLayout*>( mNotificationProps->widget()->layout() );
+ TQBoxLayout * vb = static_cast<TQVBoxLayout*>( mNotificationProps->widget()->layout() );
- QHBoxLayout* hb = new QHBoxLayout( vb, -1, "soundFromKABClayout" );
- mFromKABC = new QPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" );
+ TQHBoxLayout* hb = new TQHBoxLayout( vb, -1, "soundFromKABClayout" );
+ mFromKABC = new TQPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" );
hb->addWidget( mFromKABC ); // [ [Button] <-xxxxx-> ]
hb->addStretch();
vb->addStretch(); // vert spacer keeps the rest snug
@@ -170,36 +170,36 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
setMainWidget( mainWidget );
item = lvi;
- connect( mainWidget->radioNameKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioNameContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioNameCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->cmbPhotoUrl, SIGNAL(urlSelected(const QString &)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->cmbAccountPhoto, SIGNAL(activated ( int )), SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->cmbPhotoUrl, TQT_SIGNAL(urlSelected(const TQString &)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->cmbAccountPhoto, TQT_SIGNAL(activated ( int )), TQT_SLOT(slotEnableAndDisableWidgets()));
- mainWidget->btnClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
- connect( mainWidget->btnClearPhoto, SIGNAL( clicked() ), this, SLOT( slotClearPhotoClicked() ) );
- connect( mainWidget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee & ) ), SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) );
+ mainWidget->btnClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
+ connect( mainWidget->btnClearPhoto, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearPhotoClicked() ) );
+ connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) );
mainWidget->chkUseCustomIcons->setChecked( item->metaContact()->useCustomIcon() );
- QString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline );
+ TQString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline );
if(offlineName.isEmpty())
- offlineName = QString::fromLatin1(MC_OFF); // Default
+ offlineName = TQString::fromLatin1(MC_OFF); // Default
- QString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online );
+ TQString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online );
if(onlineName.isEmpty())
- onlineName = QString::fromLatin1(MC_ON); // Default
+ onlineName = TQString::fromLatin1(MC_ON); // Default
- QString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away );
+ TQString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away );
if(awayName.isEmpty())
- awayName = QString::fromLatin1(MC_AW); // Default
+ awayName = TQString::fromLatin1(MC_AW); // Default
- QString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown );
+ TQString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown );
if(unknownName.isEmpty())
- unknownName = QString::fromLatin1(MC_UNK); // Default
+ unknownName = TQString::fromLatin1(MC_UNK); // Default
mainWidget->icnbOffline->setIcon( offlineName );
mainWidget->icnbOnline->setIcon( onlineName );
@@ -232,17 +232,17 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
slotLoadNameSources();
slotLoadPhotoSources();
- connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) );
- connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUseCustomIconsToggled( bool ) ) );
- connect( mainWidget->btnImportKABC, SIGNAL( clicked() ),
- this, SLOT( slotImportClicked() ) );
- connect( mainWidget->btnExportKABC, SIGNAL( clicked() ),
- this, SLOT( slotExportClicked() ) );
- connect( mFromKABC, SIGNAL( clicked() ),
- this, SLOT( slotFromKABCClicked() ) );
- connect( mNotificationProps->widget()->customSound, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( slotOpenSoundDialog( KURLRequester * )));
+ connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) );
+ connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) );
+ connect( mainWidget->btnImportKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotImportClicked() ) );
+ connect( mainWidget->btnExportKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotExportClicked() ) );
+ connect( mFromKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotFromKABCClicked() ) );
+ connect( mNotificationProps->widget()->customSound, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( slotOpenSoundDialog( KURLRequester * )));
slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() );
slotEnableAndDisableWidgets();
@@ -256,13 +256,13 @@ KopeteMetaLVIProps::~KopeteMetaLVIProps()
void KopeteMetaLVIProps::slotLoadNameSources()
{
Kopete::Contact* trackingName = item->metaContact()->displayNameSourceContact();
- QPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
- QPtrListIterator<Kopete::Contact> it( cList );
+ TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
+ TQPtrListIterator<Kopete::Contact> it( cList );
mainWidget->cmbAccountName->clear();
for( ; it.current(); ++it )
{
- QString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">";
- QPixmap acctIcon = it.current()->account()->accountIcon();
+ TQString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">";
+ TQPixmap acctIcon = it.current()->account()->accountIcon();
mainWidget->cmbAccountName->insertItem( acctIcon, acct );
// Select this item if it's the one we're tracking.
@@ -285,18 +285,18 @@ void KopeteMetaLVIProps::slotLoadNameSources()
void KopeteMetaLVIProps::slotLoadPhotoSources()
{
// fill photo contact sources
- QPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
+ TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
m_withPhotoContacts.clear();
Kopete::Contact* trackingPhoto = item->metaContact()->photoSourceContact();
mainWidget->cmbAccountPhoto->clear();
- QPtrListIterator<Kopete::Contact> itp( cList );
+ TQPtrListIterator<Kopete::Contact> itp( cList );
for( ; itp.current(); ++itp )
{
Kopete::Contact *citem = itp.current();
if ( citem->hasProperty( Kopete::Global::Properties::self()->photo().key() ) )
{
- QString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">";
- QPixmap acctIcon = citem->account()->accountIcon();
+ TQString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">";
+ TQPixmap acctIcon = citem->account()->accountIcon();
mainWidget->cmbAccountPhoto->insertItem( acctIcon, acct );
// Select this item if it's the one we're tracking.
@@ -358,7 +358,7 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets()
mainWidget->cmbAccountPhoto->setEnabled(false);
}
- QImage photo;
+ TQImage photo;
switch ( selectedPhotoSource() )
{
case Kopete::MetaContact::SourceKABC:
@@ -368,13 +368,13 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets()
photo = Kopete::photoFromContact(selectedPhotoSourceContact());
break;
case Kopete::MetaContact::SourceCustom:
- photo = QImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url()));
+ photo = TQImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url()));
break;
}
if( !photo.isNull() )
- mainWidget->photoLabel->setPixmap(QPixmap(photo.smoothScale( 64, 92, QImage::ScaleMin )));
+ mainWidget->photoLabel->setPixmap(TQPixmap(photo.smoothScale( 64, 92, TQImage::ScaleMin )));
else
- mainWidget->photoLabel->setPixmap( QPixmap() );
+ mainWidget->photoLabel->setPixmap( TQPixmap() );
}
Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() const
@@ -489,7 +489,7 @@ void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a )
{
mainWidget->btnExportKABC->setEnabled( false );
mainWidget->btnImportKABC->setEnabled( false );
- mAddressBookUid = QString::null;
+ mAddressBookUid = TQString::null;
mainWidget->radioNameContact->setChecked( true );
mainWidget->radioPhotoContact->setChecked( true );
}
@@ -501,7 +501,7 @@ void KopeteMetaLVIProps::slotExportClicked()
item->metaContact()->setMetaContactId( mAddressBookUid );
delete mExport;
mExport = new KopeteAddressBookExport( this, item->metaContact() );
- if ( mExport->showDialog() == QDialog::Accepted )
+ if ( mExport->showDialog() == TQDialog::Accepted )
mExport->exportData();
}
@@ -523,26 +523,26 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KURLRequester *requester )
{
// taken from kdelibs/kio/kfile/knotifydialog.cpp
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( slotOpenSoundDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( slotOpenSoundDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
//fileDialog->setCaption( i18n("Select Sound File") );
- QStringList filters;
+ TQStringList filters;
filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg"
<< "audio/x-adpcm";
fileDialog->setMimeFilter( filters );
// find the first "sound"-resource that contains files
- QStringList soundDirs =
+ TQStringList soundDirs =
KGlobal::dirs()->findDirs("data", "kopete/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL soundURL;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -560,7 +560,7 @@ void KopeteMetaLVIProps::slotClearPhotoClicked()
#if KDE_IS_VERSION(3,4,0)
mainWidget->cmbPhotoUrl->setKURL( KURL() );
#else
- mainWidget->cmbPhotoUrl->setURL( QString::null );
+ mainWidget->cmbPhotoUrl->setURL( TQString::null );
#endif
item->metaContact()->setPhoto( KURL() );
diff --git a/kopete/kopete/contactlist/kopetelviprops.h b/kopete/kopete/contactlist/kopetelviprops.h
index 9a2ebf34..de28e4b5 100644
--- a/kopete/kopete/contactlist/kopetelviprops.h
+++ b/kopete/kopete/contactlist/kopetelviprops.h
@@ -45,7 +45,7 @@ class KopeteGVIProps: public KDialogBase
Q_OBJECT
public:
- KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name=0L);
+ KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name=0L);
~KopeteGVIProps();
private:
@@ -66,20 +66,20 @@ class KopeteMetaLVIProps: public KDialogBase
Q_OBJECT
public:
- KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, QWidget *parent, const char *name=0L);
+ KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, TQWidget *parent, const char *name=0L);
~KopeteMetaLVIProps();
private:
CustomNotificationProps * mNotificationProps;
- QPushButton *mFromKABC;
+ TQPushButton *mFromKABC;
KopeteMetaLVIPropsWidget *mainWidget;
AddressBookLinkWidget *linkWidget;
KopeteMetaContactLVI *item;
KopeteAddressBookExport *mExport;
KABC::Sound mSound;
int m_countPhotoCapable;
- QMap<int, Kopete::Contact *> m_withPhotoContacts;
- QString mAddressBookUid; // the currently selected addressbook UID
+ TQMap<int, Kopete::Contact *> m_withPhotoContacts;
+ TQString mAddressBookUid; // the currently selected addressbook UID
Kopete::MetaContact::PropertySource selectedNameSource() const;
Kopete::MetaContact::PropertySource selectedPhotoSource() const;
diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
index 86dc4b40..b336a6cd 100644
--- a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
+++ b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp
@@ -18,11 +18,11 @@
*************************************************************************
*/
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qvariant.h>
-#include <qmime.h>
-#include <qstylesheet.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqvariant.h>
+#include <tqmime.h>
+#include <tqstylesheet.h>
#include "knotification.h"
#include <kdebug.h>
@@ -78,27 +78,27 @@ public:
: metaContact( mc )
{
}
- QString operator()( ComponentBase *, const QPoint &, QRect & )
+ TQString operator()( ComponentBase *, const TQPoint &, TQRect & )
{
// We begin with the meta contact display name at the top of the tooltip
- QString toolTip = QString::fromLatin1("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
+ TQString toolTip = TQString::fromLatin1("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
- toolTip += QString::fromLatin1("<tr><td>");
+ toolTip += TQString::fromLatin1("<tr><td>");
if ( ! metaContact->photo().isNull() )
{
- QString photoName = QString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() ));
- //QMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() );
- toolTip += QString::fromLatin1("<img src=\"%1\">").arg( photoName );
+ TQString photoName = TQString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() ));
+ //TQMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() );
+ toolTip += TQString::fromLatin1("<img src=\"%1\">").arg( photoName );
}
- toolTip += QString::fromLatin1("</td><td>");
+ toolTip += TQString::fromLatin1("</td><td>");
- QString displayName;
+ TQString displayName;
Kopete::Emoticons *e = Kopete::Emoticons::self();
- QValueList<Emoticons::Token> t = e->tokenize( metaContact->displayName());
- QValueList<Emoticons::Token>::iterator it;
+ TQValueList<Emoticons::Token> t = e->tokenize( metaContact->displayName());
+ TQValueList<Emoticons::Token>::iterator it;
for( it = t.begin(); it != t.end(); ++it )
{
if( (*it).type == Kopete::Emoticons::Image )
@@ -106,25 +106,25 @@ public:
displayName += (*it).picHTMLCode;
} else if( (*it).type == Kopete::Emoticons::Text )
{
- displayName += QStyleSheet::escape( (*it).text );
+ displayName += TQStyleSheet::escape( (*it).text );
}
}
- toolTip += QString::fromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").arg( displayName );
+ toolTip += TQString::fromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").arg( displayName );
- QPtrList<Contact> contacts = metaContact->contacts();
+ TQPtrList<Contact> contacts = metaContact->contacts();
if ( contacts.count() == 1 )
{
- return toolTip + contacts.first()->toolTip() + QString::fromLatin1("</td></tr></table></qt>");
+ return toolTip + contacts.first()->toolTip() + TQString::fromLatin1("</td></tr></table></qt>");
}
- toolTip += QString::fromLatin1("<table>");
+ toolTip += TQString::fromLatin1("<table>");
// We are over a metacontact with > 1 child contacts, and not over a specific contact
// Iterate through children and display a summary tooltip
for(Contact *c = contacts.first(); c; c = contacts.next())
{
- QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3")
+ TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3")
.arg( KURL::encode_string( c->protocol()->pluginId() ),
KURL::encode_string( c->account()->accountId() ),
KURL::encode_string( c->contactId() )
@@ -135,7 +135,7 @@ public:
.arg( iconName, Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) , c->contactId(), c->onlineStatus().description() );
}
- return toolTip + QString::fromLatin1("</table></td></tr></table></qt>");
+ return toolTip + TQString::fromLatin1("</table></td></tr></table></qt>");
}
private:
MetaContact *metaContact;
@@ -163,12 +163,12 @@ public:
int currentMode;
int currentIconMode;
- QPtrList<Kopete::MessageEvent> events;
+ TQPtrList<Kopete::MessageEvent> events;
};
KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent )
: ListView::Item( parent, contact, "MetaContactLVI" )
-//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent )
+//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent )
{
m_metaContact = contact;
m_isTopLevel = false;
@@ -179,9 +179,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, Kopete
parent->refreshDisplayName();
}
-KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent )
+KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent )
: ListView::Item( parent, contact, "MetaContactLVI" )
-//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent )
+//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent )
{
m_metaContact = contact;
@@ -192,9 +192,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListV
initLVI();
}
-KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent )
+KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent )
: ListView::Item( parent, contact, "MetaContactLVI" )
-//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent )
+//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent )
{
m_metaContact = contact;
@@ -213,47 +213,47 @@ void KopeteMetaContactLVI::initLVI()
m_oldStatus = m_metaContact->status();
- connect( m_metaContact, SIGNAL( displayNameChanged( const QString &, const QString & ) ),
- SLOT( slotDisplayNameChanged() ) );
+ connect( m_metaContact, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ),
+ TQT_SLOT( slotDisplayNameChanged() ) );
- connect( m_metaContact, SIGNAL( photoChanged() ),
- SLOT( slotPhotoChanged() ) );
+ connect( m_metaContact, TQT_SIGNAL( photoChanged() ),
+ TQT_SLOT( slotPhotoChanged() ) );
- connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
- SLOT( slotPhotoChanged() ) );
+ connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
+ TQT_SLOT( slotPhotoChanged() ) );
- connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
- this, SLOT(slotIdleStateChanged( ) ) );
+ connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
+ this, TQT_SLOT(slotIdleStateChanged( ) ) );
- connect( m_metaContact, SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ),
- SLOT( slotContactStatusChanged( Kopete::Contact * ) ) );
+ connect( m_metaContact, TQT_SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ),
+ TQT_SLOT( slotContactStatusChanged( Kopete::Contact * ) ) );
- connect( m_metaContact, SIGNAL( contactAdded( Kopete::Contact * ) ),
- SLOT( slotContactAdded( Kopete::Contact * ) ) );
+ connect( m_metaContact, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ),
+ TQT_SLOT( slotContactAdded( Kopete::Contact * ) ) );
- connect( m_metaContact, SIGNAL( contactRemoved( Kopete::Contact * ) ),
- SLOT( slotContactRemoved( Kopete::Contact * ) ) );
+ connect( m_metaContact, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ),
+ TQT_SLOT( slotContactRemoved( Kopete::Contact * ) ) );
- connect( m_metaContact, SIGNAL( iconAppearanceChanged() ),
- SLOT( slotUpdateMetaContact() ) );
+ connect( m_metaContact, TQT_SIGNAL( iconAppearanceChanged() ),
+ TQT_SLOT( slotUpdateMetaContact() ) );
- connect( m_metaContact, SIGNAL( useCustomIconChanged( bool ) ),
- SLOT( slotUpdateMetaContact() ) );
+ connect( m_metaContact, TQT_SIGNAL( useCustomIconChanged( bool ) ),
+ TQT_SLOT( slotUpdateMetaContact() ) );
- connect( m_metaContact, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ),
- SLOT( slotIdleStateChanged( Kopete::Contact * ) ) );
+ connect( m_metaContact, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ),
+ TQT_SLOT( slotIdleStateChanged( Kopete::Contact * ) ) );
- connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ),
- SLOT( slotConfigChanged() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ),
+ TQT_SLOT( slotConfigChanged() ) );
- connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) );
+ connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) );
- mBlinkTimer = new QTimer( this, "mBlinkTimer" );
- connect( mBlinkTimer, SIGNAL( timeout() ), SLOT( slotBlink() ) );
+ mBlinkTimer = new TQTimer( this, "mBlinkTimer" );
+ connect( mBlinkTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotBlink() ) );
mIsBlinkIcon = false;
//if ( !mBlinkIcon )
- // mBlinkIcon = new QPixmap( KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "newmsg" ), KIcon::Small ) );
+ // mBlinkIcon = new TQPixmap( KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "newmsg" ), KIcon::Small ) );
slotConfigChanged(); // this calls slotIdleStateChanged(), which sets up the constituent components, spacing, fonts and indirectly, the contact icon
slotDisplayNameChanged();
@@ -301,9 +301,9 @@ void KopeteMetaContactLVI::movedToDifferentGroup()
}
}
-void KopeteMetaContactLVI::rename( const QString& newName )
+void KopeteMetaContactLVI::rename( const TQString& newName )
{
- QString oldName = m_metaContact->displayName();
+ TQString oldName = m_metaContact->displayName();
KopeteContactListView *lv = dynamic_cast<KopeteContactListView *>( listView() );
if ( lv )
{
@@ -380,9 +380,9 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
{
//int winId = KopeteSystemTray::systemTray() ? KopeteSystemTray::systemTray()->winId() : 0;
- QString text = i18n( "<qt><i>%1</i> is now %2.</qt>" )
- .arg( Kopete::Emoticons::parseEmoticons( QStyleSheet::escape(m_metaContact->displayName()) ) ,
- QStyleSheet::escape(c->onlineStatus().description()));
+ TQString text = i18n( "<qt><i>%1</i> is now %2.</qt>" )
+ .arg( Kopete::Emoticons::parseEmoticons( TQStyleSheet::escape(m_metaContact->displayName()) ) ,
+ TQStyleSheet::escape(c->onlineStatus().description()));
// figure out what's happened
enum ChangeType { noChange, noEvent, signedIn, changedStatus, signedOut };
@@ -438,11 +438,11 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
break;
case signedIn:
connect(KNotification::event(m_metaContact, "kopete_contact_online", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) ,
- SIGNAL(activated(unsigned int )) , this, SLOT( execute() ) );
+ TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ) );
break;
case changedStatus:
connect(KNotification::event(m_metaContact, "kopete_contact_status_change", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) ,
- SIGNAL(activated(unsigned int )) , this, SLOT( execute() ));
+ TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ));
break;
case signedOut:
KNotification::event(m_metaContact, "kopete_contact_offline", text, m_metaContact->photo(), KopeteSystemTray::systemTray());
@@ -463,7 +463,7 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c )
//So the olfStatusIcon will not be set to the real after the blink.
//we set it now.
if( !mBlinkTimer->isActive() )
- m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap();
+ m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap();
}
// make a note of the current status for the next time we get a status change
@@ -491,7 +491,7 @@ void KopeteMetaContactLVI::execute() const
m_metaContact->execute();
//The selection is removed, but the contact still hihjlihted, remove the selection in the contactlist (see bug 106090)
- Kopete::ContactList::self()->setSelectedItems( QPtrList<Kopete::MetaContact>() , QPtrList<Kopete::Group>() );
+ Kopete::ContactList::self()->setSelectedItems( TQPtrList<Kopete::MetaContact>() , TQPtrList<Kopete::Group>() );
}
void KopeteMetaContactLVI::slotDisplayNameChanged()
@@ -513,14 +513,14 @@ void KopeteMetaContactLVI::slotPhotoChanged()
if ( d->metaContactIcon && d->currentIconMode == KopetePrefs::PhotoPic )
{
m_oldStatusIcon= d->metaContactIcon->pixmap();
- QPixmap photoPixmap;
- //QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
- QImage photoImg = m_metaContact->photo();
+ TQPixmap photoPixmap;
+ //TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
+ TQImage photoImg = m_metaContact->photo();
if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) )
{
int photoSize = d->iconSize;
- photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin );
+ photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin );
KImageEffect *effect = 0L;
switch ( m_metaContact->status() )
@@ -640,7 +640,7 @@ void KopeteMetaContactLVI::slotAddToNewGroup()
if ( m_metaContact->isTemporary() )
return;
- QString groupName = KInputDialog::getText(
+ TQString groupName = KInputDialog::getText(
i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) );
if ( !groupName.isEmpty() )
@@ -668,7 +668,7 @@ void KopeteMetaContactLVI::slotConfigChanged()
}
else
{
- QFont font=listView()->font();
+ TQFont font=listView()->font();
d->nameText->setFont( font );
if(d->extraText)
{
@@ -730,8 +730,8 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode )
new VSpacerComponent( imageBox );
if(!metaContact()->photoSource() && !Kopete::KABCPersistence::self()->addressBook()->findByUid( metaContact()->metaContactId() ).isEmpty() )
{ //if the photo is the one of the kaddressbook, track every change in the adressbook, it might be the photo of our contact.
- connect( Kopete::KABCPersistence::self()->addressBook() , SIGNAL(addressBookChanged (AddressBook *) ) ,
- this , SLOT(slotPhotoChanged()));
+ connect( Kopete::KABCPersistence::self()->addressBook() , TQT_SIGNAL(addressBookChanged (AddressBook *) ) ,
+ this , TQT_SLOT(slotPhotoChanged()));
}
} else {
d->metaContactIcon = new ImageComponent( hbox );
@@ -770,13 +770,13 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode )
slotIdleStateChanged( 0 );
// finally, re-add all contacts so their icons appear. remove them first for consistency.
- QPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
{
slotContactRemoved( *it );
slotContactAdded( *it );
}
- m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap();
+ m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap();
if( mBlinkTimer->isActive() )
m_originalBlinkIcon=m_oldStatusIcon;
}
@@ -792,11 +792,11 @@ void KopeteMetaContactLVI::updateVisibility()
}
void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
- const QString &key, const QVariant &old, const QVariant &newVal )
+ const TQString &key, const TQVariant &old, const TQVariant &newVal )
{
-// if ( key == QString::fromLatin1("awayMessage") )
+// if ( key == TQString::fromLatin1("awayMessage") )
// kdDebug( 14000 ) << k_funcinfo << "contact=" << contact->contactId() << ", isonline=" << contact->isOnline() << ", alloffline=" << !m_metaContact->isOnline() << ", oldvalue=" << old.toString() << ", newvalue=" << newVal.toString() << endl;
- if ( key == QString::fromLatin1("awayMessage") && d->extraText && old != newVal )
+ if ( key == TQString::fromLatin1("awayMessage") && d->extraText && old != newVal )
{
bool allOffline = !m_metaContact->isOnline();
if ( newVal.toString().isEmpty() || ( !contact->isOnline() && !allOffline ) )
@@ -805,11 +805,11 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
// -new away message is empty or
// -contact who set it is offline and there are contacts online in the metacontact
bool allAwayMessagesEmpty = true;
- QPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
for ( Kopete::Contact *c = contacts.first(); c; c = contacts.next() )
{
// kdDebug( 14000 ) << k_funcinfo << "ccontact=" << c->contactId() << ", isonline=" << c->isOnline() << ", awaymsg=" << c->property( key ).value().toString() << endl;
- QString awayMessage( c->property( key ).value().toString() );
+ TQString awayMessage( c->property( key ).value().toString() );
if ( ( allOffline || c->isOnline() ) && !awayMessage.isEmpty() )
{
// display this contact's away message when:
@@ -821,7 +821,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
}
}
if ( allAwayMessagesEmpty )
- d->extraText->setText( QString::null );
+ d->extraText->setText( TQString::null );
}
else
{
@@ -831,7 +831,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
d->extraText->setText( newVal.toString() );
}
} // wtf? KopeteMetaContact also connects this signals and emits photoChanged! why no connect photoChanged to slotPhotoChanged?
- /*else if ( key == QString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact))
+ /*else if ( key == TQString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact))
{
slotPhotoChanged();
}*/
@@ -839,46 +839,46 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact,
void KopeteMetaContactLVI::slotContactAdded( Kopete::Contact *c )
{
- connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &,
- const QVariant &, const QVariant & ) ),
- this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &,
- const QVariant &, const QVariant & ) ) );
- connect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) );
+ connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &,
+ const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &,
+ const TQVariant &, const TQVariant & ) ) );
+ connect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) );
updateContactIcon( c );
- slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"),
- QVariant(), c->property( QString::fromLatin1("awayMessage") ).value() );
+ slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"),
+ TQVariant(), c->property( TQString::fromLatin1("awayMessage") ).value() );
}
void KopeteMetaContactLVI::slotContactRemoved( Kopete::Contact *c )
{
- disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &,
- const QVariant &, const QVariant & ) ),
- this, SLOT( slotContactPropertyChanged( Kopete::Contact *,
- const QString &, const QVariant &, const QVariant & ) ) );
- disconnect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) );
+ disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &,
+ const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *,
+ const TQString &, const TQVariant &, const TQVariant & ) ) );
+ disconnect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) );
if ( ListView::Component *comp = contactComponent( c ) )
delete comp;
- slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"),
- c->property( QString::fromLatin1("awayMessage") ).value(), QVariant() );
+ slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"),
+ c->property( TQString::fromLatin1("awayMessage") ).value(), TQVariant() );
}
void KopeteMetaContactLVI::updateContactIcons()
{
// show offline contacts setting may have changed
- QPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
- for ( QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ for ( TQPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it )
updateContactIcon( *it );
}
void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c )
{
- KGlobal::config()->setGroup( QString::fromLatin1("ContactList") );
+ KGlobal::config()->setGroup( TQString::fromLatin1("ContactList") );
bool bHideOffline = KGlobal::config()->readBoolEntry(
- QString::fromLatin1("HideOfflineContacts"), false );
+ TQString::fromLatin1("HideOfflineContacts"), false );
if ( KopetePrefs::prefs()->showOffline() )
bHideOffline = false;
@@ -892,7 +892,7 @@ void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c )
comp->updatePixmap();
}
-Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const QPoint &p ) const
+Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const TQPoint &p ) const
{
if ( ListView::ContactComponent *comp = dynamic_cast<ListView::ContactComponent*>( d->contactIconBox->componentAt( p ) ) )
return comp->contact();
@@ -912,11 +912,11 @@ ListView::ContactComponent *KopeteMetaContactLVI::contactComponent( const Kopete
return 0;
}
-QRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const
+TQRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const
{
if ( ListView::Component *comp = contactComponent( c ) )
return comp->rect();
- return QRect();
+ return TQRect();
}
Kopete::Group *KopeteMetaContactLVI::group()
@@ -927,7 +927,7 @@ Kopete::Group *KopeteMetaContactLVI::group()
return Kopete::Group::topLevel();
}
-QString KopeteMetaContactLVI::key( int, bool ) const
+TQString KopeteMetaContactLVI::key( int, bool ) const
{
char importanceChar;
switch ( m_metaContact->status() )
@@ -988,10 +988,10 @@ void KopeteMetaContactLVI::slotIdleStateChanged( Kopete::Contact *c )
{
m_oldStatusIcon=d->metaContactIcon->pixmap();
- QPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize );
+ TQPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize );
if ( doWeHaveToGrayThatContact )
{
- // TODO: QPixmapCache this result
+ // TODO: TQPixmapCache this result
KIconEffect::semiTransparent( icon );
}
@@ -1011,13 +1011,13 @@ void KopeteMetaContactLVI::catchEvent( Kopete::MessageEvent *event )
{
d->events.append( event );
- connect( event, SIGNAL( done( Kopete::MessageEvent* ) ),
- this, SLOT( slotEventDone( Kopete::MessageEvent * ) ) );
+ connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ),
+ this, TQT_SLOT( slotEventDone( Kopete::MessageEvent * ) ) );
if ( mBlinkTimer->isActive() )
mBlinkTimer->stop();
- m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap();
+ m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap();
mBlinkTimer->start( 400, false );
@@ -1035,9 +1035,9 @@ void KopeteMetaContactLVI::slotBlink()
if ( !haveEvent && m_blinkLeft <= 0 )
{
mBlinkTimer->stop();
- m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap();
+ m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap();
updateVisibility();
- m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption
+ m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption
}
}
else
@@ -1076,12 +1076,12 @@ void KopeteMetaContactLVI::slotEventDone( Kopete::MessageEvent *event )
if(d->metaContactIcon)
d->metaContactIcon->setPixmap( m_originalBlinkIcon );
- m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption
+ m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption
mIsBlinkIcon = false;
}
}
-QString KopeteMetaContactLVI::text( int column ) const
+TQString KopeteMetaContactLVI::text( int column ) const
{
if ( column == 0 )
return d->nameText->text();
@@ -1089,7 +1089,7 @@ QString KopeteMetaContactLVI::text( int column ) const
return KListViewItem::text( column );
}
-void KopeteMetaContactLVI::setText( int column, const QString &text )
+void KopeteMetaContactLVI::setText( int column, const TQString &text )
{
if ( column == 0 )
rename( text );
diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.h b/kopete/kopete/contactlist/kopetemetacontactlvi.h
index 767330ba..d795475f 100644
--- a/kopete/kopete/contactlist/kopetemetacontactlvi.h
+++ b/kopete/kopete/contactlist/kopetemetacontactlvi.h
@@ -23,9 +23,9 @@
#include "kopetelistviewitem.h"
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqptrdict.h>
#include <klistview.h>
@@ -56,8 +56,8 @@ class KopeteMetaContactLVI : public Kopete::UI::ListView::Item
public:
KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent );
- KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent );
- KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent );
+ KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent );
+ KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent );
~KopeteMetaContactLVI();
/**
@@ -74,7 +74,7 @@ public:
/**
* parent when top-level
*/
- QListView *parentView() const { return m_parentView; };
+ TQListView *parentView() const { return m_parentView; };
/**
* parent when not top-level
@@ -85,7 +85,7 @@ public:
* call this when the item has been moved to a different group
*/
void movedToDifferentGroup();
- void rename( const QString& name );
+ void rename( const TQString& name );
void startRename( int );
Kopete::Group *group();
@@ -97,28 +97,28 @@ public:
* (This is used for e.g. the context-menu of a contact when
* right-clicking an icon, or the tooltips)
*/
- Kopete::Contact *contactForPoint( const QPoint &p ) const;
+ Kopete::Contact *contactForPoint( const TQPoint &p ) const;
/**
- * Returns the QRect small little icon used for the Kopete::Contact.
+ * Returns the TQRect small little icon used for the Kopete::Contact.
* The behavior is undefined if @param c doesn't point to a valid
* Kopete::Contact for this list view item.
- * The returned QRect is using the list view item's coordinate
+ * The returned TQRect is using the list view item's coordinate
* system and should probably be transformed into the list view's
* coordinates before being of any practical use.
* Note that the returned Rect is always vertically stretched to fill
* the full list view item's height, only the width is relative to
* the actual icon width.
*/
- QRect contactRect( const Kopete::Contact *c ) const;
+ TQRect contactRect( const Kopete::Contact *c ) const;
bool isGrouped() const;
/**
* reimplemented from KListViewItem to take into account our alternate text storage
*/
- virtual QString text( int column ) const;
- virtual void setText( int column, const QString &text );
+ virtual TQString text( int column ) const;
+ virtual void setText( int column, const TQString &text );
public slots:
/**
@@ -134,7 +134,7 @@ public slots:
private slots:
void slotUpdateMetaContact();
void slotContactStatusChanged( Kopete::Contact * );
- void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & );
+ void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & );
void slotContactAdded( Kopete::Contact * );
void slotContactRemoved( Kopete::Contact * );
@@ -159,24 +159,24 @@ private:
void initLVI();
void setDisplayMode( int mode, int iconMode );
void setMetaContactToolTipSourceForComponent( Kopete::UI::ListView::Component *comp );
- QString key( int column, bool ascending ) const;
+ TQString key( int column, bool ascending ) const;
void updateContactIcon( Kopete::Contact * );
Kopete::UI::ListView::ContactComponent *contactComponent( const Kopete::Contact *c ) const;
Kopete::MetaContact *m_metaContact;
KopeteGroupViewItem *m_parentGroup;
- QListView *m_parentView;
+ TQListView *m_parentView;
bool m_isTopLevel;
int m_pixelWide;
Kopete::OnlineStatus m_oldStatus;
- QPixmap m_oldStatusIcon;
- QPixmap m_originalBlinkIcon;
+ TQPixmap m_oldStatusIcon;
+ TQPixmap m_originalBlinkIcon;
- QTimer *mBlinkTimer;
+ TQTimer *mBlinkTimer;
- QPtrDict<Kopete::Account> m_addContactActions;
+ TQPtrDict<Kopete::Account> m_addContactActions;
bool mIsBlinkIcon;
int m_blinkLeft;
diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp
index 9dc910dd..6595e237 100644
--- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp
+++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp
@@ -20,8 +20,8 @@
#include <kdebug.h>
#include "kopetestatusgroupviewitem.h"
-KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name )
- : QListViewItem(parent,name)
+KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name )
+ : TQListViewItem(parent,name)
{
m_status = status_;
}
@@ -30,7 +30,7 @@ KopeteStatusGroupViewItem::~KopeteStatusGroupViewItem()
{
}
-QString KopeteStatusGroupViewItem::key( int, bool ) const
+TQString KopeteStatusGroupViewItem::key( int, bool ) const
{
switch (m_status)
{
diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h
index 8b1a930f..2f4f08b3 100644
--- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h
+++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h
@@ -30,13 +30,13 @@
class KopeteStatusGroupViewItem : public QListViewItem
{
public:
- KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name=0);
+ KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name=0);
~KopeteStatusGroupViewItem();
private:
Kopete::OnlineStatus::StatusType m_status;
- QString key( int column, bool ascending ) const;
+ TQString key( int column, bool ascending ) const;
};
diff --git a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp
index fe1c3351..5e35c9e2 100644
--- a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp
+++ b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp
@@ -17,41 +17,41 @@
*************************************************************************
*/
-#include <qmap.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
-static QTextStream qcin ( stdin, IO_ReadOnly );
-static QTextStream qcout( stdout, IO_WriteOnly );
-static QTextStream qcerr( stderr, IO_WriteOnly );
+static TQTextStream qcin ( stdin, IO_ReadOnly );
+static TQTextStream qcout( stdout, IO_WriteOnly );
+static TQTextStream qcerr( stderr, IO_WriteOnly );
// Group cache. Yes, I know global vars are ugly :)
bool needFlush = false;
-QString accountId;
-QString password;
-QString autoConnect;
-QString protocol;
-QMap<QString, QString> pluginData;
+TQString accountId;
+TQString password;
+TQString autoConnect;
+TQString protocol;
+TQMap<TQString, TQString> pluginData;
// Global vars to hold separate IRC vars until we have read all of them
-QString ircNick;
-QString ircServer;
-QString ircPort;
+TQString ircNick;
+TQString ircServer;
+TQString ircPort;
/*
* Function for (en/de)crypting strings for config file, taken from KMail
* Author: Stefan Taferner <taferner@alpin.or.at>
*/
-QString cryptStr(const QString &aStr)
+TQString cryptStr(const TQString &aStr)
{
- QString result;
+ TQString result;
for (unsigned int i = 0; i < aStr.length(); i++)
result += (aStr[i].unicode() < 0x20) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
-void parseGroup( const QString &group, const QString &rawLine )
+void parseGroup( const TQString &group, const TQString &rawLine )
{
// Groups that are converted can almost certainly be removed entirely
@@ -65,7 +65,7 @@ void parseGroup( const QString &group, const QString &rawLine )
else
protocol = group + "Protocol";
- password = QString::null;
+ password = TQString::null;
pluginData.clear();
needFlush = true;
@@ -79,7 +79,7 @@ void parseGroup( const QString &group, const QString &rawLine )
}
}
-void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine )
+void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine )
{
//qcerr << "*** group='" << group << "'" << endl;
if ( group == "MSN" )
@@ -154,9 +154,9 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
!ircPort.isEmpty() )
{
#if QT_VERSION < 0x030200
- accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort );
+ accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort );
#else
- accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort );
+ accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort );
#endif
}
}
@@ -165,7 +165,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
*/
else if ( key == "Modules" )
{
- QString newValue = value;
+ TQString newValue = value;
newValue.replace ( ".plugin", ".desktop" );
qcout << "Plugins=" << newValue;
}
@@ -176,7 +176,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
}
}
-void flushData( const QString &group )
+void flushData( const TQString &group )
{
qcout << "[Account_" << protocol << "_" << accountId << "]" << endl;
@@ -190,7 +190,7 @@ void flushData( const QString &group )
qcout << "Password=" << cryptStr( password ) << endl;
qcout << "AutoConnect=" << autoConnect << endl;
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = pluginData.begin(); it != pluginData.end(); ++it )
qcout << "PluginData_" << protocol << "_" << it.key() << "=" << it.data() << endl;
@@ -198,18 +198,18 @@ void flushData( const QString &group )
int main()
{
- qcin.setEncoding( QTextStream::UnicodeUTF8 );
- qcout.setEncoding( QTextStream::UnicodeUTF8 );
+ qcin.setEncoding( TQTextStream::UnicodeUTF8 );
+ qcout.setEncoding( TQTextStream::UnicodeUTF8 );
- QString curGroup;
+ TQString curGroup;
- QRegExp groupRegExp( "^\\[(.*)\\]" );
- QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
- QRegExp commentRegExp( "^(#.*)?$" );
+ TQRegExp groupRegExp( "^\\[(.*)\\]" );
+ TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
+ TQRegExp commentRegExp( "^(#.*)?$" );
while ( !qcin.atEnd() )
{
- QString line = qcin.readLine();
+ TQString line = qcin.readLine();
if ( commentRegExp.exactMatch( line ) )
{
diff --git a/kopete/kopete/kconf_update/kopete-nameTracking.cpp b/kopete/kopete/kconf_update/kopete-nameTracking.cpp
index 391e5132..c0a556e7 100644
--- a/kopete/kopete/kconf_update/kopete-nameTracking.cpp
+++ b/kopete/kopete/kconf_update/kopete-nameTracking.cpp
@@ -14,60 +14,60 @@
*************************************************************************
*/
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
#include <kstandarddirs.h>
-static QTextStream qcerr( stderr, IO_WriteOnly );
+static TQTextStream qcerr( stderr, IO_WriteOnly );
int main()
{
KInstance* inst = new KInstance( "Update script" );
- QString filename = locateLocal( "data", QString::fromLatin1( "kopete/contactlist.xml" ) );
+ TQString filename = locateLocal( "data", TQString::fromLatin1( "kopete/contactlist.xml" ) );
// Load contact list & save backup.
- QFile contactListFile( filename );
+ TQFile contactListFile( filename );
contactListFile.open( IO_ReadOnly );
- QDomDocument contactList;
+ TQDomDocument contactList;
contactList.setContent( &contactListFile );
contactListFile.close();
- QDir().rename( filename, filename + QString::fromLatin1( ".bak" ) );
+ TQDir().rename( filename, filename + TQString::fromLatin1( ".bak" ) );
// parse the XML file
- QDomElement list = contactList.documentElement();
- QDomElement mcElement = list.firstChild().toElement();
+ TQDomElement list = contactList.documentElement();
+ TQDomElement mcElement = list.firstChild().toElement();
while( !mcElement.isNull() )
{
// update all the MetaContacts
- if( mcElement.tagName() == QString::fromLatin1("meta-contact") )
+ if( mcElement.tagName() == TQString::fromLatin1("meta-contact") )
{
- QDomElement displayName;
- QDomElement subcontact;
+ TQDomElement displayName;
+ TQDomElement subcontact;
- QDomElement elem = mcElement.firstChild().toElement();
+ TQDomElement elem = mcElement.firstChild().toElement();
while( !elem.isNull() )
{
- if( elem.tagName() == QString::fromLatin1( "display-name" ) )
+ if( elem.tagName() == TQString::fromLatin1( "display-name" ) )
displayName = elem;
- if( elem.tagName() == QString::fromLatin1( "plugin-data" ) )
+ if( elem.tagName() == TQString::fromLatin1( "plugin-data" ) )
{
// check if it's a contact by checking for "protocol" substring in the tag,
// and the presence of a contactId child element.
- QString pluginId = elem.attribute( QString::fromLatin1( "plugin-id" ) );
+ TQString pluginId = elem.attribute( TQString::fromLatin1( "plugin-id" ) );
bool isProtocol = ( pluginId.contains( "protocol", false ) > 0 ); // case-insensitive search
bool hasContactId = false;
- QDomNode field = elem.firstChild();
+ TQDomNode field = elem.firstChild();
while( !field.isNull() )
{
- QDomElement fieldElem = field.toElement();
+ TQDomElement fieldElem = field.toElement();
if( !fieldElem.isNull() &&
- fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) &&
- fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) )
+ fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) &&
+ fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) )
{
hasContactId = true;
break;
@@ -85,35 +85,35 @@ int main()
// check if we're even tracking the subcontact's name
// if displayName.isNull(), it simply won't find the attribute; no harm done
bool tracking =
- ( displayName.attribute( QString::fromLatin1( "trackChildNameChanges" ),
- QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ ( displayName.attribute( TQString::fromLatin1( "trackChildNameChanges" ),
+ TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
if( !displayName.isNull() && !subcontact.isNull() && tracking )
{
// collect info
- QString nsCID;
- QString nsPID;
- QString nsAID;
+ TQString nsCID;
+ TQString nsPID;
+ TQString nsAID;
- nsPID = subcontact.attribute( QString::fromLatin1( "plugin-id" ) );
- QDomNode field = subcontact.firstChild();
+ nsPID = subcontact.attribute( TQString::fromLatin1( "plugin-id" ) );
+ TQDomNode field = subcontact.firstChild();
while( !field.isNull() )
{
- QDomElement fieldElem = field.toElement();
+ TQDomElement fieldElem = field.toElement();
- if( !fieldElem.isNull() && fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) )
+ if( !fieldElem.isNull() && fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) )
{
- if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) )
+ if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) )
nsCID = fieldElem.text();
- if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "accountId" ) )
+ if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "accountId" ) )
nsAID = fieldElem.text();
}
field = field.nextSibling();
}
// create the tracking info
- displayName.setAttribute( QString::fromLatin1( "nameSourceContactId" ), nsCID );
- displayName.setAttribute( QString::fromLatin1( "nameSourcePluginId" ), nsPID );
- displayName.setAttribute( QString::fromLatin1( "nameSourceAccountId" ), nsAID );
+ displayName.setAttribute( TQString::fromLatin1( "nameSourceContactId" ), nsCID );
+ displayName.setAttribute( TQString::fromLatin1( "nameSourcePluginId" ), nsPID );
+ displayName.setAttribute( TQString::fromLatin1( "nameSourceAccountId" ), nsAID );
}
}
@@ -122,8 +122,8 @@ int main()
// Save converted contactlist
contactListFile.open( IO_WriteOnly );
- QTextStream stream( &contactListFile );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( &contactListFile );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << contactList.toString( 4 );
contactListFile.flush();
contactListFile.close();
diff --git a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp
index af8daa69..d9b0fb39 100644
--- a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp
+++ b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp
@@ -16,23 +16,23 @@
*************************************************************************
*/
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
-static QTextStream qcin ( stdin, IO_ReadOnly );
-static QTextStream qcout( stdout, IO_WriteOnly );
-static QTextStream qcerr( stderr, IO_WriteOnly );
+static TQTextStream qcin ( stdin, IO_ReadOnly );
+static TQTextStream qcout( stdout, IO_WriteOnly );
+static TQTextStream qcerr( stderr, IO_WriteOnly );
-void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine )
+void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine )
{
//qcerr << "*** group='" << group << "'" << endl;
if ( group.isEmpty() && key == "Plugins" )
{
- QStringList plugins = QStringList::split( ',', value );
+ TQStringList plugins = TQStringList::split( ',', value );
if ( !plugins.isEmpty() )
{
qcout << "[Plugins]" << endl;
- for ( QStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it )
+ for ( TQStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it )
qcout << "kopete_" << ( *it ).remove( ".desktop" ) << "Enabled=true" << endl;
}
qcout << "# DELETE []Plugins" << endl;
@@ -46,18 +46,18 @@ void parseKey( const QString &group, const QString &key, const QString &value, c
int main()
{
- qcin.setEncoding( QTextStream::UnicodeUTF8 );
- qcout.setEncoding( QTextStream::UnicodeUTF8 );
+ qcin.setEncoding( TQTextStream::UnicodeUTF8 );
+ qcout.setEncoding( TQTextStream::UnicodeUTF8 );
- QString curGroup;
+ TQString curGroup;
- QRegExp groupRegExp( "^\\[(.*)\\]" );
- QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
- QRegExp commentRegExp( "^(#.*)?$" );
+ TQRegExp groupRegExp( "^\\[(.*)\\]" );
+ TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" );
+ TQRegExp commentRegExp( "^(#.*)?$" );
while ( !qcin.atEnd() )
{
- QString line = qcin.readLine();
+ TQString line = qcin.readLine();
if ( commentRegExp.exactMatch( line ) )
{
diff --git a/kopete/kopete/kimiface.h b/kopete/kopete/kimiface.h
index 86711bf9..0ae3da9d 100644
--- a/kopete/kopete/kimiface.h
+++ b/kopete/kopete/kimiface.h
@@ -22,9 +22,9 @@
#ifndef KIMIFACE_H
#define KIMIFACE_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
/**
@@ -45,25 +45,25 @@ k_dcop:
* address book.
* @return a list of KABC uids.
*/
- virtual QStringList allContacts() = 0;
+ virtual TQStringList allContacts() = 0;
/**
* Obtain a list of KDE address book entries who are
* currently reachable.
* @return a list of KABC uids who can receive a message, even if online.
*/
- virtual QStringList reachableContacts() = 0;
+ virtual TQStringList reachableContacts() = 0;
/**
* Obtain a list of KDE address book entries who are
* currently online.
* @return a list of KABC uids who are online with unspecified presence.
*/
- virtual QStringList onlineContacts() = 0;
+ virtual TQStringList onlineContacts() = 0;
/**
* Obtain a list of KDE address book entries who may
* receive file transfers.
* @return a list of KABC uids capable of file transfer.
*/
- virtual QStringList fileTransferContacts() = 0;
+ virtual TQStringList fileTransferContacts() = 0;
// individual
/**
@@ -71,38 +71,38 @@ k_dcop:
* @param uid the KABC uid you are interested in.
* @return whether one of the chat programs KIMProxy talks to knows of this KABC uid.
*/
- virtual bool isPresent( const QString & uid ) = 0;
+ virtual bool isPresent( const TQString & uid ) = 0;
/**
* Obtain the IM app's idea of the contact's display name
* Useful if KABC lookups may be too slow
* @param KABC uid.
* @return The corresponding display name.
*/
- virtual QString displayName( const QString & uid ) = 0;
+ virtual TQString displayName( const TQString & uid ) = 0;
/**
* Obtain the IM presence as a i18ned string for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return the i18ned string describing presence.
*/
- virtual QString presenceString( const QString & uid ) = 0;
+ virtual TQString presenceString( const TQString & uid ) = 0;
/**
* Obtain the IM presence as a number (see KIMIface) for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online)
*/
- virtual int presenceStatus( const QString & uid ) = 0;
+ virtual int presenceStatus( const TQString & uid ) = 0;
/**
* Indicate if a given uid can receive files
* @param uid the KABC uid you are interested in.
* @return Whether the specified addressee can receive files.
*/
- virtual bool canReceiveFiles( const QString & uid ) = 0;
+ virtual bool canReceiveFiles( const TQString & uid ) = 0;
/**
* Some media are unidirectional (eg, sending SMS via a web interface).
* @param uid the KABC uid you are interested in.
* @return Whether the specified addressee can respond.
*/
- virtual bool canRespond( const QString & uid ) = 0;
+ virtual bool canRespond( const TQString & uid ) = 0;
/**
* Get the KABC uid corresponding to the supplied IM address
* Protocols should be
@@ -110,26 +110,26 @@ k_dcop:
* @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol",
* @return a KABC uid or null if none found/
*/
- virtual QString locate( const QString & contactId, const QString & protocol ) = 0;
+ virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0;
// metadata
/**
* Obtain the icon representing IM presence for the specified addressee
* @param uid the KABC uid you want the presence for.
* @return a pixmap representing the uid's presence.
*/
- virtual QPixmap icon( const QString & uid ) = 0;
+ virtual TQPixmap icon( const TQString & uid ) = 0;
/**
* Get the supplied addressee's current context (home, work, or any).
* @param uid the KABC uid you want the context for.
- * @return A QString describing the context, or null if not supported.
+ * @return A TQString describing the context, or null if not supported.
*/
- virtual QString context( const QString & uid ) = 0;
+ virtual TQString context( const TQString & uid ) = 0;
// App capabilities
/**
* Discover what protocols the application supports
* @return the set of protocols that the application supports
*/
- virtual QStringList protocols() = 0;
+ virtual TQStringList protocols() = 0;
// ACTORS
/**
@@ -139,18 +139,18 @@ k_dcop:
* @param uid the KABC uid you want to chat with.
* @param message the message to send them.
*/
- virtual void messageContact( const QString &uid, const QString& message ) = 0;
+ virtual void messageContact( const TQString &uid, const TQString& message ) = 0;
/**
* Open a chat to a contact, and optionally set some initial text
*/
- virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0;
/**
* Start a chat session with the specified addressee
* @param uid the KABC uid you want to chat with.
*/
- virtual void chatWithContact( const QString &uid ) = 0;
+ virtual void chatWithContact( const TQString &uid ) = 0;
/**
* Send the file to the contact
@@ -159,8 +159,8 @@ k_dcop:
* @param altFileName an alternate filename describing the file
* @param fileSize file size in bytes
*/
- virtual void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString::null, uint fileSize = 0) = 0;
+ virtual void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString::null, uint fileSize = 0) = 0;
// MUTATORS
// Contact list
@@ -170,7 +170,7 @@ k_dcop:
* @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ...
* @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported.
*/
- virtual bool addContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0;
// SIGNALS
k_dcop_signals:
/**
@@ -179,7 +179,7 @@ k_dcop_signals:
* @param appId the dcop application id of the program the signal originates from.
* @param presence the new numeric presence @ref presenceStatus
*/
- void contactPresenceChanged( QString uid, QCString appId, int presence );
+ void contactPresenceChanged( TQString uid, TQCString appId, int presence );
};
#endif
diff --git a/kopete/kopete/kimifaceimpl.cpp b/kopete/kopete/kimifaceimpl.cpp
index dd1bd962..1b835438 100644
--- a/kopete/kopete/kimifaceimpl.cpp
+++ b/kopete/kopete/kimifaceimpl.cpp
@@ -15,7 +15,7 @@
*************************************************************************
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -40,22 +40,22 @@
#include "kimifaceimpl.h"
-KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), QObject()
+KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), TQObject()
{
connect( Kopete::ContactList::self(),
- SIGNAL( metaContactAdded( Kopete::MetaContact * ) ),
- SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) );
+ TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ),
+ TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) );
}
KIMIfaceImpl::~KIMIfaceImpl()
{
}
-QStringList KIMIfaceImpl::allContacts()
+TQStringList KIMIfaceImpl::allContacts()
{
- QStringList result;
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for( ; it.current(); ++it )
{
if ( !it.current()->metaContactId().contains(':') )
@@ -65,11 +65,11 @@ QStringList KIMIfaceImpl::allContacts()
return result;
}
-QStringList KIMIfaceImpl::reachableContacts()
+TQStringList KIMIfaceImpl::reachableContacts()
{
- QStringList result;
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for( ; it.current(); ++it )
{
if ( it.current()->isReachable() && !it.current()->metaContactId().contains(':') )
@@ -79,11 +79,11 @@ QStringList KIMIfaceImpl::reachableContacts()
return result;
}
-QStringList KIMIfaceImpl::onlineContacts()
+TQStringList KIMIfaceImpl::onlineContacts()
{
- QStringList result;
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for( ; it.current(); ++it )
{
if ( it.current()->isOnline() && !it.current()->metaContactId().contains(':') )
@@ -93,11 +93,11 @@ QStringList KIMIfaceImpl::onlineContacts()
return result;
}
-QStringList KIMIfaceImpl::fileTransferContacts()
+TQStringList KIMIfaceImpl::fileTransferContacts()
{
- QStringList result;
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for( ; it.current(); ++it )
{
if ( it.current()->canAcceptFiles() && !it.current()->metaContactId().contains(':') )
@@ -107,7 +107,7 @@ QStringList KIMIfaceImpl::fileTransferContacts()
return result;
}
-bool KIMIfaceImpl::isPresent( const QString & uid )
+bool KIMIfaceImpl::isPresent( const TQString & uid )
{
Kopete::MetaContact *mc;
mc = Kopete::ContactList::self()->metaContact( uid );
@@ -116,18 +116,18 @@ bool KIMIfaceImpl::isPresent( const QString & uid )
}
-QString KIMIfaceImpl::displayName( const QString & uid )
+TQString KIMIfaceImpl::displayName( const TQString & uid )
{
Kopete::MetaContact *mc;
mc = Kopete::ContactList::self()->metaContact( uid );
- QString name;
+ TQString name;
if ( mc )
name = mc->displayName();
return name;
}
-int KIMIfaceImpl::presenceStatus( const QString & uid )
+int KIMIfaceImpl::presenceStatus( const TQString & uid )
{
//kdDebug( 14000 ) << k_funcinfo << endl;
int p = -1;
@@ -158,10 +158,10 @@ int KIMIfaceImpl::presenceStatus( const QString & uid )
return p;
}
-QString KIMIfaceImpl::presenceString( const QString & uid )
+TQString KIMIfaceImpl::presenceString( const TQString & uid )
{
//kdDebug( 14000 ) << "KIMIfaceImpl::presenceString" << endl;
- QString p;
+ TQString p;
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
if ( m )
{
@@ -172,12 +172,12 @@ QString KIMIfaceImpl::presenceString( const QString & uid )
else
{
kdDebug( 14000 ) << "Couldn't find MC: " << uid << endl;;
- p = QString();
+ p = TQString();
}
return p;
}
-bool KIMIfaceImpl::canReceiveFiles( const QString & uid )
+bool KIMIfaceImpl::canReceiveFiles( const TQString & uid )
{
Kopete::MetaContact *mc;
mc = Kopete::ContactList::self()->metaContact( uid );
@@ -188,15 +188,15 @@ bool KIMIfaceImpl::canReceiveFiles( const QString & uid )
return false;
}
-bool KIMIfaceImpl::canRespond( const QString & uid )
+bool KIMIfaceImpl::canRespond( const TQString & uid )
{
Kopete::MetaContact *mc;
mc = Kopete::ContactList::self()->metaContact( uid );
if ( mc )
{
- QPtrList<Kopete::Contact> list = mc->contacts();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQPtrList<Kopete::Contact> list = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> it( list );
Kopete::Contact *contact;
while ( ( contact = it.current() ) != 0 )
{
@@ -208,16 +208,16 @@ bool KIMIfaceImpl::canRespond( const QString & uid )
return false;
}
-QString KIMIfaceImpl::locate( const QString & contactId, const QString & protocolId )
+TQString KIMIfaceImpl::locate( const TQString & contactId, const TQString & protocolId )
{
Kopete::MetaContact *mc = locateProtocolContact( contactId, protocolId );
if ( mc )
return mc->metaContactId();
else
- return QString::null;
+ return TQString::null;
}
-Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & contactId, const QString & protocolId )
+Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const TQString & contactId, const TQString & protocolId )
{
Kopete::MetaContact *mc = 0;
// find a matching protocol
@@ -226,8 +226,8 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta
if ( protocol )
{
// find its accounts
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
- QDictIterator<Kopete::Account> it( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
+ TQDictIterator<Kopete::Account> it( accounts );
for( ; it.current(); ++it )
{
Kopete::Contact *c = Kopete::ContactList::self()->findContact( protocolId, it.currentKey(), contactId );
@@ -241,35 +241,35 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta
return mc;
}
-QPixmap KIMIfaceImpl::icon( const QString & uid )
+TQPixmap KIMIfaceImpl::icon( const TQString & uid )
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
- QPixmap p;
+ TQPixmap p;
if ( m )
p = SmallIcon( m->statusIcon() );
return p;
}
-QString KIMIfaceImpl::context( const QString & uid )
+TQString KIMIfaceImpl::context( const TQString & uid )
{
// TODO: support context
// shush warning
- QString myUid = uid;
+ TQString myUid = uid;
- return QString::null;
+ return TQString::null;
}
-QStringList KIMIfaceImpl::protocols()
+TQStringList KIMIfaceImpl::protocols()
{
- QValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" );
- QStringList protocolList;
- for ( QValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it )
+ TQValueList<KPluginInfo *> protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" );
+ TQStringList protocolList;
+ for ( TQValueList<KPluginInfo *>::Iterator it = protocols.begin(); it != protocols.end(); ++it )
protocolList.append( (*it)->name() );
return protocolList;
}
-void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageText )
+void KIMIfaceImpl::messageContact( const TQString &uid, const TQString& messageText )
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
if ( m )
@@ -285,14 +285,14 @@ void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageTex
unknown( uid );
}
-void KIMIfaceImpl::messageNewContact( const QString &contactId, const QString &protocol )
+void KIMIfaceImpl::messageNewContact( const TQString &contactId, const TQString &protocol )
{
Kopete::MetaContact *mc = locateProtocolContact( contactId, protocol );
if ( mc )
mc->sendMessage();
}
-void KIMIfaceImpl::chatWithContact( const QString &uid )
+void KIMIfaceImpl::chatWithContact( const TQString &uid )
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
if ( m )
@@ -301,8 +301,8 @@ void KIMIfaceImpl::chatWithContact( const QString &uid )
unknown( uid );
}
-void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName, uint fileSize)
+void KIMIfaceImpl::sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName, uint fileSize)
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
if ( m )
@@ -310,7 +310,7 @@ void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL,
// else, prompt to create a new MC associated with UID
}
-bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocolId )
+bool KIMIfaceImpl::addContact( const TQString &contactId, const TQString &protocolId )
{
// find a matching protocol
Kopete::Protocol *protocol = dynamic_cast<Kopete::Protocol*>( Kopete::PluginManager::self()->plugin( protocolId ) );
@@ -318,8 +318,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol
if ( protocol )
{
// find its accounts
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
- QDictIterator<Kopete::Account> it( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( protocol );
+ TQDictIterator<Kopete::Account> it( accounts );
Kopete::Account *ac = it.toFirst();
if ( ac )
{
@@ -332,8 +332,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol
void KIMIfaceImpl::slotMetaContactAdded( Kopete::MetaContact *mc )
{
- connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
- SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) );
+ connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ),
+ TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) );
}
void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc )
@@ -363,16 +363,16 @@ void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc )
}
// tell anyone who's listening over DCOP
contactPresenceChanged( mc->metaContactId(), kapp->name(), p );
-/* QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+/* TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << mc->metaContactId();
stream << kapp->name();
stream << p;
- kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( QString, QCString, int )", params );*/
+ kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( TQString, TQCString, int )", params );*/
}
}
-void KIMIfaceImpl::unknown( const QString &uid )
+void KIMIfaceImpl::unknown( const TQString &uid )
{
// warn the user that the KABC contact associated with this UID isn't known to kopete,
// either associate an existing contact with KABC or add a new one using the ACW.
@@ -384,7 +384,7 @@ void KIMIfaceImpl::unknown( const QString &uid )
}
else
{
- QString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them",
+ TQString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them",
"<qt><p>The KDE Address Book has no instant messaging information for</p><p><b>%1</b>.</p><p>If he/she is already present in the Kopete contact list, indicate the correct addressbook entry in their properties.</p><p>Otherwise, add a new contact using the Add Contact wizard.</p></qt>" );
apology = apology.arg( addr.realName() );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, apology, i18n( "No Instant Messaging Address" ) );
diff --git a/kopete/kopete/kimifaceimpl.h b/kopete/kopete/kimifaceimpl.h
index ff8c3611..e5635195 100644
--- a/kopete/kopete/kimifaceimpl.h
+++ b/kopete/kopete/kimifaceimpl.h
@@ -17,7 +17,7 @@
#ifndef KIMIFACEIMPL_H
#define KIMIFACEIMPL_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kimiface.h"
namespace Kopete
@@ -25,72 +25,72 @@ namespace Kopete
class MetaContact;
}
-class KIMIfaceImpl : public QObject, public KIMIface
+class KIMIfaceImpl : public TQObject, public KIMIface
{
Q_OBJECT
public:
KIMIfaceImpl();
~KIMIfaceImpl();
- QStringList allContacts();
- QStringList reachableContacts();
- QStringList onlineContacts();
- QStringList fileTransferContacts();
+ TQStringList allContacts();
+ TQStringList reachableContacts();
+ TQStringList onlineContacts();
+ TQStringList fileTransferContacts();
// individual
- bool isPresent( const QString &uid );
- QString displayName( const QString &uid );
- QString presenceString( const QString &uid );
- int presenceStatus( const QString &uid );
- bool canReceiveFiles( const QString &uid );
- bool canRespond( const QString &uid );
- QString locate( const QString &contactId, const QString &protocol );
+ bool isPresent( const TQString &uid );
+ TQString displayName( const TQString &uid );
+ TQString presenceString( const TQString &uid );
+ int presenceStatus( const TQString &uid );
+ bool canReceiveFiles( const TQString &uid );
+ bool canRespond( const TQString &uid );
+ TQString locate( const TQString &contactId, const TQString &protocol );
// metadata
- QPixmap icon( const QString &uid );
- QString context( const QString &uid );
+ TQPixmap icon( const TQString &uid );
+ TQString context( const TQString &uid );
// App capabilities
- QStringList protocols();
+ TQStringList protocols();
// ACTORS
/**
* Message a contact by their metaContactId, aka their uid in KABC.
*/
- void messageContact( const QString &uid, const QString& message );
+ void messageContact( const TQString &uid, const TQString& message );
/**
* Open a chat to a contact, and optionally set some initial text
*/
- void messageNewContact( const QString &contactId, const QString &protocolId );
+ void messageNewContact( const TQString &contactId, const TQString &protocolId );
/**
* Message a contact by their metaContactId, aka their uid in KABC.
*/
- void chatWithContact( const QString &uid );
+ void chatWithContact( const TQString &uid );
/**
* Send the file to the contact
*/
- void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString::null, uint fileSize = 0);
+ void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString::null, uint fileSize = 0);
// MUTATORS
// Contact list
- bool addContact( const QString &contactId, const QString &protocolId );
+ bool addContact( const TQString &contactId, const TQString &protocolId );
// SIGNALS
/**
* DCOP Signal used to notify
* external apps of status changes.
*/
- void contactStatusChanged( const QString &uid);
+ void contactStatusChanged( const TQString &uid);
protected:
- void unknown( const QString &uid );
+ void unknown( const TQString &uid );
protected slots:
void slotMetaContactAdded( Kopete::MetaContact *mc );
void slotContactStatusChanged( Kopete::MetaContact *mc );
private:
- Kopete::MetaContact *locateProtocolContact( const QString & contactId, const QString & protocolId );
+ Kopete::MetaContact *locateProtocolContact( const TQString & contactId, const TQString & protocolId );
};
#endif
diff --git a/kopete/kopete/kopeteaccountstatusbaricon.cpp b/kopete/kopete/kopeteaccountstatusbaricon.cpp
index 05855b63..a2a65355 100644
--- a/kopete/kopete/kopeteaccountstatusbaricon.cpp
+++ b/kopete/kopete/kopeteaccountstatusbaricon.cpp
@@ -16,23 +16,23 @@
*/
#include "kopeteaccountstatusbaricon.h"
-#include "qcursor.h"
+#include "tqcursor.h"
#include <kdebug.h>
//#include <kdebug.h>
-KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent,
+KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent,
const char *name )
-: QLabel( parent, name )
+: TQLabel( parent, name )
{
// kdDebug(14000) << "[KopeteAccountStatusBarIcon] Setting Initial Protocol Icon" << endl;
//setMask(initialPixmap->mask());
- //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", QString::null, QString::null ).protocolIcon() );
+ //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", TQString::null, TQString::null ).protocolIcon() );
//setPixmap( proto->status().protocolIcon() );
setFixedSize ( 16, 16 );
- setCursor(QCursor(Qt::PointingHandCursor));
+ setCursor(TQCursor(Qt::PointingHandCursor));
show();
m_account = acc;
@@ -42,15 +42,15 @@ KopeteAccountStatusBarIcon::~KopeteAccountStatusBarIcon()
{
}
-void KopeteAccountStatusBarIcon::mousePressEvent( QMouseEvent *me )
+void KopeteAccountStatusBarIcon::mousePressEvent( TQMouseEvent *me )
{
- if( me->button() == QEvent::RightButton )
+ if( me->button() == TQEvent::RightButton )
{
- emit rightClicked( m_account, QPoint( me->globalX(), me->globalY() ) );
+ emit rightClicked( m_account, TQPoint( me->globalX(), me->globalY() ) );
}
- else if( me->button() == QEvent::LeftButton )
+ else if( me->button() == TQEvent::LeftButton )
{
- emit leftClicked( m_account, QPoint( me->globalX(), me->globalY() ) );
+ emit leftClicked( m_account, TQPoint( me->globalX(), me->globalY() ) );
}
}
diff --git a/kopete/kopete/kopeteaccountstatusbaricon.h b/kopete/kopete/kopeteaccountstatusbaricon.h
index 7c3034c9..503008ff 100644
--- a/kopete/kopete/kopeteaccountstatusbaricon.h
+++ b/kopete/kopete/kopeteaccountstatusbaricon.h
@@ -18,9 +18,9 @@
#ifndef KOPETEACCOUNTSTATUSBARICON_H
#define KOPETEACCOUNTSTATUSBARICON_H
-#include <qevent.h>
-#include <qlabel.h>
-#include <qpoint.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqpoint.h>
namespace Kopete
{
@@ -38,17 +38,17 @@ public:
/**
* Create a statusbar icon.
*/
- KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent,
+ KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent,
const char *name = 0 );
~KopeteAccountStatusBarIcon();
signals:
- void rightClicked( Kopete::Account *acc, const QPoint &p );
- void leftClicked( Kopete::Account *acc, const QPoint &p );
+ void rightClicked( Kopete::Account *acc, const TQPoint &p );
+ void leftClicked( Kopete::Account *acc, const TQPoint &p );
protected:
- virtual void mousePressEvent( QMouseEvent *me );
+ virtual void mousePressEvent( TQMouseEvent *me );
private:
Kopete::Account *m_account;
diff --git a/kopete/kopete/kopeteapplication.cpp b/kopete/kopete/kopeteapplication.cpp
index 3a481d3f..3db6c51f 100644
--- a/kopete/kopete/kopeteapplication.cpp
+++ b/kopete/kopete/kopeteapplication.cpp
@@ -20,8 +20,8 @@
#include "kopeteapplication.h"
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -65,11 +65,11 @@ KopeteApplication::KopeteApplication()
* FIXME: This is a workaround for a quite odd problem:
* When starting up kopete and the msn plugin gets loaded it can bring up
* a messagebox, in case the msg configuration is missing. This messagebox
- * will result in a QApplication::enter_loop() call, an event loop is
+ * will result in a TQApplication::enter_loop() call, an event loop is
* created. At this point however the loop_level is 0, because this is all
* still inside the KopeteApplication constructor, before the exec() call from main.
* When the messagebox is finished the loop_level will drop down to zero and
- * QApplication thinks the application shuts down (this is usually the case
+ * TQApplication thinks the application shuts down (this is usually the case
* when the loop_level goes down to zero) . So it emits aboutToQuit(), to
* which KApplication is connected and re-emits shutdown() , to which again
* KMainWindow (a KopeteWindow instance exists already) is connected. KMainWindow's
@@ -83,10 +83,10 @@ KopeteApplication::KopeteApplication()
* Additionally, it makes the GUI appear less 'blocking' during startup, so
* there is a secondary benefit as well here. (Martijn)
*/
- QTimer::singleShot( 0, this, SLOT( slotLoadPlugins() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadPlugins() ) );
m_mimeFactory = new Kopete::MimeSourceFactory;
- QMimeSourceFactory::addFactory( m_mimeFactory );
+ TQMimeSourceFactory::addFactory( m_mimeFactory );
//Create the emoticon installer
m_emoticonHandler = new Kopete::EmoticonMimeTypeHandler;
@@ -148,8 +148,8 @@ void KopeteApplication::slotLoadPlugins()
*/
// Prevent plugins from loading? (--disable=foo,bar)
- QStringList disableArgs = QStringList::split( ',', args->getOption( "disable" ) );
- for ( QStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it )
+ TQStringList disableArgs = TQStringList::split( ',', args->getOption( "disable" ) );
+ for ( TQStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it )
{
showConfigDialog = false;
Kopete::PluginManager::self()->setPluginEnabled( *it, false );
@@ -160,8 +160,8 @@ void KopeteApplication::slotLoadPlugins()
{
config->deleteGroup( "Plugins", true );
showConfigDialog = false;
- QStringList plugins = QStringList::split( ',', args->getOption( "load-plugins" ) );
- for ( QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it )
+ TQStringList plugins = TQStringList::split( ',', args->getOption( "load-plugins" ) );
+ for ( TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it )
Kopete::PluginManager::self()->setPluginEnabled( *it, true );
}
@@ -177,15 +177,15 @@ void KopeteApplication::slotLoadPlugins()
showConfigDialog = false;
// pretend all plugins were loaded :)
- QTimer::singleShot(0, this, SLOT( slotAllPluginsLoaded() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( slotAllPluginsLoaded() ));
}
else
{
Kopete::PluginManager::self()->loadAllPlugins();
}
- connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ),
- this, SLOT( slotAllPluginsLoaded() ));
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ),
+ this, TQT_SLOT( slotAllPluginsLoaded() ));
if( showConfigDialog )
{
@@ -217,24 +217,24 @@ void KopeteApplication::slotAllPluginsLoaded()
// Handle things like '--autoconnect foo,bar --autoconnect foobar'
QCStringList connectArgsC = args->getOptionList( "autoconnect" );
- QStringList connectArgs;
+ TQStringList connectArgs;
for ( QCStringList::ConstIterator it = connectArgsC.begin(); it != connectArgsC.end(); ++it )
{
- QStringList split = QStringList::split( ',', QString::fromLatin1( *it ) );
+ TQStringList split = TQStringList::split( ',', TQString::fromLatin1( *it ) );
- for ( QStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 )
+ for ( TQStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 )
{
connectArgs.append( *it2 );
}
}
- for ( QStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i )
+ for ( TQStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i )
{
- QRegExp rx( QString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) );
+ TQRegExp rx( TQString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) );
rx.search( *i );
- QString protocolId = rx.cap( 1 );
- QString accountId = rx.cap( 2 );
+ TQString protocolId = rx.cap( 1 );
+ TQString accountId = rx.cap( 2 );
if ( accountId.isEmpty() )
{
@@ -244,7 +244,7 @@ void KopeteApplication::slotAllPluginsLoaded()
continue;
}
- QPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
Kopete::Account *account;
while ( ( account = it.current() ) != 0 )
{
@@ -316,7 +316,7 @@ void KopeteApplication::quitKopete()
m_isShuttingDown = true;
// close all windows
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
for (it.toFirst(); it.current(); ++it)
{
if ( !it.current()->close() )
diff --git a/kopete/kopete/kopeteapplication.h b/kopete/kopete/kopeteapplication.h
index 9634adca..d9264031 100644
--- a/kopete/kopete/kopeteapplication.h
+++ b/kopete/kopete/kopeteapplication.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kuniqueapplication.h>
@@ -79,10 +79,10 @@ private slots:
private:
// The main window might get deleted behind our back (W_DestructiveClose),
// so use a guarded pointer
- QGuardedPtr<KopeteWindow> m_mainWindow;
+ TQGuardedPtr<KopeteWindow> m_mainWindow;
bool m_isShuttingDown;
Kopete::MimeTypeHandler *m_emoticonHandler;
- QMimeSourceFactory *m_mimeFactory;
+ TQMimeSourceFactory *m_mimeFactory;
private:
void handleURLArgs();
diff --git a/kopete/kopete/kopeteballoon.cpp b/kopete/kopete/kopeteballoon.cpp
index cee42240..13696da1 100644
--- a/kopete/kopete/kopeteballoon.cpp
+++ b/kopete/kopete/kopeteballoon.cpp
@@ -18,11 +18,11 @@
*************************************************************************
*/
-#include <qpointarray.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqpointarray.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kdeversion.h>
#include <kglobalsettings.h>
@@ -39,20 +39,20 @@
#include "systemtray.h"
#include "kopeteprefs.h"
-KopeteActiveLabel::KopeteActiveLabel( QWidget *parent, const char *name )
+KopeteActiveLabel::KopeteActiveLabel( TQWidget *parent, const char *name )
: KActiveLabel( parent, name )
{
}
-KopeteActiveLabel::KopeteActiveLabel( const QString& text, QWidget *parent,
+KopeteActiveLabel::KopeteActiveLabel( const TQString& text, TQWidget *parent,
const char *name ) : KActiveLabel( text, parent, name )
{
}
-void KopeteActiveLabel::openLink( const QString& link )
+void KopeteActiveLabel::openLink( const TQString& link )
{
KURL url( link );
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if ( protocol == "mailto" )
kapp->invokeMailer(url);
@@ -63,26 +63,26 @@ void KopeteActiveLabel::openLink( const QString& link )
}
}
-KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix)
-: QWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize |
+KopeteBalloon::KopeteBalloon(const TQString &text, const TQString &pix)
+: TQWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize |
WStyle_NoBorder | WStyle_Tool | WX11BypassWM)
{
setCaption("");
- QVBoxLayout *BalloonLayout = new QVBoxLayout(this, 22,
+ TQVBoxLayout *BalloonLayout = new TQVBoxLayout(this, 22,
KDialog::spacingHint(), "BalloonLayout");
// BEGIN Layout1
- QHBoxLayout *Layout1 = new QHBoxLayout(BalloonLayout,
+ TQHBoxLayout *Layout1 = new TQHBoxLayout(BalloonLayout,
KDialog::spacingHint(), "Layout1");
- //QLabel *mCaption = new QLabel(text, this, "mCaption");
+ //TQLabel *mCaption = new TQLabel(text, this, "mCaption");
KopeteActiveLabel *mCaption = new KopeteActiveLabel(text, this, "mCaption");
- mCaption->setPalette(QToolTip::palette());
- mCaption->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ mCaption->setPalette(TQToolTip::palette());
+ mCaption->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
if (!pix.isEmpty())
{
- QLabel *mImage = new QLabel(this, "mImage");
+ TQLabel *mImage = new TQLabel(this, "mImage");
mImage->setScaledContents(FALSE);
mImage->setPixmap(locate("data", pix));
@@ -93,11 +93,11 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix)
// BEGIN Layout2
- QHBoxLayout *Layout2 = new QHBoxLayout(BalloonLayout,
+ TQHBoxLayout *Layout2 = new TQHBoxLayout(BalloonLayout,
KDialog::spacingHint(), "Layout2");
- QPushButton *mViewButton = new QPushButton(i18n("to view", "View"), this,
+ TQPushButton *mViewButton = new TQPushButton(i18n("to view", "View"), this,
"mViewButton");
- QPushButton *mIgnoreButton = new QPushButton(i18n("Ignore"), this,
+ TQPushButton *mIgnoreButton = new TQPushButton(i18n("Ignore"), this,
"mIgnoreButton");
Layout2->addStretch();
@@ -106,29 +106,29 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix)
Layout2->addStretch();
// END Layout2
- setPalette(QToolTip::palette());
+ setPalette(TQToolTip::palette());
setAutoMask(TRUE);
- connect(mViewButton, SIGNAL(clicked()),
- this, SIGNAL(signalButtonClicked()));
- connect(mViewButton, SIGNAL(clicked()),
- this, SLOT(deleteLater()));
- connect(mIgnoreButton, SIGNAL(clicked()),
- this, SIGNAL(signalIgnoreButtonClicked()));
- connect(mIgnoreButton, SIGNAL(clicked()),
- this, SLOT(deleteLater()));
- connect(mCaption, SIGNAL(linkClicked(const QString &)),
- this, SIGNAL(signalIgnoreButtonClicked()));
- connect(mCaption, SIGNAL(linkClicked(const QString &)),
- this, SLOT(deleteLater()));
+ connect(mViewButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalButtonClicked()));
+ connect(mViewButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(deleteLater()));
+ connect(mIgnoreButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalIgnoreButtonClicked()));
+ connect(mIgnoreButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(deleteLater()));
+ connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)),
+ this, TQT_SIGNAL(signalIgnoreButtonClicked()));
+ connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)),
+ this, TQT_SLOT(deleteLater()));
KopetePrefs *p = KopetePrefs::prefs();
// Autoclose balloon
if (p->balloonClose())
- QTimer::singleShot( p->balloonCloseDelay() * 1000, this, SIGNAL( signalTimeout( ) ) );
+ TQTimer::singleShot( p->balloonCloseDelay() * 1000, this, TQT_SIGNAL( signalTimeout( ) ) );
}
-void KopeteBalloon::setAnchor(const QPoint &anchor)
+void KopeteBalloon::setAnchor(const TQPoint &anchor)
{
mAnchor = anchor;
updateMask();
@@ -136,22 +136,22 @@ void KopeteBalloon::setAnchor(const QPoint &anchor)
void KopeteBalloon::updateMask()
{
- QRegion mask(10, 10, width() - 20, height() - 20);
-
- QPoint corners[8] = {
- QPoint(width() - 50, 10),
- QPoint(10, 10),
- QPoint(10, height() - 50),
- QPoint(width() - 50, height() - 50),
- QPoint(width() - 10, 10),
- QPoint(10, 10),
- QPoint(10, height() - 10),
- QPoint(width() - 10, height() - 10)
+ TQRegion mask(10, 10, width() - 20, height() - 20);
+
+ TQPoint corners[8] = {
+ TQPoint(width() - 50, 10),
+ TQPoint(10, 10),
+ TQPoint(10, height() - 50),
+ TQPoint(width() - 50, height() - 50),
+ TQPoint(width() - 10, 10),
+ TQPoint(10, 10),
+ TQPoint(10, height() - 10),
+ TQPoint(width() - 10, height() - 10)
};
for (int i = 0; i < 4; ++i)
{
- QPointArray corner;
+ TQPointArray corner;
corner.makeArc(corners[i].x(), corners[i].y(), 40, 40,
i * 16 * 90, 16 * 90);
corner.resize(corner.size() + 1);
@@ -161,16 +161,16 @@ void KopeteBalloon::updateMask()
// get screen-geometry for screen our anchor is on
// (geometry can differ from screen to screen!
- QRect deskRect = KGlobalSettings::desktopGeometry(mAnchor);
+ TQRect deskRect = KGlobalSettings::desktopGeometry(mAnchor);
bool bottom = (mAnchor.y() + height()) > ((deskRect.y() + deskRect.height()-48));
bool right = (mAnchor.x() + width()) > ((deskRect.x() + deskRect.width()-48));
- QPointArray arrow(4);
- arrow.setPoint(0, QPoint(right ? width() : 0, bottom ? height() : 0));
- arrow.setPoint(1, QPoint(right ? width() - 10 : 10,
+ TQPointArray arrow(4);
+ arrow.setPoint(0, TQPoint(right ? width() : 0, bottom ? height() : 0));
+ arrow.setPoint(1, TQPoint(right ? width() - 10 : 10,
bottom ? height() - 30 : 30));
- arrow.setPoint(2, QPoint(right ? width() - 30 : 30,
+ arrow.setPoint(2, TQPoint(right ? width() - 30 : 30,
bottom ? height() - 10 : 10));
arrow.setPoint(3, arrow[0]);
mask += arrow;
diff --git a/kopete/kopete/kopeteballoon.h b/kopete/kopete/kopeteballoon.h
index 1c30a8e4..fca7fa80 100644
--- a/kopete/kopete/kopeteballoon.h
+++ b/kopete/kopete/kopeteballoon.h
@@ -21,7 +21,7 @@
#ifndef KOPETEBALLOON_H
#define KOPETEBALLOON_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kactivelabel.h>
/**
@@ -33,11 +33,11 @@ class KopeteActiveLabel : public KActiveLabel
Q_OBJECT
public:
- KopeteActiveLabel( QWidget *parent = 0, const char* name = 0 );
- KopeteActiveLabel( const QString& text, QWidget *parent = 0, const char* name = 0 );
+ KopeteActiveLabel( TQWidget *parent = 0, const char* name = 0 );
+ KopeteActiveLabel( const TQString& text, TQWidget *parent = 0, const char* name = 0 );
public slots:
- virtual void openLink( const QString &link );
+ virtual void openLink( const TQString &link );
};
@@ -53,10 +53,10 @@ class KopeteBalloon : public QWidget
Q_OBJECT
public:
- KopeteBalloon(const QString &text, const QString &pic);
+ KopeteBalloon(const TQString &text, const TQString &pic);
// KopeteBalloon();
- void setAnchor(const QPoint &anchor);
+ void setAnchor(const TQPoint &anchor);
signals:
void signalButtonClicked();
@@ -68,7 +68,7 @@ protected:
virtual void updateMask();
private:
- QPoint mAnchor;
+ TQPoint mAnchor;
};
#endif
diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.cpp b/kopete/kopete/kopeteeditglobalidentitywidget.cpp
index 63357068..a9cd3c0c 100644
--- a/kopete/kopete/kopeteeditglobalidentitywidget.cpp
+++ b/kopete/kopete/kopeteeditglobalidentitywidget.cpp
@@ -18,11 +18,11 @@
#include "kopeteeditglobalidentitywidget.h"
// Qt include
-#include <qlayout.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
+#include <tqcursor.h>
// KDE include
#include <klineedit.h>
@@ -42,13 +42,13 @@
#include "kopetemetacontact.h"
-ClickableLabel::ClickableLabel(QWidget *parent, const char *name)
- : QLabel(parent, name)
+ClickableLabel::ClickableLabel(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{
- setCursor(QCursor(Qt::PointingHandCursor));
+ setCursor(TQCursor(Qt::PointingHandCursor));
}
-void ClickableLabel::mouseReleaseEvent(QMouseEvent *event)
+void ClickableLabel::mouseReleaseEvent(TQMouseEvent *event)
{
if(event->button() == Qt::LeftButton)
{
@@ -68,13 +68,13 @@ public:
ClickableLabel *labelPicture;
KLineEdit *lineNickname;
KLineEdit *lineStatusMessage;
- QHBoxLayout *mainLayout;
+ TQHBoxLayout *mainLayout;
int iconSize;
- QString lastNickname;
+ TQString lastNickname;
};
-KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
d = new Private;
@@ -83,7 +83,7 @@ KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent,
createGUI();
// Update the GUI when a global identity key change.
- connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant& )), this, SLOT(updateGUI(const QString&, const QVariant&)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant& )), this, TQT_SLOT(updateGUI(const TQString&, const TQVariant&)));
}
KopeteEditGlobalIdentityWidget::~KopeteEditGlobalIdentityWidget()
@@ -97,10 +97,10 @@ void KopeteEditGlobalIdentityWidget::setIconSize(int size)
// Update the picture (change the size of it)
d->iconSize = size;
- d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize));
- d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize));
+ d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize));
+ d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize));
if( !d->myself->photo().isNull() )
- d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin)));
+ d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin)));
}
void KopeteEditGlobalIdentityWidget::iconSizeChanged()
@@ -112,35 +112,35 @@ void KopeteEditGlobalIdentityWidget::iconSizeChanged()
{
// Update the picture (change the size of it)
d->iconSize = tb->iconSize();
- d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize));
- d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize));
+ d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize));
+ d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize));
if( !d->myself->photo().isNull() )
- d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin)));
+ d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin)));
}
}
void KopeteEditGlobalIdentityWidget::createGUI()
{
- d->mainLayout = new QHBoxLayout(this);
+ d->mainLayout = new TQHBoxLayout(this);
// The picture label
d->labelPicture = new ClickableLabel(this);
- d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize));
- d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize));
- d->labelPicture->setFrameShape(QFrame::Box);
+ d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize));
+ d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize));
+ d->labelPicture->setFrameShape(TQFrame::Box);
d->mainLayout->addWidget(d->labelPicture);
- connect(d->labelPicture, SIGNAL(clicked()), this, SLOT(photoClicked()));
+ connect(d->labelPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(photoClicked()));
// The nickname lineEdit
d->lineNickname = new KLineEdit(this);
d->mainLayout->addWidget(d->lineNickname);
// Update the nickname when the user press return.
- connect(d->lineNickname, SIGNAL(returnPressed()), this, SLOT(changeNickname()));
+ connect(d->lineNickname, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(changeNickname()));
// Show the nickname text in red when they are change.
- connect(d->lineNickname, SIGNAL(textChanged(const QString&)), this, SLOT(lineNicknameTextChanged(const QString& )));
+ connect(d->lineNickname, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(lineNicknameTextChanged(const TQString& )));
}
-void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVariant &value)
+void KopeteEditGlobalIdentityWidget::updateGUI(const TQString &key, const TQVariant &value)
{
kdDebug(14000) << k_funcinfo << "Updating the GUI reflecting the global identity change." << endl;
@@ -149,8 +149,8 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian
// Update the picture and the tooltip
if( !d->myself->photo().isNull() )
{
- d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin)));
- QToolTip::add(d->labelPicture, "<qt><img src=\""+ value.toString() +"\"></qt>");
+ d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin)));
+ TQToolTip::add(d->labelPicture, "<qt><img src=\""+ value.toString() +"\"></qt>");
}
}
else if(key == Kopete::Global::Properties::self()->nickName().key())
@@ -163,7 +163,7 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian
void KopeteEditGlobalIdentityWidget::photoClicked()
{
- KURL photoURL = KFileDialog::getImageOpenURL(QString::null, this, i18n("Global Photo"));
+ KURL photoURL = KFileDialog::getImageOpenURL(TQString::null, this, i18n("Global Photo"));
if(photoURL.isEmpty())
return;
@@ -174,16 +174,16 @@ void KopeteEditGlobalIdentityWidget::photoClicked()
return;
}
- QString saveLocation(locateLocal("appdata", "global-photo.png"));
- QImage photo(photoURL.path());
- photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this );
+ TQString saveLocation(locateLocal("appdata", "global-photo.png"));
+ TQImage photo(photoURL.path());
+ photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this );
if(!photo.isNull())
{
if(photo.width() > 96 || photo.height() > 96)
{
// Scale and crop the picture.
- photo = photo.smoothScale( 96, 96, QImage::ScaleMin );
+ photo = photo.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(photo.width() < photo.height())
photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96);
@@ -194,7 +194,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked()
else if (photo.width() < 32 || photo.height() < 32)
{
// Scale and crop the picture.
- photo = photo.smoothScale( 32, 32, QImage::ScaleMin );
+ photo = photo.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(photo.width() < photo.height())
photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32);
@@ -222,7 +222,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked()
d->myself->setPhoto(KURL(saveLocation));
}
-void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const QString &text)
+void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const TQString &text)
{
// Display the nickname in red if they are any change.
if(text != d->lastNickname)
diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.h b/kopete/kopete/kopeteeditglobalidentitywidget.h
index 731a2cc5..208d8316 100644
--- a/kopete/kopete/kopeteeditglobalidentitywidget.h
+++ b/kopete/kopete/kopeteeditglobalidentitywidget.h
@@ -18,8 +18,8 @@
#ifndef KOPETEEDITGLOBALIDENTITYWIDGET_H
#define KOPETEEDITGLOBALIDENTITYWIDGET_H
-#include <qwidget.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
/**
* This is a simple widget added to a toolbar in KopeteWindow.
@@ -34,7 +34,7 @@ class KopeteEditGlobalIdentityWidget : public QWidget
{
Q_OBJECT
public:
- KopeteEditGlobalIdentityWidget(QWidget *parent = 0, const char *name = 0);
+ KopeteEditGlobalIdentityWidget(TQWidget *parent = 0, const char *name = 0);
virtual ~KopeteEditGlobalIdentityWidget();
public slots:
@@ -57,7 +57,7 @@ private slots:
/**
* When a global identity key is changed, update the GUI.
*/
- void updateGUI(const QString &key, const QVariant &value);
+ void updateGUI(const TQString &key, const TQVariant &value);
/**
* The photo label was clicked, show a ImageFileDialog.
*/
@@ -65,7 +65,7 @@ private slots:
/**
* The nickname was changed, display the text in red to display the change.
*/
- void lineNicknameTextChanged(const QString &text);
+ void lineNicknameTextChanged(const TQString &text);
/**
* User press Return/Enter in the KLineEdit, commit the new nickname.
*/
@@ -87,13 +87,13 @@ class ClickableLabel : public QLabel
{
Q_OBJECT
public:
- ClickableLabel(QWidget *parent = 0, const char *name = 0);
+ ClickableLabel(TQWidget *parent = 0, const char *name = 0);
signals:
void clicked();
protected:
- void mouseReleaseEvent(QMouseEvent *event);
+ void mouseReleaseEvent(TQMouseEvent *event);
};
#endif
diff --git a/kopete/kopete/kopeteiface.cpp b/kopete/kopete/kopeteiface.cpp
index 3895e271..426424ff 100644
--- a/kopete/kopete/kopeteiface.cpp
+++ b/kopete/kopete/kopeteiface.cpp
@@ -53,43 +53,43 @@ KopeteIface::KopeteIface() : DCOPObject( "KopeteIface" )
"KDE_stop_screensaver()", "setActive()", false);
}
-QStringList KopeteIface::contacts()
+TQStringList KopeteIface::contacts()
{
return Kopete::ContactList::self()->contacts();
}
-QStringList KopeteIface::reachableContacts()
+TQStringList KopeteIface::reachableContacts()
{
return Kopete::ContactList::self()->reachableContacts();
}
-QStringList KopeteIface::onlineContacts()
+TQStringList KopeteIface::onlineContacts()
{
- QStringList result;
- QPtrList<Kopete::Contact> list = Kopete::ContactList::self()->onlineContacts();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQStringList result;
+ TQPtrList<Kopete::Contact> list = Kopete::ContactList::self()->onlineContacts();
+ TQPtrListIterator<Kopete::Contact> it( list );
for( ; it.current(); ++it )
result.append( it.current()->contactId() );
return result;
}
-QStringList KopeteIface::contactsStatus()
+TQStringList KopeteIface::contactsStatus()
{
return Kopete::ContactList::self()->contactStatuses();
}
-QStringList KopeteIface::fileTransferContacts()
+TQStringList KopeteIface::fileTransferContacts()
{
return Kopete::ContactList::self()->fileTransferContacts();
}
-QStringList KopeteIface::contactFileProtocols(const QString &displayName)
+TQStringList KopeteIface::contactFileProtocols(const TQString &displayName)
{
return Kopete::ContactList::self()->contactFileProtocols(displayName);
}
-QString KopeteIface::messageContact( const QString &contactId, const QString &messageText )
+TQString KopeteIface::messageContact( const TQString &contactId, const TQString &messageText )
{
Kopete::MetaContact *mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId );
if ( !mc )
@@ -103,18 +103,18 @@ QString KopeteIface::messageContact( const QString &contactId, const QString &me
return "The contact is not reachable";
//Default return value
- return QString::null;
+ return TQString::null;
}
/*
-void KopeteIface::sendFile(const QString &displayName, const KURL &sourceURL,
- const QString &altFileName, uint fileSize)
+void KopeteIface::sendFile(const TQString &displayName, const KURL &sourceURL,
+ const TQString &altFileName, uint fileSize)
{
return Kopete::ContactList::self()->sendFile(displayName, sourceURL, altFileName, fileSize);
}
*/
-QString KopeteIface::onlineStatus( const QString &metaContactId )
+TQString KopeteIface::onlineStatus( const TQString &metaContactId )
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId );
if( m )
@@ -126,7 +126,7 @@ QString KopeteIface::onlineStatus( const QString &metaContactId )
return "Unknown Contact";
}
-void KopeteIface::messageContactById( const QString &metaContactId )
+void KopeteIface::messageContactById( const TQString &metaContactId )
{
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId );
if( m )
@@ -135,15 +135,15 @@ void KopeteIface::messageContactById( const QString &metaContactId )
}
}
-bool KopeteIface::addContact( const QString &protocolName, const QString &accountId, const QString &contactId,
- const QString &displayName, const QString &groupName )
+bool KopeteIface::addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId,
+ const TQString &displayName, const TQString &groupName )
{
//Get the protocol instance
Kopete::Account *myAccount = Kopete::AccountManager::self()->findAccount( protocolName, accountId );
if( myAccount )
{
- QString contactName;
+ TQString contactName;
Kopete::Group *realGroup=0L;
//If the nickName isn't specified we need to display the userId in the prompt
if( displayName.isEmpty() || displayName.isNull() )
@@ -180,11 +180,11 @@ bool KopeteIface::addContact( const QString &protocolName, const QString &accoun
}
}
-QStringList KopeteIface::accounts()
+TQStringList KopeteIface::accounts()
{
- QStringList list;
- QPtrList<Kopete::Account> m_accounts=Kopete::AccountManager::self()->accounts();
- QPtrListIterator<Kopete::Account> it( m_accounts );
+ TQStringList list;
+ TQPtrList<Kopete::Account> m_accounts=Kopete::AccountManager::self()->accounts();
+ TQPtrListIterator<Kopete::Account> it( m_accounts );
Kopete::Account *account;
while ( ( account = it.current() ) != 0 )
{
@@ -197,9 +197,9 @@ QStringList KopeteIface::accounts()
}
-void KopeteIface::connect(const QString &protocolId, const QString &accountId )
+void KopeteIface::connect(const TQString &protocolId, const TQString &accountId )
{
- QPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
Kopete::Account *account;
while ( ( account = it.current() ) != 0 )
{
@@ -216,9 +216,9 @@ void KopeteIface::connect(const QString &protocolId, const QString &accountId )
}
}
-void KopeteIface::disconnect(const QString &protocolId, const QString &accountId )
+void KopeteIface::disconnect(const TQString &protocolId, const TQString &accountId )
{
- QPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
+ TQPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() );
Kopete::Account *account;
while ( ( account = it.current() ) != 0 )
{
@@ -245,11 +245,11 @@ void KopeteIface::disconnectAll()
Kopete::AccountManager::self()->disconnectAll();
}
-bool KopeteIface::loadPlugin( const QString &name )
+bool KopeteIface::loadPlugin( const TQString &name )
{
if ( Kopete::PluginManager::self()->setPluginEnabled( name ) )
{
- QString argument = name;
+ TQString argument = name;
if ( !argument.startsWith( "kopete_" ) )
argument.prepend( "kopete_" );
return Kopete::PluginManager::self()->loadPlugin( argument );
@@ -260,11 +260,11 @@ bool KopeteIface::loadPlugin( const QString &name )
}
}
-bool KopeteIface::unloadPlugin( const QString &name )
+bool KopeteIface::unloadPlugin( const TQString &name )
{
if ( Kopete::PluginManager::self()->setPluginEnabled( name, false ) )
{
- QString argument = name;
+ TQString argument = name;
if ( !argument.startsWith( "kopete_" ) )
argument.prepend( "kopete_" );
return Kopete::PluginManager::self()->unloadPlugin( argument );
@@ -280,7 +280,7 @@ void KopeteIface::setAway()
Kopete::AccountManager::self()->setAwayAll();
}
-void KopeteIface::setAway(const QString &msg, bool away)
+void KopeteIface::setAway(const TQString &msg, bool away)
{
Kopete::AccountManager::self()->setAwayAll(msg, away);
}
@@ -295,7 +295,7 @@ void KopeteIface::setAutoAway()
Kopete::Away::getInstance()->setAutoAway();
}
-void KopeteIface::setGlobalNickname( const QString &nickname )
+void KopeteIface::setGlobalNickname( const TQString &nickname )
{
if( Kopete::Config::enableGlobalIdentity() )
{
@@ -316,14 +316,14 @@ void KopeteIface::setGlobalPhoto( const KURL &photoUrl )
}
}
-QStringList KopeteIface::contactsForDisplayName( const QString & displayName )
+TQStringList KopeteIface::contactsForDisplayName( const TQString & displayName )
{
Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByDisplayName( displayName );
- QStringList contactIds;
+ TQStringList contactIds;
if ( mc )
{
- QPtrList<Kopete::Contact> contacts = mc->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts = mc->contacts();
+ TQPtrListIterator<Kopete::Contact> it( contacts );
for( ; it.current(); ++it )
{
contactIds.append( (*it)->contactId() );
@@ -332,13 +332,13 @@ QStringList KopeteIface::contactsForDisplayName( const QString & displayName )
return contactIds;
}
-QStringList KopeteIface::metacontactsForContactId( const QString & contactId )
+TQStringList KopeteIface::metacontactsForContactId( const TQString & contactId )
{
Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId );
if ( mc )
- return QStringList( mc->displayName() );
+ return TQStringList( mc->displayName() );
else
- return QStringList();
+ return TQStringList();
}
// vim: set noet ts=4 sts=4 sw=4:
diff --git a/kopete/kopete/kopeteiface.h b/kopete/kopete/kopeteiface.h
index 4ca4c4d1..46a52166 100644
--- a/kopete/kopete/kopeteiface.h
+++ b/kopete/kopete/kopeteiface.h
@@ -19,7 +19,7 @@
#define KopeteIface_h
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include "kopeteonlinestatus.h"
@@ -35,35 +35,35 @@ public:
KopeteIface();
k_dcop:
- QStringList contacts();
- QStringList reachableContacts();
- QStringList onlineContacts();
- QStringList fileTransferContacts();
- QStringList contactFileProtocols(const QString &displayName);
+ TQStringList contacts();
+ TQStringList reachableContacts();
+ TQStringList onlineContacts();
+ TQStringList fileTransferContacts();
+ TQStringList contactFileProtocols(const TQString &displayName);
- /*void sendFile(const QString &displayName, const KURL &sourceURL,
- const QString &altFileName = QString::null, uint fileSize = 0);*/
+ /*void sendFile(const TQString &displayName, const KURL &sourceURL,
+ const TQString &altFileName = TQString::null, uint fileSize = 0);*/
// FIXME: Do we *need* this one? Sounds error prone to me, because
// nicknames can contain parentheses too.
- // Better add a contactStatus( const QString id ) I'd say - Martijn
- QStringList contactsStatus();
+ // Better add a contactStatus( const TQString id ) I'd say - Martijn
+ TQStringList contactsStatus();
/**
* Open a chat to a contact, and optionally set some initial text
*/
- QString messageContact( const QString &contactId, const QString &messageText = QString::null );
+ TQString messageContact( const TQString &contactId, const TQString &messageText = TQString::null );
/**
* Describe the status of a contact by their metaContactId,
* aka their uid in KABC.
*/
- QString onlineStatus( const QString &metaContactId );
+ TQString onlineStatus( const TQString &metaContactId );
/**
* Message a contact by their metaContactId, aka their uid in KABC.
*/
- void messageContactById( const QString &metaContactId );
+ void messageContactById( const TQString &metaContactId );
/**
* Adds a contact with the specified params.
@@ -75,23 +75,23 @@ k_dcop:
* @param groupName The name of the group to add the contact to
* @return Weather or not the contact was added successfully
*/
- bool addContact( const QString &protocolName, const QString &accountId, const QString &contactId,
- const QString &displayName, const QString &groupName = QString::null );
+ bool addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId,
+ const TQString &displayName, const TQString &groupName = TQString::null );
/**
* return a list of alls accounts.
* form: XXXProtocol||AccountId
*/
- QStringList accounts();
+ TQStringList accounts();
/**
* connect a given account in the given protocol
*/
- void connect(const QString &protocolName, const QString &accountId);
+ void connect(const TQString &protocolName, const TQString &accountId);
/**
* disconnect a given account in the given protocol
*/
- void disconnect(const QString &protocolName, const QString &accountId);
+ void disconnect(const TQString &protocolName, const TQString &accountId);
/**
* Ask all accounts to connect
@@ -108,13 +108,13 @@ k_dcop:
* the name is the name of the library: example: kopete_msn
* but you can ommit the kopete_ prefix
*/
- bool loadPlugin( const QString& name );
+ bool loadPlugin( const TQString& name );
/**
* unload a plugin
* the name is the name of the library: example: kopete_msn
* but you can ommit the kopete_ prefix
*/
- bool unloadPlugin( const QString& name );
+ bool unloadPlugin( const TQString& name );
/**
* set all account away using the global away function
@@ -125,14 +125,14 @@ k_dcop:
* set all account away using the global away function
* and set an away message
*/
- void setAway( const QString &msg ) { setAway( msg, true ); }
+ void setAway( const TQString &msg ) { setAway( msg, true ); }
/**
* set all account away using the global away function
* and set an away message.
* @param away decides if the message is away/non-away
*/
- void setAway( const QString &msg, bool away );
+ void setAway( const TQString &msg, bool away );
/**
* set Available all accountes
@@ -148,7 +148,7 @@ k_dcop:
* set the global nickname if global identity is enabled.
* @param nickname the new global nickname
*/
- void setGlobalNickname( const QString &nickname );
+ void setGlobalNickname( const TQString &nickname );
/**
* set the global photo if global identity is enabled.
@@ -160,13 +160,13 @@ k_dcop:
* get the contactIds for a given display name
* @param displayName
*/
- QStringList contactsForDisplayName( const QString & displayName );
+ TQStringList contactsForDisplayName( const TQString & displayName );
/**
* get the metacontactIds that have the given contactId
* @param contactId
*/
- QStringList metacontactsForContactId( const QString & contactId );
+ TQStringList metacontactsForContactId( const TQString & contactId );
};
#endif
diff --git a/kopete/kopete/kopetewindow.cpp b/kopete/kopete/kopetewindow.cpp
index f3ec502e..e013a95c 100644
--- a/kopete/kopete/kopetewindow.cpp
+++ b/kopete/kopete/kopetewindow.cpp
@@ -21,14 +21,14 @@
#include "kopetewindow.h"
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qsignalmapper.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqsignalmapper.h>
#include <kaction.h>
#include <kactionclasses.h>
@@ -82,11 +82,11 @@
#include "kopeteeditglobalidentitywidget.h"
//BEGIN GlobalStatusMessageIconLabel
-GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(QWidget *parent, const char *name)
- : QLabel(parent, name)
+GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{}
-void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event )
+void GlobalStatusMessageIconLabel::mouseReleaseEvent( TQMouseEvent *event )
{
if( event->button() == Qt::LeftButton || event->button() == Qt::RightButton )
{
@@ -120,7 +120,7 @@ void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event )
* (session) quit.
*/
-KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
+KopeteWindow::KopeteWindow( TQWidget *parent, const char *name )
: KMainWindow( parent, name, WType_TopLevel )
{
// Applications should ensure that their StatusBar exists before calling createGUI()
@@ -129,25 +129,25 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
// This fixes a "statusbar drawn over the top of the toolbar" bug
// e.g. it can happen when you switch desktops on Kopete startup
- m_statusBarWidget = new QHBox(statusBar(), "m_statusBarWidget");
+ m_statusBarWidget = new TQHBox(statusBar(), "m_statusBarWidget");
m_statusBarWidget->setMargin( 2 );
m_statusBarWidget->setSpacing( 1 );
statusBar()->addWidget(m_statusBarWidget, 0, true );
- QHBox *statusBarMessage = new QHBox(statusBar(), "m_statusBarWidget");
+ TQHBox *statusBarMessage = new TQHBox(statusBar(), "m_statusBarWidget");
m_statusBarWidget->setMargin( 2 );
m_statusBarWidget->setSpacing( 1 );
GlobalStatusMessageIconLabel *label = new GlobalStatusMessageIconLabel( statusBarMessage, "statusmsglabel" );
label->setFixedSize( 16, 16 );
label->setPixmap( SmallIcon( "kopetestatusmessage" ) );
- connect(label, SIGNAL(iconClicked( const QPoint& )),
- this, SLOT(slotGlobalStatusMessageIconClicked( const QPoint& )));
- QToolTip::add( label, i18n( "Global status message" ) );
+ connect(label, TQT_SIGNAL(iconClicked( const TQPoint& )),
+ this, TQT_SLOT(slotGlobalStatusMessageIconClicked( const TQPoint& )));
+ TQToolTip::add( label, i18n( "Global status message" ) );
m_globalStatusMessage = new KSqueezedTextLabel( statusBarMessage );
statusBar()->addWidget(statusBarMessage, 1, false );
m_pluginConfig = 0L;
- m_autoHideTimer = new QTimer( this );
+ m_autoHideTimer = new TQTimer( this );
// --------------------------------------------------------------------------------
initView();
@@ -157,22 +157,22 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
// --------------------------------------------------------------------------------
// Trap all loaded plugins, so we can add their status bar icons accordingly , also used to add XMLGUIClient
- connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
- this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
- connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ),
- this, SLOT( slotAllPluginsLoaded() ));
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
+ this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ),
+ this, TQT_SLOT( slotAllPluginsLoaded() ));
//Connect the appropriate account signals
/* Please note that I tried to put this in the slotAllPluginsLoaded() function
* but it seemed to break the account icons in the statusbar --Matt */
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)),
- this, SLOT(slotAccountRegistered(Kopete::Account*)));
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(const Kopete::Account*)),
- this, SLOT(slotAccountUnregistered(const Kopete::Account*)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)),
+ this, TQT_SLOT(slotAccountRegistered(Kopete::Account*)));
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(const Kopete::Account*)),
+ this, TQT_SLOT(slotAccountUnregistered(const Kopete::Account*)));
- connect( m_autoHideTimer, SIGNAL( timeout() ), this, SLOT( slotAutoHide() ) );
- connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ),
- this, SLOT( slotContactListAppearanceChanged() ) );
+ connect( m_autoHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoHide() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ),
+ this, TQT_SLOT( slotContactListAppearanceChanged() ) );
createGUI ( "kopeteui.rc", false );
@@ -186,7 +186,7 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name )
slotPluginLoaded( *it );
// If some account alrady loaded, build the status icon
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
slotAccountRegistered(a);
@@ -209,22 +209,22 @@ void KopeteWindow::initActions()
actionCollection(), "AddContact" );
actionAddContact->setDelayed( false );
// this signal mapper is needed to call slotAddContact with the correct arguments
- addContactMapper = new QSignalMapper( this );
- connect( addContactMapper, SIGNAL( mapped( const QString & ) ),
- this, SLOT( slotAddContactDialogInternal( const QString & ) ) );
+ addContactMapper = new TQSignalMapper( this );
+ connect( addContactMapper, TQT_SIGNAL( mapped( const TQString & ) ),
+ this, TQT_SLOT( slotAddContactDialogInternal( const TQString & ) ) );
/* ConnectAll is now obsolete. "Go online" has replaced it.
actionConnect = new KAction( i18n( "&Connect Accounts" ), "connect_creating",
- 0, Kopete::AccountManager::self(), SLOT( connectAll() ),
+ 0, Kopete::AccountManager::self(), TQT_SLOT( connectAll() ),
actionCollection(), "ConnectAll" );
*/
actionDisconnect = new KAction( i18n( "O&ffline" ), "connect_no",
- 0, this, SLOT( slotDisconnectAll() ),
+ 0, this, TQT_SLOT( slotDisconnectAll() ),
actionCollection(), "DisconnectAll" );
actionExportContacts = new KAction( i18n( "&Export Contacts..." ), "", 0, this,
- SLOT( showExportDialog() ),actionCollection(), "ExportContacts" );
+ TQT_SLOT( showExportDialog() ),actionCollection(), "ExportContacts" );
/* the connection menu has been replaced by the set status menu
actionConnectionMenu = new KActionMenu( i18n("Connection"),"connect_established",
@@ -238,28 +238,28 @@ void KopeteWindow::initActions()
actionDisconnect->setEnabled(false);
selectAway = new KAction( i18n("&Away"), SmallIcon("kopeteaway"), 0,
- this, SLOT( slotGlobalAway() ), actionCollection(),
+ this, TQT_SLOT( slotGlobalAway() ), actionCollection(),
"SetAwayAll" );
selectBusy = new KAction( i18n("&Busy"), SmallIcon("kopeteaway"), 0,
- this, SLOT( slotGlobalBusy() ), actionCollection(),
+ this, TQT_SLOT( slotGlobalBusy() ), actionCollection(),
"SetBusyAll" );
actionSetInvisible = new KAction( i18n( "&Invisible" ), "kopeteavailable", 0 ,
- this, SLOT( slotSetInvisibleAll() ), actionCollection(),
+ this, TQT_SLOT( slotSetInvisibleAll() ), actionCollection(),
"SetInvisibleAll" );
/*actionSetAvailable = new KAction( i18n( "&Online" ),
"kopeteavailable", 0 , Kopete::AccountManager::self(),
- SLOT( setAvailableAll() ), actionCollection(),
+ TQT_SLOT( setAvailableAll() ), actionCollection(),
"SetAvailableAll" );*/
actionSetAvailable = new KAction( i18n("&Online"),
SmallIcon("kopeteavailable"), 0, this,
- SLOT( slotGlobalAvailable() ), actionCollection(),
+ TQT_SLOT( slotGlobalAvailable() ), actionCollection(),
"SetAvailableAll" );
actionAwayMenu = new KActionMenu( i18n("&Set Status"), "kopeteavailable",
@@ -273,40 +273,40 @@ void KopeteWindow::initActions()
actionPrefs = KopeteStdAction::preferences( actionCollection(), "settings_prefs" );
- KStdAction::quit(this, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection());
setStandardToolBarMenuEnabled(true);
- menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection(), "settings_showmenubar" );
- statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar");
+ menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection(), "settings_showmenubar" );
+ statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar");
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection(), "settings_keys" );
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection(), "settings_keys" );
new KAction( i18n( "Configure Plugins..." ), "input_devices_settings", 0, this,
- SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" );
+ TQT_SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" );
new KAction( i18n( "Configure &Global Shortcuts..." ), "configure_shortcuts", 0, this,
- SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" );
+ TQT_SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" );
- KStdAction::configureToolbars( this, SLOT(slotConfToolbar()), actionCollection() );
- KStdAction::configureNotifications(this, SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" );
+ KStdAction::configureToolbars( this, TQT_SLOT(slotConfToolbar()), actionCollection() );
+ KStdAction::configureNotifications(this, TQT_SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" );
actionShowOffliners = new KToggleAction( i18n( "Show Offline &Users" ), "show_offliners", CTRL + Key_U,
- this, SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" );
+ this, TQT_SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" );
actionShowEmptyGroups = new KToggleAction( i18n( "Show Empty &Groups" ), "folder", CTRL + Key_G,
- this, SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" );
+ this, TQT_SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" );
actionShowOffliners->setCheckedState(i18n("Hide Offline &Users"));
actionShowEmptyGroups->setCheckedState(i18n("Hide Empty &Groups"));
// quick search bar
- QLabel *searchLabel = new QLabel( i18n("Se&arch:"), 0, "kde toolbar widget" );
- QWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" );
+ TQLabel *searchLabel = new TQLabel( i18n("Se&arch:"), 0, "kde toolbar widget" );
+ TQWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" );
searchLabel->setBuddy( searchBar );
KWidgetAction *quickSearch = new KWidgetAction( searchBar, i18n( "Quick Search Bar" ), 0, 0, 0, actionCollection(), "quicksearch_bar" );
new KWidgetAction( searchLabel, i18n( "Search:" ), 0, 0, 0, actionCollection(), "quicksearch_label" );
quickSearch->setAutoSized( true );
// quick search bar - clear button
KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ),
- QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
- 0, searchBar, SLOT( clear() ), actionCollection(), "quicksearch_reset" );
+ TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
+ 0, searchBar, TQT_SLOT( clear() ), actionCollection(), "quicksearch_reset" );
resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search\n"
"Resets the quick search so that all contacts and groups are shown again." ) );
@@ -319,22 +319,22 @@ void KopeteWindow::initActions()
// KActionMenu for selecting the global status message(kopeteonlinestatus_0)
KActionMenu * setStatusMenu = new KActionMenu( i18n( "Set Status Message" ), "kopeteeditstatusmessage", actionCollection(), "SetStatusMessage" );
setStatusMenu->setDelayed( false );
- connect( setStatusMenu->popupMenu(), SIGNAL( aboutToShow() ), SLOT(slotBuildStatusMessageMenu() ) );
- connect( setStatusMenu->popupMenu(), SIGNAL( activated( int ) ), SLOT(slotStatusMessageSelected( int ) ) );
+ connect( setStatusMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT(slotBuildStatusMessageMenu() ) );
+ connect( setStatusMenu->popupMenu(), TQT_SIGNAL( activated( int ) ), TQT_SLOT(slotStatusMessageSelected( int ) ) );
// sync actions, config and prefs-dialog
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
slotConfigChanged();
globalAccel = new KGlobalAccel( this );
- globalAccel->insert( QString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"),
- CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), SLOT(slotReadMessage()) );
+ globalAccel->insert( TQString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"),
+ CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), TQT_SLOT(slotReadMessage()) );
- globalAccel->insert( QString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"),
- CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, SLOT(slotShowHide()) );
+ globalAccel->insert( TQString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"),
+ CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, TQT_SLOT(slotShowHide()) );
- globalAccel->insert( QString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"),
- CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, SLOT(slotToggleAway()) );
+ globalAccel->insert( TQString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"),
+ CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, TQT_SLOT(slotToggleAway()) );
globalAccel->readSettings();
globalAccel->updateConnections();
@@ -371,7 +371,7 @@ void KopeteWindow::slotToggleAway()
}
else
{
- QString awayReason = mAway->getMessage( 0 );
+ TQString awayReason = mAway->getMessage( 0 );
slotGlobalAway();
}
}
@@ -391,9 +391,9 @@ void KopeteWindow::initSystray()
//actionConnectionMenu->plug ( tm, 1 );
tm->insertSeparator( 1 );
- QObject::connect( m_tray, SIGNAL( aboutToShowMenu( KPopupMenu * ) ),
- this, SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) );
- QObject::connect( m_tray, SIGNAL( quitSelected() ), this, SLOT( slotQuit() ) );
+ TQObject::connect( m_tray, TQT_SIGNAL( aboutToShowMenu( KPopupMenu * ) ),
+ this, TQT_SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) );
+ TQObject::connect( m_tray, TQT_SIGNAL( quitSelected() ), this, TQT_SLOT( slotQuit() ) );
}
KopeteWindow::~KopeteWindow()
@@ -401,7 +401,7 @@ KopeteWindow::~KopeteWindow()
delete m_pluginConfig;
}
-bool KopeteWindow::eventFilter( QObject* target, QEvent* event )
+bool KopeteWindow::eventFilter( TQObject* target, TQEvent* event )
{
KToolBar* toolBar = dynamic_cast<KToolBar*>( target );
KAction* resetAction = actionCollection()->action( "quicksearch_reset" );
@@ -409,7 +409,7 @@ bool KopeteWindow::eventFilter( QObject* target, QEvent* event )
if ( toolBar && resetAction && resetAction->isPlugged( toolBar ) )
{
- if ( event->type() == QEvent::Hide )
+ if ( event->type() == TQEvent::Hide )
{
resetAction->activate();
return true;
@@ -430,16 +430,16 @@ void KopeteWindow::loadOptions()
// FIXME: HACK: Is there a way to do that automatic ?
editGlobalIdentityWidget->setIconSize(toolBar("editGlobalIdentityBar")->iconSize());
- connect(toolBar("editGlobalIdentityBar"), SIGNAL(modechange()), editGlobalIdentityWidget, SLOT(iconSizeChanged()));
+ connect(toolBar("editGlobalIdentityBar"), TQT_SIGNAL(modechange()), editGlobalIdentityWidget, TQT_SLOT(iconSizeChanged()));
applyMainWindowSettings( config, "General Options" );
config->setGroup("General Options");
- QPoint pos = config->readPointEntry("Position");
+ TQPoint pos = config->readPointEntry("Position");
move(pos);
- QSize size = config->readSizeEntry("Geometry");
+ TQSize size = config->readSizeEntry("Geometry");
if(size.isEmpty()) // Default size
- resize( QSize(220, 350) );
+ resize( TQSize(220, 350) );
else
resize(size);
@@ -449,7 +449,7 @@ void KopeteWindow::loadOptions()
m_autoHideTimeout = p->contactListAutoHideTimeout();
- QString tmp = config->readEntry("State", "Shown");
+ TQString tmp = config->readEntry("State", "Shown");
if ( tmp == "Minimized" && p->showTray())
{
showMinimized();
@@ -518,9 +518,9 @@ void KopeteWindow::slotToggleShowOffliners()
KopetePrefs *p = KopetePrefs::prefs();
p->setShowOffline ( actionShowOffliners->isChecked() );
- disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
p->save();
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
}
void KopeteWindow::slotToggleShowEmptyGroups()
@@ -528,9 +528,9 @@ void KopeteWindow::slotToggleShowEmptyGroups()
KopetePrefs *p = KopetePrefs::prefs();
p->setShowEmptyGroups ( actionShowEmptyGroups->isChecked() );
- disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
p->save();
- connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) );
+ connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) );
}
void KopeteWindow::slotConfigChanged()
@@ -578,8 +578,8 @@ void KopeteWindow::slotConfToolbar()
{
saveMainWindowSettings(KGlobal::config(), "General Options");
KEditToolbar *dlg = new KEditToolbar(factory());
- connect( dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotUpdateToolbar()) );
- connect( dlg, SIGNAL(finished()) , dlg, SLOT(deleteLater()));
+ connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotUpdateToolbar()) );
+ connect( dlg, TQT_SIGNAL(finished()) , dlg, TQT_SLOT(deleteLater()));
dlg->show();
}
@@ -612,7 +612,7 @@ void KopeteWindow::slotSetInvisibleAll()
void KopeteWindow::slotDisconnectAll()
{
m_globalStatusMessage->setText( "" );
- m_globalStatusMessageStored = QString();
+ m_globalStatusMessageStored = TQString();
Kopete::AccountManager::self()->disconnectAll();
}
@@ -651,7 +651,7 @@ bool KopeteWindow::queryExit()
return false;
}
-void KopeteWindow::closeEvent( QCloseEvent *e )
+void KopeteWindow::closeEvent( TQCloseEvent *e )
{
// if there's a system tray applet and we are not shutting down then just do what needs to be done if a
// window is closed.
@@ -704,46 +704,46 @@ void KopeteWindow::slotAccountRegistered( Kopete::Account *account )
actionDisconnect->setEnabled(true);
connect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ),
- this, SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) );
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ),
+ this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) );
-// connect( account, SIGNAL( iconAppearanceChanged() ), SLOT( slotAccountStatusIconChanged() ) );
- connect( account, SIGNAL( colorChanged(const QColor& ) ), SLOT( slotAccountStatusIconChanged() ) );
+// connect( account, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( slotAccountStatusIconChanged() ) );
+ connect( account, TQT_SIGNAL( colorChanged(const TQColor& ) ), TQT_SLOT( slotAccountStatusIconChanged() ) );
connect( account->myself(),
- SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ),
- this, SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) );
+ TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
+ this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) );
KopeteAccountStatusBarIcon *sbIcon = new KopeteAccountStatusBarIcon( account, m_statusBarWidget );
- connect( sbIcon, SIGNAL( rightClicked( Kopete::Account *, const QPoint & ) ),
- SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
- const QPoint & ) ) );
- connect( sbIcon, SIGNAL( leftClicked( Kopete::Account *, const QPoint & ) ),
- SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
- const QPoint & ) ) );
+ connect( sbIcon, TQT_SIGNAL( rightClicked( Kopete::Account *, const TQPoint & ) ),
+ TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
+ const TQPoint & ) ) );
+ connect( sbIcon, TQT_SIGNAL( leftClicked( Kopete::Account *, const TQPoint & ) ),
+ TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *,
+ const TQPoint & ) ) );
m_accountStatusBarIcons.insert( account, sbIcon );
slotAccountStatusIconChanged( account->myself() );
// add an item for this account to the add contact actionmenu
- QString s = "actionAdd%1Contact";
+ TQString s = "actionAdd%1Contact";
s.arg( account->accountId() );
- KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, SLOT( map() ), account, s.latin1() );
- addContactMapper->setMapping( action, account->protocol()->pluginId() + QChar(0xE000) + account->accountId() );
+ KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, TQT_SLOT( map() ), account, s.latin1() );
+ addContactMapper->setMapping( action, account->protocol()->pluginId() + TQChar(0xE000) + account->accountId() );
actionAddContact->insert( action );
}
void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account)
{
// kdDebug(14000) << k_funcinfo << "Called." << endl;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
if (accounts.isEmpty())
{
// actionConnect->setEnabled(false);
actionDisconnect->setEnabled(false);
}
- // the (void*) is to remove the const. i don't know why QPtrList doesn't accept const ptr as key.
+ // the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key.
KopeteAccountStatusBarIcon *sbIcon = static_cast<KopeteAccountStatusBarIcon *>( m_accountStatusBarIcons[ (void*)account ] );
if( !sbIcon )
@@ -755,7 +755,7 @@ void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account)
makeTrayToolTip();
// update add contact actionmenu
- QString s = "actionAdd%1Contact";
+ TQString s = "actionAdd%1Contact";
s.arg( account->accountId() );
// KAction * action = actionCollection()->action( account->accountId() );
Kopete::Account * myAccount = const_cast< Kopete::Account * > ( account );
@@ -778,11 +778,11 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
{
kdDebug( 14000 ) << k_funcinfo << contact->property( Kopete::Global::Properties::self()->awayMessage() ).value() << endl;
// update the global status label if the change doesn't
-// QString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
+// TQString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
Kopete::OnlineStatus status = contact->onlineStatus();
/* if ( status.status() != Kopete::OnlineStatus::Connecting )
{
- QString globalMessage = m_globalStatusMessage->text();
+ TQString globalMessage = m_globalStatusMessage->text();
if ( newAwayMessage != globalMessage )
m_globalStatusMessage->setText( "" /* i18n("status message to show when different accounts have different status messages", "(multiple)" )*/ /*);
}*/
@@ -799,8 +799,8 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
else //If the account has not status message, it may be because the protocol doesn't support it (Bug 132609)
{ // or because the user just set an empty status to this account.
// We will check if another account has still a status message, if yes, we will use it, if not, we will clear it.
- QString statusMessageToUse;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString statusMessageToUse;
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a = accounts.first(); a; a = accounts.next())
{
Kopete::Contact *self = a->myself();
@@ -823,22 +823,22 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
// Adds tooltip for each status icon,
// useful in case you have many accounts
// over one protocol
- QToolTip::remove( i );
- QToolTip::add( i, contact->toolTip() );
+ TQToolTip::remove( i );
+ TQToolTip::add( i, contact->toolTip() );
// Because we want null pixmaps to detect the need for a loadMovie
// we can't use the SmallIcon() method directly
KIconLoader *loader = KGlobal::instance()->iconLoader();
- QMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small );
+ TQMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small );
if ( mv.isNull() )
{
// No movie found, fallback to pixmap
// Get the icon for our status
- //QPixmap pm = SmallIcon( icon );
- QPixmap pm = status.iconFor( contact->account() );
+ //TQPixmap pm = SmallIcon( icon );
+ TQPixmap pm = status.iconFor( contact->account() );
// No Pixmap found, fallback to Unknown
if( pm.isNull() )
@@ -859,10 +859,10 @@ void KopeteWindow::makeTrayToolTip()
//the tool-tip of the systemtray.
if(m_tray)
{
- QToolTip::remove(m_tray);
+ TQToolTip::remove(m_tray);
- QString tt = QString::fromLatin1("<qt>");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQString tt = TQString::fromLatin1("<qt>");
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a = accounts.first(); a; a = accounts.next())
{
Kopete::Contact *self = a->myself();
@@ -871,45 +871,45 @@ void KopeteWindow::makeTrayToolTip()
.arg( a->protocol()->displayName() ).arg( a->accountLabel(), KURL::encode_string( a->protocol()->pluginId() ),
KURL::encode_string( a->accountId() ), self->onlineStatus().description() );
}
- tt += QString::fromLatin1("</qt>");
- QToolTip::add(m_tray, tt);
+ tt += TQString::fromLatin1("</qt>");
+ TQToolTip::add(m_tray, tt);
}
}
-void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const QPoint &p )
+void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const TQPoint &p )
{
KActionMenu *actionMenu = account->actionMenu();
if ( !actionMenu )
return;
- connect( actionMenu->popupMenu(), SIGNAL( aboutToHide() ), actionMenu, SLOT( deleteLater() ) );
+ connect( actionMenu->popupMenu(), TQT_SIGNAL( aboutToHide() ), actionMenu, TQT_SLOT( deleteLater() ) );
actionMenu->popupMenu()->popup( p );
}
void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * popup )
{
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
{
KActionMenu *menu = a->actionMenu();
if( menu )
menu->plug(popup, 1 );
- connect(popup , SIGNAL(aboutToHide()) , menu , SLOT(deleteLater()));
+ connect(popup , TQT_SIGNAL(aboutToHide()) , menu , TQT_SLOT(deleteLater()));
}
}
-/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p )
+/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p )
{
//kdDebug( 14000 ) << k_funcinfo << endl;
if ( Kopete::AccountManager::self()->accounts( proto ).count() > 0 )
{
KActionMenu *menu = proto->protocolActions();
- connect( menu->popupMenu(), SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) );
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) );
menu->popupMenu()->popup( p );
}
}*/
@@ -919,19 +919,19 @@ void KopeteWindow::showExportDialog()
( new KabcExportWizard( this, "export_contact_dialog" ) )->show();
}
-void KopeteWindow::leaveEvent( QEvent * )
+void KopeteWindow::leaveEvent( TQEvent * )
{
startAutoHideTimer();
}
-void KopeteWindow::showEvent( QShowEvent * )
+void KopeteWindow::showEvent( TQShowEvent * )
{
startAutoHideTimer();
}
void KopeteWindow::slotAutoHide()
{
- if ( this->geometry().contains( QCursor::pos() ) == false )
+ if ( this->geometry().contains( TQCursor::pos() ) == false )
{
/* The autohide-timer doesn't need to emit
* timeouts when the window is hidden already. */
@@ -948,10 +948,10 @@ void KopeteWindow::startAutoHideTimer()
// Iterate each connected account, updating its status message bug keeping the
// same onlinestatus. Then update Kopete::Away and the UI.
-void KopeteWindow::setStatusMessage( const QString & message )
+void KopeteWindow::setStatusMessage( const TQString & message )
{
bool changed = false;
- for ( QPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it )
+ for ( TQPtrListIterator<Kopete::Account> it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it )
{
Kopete::Contact *self = it.current()->myself();
bool isInvisible = self && self->onlineStatus().status() == Kopete::OnlineStatus::Invisible;
@@ -968,28 +968,28 @@ void KopeteWindow::setStatusMessage( const QString & message )
void KopeteWindow::slotBuildStatusMessageMenu()
{
- QObject * senderObj = const_cast<QObject *>( sender() );
+ TQObject * senderObj = const_cast<TQObject *>( sender() );
m_globalStatusMessageMenu = static_cast<KPopupMenu *>( senderObj );
m_globalStatusMessageMenu->clear();
// pop up a menu containing the away messages, and a lineedit
// see kopeteaway
//messageMenu = new KPopupMenu( this );
// messageMenu->insertTitle( i18n( "Status Message" ) );
- QHBox * newMessageBox = new QHBox( 0 );
+ TQHBox * newMessageBox = new TQHBox( 0 );
newMessageBox->setMargin( 1 );
- QLabel * newMessagePix = new QLabel( newMessageBox );
+ TQLabel * newMessagePix = new TQLabel( newMessageBox );
newMessagePix->setPixmap( SmallIcon( "edit" ) );
-/* QLabel * newMessageLabel = new QLabel( i18n( "Add " ), newMessageBox );*/
- m_newMessageEdit = new QLineEdit( newMessageBox, "newmessage" );
+/* TQLabel * newMessageLabel = new TQLabel( i18n( "Add " ), newMessageBox );*/
+ m_newMessageEdit = new TQLineEdit( newMessageBox, "newmessage" );
newMessageBox->setFocusProxy( m_newMessageEdit );
- newMessageBox->setFocusPolicy( QWidget::ClickFocus );
+ newMessageBox->setFocusPolicy( TQWidget::ClickFocus );
/* newMessageLabel->setFocusProxy( newMessageEdit );
newMessageLabel->setBuddy( newMessageEdit );
- newMessageLabel->setFocusPolicy( QWidget::ClickFocus );*/
+ newMessageLabel->setFocusPolicy( TQWidget::ClickFocus );*/
newMessagePix->setFocusProxy( m_newMessageEdit );
- newMessagePix->setFocusPolicy( QWidget::ClickFocus );
- connect( m_newMessageEdit, SIGNAL( returnPressed() ), SLOT( slotNewStatusMessageEntered() ) );
+ newMessagePix->setFocusPolicy( TQWidget::ClickFocus );
+ connect( m_newMessageEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotNewStatusMessageEntered() ) );
m_globalStatusMessageMenu->insertItem( newMessageBox );
@@ -998,13 +998,13 @@ void KopeteWindow::slotBuildStatusMessageMenu()
m_globalStatusMessageMenu->insertItem( SmallIcon( "remove" ), i18n( "No Message" ), i++ );
m_globalStatusMessageMenu->insertSeparator();
- QStringList awayMessages = Kopete::Away::getInstance()->getMessages();
- for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i )
+ TQStringList awayMessages = Kopete::Away::getInstance()->getMessages();
+ for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i )
{
m_globalStatusMessageMenu->insertItem( KStringHandler::rsqueeze( *it ), i );
}
-// connect( m_globalStatusMessageMenu, SIGNAL( activated( int ) ), SLOT( slotStatusMessageSelected( int ) ) );
-// connect( messageMenu, SIGNAL( aboutToHide() ), messageMenu, SLOT( deleteLater() ) );
+// connect( m_globalStatusMessageMenu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotStatusMessageSelected( int ) ) );
+// connect( messageMenu, TQT_SIGNAL( aboutToHide() ), messageMenu, TQT_SLOT( deleteLater() ) );
m_newMessageEdit->setFocus();
@@ -1023,27 +1023,27 @@ void KopeteWindow::slotStatusMessageSelected( int i )
void KopeteWindow::slotNewStatusMessageEntered()
{
m_globalStatusMessageMenu->close();
- QString newMessage = m_newMessageEdit->text();
+ TQString newMessage = m_newMessageEdit->text();
if ( !newMessage.isEmpty() )
Kopete::Away::getInstance()->addMessage( newMessage );
setStatusMessage( m_newMessageEdit->text() );
}
-void KopeteWindow::slotGlobalStatusMessageIconClicked( const QPoint &position )
+void KopeteWindow::slotGlobalStatusMessageIconClicked( const TQPoint &position )
{
KPopupMenu *statusMessageIconMenu = new KPopupMenu(this, "statusMessageIconMenu");
- connect(statusMessageIconMenu, SIGNAL( aboutToShow() ),
- this, SLOT(slotBuildStatusMessageMenu()));
- connect( statusMessageIconMenu, SIGNAL( activated( int ) ),
- SLOT( slotStatusMessageSelected( int ) ) );
+ connect(statusMessageIconMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT(slotBuildStatusMessageMenu()));
+ connect( statusMessageIconMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotStatusMessageSelected( int ) ) );
statusMessageIconMenu->popup(position);
}
-void KopeteWindow::slotAddContactDialogInternal( const QString & accountIdentifier )
+void KopeteWindow::slotAddContactDialogInternal( const TQString & accountIdentifier )
{
- QString protocolId = accountIdentifier.section( QChar(0xE000), 0, 0 );
- QString accountId = accountIdentifier.section( QChar(0xE000), 1, 1 );
+ TQString protocolId = accountIdentifier.section( TQChar(0xE000), 0, 0 );
+ TQString accountId = accountIdentifier.section( TQChar(0xE000), 1, 1 );
Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId, accountId );
showAddContactDialog( account );
}
@@ -1059,7 +1059,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
i18n( "Add Contact" ), KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, true );
- QVBox * mainWid = new QVBox( addDialog );
+ TQVBox * mainWid = new TQVBox( addDialog );
AddContactPage *addContactPage =
account->protocol()->createAddContactWidget( mainWid, account );
@@ -1068,10 +1068,10 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
// Populate the groups list
Kopete::GroupList groups=Kopete::ContactList::self()->groups();
- QDict<Kopete::Group> groupItems;
+ TQDict<Kopete::Group> groupItems;
for( Kopete::Group *it = groups.first(); it; it = groups.next() )
{
- QString groupname = it->displayName();
+ TQString groupname = it->displayName();
if ( !groupname.isEmpty() )
{
groupItems.insert( groupname, it );
@@ -1087,7 +1087,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account )
else
{
addDialog->setMainWidget( mainWid );
- if( addDialog->exec() == QDialog::Accepted )
+ if( addDialog->exec() == TQDialog::Accepted )
{
if( addContactPage->validateData() )
{
diff --git a/kopete/kopete/kopetewindow.h b/kopete/kopete/kopetewindow.h
index cc466883..158b2805 100644
--- a/kopete/kopete/kopetewindow.h
+++ b/kopete/kopete/kopetewindow.h
@@ -20,10 +20,10 @@
#ifndef KOPETEWINDOW_H
#define KOPETEWINDOW_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kmainwindow.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class QHBox;
class QTimer;
@@ -63,15 +63,15 @@ class KopeteWindow : public KMainWindow
Q_OBJECT
public:
- KopeteWindow ( QWidget *parent = 0, const char *name = 0 );
+ KopeteWindow ( TQWidget *parent = 0, const char *name = 0 );
~KopeteWindow();
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
protected:
- virtual void closeEvent( QCloseEvent *ev );
- virtual void leaveEvent( QEvent* ev );
- virtual void showEvent( QShowEvent* ev );
+ virtual void closeEvent( TQCloseEvent *ev );
+ virtual void leaveEvent( TQEvent* ev );
+ virtual void showEvent( TQShowEvent* ev );
private slots:
void showMenubar();
@@ -89,7 +89,7 @@ private slots:
/* show the global status message selector menu
*/
- void setStatusMessage( const QString & );
+ void setStatusMessage( const TQString & );
/**
* Checks if the mousecursor is in the contact list.
@@ -146,13 +146,13 @@ private slots:
/**
* Show a context menu for a protocol
*/
-// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p );
+// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p );
/**
* Show a context menu for an account
*/
void slotAccountStatusIconRightClicked( Kopete::Account *a,
- const QPoint &p );
+ const TQPoint &p );
void slotTrayAboutToShowMenu(KPopupMenu *);
@@ -183,15 +183,15 @@ private slots:
/**
* Show the set global status message menu when clicking on the icon in the status bar.
*/
- void slotGlobalStatusMessageIconClicked( const QPoint &position );
+ void slotGlobalStatusMessageIconClicked( const TQPoint &position );
/**
- * Extracts protocolId and accountId from the single QString argument signalled by a QSignalMapper,
+ * Extracts protocolId and accountId from the single TQString argument signalled by a TQSignalMapper,
* get the account, and call showAddContactDialog.
- * @param accountIdentifer QString of protocolId and accountId, concatenated with QChar( 0xE000 )
- * We need both to uniquely identify an account, but QSignalMapper only emits one QString.
+ * @param accountIdentifer TQString of protocolId and accountId, concatenated with TQChar( 0xE000 )
+ * We need both to uniquely identify an account, but TQSignalMapper only emits one TQString.
*/
- void slotAddContactDialogInternal( const QString & accountIdentifier );
+ void slotAddContactDialogInternal( const TQString & accountIdentifier );
public:
KopeteContactListView *contactlist;
@@ -238,27 +238,27 @@ private:
int docked;
bool hidden;
int deskRight;
- QPoint position;
- QHBox *m_statusBarWidget;
+ TQPoint position;
+ TQHBox *m_statusBarWidget;
KopeteSystemTray *m_tray;
bool m_autoHide;
unsigned int m_autoHideTimeout;
- QTimer* m_autoHideTimer;
- QSignalMapper* addContactMapper;
+ TQTimer* m_autoHideTimer;
+ TQSignalMapper* addContactMapper;
KopetePluginConfig *m_pluginConfig;
/**
* This is really a dictionary of KopeteAccountStatusBarIcon objects, but
- * QPtrDict requires a full class definition to be known to make
+ * TQPtrDict requires a full class definition to be known to make
* that work. And since I don't want to include that whole file here,
- * use QObject instead.
+ * use TQObject instead.
*/
- QPtrDict<QObject> m_accountStatusBarIcons;
+ TQPtrDict<TQObject> m_accountStatusBarIcons;
KSqueezedTextLabel * m_globalStatusMessage;
KPopupMenu * m_globalStatusMessageMenu;
- QLineEdit * m_newMessageEdit;
- QString m_globalStatusMessageStored;
+ TQLineEdit * m_newMessageEdit;
+ TQString m_globalStatusMessageStored;
};
@@ -266,13 +266,13 @@ class GlobalStatusMessageIconLabel : public QLabel
{
Q_OBJECT
public:
- GlobalStatusMessageIconLabel(QWidget *parent = 0, const char *name = 0);
+ GlobalStatusMessageIconLabel(TQWidget *parent = 0, const char *name = 0);
protected:
- void mouseReleaseEvent(QMouseEvent *event);
+ void mouseReleaseEvent(TQMouseEvent *event);
signals:
- void iconClicked(const QPoint &position);
+ void iconClicked(const TQPoint &position);
};
diff --git a/kopete/kopete/systemtray.cpp b/kopete/kopete/systemtray.cpp
index 5ed018c5..d71b3816 100644
--- a/kopete/kopete/systemtray.cpp
+++ b/kopete/kopete/systemtray.cpp
@@ -19,9 +19,9 @@
#include "systemtray.h"
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
#include <kwin.h>
#include <kaboutdata.h>
@@ -41,7 +41,7 @@
KopeteSystemTray* KopeteSystemTray::s_systemTray = 0L;
-KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* name )
+KopeteSystemTray* KopeteSystemTray::systemTray( TQWidget *parent, const char* name )
{
if( !s_systemTray )
s_systemTray = new KopeteSystemTray( parent, name );
@@ -49,27 +49,27 @@ KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* nam
return s_systemTray;
}
-KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name)
+KopeteSystemTray::KopeteSystemTray(TQWidget* parent, const char* name)
: KSystemTray(parent,name)
{
// kdDebug(14010) << "Creating KopeteSystemTray" << endl;
- QToolTip::add( this, kapp->aboutData()->shortDescription() );
+ TQToolTip::add( this, kapp->aboutData()->shortDescription() );
mIsBlinkIcon = false;
mIsBlinking = false;
- mBlinkTimer = new QTimer(this, "mBlinkTimer");
+ mBlinkTimer = new TQTimer(this, "mBlinkTimer");
mKopeteIcon = loadIcon("kopete");
- connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlink()));
- connect(Kopete::ChatSessionManager::self() , SIGNAL(newEvent(Kopete::MessageEvent*)),
- this, SLOT(slotNewEvent(Kopete::MessageEvent*)));
- connect(KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()));
+ connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlink()));
+ connect(Kopete::ChatSessionManager::self() , TQT_SIGNAL(newEvent(Kopete::MessageEvent*)),
+ this, TQT_SLOT(slotNewEvent(Kopete::MessageEvent*)));
+ connect(KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()));
connect(Kopete::AccountManager::self(),
- SIGNAL(accountOnlineStatusChanged(Kopete::Account *,
+ TQT_SIGNAL(accountOnlineStatusChanged(Kopete::Account *,
const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)),
- this, SLOT(slotReevaluateAccountStates()));
+ this, TQT_SLOT(slotReevaluateAccountStates()));
// the slot called by default by the quit action, KSystemTray::maybeQuit(),
// just closes the parent window, which is hard to distinguish in that window's closeEvent()
@@ -81,7 +81,7 @@ KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name)
KAction *quit = actionCollection()->action( "file_quit" );
quit->disconnect();
KopeteWindow *myParent = static_cast<KopeteWindow *>( parent );
- connect( quit, SIGNAL( activated() ), myParent, SLOT( slotQuit() ) );
+ connect( quit, TQT_SIGNAL( activated() ), myParent, TQT_SLOT( slotQuit() ) );
//setPixmap(mKopeteIcon);
slotReevaluateAccountStates();
@@ -97,11 +97,11 @@ KopeteSystemTray::~KopeteSystemTray()
Kopete::UI::Global::setSysTrayWId( 0 );
}
-void KopeteSystemTray::mousePressEvent( QMouseEvent *me )
+void KopeteSystemTray::mousePressEvent( TQMouseEvent *me )
{
if (
- (me->button() == QEvent::MidButton ||
- (me->button() == QEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) &&
+ (me->button() == TQEvent::MidButton ||
+ (me->button() == TQEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) &&
mIsBlinking )
{
mouseDoubleClickEvent( me );
@@ -111,7 +111,7 @@ void KopeteSystemTray::mousePressEvent( QMouseEvent *me )
KSystemTray::mousePressEvent( me );
}
-void KopeteSystemTray::mouseDoubleClickEvent( QMouseEvent *me )
+void KopeteSystemTray::mouseDoubleClickEvent( TQMouseEvent *me )
{
if ( !mIsBlinking )
{
@@ -130,12 +130,12 @@ void KopeteSystemTray::contextMenuAboutToShow( KPopupMenu *me )
emit aboutToShowMenu( me );
}
-void KopeteSystemTray::startBlink( const QString &icon )
+void KopeteSystemTray::startBlink( const TQString &icon )
{
startBlink( KGlobal::iconLoader()->loadIcon( icon , KIcon::Panel ) );
}
-void KopeteSystemTray::startBlink( const QPixmap &icon )
+void KopeteSystemTray::startBlink( const TQPixmap &icon )
{
mBlinkIcon = icon;
if ( mBlinkTimer->isActive() == false )
@@ -153,10 +153,10 @@ void KopeteSystemTray::startBlink( const QPixmap &icon )
}
}
-void KopeteSystemTray::startBlink( const QMovie &movie )
+void KopeteSystemTray::startBlink( const TQMovie &movie )
{
//kdDebug( 14010 ) << k_funcinfo << "starting movie." << endl;
- const_cast<QMovie &>( movie ).unpause();
+ const_cast<TQMovie &>( movie ).unpause();
setMovie( movie );
mIsBlinking = true;
}
@@ -164,7 +164,7 @@ void KopeteSystemTray::startBlink( const QMovie &movie )
void KopeteSystemTray::startBlink()
{
if ( mMovie.isNull() )
- mMovie = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Panel );
+ mMovie = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Panel );
startBlink( mMovie );
}
@@ -205,8 +205,8 @@ void KopeteSystemTray::slotNewEvent( Kopete::MessageEvent *event )
mBalloonEventList.append( event );
}
- connect(event, SIGNAL(done(Kopete::MessageEvent*)),
- this, SLOT(slotEventDone(Kopete::MessageEvent*)));
+ connect(event, TQT_SIGNAL(done(Kopete::MessageEvent*)),
+ this, TQT_SLOT(slotEventDone(Kopete::MessageEvent*)));
if( event->message().manager() != 0 )
{
@@ -262,7 +262,7 @@ void KopeteSystemTray::removeBalloonEvent(Kopete::MessageEvent *event)
{
//delay the addBalloon to let the time to event be deleted
//in case a contact has been deleted cf Bug 100196
- QTimer::singleShot(0, this, SLOT(addBalloon()));
+ TQTimer::singleShot(0, this, TQT_SLOT(addBalloon()));
}
else
{
@@ -291,10 +291,10 @@ void KopeteSystemTray::addBalloon()
if ( msg.from() )
{
- QString msgText = squashMessage( msg );
+ TQString msgText = squashMessage( msg );
kdDebug(14010) << k_funcinfo << "msg text=" << msgText << endl;
- QString msgFrom;
+ TQString msgFrom;
if( msg.from()->metaContact() )
msgFrom = msg.from()->metaContact()->displayName();
else
@@ -302,11 +302,11 @@ void KopeteSystemTray::addBalloon()
m_balloon = new KopeteBalloon(
i18n( "<qt><nobr><b>New Message from %1:</b></nobr><br><nobr>\"%2\"</nobr></qt>" )
- .arg( QStyleSheet::escape( msgFrom ), msgText ), QString::null );
- connect(m_balloon, SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , SLOT(apply()));
- connect(m_balloon, SIGNAL(signalButtonClicked()), mBalloonEventList.first() , SLOT(apply()));
- connect(m_balloon, SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , SLOT(ignore()));
- connect(m_balloon, SIGNAL(signalTimeout()), this , SLOT(slotRemoveBalloon()));
+ .arg( TQStyleSheet::escape( msgFrom ), msgText ), TQString::null );
+ connect(m_balloon, TQT_SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , TQT_SLOT(apply()));
+ connect(m_balloon, TQT_SIGNAL(signalButtonClicked()), mBalloonEventList.first() , TQT_SLOT(apply()));
+ connect(m_balloon, TQT_SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , TQT_SLOT(ignore()));
+ connect(m_balloon, TQT_SIGNAL(signalTimeout()), this , TQT_SLOT(slotRemoveBalloon()));
m_balloon->setAnchor(mapToGlobal(pos()));
m_balloon->show();
KWin::setOnAllDesktops(m_balloon->winId(), true);
@@ -337,7 +337,7 @@ void KopeteSystemTray::slotReevaluateAccountStates()
bool bOffline = false;
Kopete::Contact *c = 0;
- for (QPtrListIterator<Kopete::Account> it(Kopete::AccountManager::self()->accounts()); it.current(); ++it)
+ for (TQPtrListIterator<Kopete::Account> it(Kopete::AccountManager::self()->accounts()); it.current(); ++it)
{
c = it.current()->myself();
if (!c)
@@ -383,11 +383,11 @@ void KopeteSystemTray::slotReevaluateAccountStates()
}
-QString KopeteSystemTray::squashMessage( const Kopete::Message& msg )
+TQString KopeteSystemTray::squashMessage( const Kopete::Message& msg )
{
- QString msgText = msg.parsedBody();
+ TQString msgText = msg.parsedBody();
- QRegExp rx( "(<a.*>((http://)?(.+))</a>)" );
+ TQRegExp rx( "(<a.*>((http://)?(.+))</a>)" );
rx.setMinimal( true );
if ( rx.search( msgText ) == -1 )
{
@@ -397,31 +397,31 @@ QString KopeteSystemTray::squashMessage( const Kopete::Message& msg )
// Escape it after snipping it to not snip entities
msgText =msg.plainBody() ;
if( msgText.length() > 30 )
- msgText = msgText.left( 30 ) + QString::fromLatin1( " ..." );
+ msgText = msgText.left( 30 ) + TQString::fromLatin1( " ..." );
msgText=Kopete::Message::escape(msgText);
}
else
{
- QString plainText = msg.plainBody();
+ TQString plainText = msg.plainBody();
if ( plainText.length() > 30 )
{
- QString fullUrl = rx.cap( 2 );
- QString shorterUrl;
+ TQString fullUrl = rx.cap( 2 );
+ TQString shorterUrl;
if ( fullUrl.length() > 30 )
{
- QString urlWithoutProtocol = rx.cap( 4 );
+ TQString urlWithoutProtocol = rx.cap( 4 );
shorterUrl = urlWithoutProtocol.left( 27 )
- + QString::fromLatin1( "... " );
+ + TQString::fromLatin1( "... " );
}
else
{
shorterUrl = fullUrl.left( 27 )
- + QString::fromLatin1( "... " );
+ + TQString::fromLatin1( "... " );
}
// remove message text
- msgText = QString::fromLatin1( "... " ) +
+ msgText = TQString::fromLatin1( "... " ) +
rx.cap( 1 ) +
- QString::fromLatin1( " ..." );
+ TQString::fromLatin1( " ..." );
// find last occurrence of URL (the one inside the <a> tag)
int revUrlOffset = msgText.findRev( fullUrl );
msgText.replace( revUrlOffset,
diff --git a/kopete/kopete/systemtray.h b/kopete/kopete/systemtray.h
index 223cb173..997ebb9b 100644
--- a/kopete/kopete/systemtray.h
+++ b/kopete/kopete/systemtray.h
@@ -20,8 +20,8 @@
#ifndef SYSTEMTRAY_H
#define SYSTEMTRAY_H
-#include <qpixmap.h>
-#include <qmovie.h>
+#include <tqpixmap.h>
+#include <tqmovie.h>
#include <ksystemtray.h>
@@ -47,14 +47,14 @@ public:
/**
* Retrieve the system tray instance
*/
- static KopeteSystemTray* systemTray( QWidget* parent = 0, const char* name = 0 );
+ static KopeteSystemTray* systemTray( TQWidget* parent = 0, const char* name = 0 );
~KopeteSystemTray();
// One method, multiple interfaces :-)
- void startBlink( const QString &icon );
- void startBlink( const QPixmap &icon );
- void startBlink( const QMovie &movie );
+ void startBlink( const TQString &icon );
+ void startBlink( const TQPixmap &icon );
+ void startBlink( const TQMovie &movie );
void startBlink();
void stopBlink();
@@ -62,8 +62,8 @@ public:
KPopupMenu *contextMenu() const { return KSystemTray::contextMenu(); };
protected:
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseDoubleClickEvent( QMouseEvent *me );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *me );
virtual void contextMenuAboutToShow( KPopupMenu * );
signals:
@@ -79,22 +79,22 @@ private slots:
void addBalloon();
private:
- KopeteSystemTray( QWidget* parent, const char* name );
- QString squashMessage( const Kopete::Message& msgText );
+ KopeteSystemTray( TQWidget* parent, const char* name );
+ TQString squashMessage( const Kopete::Message& msgText );
void removeBalloonEvent(Kopete::MessageEvent *);
- QTimer *mBlinkTimer;
- QPixmap mKopeteIcon;
- QPixmap mBlinkIcon;
- QMovie mMovie;
+ TQTimer *mBlinkTimer;
+ TQPixmap mKopeteIcon;
+ TQPixmap mBlinkIcon;
+ TQMovie mMovie;
bool mIsBlinkIcon;
bool mIsBlinking;
static KopeteSystemTray* s_systemTray;
- QPtrList<Kopete::MessageEvent> mEventList;
- QPtrList<Kopete::MessageEvent> mBalloonEventList;
+ TQPtrList<Kopete::MessageEvent> mEventList;
+ TQPtrList<Kopete::MessageEvent> mBalloonEventList;
KopeteBalloon *m_balloon;
};