summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO8
-rw-r--r--core/pim/addressbook/addressbook.cpp30
-rw-r--r--core/pim/addressbook/addressbook.h5
-rw-r--r--core/pim/addressbook/contacteditor.cpp2
-rw-r--r--core/pim/addressbook/version.h2
5 files changed, 38 insertions, 9 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index da9b9c2..a3cffa7 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,48 +1,43 @@
Stuff todo until OPIE 1.0 :
===========================
Feature requests:
-----------------
- Dial by mobile phone by tapping the number..
(Maybe using gsmtool. And we may
add a library class for this)
- dial with dtmfdial in case it's installed and there's no mobile
- 3rd column for 2. Contact
- Implementing additional Views (Phonebook, ...)
- Birthday & Anniversary Reminder
- Beaming of multiple contacts (current list/ by search or by category)
- Configure the letter-picker: lastname/fullname search
-- User center of the joypad to switch back from card to listview !
+- Optionally put scrollbars left.
Known Bugs:
-----------
-Bugs but not in addressbook:
------------------------------
-- VCARD: If umlaut (äöüß) in address, the parser gets confused..
-
-
Urgent:
--------
- Category is on the wrong position after changing to personal and back to normal
( Temporarily workaround: Category is never deactivated.. :S )
Important:
----------
- "What's this" should be added (Deleyed after Feature Freeze)
Less important:
---------------
- Reload if contacts were changed externally
- The picker (alphabetical sort widget) should be
placed verticaly or horizontally (configurable)
- Find a smart solution for activating/deactivating the "send email" event
- If new contact is added (contacteditor closed): focus (table, card) to
this entry !
- After search (Started with Return): KeyFocus should be on Tabelle
ContactEditor:
- Redesign of Contacteditor
@@ -93,24 +88,25 @@ Fixed/Ready:
- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
zu lange..
- VCARD: Import of Anniversary does not work correctly (currently disabled)
- Name order selected in "contacteditor" not used in list view.
- OK-Key does not switch from Detailview (ablable) to Listview
- Receiving of beams should open a dialog
- Fix start of opie-mail
- Implement Button Pics
- Add a dialog to accept and optionally edit received contacts by IRDA.
- Language not English (tested with german opie-translation):
1. Configure nicht übersetzt (alles leer).
2. Contacteditor nur teilweise übersetzt.
3. Kategorie-Picker geht nicht.
- Plugin for Today for Birthdays and Anniversaries
- Implement a picker/combo for the default email.
- Overview window cleanup needed..
- Store last settings of combo-boxes
- Personal and Business Web-page is not editable
- Default Email-button: A lot of problems:
If on second tab: The combo chooser is on the top left of the screen ! :(
- Default Email-Button: Sometimes not hiding the textfields completely
- Fix handling of 3 Firstnames
- Cursor-UP/Down: Should additionally scroll cardview if it is too large
(behaviour should be selectable by configuration)
+- User center of the joypad to switch back from card to listview !
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index a5bf19b..89a3312 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -188,48 +188,54 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
QString::null, 0, this, 0 );
//a->setEnabled( FALSE ); we got support for it now :) zecke
actionMail = a;
connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
a->addTo( edit );
a->addTo( listTools );
if ( Ir::supported() ) {
a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
0, this, 0 );
actionBeam = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) );
a->addTo( edit );
a->addTo( listTools );
}
edit->insertSeparator();
a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null,
0, this, 0);
actionPersonal = a;
connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
a->addTo( edit );
+ a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), QString::null,
+ 0, this, 0);
+ actionPersonal = a;
+ connect( a, SIGNAL( activated() ), this, SLOT( exportvCard() ) );
+ a->addTo( edit );
+
edit->insertSeparator();
a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ),
QString::null, 0, this, 0 , TRUE );
actionPersonal = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
a->addTo( edit );
#ifdef __DEBUG_RELEASE
// Remove this function for public Release ! This is only
// for debug purposes ..
a = new QAction( tr( "Save all Data"), QString::null, 0, 0 );
connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
a->addTo( edit );
#endif
a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
a->addTo( edit );
// Create Views
listContainer = new QWidget( this );
QVBoxLayout *vb = new QVBoxLayout( listContainer );
@@ -310,48 +316,72 @@ void AddressbookWindow::slotSetFont( int size )
case 1:
m_abView->setFont( *defaultFont );
currentFont = new QFont (m_abView->font());
// // abList->resizeRows(currentFont->pixelSize() + 7);
// abList->resizeRows();
break;
case 2:
m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) );
currentFont = new QFont (m_abView->font());
// //abList->resizeRows(currentFont->pixelSize() + 7);
// abList->resizeRows();
break;
}
}
void AddressbookWindow::importvCard() {
QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
if(!str.isEmpty() ){
setDocument((const QString&) str );
}
}
+void AddressbookWindow::exportvCard()
+{
+ qWarning(" void AddressbookWindow::exportvCard()");
+ QString filename = OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this );
+ if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){
+ qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 );
+ OContact curCont = m_abView->currentEntry();
+ if ( !curCont.isEmpty() ){
+ OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
+ filename );
+ OContactAccess* access = new OContactAccess ( "addressbook_exp", QString::null , vcard_backend, true );
+ if ( access ){
+ access->add( curCont );
+ access->save();
+ }
+ delete access;
+ }else
+ QMessageBox::critical( 0, "Export VCard",
+ QString( tr( "You have to select a contact !") ) );
+
+ }else
+ QMessageBox::critical( 0, "Export VCard",
+ QString( tr( "You have to set a filename !") ) );
+}
void AddressbookWindow::setDocument( const QString &filename )
{
qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() );
if ( filename.find(".vcf") != int(filename.length()) - 4 ){
switch( QMessageBox::information( this, tr ( "Right file type ?" ),
tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ),
tr( "&Yes" ), tr( "&No" ), QString::null,
0, // Enter == button 0
2 ) ) { // Escape == button 2
case 0:
qWarning("YES clicked");
break;
case 1:
qWarning("NO clicked");
return;
break;
}
}
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index 69fe2f8..f7a560a 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h
@@ -1,96 +1,97 @@
/**********************************************************************
** 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.
**
**********************************************************************/
#ifndef Addressbook_H
#define Addressbook_H
// Remove this for OPIE releae 1.0 !
-#define __DEBUG_RELEASE
+// #define __DEBUG_RELEASE
#include <qmainwindow.h>
#include <qvaluelist.h>
#include <qstringlist.h>
#include <qlineedit.h>
#include "ofloatbar.h"
#include "abview.h"
#include "abconfig.h"
class ContactEditor;
class AbLabel;
class AbTable;
class QPEToolBar;
class QPopupMenu;
class QToolButton;
class QDialog;
class Ir;
class QAction;
class LetterPicker;
class AddressbookWindow: public QMainWindow
{
Q_OBJECT
public:
enum EntryMode { NewEntry=0, EditEntry };
AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~AddressbookWindow();
protected:
void resizeEvent( QResizeEvent * e );
void editPersonal();
void editEntry( EntryMode );
void closeEvent( QCloseEvent *e );
bool save();
public slots:
void flush();
void reload();
void appMessage(const QCString &, const QByteArray &);
void setDocument( const QString & );
#ifdef __DEBUG_RELEASE
- void slotSave();
+ // void slotSave();
#endif
private slots:
void importvCard();
+ void exportvCard();
void slotListNew();
/* void slotListView(); */
void slotListDelete();
void slotViewBack();
void slotViewEdit();
void slotPersonalView();
void listIsEmpty( bool );
/* void slotSettings(); */
void writeMail();
void slotBeam();
void beamDone( Ir * );
void slotSetCategory( int );
void slotSetLetter( char );
void slotUpdateToolbar();
void slotSetFont(int);
void slotFindOpen();
void slotFindClose();
void slotFind();
void slotNotFound();
void slotWrapAround();
void slotViewSwitched( int );
void slotListView();
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index df97b85..f33ee0a 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1235,49 +1235,51 @@ void ContactEditor::cleanupFields() {
txtLastName->setText("");
txtSuffix->setText("");
txtNote->setText("");
txtFullName->setText("");
txtJobTitle->setText("");
txtOrganization->setText("");
txtChooserField1->setText("");
txtChooserField2->setText("");
txtChooserField3->setText("");
txtAddress->setText("");
txtCity->setText("");
txtState->setText("");
txtZip->setText("");
QLineEdit *txtTmp = cmbCountry->lineEdit();
txtTmp->setText("");
txtTmp = cmbFileAs->lineEdit();
txtTmp->setText("");
}
void ContactEditor::setEntry( const OContact &entry ) {
initializing = true;
+ // Cleanup and activate the general Page ..
cleanupFields();
+ tabMain->setCurrentPage( 0 );
ent = entry;
emails = QStringList(ent.emailList());
defaultEmail = ent.defaultEmail();
if (defaultEmail.isEmpty()) defaultEmail = emails[0];
qDebug("default email=%s",defaultEmail.latin1());
txtFirstName->setText( ent.firstName() );
txtMiddleName->setText( ent.middleName() );
txtLastName->setText( ent.lastName() );
txtSuffix->setText( ent.suffix() );
// QString *tmpString = new QString;
// *tmpString = ent.firstName() + " " + ent.middleName() +
// + " " + ent.lastName() + " " + ent.suffix();
// txtFullName->setText( tmpString->simplifyWhiteSpace() );
if ( !ent.isEmpty() ){
// Lastnames with multiple words need to be protected by a comma !
if ( ent.lastName().contains( ' ', TRUE ) )
txtFullName->setText( ent.lastName() + ", " + ent.firstName() + " " + ent.middleName() );
else
txtFullName->setText( ent.firstName() + " " + ent.middleName() + " " + ent.lastName() );
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h
index d590a86..c0465b5 100644
--- a/core/pim/addressbook/version.h
+++ b/core/pim/addressbook/version.h
@@ -1,10 +1,10 @@
#ifndef _VERSION_H_
#define _VERSION_H_
#define MAINVERSION "0"
#define SUBVERSION "9"
-#define PATCHVERSION "3"
+#define PATCHVERSION "4"
#define APPNAME "OPIE_ADDRESSBOOK"
#endif