summaryrefslogtreecommitdiffstats
path: root/kaddressbook/emaileditwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/emaileditwidget.cpp')
-rw-r--r--kaddressbook/emaileditwidget.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp
index 8fc857f7e..6d52c90ba 100644
--- a/kaddressbook/emaileditwidget.cpp
+++ b/kaddressbook/emaileditwidget.cpp
@@ -21,15 +21,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kaccelmanager.h>
#include <kconfig.h>
@@ -48,9 +48,9 @@ class EmailValidator : public QRegExpValidator
{
public:
EmailValidator()
- : QRegExpValidator( 0, "EmailValidator" )
+ : TQRegExpValidator( 0, "EmailValidator" )
{
- QRegExp rx( ".*@.*\\.[A-Za-z]+" );
+ TQRegExp rx( ".*@.*\\.[A-Za-z]+" );
setRegExp( rx );
}
};
@@ -58,54 +58,54 @@ class EmailValidator : public QRegExpValidator
class EmailItem : public QListBoxText
{
public:
- EmailItem( QListBox *parent, const QString &text, bool preferred )
- : QListBoxText( parent, text ), mPreferred( preferred )
+ EmailItem( TQListBox *parent, const TQString &text, bool preferred )
+ : TQListBoxText( parent, text ), mPreferred( preferred )
{}
void setPreferred( bool preferred ) { mPreferred = preferred; }
bool preferred() const { return mPreferred; }
- void setText( const QString &text )
+ void setText( const TQString &text )
{
- QListBoxText::setText( text );
+ TQListBoxText::setText( text );
}
protected:
- virtual void paint( QPainter *p )
+ virtual void paint( TQPainter *p )
{
if ( mPreferred ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( true );
p->setFont( font );
}
- QListBoxText::paint( p );
+ TQListBoxText::paint( p );
}
private:
bool mPreferred;
};
-EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+EmailEditWidget::EmailEditWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Email:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Email:" ), this );
topLayout->addWidget( label, 0, 0 );
mEmailEdit = new KLineEdit( this );
mEmailEdit->setValidator( new EmailValidator );
- connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
- connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
- SIGNAL( modified() ) );
+ connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
label->setBuddy( mEmailEdit );
topLayout->addWidget( mEmailEdit, 0, 1 );
- mEditButton = new QPushButton( i18n( "Edit Email Addresses..." ), this);
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "Edit Email Addresses..." ), this);
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
topLayout->addMultiCellWidget( mEditButton, 1, 1, 0, 1 );
topLayout->activate();
@@ -121,7 +121,7 @@ void EmailEditWidget::setReadOnly( bool readOnly )
mEditButton->setEnabled( !readOnly );
}
-void EmailEditWidget::setEmails( const QStringList &list )
+void EmailEditWidget::setEmails( const TQStringList &list )
{
mEmailList = list;
@@ -134,7 +134,7 @@ void EmailEditWidget::setEmails( const QStringList &list )
mEmailEdit->blockSignals( blocked );
}
-QStringList EmailEditWidget::emails()
+TQStringList EmailEditWidget::emails()
{
if ( mEmailEdit->text().isEmpty() ) {
if ( mEmailList.count() > 0 )
@@ -162,7 +162,7 @@ void EmailEditWidget::edit()
}
}
-void EmailEditWidget::textChanged( const QString &text )
+void EmailEditWidget::textChanged( const TQString &text )
{
if ( mEmailList.count() > 0 )
mEmailList.remove( mEmailList.begin() );
@@ -171,51 +171,51 @@ void EmailEditWidget::textChanged( const QString &text )
}
-EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
+EmailEditDialog::EmailEditDialog( const TQStringList &list, TQWidget *parent,
const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Edit Email Addresses" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Help,
parent, name, true )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 4, 3, 0, spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( page, 4, 3, 0, spacingHint() );
- mEmailListBox = new QListBox( page );
+ mEmailListBox = new TQListBox( page );
// Make sure there is room for the scrollbar
mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 );
- connect( mEmailListBox, SIGNAL( highlighted( int ) ),
- SLOT( selectionChanged( int ) ) );
- connect( mEmailListBox, SIGNAL( selected( int ) ),
- SLOT( edit() ) );
+ connect( mEmailListBox, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( selectionChanged( int ) ) );
+ connect( mEmailListBox, TQT_SIGNAL( selected( int ) ),
+ TQT_SLOT( edit() ) );
topLayout->addMultiCellWidget( mEmailListBox, 0, 3, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add..." ), page );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
+ mAddButton = new TQPushButton( i18n( "Add..." ), page );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
topLayout->addWidget( mAddButton, 0, 2 );
- mEditButton = new QPushButton( i18n( "Edit..." ), page );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "Edit..." ), page );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
topLayout->addWidget( mEditButton, 1, 2 );
- mRemoveButton = new QPushButton( i18n( "Remove" ), page );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), page );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
topLayout->addWidget( mRemoveButton, 2, 2 );
- mStandardButton = new QPushButton( i18n( "Set Standard" ), page );
- connect( mStandardButton, SIGNAL( clicked() ), SLOT( standard() ) );
+ mStandardButton = new TQPushButton( i18n( "Set Standard" ), page );
+ connect( mStandardButton, TQT_SIGNAL( clicked() ), TQT_SLOT( standard() ) );
topLayout->addWidget( mStandardButton, 3, 2 );
topLayout->activate();
- QStringList items = list;
+ TQStringList items = list;
if ( items.remove( "" ) > 0 )
mChanged = true;
else
mChanged = false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
bool preferred = true;
for ( it = items.begin(); it != items.end(); ++it ) {
new EmailItem( mEmailListBox, *it, preferred );
@@ -226,16 +226,16 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
selectionChanged( -1 );
KAcceleratorManager::manage( this );
- setInitialSize( QSize( 400, 200 ) );
+ setInitialSize( TQSize( 400, 200 ) );
}
EmailEditDialog::~EmailEditDialog()
{
}
-QStringList EmailEditDialog::emails() const
+TQStringList EmailEditDialog::emails() const
{
- QStringList emails;
+ TQStringList emails;
for ( uint i = 0; i < mEmailListBox->count(); ++i ) {
EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( i ) );
@@ -253,8 +253,8 @@ void EmailEditDialog::add()
EmailValidator *validator = new EmailValidator;
bool ok = false;
- QString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ),
- QString::null, &ok, this, "EmailEditDialog",
+ TQString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ),
+ TQString::null, &ok, this, "EmailEditDialog",
validator );
if ( !ok )
@@ -278,7 +278,7 @@ void EmailEditDialog::edit()
int editPos = mEmailListBox->currentItem();
- QString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ),
+ TQString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ),
mEmailListBox->text( editPos ), &ok, this,
"EmailEditDialog", validator );
@@ -300,10 +300,10 @@ void EmailEditDialog::edit()
void EmailEditDialog::remove()
{
- QString address = mEmailListBox->currentText();
+ TQString address = mEmailListBox->currentText();
- QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address );
- QString caption = i18n( "Confirm Remove" );
+ TQString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address );
+ TQString caption = i18n( "Confirm Remove" );
if ( KMessageBox::warningContinueCancel( this, text, caption, KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Continue) {
EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( mEmailListBox->currentItem() ) );