summaryrefslogtreecommitdiff
path: root/core/pim
authoreilers <eilers>2002-11-30 18:13:34 (UTC)
committer eilers <eilers>2002-11-30 18:13:34 (UTC)
commit6afb59b5950c8fdd24dc93ac4ee370a3c8437f9a (patch) (side-by-side diff)
treea873946a9b52edaab8f374918c7e0b468c2353b3 /core/pim
parentfe672fd88ead7a987d66f03439eb860e67aeaca6 (diff)
downloadopie-6afb59b5950c8fdd24dc93ac4ee370a3c8437f9a.zip
opie-6afb59b5950c8fdd24dc93ac4ee370a3c8437f9a.tar.gz
opie-6afb59b5950c8fdd24dc93ac4ee370a3c8437f9a.tar.bz2
Fixed a lot of usability stuff .. Some minor bugs were fixed, too ..
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO35
-rw-r--r--core/pim/addressbook/ablabel.cpp7
-rw-r--r--core/pim/addressbook/abview.cpp55
-rw-r--r--core/pim/addressbook/abview.h2
-rw-r--r--core/pim/addressbook/addressbook.cpp2
-rw-r--r--core/pim/addressbook/configdlg_base.ui10
-rw-r--r--core/pim/addressbook/ocontactfields.cpp4
7 files changed, 68 insertions, 47 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 1cbee26..93ece13 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,106 +1,109 @@
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 incase it's installed and there's no mobile
- 3rd column for 2. Contact
- Implementing additional Views (Phonebook, ...)
- Birthday & Anniversary Reminder
- Plugin for Today for Birthdays and Anniversaries
Known Bugs:
-----------
- OK-Key does not switch from Detailview (ablable) to Listview
-- After finising search and after Edit: Clear Picker
-- After Edit: Table position back to edited entry.
-- Combo in Contacteditor: Field "Default-Email" is not correctly implemented and
- should be removed by a picker/combo.
- Name order selected in "contacteditor" not used in list view.
+
- Language not English (tested with german opie-translation):
1. Configure nicht übersetzt (alles leer).
2. Contacteditor nur teilweise übersetzt.
- 3. Kategorie-Picker geht nicht (nur bei Openzaurus).
+ 3. Kategorie-Picker geht nicht.
Bugs but not in addressbook:
-----------------------------
- VCARD: Import of Anniversary does not work correctly (currently disabled)
- VCARD: If umlaut (äöüß) in address, the parser gets confused..
-- Exporting and reimporting of Jobtitle fails.
+
+- Exporting and reimporting of Jobtitle fails (Could not reproduce this ! (se))
Urgent:
--------
-- Contact-Editor is temporarely reanabled. Wait for replacement.
+- Implement Button Pics
+- Fix start of opie-mail
+
+ContactEditor:
+- Contact-Editor is temporarely reenabled. Wait for replacement.
- Redesign of Contacteditor
- Store last settings of combo-boxes
- Category is on the wrong position after changing to personal and back to normal
( Temporarily workaround: Category is never deactivated.. :S )
-- Optimize Table Update...
-- Change MyDialog to Config
-- Implement Button Pics
-- Fix start of opie-mail
+- Personal and Business Web-page is not editable
Important:
----------
+- Implement a picker/combo for the default email.
- After search (Started with Return): KeyFocus should be on Tabelle
-- Searchwidget closed: Selected user is jumping
-- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
- zu lange..
-
-- Store position and state of toolbar
- IRDA Receive: Contact is added, but start of editor with new entry expected..
- "What's this" should be added (Deleyed after Feature Freeze)
Less important:
---------------
- Reload if contacts were changed externally
- Overview window cleanup needed..
- The picker (alphabetical sort widget) should be
placed verticaly or horizontally (configurable)
- Find a smart solution for activating/deactivating the "send email" event
Should be Fixed (not absolute sure, need further validation):
-------------------------------------------------------------
+- Searchwidget closed: Selected user is jumping
+- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
+ zu lange..
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
- The names of the countries are sorted by there english names, only..
Even if they are translated.. :S
- Cursor keys should work in detail-view (ablabel)
-> Ablabel should be removed and Abtable should be increased with
different views (as started by darwin zins)..
- Use advanced database functions in abtable to decrease
memory footprint and to make everything more easy !
(abtable should store Iterator for selected Category)
- Abtable: Configure Contact column (internally already available,
need configuration)
- Select of primary contact (see #274 on mantis)
- Category-select does not work completely: "Unfiled" is always in listview ..
- Return from Contacteditor: Category resettet to all
- Personal Details not working
- If category changed, the letterpicker should be resetted
- There should be some icons for List and Cardview
- If in Cardview and a category change removes all entries:
There are already entries in Cardview after up/down
- Personal Details: Anniversary zeigt Fantasie-Werte
- Unfiled shown just in Category "All" and "Unfiled".
+- After finising search and after Edit: Clear Picker
+- After Edit: Table position back to edited entry.
+- Optimize Table Update...
+- Change MyDialog to Config
+- Store position and state of toolbar
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 5b40dc1..937aaae 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -30,49 +30,54 @@ AbLabel::AbLabel( QWidget *parent, const char *name ):
m_empty( false )
{
}
AbLabel::~AbLabel()
{
}
void AbLabel::setContacts( const OContactAccess::List& viewList )
{
m_viewList = viewList;
if (m_viewList.count() != 0){
m_empty = false;
m_itCurContact = m_viewList.begin();
sync();
}else{
// m_itCurContact.clear();
m_empty = true;
setText( "" );
}
}
int AbLabel::currentEntry_UID()
{
- return ( (*m_itCurContact).uid() );
+ OContact contact = *m_itCurContact;
+
+ if ( contact.isEmpty() )
+ return 0;
+ else
+ return ( contact.uid() );
}
OContact AbLabel::currentEntry()
{
return ( *m_itCurContact );
}
bool AbLabel::selectContact( int UID )
{
for ( m_itCurContact = m_viewList.begin(); m_itCurContact != m_viewList.end(); ++m_itCurContact){
if ( (*m_itCurContact).uid() == UID )
break;
}
sync();
return true;
}
void AbLabel::sync()
{
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 0f4bd5f..7226e82 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -103,80 +103,86 @@ void AbView::setView( Views view )
void AbView::addEntry( const OContact &newContact )
{
qWarning("abview:AddContact");
m_contactdb->add ( newContact );
load();
}
void AbView::removeEntry( const int UID )
{
qWarning("abview:RemoveContact");
m_contactdb->remove( UID );
load();
}
void AbView::replaceEntry( const OContact &contact )
{
qWarning("abview:ReplaceContact");
m_contactdb->replace( contact );
load();
}
OContact AbView::currentEntry()
{
+ OContact currentContact;
+
switch ( (int) m_curr_View ) {
case TableView:
- return ( m_abTable -> currentEntry() );
+ currentContact = m_abTable -> currentEntry();
break;
case CardView:
- return ( m_ablabel -> currentEntry() );
+ currentContact = m_ablabel -> currentEntry();
break;
}
- return OContact();
+ m_curr_Contact = currentContact.uid();
+ return currentContact;
}
bool AbView::save()
{
qWarning("abView:Save data");
return m_contactdb->save();
}
void AbView::load()
{
qWarning("abView:Load data");
+
+ // Letter Search is stopped at this place
+ emit signalClearLetterPicker();
if ( m_inPersonal )
m_list = m_contactdb->allRecords();
- else
+ else{
m_list = m_contactdb->sorted( true, 0, 0, 0 );
-
- clearForCategory();
+ clearForCategory();
+ }
qWarning ("Number of contacts: %d", m_list.count());
- updateView();
+ updateView( true );
}
void AbView::reload()
{
qWarning( "void AbView::reload()" );
m_contactdb->reload();
load();
}
void AbView::clear()
{
// :SX
}
void AbView::setShowByCategory( const QString& cat )
{
qWarning("AbView::setShowCategory( const QString& cat )");
int intCat = 0;
// All (cat == NULL) will be stored as -1
if ( cat.isNull() )
@@ -203,49 +209,49 @@ void AbView::setShowToView( Views view )
qWarning ("Change the View (Category is: %d)", m_curr_category);
if ( m_curr_View != view ){
m_prev_View = m_curr_View;
m_curr_View = view;
updateView();
}
}
void AbView::setShowByLetter( char c )
{
qWarning("void AbView::setShowByLetter( %c )", c );
OContact query;
if ( c == 0 ){
load();
return;
}else{
query.setLastName( QString("%1*").arg(c) );
m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards );
clearForCategory();
m_curr_Contact = 0;
}
- updateView();
+ updateView( true );
}
void AbView::setListOrder( const QValueList<int>& ordered )
{
m_orderedFields = ordered;
updateView();
}
QString AbView::showCategory() const
{
return mCat.label( "Contacts", m_curr_category );
}
void AbView::showPersonal( bool personal )
{
qWarning ("void AbView::showPersonal( %d )", personal);
if ( personal ){
if ( m_inPersonal )
return;
// Now switch to vCard Backend and load data.
@@ -304,49 +310,49 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
category = mCat.id("Contacts", cat );
}
qWarning ("Find in Category %d", category);
QRegExp r( str );
r.setCaseSensitive( caseSensitive );
r.setWildcard( !useRegExp );
// Get all matching entries out of the database
m_list = m_contactdb->matchRegexp( r );
qWarning( "found: %d", m_list.count() );
if ( m_list.count() == 0 ){
emit signalNotFound();
return;
}
// Now remove all contacts with wrong category (if any selected)
// This algorithm is a litte bit ineffective, but
// we will not have a lot of matching entries..
clearForCategory();
// Now show all found entries
- updateView();
+ updateView( true );
}
void AbView::offSearch()
{
m_inSearch = false;
load();
}
void AbView::slotSwitch(){
qWarning("AbView::slotSwitch()");
m_prev_View = m_curr_View;
switch ( (int) m_curr_View ){
case TableView:
qWarning("Switching to CardView");
m_curr_View = CardView;
break;
case CardView:
qWarning("Switching to TableView");
m_curr_View = TableView;
break;
}
updateView();
@@ -386,73 +392,76 @@ bool AbView::contactCompare( const OContact &cnt, int category )
if ( cats.count() == 0 && category == 0 )
// Contacts with no category will just shown on "All" and "Unfiled"
returnMe = true;
else {
int i;
for ( i = 0; i < int(cats.count()); i++ ) {
qWarning("Comparing %d with %d",cats[i],category );
if ( cats[i] == category ) {
returnMe = true;
break;
}
}
}
qWarning ("Return: %d", returnMe);
return returnMe;
}
// In Some rare cases we have to update all lists..
void AbView::updateListinViews()
{
m_abTable -> setContacts( m_list );
m_ablabel -> setContacts( m_list );
}
-void AbView::updateView()
+void AbView::updateView( bool newdata )
{
qWarning("AbView::updateView()");
if ( m_viewStack -> visibleWidget() ){
m_viewStack -> visibleWidget() -> clearFocus();
}
// If we switching the view, we have to store some information
- if ( m_list.count() ){
- switch ( (int) m_prev_View ) {
- case TableView:
- m_curr_Contact = m_abTable -> currentEntry_UID();
- break;
- case CardView:
- m_curr_Contact = m_ablabel -> currentEntry_UID();
- break;
- }
- }else
- m_curr_Contact = 0;
+ if ( !newdata ){
+ if ( m_list.count() ){
+ switch ( (int) m_prev_View ) {
+ case TableView:
+ m_curr_Contact = m_abTable -> currentEntry_UID();
+ break;
+ case CardView:
+ m_curr_Contact = m_ablabel -> currentEntry_UID();
+ break;
+ }
+ }else
+ m_curr_Contact = 0;
+ }
// Feed all views with new lists
- updateListinViews();
+ if ( newdata )
+ updateListinViews();
- // Inform the world that the view is changed
+ // Tell the world that the view is changed
if ( m_curr_View != m_prev_View )
emit signalViewSwitched ( (int) m_curr_View );
m_prev_View = m_curr_View;
// Switch to new View
switch ( (int) m_curr_View ) {
case TableView:
m_abTable -> setChoiceSelection( m_orderedFields );
if ( m_curr_Contact != 0 )
m_abTable -> selectContact ( m_curr_Contact );
m_abTable -> setFocus();
break;
case CardView:
if ( m_curr_Contact != 0 )
m_ablabel -> selectContact( m_curr_Contact );
m_ablabel -> setFocus();
break;
}
// Raise the current View
m_viewStack -> raiseWidget( m_curr_View );
}
diff --git a/core/pim/addressbook/abview.h b/core/pim/addressbook/abview.h
index 2c10cfa..8570fe7 100644
--- a/core/pim/addressbook/abview.h
+++ b/core/pim/addressbook/abview.h
@@ -37,49 +37,49 @@ public:
// Add Entry and put to current
void addEntry( const OContact &newContact );
void removeEntry( const int UID );
void replaceEntry( const OContact &contact );
OContact currentEntry();
void inSearch() { m_inSearch = true; }
void offSearch();
QString showCategory() const;
QStringList categories();
signals:
void signalNotFound();
void signalClearLetterPicker();
void signalViewSwitched ( int );
public slots:
void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
bool backwards, QString category = QString::null );
void slotSwitch();
private:
void updateListinViews();
- void updateView();
+ void updateView( bool newdata = false );
void clearForCategory();
bool contactCompare( const OContact &cnt, int category );
void parseName( const QString& name, QString *first, QString *middle,
QString * last );
Categories mCat;
bool m_inSearch;
bool m_inPersonal;
int m_curr_category;
Views m_curr_View;
Views m_prev_View;
int m_curr_Contact;
OContactAccess* m_contactdb;
OContactAccess* m_storedDB;
OContactAccess::List m_list;
QWidgetStack* m_viewStack;
AbTable* m_abTable;
AbLabel* m_ablabel;
QValueList<int> m_orderedFields;
};
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 5d588da..055124c 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -632,49 +632,49 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
// ###### 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::editEntry( EntryMode entryMode )
{
OContact entry;
if ( !abEditor ) {
abEditor = new ContactEditor( entry, this, "editor" );
}
if ( entryMode == EditEntry )
abEditor->setEntry( m_abView -> currentEntry() );
else if ( entryMode == NewEntry )
abEditor->setEntry( entry );
- // other things may chane the caption.
+ // other things may change the caption.
abEditor->setCaption( tr("Edit Address") );
#if defined(Q_WS_QWS) || defined(_WS_QWS_)
abEditor->showMaximized();
#endif
// fix the foxus...
abEditor->setNameFocus();
if ( abEditor->exec() ) {
setFocus();
if ( entryMode == NewEntry ) {
OContact insertEntry = abEditor->entry();
insertEntry.assignUid();
m_abView -> addEntry( insertEntry );
} else {
OContact replEntry = abEditor->entry();
if ( !replEntry.isValidUid() )
replEntry.assignUid();
m_abView -> replaceEntry( replEntry );
}
}
// populateCategories();
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index 408bfa6..8ae2578 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -1,50 +1,54 @@
<!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>276</width>
+ <width>282</width>
<height>327</height>
</rect>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
+ <name>caption</name>
+ <string>Configuration</string>
+ </property>
+ <property stdset="1">
<name>sizeGripEnabled</name>
<bool>true</bool>
</property>
<property>
<name>layoutMargin</name>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>1</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 stdset="1">
<name>sizePolicy</name>
<sizepolicy>
@@ -332,53 +336,53 @@ is provided free !</string>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>Order</string>
</attribute>
<vbox>
<property stdset="1">
<name>margin</name>
- <number>-1</number>
+ <number>2</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>-1</number>
+ <number>2</number>
</property>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>GroupBox9</cstring>
</property>
<property stdset="1">
<name>title</name>
<string>Select Contact Order:</string>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="2" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
diff --git a/core/pim/addressbook/ocontactfields.cpp b/core/pim/addressbook/ocontactfields.cpp
index 7823a9c..df57efa 100644
--- a/core/pim/addressbook/ocontactfields.cpp
+++ b/core/pim/addressbook/ocontactfields.cpp
@@ -21,49 +21,49 @@ QStringList OContactFields::untrdetailsfields( bool sorted )
list.append( "Manager" );
list.append( "Spouse" );
list.append( "Gender" );
list.append( "Birthday" );
list.append( "Anniversary" );
list.append( "Nickname" );
list.append( "Children" );
if (sorted) list.sort();
return list;
}
/*!
\internal
Returns a translated list of phone field names for a contact.
*/
QStringList OContactFields::trphonefields( bool sorted )
{
QStringList list;
list.append( QObject::tr( "Business Phone" ) );
list.append( QObject::tr( "Business Fax" ) );
list.append( QObject::tr( "Business Mobile" ) );
- list.append( QObject::tr( "Default Email" ) );
+ // list.append( QObject::tr( "Default Email" ) );
list.append( QObject::tr( "Emails" ) );
list.append( QObject::tr( "Home Phone" ) );
list.append( QObject::tr( "Home Fax" ) );
list.append( QObject::tr( "Home Mobile" ) );
if (sorted) list.sort();
return list;
}
/*!
\internal
Returns a translated list of details field names for a contact.
*/
QStringList OContactFields::trdetailsfields( bool sorted )
{
QStringList list;
list.append( QObject::tr( "Office" ) );
list.append( QObject::tr( "Profession" ) );
list.append( QObject::tr( "Assistant" ) );
list.append( QObject::tr( "Manager" ) );
@@ -117,49 +117,49 @@ QStringList OContactFields::trfields( bool sorted )
list.append( QObject::tr( "Home Web Page" ) );
list += trdetailsfields( sorted );
list.append( QObject::tr( "Notes" ) );
list.append( QObject::tr( "Groups" ) );
if (sorted) list.sort();
return list;
}
/*!
\internal
Returns a list of phone field names for a contact.
*/
QStringList OContactFields::untrphonefields( bool sorted )
{
QStringList list;
list.append( "Business Phone" );
list.append( "Business Fax" );
list.append( "Business Mobile" );
- list.append( "Default Email" );
+ // list.append( "Default Email" );
list.append( "Emails" );
list.append( "Home Phone" );
list.append( "Home Fax" );
list.append( "Home Mobile" );
if (sorted) list.sort();
return list;
}
/*!
\internal
Returns an untranslated list of field names for a contact.
*/
QStringList OContactFields::untrfields( bool sorted )
{
QStringList list;
list.append( "Name Title" );
list.append( "First Name" );
list.append( "Middle Name" );
list.append( "Last Name" );
list.append( "Suffix" );