summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO11
-rw-r--r--core/pim/addressbook/addressbook.cpp9
-rw-r--r--core/pim/addressbook/configdlg_base.ui6
-rw-r--r--core/pim/addressbook/contacteditor.cpp153
-rw-r--r--core/pim/addressbook/contacteditor.h16
5 files changed, 154 insertions, 41 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 96134f4..100a6fd 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,43 +1,46 @@
Stuff todo until OPIE 1.0 :
Pending bugfixes from previous work:
Urgent:
Important:
-- Personal contact editor: Disable categories
- Name order selected in "contacteditor" not used in list view.
-- contacteditor: Birthday, annyversary, ... : Use Dateselector
- Overview window cleanup needed..
- Cursor keys should work in detail-view (ablabel)
-- "What's this" should be added
+ -> Ablabel should be removed and Abtable should be increased with
+ different views (as started by darwin zins)..
- Store last settings of combo-boxes
- Finishing of new View functions (List, Phonebook...)
- The names of the countries are sorted by there english names, only..
Even if they are translated.. :S
- Reload if contacts were changed externally
+- "What's this" should be added
Less important:
- The picker (alphabetical sort widget) should be
placed verticaly or horizontally (configurable)
- Use advanced database functions in abtable to decrease
memory footprint and to make everything more easy !
(abtable should store Iterator for selected Category)
Should be Fixed (not absolute sure, need further validation):
-- "Nonenglish" translation bug has to be fixed.
+
Fixed:
- Syncing: abtable not reloaded after sync.
- Find widget should be replaced by something like
qpdf has.
- Adding a configuration dialog
- Picker: Activated letter schould be more visible
- Advanced handling of cursor keys (search..)
- Mail-Icon is missing
- Use opie-mail insted of qt-mail if possible.
- Font menu is invisible using german translation
+- Personal contact editor: Disable categories
+- "Nonenglish" translation bug has to be fixed.
+- contacteditor: Birthday, annyversary, ... : Use Dateselector
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 39d8321..108e66d 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -49,97 +49,97 @@
#include <qmessagebox.h>
#include <qpixmap.h>
#include <qpopupmenu.h>
#include <qpe/qpetoolbar.h>
#include <qstringlist.h>
#include <qtoolbutton.h>
#include <qwhatsthis.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <qdatetime.h>
#include "picker.h"
#include "configdlg.h"
static QString addressbookPersonalVCardName()
{
QString filename = Global::applicationFileName("addressbook",
"businesscard.vcf");
return filename;
}
AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
WFlags f )
: QMainWindow( parent, name, f ),
abEditor(0),
useRegExp(false),
doNotifyWrapAround(true),
caseSensitive(false),
m_useQtMail(true),
m_useOpieMail(false),
bAbEditFirstTime(TRUE),
syncing(FALSE)
{
isLoading = true;
// Read Config settings
Config cfg("AddressBook");
cfg.setGroup("Search");
useRegExp = cfg.readBoolEntry( "useRegExp" );
caseSensitive = cfg.readBoolEntry( "caseSensitive" );
doNotifyWrapAround = cfg.readBoolEntry( "doNotifyWrapAround" );
cfg.setGroup("Mail");
- m_useQtMail = cfg.readBoolEntry( "useQtMail" );
+ m_useQtMail = cfg.readBoolEntry( "useQtMail", true );
m_useOpieMail=cfg.readBoolEntry( "useOpieMail" );
initFields();
setCaption( tr("Contacts") );
setIcon( Resource::loadPixmap( "AddressBook" ) );
setToolBarsMovable( FALSE );
// Create Toolbars
QPEToolBar *bar = new QPEToolBar( this );
bar->setHorizontalStretchable( TRUE );
QPEMenuBar *mbList = new QPEMenuBar( bar );
mbList->setMargin( 0 );
QPopupMenu *edit = new QPopupMenu( this );
mbList->insertItem( tr( "Contact" ), edit );
listTools = new QPEToolBar( this, "list operations" );
QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
0, this, 0 );
actionNew = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
a->addTo( edit );
a->addTo( listTools );
a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
0, this, 0 );
actionEdit = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
a->addTo( edit );
a->addTo( listTools );
a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
0, this, 0 );
actionTrash = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
a->addTo( edit );
a->addTo( listTools );
// make it possible to go directly to businesscard via qcop call
#if defined(Q_WS_QWS)
@@ -628,117 +628,122 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
} else {
abEditor->setEntry( cnt );
}
abView()->init( cnt );
editEntry( NewEntry );
}
#if 0
else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) {
QDataStream stream(data,IO_ReadOnly);
QCString ch,m;
QStringList types;
stream >> ch >> m >> types;
AddressPicker picker(abList,this,0,TRUE);
picker.showMaximized();
picker.setChoiceNames(types);
int i=0;
for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
QStringList sel;
stream >> sel;
picker.setSelection(i++,sel);
}
picker.showMaximized();
picker.exec();
// ###### note: contacts may have been added - save here!
setCentralWidget(abList);
QCopEnvelope e(ch,m);
i=0;
for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
QStringList sel = picker.selection(i++);
e << sel;
}
}
#endif
}
void AddressbookWindow::editPersonal()
{
QString filename = addressbookPersonalVCardName();
OContact me;
if (QFile::exists(filename))
me = OContact::readVCard( filename )[0];
if (bAbEditFirstTime) {
+ qWarning("Editing personal data");
abEditor = new ContactEditor( me, &orderedFields, &slOrderedFields,
this, "editor" );
// don't create a new editor every time
bAbEditFirstTime = FALSE;
- } else
+ } else{
abEditor->setEntry( me );
+ }
+
+ abEditor->setPersonalView( true );
abEditor->setCaption(tr("Edit My Personal Details"));
abEditor->showMaximized();
// fix the foxus...
abEditor->setNameFocus();
if ( abEditor->exec() ) {
setFocus();
OContact new_personal = abEditor->entry();
QString fname = addressbookPersonalVCardName();
OContact::writeVCard( fname, new_personal );
abView()->init(new_personal);
abView()->sync();
}
abEditor->setCaption( tr("Edit Address") );
+ abEditor->setPersonalView( false );
}
void AddressbookWindow::slotPersonalView()
{
if (!actionPersonal->isOn()) {
// we just turned it off
setCaption( tr("Contacts") );
actionNew->setEnabled(TRUE);
actionTrash->setEnabled(TRUE);
actionFind->setEnabled(TRUE);
slotUpdateToolbar(); // maybe some of the above could be moved there
showList();
return;
}
// XXX need to disable some QActions.
actionNew->setEnabled(FALSE);
actionTrash->setEnabled(FALSE);
#ifndef MAKE_FOR_SHARP_ROM
actionFind->setEnabled(FALSE);
#endif
actionMail->setEnabled(FALSE);
setCaption( tr("Contacts - My Personal Details") );
QString filename = addressbookPersonalVCardName();
OContact me;
if (QFile::exists(filename))
me = OContact::readVCard( filename )[0];
abView()->init( me );
abView()->sync();
listContainer->hide();
setCentralWidget( abView() );
mView->show();
mView->setFocus();
}
void AddressbookWindow::editEntry( EntryMode entryMode )
{
OContact entry;
if ( bAbEditFirstTime ) {
abEditor = new ContactEditor( entry, &orderedFields, &slOrderedFields,
this, "editor" );
bAbEditFirstTime = FALSE;
if ( entryMode == EditEntry )
abEditor->setEntry( abList->currentEntry() );
}
// other things may chane the caption.
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index d3ea12e..a6fcffa 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -1,64 +1,64 @@
<!DOCTYPE UI><UI>
<class>ConfigDlg_Base</class>
<author>Stefan Eilers</author>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>Configuration</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>217</width>
- <height>287</height>
+ <width>244</width>
+ <height>298</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>MyDialog1</string>
</property>
<property stdset="1">
<name>sizeGripEnabled</name>
<bool>true</bool>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QTabWidget</class>
<property stdset="1">
<name>name</name>
<cstring>configDlg_base</cstring>
</property>
<property>
<name>layoutMargin</name>
</property>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Widget5</cstring>
</property>
<attribute>
<name>title</name>
<string>Search</string>
</attribute>
<vbox>
<property stdset="1">
<name>margin</name>
<number>5</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
@@ -284,52 +284,54 @@ is provided free !</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>default</name>
<bool>true</bool>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonCancel</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>buttonOk</sender>
<signal>clicked()</signal>
<receiver>Configuration</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>buttonCancel</sender>
<signal>clicked()</signal>
<receiver>Configuration</receiver>
<slot>reject()</slot>
</connection>
</connections>
<tabstops>
<tabstop>configDlg_base</tabstop>
<tabstop>m_useWildCard</tabstop>
<tabstop>m_useCaseSensitive</tabstop>
<tabstop>m_signalWrapAround</tabstop>
+ <tabstop>m_useQtMail</tabstop>
+ <tabstop>m_useOpieMail</tabstop>
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
</UI>
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index e7f2ebd..a59a927 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1,108 +1,111 @@
/*
* Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
*
* This file is an add-on for the OPIE 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 pacakaging
* 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.
*
*
* This is a rewrite of the abeditor.h file, modified to provide a more
* intuitive interface to TrollTech's original Address Book editor. This
* is made to operate exactly in interface with the exception of name.
*
*/
#include "contacteditor.h"
#include "addresspicker.h"
#include <qpe/categoryselect.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
+#include <qpe/timeconversion.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qscrollview.h>
#include <qtoolbutton.h>
#include <qpushbutton.h>
#include <qmainwindow.h>
#include <qvaluelist.h>
+#include <qpopupmenu.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 );
ContactEditor::ContactEditor( const OContact &entry,
const QValueList<int> *newOrderedValues,
QStringList *slNewOrdered,
QWidget *parent,
const char *name,
WFlags fl )
: QDialog( parent, name, TRUE, fl ),
orderedValues( newOrderedValues ),
- slOrdered( *slNewOrdered )
+ slOrdered( *slNewOrdered ),
+ m_personalView ( false )
{
init();
initMap();
setEntry( entry );
qDebug("finish");
}
ContactEditor::~ContactEditor() {
}
void ContactEditor::init() {
useFullName = TRUE;
int i = 0;
/** SHut up and stop leaking
slHomeAddress = new QStringList;
slBusinessAddress = new QStringList;
slChooserNames = new QStringList;
slChooserValues = new QStringList;
slDynamicEntries = new QStringList;
*/
//*slDynamicEntries = *slOrdered;
QStringList trlChooserNames;
for (i = 0; i <= 6; i++) {
slHomeAddress.append( "" );
slBusinessAddress.append( "" );
}
{
hasGender = FALSE;
hasTitle = FALSE;
hasCompany = FALSE;
hasNotes = FALSE;
hasStreet = FALSE;
hasStreet2 = FALSE;
hasPOBox = FALSE;
hasCity = FALSE;
hasState = FALSE;
hasZip = FALSE;
hasCountry = FALSE;
QStringList::ConstIterator it = slOrdered.begin();
@@ -161,97 +164,106 @@ void ContactEditor::init() {
trlChooserNames.append( tr( "Home Mobile" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
if ( (*it) == "Business WebPage" ) {
trlChooserNames.append( tr( "Business WebPage" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
if ( (*it) == "Home Web Page" ) {
trlChooserNames.append( tr( "Home Web Page" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
if ( (*it) == "Business Pager" ) {
trlChooserNames.append( tr( "Business Pager" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
if ( *it == "Default Email" ) {
trlChooserNames.append( tr( "Default Email" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
if ( *it == "Emails" ) {
trlChooserNames.append( tr( "Emails" ) );
slChooserNames.append( *it );
slChooserValues.append( "" );
//slDynamicEntries->remove( it );
continue;
}
- if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" )
+ if ( *it == "Name Title" ||
+ *it == "First Name" ||
+ *it == "Middle Name" ||
+ *it == "Last Name" ||
+ *it == "File As" ||
+ *it == "Default Email" ||
+ *it == "Emails" ||
+ *it == "Groups" ||
+ *it == "Anniversary" ||
+ *it == "Birthday" )
continue;
if ( *it == "Name Title" ) {
//slDynamicEntries->remove( it );
continue;
}
if ( *it == "First Name" ) {
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "Middle Name" ) {
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "Last Name" ) {
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "Suffix" ) {
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "File As" ) {
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "Gender" ) {
hasGender = TRUE;
// slDynamicEntries->remove( it );
continue;
}
if ( *it == "Job Title" ) {
hasTitle = TRUE;
// slDynamicEntries->remove( it );
continue;
}
if ( ( *it == "Company") || (*it == "Organization" ) ) {
hasCompany = TRUE;
// slDynamicEntries->remove( it );
continue;
@@ -357,101 +369,111 @@ void ContactEditor::init() {
vb->addWidget( svGeneral, 0, 0 );
svGeneral->setResizePolicy( QScrollView::AutoOneFit );
svGeneral->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( svGeneral->viewport() );
svGeneral->addChild( container );
QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 );
gl->setResizeMode( QLayout::FreeResize );
btnFullName = new QPushButton( tr( "Full Name..." ), container );
gl->addWidget( btnFullName, 0, 0 );
txtFullName = new QLineEdit( container );
gl->addWidget( txtFullName, 0, 1 );
QLabel *l = new QLabel( tr( "Job Title" ), container );
gl->addWidget( l, 1, 0 );
txtJobTitle = new QLineEdit( container );
gl->addWidget( txtJobTitle, 1, 1 );
l = new QLabel( tr( "Organization" ), container );
gl->addWidget( l, 2, 0 );
txtOrganization = new QLineEdit( container );
gl->addWidget( txtOrganization, 2, 1 );
cmbChooserField1 = new QComboBox( FALSE, container );
cmbChooserField1->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField1, 3, 0 );
txtChooserField1 = new QLineEdit( container );
gl->addWidget( txtChooserField1, 3, 1 );
cmbChooserField2 = new QComboBox( FALSE, container );
cmbChooserField2->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField2, 4, 0 );
txtChooserField2 = new QLineEdit( container );
gl->addWidget( txtChooserField2, 4, 1 );
cmbChooserField3 = new QComboBox( FALSE, container );
cmbChooserField3->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField3, 5, 0 );
txtChooserField3 = new QLineEdit( container );
gl->addWidget( txtChooserField3, 5, 1 );
l = new QLabel( tr( "File As" ), container );
gl->addWidget( l, 6, 0 );
cmbFileAs = new QComboBox( TRUE, container );
gl->addWidget( cmbFileAs, 6, 1 );
- l = new QLabel( tr( "Category" ), container );
- gl->addWidget( l, 7, 0 );
+ labCat = new QLabel( tr( "Category" ), container );
+ gl->addWidget( labCat, 7, 0 );
cmbCat = new CategorySelect( container );
gl->addWidget( cmbCat, 7, 1 );
+ // We don't need categories for the personal view
+ if ( m_personalView ){
+ qWarning("Disable Category..");
+ labCat->hide();
+ cmbCat->hide();
+ } else {
+ labCat->show();
+ cmbCat->show();
+ }
+
btnNote = new QPushButton( tr( "Notes..." ), container );
gl->addWidget( btnNote, 8, 1 );
tabMain->insertTab( tabViewport, tr( "General" ) );
tabViewport = new QWidget ( tabMain );
vb = new QVBoxLayout( tabViewport );
svAddress = new QScrollView( tabViewport );
vb->addWidget( svAddress, 0, 0 );
svAddress->setResizePolicy( QScrollView::AutoOneFit );
svAddress->setFrameStyle( QFrame::NoFrame );
container = new QWidget( svAddress->viewport() );
svAddress->addChild( container );
gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem
cmbAddress = new QComboBox( FALSE, container );
cmbAddress->insertItem( tr( "Business" ) );
cmbAddress->insertItem( tr( "Home" ) );
gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 );
l = new QLabel( tr( "Address" ), container );
gl->addWidget( l, 1, 0 );
txtAddress = new QLineEdit( container );
gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 );
/*
l = new QLabel( tr( "Address 2" ), container );
gl->addWidget( l, 2, 0 );
txtAddress2 = new QLineEdit( container );
gl->addMultiCellWidget( txtAddress2, 2, 2, 1, 2 );
l = new QLabel( tr( "P.O. Box" ), container );
gl->addWidget( l, 3, 0 );
txtPOBox = new QLineEdit( container );
gl->addMultiCellWidget( txtPOBox, 3, 3, 1, 2 );
*/
l = new QLabel( tr( "City" ), container );
gl->addWidget( l, 2, 0 );
txtCity = new QLineEdit( container );
gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 );
l = new QLabel( tr( "State" ), container );
gl->addWidget( l, 3, 0 );
txtState = new QLineEdit( container );
gl->addMultiCellWidget( txtState, 3, 3, 1, 2 );
@@ -662,116 +684,156 @@ void ContactEditor::init() {
cmbCountry->insertItem( tr ( "Turkey" ) );
cmbCountry->insertItem( tr ( "Turkmenistan" ) );
cmbCountry->insertItem( tr ( "Tuvalu" ) );
cmbCountry->insertItem( tr ( "Uganda" ) );
cmbCountry->insertItem( tr ( "Ukraine" ) );
cmbCountry->insertItem( tr ( "Uruguay" ) );
cmbCountry->insertItem( tr ( "Uzbekistan" ) );
cmbCountry->insertItem( tr ( "Vanuatu" ) );
cmbCountry->insertItem( tr ( "Venezuela" ) );
cmbCountry->insertItem( tr ( "Viet Nam" ) );
cmbCountry->insertItem( tr ( "Virgin Islands" ) );
cmbCountry->insertItem( tr ( "Western Sahara" ) );
cmbCountry->insertItem( tr ( "Yemen" ) );
cmbCountry->insertItem( tr ( "Yugoslavia" ) );
cmbCountry->insertItem( tr ( "Zambia" ) );
cmbCountry->insertItem( tr ( "Zimbabwe" ) );
cmbCountry->setMaximumWidth( 135 );
gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 );
cmbChooserField4 = new QComboBox( FALSE, container );
cmbChooserField4->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField4, 6, 0 );
txtChooserField4 = new QLineEdit( container );
gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 );
QSpacerItem *space = new QSpacerItem(1,1,
QSizePolicy::Maximum,
QSizePolicy::MinimumExpanding );
gl->addItem( space, 7, 0 );
tabMain->insertTab( tabViewport, tr( "Address" ) );
tabViewport = new QWidget ( tabMain );
vb = new QVBoxLayout( tabViewport );
svDetails = new QScrollView( tabViewport );
vb->addWidget( svDetails, 0, 0 );
svDetails->setResizePolicy( QScrollView::AutoOneFit );
svDetails->setFrameStyle( QFrame::NoFrame );
container = new QWidget( svDetails->viewport() );
svDetails->addChild( container );
gl = new QGridLayout( container, 1, 2, 2, 4 );
+ int counter = 0;
+
+ // Birthday
+ l = new QLabel( tr("Birthday"), container );
+ gl->addWidget( l, counter, 0 );
+
+ QPopupMenu* m1 = new QPopupMenu( container );
+ birthdayPicker = new DateBookMonth( m1, 0, TRUE );
+ m1->insertItem( birthdayPicker );
+
+ birthdayButton= new QToolButton( container, "buttonStart" );
+ birthdayButton->setPopup( m1 );
+ birthdayButton->setPopupDelay(0);
+ gl->addWidget( birthdayButton, counter , 1 );
+ connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ),
+ this, SLOT( slotBirthdayDateChanged( int, int, int ) ) );
+
+ ++counter;
+
+ // Anniversary
+ l = new QLabel( tr("Anniversary"), container );
+ gl->addWidget( l, counter, 0 );
+
+ m1 = new QPopupMenu( container );
+ anniversaryPicker = new DateBookMonth( m1, 0, TRUE );
+ m1->insertItem( anniversaryPicker );
+
+ anniversaryButton= new QToolButton( container, "buttonStart" );
+ anniversaryButton->setPopup( m1 );
+ anniversaryButton->setPopupDelay(0);
+ gl->addWidget( anniversaryButton, counter , 1 );
+ connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ),
+ this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) );
+
+ ++counter;
+
+ // Gender
+ l = new QLabel( tr("Gender"), container );
+ gl->addWidget( l, counter, 0 );
+ cmbGender = new QComboBox( container );
+ cmbGender->insertItem( "", 0 );
+ cmbGender->insertItem( tr("Male"), 1);
+ cmbGender->insertItem( tr("Female"), 2);
+ gl->addWidget( cmbGender, counter, 1 );
+
+ ++counter;
+
// Create Labels and lineedit fields for every dynamic entry
QStringList::ConstIterator it = slDynamicEntries.begin();
- for (i = 0; it != slDynamicEntries.end(); i++, ++it) {
+ for (i = counter; it != slDynamicEntries.end(); i++, ++it) {
l = new QLabel( QString::null , container );
listName.append( l );
gl->addWidget( l, i, 0 );
QLineEdit *e = new QLineEdit( container );
listValue.append( e );
gl->addWidget( e, i, 1);
}
// Fill labels with names..
loadFields();
- l = new QLabel( tr("Gender"), container );
- gl->addWidget( l, slDynamicEntries.count(), 0 );
- cmbGender = new QComboBox( container );
- cmbGender->insertItem( "", 0 );
- cmbGender->insertItem( tr("Male"), 1);
- cmbGender->insertItem( tr("Female"), 2);
- gl->addWidget( cmbGender, slDynamicEntries.count(), 1 );
tabMain->insertTab( tabViewport, tr( "Details" ) );
dlgNote = new QDialog( this, "Note Dialog", TRUE );
dlgNote->setCaption( tr("Enter Note") );
QVBoxLayout *vbNote = new QVBoxLayout( dlgNote );
txtNote = new QMultiLineEdit( dlgNote );
vbNote->addWidget( txtNote );
connect( btnNote, SIGNAL(clicked()), this, SLOT(slotNote()) );
dlgName = new QDialog( this, "Name Dialog", TRUE );
dlgName->setCaption( tr("Edit Name") );
gl = new QGridLayout( dlgName, 5, 2, 2, 3 );
l = new QLabel( tr("First Name"), dlgName );
gl->addWidget( l, 0, 0 );
txtFirstName = new QLineEdit( dlgName );
gl->addWidget( txtFirstName, 0, 1 );
l = new QLabel( tr("Middle Name"), dlgName );
gl->addWidget( l, 1, 0 );
txtMiddleName = new QLineEdit( dlgName );
gl->addWidget( txtMiddleName, 1, 1 );
l = new QLabel( tr("Last Name"), dlgName );
gl->addWidget( l, 2, 0 );
txtLastName = new QLineEdit( dlgName );
gl->addWidget( txtLastName, 2, 1 );
l = new QLabel( tr("Suffix"), dlgName );
gl->addWidget( l, 3, 0 );
txtSuffix = new QLineEdit( dlgName );
gl->addWidget( txtSuffix, 3, 1 );
space = new QSpacerItem(1,1,
QSizePolicy::Maximum,
QSizePolicy::MinimumExpanding );
gl->addItem( space, 4, 0 );
cmbChooserField1->insertStringList( trlChooserNames );
cmbChooserField2->insertStringList( trlChooserNames );
cmbChooserField3->insertStringList( trlChooserNames );
cmbChooserField4->insertStringList( trlChooserNames );
cmbChooserField1->setCurrentItem( 0 );
cmbChooserField2->setCurrentItem( 1 );
cmbChooserField3->setCurrentItem( 2 );
connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
@@ -964,135 +1026,145 @@ void ContactEditor::slotCmbChooser4Change( int index ) {
}
void ContactEditor::slotAddressTypeChange( int index ) {
if ( index == 0 ) {
txtAddress->setText( slBusinessAddress[0] );
//txtAddress2->setText( (*slBusinessAddress)[1] );
//txtPOBox->setText( (*slBusinessAddress)[2] );
txtCity->setText( slBusinessAddress[3] );
txtState->setText( slBusinessAddress[4] );
txtZip->setText( slBusinessAddress[5] );
QLineEdit *txtTmp = cmbCountry->lineEdit();
txtTmp->setText( slBusinessAddress[6] );
} else {
txtAddress->setText( slHomeAddress[0] );
//txtAddress2->setText( (*slHomeAddress)[1] );
//txtPOBox->setText( (*slHomeAddress)[2] );
txtCity->setText( slHomeAddress[3] );
txtState->setText( slHomeAddress[4] );
txtZip->setText( slHomeAddress[5] );
QLineEdit *txtTmp = cmbCountry->lineEdit();
txtTmp->setText( slHomeAddress[6] );
}
}
void ContactEditor::slotFullNameChange( const QString &textChanged ) {
int index = cmbFileAs->currentItem();
cmbFileAs->clear();
cmbFileAs->insertItem( parseName( textChanged, 0 ) );
cmbFileAs->insertItem( parseName( textChanged, 1 ) );
cmbFileAs->insertItem( parseName( textChanged, 2 ) );
cmbFileAs->insertItem( parseName( textChanged, 3 ) );
cmbFileAs->setCurrentItem( index );
useFullName = TRUE;
}
+// Loads the detail fields
void ContactEditor::loadFields() {
QStringList::ConstIterator it;
QListIterator<QLabel> lit( listName );
for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) {
if ( *it == "Department" )
(*lit)->setText( tr( "Department" ) );
if ( *it == "Company" )
(*lit)->setText( tr( "Company" ) );
if ( *it == "Office" )
(*lit)->setText( tr( "Office" ) );
if ( *it == "Profession" )
(*lit)->setText( tr( "Profession" ) );
if ( *it == "Assistant" )
(*lit)->setText( tr( "Assistant" ) );
if ( *it == "Manager" )
(*lit)->setText( tr( "Manager" ) );
if ( *it == "Spouse" )
(*lit)->setText( tr( "Spouse" ) );
- if ( *it == "Birthday" )
- (*lit)->setText( tr( "Birthday" ) );
-
- if ( *it == "Anniversary" )
- (*lit)->setText( tr( "Anniversary" ) );
-
if ( *it == "Nickname" )
(*lit)->setText( tr( "Nickname" ) );
if ( *it == "Children" )
(*lit)->setText( tr( "Children" ) );
}
+ // Set DatePicker
+ qWarning ("**Info: %s", ent.birthday().latin1() );
+ if ( !ent.birthday().isEmpty() ){
+ birthdayButton->setText( ent.birthday() );
+ birthdayPicker->setDate( TimeConversion::fromString ( ent.birthday() ) );
+ } else
+ birthdayButton->setText( tr ("Unknown") );
+
+ qWarning ("**Info: %s", ent.anniversary().latin1() );
+ if ( !ent.anniversary().isEmpty() ){
+ anniversaryButton->setText( ent.anniversary() );
+ anniversaryPicker->setDate( TimeConversion::fromString ( ent.birthday() ) );
+ } else
+ anniversaryButton->setText( tr ("Unknown") );
+
}
void ContactEditor::accept() {
if ( isEmpty() ) {
cleanupFields();
reject();
} else {
saveEntry();
cleanupFields();
QDialog::accept();
}
}
void ContactEditor::slotNote() {
dlgNote->showMaximized();
if ( !dlgNote->exec() ) {
txtNote->setText( ent.notes() );
}
}
void ContactEditor::slotName() {
QString tmpName;
if (useFullName == TRUE) {
txtFirstName->setText( parseName(txtFullName->text(), NAME_F) );
txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) );
txtLastName->setText( parseName(txtFullName->text(), NAME_L) );
txtSuffix->setText( parseName(txtFullName->text(), NAME_S) );
}
dlgName->showMaximized();
if ( dlgName->exec() ) {
tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text();
txtFullName->setText( tmpName.simplifyWhiteSpace() );
slotFullNameChange( txtFullName->text() );
useFullName = FALSE;
}
}
void ContactEditor::setNameFocus() {
txtFullName->setFocus();
}
@@ -1384,300 +1456,291 @@ void ContactEditor::setEntry( const OContact &entry ) {
(*slHomeAddress)[2] = ent.homePOBox();
(*slBusinessAddress)[2] = ent.businessPOBox();
}
*/
if (hasCity) {
slHomeAddress[3] = ent.homeCity();
slBusinessAddress[3] = ent.businessCity();
}
if (hasState) {
slHomeAddress[4] = ent.homeState();
slBusinessAddress[4] = ent.businessState();
}
if (hasZip) {
slHomeAddress[5] = ent.homeZip();
slBusinessAddress[5] = ent.businessZip();
}
if (hasCountry) {
slHomeAddress[6] = ent.homeCountry();
slBusinessAddress[6] = ent.businessCountry();
}
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
if ( *it == "Department" )
(*itLE)->setText( ent.department() );
if ( *it == "Company" )
(*itLE)->setText( ent.company() );
if ( *it == "Office" )
(*itLE)->setText( ent.office() );
if ( *it == "Profession" )
(*itLE)->setText( ent.profession() );
if ( *it == "Assistant" )
(*itLE)->setText( ent.assistant() );
if ( *it == "Manager" )
(*itLE)->setText( ent.manager() );
if ( *it == "Spouse" )
(*itLE)->setText( ent.spouse() );
- if ( *it == "Birthday" )
- (*itLE)->setText( ent.birthday() );
-
- if ( *it == "Anniversary" )
- (*itLE)->setText( ent.anniversary() );
-
if ( *it == "Nickname" )
(*itLE)->setText( ent.nickname() );
if ( *it == "Children" )
(*itLE)->setText( ent.children() );
}
QStringList::Iterator itV;
for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) )
*itV = ent.businessPhone();
/*
if ( *it == "Business 2 Phone" )
*itV = ent.business2Phone();
*/
if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) )
*itV = ent.businessFax();
if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) )
*itV = ent.businessMobile();
/*
if ( *it == "Company Phone" )
*itV = ent.companyPhone();
*/
if ( *it == "Default Email" )
*itV = ent.defaultEmail();
if ( *it == "Emails" )
*itV = ent.emailList().join(", "); // :SX
if ( *it == "Home Phone" )
*itV = ent.homePhone();
/*
if ( *it == "Home 2 Phone" )
*itV = ent.home2Phone();
*/
if ( *it == "Home Fax" )
*itV = ent.homeFax();
if ( *it == "Home Mobile" )
*itV = ent.homeMobile();
/*
if ( *it == "Car Phone" )
*itV = ent.carPhone();
if ( *it == "ISDN Phone" )
*itV = ent.ISDNPhone();
if ( *it == "Other Phone" )
*itV = ent.otherPhone();
*/
if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) )
*itV = ent.businessPager();
/*
if ( *it == "Home Pager")
*itV = ent.homePager();
if ( *it == "AIM IM" )
*itV = ent.AIMIM();
if ( *it == "ICQ IM" )
*itV = ent.ICQIM();
if ( *it == "Jabber IM" )
*itV = ent.jabberIM();
if ( *it == "MSN IM" )
*itV = ent.MSNIM();
if ( *it == "Yahoo IM" )
*itV = ent.yahooIM();
*/
if ( *it == "Home Web Page" )
*itV = ent.homeWebpage();
if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) )
*itV = ent.businessWebpage();
}
+
cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") );
QString gender = ent.gender();
cmbGender->setCurrentItem( gender.toInt() );
txtNote->setText( ent.notes() );
slotCmbChooser1Change( cmbChooserField1->currentItem() );
slotCmbChooser2Change( cmbChooserField2->currentItem() );
slotCmbChooser3Change( cmbChooserField3->currentItem() );
slotAddressTypeChange( cmbAddress->currentItem() );
+ loadFields();
+
}
void ContactEditor::saveEntry() {
if ( useFullName == TRUE ) {
txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) );
txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) );
txtLastName->setText( parseName( txtFullName->text(), NAME_L ) );
txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) );
useFullName = FALSE;
}
/*if ( ent.firstName() != txtFirstName->text() ||
ent.lastName != txtLastName->text() ||
ent.middleName != txtMiddleName->text() ) {
*/
ent.setFirstName( txtFirstName->text() );
ent.setLastName( txtLastName->text() );
ent.setMiddleName( txtMiddleName->text() );
ent.setSuffix( txtSuffix->text() );
//}
ent.setFileAs( cmbFileAs->currentText() );
ent.setCategories( cmbCat->currentCategories() );
if (hasTitle)
ent.setJobTitle( txtJobTitle->text() );
if (hasCompany)
ent.setCompany( txtOrganization->text() );
if (hasNotes)
ent.setNotes( txtNote->text() );
if (hasStreet) {
ent.setHomeStreet( slHomeAddress[0] );
ent.setBusinessStreet( slBusinessAddress[0] );
}
/*
if (hasStreet2) {
ent.setHomeStreet2( (*slHomeAddress)[1] );
ent.setBusinessStreet2( (*slBusinessAddress)[1] );
}
if (hasPOBox) {
ent.setHomePOBox( (*slHomeAddress)[2] );
ent.setBusinessPOBox( (*slBusinessAddress)[2] );
}
*/
if (hasCity) {
ent.setHomeCity( slHomeAddress[3] );
ent.setBusinessCity( slBusinessAddress[3] );
}
if (hasState) {
ent.setHomeState( slHomeAddress[4] );
ent.setBusinessState( slBusinessAddress[4] );
}
if (hasZip) {
ent.setHomeZip( slHomeAddress[5] );
ent.setBusinessZip( slBusinessAddress[5] );
}
if (hasCountry) {
ent.setHomeCountry( slHomeAddress[6] );
ent.setBusinessCountry( slBusinessAddress[6] );
}
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
if ( *it == "Department" )
ent.setDepartment( (*itLE)->text() );
if ( *it == "Company" )
ent.setCompany( (*itLE)->text() );
if ( *it == "Office" )
ent.setOffice( (*itLE)->text() );
if ( *it == "Profession" )
ent.setProfession( (*itLE)->text() );
if ( *it == "Assistant" )
ent.setAssistant( (*itLE)->text() );
if ( *it == "Manager" )
ent.setManager( (*itLE)->text() );
if ( *it == "Spouse" )
ent.setSpouse( (*itLE)->text() );
- if ( *it == "Birthday" )
- ent.setBirthday( (*itLE)->text() );
-
- if ( *it == "Anniversary" )
- ent.setAnniversary( (*itLE)->text() );
-
if ( *it == "Nickname" )
ent.setNickname( (*itLE)->text() );
if ( *it == "Children" )
ent.setChildren( (*itLE)->text() );
}
QStringList::ConstIterator itV;
for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) )
ent.setBusinessPhone( *itV );
/*
if ( *it == tr("Business 2 Phone" )
ent.setBusiness2Phone( *itV );
*/
if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) )
ent.setBusinessFax( *itV );
if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) )
ent.setBusinessMobile( *itV );
/*
if ( *it == "Company Phone" )
ent.setCompanyPhone( *itV );
*/
//if ( *it == "Default Email" )
//ent.setDefaultEmail( *itV );
if ( *it == "Emails" ){
QString allemail;
QString defaultmail;
parseEmailFrom( *itV, defaultmail, allemail );
// ent.clearEmails();
ent.setDefaultEmail( defaultmail );
ent.setEmails( allemail );
}
if ( *it == "Home Phone" )
ent.setHomePhone( *itV );
/*
if ( *it == "Home 2 Phone" )
ent.setHome2Phone( *itV );
*/
if ( *it == "Home Fax" )
ent.setHomeFax( *itV );
if ( *it == "Home Mobile" )
@@ -1761,48 +1824,78 @@ void parseEmailFrom( const QString &txt, QString &strDefaultEmail,
void parseEmailTo( const QString &strDefaultEmail,
const QString &strOtherEmail, QString &strBack )
{
// create a comma dilimeted set of emails...
// use the power of short circuiting...
bool foundDefault = false;
QString strTmp;
int start = 0;
int where;
// start at the beginng.
strBack = strDefaultEmail;
where = 0;
while ( where > -1 ) {
start = where;
where = strOtherEmail.find( ' ', where + 1 );
if ( where > 0 ) {
strTmp = strOtherEmail.mid( start, where - start ).stripWhiteSpace();
} else
strTmp = strOtherEmail.right( strOtherEmail.length() - start ).stripWhiteSpace();
if ( foundDefault || strTmp != strDefaultEmail ) {
strBack.append( ", " );
strBack.append( strTmp );
} else
foundDefault = true;
}
}
static inline bool containsAlphaNum( const QString &str )
{
int i,
count = str.length();
for ( i = 0; i < count; i++ )
if ( !str[i].isSpace() )
return TRUE;
return FALSE;
}
static inline bool constainsWhiteSpace( const QString &str )
{
int i,
count = str.length();
for (i = 0; i < count; i++ )
if ( str[i].isSpace() )
return TRUE;
return FALSE;
}
+void ContactEditor::setPersonalView( bool personal )
+{
+ m_personalView = personal;
+ if ( personal ){
+ cmbCat->hide();
+ labCat->hide();
+ } else{
+ cmbCat->show();
+ labCat->show();
+
+ }
+}
+
+void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day)
+{
+ QDate date;
+ date.setYMD( year, month, day );
+ QString dateString = TimeString::numberDateString( date );
+ anniversaryButton->setText( dateString );
+ ent.setAnniversary ( dateString );
+}
+
+void ContactEditor::slotBirthdayDateChanged( int year, int month, int day)
+{
+ QDate date;
+ date.setYMD( year, month, day );
+ QString dateString = TimeString::numberDateString( date );
+ birthdayButton->setText( dateString );
+ ent.setBirthday ( dateString );
+}
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h
index 8ed8553..40ce864 100644
--- a/core/pim/addressbook/contacteditor.h
+++ b/core/pim/addressbook/contacteditor.h
@@ -1,162 +1,172 @@
/*
* Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
*
* This file is an add-on for the OPIE 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 pacakaging
* 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.
*
*
* This is a rewrite of the abeditor.h file, modified to provide a more
* intuitive interface to TrollTech's original Address Book editor. This
* is made to operate exactly in interface with the exception of name.
*
*/
#ifndef CONTACTEDITOR_H
#define CONTACTEDITOR_H
#include <opie/ocontact.h>
+#include <qpe/datebookmonth.h>
+
#include <qdialog.h>
#include <qlist.h>
#include <qmap.h>
#include <qstringlist.h>
const int NAME_LF = 0;
const int NAME_LFM = 1;
const int NAME_FL = 2;
const int NAME_FMLS = 3;
const int NAME_F = 4;
const int NAME_M = 5;
const int NAME_L = 6;
const int NAME_S = 7;
class QScrollView;
class QTabWidget;
class QMultiLineEdit;
class QLineEdit;
class QComboBox;
class QPushButton;
class CategorySelect;
class QLabel;
class ContactEditor : public QDialog {
Q_OBJECT
public:
ContactEditor( const OContact &entry,
const QValueList<int> *newOrderedValues,
QStringList *slNewOrdered,
QWidget *parent = 0,
const char *name = 0,
WFlags fl = 0 );
~ContactEditor();
void loadFields();
void setNameFocus();
+ void setPersonalView( bool personal = true );
OContact entry() const { return ent; }
public slots:
void slotNote();
void slotName();
void setEntry(const OContact &entry);
protected slots:
void accept();
private:
void init();
void initMap();
void saveEntry();
bool isEmpty();
void cleanupFields();
QString parseName( QString fullName, int type );
-
private slots:
void slotChooser1Change( const QString &textChanged );
void slotChooser2Change( const QString &textChanged );
void slotChooser3Change( const QString &textChanged );
void slotChooser4Change( const QString &textChanged );
void slotCmbChooser1Change( int index );
void slotCmbChooser2Change( int index );
void slotCmbChooser3Change( int index );
void slotCmbChooser4Change( int index );
void slotAddressTypeChange( int index );
void slotAddressChange( const QString &textChanged );
void slotAddress2Change( const QString &textChanged );
void slotPOBoxChange( const QString &textChanged );
void slotCityChange( const QString &textChanged );
void slotStateChange( const QString &textChanged );
void slotZipChange( const QString &textChanged );
void slotCountryChange( const QString &textChanged );
void slotFullNameChange( const QString &textChanged );
+ void slotAnniversaryDateChanged( int year, int month, int day);
+ void slotBirthdayDateChanged( int year, int month, int day);
private:
bool useFullName, hasGender, hasTitle, hasCompany, hasNotes, hasStreet, hasStreet2, hasPOBox, hasCity, hasState, hasZip, hasCountry;
OContact ent;
QDialog *dlgNote;
QDialog *dlgName;
QList<QLineEdit> listValue;
QList<QLabel> listName;
const QValueList<int> *orderedValues;
QStringList slOrdered;
QStringList slDynamicEntries;
+ bool m_personalView;
+
QStringList slHomeAddress;
QStringList slBusinessAddress;
QStringList slChooserNames;
QStringList slChooserValues;
QMultiLineEdit *txtNote;
QLabel *lblNote;
//QLineEdit *txtTitle;
QLineEdit *txtFirstName;
QLineEdit *txtMiddleName;
QLineEdit *txtLastName;
QLineEdit *txtSuffix;
QTabWidget *tabMain;
QScrollView *svGeneral;
QPushButton *btnFullName;
QPushButton *btnNote;
QLineEdit *txtFullName;
QLineEdit *txtJobTitle;
QLineEdit *txtOrganization;
QLineEdit *txtChooserField1;
QLineEdit *txtChooserField2;
QLineEdit *txtChooserField3;
QLineEdit *txtChooserField4;
QComboBox *cmbChooserField1;
QComboBox *cmbChooserField2;
QComboBox *cmbChooserField3;
QComboBox *cmbChooserField4;
QComboBox *cmbFileAs;
CategorySelect *cmbCat;
+ QLabel *labCat;
QScrollView *svAddress;
QLineEdit *txtAddress;
//QLineEdit *txtAddress2;
//QLineEdit *txtPOBox;
QLineEdit *txtCity;
QLineEdit *txtState;
QLineEdit *txtZip;
QComboBox *cmbAddress;
QComboBox *cmbCountry;
QScrollView *svDetails;
QComboBox *cmbGender;
-
-};
+ DateBookMonth* birthdayPicker;
+ QToolButton* birthdayButton;
+ DateBookMonth* anniversaryPicker;
+ QToolButton* anniversaryButton;
+ };
#endif