summaryrefslogtreecommitdiffstats
path: root/kaddressbook/phoneeditwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/phoneeditwidget.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/phoneeditwidget.cpp')
-rw-r--r--kaddressbook/phoneeditwidget.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index 6b696dc93..71a9f504f 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -21,16 +21,16 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qsignalmapper.h>
-#include <qstring.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignalmapper.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -46,7 +46,7 @@
#include "phoneeditwidget.h"
-PhoneTypeCombo::PhoneTypeCombo( QWidget *parent )
+PhoneTypeCombo::PhoneTypeCombo( TQWidget *parent )
: KComboBox( parent, "TypeCombo" ),
mType( KABC::PhoneNumber::Home ),
mLastSelected( 0 ),
@@ -56,10 +56,10 @@ PhoneTypeCombo::PhoneTypeCombo( QWidget *parent )
update();
- connect( this, SIGNAL( activated( int ) ),
- this, SLOT( selected( int ) ) );
- connect( this, SIGNAL( activated( int ) ),
- this, SIGNAL( modified() ) );
+ connect( this, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( selected( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( modified() ) );
}
PhoneTypeCombo::~PhoneTypeCombo()
@@ -86,7 +86,7 @@ void PhoneTypeCombo::update()
blockSignals( true );
clear();
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) {
if ( *it == -1 ) { // "Other..." entry
insertItem( i18n( "Other..." ) );
@@ -126,10 +126,10 @@ void PhoneTypeCombo::otherSelected()
update();
}
-PhoneNumberWidget::PhoneNumberWidget( QWidget *parent )
- : QWidget( parent )
+PhoneNumberWidget::PhoneNumberWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 6, 11 );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 6, 11 );
mTypeCombo = new PhoneTypeCombo( this );
mNumberEdit = new KLineEdit( this );
@@ -137,8 +137,8 @@ PhoneNumberWidget::PhoneNumberWidget( QWidget *parent )
layout->addWidget( mTypeCombo );
layout->addWidget( mNumberEdit );
- connect( mTypeCombo, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( mNumberEdit, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( mTypeCombo, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( mNumberEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SIGNAL( modified() ) );
}
void PhoneNumberWidget::setNumber( const KABC::PhoneNumber &number )
@@ -166,28 +166,28 @@ void PhoneNumberWidget::setReadOnly( bool readOnly )
}
-PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
- : QWidget( parent, name ), mReadOnly( false )
+PhoneEditWidget::PhoneEditWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mReadOnly( false )
{
- QGridLayout *layout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 2 );
layout->setSpacing( KDialog::spacingHint() );
- mWidgetLayout = new QVBoxLayout( layout );
+ mWidgetLayout = new TQVBoxLayout( layout );
layout->addMultiCellLayout( mWidgetLayout, 0, 0, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add" ), this );
+ mAddButton = new TQPushButton( i18n( "Add" ), this );
mAddButton->setMaximumSize( mAddButton->sizeHint() );
layout->addWidget( mAddButton, 1, 0, Qt::AlignRight );
- mRemoveButton = new QPushButton( i18n( "Remove" ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), this );
mRemoveButton->setMaximumSize( mRemoveButton->sizeHint() );
layout->addWidget( mRemoveButton, 1, 1 );
- mMapper = new QSignalMapper( this );
- connect( mMapper, SIGNAL( mapped( int ) ), SLOT( changed( int ) ) );
+ mMapper = new TQSignalMapper( this );
+ connect( mMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( changed( int ) ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
}
PhoneEditWidget::~PhoneEditWidget()
@@ -200,7 +200,7 @@ void PhoneEditWidget::setReadOnly( bool readOnly )
mAddButton->setEnabled( !readOnly );
mRemoveButton->setEnabled( !readOnly && mPhoneNumberList.count() > 3 );
- QPtrListIterator<PhoneNumberWidget> it( mWidgets );
+ TQPtrListIterator<PhoneNumberWidget> it( mWidgets );
while ( it.current() ) {
it.current()->setReadOnly( readOnly );
++it;
@@ -259,7 +259,7 @@ void PhoneEditWidget::remove()
void PhoneEditWidget::recreateNumberWidgets()
{
- for ( QWidget *w = mWidgets.first(); w; w = mWidgets.next() ) {
+ for ( TQWidget *w = mWidgets.first(); w; w = mWidgets.next() ) {
mWidgetLayout->remove( w );
w->deleteLater();
}
@@ -272,7 +272,7 @@ void PhoneEditWidget::recreateNumberWidgets()
wdg->setNumber( *it );
mMapper->setMapping( wdg, counter );
- connect( wdg, SIGNAL( modified() ), mMapper, SLOT( map() ) );
+ connect( wdg, TQT_SIGNAL( modified() ), mMapper, TQT_SLOT( map() ) );
mWidgetLayout->addWidget( wdg );
mWidgets.append( wdg );
@@ -291,19 +291,19 @@ void PhoneEditWidget::changed( int pos )
///////////////////////////////////////////
// PhoneTypeDialog
-PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent )
+PhoneTypeDialog::PhoneTypeDialog( int type, TQWidget *parent )
: KDialogBase( Plain, i18n( "Edit Phone Number" ), Ok | Cancel, Ok,
parent, "PhoneTypeDialog", true ),
mType( type )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( page, spacingHint() );
- mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page );
+ mPreferredBox = new TQCheckBox( i18n( "This is the preferred phone number" ), page );
layout->addWidget( mPreferredBox );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page );
+ mGroup = new TQButtonGroup( 2, Horizontal, i18n( "Types" ), page );
layout->addWidget( mGroup );
// fill widgets
@@ -312,10 +312,10 @@ PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent )
KABC::PhoneNumber::TypeList::ConstIterator it;
for ( it = mTypeList.begin(); it != mTypeList.end(); ++it )
- new QCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup );
+ new TQCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup );
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
box->setChecked( mType & mTypeList[ i ] );
}
@@ -327,7 +327,7 @@ int PhoneTypeDialog::type() const
int type = 0;
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
if ( box->isChecked() )
type += mTypeList[ i ];
}