diff options
Diffstat (limited to 'kopete/protocols/groupwise/ui/gwprivacydialog.cpp')
-rw-r--r-- | kopete/protocols/groupwise/ui/gwprivacydialog.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp index d46daf4a..f18d6737 100644 --- a/kopete/protocols/groupwise/ui/gwprivacydialog.cpp +++ b/kopete/protocols/groupwise/ui/gwprivacydialog.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include <qlabel.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qstringlist.h> -#include <qlistview.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqstringlist.h> +#include <tqlistview.h> #include <kdebug.h> #include <kiconloader.h> @@ -39,16 +39,16 @@ class PrivacyLBI : public QListBoxPixmap { public: - PrivacyLBI( QListBox * listBox, const QPixmap & pixmap, const QString & text, const QString & dn ) - : QListBoxPixmap( listBox, pixmap, text ), m_dn( dn ) + PrivacyLBI( TQListBox * listBox, const TQPixmap & pixmap, const TQString & text, const TQString & dn ) + : TQListBoxPixmap( listBox, pixmap, text ), m_dn( dn ) { } - QString dn() { return m_dn; } + TQString dn() { return m_dn; } private: - QString m_dn; + TQString m_dn; }; -GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWidget *parent, const char *name ) +GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "Account specific privacy settings", "Manage Privacy for %1" ).arg( account->accountId() ), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, Ok, true ), m_account( account ), m_dirty( false ), m_searchDlg(0) { @@ -65,16 +65,16 @@ GroupWisePrivacyDialog::GroupWisePrivacyDialog( GroupWiseAccount * account, QWid populateWidgets(); - m_privacy->m_allowList->setSelectionMode( QListBox::Extended ); - m_privacy->m_denyList->setSelectionMode( QListBox::Extended ); + m_privacy->m_allowList->setSelectionMode( TQListBox::Extended ); + m_privacy->m_denyList->setSelectionMode( TQListBox::Extended ); - connect( m_privacy->m_btnAllow, SIGNAL( clicked() ), SLOT( slotAllowClicked() ) ); - connect( m_privacy->m_btnBlock, SIGNAL( clicked() ), SLOT( slotBlockClicked() ) ); - connect( m_privacy->m_btnAdd, SIGNAL( clicked() ), SLOT( slotAddClicked() ) ); - connect( m_privacy->m_btnRemove, SIGNAL( clicked() ), SLOT( slotRemoveClicked() ) ); - connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) ); - connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) ); - connect( mgr, SIGNAL( privacyChanged( const QString &, bool ) ), SLOT( slotPrivacyChanged() ) ); + connect( m_privacy->m_btnAllow, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAllowClicked() ) ); + connect( m_privacy->m_btnBlock, TQT_SIGNAL( clicked() ), TQT_SLOT( slotBlockClicked() ) ); + connect( m_privacy->m_btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddClicked() ) ); + connect( m_privacy->m_btnRemove, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveClicked() ) ); + connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) ); + connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) ); + connect( mgr, TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SLOT( slotPrivacyChanged() ) ); m_privacy->m_btnAdd->setEnabled( true ); m_privacy->m_btnAllow->setEnabled( false ); m_privacy->m_btnBlock->setEnabled( false ); @@ -97,18 +97,18 @@ void GroupWisePrivacyDialog::populateWidgets() PrivacyManager * mgr = m_account->client()->privacyManager(); // default policy - QString defaultPolicyText = i18n( "<Everyone Else>" ); + TQString defaultPolicyText = i18n( "<Everyone Else>" ); if ( mgr->defaultAllow() ) - m_defaultPolicy = new QListBoxText( m_privacy->m_allowList, defaultPolicyText ); + m_defaultPolicy = new TQListBoxText( m_privacy->m_allowList, defaultPolicyText ); else - m_defaultPolicy = new QListBoxText( m_privacy->m_denyList, defaultPolicyText ); + m_defaultPolicy = new TQListBoxText( m_privacy->m_denyList, defaultPolicyText ); - QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); + TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); // allow list - QStringList allowList = mgr->allowList(); - QStringList::Iterator end = allowList.end(); - for ( QStringList::Iterator it = allowList.begin(); it != end; ++it ) + TQStringList allowList = mgr->allowList(); + TQStringList::Iterator end = allowList.end(); + for ( TQStringList::Iterator it = allowList.begin(); it != end; ++it ) { GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it ); if ( cd.fullName.isEmpty() ) @@ -116,9 +116,9 @@ void GroupWisePrivacyDialog::populateWidgets() new PrivacyLBI( m_privacy->m_allowList, icon, cd.fullName, *it ); } // deny list - QStringList denyList = mgr->denyList(); + TQStringList denyList = mgr->denyList(); end = denyList.end(); - for ( QStringList::Iterator it = denyList.begin(); it != end; ++it ) + for ( TQStringList::Iterator it = denyList.begin(); it != end; ++it ) { GroupWise::ContactDetails cd = m_account->client()->userDetailsManager()->details( *it ); if ( cd.fullName.isEmpty() ) @@ -148,7 +148,7 @@ void GroupWisePrivacyDialog::slotBlockClicked() if ( m_privacy->m_allowList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_allowList->item( i ); + TQListBoxItem * lbi = m_privacy->m_allowList->item( i ); m_privacy->m_allowList->takeItem( lbi ); m_privacy->m_denyList->insertItem( lbi ); } @@ -164,7 +164,7 @@ void GroupWisePrivacyDialog::slotAllowClicked() if ( m_privacy->m_denyList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_denyList->item( i ); + TQListBoxItem * lbi = m_privacy->m_denyList->item( i ); m_privacy->m_denyList->takeItem( lbi ); m_privacy->m_allowList->insertItem( lbi ); } @@ -179,10 +179,10 @@ void GroupWisePrivacyDialog::slotAddClicked() m_searchDlg = new KDialogBase( this, "privacysearchdialog", false, i18n( "Search for Contact to Block" ), KDialogBase::Ok|KDialogBase::Cancel ); - m_search = new GroupWiseContactSearch( m_account, QListView::Multi, false, m_searchDlg, "privacysearchwidget" ); + m_search = new GroupWiseContactSearch( m_account, TQListView::Multi, false, m_searchDlg, "privacysearchwidget" ); m_searchDlg->setMainWidget( m_search ); - connect( m_searchDlg, SIGNAL( okClicked() ), SLOT( slotSearchedForUsers() ) ); - connect( m_search, SIGNAL( selectionValidates( bool ) ), m_searchDlg, SLOT( enableButtonOK( bool ) ) ); + connect( m_searchDlg, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotSearchedForUsers() ) ); + connect( m_search, TQT_SIGNAL( selectionValidates( bool ) ), m_searchDlg, TQT_SLOT( enableButtonOK( bool ) ) ); m_searchDlg->enableButtonOK( false ); } m_searchDlg->show(); @@ -191,10 +191,10 @@ void GroupWisePrivacyDialog::slotAddClicked() void GroupWisePrivacyDialog::slotSearchedForUsers() { // create an item for each result, in the block list - QValueList< ContactDetails > selected = m_search->selectedResults(); - QValueList< ContactDetails >::Iterator it = selected.begin(); - const QValueList< ContactDetails >::Iterator end = selected.end(); - QPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); + TQValueList< ContactDetails > selected = m_search->selectedResults(); + TQValueList< ContactDetails >::Iterator it = selected.begin(); + const TQValueList< ContactDetails >::Iterator end = selected.end(); + TQPixmap icon = m_account->protocol()->groupwiseAvailable.iconFor( m_account ); for ( ; it != end; ++it ) { m_dirty = true; @@ -213,7 +213,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked() if ( m_privacy->m_denyList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_denyList->item( i ); + TQListBoxItem * lbi = m_privacy->m_denyList->item( i ); // can't remove the default policy if ( lbi == m_defaultPolicy ) continue; @@ -225,7 +225,7 @@ void GroupWisePrivacyDialog::slotRemoveClicked() if ( m_privacy->m_allowList->isSelected( i ) ) { m_dirty = true; - QListBoxItem * lbi = m_privacy->m_allowList->item( i ); + TQListBoxItem * lbi = m_privacy->m_allowList->item( i ); // can't remove the default policy if ( lbi == m_defaultPolicy ) continue; @@ -238,9 +238,9 @@ void GroupWisePrivacyDialog::slotRemoveClicked() void GroupWisePrivacyDialog::slotAllowListClicked() { // don't get into feedback - disconnect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), this, SLOT( slotDenyListClicked() ) ); + disconnect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDenyListClicked() ) ); m_privacy->m_denyList->clearSelection(); - connect( m_privacy->m_denyList, SIGNAL( selectionChanged() ), SLOT( slotDenyListClicked() ) ); + connect( m_privacy->m_denyList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotDenyListClicked() ) ); bool selected = false; for( int i = m_privacy->m_allowList->count() - 1; i >= 0 ; --i ) { @@ -258,9 +258,9 @@ void GroupWisePrivacyDialog::slotAllowListClicked() void GroupWisePrivacyDialog::slotDenyListClicked() { // don't get into feedback - disconnect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), this, SLOT( slotAllowListClicked() ) ); + disconnect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotAllowListClicked() ) ); m_privacy->m_allowList->clearSelection(); - connect( m_privacy->m_allowList, SIGNAL( selectionChanged() ), SLOT( slotAllowListClicked() ) ); + connect( m_privacy->m_allowList, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotAllowListClicked() ) ); bool selected = false; for( int i = m_privacy->m_denyList->count() - 1; i >= 0 ; --i ) { @@ -310,8 +310,8 @@ void GroupWisePrivacyDialog::commitChanges() if ( m_account->isConnected() ) { bool defaultDeny = false; - QStringList denyList; - QStringList allowList; + TQStringList denyList; + TQStringList allowList; // pass on our current allow, deny and default policy to the PrivacyManager for( int i = 0; i < (int)m_privacy->m_denyList->count(); ++i ) { |