summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abeditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp
index 6354db9..94baa71 100644
--- a/core/pim/addressbook/abeditor.cpp
+++ b/core/pim/addressbook/abeditor.cpp
@@ -1,120 +1,120 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qt Palmtop Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "abeditor.h"
#include "addresspicker.h"
#include <qpe/categoryselect.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qscrollview.h>
#include <qtoolbutton.h>
#include <qpushbutton.h>
#include <qmainwindow.h>
static inline bool containsAlphaNum( const QString &str );
static inline bool constainsWhiteSpace( const QString &str );
// helper functions, convert our comma delimited list to proper
// file format...
void parseEmailFrom( const QString &txt, QString &strDefaultEmail,
QString &strAll );
// helper convert from file format to comma delimited...
void parseEmailTo( const QString &strDefaultEmail,
const QString &strOtherEmail, QString &strBack );
AbEditor::AbEditor( const Contact &entry, const QValueList<int> *newOrdered,
QStringList *slNewOrdered,
- QWidget *parent = 0, const char *name = 0, WFlags fl = 0 )
+ QWidget *parent, const char *name, WFlags fl )
: QDialog( parent, name, TRUE, fl ),
orderedValues( newOrdered ),
slOrdered( slNewOrdered )
{
init();
initMap();
setEntry( entry );
}
AbEditor::~AbEditor()
{
}
void AbEditor::init()
{
middleEdit = 0;
QVBoxLayout *vb = new QVBoxLayout( this );
svPage = new QScrollView( this );
svPage->setHScrollBarMode( QScrollView::AlwaysOff );
vb->addWidget( svPage );
svPage->setResizePolicy( QScrollView::AutoOneFit );
svPage->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( svPage->viewport() );
svPage->addChild( container );
QGridLayout *gl = new QGridLayout( container, 20, 2, 4, 2 );
QLabel *l = new QLabel( tr("First Name"), container );
gl->addWidget( l, 0, 0 );
firstEdit = new QLineEdit( container );
gl->addWidget( firstEdit, 0, 1 );
l = new QLabel( tr("Last Name"), container );
gl->addWidget( l, 1, 0 );
lastEdit = new QLineEdit( container );
gl->addWidget( lastEdit, 1, 1 );
l = new QLabel( tr("Categories"), container );
gl->addWidget( l, 2, 0 );
cmbCat = new CategorySelect( container );
gl->addWidget( cmbCat, 2, 1 );
int i;
bool foundGender,
foundNotes;
foundGender = foundNotes = false;
QStringList::ConstIterator it = slOrdered->begin();
for ( i = 0; it != slOrdered->end(); i++, ++it ) {
if ( !foundGender && *it == tr("Gender") ) {
foundGender = true;
} else if ( !foundNotes && *it == tr("Notes") ) {
foundNotes = true;
} else {
l = new QLabel( *it, container );
listName.append( l );
gl->addWidget( l, i + 3, 0 );
QLineEdit *e = new QLineEdit( container );
listValue.append( e );
gl->addWidget( e, i + 3, 1 );
if ( *it == tr( "Middle Name" ) )
middleEdit = e;
}