From c2c343110573bd8b4d59fbff577969ff23d5c544 Mon Sep 17 00:00:00 2001 From: tux_mike Date: Wed, 17 Apr 2002 19:45:48 +0000 Subject: Added preliminary version of the Picker --- (limited to 'core/pim/addressbook/addressbook.cpp') 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 @@ #include +#include "picker.h" static QString addressbookOldXMLFilename() { QString filename = QPEApplication::documentDir() + "addressbook.xml"; @@ -98,6 +99,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, setToolBarsMovable( FALSE ); + QBoxLayout *vb = new QVBoxLayout( this, 0, 0 ); // Create Toolbars QPEToolBar *bar = new QPEToolBar( this ); @@ -189,6 +191,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, } abList = new AbTable( &orderedFields, this, "table" ); + vb->insertWidget(0,abList); abList->setHScrollBarMode( QScrollView::AlwaysOff ); connect( abList, SIGNAL( empty( bool ) ), this, SLOT( listIsEmpty( bool ) ) ); @@ -205,6 +208,9 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, QFile::remove(addressbookOldXMLFilename()); } + pLabel = new LetterPicker( abList ); + connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); + vb->insertWidget(1,pLabel); catMenu = new QPopupMenu( this ); catMenu->setCheckable( TRUE ); connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); @@ -884,6 +890,12 @@ void AddressbookWindow::slotSetCategory( int c ) } } +void AddressbookWindow::slotSetLetter( char c ) { + + abList->setShowByLetter( c ); + +} + void AddressbookWindow::populateCategories() { catMenu->clear(); -- cgit v0.9.0.2