From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/libkopete/ui/accountselector.cpp | 36 ++-- kopete/libkopete/ui/accountselector.h | 8 +- kopete/libkopete/ui/addcontactpage.cpp | 2 +- kopete/libkopete/ui/addcontactpage.h | 4 +- kopete/libkopete/ui/addressbooklinkwidget.cpp | 22 +- kopete/libkopete/ui/addressbooklinkwidget.h | 8 +- kopete/libkopete/ui/addressbookselectordialog.cpp | 22 +- kopete/libkopete/ui/addressbookselectordialog.h | 6 +- kopete/libkopete/ui/addressbookselectorwidget.cpp | 46 ++-- kopete/libkopete/ui/addressbookselectorwidget.h | 8 +- kopete/libkopete/ui/addresseeitem.cpp | 18 +- kopete/libkopete/ui/addresseeitem.h | 8 +- kopete/libkopete/ui/contactaddednotifydialog.cpp | 38 ++-- kopete/libkopete/ui/contactaddednotifydialog.h | 14 +- kopete/libkopete/ui/editaccountwidget.h | 2 +- kopete/libkopete/ui/kopetecontactaction.cpp | 8 +- kopete/libkopete/ui/kopetecontactaction.h | 2 +- kopete/libkopete/ui/kopetefileconfirmdialog.cpp | 22 +- kopete/libkopete/ui/kopetefileconfirmdialog.h | 8 +- kopete/libkopete/ui/kopetelistview.cpp | 60 +++--- kopete/libkopete/ui/kopetelistview.h | 10 +- kopete/libkopete/ui/kopetelistviewitem.cpp | 246 +++++++++++----------- kopete/libkopete/ui/kopetelistviewitem.h | 70 +++--- kopete/libkopete/ui/kopetelistviewsearchline.cpp | 18 +- kopete/libkopete/ui/kopetelistviewsearchline.h | 12 +- kopete/libkopete/ui/kopetepasswordwidget.cpp | 32 +-- kopete/libkopete/ui/kopetepasswordwidget.h | 8 +- kopete/libkopete/ui/kopetestdaction.cpp | 50 ++--- kopete/libkopete/ui/kopetestdaction.h | 46 ++-- kopete/libkopete/ui/kopeteview.cpp | 4 +- kopete/libkopete/ui/kopeteview.h | 20 +- kopete/libkopete/ui/kopeteviewplugin.cpp | 2 +- kopete/libkopete/ui/kopeteviewplugin.h | 2 +- kopete/libkopete/ui/kopetewidgets.cpp | 92 ++++---- kopete/libkopete/ui/metacontactselectorwidget.cpp | 74 +++---- kopete/libkopete/ui/metacontactselectorwidget.h | 12 +- kopete/libkopete/ui/userinfodialog.cpp | 82 ++++---- kopete/libkopete/ui/userinfodialog.h | 32 +-- 38 files changed, 577 insertions(+), 577 deletions(-) (limited to 'kopete/libkopete/ui') diff --git a/kopete/libkopete/ui/accountselector.cpp b/kopete/libkopete/ui/accountselector.cpp index 2ea8e719..345e9ab4 100644 --- a/kopete/libkopete/ui/accountselector.cpp +++ b/kopete/libkopete/ui/accountselector.cpp @@ -19,9 +19,9 @@ #include "kopeteaccount.h" #include "kopeteaccountmanager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ class AccountListViewItem : public KListViewItem Kopete::Account *mAccount; public: - AccountListViewItem(QListView *parent, Kopete::Account *acc) + AccountListViewItem(TQListView *parent, Kopete::Account *acc) : KListViewItem(parent) { if (acc==0) @@ -62,8 +62,8 @@ class AccountSelectorPrivate }; -AccountSelector::AccountSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +AccountSelector::AccountSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << "for no special protocol" << endl; d = new AccountSelectorPrivate; @@ -72,8 +72,8 @@ AccountSelector::AccountSelector(QWidget *parent, const char *name) } -AccountSelector::AccountSelector(Kopete::Protocol *proto, QWidget *parent, - const char *name) : QWidget(parent, name) +AccountSelector::AccountSelector(Kopete::Protocol *proto, TQWidget *parent, + const char *name) : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << " for protocol " << proto->pluginId() << endl; d = new AccountSelectorPrivate; @@ -92,17 +92,17 @@ AccountSelector::~AccountSelector() void AccountSelector::initUI() { kdDebug(14010) << k_funcinfo << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); d->lv = new KListView(this); d->lv->setFullWidth(true); - d->lv->addColumn(QString::fromLatin1("")); + d->lv->addColumn(TQString::fromLatin1("")); d->lv->header()->hide(); if(d->proto != 0) { kdDebug(14010) << k_funcinfo << "creating list for a certain protocol" << endl; - QDict accounts = Kopete::AccountManager::self()->accounts(d->proto); - QDictIterator it(accounts); + TQDict accounts = Kopete::AccountManager::self()->accounts(d->proto); + TQDictIterator it(accounts); for(; Kopete::Account *account = it.current(); ++it) { new AccountListViewItem(d->lv, account); @@ -111,7 +111,7 @@ void AccountSelector::initUI() else { kdDebug(14010) << k_funcinfo << "creating list of all accounts" << endl; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); Kopete::Account *account = 0; for(account = accounts.first(); account; account = accounts.next()) { @@ -119,8 +119,8 @@ void AccountSelector::initUI() } } - connect(d->lv, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(d->lv, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); } @@ -129,7 +129,7 @@ void AccountSelector::setSelected(Kopete::Account *account) if (account==0) return; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -146,7 +146,7 @@ bool AccountSelector::isSelected(Kopete::Account *account) if (account==0) return false; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -166,7 +166,7 @@ Kopete::Account *AccountSelector::selectedItem() } -void AccountSelector::slotSelectionChanged(QListViewItem *item) +void AccountSelector::slotSelectionChanged(TQListViewItem *item) { //kdDebug(14010) << k_funcinfo << endl; if (item != 0) diff --git a/kopete/libkopete/ui/accountselector.h b/kopete/libkopete/ui/accountselector.h index 4f5d50ac..518ac67f 100644 --- a/kopete/libkopete/ui/accountselector.h +++ b/kopete/libkopete/ui/accountselector.h @@ -18,7 +18,7 @@ #ifndef ACCOUNTSELECTOR_H #define ACCOUNTSELECTOR_H -#include +#include #include #include "kopete_export.h" @@ -39,7 +39,7 @@ Q_OBJECT * The parameters @p parent and @p name are handled by * KListView. */ - AccountSelector(QWidget *parent=0, const char *name=0); + AccountSelector(TQWidget *parent=0, const char *name=0); /** * Constructor for a list of accounts for one protocol only @@ -48,7 +48,7 @@ Q_OBJECT * KListView. @p proto defines the protocol whose accounts are * shown in the list */ - AccountSelector(Kopete::Protocol *proto, QWidget *parent=0, const char *name=0); + AccountSelector(Kopete::Protocol *proto, TQWidget *parent=0, const char *name=0); /** * Destructor. @@ -79,7 +79,7 @@ Q_OBJECT void selectionChanged(Kopete::Account *acc); private slots: - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); private: void initUI(); diff --git a/kopete/libkopete/ui/addcontactpage.cpp b/kopete/libkopete/ui/addcontactpage.cpp index f308a7d4..846815f2 100644 --- a/kopete/libkopete/ui/addcontactpage.cpp +++ b/kopete/libkopete/ui/addcontactpage.cpp @@ -17,7 +17,7 @@ #include "addcontactpage.h" -AddContactPage::AddContactPage(QWidget *parent, const char *name ) : QWidget(parent,name) +AddContactPage::AddContactPage(TQWidget *parent, const char *name ) : TQWidget(parent,name) { } diff --git a/kopete/libkopete/ui/addcontactpage.h b/kopete/libkopete/ui/addcontactpage.h index 506c5bcc..d72e2fd1 100644 --- a/kopete/libkopete/ui/addcontactpage.h +++ b/kopete/libkopete/ui/addcontactpage.h @@ -18,7 +18,7 @@ #ifndef ADDCONTACTPAGE_H #define ADDCONTACTPAGE_H -#include +#include #include #include "kopete_export.h" @@ -34,7 +34,7 @@ class KOPETE_EXPORT AddContactPage : public QWidget Q_OBJECT public: - AddContactPage(QWidget *parent=0, const char *name=0); + AddContactPage(TQWidget *parent=0, const char *name=0); virtual ~AddContactPage(); //Kopete::Protocol *protocol; diff --git a/kopete/libkopete/ui/addressbooklinkwidget.cpp b/kopete/libkopete/ui/addressbooklinkwidget.cpp index a6aff32b..0d544d27 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.cpp +++ b/kopete/libkopete/ui/addressbooklinkwidget.cpp @@ -21,7 +21,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -38,11 +38,11 @@ namespace Kopete { namespace UI { -AddressBookLinkWidget::AddressBookLinkWidget( QWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) +AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) { - btnClear->setIconSet( SmallIconSet( QApplication::reverseLayout() ? QString::fromLatin1( "locationbar_erase" ) : QString::fromLatin1( "clear_left") ) ); - connect( btnClear, SIGNAL( clicked() ), this, SLOT( slotClearAddressee() ) ); - connect( btnSelectAddressee, SIGNAL( clicked() ), SLOT( slotSelectAddressee() ) ); + btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::fromLatin1( "locationbar_erase" ) : TQString::fromLatin1( "clear_left") ) ); + connect( btnClear, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearAddressee() ) ); + connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) ); } void AddressBookLinkWidget::setAddressee( const KABC::Addressee& addr ) @@ -56,7 +56,7 @@ void AddressBookLinkWidget::setMetaContact( const Kopete::MetaContact * mc ) mMetaContact = mc; } -QString AddressBookLinkWidget::uid() const +TQString AddressBookLinkWidget::uid() const { return mSelectedUid; } @@ -66,29 +66,29 @@ void AddressBookLinkWidget::slotClearAddressee() edtAddressee->clear(); btnClear->setEnabled( false ); KABC::Addressee mrEmpty; - mSelectedUid = QString::null; + mSelectedUid = TQString::null; emit addresseeChanged( mrEmpty ); } void AddressBookLinkWidget::slotSelectAddressee() { - QString message; + TQString message; if ( mMetaContact ) message = i18n("Choose the corresponding entry for '%1'" ).arg( mMetaContact->displayName() ); else message = i18n("Choose the corresponding entry in the address book" ); - Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : QString::null ), this ); + Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : TQString::null ), this ); int result = dialog.exec(); KABC::Addressee addr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { addr = dialog.addressBookSelectorWidget()->addressee(); edtAddressee->setText( addr.realName() ); btnClear->setEnabled( !addr.isEmpty() ); - mSelectedUid = ( addr.isEmpty() ? QString::null : addr.uid() ); + mSelectedUid = ( addr.isEmpty() ? TQString::null : addr.uid() ); emit addresseeChanged( addr ); } } diff --git a/kopete/libkopete/ui/addressbooklinkwidget.h b/kopete/libkopete/ui/addressbooklinkwidget.h index dff23c58..fa44d530 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.h +++ b/kopete/libkopete/ui/addressbooklinkwidget.h @@ -44,7 +44,7 @@ class AddressBookLinkWidget : public AddressBookLinkWidgetBase { Q_OBJECT public: - AddressBookLinkWidget( QWidget * parent, const char * name ); + AddressBookLinkWidget( TQWidget * parent, const char * name ); ~AddressBookLinkWidget() {} /** * Set the currently selected addressee @@ -57,7 +57,7 @@ public: /** * Return the selected addressbook UID. */ - QString uid() const; + TQString uid() const; signals: /** * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. @@ -66,7 +66,7 @@ signals: /** * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. - * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal + * To do so, TQObject::disconnect() btnSelectAddressee and connect your own slot to this signal */ void selectAddresseeClicked(); protected slots: @@ -74,7 +74,7 @@ protected slots: void slotSelectAddressee(); private: const Kopete::MetaContact * mMetaContact; - QString mSelectedUid; + TQString mSelectedUid; }; } // end namespace UI } // end namespace Kopete diff --git a/kopete/libkopete/ui/addressbookselectordialog.cpp b/kopete/libkopete/ui/addressbookselectordialog.cpp index 7d2e17ff..44f42e2a 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.cpp +++ b/kopete/libkopete/ui/addressbookselectordialog.cpp @@ -19,9 +19,9 @@ #include "addressbookselectordialog.h" #include "addressbookselectorwidget.h" #include -#include -#include -#include +#include +#include +#include #include #include @@ -30,9 +30,9 @@ namespace Kopete namespace UI { -AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) +AddressBookSelectorDialog::AddressBookSelectorDialog(const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); + TQVBox *vbox=new TQVBox(this); m_addressBookSelectorWidget= new AddressBookSelectorWidget(vbox); m_addressBookSelectorWidget->setLabelMessage(message); @@ -42,7 +42,7 @@ AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const enableButtonOK(false); //setHelp("linkaddressbook"); - connect(m_addressBookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotWidgetAddresseeListClicked( QListViewItem * ))); + connect(m_addressBookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotWidgetAddresseeListClicked( TQListViewItem * ))); if ( !preSelectUid.isEmpty() ) m_addressBookSelectorWidget->selectAddressee(preSelectUid); @@ -52,19 +52,19 @@ AddressBookSelectorDialog::~AddressBookSelectorDialog() { } -KABC::Addressee AddressBookSelectorDialog::getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent) +KABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent) { AddressBookSelectorDialog dialog(title, message, preSelectUid, parent); int result = dialog.exec(); KABC::Addressee adr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) adr = dialog.addressBookSelectorWidget()->addressee(); return adr; } -void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *addressee ) +void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( TQListViewItem *addressee ) { // enable ok if a valid addressee is selected enableButtonOK( addressee ? addressee->isSelected() : false); @@ -72,12 +72,12 @@ void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *a void AddressBookSelectorDialog::accept() { - QDialog::accept(); + TQDialog::accept(); } void AddressBookSelectorDialog::reject() { - QDialog::reject(); + TQDialog::reject(); } } // namespace UI diff --git a/kopete/libkopete/ui/addressbookselectordialog.h b/kopete/libkopete/ui/addressbookselectordialog.h index f391aa3a..470f3407 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.h +++ b/kopete/libkopete/ui/addressbookselectordialog.h @@ -51,7 +51,7 @@ public: /** * The constructor of an empty AddressBookSelectorWidget */ - AddressBookSelectorDialog( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent=0L, const char *name=0L, bool modal = false ); + AddressBookSelectorDialog( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog */ @@ -71,12 +71,12 @@ public: * @returns the selected contact, or a null addressee if the user * pressed the Cancel button. Optionally */ - static KABC::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L ); + static KABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L ); protected slots: virtual void accept(); virtual void reject(); - void slotWidgetAddresseeListClicked( QListViewItem *addressee ); + void slotWidgetAddresseeListClicked( TQListViewItem *addressee ); protected: AddressBookSelectorWidget *m_addressBookSelectorWidget; }; diff --git a/kopete/libkopete/ui/addressbookselectorwidget.cpp b/kopete/libkopete/ui/addressbookselectorwidget.cpp index 50c4a885..4b106315 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.cpp +++ b/kopete/libkopete/ui/addressbookselectorwidget.cpp @@ -25,7 +25,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "addressbookselectorwidget.h" #include @@ -54,39 +54,39 @@ namespace Kopete namespace UI { -AddressBookSelectorWidget::AddressBookSelectorWidget( QWidget *parent, const char *name ) +AddressBookSelectorWidget::AddressBookSelectorWidget( TQWidget *parent, const char *name ) : AddressBookSelectorWidget_Base( parent, name ) { m_addressBook = Kopete::KABCPersistence::self()->addressBook(); // Addressee validation connections - connect( addAddresseeButton, SIGNAL( clicked() ), SLOT( slotAddAddresseeClicked() ) ); - connect( addAddresseeButton, SIGNAL( clicked() ), SIGNAL( addAddresseeClicked() ) ); - - connect( addresseeListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAddresseeClicked() ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( addAddresseeClicked() ) ); + + connect( addresseeListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); - connect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + connect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); //We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks - addresseeListView->setColumnText(2, SmallIconSet(QString::fromLatin1("email")), i18n("Email")); + addresseeListView->setColumnText(2, SmallIconSet(TQString::fromLatin1("email")), i18n("Email")); kListViewSearchLine->setListView(addresseeListView); slotLoadAddressees(); - addresseeListView->setColumnWidthMode(0, QListView::Manual); + addresseeListView->setColumnWidthMode(0, TQListView::Manual); addresseeListView->setColumnWidth(0, 63); //Photo is 60, and it's nice to have a small gap, imho } AddressBookSelectorWidget::~AddressBookSelectorWidget() { - disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); } @@ -101,10 +101,10 @@ KABC::Addressee AddressBookSelectorWidget::addressee() return m_addressee; } -void AddressBookSelectorWidget::selectAddressee( const QString &uid ) +void AddressBookSelectorWidget::selectAddressee( const TQString &uid ) { // iterate trough list view - QListViewItemIterator it( addresseeListView ); + TQListViewItemIterator it( addresseeListView ); while( it.current() ) { AddresseeItem *addrItem = (AddresseeItem *) it.current(); @@ -136,7 +136,7 @@ void AddressBookSelectorWidget::slotLoadAddressees() } -void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) +void AddressBookSelectorWidget::setLabelMessage( const TQString &msg ) { lblHeader->setText(msg); } @@ -144,7 +144,7 @@ void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) void AddressBookSelectorWidget::slotAddAddresseeClicked() { // Pop up add addressee dialog - QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), QString::null, 0, this ); + TQString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), TQString::null, 0, this ); if ( !addresseeName.isEmpty() ) { @@ -154,7 +154,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked() Kopete::KABCPersistence::self()->writeAddressBook( 0 ); slotLoadAddressees(); // select the addressee we just added - QListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); + TQListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); kListViewSearchLine->clear(); kListViewSearchLine->updateSearch(); addresseeListView->setSelected( added, true ); diff --git a/kopete/libkopete/ui/addressbookselectorwidget.h b/kopete/libkopete/ui/addressbookselectorwidget.h index 3141f726..3b26cece 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.h +++ b/kopete/libkopete/ui/addressbookselectorwidget.h @@ -49,7 +49,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget { Q_OBJECT public: - AddressBookSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~AddressBookSelectorWidget(); KABC::Addressee addressee(); /** @@ -57,11 +57,11 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ - void selectAddressee( const QString &uid ); + void selectAddressee( const TQString &uid ); /** * @return true if there is a contact selected */ @@ -78,7 +78,7 @@ protected slots: */ void slotLoadAddressees(); signals: - void addresseeListClicked( QListViewItem *addressee ); + void addresseeListClicked( TQListViewItem *addressee ); void addAddresseeClicked(); }; diff --git a/kopete/libkopete/ui/addresseeitem.cpp b/kopete/libkopete/ui/addresseeitem.cpp index 405d00d7..9fa9f023 100644 --- a/kopete/libkopete/ui/addresseeitem.cpp +++ b/kopete/libkopete/ui/addresseeitem.cpp @@ -17,17 +17,17 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "addresseeitem.h" -AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addressee) : +AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) : KListViewItem( parent ), mAddressee( addressee ) { @@ -37,7 +37,7 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse pic = mAddressee.logo(); if(pic.isIntern()) { - QPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw + TQPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw setPixmap( Photo,qpixmap ); } @@ -45,11 +45,11 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse setText( Email, addressee.preferredEmail() ); } -QString AddresseeItem::key( int column, bool ) const +TQString AddresseeItem::key( int column, bool ) const { if (column == Email) { - QString value = text(Email); - QRegExp emailRe(QString::fromLatin1("<\\S*>")); + TQString value = text(Email); + TQRegExp emailRe(TQString::fromLatin1("<\\S*>")); int match = emailRe.search(value); if (match > -1) value = value.mid(match + 1, emailRe.matchedLength() - 2); diff --git a/kopete/libkopete/ui/addresseeitem.h b/kopete/libkopete/ui/addresseeitem.h index c501d0a9..36d1d284 100644 --- a/kopete/libkopete/ui/addresseeitem.h +++ b/kopete/libkopete/ui/addresseeitem.h @@ -21,7 +21,7 @@ #ifndef KABC_ADDRESSEEDIALOG_H #define KABC_ADDRESSEEDIALOG_H -#include +#include #include #include @@ -49,7 +49,7 @@ class AddresseeItem : public KListViewItem @param parent The parent listview. @param addressee The associated addressee. */ - AddresseeItem( QListView *parent, const KABC::Addressee &addressee ); + AddresseeItem( TQListView *parent, const KABC::Addressee &addressee ); /** Returns the addressee. @@ -57,9 +57,9 @@ class AddresseeItem : public KListViewItem KABC::Addressee addressee() const { return mAddressee; } /** - Method used by QListView to sort the items. + Method used by TQListView to sort the items. */ - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; private: KABC::Addressee mAddressee; diff --git a/kopete/libkopete/ui/contactaddednotifydialog.cpp b/kopete/libkopete/ui/contactaddednotifydialog.cpp index abcd4c7e..9084bd39 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.cpp +++ b/kopete/libkopete/ui/contactaddednotifydialog.cpp @@ -16,12 +16,12 @@ #include "contactaddednotifydialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,13 +51,13 @@ struct ContactAddedNotifyDialog::Private { ContactAddedNotifyWidget *widget; Account *account; - QString contactId; - QString addressbookId; + TQString contactId; + TQString addressbookId; }; -ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, - const QString& contactNick, Kopete::Account *account, uint hide) +ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId, + const TQString& contactNick, Kopete::Account *account, uint hide) : KDialogBase( Global::mainWidget(), "ContactAddedNotify", /*modal=*/false, i18n("Someone Has Added You"), Ok|Cancel ) { @@ -71,9 +71,9 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, d->account=account; d->contactId=contactId; d->widget->m_label->setText(i18n(" The contact %2 has added you to his/her contactlist. (Account %3)") - .arg( KURL::encode_string( account->protocol()->pluginId() ) + QString::fromLatin1(":") + .arg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::fromLatin1(":") + KURL::encode_string( account->accountId() ) , - contactNick.isEmpty() ? contactId : contactNick + QString::fromLatin1(" < ") + contactId + QString::fromLatin1(" >") , + contactNick.isEmpty() ? contactId : contactNick + TQString::fromLatin1(" < ") + contactId + TQString::fromLatin1(" >") , account->accountLabel() ) ); if( hide & InfoButton) d->widget->m_infoButton->hide() ; @@ -94,18 +94,18 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, 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 ( it->type() == Group::Normal && !groupname.isEmpty() ) { d->widget->m_groupList->insertItem(groupname); } } - d->widget->m_groupList->setCurrentText(QString::null); //default to top-level + d->widget->m_groupList->setCurrentText(TQString::null); //default to top-level - connect( d->widget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); - connect( d->widget->m_infoButton, SIGNAL( clicked() ), this, SLOT( slotInfoClicked() ) ); + connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); + connect( d->widget->m_infoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotInfoClicked() ) ); - connect( this, SIGNAL(okClicked()) , this , SLOT(slotFinished())); + connect( this, TQT_SIGNAL(okClicked()) , this , TQT_SLOT(slotFinished())); } @@ -125,14 +125,14 @@ bool ContactAddedNotifyDialog::authorized() const return d->widget->m_authorizeCb->isChecked(); } -QString ContactAddedNotifyDialog::displayName() const +TQString ContactAddedNotifyDialog::displayName() const { return d->widget->m_displayNameEdit->text(); } Group *ContactAddedNotifyDialog::group() const { - QString grpName=d->widget->m_groupList->currentText(); + TQString grpName=d->widget->m_groupList->currentText(); if(grpName.isEmpty()) return Group::topLevel(); diff --git a/kopete/libkopete/ui/contactaddednotifydialog.h b/kopete/libkopete/ui/contactaddednotifydialog.h index 96f8844c..be5349a4 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.h +++ b/kopete/libkopete/ui/contactaddednotifydialog.h @@ -43,9 +43,9 @@ namespace UI { * @code Kopete::UI::ContactAddedNotifyDialog *dialog = - new ContactAddedNotifyDialog(contactId, QString::null,account); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),this,SLOT(contactAddedDialogApplied())); - QObject::connect(dialog,SIGNAL(infoClicked(const QString&)),this,SLOT(contactAddedDialogInfo())); + new ContactAddedNotifyDialog(contactId, TQString::null,account); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogApplied())); + TQObject::connect(dialog,TQT_SIGNAL(infoClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogInfo())); dialog->show(); * @endcode @@ -93,7 +93,7 @@ public: * @param hide a bitmask of HideWidget used to hide some widget. By default, everything is shown. * */ - ContactAddedNotifyDialog(const QString& contactId, const QString& contactNick=QString::null, + ContactAddedNotifyDialog(const TQString& contactId, const TQString& contactNick=TQString::null, Kopete::Account *account=0L, uint hide=0x00); /** @@ -116,7 +116,7 @@ public: /** * @brief return the display name the user has entered */ - QString displayName() const; + TQString displayName() const; /** * @brief return the group the user has selected @@ -144,7 +144,7 @@ signals: * @brief the dialog has been applied * @param contactId is the id of the contact passed in the constructor. */ - void applyClicked(const QString &contactId); + void applyClicked(const TQString &contactId); /** * @brief the button "info" has been pressed @@ -155,7 +155,7 @@ signals: * hint: you can use sender() as parent of the new dialog * @param contactId is the id of the contact passed in the constructor. */ - void infoClicked(const QString &contactId); + void infoClicked(const TQString &contactId); private slots: diff --git a/kopete/libkopete/ui/editaccountwidget.h b/kopete/libkopete/ui/editaccountwidget.h index 533c90ff..a4345bae 100644 --- a/kopete/libkopete/ui/editaccountwidget.h +++ b/kopete/libkopete/ui/editaccountwidget.h @@ -36,7 +36,7 @@ class KopeteEditAccountWidgetPrivate; * in @ref apply(). * * Each protocol has to subclass this class, and the protocol's edit account page MUST inherits from - * QWidget too. + * TQWidget too. * * We suggest to put at least these fields in the page: * diff --git a/kopete/libkopete/ui/kopetecontactaction.cpp b/kopete/libkopete/ui/kopetecontactaction.cpp index d02c2ff2..cc6754d2 100644 --- a/kopete/libkopete/ui/kopetecontactaction.cpp +++ b/kopete/libkopete/ui/kopetecontactaction.cpp @@ -21,15 +21,15 @@ #include "kopetecontact.h" #include "kopeteonlinestatus.h" -KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const QObject *receiver, +KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const TQObject *receiver, const char *slot, KAction *parent ) -: KAction( contact->metaContact()->displayName(), QIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), +: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), parent, contact->contactId().latin1() ) { m_contact = contact; - connect( this, SIGNAL( activated() ), SLOT( slotContactActionActivated() ) ); - connect( this, SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), TQT_SLOT( slotContactActionActivated() ) ); + connect( this, TQT_SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); } KopeteContactAction::~KopeteContactAction() diff --git a/kopete/libkopete/ui/kopetecontactaction.h b/kopete/libkopete/ui/kopetecontactaction.h index bb9d9f76..ba170ebb 100644 --- a/kopete/libkopete/ui/kopetecontactaction.h +++ b/kopete/libkopete/ui/kopetecontactaction.h @@ -37,7 +37,7 @@ public: /** * Create a new KopeteContactAction */ - KopeteContactAction( Kopete::Contact *contact, const QObject* receiver, const char* slot, KAction* parent ); + KopeteContactAction( Kopete::Contact *contact, const TQObject* receiver, const char* slot, KAction* parent ); ~KopeteContactAction(); Kopete::Contact * contact() const; diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp index 01036a05..fffeec66 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -31,7 +31,7 @@ #include "kopetemetacontact.h" #include "kopetecontact.h" -KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description,QWidget *parent, const char *name ) +KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description,TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "A User Would Like to Send You a File" ), KDialogBase::User1 | KDialogBase::User2, KDialogBase::User1, true, i18n( "&Refuse" ), i18n( "&Accept" ) ), m_info( info ) @@ -40,19 +40,19 @@ KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo m_emited=false; m_view=new FileConfirmBase(this, "FileConfirmView"); - m_view->m_from->setText( info.contact()->metaContact()->displayName() + QString::fromLatin1( " <" ) + - info.contact()->contactId() + QString::fromLatin1( "> " ) ); + m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::fromLatin1( " <" ) + + info.contact()->contactId() + TQString::fromLatin1( "> " ) ); m_view->m_size->setText( KGlobal::locale()->formatNumber( long( info.size() ), 0 ) ); m_view->m_description->setText( description ); m_view->m_filename->setText( info.file() ); KGlobal::config()->setGroup("File Transfer"); - const QString defaultPath=KGlobal::config()->readEntry("defaultPath" , QDir::homeDirPath() ); - m_view->m_saveto->setText(defaultPath + QString::fromLatin1( "/" ) + info.file() ); + const TQString defaultPath=KGlobal::config()->readEntry("defaultPath" , TQDir::homeDirPath() ); + m_view->m_saveto->setText(defaultPath + TQString::fromLatin1( "/" ) + info.file() ); setMainWidget(m_view); - connect(m_view->cmdBrowse, SIGNAL(clicked()), this, SLOT(slotBrowsePressed())); + connect(m_view->cmdBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowsePressed())); } KopeteFileConfirmDialog::~KopeteFileConfirmDialog() @@ -61,7 +61,7 @@ KopeteFileConfirmDialog::~KopeteFileConfirmDialog() void KopeteFileConfirmDialog::slotBrowsePressed() { - QString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), QString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); + TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); if ( !saveFileName.isNull()) { m_view->m_saveto->setText(saveFileName); @@ -74,14 +74,14 @@ void KopeteFileConfirmDialog::slotUser2() KURL url(m_view->m_saveto->text()); if(url.isValid() && url.isLocalFile() ) { - const QString directory=url.directory(); + const TQString directory=url.directory(); if(!directory.isEmpty()) { KGlobal::config()->setGroup("File Transfer"); KGlobal::config()->writeEntry("defaultPath" , directory ); } - if(QFile(m_view->m_saveto->text()).exists()) + if(TQFile(m_view->m_saveto->text()).exists()) { int ret=KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists.\nDo you want to overwrite it ?").arg(m_view->m_saveto->text()) , i18n("Overwrite File") , KStdGuiItem::save()); @@ -103,7 +103,7 @@ void KopeteFileConfirmDialog::slotUser1() close(); } -void KopeteFileConfirmDialog::closeEvent( QCloseEvent *e) +void KopeteFileConfirmDialog::closeEvent( TQCloseEvent *e) { if(!m_emited) { diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.h b/kopete/libkopete/ui/kopetefileconfirmdialog.h index 20d58d51..ac5d19a4 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.h +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.h @@ -18,7 +18,7 @@ #ifndef KOPETEFILECONFIRMDIALOG_H #define KOPETEFILECONFIRMDIALOG_H -#include +#include #include #include "kopetetransfermanager.h" @@ -33,7 +33,7 @@ class KopeteFileConfirmDialog : public KDialogBase Q_OBJECT public: - KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description=QString::null, QWidget *parent=0, const char* name=0); + KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description=TQString::null, TQWidget *parent=0, const char* name=0); ~KopeteFileConfirmDialog(); private: @@ -47,10 +47,10 @@ public slots: protected slots: virtual void slotUser2(); virtual void slotUser1(); - virtual void closeEvent( QCloseEvent *e); + virtual void closeEvent( TQCloseEvent *e); signals: - void accepted(const Kopete::FileTransferInfo &info, const QString &filename); + void accepted(const Kopete::FileTransferInfo &info, const TQString &filename); void refused(const Kopete::FileTransferInfo &info); }; diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp index 594f0920..9630592c 100644 --- a/kopete/libkopete/ui/kopetelistview.cpp +++ b/kopete/libkopete/ui/kopetelistview.cpp @@ -22,14 +22,14 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -39,25 +39,25 @@ namespace UI { namespace ListView { /* - Custom QToolTip for the list view. + Custom TQToolTip for the list view. The decision whether or not to show tooltips is taken in - maybeTip(). See also the QListView sources from Qt itself. + maybeTip(). See also the TQListView sources from Qt itself. Delegates to the list view items. */ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, ListView *lv ); + ToolTip( TQWidget *parent, ListView *lv ); virtual ~ToolTip(); - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: ListView *m_listView; }; -ToolTip::ToolTip( QWidget *parent, ListView *lv ) - : QToolTip( parent ) +ToolTip::ToolTip( TQWidget *parent, ListView *lv ) + : TQToolTip( parent ) { m_listView = lv; } @@ -66,14 +66,14 @@ ToolTip::~ToolTip() { } -void ToolTip::maybeTip( const QPoint &pos ) +void ToolTip::maybeTip( const TQPoint &pos ) { if( !parentWidget() || !m_listView ) return; if( Item *item = dynamic_cast( m_listView->itemAt( pos ) ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + @@ -81,9 +81,9 @@ void ToolTip::maybeTip( const QPoint &pos ) uint xAdjust = itemRect.left() + leftMargin; uint yAdjust = itemRect.top(); - QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); + TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); - std::pair toolTip = item->toolTip( relativePos ); + std::pair toolTip = item->toolTip( relativePos ); if ( toolTip.first.isEmpty() ) return; @@ -96,34 +96,34 @@ void ToolTip::maybeTip( const QPoint &pos ) struct ListView::Private { - QTimer sortTimer; + TQTimer sortTimer; std::auto_ptr toolTip; //! C-tor Private() {} }; -ListView::ListView( QWidget *parent, const char *name ) +ListView::ListView( TQWidget *parent, const char *name ) : KListView( parent, name ), d( new Private ) { - connect( &d->sortTimer, SIGNAL( timeout() ), this, SLOT( slotSort() ) ); + connect( &d->sortTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSort() ) ); - // We have our own tooltips, don't use the default QListView ones + // We have our own tooltips, don't use the default TQListView ones setShowToolTips( false ); d->toolTip.reset( new ToolTip( viewport(), this ) ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( slotDoubleClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); // set up flags for nicer painting clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); // clear the appropriate flags from the viewport - qt docs say we have to mask - // these flags out of the QListView to make weirdly painted list items work, but + // these flags out of the TQListView to make weirdly painted list items work, but // that doesn't do the job. masking them out of the viewport does. -// class MyWidget : public QWidget { public: using QWidget::clearWFlags; }; +// class MyWidget : public TQWidget { public: using TQWidget::clearWFlags; }; // static_cast( viewport() )->clearWFlags( WStaticContents ); // static_cast( viewport() )->setWFlags( WNoAutoErase ); @@ -139,7 +139,7 @@ ListView::~ListView() delete d; } -void ListView::slotDoubleClicked( QListViewItem *item ) +void ListView::slotDoubleClicked( TQListViewItem *item ) { kdDebug( 14000 ) << k_funcinfo << endl; @@ -148,7 +148,7 @@ void ListView::slotDoubleClicked( QListViewItem *item ) } void ListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &/*point*/ ) + TQListViewItem *item, const TQPoint &/*point*/ ) { if ( item && !item->isSelected() ) { @@ -179,21 +179,21 @@ void ListView::setShowTreeLines( bool bShowAsTree ) /* This is a small hack ensuring that only F2 triggers inline * renaming. Won't win a beauty award, but whoever wrote it thinks - * relying on the fact that QListView intercepts and processes the + * relying on the fact that TQListView intercepts and processes the * F2 event through this event filter is sorta safe. * * Also use enter to execute the item since executed is not usually * called when enter is pressed. */ -void ListView::keyPressEvent( QKeyEvent *e ) +void ListView::keyPressEvent( TQKeyEvent *e ) { - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( (e->key() == Qt::Key_F2) && item && item->isVisible() ) rename( item, 0 ); else if ( (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && item->isVisible() ) { // must provide a point within the item; emitExecute checks for this - QPoint p = viewport()->mapToGlobal(itemRect(item).center()); + TQPoint p = viewport()->mapToGlobal(itemRect(item).center()); emitExecute( currentItem(), p, 0 ); } else diff --git a/kopete/libkopete/ui/kopetelistview.h b/kopete/libkopete/ui/kopetelistview.h index 8b2c579b..2e065212 100644 --- a/kopete/libkopete/ui/kopetelistview.h +++ b/kopete/libkopete/ui/kopetelistview.h @@ -34,7 +34,7 @@ class ListView : public KListView Q_OBJECT public: - ListView( QWidget *parent = 0, const char *name = 0 ); + ListView( TQWidget *parent = 0, const char *name = 0 ); ~ListView(); /** @@ -52,14 +52,14 @@ public: public slots: /** - * Calls QListView::sort() + * Calls TQListView::sort() */ void slotSort() { sort(); } protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); private slots: - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotDoubleClicked( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotDoubleClicked( TQListViewItem *item ); private: struct Private; Private *d; diff --git a/kopete/libkopete/ui/kopetelistviewitem.cpp b/kopete/libkopete/ui/kopetelistviewitem.cpp index fda2ff4c..888f9d5b 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.cpp +++ b/kopete/libkopete/ui/kopetelistviewitem.cpp @@ -29,14 +29,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_XRENDER # include @@ -54,7 +54,7 @@ namespace ListView { class ComponentBase::Private { public: - QPtrList components; + TQPtrList components; }; ComponentBase::ComponentBase() @@ -71,7 +71,7 @@ ComponentBase::~ComponentBase() uint ComponentBase::components() { return d->components.count(); } Component *ComponentBase::component( uint n ) { return d->components.at( n ); } -Component *ComponentBase::componentAt( const QPoint &pt ) +Component *ComponentBase::componentAt( const TQPoint &pt ) { for ( uint n = 0; n < components(); ++n ) { @@ -113,13 +113,13 @@ void ComponentBase::componentResized( Component * ) { } -std::pair ComponentBase::toolTip( const QPoint &relativePos ) +std::pair ComponentBase::toolTip( const TQPoint &relativePos ) { for ( uint n = 0; n < components(); ++n ) if ( component( n )->rect().contains( relativePos ) ) return component( n )->toolTip( relativePos ); - return std::make_pair( QString::null, QRect() ); + return std::make_pair( TQString::null, TQRect() ); } void ComponentBase::updateAnimationPosition( int p, int s ) @@ -127,9 +127,9 @@ void ComponentBase::updateAnimationPosition( int p, int s ) for ( uint n = 0; n < components(); ++n ) { Component *comp = component( n ); - QRect start = comp->startRect(); - QRect target = comp->targetRect(); - QRect rc( start.left() + ((target.left() - start.left()) * p) / s, + TQRect start = comp->startRect(); + TQRect target = comp->targetRect(); + TQRect rc( start.left() + ((target.left() - start.left()) * p) / s, start.top() + ((target.top() - start.top()) * p) / s, start.width() + ((target.width() - start.width()) * p) / s, start.height() + ((target.height() - start.height()) * p) / s ); @@ -150,8 +150,8 @@ public: { } ComponentBase *parent; - QRect rect; - QRect startRect, targetRect; + TQRect rect; + TQRect startRect, targetRect; int minWidth, minHeight; bool growHoriz, growVert; bool show; /** @since 23-03-2005 */ @@ -199,19 +199,19 @@ void Component::setToolTipSource( ToolTipSource *source ) d->tipSource = source; } -std::pair Component::toolTip( const QPoint &relativePos ) +std::pair Component::toolTip( const TQPoint &relativePos ) { if ( !d->tipSource ) return ComponentBase::toolTip( relativePos ); - QRect rc = rect(); - QString result = (*d->tipSource)( this, relativePos, rc ); + TQRect rc = rect(); + TQString result = (*d->tipSource)( this, relativePos, rc ); return std::make_pair(result, rc); } -QRect Component::rect() { return d->rect; } -QRect Component::startRect() { return d->startRect; } -QRect Component::targetRect() { return d->targetRect; } +TQRect Component::rect() { return d->rect; } +TQRect Component::startRect() { return d->startRect; } +TQRect Component::targetRect() { return d->targetRect; } int Component::minWidth() { return d->minWidth; } int Component::minHeight() { return d->minHeight; } @@ -235,22 +235,22 @@ bool Component::setMinHeight( int height ) return true; } -void Component::layout( const QRect &newRect ) +void Component::layout( const TQRect &newRect ) { if ( rect().isNull() ) - d->startRect = QRect( newRect.topLeft(), newRect.topLeft() ); + d->startRect = TQRect( newRect.topLeft(), newRect.topLeft() ); else d->startRect = rect(); d->targetRect = newRect; //kdDebug(14000) << k_funcinfo << "At " << rect << endl; } -void Component::setRect( const QRect &rect ) +void Component::setRect( const TQRect &rect ) { d->rect = rect; } -void Component::paint( QPainter *painter, const QColorGroup &cg ) +void Component::paint( TQPainter *painter, const TQColorGroup &cg ) { /*painter->setPen( Qt::red ); painter->drawRect( rect() );*/ @@ -378,7 +378,7 @@ void BoxComponent::calcMinSize() relayout(); } -void BoxComponent::layout( const QRect &rect ) +void BoxComponent::layout( const TQRect &rect ) { Component::layout( rect ); @@ -413,7 +413,7 @@ void BoxComponent::layout( const QRect &rect ) { Component *comp = component( n ); - QRect rc; + TQRect rc; if ( horiz ) { rc.setLeft( rect.left() + pos ); @@ -464,7 +464,7 @@ void BoxComponent::componentResized( Component *component ) class ImageComponent::Private { public: - QPixmap image; + TQPixmap image; }; ImageComponent::ImageComponent( ComponentBase *parent ) @@ -487,12 +487,12 @@ ImageComponent::~ImageComponent() delete d; } -QPixmap ImageComponent::pixmap() +TQPixmap ImageComponent::pixmap() { return d->image; } -void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) +void ImageComponent::setPixmap( const TQPixmap &img, bool adjustSize) { d->image = img; if ( adjustSize ) @@ -503,30 +503,30 @@ void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) repaint(); } -static QPoint operator+( const QPoint &pt, const QSize &sz ) +static TQPoint operator+( const TQPoint &pt, const TQSize &sz ) { - return QPoint( pt.x() + sz.width(), pt.y() + sz.height() ); + return TQPoint( pt.x() + sz.width(), pt.y() + sz.height() ); } -/*static QPoint operator+( const QSize &sz, const QPoint &pt ) +/*static TQPoint operator+( const TQSize &sz, const TQPoint &pt ) { return pt + sz; }*/ -void ImageComponent::paint( QPainter *painter, const QColorGroup & ) +void ImageComponent::paint( TQPainter *painter, const TQColorGroup & ) { - QRect ourRc = rect(); - QRect rc = d->image.rect(); + TQRect ourRc = rect(); + TQRect rc = d->image.rect(); // center rc within our rect rc.moveTopLeft( ourRc.topLeft() + (ourRc.size() - rc.size()) / 2 ); // paint, shrunk to be within our rect painter->drawPixmap( rc & ourRc, d->image ); } -void ImageComponent::scale( int w, int h, QImage::ScaleMode mode ) +void ImageComponent::scale( int w, int h, TQImage::ScaleMode mode ) { - QImage im = d->image.convertToImage(); - setPixmap( QPixmap( im.smoothScale( w, h, mode ) ) ); + TQImage im = d->image.convertToImage(); + setPixmap( TQPixmap( im.smoothScale( w, h, mode ) ) ); } // TextComponent @@ -534,13 +534,13 @@ class TextComponent::Private { public: Private() : customColor( false ) {} - QString text; + TQString text; bool customColor; - QColor color; - QFont font; + TQColor color; + TQFont font; }; -TextComponent::TextComponent( ComponentBase *parent, const QFont &font, const QString &text ) +TextComponent::TextComponent( ComponentBase *parent, const TQFont &font, const TQString &text ) : Component( parent ), d( new Private ) { setFont( font ); @@ -554,12 +554,12 @@ TextComponent::~TextComponent() delete d; } -QString TextComponent::text() +TQString TextComponent::text() { return d->text; } -void TextComponent::setText( const QString &text ) +void TextComponent::setText( const TQString &text ) { if ( text == d->text ) return; d->text = text; @@ -567,12 +567,12 @@ void TextComponent::setText( const QString &text ) calcMinSize(); } -QFont TextComponent::font() +TQFont TextComponent::font() { return d->font; } -void TextComponent::setFont( const QFont &font ) +void TextComponent::setFont( const TQFont &font ) { if ( font == d->font ) return; d->font = font; @@ -584,7 +584,7 @@ void TextComponent::calcMinSize() setMinWidth( 0 ); if ( !d->text.isEmpty() ) - setMinHeight( QFontMetrics( font() ).height() ); + setMinHeight( TQFontMetrics( font() ).height() ); else setMinHeight( 0 ); @@ -597,15 +597,15 @@ int TextComponent::widthForHeight( int ) // allegedly if this is not done the protocol icons overlap the text. // i however have never seen this problem (which would almost certainly // be a bug somewhere else). - return QFontMetrics( font() ).width( d->text ) + 2; + return TQFontMetrics( font() ).width( d->text ) + 2; } -QColor TextComponent::color() +TQColor TextComponent::color() { - return d->customColor ? d->color : QColor(); + return d->customColor ? d->color : TQColor(); } -void TextComponent::setColor( const QColor &color ) +void TextComponent::setColor( const TQColor &color ) { d->color = color; d->customColor = true; @@ -618,13 +618,13 @@ void TextComponent::setDefaultColor() repaint(); } -void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) +void TextComponent::paint( TQPainter *painter, const TQColorGroup &cg ) { if ( d->customColor ) painter->setPen( d->color ); else painter->setPen( cg.text() ); - QString dispStr = KStringHandler::rPixelSqueeze( d->text, QFontMetrics( font() ), rect().width() ); + TQString dispStr = KStringHandler::rPixelSqueeze( d->text, TQFontMetrics( font() ), rect().width() ); painter->setFont( font() ); painter->drawText( rect(), Qt::SingleLine, dispStr ); } @@ -634,8 +634,8 @@ void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) class DisplayNameComponent::Private { public: - QString text; - QFont font; + TQString text; + TQFont font; }; DisplayNameComponent::DisplayNameComponent( ComponentBase *parent ) @@ -650,12 +650,12 @@ DisplayNameComponent::~DisplayNameComponent() delete d; } -void DisplayNameComponent::layout( const QRect &rect ) +void DisplayNameComponent::layout( const TQRect &rect ) { Component::layout( rect ); // finally, lay everything out - QRect rc; + TQRect rc; int totalWidth = rect.width(); int usedWidth = 0; bool exceeded = false; @@ -671,7 +671,7 @@ void DisplayNameComponent::layout( const QRect &rect ) if ( comp->rtti() == Rtti_TextComponent ) { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), totalWidth - usedWidth, comp->heightForWidth( totalWidth - usedWidth ) ) ); } else { @@ -681,7 +681,7 @@ void DisplayNameComponent::layout( const QRect &rect ) else { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), comp->widthForHeight( rect.height() ), comp->heightForWidth( rect.width() ) ) ); } @@ -695,7 +695,7 @@ void DisplayNameComponent::layout( const QRect &rect ) } } -void DisplayNameComponent::setText( const QString& text ) +void DisplayNameComponent::setText( const TQString& text ) { if ( d->text == text ) return; @@ -706,15 +706,15 @@ void DisplayNameComponent::setText( const QString& text ) void DisplayNameComponent::redraw() { - QColor color; + TQColor color; for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) { ((TextComponent*)component(n))->color(); } - QValueList tokens; - QValueList::const_iterator token; + TQValueList tokens; + TQValueList::const_iterator token; clear(); // clear childs @@ -722,7 +722,7 @@ void DisplayNameComponent::redraw() ImageComponent *ic; TextComponent *t; - QFontMetrics fontMetrics( d->font ); + TQFontMetrics fontMetrics( d->font ); int fontHeight = fontMetrics.height(); for ( token = tokens.begin(); token != tokens.end(); ++token ) { @@ -733,8 +733,8 @@ void DisplayNameComponent::redraw() break; case Kopete::Emoticons::Image: ic = new ImageComponent( this ); - ic->setPixmap( QPixmap( (*token).picPath ) ); - ic->scale( INT_MAX, fontHeight, QImage::ScaleMin ); + ic->setPixmap( TQPixmap( (*token).picPath ) ); + ic->scale( INT_MAX, fontHeight, TQImage::ScaleMin ); break; default: kdDebug( 14010 ) << k_funcinfo << "This should have not happened!" << endl; @@ -745,7 +745,7 @@ void DisplayNameComponent::redraw() setColor( color ); } -void DisplayNameComponent::setFont( const QFont& font ) +void DisplayNameComponent::setFont( const TQFont& font ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -753,7 +753,7 @@ void DisplayNameComponent::setFont( const QFont& font ) d->font = font; } -void DisplayNameComponent::setColor( const QColor& color ) +void DisplayNameComponent::setColor( const TQColor& color ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -767,7 +767,7 @@ void DisplayNameComponent::setDefaultColor() ((TextComponent*)component(n))->setDefaultColor(); } -QString DisplayNameComponent::text() +TQString DisplayNameComponent::text() { return d->text; } @@ -835,7 +835,7 @@ Kopete::Contact *ContactComponent::contact() } // we don't need to use a tooltip source here - this way is simpler -std::pair ContactComponent::toolTip( const QPoint &/*relativePos*/ ) +std::pair ContactComponent::toolTip( const TQPoint &/*relativePos*/ ) { return std::make_pair(d->contact->toolTip(),rect()); } @@ -860,16 +860,16 @@ class SharedTimer : private QTimer int users; public: SharedTimer( int period ) : period(period), users(0) {} - void attach( QObject *target, const char *slot ) + void attach( TQObject *target, const char *slot ) { - connect( this, SIGNAL(timeout()), target, slot ); + connect( this, TQT_SIGNAL(timeout()), target, slot ); if( users++ == 0 ) start( period ); //kdDebug(14000) << "SharedTimer::attach: users is now " << users << "\n"; } - void detach( QObject *target, const char *slot ) + void detach( TQObject *target, const char *slot ) { - disconnect( this, SIGNAL(timeout()), target, slot ); + disconnect( this, TQT_SIGNAL(timeout()), target, slot ); if( --users == 0 ) stop(); //kdDebug(14000) << "SharedTimer::detach: users is now " << users << "\n"; @@ -879,11 +879,11 @@ public: class SharedTimerRef { SharedTimer &timer; - QObject * const object; + TQObject * const object; const char * const slot; bool attached; public: - SharedTimerRef( SharedTimer &timer, QObject *obj, const char *slot ) + SharedTimerRef( SharedTimer &timer, TQObject *obj, const char *slot ) : timer(timer), object(obj), slot(slot), attached(false) { } @@ -909,16 +909,16 @@ class Item::Private { public: Private( Item *item ) - : layoutAnimateTimer( theLayoutAnimateTimer(), item, SLOT( slotLayoutAnimateItems() ) ) + : layoutAnimateTimer( theLayoutAnimateTimer(), item, TQT_SLOT( slotLayoutAnimateItems() ) ) , animateLayout( true ), opacity( 1.0 ) - , visibilityTimer( theVisibilityTimer(), item, SLOT( slotUpdateVisibility() ) ) + , visibilityTimer( theVisibilityTimer(), item, TQT_SLOT( slotUpdateVisibility() ) ) , visibilityLevel( 0 ), visibilityTarget( false ), searchMatch( true ) { } - QTimer layoutTimer; + TQTimer layoutTimer; - //QTimer layoutAnimateTimer; + //TQTimer layoutAnimateTimer; SharedTimerRef layoutAnimateTimer; SharedTimer &theLayoutAnimateTimer() { @@ -932,7 +932,7 @@ public: float opacity; - //QTimer visibilityTimer; + //TQTimer visibilityTimer; SharedTimerRef visibilityTimer; SharedTimer &theVisibilityTimer() { @@ -961,14 +961,14 @@ bool Item::Private::animateChanges = true; bool Item::Private::fadeVisibility = true; bool Item::Private::foldVisibility = true; -Item::Item( QListViewItem *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListViewItem *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } -Item::Item( QListView *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListView *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } @@ -987,10 +987,10 @@ void Item::setEffects( bool animation, bool fading, bool folding ) void Item::initLVI() { - connect( listView()->header(), SIGNAL( sizeChange( int, int, int ) ), SLOT( slotColumnResized() ) ); - connect( &d->layoutTimer, SIGNAL( timeout() ), SLOT( slotLayoutItems() ) ); - //connect( &d->layoutAnimateTimer, SIGNAL( timeout() ), SLOT( slotLayoutAnimateItems() ) ); - //connect( &d->visibilityTimer, SIGNAL( timeout() ), SLOT( slotUpdateVisibility() ) ); + connect( listView()->header(), TQT_SIGNAL( sizeChange( int, int, int ) ), TQT_SLOT( slotColumnResized() ) ); + connect( &d->layoutTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutItems() ) ); + //connect( &d->layoutAnimateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutAnimateItems() ) ); + //connect( &d->visibilityTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotUpdateVisibility() ) ); setVisible( false ); setTargetVisibility( true ); } @@ -1023,7 +1023,7 @@ void Item::slotLayoutItems() } int height = component( n )->heightForWidth( width ); - component( n )->layout( QRect( 0, 0, width, height ) ); + component( n )->layout( TQRect( 0, 0, width, height ) ); //kdDebug(14000) << k_funcinfo << "Component " << n << " is " << width << " x " << height << endl; } @@ -1169,62 +1169,62 @@ void Item::setHeight( int ) KListViewItem::setHeight( minHeight ); } -int Item::width( const QFontMetrics &, const QListView *lv, int c ) const +int Item::width( const TQFontMetrics &, const TQListView *lv, int c ) const { // Qt computes the itemRect from this. we want the whole item to be // clickable, so we return the widest we could possibly be. return lv->header()->sectionSize( c ); } -void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QPixmap back( width, height() ); - QPainter paint( &back ); + TQPixmap back( width, height() ); + TQPainter paint( &back ); //KListViewItem::paintCell( &paint, cg, column, width, align ); // PASTED FROM KLISTVIEWITEM: // set the alternate cell background colour if necessary - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isAlternate()) if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); else - _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); // PASTED FROM QLISTVIEWITEM { - QPainter *p = &paint; + TQPainter *p = &paint; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFontMetrics fm( p->fontMetrics() ); + TQFontMetrics fm( p->fontMetrics() ); // any text we render is done by the Components, not by this class, so make sure we've nothing to write - QString t; + TQString t; // removed text truncating code from Qt - we do that differently, further on int marg = lv->itemMargin(); int r = marg; - // const QPixmap * icon = pixmap( column ); + // const TQPixmap * icon = pixmap( column ); const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); else { - // all copied from QListView::paintEmptyArea + // all copied from TQListView::paintEmptyArea - //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); - QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader - QStyle::SFlags how = QStyle::Style_Default; + //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); + TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader + TQStyle::SFlags how = TQStyle::Style_Default; if ( lv->isEnabled() ) - how |= QStyle::Style_Enabled; + how |= TQStyle::Style_Enabled; - lv->style().drawComplexControl( QStyle::CC_ListView, - p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), - how, QStyle::SC_ListView, QStyle::SC_None, + lv->style().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), + how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -1233,7 +1233,7 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - _cg.brush( QColorGroup::Highlight ) ); + _cg.brush( TQColorGroup::Highlight ) ); // removed text pen setting code from Qt } @@ -1242,16 +1242,16 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, // draw the tree gubbins if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); - textheight = QMAX( textheight, QApplication::globalStrut().height() ); + textheight = QMAX( textheight, TQApplication::globalStrut().height() ); if ( textheight % 2 > 0 ) textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, - QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, - lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, - QStyle::SC_ListViewExpand, - (uint)QStyle::SC_All, QStyleOption( this ) ); + lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv, + TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, + TQStyle::SC_ListViewExpand, + (uint)TQStyle::SC_All, TQStyleOption( this ) ); } } } @@ -1260,14 +1260,14 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 if ( isSelected() ) - _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + _cg.setColor(TQColorGroup::Text , _cg.highlightedText() ); if ( Component *comp = component( column ) ) comp->paint( &paint, _cg ); paint.end(); #ifdef HAVE_XRENDER - QColor rgb = cg.base();//backgroundColor(); + TQColor rgb = cg.base();//backgroundColor(); float opac = 1.0; if ( d->visibilityTimer.isActive() && Private::fadeVisibility ) { diff --git a/kopete/libkopete/ui/kopetelistviewitem.h b/kopete/libkopete/ui/kopetelistviewitem.h index 5952c569..e57482d0 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.h +++ b/kopete/libkopete/ui/kopetelistviewitem.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QPixmap; @@ -41,7 +41,7 @@ public: uint components(); Component *component( uint n ); - Component *componentAt( const QPoint &pt ); + Component *componentAt( const TQPoint &pt ); /** Repaint this item */ virtual void repaint() = 0; @@ -55,7 +55,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - virtual std::pair toolTip( const QPoint &relativePos ); + virtual std::pair toolTip( const TQPoint &relativePos ); protected: /** A child item has been added to this item */ @@ -91,7 +91,7 @@ public: * @param rect The tip will be removed when the mouse leaves this rect. * Will initially be set to \p component's rect(). */ - virtual QString operator() ( ComponentBase *component, const QPoint &pt, QRect &rect ) = 0; + virtual TQString operator() ( ComponentBase *component, const TQPoint &pt, TQRect &rect ) = 0; }; /** @@ -112,13 +112,13 @@ public: * @param rect the new rectangle this component will paint in, relative to the painter * passed to the paint() function by the parent item. */ - virtual void layout( const QRect &rect ); + virtual void layout( const TQRect &rect ); /** * Paint this item, inside the rectangle returned by rect(). * The default implementation calls paint on all children. */ - virtual void paint( QPainter *painter, const QColorGroup &cg ); + virtual void paint( TQPainter *painter, const TQColorGroup &cg ); void repaint(); void relayout(); @@ -126,7 +126,7 @@ public: /** * @return the rect this component was allocated last time it was laid out */ - QRect rect(); + TQRect rect(); /** * Prevents this component to be drawn */ @@ -177,7 +177,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); /** * RTTI: Runtime Type Information @@ -221,9 +221,9 @@ private: friend void ComponentBase::updateAnimationPosition( int p, int s ); // used for animation - void setRect( const QRect &rect ); - QRect startRect(); - QRect targetRect(); + void setRect( const TQRect &rect ); + TQRect startRect(); + TQRect targetRect(); class Private; Private *d; @@ -236,7 +236,7 @@ public: BoxComponent( ComponentBase *parent, Direction dir = Horizontal ); ~BoxComponent(); - void layout( const QRect &rect ); + void layout( const TQRect &rect ); virtual int widthForHeight( int height ); virtual int heightForWidth( int width ); @@ -259,22 +259,22 @@ private: class TextComponent : public Component { public: - TextComponent( ComponentBase *parent, const QFont &font = QFont(), const QString &text = QString::null ); + TextComponent( ComponentBase *parent, const TQFont &font = TQFont(), const TQString &text = TQString::null ); ~TextComponent(); - QString text(); - void setText( const QString &text ); + TQString text(); + void setText( const TQString &text ); - QFont font(); - void setFont( const QFont &font ); + TQFont font(); + void setFont( const TQFont &font ); - QColor color(); - void setColor( const QColor &color ); + TQColor color(); + void setColor( const TQColor &color ); void setDefaultColor(); int widthForHeight( int ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); static int RTTI; virtual int rtti() const { return RTTI; } @@ -293,12 +293,12 @@ public: ImageComponent( ComponentBase *parent, int minW, int minH ); ~ImageComponent(); - void setPixmap( const QPixmap &img, bool adjustSize = true); - QPixmap pixmap( void ); + void setPixmap( const TQPixmap &img, bool adjustSize = true); + TQPixmap pixmap( void ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); - void scale( int w, int h, QImage::ScaleMode ); + void scale( int w, int h, TQImage::ScaleMode ); static int RTTI; virtual int rtti() const { return RTTI; } private: @@ -316,7 +316,7 @@ public: ~ContactComponent(); void updatePixmap(); Kopete::Contact *contact(); - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); protected: class Private; Private *d; @@ -347,12 +347,12 @@ public: * Dtor */ ~DisplayNameComponent(); - void layout( const QRect& rect ); + void layout( const TQRect& rect ); - QString text(); - void setText( const QString& text ); - void setFont( const QFont& font ); - void setColor( const QColor& color ); + TQString text(); + void setText( const TQString& text ); + void setFont( const TQFont& font ); + void setColor( const TQColor& color ); void setDefaultColor(); static int RTTI; virtual int rtti() const { return RTTI; } @@ -392,19 +392,19 @@ public: * * @author Richard Smith */ -class Item : public QObject, public KListViewItem, public ComponentBase +class Item : public TQObject, public KListViewItem, public ComponentBase { Q_OBJECT public: - Item( QListView *parent, QObject *owner = 0, const char *name = 0 ); - Item( QListViewItem *parent, QObject *owner = 0, const char *name = 0 ); + Item( TQListView *parent, TQObject *owner = 0, const char *name = 0 ); + Item( TQListViewItem *parent, TQObject *owner = 0, const char *name = 0 ); ~Item(); void repaint(); void relayout(); void setup(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); //TODO: startRename(...) float opacity(); @@ -421,7 +421,7 @@ public: */ static void setEffects( bool animation, bool fading, bool folding ); - int width( const QFontMetrics & fm, const QListView * lv, int c ) const; + int width( const TQFontMetrics & fm, const TQListView * lv, int c ) const; /** * Show or hide this item in a clean way depending on whether it matches diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.cpp b/kopete/libkopete/ui/kopetelistviewsearchline.cpp index a71d86c0..edb63ffc 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.cpp +++ b/kopete/libkopete/ui/kopetelistviewsearchline.cpp @@ -24,12 +24,12 @@ namespace Kopete { namespace UI { namespace ListView { -SearchLine::SearchLine( QWidget *parent, ListView *listView, const char *name ) +SearchLine::SearchLine( TQWidget *parent, ListView *listView, const char *name ) : KListViewSearchLine( parent, listView, name ) { } -SearchLine::SearchLine(QWidget *parent, const char *name) +SearchLine::SearchLine(TQWidget *parent, const char *name) : KListViewSearchLine( parent, 0, name ) { } @@ -39,7 +39,7 @@ SearchLine::~SearchLine() } -void SearchLine::updateSearch( const QString &s ) +void SearchLine::updateSearch( const TQString &s ) { // we copy a huge chunk of code here simply in order to override // the way items are shown/hidden. KSearchLine rudely @@ -54,7 +54,7 @@ void SearchLine::updateSearch( const QString &s ) // If there's a selected item that is visible, make sure that it's visible // when the search changes too (assuming that it still matches). - QListViewItem *currentItem = 0; + TQListViewItem *currentItem = 0; switch( listView()->selectionMode() ) { @@ -64,7 +64,7 @@ void SearchLine::updateSearch( const QString &s ) currentItem = listView()->selectedItem(); break; default: - for( QListViewItemIterator it(listView(), QListViewItemIterator::Selected | QListViewItemIterator::Visible); + for( TQListViewItemIterator it(listView(), TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); it.current() && !currentItem; ++it ) { if( listView()->itemRect( it.current() ).isValid() ) @@ -85,10 +85,10 @@ void SearchLine::updateSearch( const QString &s ) void SearchLine::checkItemParentsNotVisible() { //BEGIN code from KSearchLine::checkItemParentsNotVisible - QListViewItemIterator it( listView() ); + TQListViewItemIterator it( listView() ); for( ; it.current(); ++it ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if( itemMatches( item, search ) ) setItemVisible( item, true ); else @@ -97,7 +97,7 @@ void SearchLine::checkItemParentsNotVisible() //END code from KSearchLine::checkItemParentsNotVisible } -bool SearchLine::checkItemParentsVisible( QListViewItem *item ) +bool SearchLine::checkItemParentsVisible( TQListViewItem *item ) { //BEGIN code from KSearchLine::checkItemParentsVisible bool visible = false; @@ -123,7 +123,7 @@ bool SearchLine::checkItemParentsVisible( QListViewItem *item ) //END code from KSearchLine::checkItemParentsVisible } -void SearchLine::setItemVisible( QListViewItem *it, bool b ) +void SearchLine::setItemVisible( TQListViewItem *it, bool b ) { if( Item *item = dynamic_cast( it ) ) item->setSearchMatch( b ); diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.h b/kopete/libkopete/ui/kopetelistviewsearchline.h index a453b844..be7fc317 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.h +++ b/kopete/libkopete/ui/kopetelistviewsearchline.h @@ -37,26 +37,26 @@ public: * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - SearchLine( QWidget *parent, ListView *listView = 0, const char *name = 0 ); + SearchLine( TQWidget *parent, ListView *listView = 0, const char *name = 0 ); /** * Constructs a SearchLine without any ListView to filter. The * KListView object has to be set later with setListView(). */ - SearchLine(QWidget *parent, const char *name); + SearchLine(TQWidget *parent, const char *name); /** * Destroys the SearchLine. */ ~SearchLine(); - void updateSearch( const QString &s ); + void updateSearch( const TQString &s ); protected: virtual void checkItemParentsNotVisible(); - virtual bool checkItemParentsVisible( QListViewItem *it ); - virtual void setItemVisible( QListViewItem *it, bool visible ); + virtual bool checkItemParentsVisible( TQListViewItem *it ); + virtual void setItemVisible( TQListViewItem *it, bool visible ); private: - QString search; + TQString search; }; } // end namespace ListView diff --git a/kopete/libkopete/ui/kopetepasswordwidget.cpp b/kopete/libkopete/ui/kopetepasswordwidget.cpp index 2345f103..52921b16 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.cpp +++ b/kopete/libkopete/ui/kopetepasswordwidget.cpp @@ -20,7 +20,7 @@ #include -#include +#include class Kopete::UI::PasswordWidget::Private { @@ -28,7 +28,7 @@ public: uint maxLength; }; -Kopete::UI::PasswordWidget::PasswordWidget( QWidget *parent, const char *name, Kopete::Password *from ) +Kopete::UI::PasswordWidget::PasswordWidget( TQWidget *parent, const char *name, Kopete::Password *from ) : KopetePasswordWidgetBase( parent, name ), d( new Private ) { load( from ); @@ -41,15 +41,15 @@ Kopete::UI::PasswordWidget::~PasswordWidget() void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) { - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - disconnect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + disconnect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); if ( source && source->remembered() ) { mRemembered->setTristate(); mRemembered->setNoChange(); - source->requestWithoutPrompt( this, SLOT( receivePassword( const QString & ) ) ); + source->requestWithoutPrompt( this, TQT_SLOT( receivePassword( const TQString & ) ) ); } else { @@ -64,9 +64,9 @@ void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) mPassword->setEnabled( false ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - connect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + connect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); emit changed(); } @@ -77,11 +77,11 @@ void Kopete::UI::PasswordWidget::slotRememberChanged() mPassword->setEnabled( mRemembered->isChecked() ); } -void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) +void Kopete::UI::PasswordWidget::receivePassword( const TQString &pwd ) { // pwd == null could mean user declined to open wallet // don't uncheck the remembered field in this case. - if ( !pwd.isNull() && mRemembered->state() == QButton::NoChange ) + if ( !pwd.isNull() && mRemembered->state() == TQButton::NoChange ) { mRemembered->setChecked( true ); setPassword( pwd ); @@ -90,7 +90,7 @@ void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) void Kopete::UI::PasswordWidget::save( Kopete::Password *target ) { - if ( !target || mRemembered->state() == QButton::NoChange ) + if ( !target || mRemembered->state() == TQButton::NoChange ) return; if ( mRemembered->isChecked() ) @@ -106,17 +106,17 @@ bool Kopete::UI::PasswordWidget::validate() return password().length() <= d->maxLength; } -QString Kopete::UI::PasswordWidget::password() const +TQString Kopete::UI::PasswordWidget::password() const { - return QString::fromLocal8Bit( mPassword->password() ); + return TQString::fromLocal8Bit( mPassword->password() ); } bool Kopete::UI::PasswordWidget::remember() const { - return mRemembered->state() == QButton::On; + return mRemembered->state() == TQButton::On; } -void Kopete::UI::PasswordWidget::setPassword( const QString &pass ) +void Kopete::UI::PasswordWidget::setPassword( const TQString &pass ) { // switch out of 'waiting for wallet' mode if we're in it mRemembered->setTristate( false ); diff --git a/kopete/libkopete/ui/kopetepasswordwidget.h b/kopete/libkopete/ui/kopetepasswordwidget.h index b1c51a39..72834bff 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.h +++ b/kopete/libkopete/ui/kopetepasswordwidget.h @@ -45,7 +45,7 @@ public: * @param name The name of this QObject * @param from The password to load the data for this widget from, or 0 if none */ - PasswordWidget( QWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); + PasswordWidget( TQWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); ~PasswordWidget(); /** @@ -67,7 +67,7 @@ public: /** * Returns the string currently in the input box in the widget */ - QString password() const; + TQString password() const; /** * Returns a boolean indicating whether the Remember Password checkbox is checked. * Result is undefined if the Remember Password field is in the 'no change' state @@ -79,7 +79,7 @@ public: * Set the password stored in the widget. * @param pass The text to place in the password field. */ - void setPassword( const QString &pass ); + void setPassword( const TQString &pass ); signals: /** @@ -89,7 +89,7 @@ signals: public slots: /** @internal */ - void receivePassword( const QString & ); + void receivePassword( const TQString & ); private slots: void slotRememberChanged(); diff --git a/kopete/libkopete/ui/kopetestdaction.cpp b/kopete/libkopete/ui/kopetestdaction.cpp index e6731485..f1595f4e 100644 --- a/kopete/libkopete/ui/kopetestdaction.cpp +++ b/kopete/libkopete/ui/kopetestdaction.cpp @@ -18,7 +18,7 @@ #include "kopetestdaction.h" -#include +#include #include #include @@ -41,10 +41,10 @@ KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, con : KAction( KStdGuiItem::configure(), 0, 0, 0, parent, name ) #else : KAction( KGuiItem( i18n( "&Configure Kopete..." ), - QString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) + TQString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) #endif { - connect( this, SIGNAL( activated() ), this, SLOT( slotShowPreferences() ) ); + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotShowPreferences() ) ); } KopetePreferencesAction::~KopetePreferencesAction() @@ -68,59 +68,59 @@ KAction * KopeteStdAction::preferences( KActionCollection *parent, const char *n return new KopetePreferencesAction( parent, name ); } -KAction * KopeteStdAction::chat( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::chat( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Start &Chat..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Start &Chat..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendMessage( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendMessage( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Send Single Message..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Send Single Message..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::contactInfo( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::contactInfo( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "User &Info" ), QString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "User &Info" ), TQString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendFile( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendFile( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Send &File..." ), QString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Send &File..." ), TQString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::viewHistory( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::viewHistory( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "View &History..." ), QString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "View &History..." ), TQString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::addGroup( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::addGroup( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Create Group..." ), QString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Create Group..." ), TQString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeMetaContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeMetaContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Cha&nge Meta Contact..." ), QString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::deleteContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::deleteContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Delete Contact" ), QString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); + return new KAction( i18n( "&Delete Contact" ), TQString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeAlias( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeAlias( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Change A&lias..." ), QString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Change A&lias..." ), TQString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::blockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::blockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "&Block Contact" ), QString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Block Contact" ), TQString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::unblockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::unblockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "Un&block Contact" ), QString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Un&block Contact" ), TQString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); } #include "kopetestdaction.moc" diff --git a/kopete/libkopete/ui/kopetestdaction.h b/kopete/libkopete/ui/kopetestdaction.h index 8f06d296..bd323943 100644 --- a/kopete/libkopete/ui/kopetestdaction.h +++ b/kopete/libkopete/ui/kopetestdaction.h @@ -21,7 +21,7 @@ #undef KDE_NO_COMPAT #include -#include +#include #include "kopete_export.h" @@ -34,58 +34,58 @@ public: /** * Standard action to start a chat */ - static KAction *chat( const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0 ); + static KAction *chat( const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0 ); /** * Standard action to send a single message */ - static KAction *sendMessage(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendMessage(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a user info dialog */ - static KAction *contactInfo(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *contactInfo(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a history dialog or something similar */ - static KAction *viewHistory(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *viewHistory(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to initiate sending a file to a contact */ - static KAction *sendFile(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendFile(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contacts @ref Kopete::MetaContact */ - static KAction *changeMetaContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeMetaContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to add a group */ - static KAction *addGroup(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *addGroup(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to delete a contact */ - static KAction *deleteContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *deleteContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contact alias/nickname in your contactlist */ - static KAction *changeAlias(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeAlias(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to block a contact */ - static KAction *blockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *blockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to unblock a contact */ - static KAction *unblockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *unblockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Return an action to change the Kopete preferences. diff --git a/kopete/libkopete/ui/kopeteview.cpp b/kopete/libkopete/ui/kopeteview.cpp index 91f1fa9c..111f1405 100644 --- a/kopete/libkopete/ui/kopeteview.cpp +++ b/kopete/libkopete/ui/kopeteview.cpp @@ -32,9 +32,9 @@ void KopeteView::clear() //Do nothing } -void KopeteView::appendMessages(QValueList msgs) +void KopeteView::appendMessages(TQValueList msgs) { - QValueList::iterator it; + TQValueList::iterator it; for ( it = msgs.begin(); it != msgs.end(); ++it ) { appendMessage(*it); diff --git a/kopete/libkopete/ui/kopeteview.h b/kopete/libkopete/ui/kopeteview.h index 47320546..c54b1dba 100644 --- a/kopete/libkopete/ui/kopeteview.h +++ b/kopete/libkopete/ui/kopeteview.h @@ -20,7 +20,7 @@ #define KOPETEVIEW_H #include "kopetemessage.h" -#include +#include #include "kopete_export.h" namespace Kopete @@ -79,7 +79,7 @@ class KOPETE_EXPORT KopeteView * * The default implementation just call @ref appendMessage() X times */ - virtual void appendMessages( QValueList ); + virtual void appendMessages( TQValueList ); /** * @brief Raises the view above other windows @@ -115,12 +115,12 @@ class KOPETE_EXPORT KopeteView * * Can be reimplemented to return this if derived object is a widget */ - virtual QWidget *mainWidget() = 0; + virtual TQWidget *mainWidget() = 0; /** * @brief Inform the view the message was sent successfully * - * This should be reimplemented as a SLOT in any derived objects + * This should be reimplemented as a TQT_SLOT in any derived objects */ virtual void messageSentSuccessfully() = 0; @@ -135,10 +135,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to implement this method unless they have context * menus that can be extended * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerContextMenuHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerContextMenuHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Register a handler for the tooltip @@ -151,10 +151,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to impliment this method unless it has the ability * to show tooltips * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerTooltipHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerTooltipHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Returns the Kopete::ViewPlugin responsible for this view diff --git a/kopete/libkopete/ui/kopeteviewplugin.cpp b/kopete/libkopete/ui/kopeteviewplugin.cpp index b358e547..843fe939 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.cpp +++ b/kopete/libkopete/ui/kopeteviewplugin.cpp @@ -16,7 +16,7 @@ #include "kopeteviewplugin.h" -Kopete::ViewPlugin::ViewPlugin( KInstance *instance, QObject *parent, const char *name ) : +Kopete::ViewPlugin::ViewPlugin( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Plugin( instance, parent, name ) { diff --git a/kopete/libkopete/ui/kopeteviewplugin.h b/kopete/libkopete/ui/kopeteviewplugin.h index e7797d56..25ce704b 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.h +++ b/kopete/libkopete/ui/kopeteviewplugin.h @@ -41,7 +41,7 @@ class KOPETE_EXPORT ViewPlugin : public Plugin /** * @brief Create and initialize the plugin */ - ViewPlugin( KInstance *instance, QObject *parent = 0L, const char *name = 0L ); + ViewPlugin( KInstance *instance, TQObject *parent = 0L, const char *name = 0L ); /** * @brief Creates a view to be associated with the passed in session diff --git a/kopete/libkopete/ui/kopetewidgets.cpp b/kopete/libkopete/ui/kopetewidgets.cpp index 093ee48e..916b0faf 100644 --- a/kopete/libkopete/ui/kopetewidgets.cpp +++ b/kopete/libkopete/ui/kopetewidgets.cpp @@ -3,7 +3,7 @@ * The generated code in this file is licensed under the same license that the * input file. */ -#include +#include #include #include @@ -20,92 +20,92 @@ public: virtual ~KopeteWidgets(); - virtual QStringList keys() const + virtual TQStringList keys() const { - QStringList result; + TQStringList result; for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it) result << it.key(); return result; } - virtual QWidget *create(const QString &key, QWidget *parent = 0, const char *name = 0); + virtual TQWidget *create(const TQString &key, TQWidget *parent = 0, const char *name = 0); - virtual QIconSet iconSet(const QString &key) const + virtual TQIconSet iconSet(const TQString &key) const { #ifdef EMBED_IMAGES - QPixmap pix(m_widgets[key].iconSet); + TQPixmap pix(m_widgets[key].iconSet); #else - QPixmap pix(locate( "data", - QString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); + TQPixmap pix(locate( "data", + TQString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif - return QIconSet(pix); + return TQIconSet(pix); } - virtual bool isContainer(const QString &key) const { return m_widgets[key].isContainer; } + virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; } - virtual QString group(const QString &key) const { return m_widgets[key].group; } + virtual TQString group(const TQString &key) const { return m_widgets[key].group; } - virtual QString includeFile(const QString &key) const { return m_widgets[key].includeFile; } + virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; } - virtual QString toolTip(const QString &key) const { return m_widgets[key].toolTip; } + virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; } - virtual QString whatsThis(const QString &key) const { return m_widgets[key].whatsThis; } + virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; } private: struct WidgetInfo { - QString group; + TQString group; #ifdef EMBED_IMAGES - QPixmap iconSet; + TQPixmap iconSet; #else - QString iconSet; + TQString iconSet; #endif - QString includeFile; - QString toolTip; - QString whatsThis; + TQString includeFile; + TQString toolTip; + TQString whatsThis; bool isContainer; }; - typedef QMap WidgetInfos; + typedef TQMap WidgetInfos; WidgetInfos m_widgets; }; KopeteWidgets::KopeteWidgets() { WidgetInfo widget; - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__addressbooklinkwidget_xpm); + widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); #endif - widget.includeFile = QString::fromLatin1("addressbooklinkwidget.h"); - widget.toolTip = QString::fromLatin1("Address Book Link Widget (Kopete)"); - widget.whatsThis = QString::fromLatin1("KABC::Addressee display/selector"); + widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h"); + widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)"); + widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector"); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); - widget.group = QString::fromLatin1("Views (Kopete)"); + widget.group = TQString::fromLatin1("Views (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__listview_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__listview.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__listview.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistview.h"); - widget.toolTip = QString::fromLatin1("List View (Kopete)"); - widget.whatsThis = QString::fromLatin1("A component capable list view widget."); + widget.includeFile = TQString::fromLatin1("kopetelistview.h"); + widget.toolTip = TQString::fromLatin1("List View (Kopete)"); + widget.whatsThis = TQString::fromLatin1("A component capable list view widget."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::ListView"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::ListView"), widget); - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__searchline_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__searchline.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__searchline.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistviewsearchline.h"); - widget.toolTip = QString::fromLatin1("List View Search Line (Kopete)"); - widget.whatsThis = QString::fromLatin1("Search line able to use Kopete custom list View."); + widget.includeFile = TQString::fromLatin1("kopetelistviewsearchline.h"); + widget.toolTip = TQString::fromLatin1("List View Search Line (Kopete)"); + widget.whatsThis = TQString::fromLatin1("Search line able to use Kopete custom list View."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); new KInstance("kopetewidgets"); } @@ -113,16 +113,16 @@ KopeteWidgets::~KopeteWidgets() { } -QWidget *KopeteWidgets::create(const QString &key, QWidget *parent, const char *name) +TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *parent, const char *name) { - if (key == QString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) + if (key == TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) return new Kopete::UI::AddressBookLinkWidget(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::ListView")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::ListView")) return new Kopete::UI::ListView::ListView(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::SearchLine")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::SearchLine")) return new Kopete::UI::ListView::SearchLine(parent, 0, name); return 0; diff --git a/kopete/libkopete/ui/metacontactselectorwidget.cpp b/kopete/libkopete/ui/metacontactselectorwidget.cpp index d9c75308..1ab6646c 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.cpp +++ b/kopete/libkopete/ui/metacontactselectorwidget.cpp @@ -15,16 +15,16 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,15 +68,15 @@ public: }; -MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) +MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) { d->metaContact = mc; d->photoSize = 60; - connect( d->metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); - connect( d->metaContact, SIGNAL( displayNameChanged(const QString&, const QString&) ), - SLOT( slotDisplayNameChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + TQT_SLOT( slotDisplayNameChanged() ) ); buildVisualComponents(); } @@ -99,24 +99,24 @@ void MetaContactSelectorWidgetLVI::slotDisplayNameChanged() } } -QString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const +TQString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const { return d->metaContact->displayName(); } void MetaContactSelectorWidgetLVI::slotPhotoChanged() { - QPixmap photoPixmap; - QImage photoImg = d->metaContact->photo(); + TQPixmap photoPixmap; + TQImage photoImg = d->metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->photoSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ) ; + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ) ; // draw a 1 pixel black border photoPixmap = photoImg; - QPainter p(&photoPixmap); + TQPainter p(&photoPixmap); p.setPen(Qt::black); p.drawLine(0, 0, photoPixmap.width()-1, 0); p.drawLine(0, photoPixmap.height()-1, photoPixmap.width()-1, photoPixmap.height()-1); @@ -166,7 +166,7 @@ void MetaContactSelectorWidgetLVI::buildVisualComponents() void MetaContactSelectorWidgetLVI::slotUpdateContactBox() { - QPtrList contacts = d->metaContact->contacts(); + TQPtrList contacts = d->metaContact->contacts(); for(Kopete::Contact *c = contacts.first(); c; c = contacts.next()) { new ContactComponent(d->contactIconBox, c, IconSize( KIcon::Small )); @@ -177,37 +177,37 @@ class MetaContactSelectorWidget::Private { public: MetaContactSelectorWidget_Base *widget; - QValueList excludedMetaContacts; + TQValueList excludedMetaContacts; }; -MetaContactSelectorWidget::MetaContactSelectorWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), d( new Private() ) +MetaContactSelectorWidget::MetaContactSelectorWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), d( new Private() ) { - QBoxLayout *l = new QVBoxLayout(this); + TQBoxLayout *l = new TQVBoxLayout(this); d->widget = new MetaContactSelectorWidget_Base(this); l->addWidget(d->widget); - connect( d->widget->metaContactListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); d->widget->kListViewSearchLine->setListView(d->widget->metaContactListView); d->widget->metaContactListView->setFullWidth( true ); d->widget->metaContactListView->header()->hide(); - d->widget->metaContactListView->setColumnWidthMode(0, QListView::Maximum); + d->widget->metaContactListView->setColumnWidthMode(0, TQListView::Maximum); slotLoadMetaContacts(); } MetaContactSelectorWidget::~MetaContactSelectorWidget() { - disconnect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + disconnect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); } @@ -225,7 +225,7 @@ Kopete::MetaContact* MetaContactSelectorWidget::metaContact() void MetaContactSelectorWidget::selectMetaContact( Kopete::MetaContact *mc ) { // iterate trough list view - QListViewItemIterator it( d->widget->metaContactListView ); + TQListViewItemIterator it( d->widget->metaContactListView ); while( it.current() ) { MetaContactSelectorWidgetLVI *item = (MetaContactSelectorWidgetLVI *) it.current(); @@ -261,7 +261,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() { d->widget->metaContactListView->clear(); - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); for( Kopete::MetaContact *mc = metaContacts.first(); mc ; mc = metaContacts.next() ) { if( !mc->isTemporary() && (d->excludedMetaContacts.findIndex(mc) == -1) ) @@ -273,7 +273,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() d->widget->metaContactListView->sort(); } -void MetaContactSelectorWidget::setLabelMessage( const QString &msg ) +void MetaContactSelectorWidget::setLabelMessage( const TQString &msg ) { d->widget->lblHeader->setText(msg); } diff --git a/kopete/libkopete/ui/metacontactselectorwidget.h b/kopete/libkopete/ui/metacontactselectorwidget.h index 1c0a21ff..a265f665 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.h +++ b/kopete/libkopete/ui/metacontactselectorwidget.h @@ -19,7 +19,7 @@ #define MetaContactSelectorWidget_H #include -#include +#include #include "kopetelistviewitem.h" #include "kopete_export.h" @@ -39,7 +39,7 @@ class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget { Q_OBJECT public: - MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + MetaContactSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~MetaContactSelectorWidget(); Kopete::MetaContact* metaContact(); /** @@ -47,7 +47,7 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ @@ -67,7 +67,7 @@ protected slots: */ void slotLoadMetaContacts(); signals: - void metaContactListClicked( QListViewItem *mc ); + void metaContactListClicked( TQListViewItem *mc ); private: class Private; Private *d; @@ -81,9 +81,9 @@ class MetaContactSelectorWidgetLVI : public Kopete::UI::ListView::Item { Q_OBJECT public: - MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner = 0, const char *name = 0 ); + MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner = 0, const char *name = 0 ); Kopete::MetaContact* metaContact(); - virtual QString text ( int column ) const; + virtual TQString text ( int column ) const; protected slots: void slotPhotoChanged(); void slotDisplayNameChanged(); diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index a25454a9..0ad7d9c2 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -25,25 +25,25 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Kopete { struct UserInfoDialog::UserInfoDialogPrivate { - QString name; - QString id; - QString awayMessage; - QString status; - QString warningLevel; - QString onlineSince; - QString info; - QString address; - QString phone; - QMap customFields; - QVBoxLayout *topLayout; - QWidget *page; + TQString name; + TQString id; + TQString awayMessage; + TQString status; + TQString warningLevel; + TQString onlineSince; + TQString info; + TQString address; + TQString phone; + TQMap customFields; + TQVBoxLayout *topLayout; + TQWidget *page; DialogStyle style; KHTMLPart *htmlPart; @@ -58,13 +58,13 @@ struct UserInfoDialog::UserInfoDialogPrivate { KTextBrowser *infoBrowser; }; -UserInfoDialog::UserInfoDialog( const QString& descr ) +UserInfoDialog::UserInfoDialog( const TQString& descr ) : KDialogBase( Kopete::UI::Global::mainWidget(), "userinfodialog", true, i18n( "User Info for %1" ).arg( descr ), KDialogBase::Ok ) { d = new UserInfoDialogPrivate; - d->page = new QWidget( this ); + d->page = new TQWidget( this ); setMainWidget( d->page ); - d->topLayout = new QVBoxLayout( d->page, 0, spacingHint() ); + d->topLayout = new TQVBoxLayout( d->page, 0, spacingHint() ); d->style = Widget; } @@ -78,65 +78,65 @@ void UserInfoDialog::setStyle( DialogStyle style ) d->style = style; } -void UserInfoDialog::setName( const QString& name ) +void UserInfoDialog::setName( const TQString& name ) { d->name = name; } -void UserInfoDialog::setId( const QString& id ) +void UserInfoDialog::setId( const TQString& id ) { d->id = id; } -void UserInfoDialog::setAwayMessage( const QString& msg ) +void UserInfoDialog::setAwayMessage( const TQString& msg ) { d->awayMessage = msg; } -void UserInfoDialog::setStatus( const QString& status ) +void UserInfoDialog::setStatus( const TQString& status ) { d->status = status; } -void UserInfoDialog::setWarningLevel(const QString& level ) +void UserInfoDialog::setWarningLevel(const TQString& level ) { d->warningLevel = level; } -void UserInfoDialog::setOnlineSince( const QString& since ) +void UserInfoDialog::setOnlineSince( const TQString& since ) { d->onlineSince = since; } -void UserInfoDialog::setInfo( const QString& info ) +void UserInfoDialog::setInfo( const TQString& info ) { d->info = info; } -void UserInfoDialog::setAddress( const QString& addr ) +void UserInfoDialog::setAddress( const TQString& addr ) { d->address = addr; } -void UserInfoDialog::setPhone( const QString& phone ) +void UserInfoDialog::setPhone( const TQString& phone ) { d->phone = phone; } -void UserInfoDialog::addCustomField( const QString& /*name*/, const QString& /*txt*/ ) +void UserInfoDialog::addCustomField( const TQString& /*name*/, const TQString& /*txt*/ ) { } -void UserInfoDialog::addHTMLText( const QString& /*str*/ ) +void UserInfoDialog::addHTMLText( const TQString& /*str*/ ) { } -QHBox* UserInfoDialog::addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ) +TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ) { - QHBox *box = new QHBox( d->page ); - new QLabel( label, box ); + TQHBox *box = new TQHBox( d->page ); + new TQLabel( label, box ); edit = new KLineEdit( box ); edit->setAlignment( Qt::AlignHCenter ); edit->setText( text ); @@ -148,12 +148,12 @@ void UserInfoDialog::fillHTML() { d->htmlPart = new KHTMLPart( this ); - QString text; + TQString text; /* if ( d->name.isEmpty() ) { - text.append( QString("
") + i18n("Name : ") + - QString("") ); - text.append( d->name + QString("

") ); + text.append( TQString("
") + i18n("Name : ") + + TQString("") ); + text.append( d->name + TQString("

") ); } if ( d->id.isEmpty() ) { @@ -234,23 +234,23 @@ void UserInfoDialog::fillWidgets() } if ( !d->awayMessage.isEmpty() ) { - QVBox *awayBox = new QVBox( d->page ); - new QLabel( i18n("Away message:"), awayBox ); + TQVBox *awayBox = new TQVBox( d->page ); + new TQLabel( i18n("Away message:"), awayBox ); d->awayBrowser = new KTextBrowser( awayBox ); d->awayBrowser->setText( d->awayMessage ); d->topLayout->addWidget( awayBox ); } if ( !d->info.isEmpty() ) { - QVBox *infoBox = new QVBox( d->page ); - new QLabel( i18n("User info:"), infoBox ); + TQVBox *infoBox = new TQVBox( d->page ); + new TQLabel( i18n("User info:"), infoBox ); d->infoBrowser = new KTextBrowser( infoBox ); d->infoBrowser->setText( d->info ); d->topLayout->addWidget( infoBox ); } } -void UserInfoDialog::setStyleSheet( const QString& /*css*/ ) +void UserInfoDialog::setStyleSheet( const TQString& /*css*/ ) { } diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 7df19f4f..246d15ec 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -19,7 +19,7 @@ #define USERINFODIALOG_H #include -#include +#include #include "kopete_export.h" @@ -31,7 +31,7 @@ namespace Kopete { { Q_OBJECT public: - UserInfoDialog( const QString& descr ); + UserInfoDialog( const TQString& descr ); virtual ~UserInfoDialog(); @@ -46,18 +46,18 @@ namespace Kopete { // The functions below set elements as specified in the name. // If an element is not set it won't be displayed. - void setName( const QString& name ); - void setId( const QString& id ); - void setAwayMessage( const QString& msg ); - void setStatus( const QString& status ); - void setWarningLevel(const QString& level ); - void setOnlineSince( const QString& since ); - void setInfo( const QString& info ); - void setAddress( const QString& addr ); - void setPhone( const QString& phone ); - - void addCustomField( const QString& name, const QString& txt ); - void addHTMLText( const QString& str ); + void setName( const TQString& name ); + void setId( const TQString& id ); + void setAwayMessage( const TQString& msg ); + void setStatus( const TQString& status ); + void setWarningLevel(const TQString& level ); + void setOnlineSince( const TQString& since ); + void setInfo( const TQString& info ); + void setAddress( const TQString& addr ); + void setPhone( const TQString& phone ); + + void addCustomField( const TQString& name, const TQString& txt ); + void addHTMLText( const TQString& str ); ///Shows the dialog virtual void show(); @@ -78,9 +78,9 @@ namespace Kopete { * customized include : "name", "id", "warningLevel", "onlineSince", * "address", "phone", "status", "awayMessage" and "info". */ - void setStyleSheet( const QString& css ); + void setStyleSheet( const TQString& css ); - QHBox* addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ); + TQHBox* addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ); private: struct UserInfoDialogPrivate; -- cgit v1.2.1