author | eilers <eilers> | 2005-03-24 16:23:51 (UTC) |
---|---|---|
committer | eilers <eilers> | 2005-03-24 16:23:51 (UTC) |
commit | b390bcd32e188fc3c9fd7067bfc41b60b5e84ad4 (patch) (unidiff) | |
tree | 38bc784605eb06a6669e8708c86cc9cebaa32b2a /core/pim/addressbook/abview.cpp | |
parent | 29da9a4477210843435cbea3ede0d520775fe1a5 (diff) | |
download | opie-b390bcd32e188fc3c9fd7067bfc41b60b5e84ad4.zip opie-b390bcd32e188fc3c9fd7067bfc41b60b5e84ad4.tar.gz opie-b390bcd32e188fc3c9fd7067bfc41b60b5e84ad4.tar.bz2 |
In table view: Clicking on column 0 changes the sortorder.
Version of ths app was changed to 1.2.0
Requested by #1591
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abview.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 8a2db96..9f7f71f 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp | |||
@@ -43,4 +43,5 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
43 | m_inSearch( false ), | 43 | m_inSearch( false ), |
44 | m_inPersonal( false ), | 44 | m_inPersonal( false ), |
45 | m_sortOrder( true ), | ||
45 | m_curr_category( 0 ), | 46 | m_curr_category( 0 ), |
46 | m_curr_View( TableView ), | 47 | m_curr_View( TableView ), |
@@ -81,4 +82,6 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
81 | connect ( m_abTable, SIGNAL( signalSwitch(void) ), | 82 | connect ( m_abTable, SIGNAL( signalSwitch(void) ), |
82 | this, SLOT( slotSwitch(void) ) ); | 83 | this, SLOT( slotSwitch(void) ) ); |
84 | connect ( m_abTable, SIGNAL( signalSortOrderChanged( bool ) ), | ||
85 | this, SLOT( slotSetSortOrder( bool ) ) ); | ||
83 | connect ( m_ablabel, SIGNAL( signalOkPressed(void) ), | 86 | connect ( m_ablabel, SIGNAL( signalOkPressed(void) ), |
84 | this, SLOT( slotSwitch(void) ) ); | 87 | this, SLOT( slotSwitch(void) ) ); |
@@ -162,13 +165,13 @@ void AbView::load() | |||
162 | if ( m_curr_category == -1 ) { | 165 | if ( m_curr_category == -1 ) { |
163 | // Show just unfiled contacts | 166 | // Show just unfiled contacts |
164 | m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, | 167 | m_list = m_contactdb->sorted( m_sortOrder, Opie::OPimContactAccess::SortFileAsName, |
165 | Opie::OPimContactAccess::DoNotShowWithCategory, 0 ); | 168 | Opie::OPimContactAccess::DoNotShowWithCategory, 0 ); |
166 | } elseif ( m_curr_category == 0 ){ | 169 | } elseif ( m_curr_category == 0 ){ |
167 | // Just show all contacts | 170 | // Just show all contacts |
168 | m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, | 171 | m_list = m_contactdb->sorted( m_sortOrder, Opie::OPimContactAccess::SortFileAsName, |
169 | Opie::OPimBase::FilterOff, 0 ); | 172 | Opie::OPimBase::FilterOff, 0 ); |
170 | } else { | 173 | } else { |
171 | // Show contacts with given categories | 174 | // Show contacts with given categories |
172 | m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, | 175 | m_list = m_contactdb->sorted( m_sortOrder, Opie::OPimContactAccess::SortFileAsName, |
173 | Opie::OPimBase::FilterCategory, m_curr_category ); | 176 | Opie::OPimBase::FilterCategory, m_curr_category ); |
174 | } | 177 | } |
@@ -417,4 +420,9 @@ void AbView::slotSwitch(){ | |||
417 | } | 420 | } |
418 | 421 | ||
422 | void AbView::slotSetSortOrder( bool order ){ | ||
423 | m_sortOrder = order; | ||
424 | reload(); | ||
425 | } | ||
426 | |||
419 | // END: Slots | 427 | // END: Slots |
420 | 428 | ||