summaryrefslogtreecommitdiffabout
path: root/kabc/distributionlisteditor.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/distributionlisteditor.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kabc/distributionlisteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/distributionlisteditor.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 9f5840b..ca5ecb7 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -15,23 +15,27 @@
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#ifdef DESKTOP_VERSION
#include <qinputdialog.h>
#else
#include <qtcompat/qinputdialog.h>
#endif
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qradiobutton.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kdebug.h>
#include "addressbook.h"
#include "addresseedialog.h"
@@ -45,16 +49,16 @@ using namespace KABC;
EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &current,
QWidget *parent ) :
KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
parent )
{
- QFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ Q3Frame *topFrame = plainPage();
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
- mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"),
+ mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
topFrame );
topLayout->addWidget( mButtonGroup );
QStringList::ConstIterator it;
for( it = emails.begin(); it != emails.end(); ++it ) {
QRadioButton *button = new QRadioButton( *it, mButtonGroup );
@@ -63,13 +67,13 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
}
}
}
QString EmailSelectDialog::selected()
{
- QButton *button = mButtonGroup->selected();
+ QAbstractButton *button = mButtonGroup->selected();
if ( button ) return button->text();
return QString::null;
}
QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &current,
QWidget *parent )
@@ -82,18 +86,18 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
delete dlg;
return result;
}
-class EditEntryItem : public QListViewItem
+class EditEntryItem : public Q3ListViewItem
{
public:
- EditEntryItem( QListView *parent, const Addressee &addressee,
+ EditEntryItem( Q3ListView *parent, const Addressee &addressee,
const QString &email=QString::null ) :
- QListViewItem( parent ),
+ Q3ListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
{
setText( 0, addressee.realName() );
if( email.isEmpty() ) {
setText( 1, addressee.preferredEmail() );
@@ -122,17 +126,17 @@ class EditEntryItem : public QListViewItem
DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidget *parent) :
QWidget( parent ),
mAddressBook( addressBook )
{
kdDebug(5700) << "DistributionListEditor()" << endl;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ;
+ Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
mNameCombo = new QComboBox( this );
nameLayout->addWidget( mNameCombo );
connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
newButton = new QPushButton( i18n("New List"), this );
@@ -140,13 +144,13 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
connect( newButton, SIGNAL( clicked() ), SLOT( newList() ) );
removeButton = new QPushButton( i18n("Remove List"), this );
nameLayout->addWidget( removeButton );
connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
- mEntryView = new QListView( this );
+ mEntryView = new Q3ListView( this );
mEntryView->addColumn( i18n("Name") );
mEntryView->addColumn( i18n("Email") );
mEntryView->addColumn( i18n("Use Preferred") );
topLayout->addWidget( mEntryView );
connect(mEntryView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionEntryViewChanged()));
@@ -159,13 +163,13 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
connect( removeEntryButton, SIGNAL( clicked() ), SLOT( removeEntry() ) );
addEntryButton = new QPushButton( i18n("Add Entry"), this );
topLayout->addWidget( addEntryButton );
connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
- mAddresseeView = new QListView( this );
+ mAddresseeView = new Q3ListView( this );
mAddresseeView->addColumn( i18n("Name") );
mAddresseeView->addColumn( i18n("Preferred Email") );
topLayout->addWidget( mAddresseeView );
connect(mAddresseeView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionAddresseeViewChanged()));