summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/contactlist/kopetelviprops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/contactlist/kopetelviprops.cpp')
-rw-r--r--kopete/kopete/contactlist/kopetelviprops.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kopete/kopete/contactlist/kopetelviprops.cpp b/kopete/kopete/contactlist/kopetelviprops.cpp
index bf5431bf..1867dea5 100644
--- a/kopete/kopete/contactlist/kopetelviprops.cpp
+++ b/kopete/kopete/contactlist/kopetelviprops.cpp
@@ -23,14 +23,14 @@
#include <kdebug.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
#include <kfiledialog.h>
@@ -65,7 +65,7 @@ const char MC_AW[] = "metacontact_away";
const char MC_UNK[] = "metacontact_unknown";
-KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name)
+KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Properties of Group %1").arg(gvi->group()->displayName()), Ok|Cancel, Ok, false)
{
mainWidget = new KopeteGVIPropsWidget(this, "mainWidget");
@@ -83,22 +83,22 @@ KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const
mainWidget->chkUseCustomIcons->setChecked( item->group()->useCustomIcon() );
- QString openName = item->group()->icon( Kopete::ContactListElement::Open );
+ TQString openName = item->group()->icon( Kopete::ContactListElement::Open );
if(openName.isEmpty())
openName = KOPETE_GROUP_DEFAULT_OPEN_ICON;
- QString closeName = item->group()->icon( Kopete::ContactListElement::Closed );
+ TQString closeName = item->group()->icon( Kopete::ContactListElement::Closed );
if(closeName.isEmpty())
closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON;
mainWidget->icnbOpen->setIcon( openName );
mainWidget->icnbClosed->setIcon( closeName );
- connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) );
- connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUseCustomIconsToggled( bool ) ) );
- connect( mainWidget->icnbOpen, SIGNAL( iconChanged( QString ) ),
- SLOT( slotIconChanged() ) );
- connect( mainWidget->icnbClosed, SIGNAL( iconChanged( QString ) ),
- SLOT( slotIconChanged() ) );
+ connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) );
+ connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) );
+ connect( mainWidget->icnbOpen, TQT_SIGNAL( iconChanged( TQString ) ),
+ TQT_SLOT( slotIconChanged() ) );
+ connect( mainWidget->icnbClosed, TQT_SIGNAL( iconChanged( TQString ) ),
+ TQT_SLOT( slotIconChanged() ) );
slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() );
}
@@ -145,7 +145,7 @@ void KopeteGVIProps::slotIconChanged()
// =============================================================================
-KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *parent, const char *name)
+KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Properties of Meta Contact %1").arg(lvi->metaContact()->displayName()), Ok|Cancel, Ok, false)
{
m_countPhotoCapable = 0;
@@ -158,10 +158,10 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
mNotificationProps = new CustomNotificationProps( this, lvi->metaContact() );
// add a button to the notification props to get the sound from KABC
// the widget's vert box layout, horiz box layout containing button, spacer, followed by a spacer
- QBoxLayout * vb = static_cast<QVBoxLayout*>( mNotificationProps->widget()->layout() );
+ TQBoxLayout * vb = static_cast<TQVBoxLayout*>( mNotificationProps->widget()->layout() );
- QHBoxLayout* hb = new QHBoxLayout( vb, -1, "soundFromKABClayout" );
- mFromKABC = new QPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" );
+ TQHBoxLayout* hb = new TQHBoxLayout( vb, -1, "soundFromKABClayout" );
+ mFromKABC = new TQPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" );
hb->addWidget( mFromKABC ); // [ [Button] <-xxxxx-> ]
hb->addStretch();
vb->addStretch(); // vert spacer keeps the rest snug
@@ -170,36 +170,36 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
setMainWidget( mainWidget );
item = lvi;
- connect( mainWidget->radioNameKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioNameContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioNameCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->radioPhotoCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->cmbPhotoUrl, SIGNAL(urlSelected(const QString &)), SLOT(slotEnableAndDisableWidgets()));
- connect( mainWidget->cmbAccountPhoto, SIGNAL(activated ( int )), SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioNameCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->radioPhotoCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->cmbPhotoUrl, TQT_SIGNAL(urlSelected(const TQString &)), TQT_SLOT(slotEnableAndDisableWidgets()));
+ connect( mainWidget->cmbAccountPhoto, TQT_SIGNAL(activated ( int )), TQT_SLOT(slotEnableAndDisableWidgets()));
- mainWidget->btnClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
- connect( mainWidget->btnClearPhoto, SIGNAL( clicked() ), this, SLOT( slotClearPhotoClicked() ) );
- connect( mainWidget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee & ) ), SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) );
+ mainWidget->btnClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
+ connect( mainWidget->btnClearPhoto, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearPhotoClicked() ) );
+ connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) );
mainWidget->chkUseCustomIcons->setChecked( item->metaContact()->useCustomIcon() );
- QString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline );
+ TQString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline );
if(offlineName.isEmpty())
- offlineName = QString::fromLatin1(MC_OFF); // Default
+ offlineName = TQString::fromLatin1(MC_OFF); // Default
- QString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online );
+ TQString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online );
if(onlineName.isEmpty())
- onlineName = QString::fromLatin1(MC_ON); // Default
+ onlineName = TQString::fromLatin1(MC_ON); // Default
- QString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away );
+ TQString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away );
if(awayName.isEmpty())
- awayName = QString::fromLatin1(MC_AW); // Default
+ awayName = TQString::fromLatin1(MC_AW); // Default
- QString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown );
+ TQString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown );
if(unknownName.isEmpty())
- unknownName = QString::fromLatin1(MC_UNK); // Default
+ unknownName = TQString::fromLatin1(MC_UNK); // Default
mainWidget->icnbOffline->setIcon( offlineName );
mainWidget->icnbOnline->setIcon( onlineName );
@@ -232,17 +232,17 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren
slotLoadNameSources();
slotLoadPhotoSources();
- connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) );
- connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUseCustomIconsToggled( bool ) ) );
- connect( mainWidget->btnImportKABC, SIGNAL( clicked() ),
- this, SLOT( slotImportClicked() ) );
- connect( mainWidget->btnExportKABC, SIGNAL( clicked() ),
- this, SLOT( slotExportClicked() ) );
- connect( mFromKABC, SIGNAL( clicked() ),
- this, SLOT( slotFromKABCClicked() ) );
- connect( mNotificationProps->widget()->customSound, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( slotOpenSoundDialog( KURLRequester * )));
+ connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) );
+ connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) );
+ connect( mainWidget->btnImportKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotImportClicked() ) );
+ connect( mainWidget->btnExportKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotExportClicked() ) );
+ connect( mFromKABC, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotFromKABCClicked() ) );
+ connect( mNotificationProps->widget()->customSound, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( slotOpenSoundDialog( KURLRequester * )));
slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() );
slotEnableAndDisableWidgets();
@@ -256,13 +256,13 @@ KopeteMetaLVIProps::~KopeteMetaLVIProps()
void KopeteMetaLVIProps::slotLoadNameSources()
{
Kopete::Contact* trackingName = item->metaContact()->displayNameSourceContact();
- QPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
- QPtrListIterator<Kopete::Contact> it( cList );
+ TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
+ TQPtrListIterator<Kopete::Contact> it( cList );
mainWidget->cmbAccountName->clear();
for( ; it.current(); ++it )
{
- QString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">";
- QPixmap acctIcon = it.current()->account()->accountIcon();
+ TQString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">";
+ TQPixmap acctIcon = it.current()->account()->accountIcon();
mainWidget->cmbAccountName->insertItem( acctIcon, acct );
// Select this item if it's the one we're tracking.
@@ -285,18 +285,18 @@ void KopeteMetaLVIProps::slotLoadNameSources()
void KopeteMetaLVIProps::slotLoadPhotoSources()
{
// fill photo contact sources
- QPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
+ TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts();
m_withPhotoContacts.clear();
Kopete::Contact* trackingPhoto = item->metaContact()->photoSourceContact();
mainWidget->cmbAccountPhoto->clear();
- QPtrListIterator<Kopete::Contact> itp( cList );
+ TQPtrListIterator<Kopete::Contact> itp( cList );
for( ; itp.current(); ++itp )
{
Kopete::Contact *citem = itp.current();
if ( citem->hasProperty( Kopete::Global::Properties::self()->photo().key() ) )
{
- QString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">";
- QPixmap acctIcon = citem->account()->accountIcon();
+ TQString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">";
+ TQPixmap acctIcon = citem->account()->accountIcon();
mainWidget->cmbAccountPhoto->insertItem( acctIcon, acct );
// Select this item if it's the one we're tracking.
@@ -358,7 +358,7 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets()
mainWidget->cmbAccountPhoto->setEnabled(false);
}
- QImage photo;
+ TQImage photo;
switch ( selectedPhotoSource() )
{
case Kopete::MetaContact::SourceKABC:
@@ -368,13 +368,13 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets()
photo = Kopete::photoFromContact(selectedPhotoSourceContact());
break;
case Kopete::MetaContact::SourceCustom:
- photo = QImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url()));
+ photo = TQImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url()));
break;
}
if( !photo.isNull() )
- mainWidget->photoLabel->setPixmap(QPixmap(photo.smoothScale( 64, 92, QImage::ScaleMin )));
+ mainWidget->photoLabel->setPixmap(TQPixmap(photo.smoothScale( 64, 92, TQImage::ScaleMin )));
else
- mainWidget->photoLabel->setPixmap( QPixmap() );
+ mainWidget->photoLabel->setPixmap( TQPixmap() );
}
Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() const
@@ -489,7 +489,7 @@ void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a )
{
mainWidget->btnExportKABC->setEnabled( false );
mainWidget->btnImportKABC->setEnabled( false );
- mAddressBookUid = QString::null;
+ mAddressBookUid = TQString::null;
mainWidget->radioNameContact->setChecked( true );
mainWidget->radioPhotoContact->setChecked( true );
}
@@ -501,7 +501,7 @@ void KopeteMetaLVIProps::slotExportClicked()
item->metaContact()->setMetaContactId( mAddressBookUid );
delete mExport;
mExport = new KopeteAddressBookExport( this, item->metaContact() );
- if ( mExport->showDialog() == QDialog::Accepted )
+ if ( mExport->showDialog() == TQDialog::Accepted )
mExport->exportData();
}
@@ -523,26 +523,26 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KURLRequester *requester )
{
// taken from kdelibs/kio/kfile/knotifydialog.cpp
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( slotOpenSoundDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( slotOpenSoundDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
//fileDialog->setCaption( i18n("Select Sound File") );
- QStringList filters;
+ TQStringList filters;
filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg"
<< "audio/x-adpcm";
fileDialog->setMimeFilter( filters );
// find the first "sound"-resource that contains files
- QStringList soundDirs =
+ TQStringList soundDirs =
KGlobal::dirs()->findDirs("data", "kopete/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL soundURL;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -560,7 +560,7 @@ void KopeteMetaLVIProps::slotClearPhotoClicked()
#if KDE_IS_VERSION(3,4,0)
mainWidget->cmbPhotoUrl->setKURL( KURL() );
#else
- mainWidget->cmbPhotoUrl->setURL( QString::null );
+ mainWidget->cmbPhotoUrl->setURL( TQString::null );
#endif
item->metaContact()->setPhoto( KURL() );