-rw-r--r-- | core/pim/addressbook/TODO | 18 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.h | 2 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 2 |
4 files changed, 14 insertions, 11 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 0accd87..4daa2a8 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -1,31 +1,33 @@ | |||
1 | Stuff todo: | 1 | Stuff todo until OPIE 1.0 : |
2 | 2 | ||
3 | Urgent: | 3 | Urgent: |
4 | 4 | ||
5 | - Font menu is invisible using german translation | 5 | - Font menu is invisible using german translation |
6 | 6 | ||
7 | Important: | 7 | Important: |
8 | 8 | ||
9 | - Finishing of new View functions (List, Phonebook...) | 9 | - Picker: Activated letter schould be more visible |
10 | - Reload if contacts were changed externally | ||
11 | - "What's this" should be added | 10 | - "What's this" should be added |
12 | - The names of the countries are sorted by there english names, only.. | ||
13 | Even if they are translated.. :S | ||
14 | - Store last settings of combo-boxes | 11 | - Store last settings of combo-boxes |
15 | - Mail-Icon is missing | 12 | - Mail-Icon is missing |
13 | - Finishing of new View functions (List, Phonebook...) | ||
14 | - The names of the countries are sorted by there english names, only.. | ||
15 | Even if they are translated.. :S | ||
16 | - Reload if contacts were changed externally | ||
16 | 17 | ||
17 | Less important: | 18 | Less important: |
18 | 19 | ||
19 | - Find widget should be replaced by something like | ||
20 | qpdf has. | ||
21 | - The picker (alphabetical sort widget) should be | 20 | - The picker (alphabetical sort widget) should be |
22 | placed verticaly or horizontally (configurable) | 21 | placed verticaly or horizontally (configurable) |
23 | - Use advanced database functions in abtable to decrease | 22 | - Use advanced database functions in abtable to decrease |
24 | memory footprint and to make everything more easy ! | 23 | memory footprint and to make everything more easy ! |
25 | (abtable should store Iterator for selected Category) | 24 | (abtable should store Iterator for selected Category) |
26 | 25 | ||
27 | Should be Fixed (not absolute sure, need validation): | 26 | Should be Fixed (not absolute sure, need further validation): |
28 | - "Nonenglish" translation bug has to be fixed. | 27 | - "Nonenglish" translation bug has to be fixed. |
29 | 28 | ||
30 | Fixed: | 29 | Fixed: |
31 | - Syncing: abtable not reloaded after sync. | 30 | - Syncing: abtable not reloaded after sync. |
31 | - Find widget should be replaced by something like | ||
32 | qpdf has. | ||
33 | - Adding a configuration dialog \ No newline at end of file | ||
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 97f4a8f..d4dcf7b 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -625,46 +625,47 @@ void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch ) | |||
625 | // } | 625 | // } |
626 | 626 | ||
627 | // int AbTable::rowPos( int row ) const | 627 | // int AbTable::rowPos( int row ) const |
628 | // { | 628 | // { |
629 | // return 18*row; | 629 | // return 18*row; |
630 | // } | 630 | // } |
631 | 631 | ||
632 | // int AbTable::rowAt( int pos ) const | 632 | // int AbTable::rowAt( int pos ) const |
633 | // { | 633 | // { |
634 | // return QMIN( pos/18, numRows()-1 ); | 634 | // return QMIN( pos/18, numRows()-1 ); |
635 | // } | 635 | // } |
636 | 636 | ||
637 | void AbTable::slotDoFind( const QString &findString, bool caseSensitive, | 637 | void AbTable::slotDoFind( const QString &findString, bool caseSensitive, bool useRegExp, |
638 | bool backwards, QString cat /* int category */ ) | 638 | bool backwards, QString cat /* int category */ ) |
639 | { | 639 | { |
640 | int category = 0; | 640 | int category = 0; |
641 | 641 | ||
642 | // Use the current Category if nothing else selected | 642 | // Use the current Category if nothing else selected |
643 | if ( cat.isEmpty() ) | 643 | if ( cat.isEmpty() ) |
644 | category = mCat.id( "Contacts", showCat ); | 644 | category = mCat.id( "Contacts", showCat ); |
645 | else{ | 645 | else{ |
646 | category = mCat.id("Contacts", cat ); | 646 | category = mCat.id("Contacts", cat ); |
647 | } | 647 | } |
648 | 648 | ||
649 | qWarning ("Found in Category %d", category); | 649 | qWarning ("Found in Category %d", category); |
650 | 650 | ||
651 | if ( currFindRow < -1 ) | 651 | if ( currFindRow < -1 ) |
652 | currFindRow = - 1; | 652 | currFindRow = - 1; |
653 | 653 | ||
654 | clearSelection( TRUE ); | 654 | clearSelection( TRUE ); |
655 | int rows, row; | 655 | int rows, row; |
656 | AbTableItem *ati; | 656 | AbTableItem *ati; |
657 | QRegExp r( findString ); | 657 | QRegExp r( findString ); |
658 | r.setCaseSensitive( caseSensitive ); | 658 | r.setCaseSensitive( caseSensitive ); |
659 | r.setWildcard( !useRegExp ); | ||
659 | rows = numRows(); | 660 | rows = numRows(); |
660 | static bool wrapAround = true; | 661 | static bool wrapAround = true; |
661 | 662 | ||
662 | if ( !backwards ) { | 663 | if ( !backwards ) { |
663 | for ( row = currFindRow + 1; row < rows; row++ ) { | 664 | for ( row = currFindRow + 1; row < rows; row++ ) { |
664 | ati = static_cast<AbTableItem*>( item(row, 0) ); | 665 | ati = static_cast<AbTableItem*>( item(row, 0) ); |
665 | if ( contactCompare( contactList[ati], r, category ) ) | 666 | if ( contactCompare( contactList[ati], r, category ) ) |
666 | break; | 667 | break; |
667 | } | 668 | } |
668 | } else { | 669 | } else { |
669 | for ( row = currFindRow - 1; row > -1; row-- ) { | 670 | for ( row = currFindRow - 1; row > -1; row-- ) { |
670 | ati = static_cast<AbTableItem*>( item(row, 0) ); | 671 | ati = static_cast<AbTableItem*>( item(row, 0) ); |
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 1039e66..b445874 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -90,25 +90,25 @@ public: | |||
90 | void setShowByLetter( char c ); | 90 | void setShowByLetter( char c ); |
91 | QString showCategory() const; | 91 | QString showCategory() const; |
92 | QStringList categories(); | 92 | QStringList categories(); |
93 | 93 | ||
94 | void resizeRows(); | 94 | void resizeRows(); |
95 | 95 | ||
96 | void show(); | 96 | void show(); |
97 | void setPaintingEnabled( bool e ); | 97 | void setPaintingEnabled( bool e ); |
98 | 98 | ||
99 | QString showBook() const; | 99 | QString showBook() const; |
100 | 100 | ||
101 | public slots: | 101 | public slots: |
102 | void slotDoFind( const QString &str, bool caseSensitive, bool backwards, | 102 | void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, bool backwards, |
103 | QString category = QString::null ); | 103 | QString category = QString::null ); |
104 | signals: | 104 | signals: |
105 | void empty( bool ); | 105 | void empty( bool ); |
106 | void details(); | 106 | void details(); |
107 | void signalNotFound(); | 107 | void signalNotFound(); |
108 | void signalWrapAround(); | 108 | void signalWrapAround(); |
109 | 109 | ||
110 | protected: | 110 | protected: |
111 | virtual void keyPressEvent( QKeyEvent *e ); | 111 | virtual void keyPressEvent( QKeyEvent *e ); |
112 | 112 | ||
113 | // int rowHeight( int ) const; | 113 | // int rowHeight( int ) const; |
114 | // int rowPos( int row ) const; | 114 | // int rowPos( int row ) const; |
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 84e66fb..f7e4c95 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -935,25 +935,25 @@ void AddressbookWindow::slotFindClose() | |||
935 | searchBar->hide(); | 935 | searchBar->hide(); |
936 | abList->setFocus(); | 936 | abList->setFocus(); |
937 | } | 937 | } |
938 | void AddressbookWindow::slotFindNext() | 938 | void AddressbookWindow::slotFindNext() |
939 | { | 939 | { |
940 | if ( centralWidget() == abView() ) | 940 | if ( centralWidget() == abView() ) |
941 | showList(); | 941 | showList(); |
942 | 942 | ||
943 | // Maybe we should react on Wraparound and notfound ? | 943 | // Maybe we should react on Wraparound and notfound ? |
944 | // QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) ); | 944 | // QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) ); |
945 | // QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); | 945 | // QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); |
946 | 946 | ||
947 | abList->slotDoFind( searchEdit->text(), false, false); | 947 | abList->slotDoFind( searchEdit->text(), caseSensitive, useRegExp, false); |
948 | 948 | ||
949 | 949 | ||
950 | if ( abList->numSelections() ) | 950 | if ( abList->numSelections() ) |
951 | abList->clearSelection(); | 951 | abList->clearSelection(); |
952 | 952 | ||
953 | } | 953 | } |
954 | 954 | ||
955 | void AddressbookWindow::slotFind() | 955 | void AddressbookWindow::slotFind() |
956 | { | 956 | { |
957 | 957 | ||
958 | abList->clearFindRow(); | 958 | abList->clearFindRow(); |
959 | slotFindNext(); | 959 | slotFindNext(); |