summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO13
-rw-r--r--core/pim/addressbook/abconfig.cpp19
-rw-r--r--core/pim/addressbook/abconfig.h11
-rw-r--r--core/pim/addressbook/abview.cpp24
-rw-r--r--core/pim/addressbook/abview.h3
-rw-r--r--core/pim/addressbook/addressbook.cpp3
-rw-r--r--core/pim/addressbook/configdlg_base.ui2
-rw-r--r--core/pim/addressbook/contacteditor.cpp20
-rw-r--r--core/pim/addressbook/contacteditor.h1
-rw-r--r--core/pim/addressbook/version.h2
10 files changed, 79 insertions, 19 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index a3cffa7..383f8c5 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -12,5 +12,4 @@ Feature requests:
12- Birthday & Anniversary Reminder 12- Birthday & Anniversary Reminder
13- Beaming of multiple contacts (current list/ by search or by category) 13- Beaming of multiple contacts (current list/ by search or by category)
14- Configure the letter-picker: lastname/fullname search
15- Optionally put scrollbars left. 14- Optionally put scrollbars left.
16 15
@@ -27,5 +26,8 @@ Important:
27---------- 26----------
28 27
29- "What's this" should be added (Deleyed after Feature Freeze) 28- Configure the letter-picker: lastname/fullname search
29 -> Currently just behind the scenes ..
30- Implement a correct handling of Organizations. They are currently
31 handled as normal persons.. :(
30 32
31Less important: 33Less important:
@@ -34,8 +36,6 @@ Less important:
34- The picker (alphabetical sort widget) should be 36- The picker (alphabetical sort widget) should be
35 placed verticaly or horizontally (configurable) 37 placed verticaly or horizontally (configurable)
36- Find a smart solution for activating/deactivating the "send email" event
37- If new contact is added (contacteditor closed): focus (table, card) to
38 this entry !
39- After search (Started with Return): KeyFocus should be on Tabelle 38- After search (Started with Return): KeyFocus should be on Tabelle
39- Find a smart solution for activating/deactivating the "send email" event
40 40
41ContactEditor: 41ContactEditor:
@@ -111,2 +111,5 @@ Fixed/Ready:
111 (behaviour should be selectable by configuration) 111 (behaviour should be selectable by configuration)
112- User center of the joypad to switch back from card to listview ! 112- User center of the joypad to switch back from card to listview !
113- If new contact is added (contacteditor closed): focus (table, card) to
114 this entry !
115- Typo: Mov_e_able in Config-Dlg
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp
index 0b61614..4a0875b 100644
--- a/core/pim/addressbook/abconfig.cpp
+++ b/core/pim/addressbook/abconfig.cpp
@@ -13,4 +13,5 @@ AbConfig::AbConfig( ):
13 m_barPos( QMainWindow::Top ), 13 m_barPos( QMainWindow::Top ),
14 m_fixedBars( true ), 14 m_fixedBars( true ),
15 m_lpSearchMode( LastName ),
15 m_changed( false ) 16 m_changed( false )
16{ 17{
@@ -61,4 +62,9 @@ bool AbConfig::fixedBars() const
61} 62}
62 63
64AbConfig::LPSearchMode AbConfig::letterPickerSearch() const
65{
66 return ( AbConfig::LPSearchMode ) m_lpSearchMode;
67}
68
63void AbConfig::setUseRegExp( bool v ) 69void AbConfig::setUseRegExp( bool v )
64{ 70{
@@ -110,4 +116,10 @@ void AbConfig::setFixedBars( const bool fixed )
110} 116}
111 117
118void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode )
119{
120 m_lpSearchMode = mode;
121 m_changed = true;
122}
123
112void AbConfig::load() 124void AbConfig::load()
113{ 125{
@@ -119,6 +131,7 @@ void AbConfig::load()
119 131
120 cfg.setGroup("Search"); 132 cfg.setGroup("Search");
121 m_useRegExp = cfg.readBoolEntry( "useRegExp" ); 133 m_useRegExp = cfg.readBoolEntry( "useRegExp", false );
122 m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); 134 m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false );
135 m_lpSearchMode = cfg.readNumEntry( "lpSearchMode", FullName );
123 136
124 cfg.setGroup("Mail"); 137 cfg.setGroup("Mail");
@@ -160,4 +173,5 @@ void AbConfig::save()
160 cfg.writeEntry("useRegExp", m_useRegExp); 173 cfg.writeEntry("useRegExp", m_useRegExp);
161 cfg.writeEntry("caseSensitive", m_beCaseSensitive); 174 cfg.writeEntry("caseSensitive", m_beCaseSensitive);
175 cfg.writeEntry("lpSearchMode", m_lpSearchMode );
162 176
163 cfg.setGroup("Mail"); 177 cfg.setGroup("Mail");
@@ -195,4 +209,5 @@ void AbConfig::operator= ( const AbConfig& cnf )
195 m_barPos = cnf.m_barPos; 209 m_barPos = cnf.m_barPos;
196 m_fixedBars = cnf.m_fixedBars; 210 m_fixedBars = cnf.m_fixedBars;
211 m_lpSearchMode = cnf.m_lpSearchMode;
197} 212}
198 213
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h
index ce51b4c..93764f2 100644
--- a/core/pim/addressbook/abconfig.h
+++ b/core/pim/addressbook/abconfig.h
@@ -8,4 +8,12 @@ class AbConfig
8{ 8{
9public: 9public:
10 enum LPSearchMode{
11 LastName = 0,
12 FullName,
13 LASTELEMENT
14 };
15
16
17
10 AbConfig(); 18 AbConfig();
11 ~AbConfig(); 19 ~AbConfig();
@@ -21,4 +29,5 @@ public:
21 QMainWindow::ToolBarDock getToolBarPos() const; 29 QMainWindow::ToolBarDock getToolBarPos() const;
22 bool fixedBars() const; 30 bool fixedBars() const;
31 LPSearchMode letterPickerSearch() const;
23 32
24 void setUseRegExp( bool v ); 33 void setUseRegExp( bool v );
@@ -31,4 +40,5 @@ public:
31 void setToolBarDock( const QMainWindow::ToolBarDock v ); 40 void setToolBarDock( const QMainWindow::ToolBarDock v );
32 void setFixedBars( const bool fixed ); 41 void setFixedBars( const bool fixed );
42 void setLetterPickerSearch( const LPSearchMode mode );
33 43
34 void operator= ( const AbConfig& cnf ); 44 void operator= ( const AbConfig& cnf );
@@ -51,4 +61,5 @@ protected:
51 int m_barPos; 61 int m_barPos;
52 bool m_fixedBars; 62 bool m_fixedBars;
63 int m_lpSearchMode;
53 64
54 bool m_changed; 65 bool m_changed;
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index d3ca783..664bd3f 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -23,4 +23,6 @@
23#include <opie/ocontactaccessbackend_vcard.h> 23#include <opie/ocontactaccessbackend_vcard.h>
24 24
25#include <assert.h>
26
25 27
26// Is defined in LibQPE 28// Is defined in LibQPE
@@ -161,5 +163,5 @@ void AbView::load()
161 } 163 }
162 164
163 //qWarning ("Number of contacts: %d", m_list.count()); 165 qWarning ("Number of contacts: %d", m_list.count());
164 166
165 updateView( true ); 167 updateView( true );
@@ -219,7 +221,10 @@ void AbView::setShowToView( Views view )
219} 221}
220 222
221void AbView::setShowByLetter( char c ) 223void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
222{ 224{
223 //qWarning("void AbView::setShowByLetter( %c )", c ); 225 qWarning("void AbView::setShowByLetter( %c, %d )", c, mode );
226
227 assert( mode < AbConfig::LASTELEMENT );
228
224 OContact query; 229 OContact query;
225 if ( c == 0 ){ 230 if ( c == 0 ){
@@ -233,5 +238,16 @@ void AbView::setShowByLetter( char c )
233 } 238 }
234 239
235 query.setLastName( QString("%1*").arg(c) ); 240 switch( mode ){
241 case AbConfig::LastName:
242 query.setLastName( QString("%1*").arg(c) );
243 break;
244 case AbConfig::FullName:
245 query.setFileAs( QString("%1*").arg(c) );
246 break;
247 default:
248 qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode );
249 qWarning( "I will ignore it.." );
250 return;
251 }
236 m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase ); 252 m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase );
237 clearForCategory(); 253 clearForCategory();
diff --git a/core/pim/addressbook/abview.h b/core/pim/addressbook/abview.h
index 55c63cc..49bb4be 100644
--- a/core/pim/addressbook/abview.h
+++ b/core/pim/addressbook/abview.h
@@ -12,4 +12,5 @@
12#include "abtable.h" 12#include "abtable.h"
13#include "ablabel.h" 13#include "ablabel.h"
14#include "abconfig.h"
14 15
15class AbView: public QWidget 16class AbView: public QWidget
@@ -33,5 +34,5 @@ public:
33 void setShowByCategory( const QString& cat ); 34 void setShowByCategory( const QString& cat );
34 void setShowToView( Views view ); 35 void setShowToView( Views view );
35 void setShowByLetter( char c ); 36 void setShowByLetter( char c, AbConfig::LPSearchMode mode = AbConfig::LastName );
36 void setListOrder( const QValueList<int>& ordered ); 37 void setListOrder( const QValueList<int>& ordered );
37 38
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 25c6f3a..34bf7f1 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -753,4 +753,5 @@ void AddressbookWindow::editEntry( EntryMode entryMode )
753 insertEntry.assignUid(); 753 insertEntry.assignUid();
754 m_abView -> addEntry( insertEntry ); 754 m_abView -> addEntry( insertEntry );
755 m_abView -> setCurrentUid( insertEntry.uid() );
755 } else { 756 } else {
756 OContact replEntry = abEditor->entry(); 757 OContact replEntry = abEditor->entry();
@@ -1012,5 +1013,5 @@ void AddressbookWindow::slotCardView()
1012void AddressbookWindow::slotSetLetter( char c ) { 1013void AddressbookWindow::slotSetLetter( char c ) {
1013 1014
1014 m_abView->setShowByLetter( c ); 1015 m_abView->setShowByLetter( c, m_config.letterPickerSearch() );
1015 1016
1016} 1017}
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index 1b5ac17..f892d08 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -306,5 +306,5 @@
306 <property stdset="1"> 306 <property stdset="1">
307 <name>text</name> 307 <name>text</name>
308 <string>Movable</string> 308 <string>Moveable</string>
309 </property> 309 </property>
310 <property> 310 <property>
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index f33ee0a..ce14f98 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -657,8 +657,10 @@ void ContactEditor::init() {
657 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); 657 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
658 658
659 connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); 659 connect( txtFullName, SIGNAL(textChanged(const QString &)),
660 660 this, SLOT(slotFullNameChange(const QString &)) );
661 connect( txtSuffix, SIGNAL(textChanged(const QString &)), this, SLOT(slotSuffixChange(const QString &)) ); 661 connect( txtSuffix, SIGNAL(textChanged(const QString &)),
662 662 this, SLOT(slotSuffixChange(const QString &)) );
663 connect( txtOrganization, SIGNAL(textChanged(const QString &)),
664 this, SLOT(slotOrganizationChange(const QString &)) );
663 connect( txtChooserField1, SIGNAL(textChanged(const QString &)), 665 connect( txtChooserField1, SIGNAL(textChanged(const QString &)),
664 this, SLOT(slotChooser1Change(const QString &)) ); 666 this, SLOT(slotChooser1Change(const QString &)) );
@@ -1058,4 +1060,14 @@ void ContactEditor::slotSuffixChange( const QString& ) {
1058} 1060}
1059 1061
1062void ContactEditor::slotOrganizationChange( const QString &textChanged ){
1063 qWarning( "ContactEditor::slotOrganizationChange( %s )", textChanged.latin1() );
1064 // Special handling for storing Companies:
1065 // If no Fullname is given, we store the Company-Name as lastname
1066 // to handle it like a person..
1067 if ( txtFullName->text() == txtOrganization->text().left( txtFullName->text().length() ) )
1068 txtFullName->setText( textChanged );
1069
1070}
1071
1060void ContactEditor::accept() { 1072void ContactEditor::accept() {
1061 1073
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h
index c6fa48f..e7432ee 100644
--- a/core/pim/addressbook/contacteditor.h
+++ b/core/pim/addressbook/contacteditor.h
@@ -102,4 +102,5 @@ class ContactEditor : public QDialog {
102 void slotFullNameChange( const QString &textChanged ); 102 void slotFullNameChange( const QString &textChanged );
103 void slotSuffixChange( const QString &textChanged ); 103 void slotSuffixChange( const QString &textChanged );
104 void slotOrganizationChange( const QString &textChanged );
104 void slotAnniversaryDateChanged( int year, int month, int day); 105 void slotAnniversaryDateChanged( int year, int month, int day);
105 void slotBirthdayDateChanged( int year, int month, int day); 106 void slotBirthdayDateChanged( int year, int month, int day);
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h
index c0465b5..4c93584 100644
--- a/core/pim/addressbook/version.h
+++ b/core/pim/addressbook/version.h
@@ -4,5 +4,5 @@
4#define MAINVERSION "0" 4#define MAINVERSION "0"
5#define SUBVERSION "9" 5#define SUBVERSION "9"
6#define PATCHVERSION "4" 6#define PATCHVERSION "5"
7 7
8#define APPNAME "OPIE_ADDRESSBOOK" 8#define APPNAME "OPIE_ADDRESSBOOK"