summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
authortux_mike <tux_mike>2002-04-17 19:45:48 (UTC)
committer tux_mike <tux_mike>2002-04-17 19:45:48 (UTC)
commitc2c343110573bd8b4d59fbff577969ff23d5c544 (patch) (unidiff)
tree79cff133d04fa7df83783482e27557191ee2e199 /core/pim/addressbook/addressbook.cpp
parentb94bcfb586b838885d7d0503623ea36ee0054464 (diff)
downloadopie-c2c343110573bd8b4d59fbff577969ff23d5c544.zip
opie-c2c343110573bd8b4d59fbff577969ff23d5c544.tar.gz
opie-c2c343110573bd8b4d59fbff577969ff23d5c544.tar.bz2
Added preliminary version of the Picker
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 360aa7e..e502cf6 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -63,6 +63,7 @@
63 63
64#include <qdatetime.h> 64#include <qdatetime.h>
65 65
66#include "picker.h"
66static QString addressbookOldXMLFilename() 67static QString addressbookOldXMLFilename()
67{ 68{
68 QString filename = QPEApplication::documentDir() + "addressbook.xml"; 69 QString filename = QPEApplication::documentDir() + "addressbook.xml";
@@ -98,6 +99,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
98 99
99 setToolBarsMovable( FALSE ); 100 setToolBarsMovable( FALSE );
100 101
102 QBoxLayout *vb = new QVBoxLayout( this, 0, 0 );
101 // Create Toolbars 103 // Create Toolbars
102 104
103 QPEToolBar *bar = new QPEToolBar( this ); 105 QPEToolBar *bar = new QPEToolBar( this );
@@ -189,6 +191,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
189 } 191 }
190 192
191 abList = new AbTable( &orderedFields, this, "table" ); 193 abList = new AbTable( &orderedFields, this, "table" );
194 vb->insertWidget(0,abList);
192 abList->setHScrollBarMode( QScrollView::AlwaysOff ); 195 abList->setHScrollBarMode( QScrollView::AlwaysOff );
193 connect( abList, SIGNAL( empty( bool ) ), 196 connect( abList, SIGNAL( empty( bool ) ),
194 this, SLOT( listIsEmpty( bool ) ) ); 197 this, SLOT( listIsEmpty( bool ) ) );
@@ -205,6 +208,9 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
205 QFile::remove(addressbookOldXMLFilename()); 208 QFile::remove(addressbookOldXMLFilename());
206 } 209 }
207 210
211 pLabel = new LetterPicker( abList );
212 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
213 vb->insertWidget(1,pLabel);
208 catMenu = new QPopupMenu( this ); 214 catMenu = new QPopupMenu( this );
209 catMenu->setCheckable( TRUE ); 215 catMenu->setCheckable( TRUE );
210 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 216 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
@@ -884,6 +890,12 @@ void AddressbookWindow::slotSetCategory( int c )
884 } 890 }
885} 891}
886 892
893void AddressbookWindow::slotSetLetter( char c ) {
894
895 abList->setShowByLetter( c );
896
897}
898
887void AddressbookWindow::populateCategories() 899void AddressbookWindow::populateCategories()
888{ 900{
889 catMenu->clear(); 901 catMenu->clear();