summaryrefslogtreecommitdiffabout
path: root/kabc/addresseedialog.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addresseedialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addresseedialog.cpp51
1 files changed, 27 insertions, 24 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 671787e..bda1b9e 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -20,11 +20,14 @@
#include <qlayout.h>
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qapplication.h>
#include <qregexp.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qlabel.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kdebug.h>
@@ -38,8 +41,8 @@
using namespace KABC;
-AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
- QListViewItem( parent ),
+AddresseeItem::AddresseeItem( Q3ListView *parent, const Addressee &addressee ) :
+ Q3ListViewItem( parent ),
mAddressee( addressee )
{
setText( Name,addressee.realName());
@@ -71,7 +74,7 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
QWidget *listWidget = new QWidget( mMiniSplitter );
- QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ;
+ Q3VBoxLayout *listLayout = new Q3VBoxLayout (listWidget) ;
//topLayout->addLayout( listLayout );
mAddresseeList = new KListView( listWidget );
@@ -81,10 +84,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mAddresseeList->setAllColumnsShowFocus( true );
mAddresseeList->setFullWidth( true );
listLayout->addWidget( mAddresseeList );
- connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ),
+ connect( mAddresseeList, SIGNAL( doubleClicked( Q3ListViewItem * ) ),
SLOT( slotOk() ) );
//QHBox* searchBox = new QHBox ( listWidget );
- QHBox * hb = new QHBox ( listWidget );
+ Q3HBox * hb = new Q3HBox ( listWidget );
listLayout->addWidget ( hb );
mAddresseeEdit = new QLineEdit( hb );
connect( mAddresseeEdit, SIGNAL( returnPressed() ),
@@ -101,9 +104,9 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mSelectedList->setFullWidth( true );
//connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
// SLOT( removeSelected() ) );
- connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ),
+ connect( mSelectedList, SIGNAL( clicked( Q3ListViewItem * ) ),
SLOT( removeSelected() ) );
- connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ),
+ connect( mSelectedList, SIGNAL( returnPressed( Q3ListViewItem *) ),
SLOT( removeSelected() ) );
#if 0
@@ -111,10 +114,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) );
#endif
- connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( addSelected( QListViewItem * ) ) );
- connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( selectNextItem( QListViewItem * ) ) );
+ connect( mAddresseeList, SIGNAL( clicked( Q3ListViewItem * ) ),
+ SLOT( addSelected( Q3ListViewItem * ) ) );
+ connect( mAddresseeList, SIGNAL( returnPressed( Q3ListViewItem * ) ),
+ SLOT( selectNextItem( Q3ListViewItem * ) ) );
}
@@ -126,7 +129,7 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
SLOT( addressBookChanged() ) );
#endif
loadAddressBook();
- QValueList<int> splitterSize;
+ Q3ValueList<int> splitterSize;
splitterSize.append( ( width() / 5 ) * 3 );
splitterSize.append( ( width() / 5 ) *2 );
mMiniSplitter->setSizes( splitterSize );
@@ -172,7 +175,7 @@ void AddresseeDialog::loadAddressBook()
}
}
-void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item )
+void AddresseeDialog::addCompletionItem( const QString &str, Q3ListViewItem *item )
{
if ( str.isEmpty() ) return;
@@ -184,7 +187,7 @@ void AddresseeDialog::selectItem( const QString &str )
{
if ( str.isEmpty() ) return;
- QListViewItem *item = mItemDict.find( str );
+ Q3ListViewItem *item = mItemDict.find( str );
if ( item ) {
mAddresseeList->blockSignals( true );
mAddresseeList->setSelected( item, true );
@@ -193,30 +196,30 @@ void AddresseeDialog::selectItem( const QString &str )
}
}
-void AddresseeDialog::updateEdit( QListViewItem *item )
+void AddresseeDialog::updateEdit( Q3ListViewItem *item )
{
mAddresseeEdit->setText( item->text( 0 ) );
mAddresseeEdit->setSelection( 0, item->text( 0 ).length() );
}
-void AddresseeDialog::selectNextItem( QListViewItem *item )
+void AddresseeDialog::selectNextItem( Q3ListViewItem *item )
{
addSelected( item );
- QListViewItem *next = item->nextSibling();
+ Q3ListViewItem *next = item->nextSibling();
if ( next ) {
next->setSelected( true );
item->setSelected( false );
mAddresseeList->setCurrentItem( next );
}
}
-void AddresseeDialog::addSelected( QListViewItem *item )
+void AddresseeDialog::addSelected( Q3ListViewItem *item )
{
AddresseeItem *addrItem = (AddresseeItem *)( item );
if ( !addrItem ) return;
Addressee a = addrItem->addressee();
- QListViewItem *selectedItem = mSelectedDict.find( a.uid() );
+ Q3ListViewItem *selectedItem = mSelectedDict.find( a.uid() );
if ( !selectedItem ) {
selectedItem = new AddresseeItem( mSelectedList, a );
mSelectedDict.insert( a.uid(), selectedItem );
@@ -226,10 +229,10 @@ void AddresseeDialog::addSelected( QListViewItem *item )
void AddresseeDialog::removeSelected()
{
- QListViewItem *item = mSelectedList->selectedItem();
+ Q3ListViewItem *item = mSelectedList->selectedItem();
AddresseeItem *addrItem = (AddresseeItem *)( item );
if ( !addrItem ) return;
- QListViewItem *next = item->nextSibling();
+ Q3ListViewItem *next = item->nextSibling();
mSelectedDict.remove( addrItem->addressee().uid() );
delete addrItem;
if ( next )
@@ -255,7 +258,7 @@ Addressee::List AddresseeDialog::addressees()
AddresseeItem *aItem = 0;
if ( mMultiple ) {
- QListViewItem *item = mSelectedList->firstChild();
+ Q3ListViewItem *item = mSelectedList->firstChild();
while( item ) {
aItem = (AddresseeItem *)( item );
if ( aItem ) al.append( aItem->addressee() );