Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AbView Class Reference

#include </home/clem/local/src/opie/core/pim/addressbook/abview.h>

Collaboration diagram for AbView:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Views { TableView = 0, CardView, PersonalView }

Public Slots

void slotDoFind (const QString &str, bool caseSensitive, bool useRegExp, bool backwards, QString category=QString::null)
void slotSwitch ()
void slotSetSortOrder (bool order)

Signals

void signalNotFound ()
void signalClearLetterPicker ()
void signalViewSwitched (int)

Public Member Functions

 AbView (QWidget *parent, const QValueList< int > &ordered)
 ~AbView ()
bool save ()
void load ()
void reload ()
void clear ()
void setView (Views view)
void showPersonal (bool personal)
void setCurrentUid (int uid)
void setShowByCategory (const QString &cat)
void setShowToView (Views view)
void setShowByLetter (char c, AbConfig::LPSearchMode mode=AbConfig::LastName)
void setListOrder (const QValueList< int > &ordered)
void addEntry (const Opie::OPimContact &newContact)
void removeEntry (const int UID)
void replaceEntry (const Opie::OPimContact &contact)
Opie::OPimContact currentEntry ()
void inSearch ()
void offSearch ()
QString showCategory () const
QStringList categories ()

Private Member Functions

void updateListinViews ()
void updateView (bool newdata=false)
void clearForCategory ()
bool contactCompare (const Opie::OPimContact &cnt, int category)
void parseName (const QString &name, QString *first, QString *middle, QString *last)

Private Attributes

Categories mCat
bool m_inSearch
bool m_inPersonal
bool m_sortOrder
int m_curr_category
Views m_curr_View
Views m_prev_View
int m_curr_Contact
Opie::OPimContactAccessm_contactdb
Opie::OPimContactAccessm_storedDB
Opie::OPimContactAccess::List m_list
QWidgetStack * m_viewStack
AbTablem_abTable
AbLabelm_ablabel
QValueList< int > m_orderedFields

Member Enumeration Documentation

enum AbView::Views
 

Enumeration values:
TableView 
CardView 
PersonalView 

Definition at line 22 of file abview.h.


Constructor & Destructor Documentation

AbView::AbView QWidget *  parent,
const QValueList< int > &  ordered
 

Definition at line 40 of file abview.cpp.

References CardView, categoryFileName(), l, load(), Categories::load(), m_ablabel, m_abTable, m_contactdb, m_orderedFields, m_viewStack, mCat, odebug, oendl, slotSetSortOrder(), slotSwitch(), and TableView.

AbView::~AbView  ) 
 

Definition at line 92 of file abview.cpp.

References m_contactdb, m_storedDB, and save().


Member Function Documentation

void AbView::addEntry const Opie::OPimContact newContact  ) 
 

Definition at line 111 of file abview.cpp.

References Opie::OPimAccessTemplate< T >::add(), load(), m_contactdb, odebug, and oendl.

Referenced by AddressbookWindow::setDocument(), and AddressbookWindow::slotItemDuplicate().

QStringList AbView::categories  ) 
 

Definition at line 347 of file abview.cpp.

References categoryFileName(), Categories::labels(), Categories::load(), and mCat.

void AbView::clear  ) 
 

Definition at line 193 of file abview.cpp.

Referenced by AddressbookWindow::reload().

void AbView::clearForCategory  )  [private]
 

Definition at line 429 of file abview.cpp.

References contactCompare(), m_curr_category, and m_list.

Referenced by setShowByLetter(), and slotDoFind().

bool AbView::contactCompare const Opie::OPimContact cnt,
int  category
[private]
 

Definition at line 446 of file abview.cpp.

References i.

Referenced by clearForCategory().

Opie::OPimContact AbView::currentEntry  ) 
 

Definition at line 133 of file abview.cpp.

References CardView, m_ablabel, m_abTable, m_curr_Contact, m_curr_View, TableView, and Qtopia::Record::uid().

Referenced by AddressbookWindow::exportvCard(), AddressbookWindow::slotItemDelete(), and AddressbookWindow::slotItemDuplicate().

void AbView::inSearch  )  [inline]
 

Definition at line 46 of file abview.h.

References m_inSearch.

void AbView::load  ) 
 

Definition at line 156 of file abview.cpp.

References Opie::OPimContactAccess::DoNotShowWithCategory, Opie::OPimBase::FilterCategory, Opie::OPimBase::FilterOff, m_contactdb, m_curr_category, m_list, m_sortOrder, odebug, oendl, signalClearLetterPicker(), Opie::OPimAccessTemplate< T >::sorted(), Opie::OPimContactAccess::SortFileAsName, and updateView().

Referenced by AbView(), addEntry(), offSearch(), reload(), removeEntry(), replaceEntry(), setShowByCategory(), setShowByLetter(), setView(), and showPersonal().

void AbView::offSearch  ) 
 

Definition at line 397 of file abview.cpp.

References load(), and m_inSearch.

void AbView::parseName const QString name,
QString first,
QString middle,
QString last
[private]
 

void AbView::reload  ) 
 

Definition at line 185 of file abview.cpp.

References load(), m_contactdb, odebug, oendl, and Opie::OPimAccessTemplate< T >::reload().

Referenced by AddressbookWindow::reload(), and slotSetSortOrder().

void AbView::removeEntry const int  UID  ) 
 

Definition at line 118 of file abview.cpp.

References load(), m_contactdb, odebug, oendl, and Opie::OPimAccessTemplate< T >::remove().

Referenced by AddressbookWindow::slotItemDelete().

void AbView::replaceEntry const Opie::OPimContact contact  ) 
 

Definition at line 125 of file abview.cpp.

References load(), m_contactdb, odebug, oendl, and Opie::OPimAccessTemplate< T >::replace().

bool AbView::save  ) 
 

Definition at line 149 of file abview.cpp.

References m_contactdb, and Opie::OPimContactAccess::save().

Referenced by AddressbookWindow::flush(), AddressbookWindow::save(), and ~AbView().

void AbView::setCurrentUid int  uid  ) 
 

Definition at line 340 of file abview.cpp.

References m_curr_Contact, and updateView().

Referenced by AddressbookWindow::slotItemDuplicate().

void AbView::setListOrder const QValueList< int > &  ordered  ) 
 

Definition at line 284 of file abview.cpp.

References m_abTable, m_orderedFields, AbTable::refresh(), AbTable::setOrderedList(), and updateView().

void AbView::setShowByCategory const QString cat  ) 
 

Definition at line 198 of file abview.cpp.

References Categories::id(), QString::isNull(), load(), m_curr_category, mCat, odebug, oendl, signalClearLetterPicker(), and tr.

Referenced by AddressbookWindow::slotPersonalView().

void AbView::setShowByLetter char  c,
AbConfig::LPSearchMode  mode = AbConfig::LastName
 

Definition at line 239 of file abview.cpp.

References assert, clearForCategory(), AbConfig::FileAs, Opie::OPimBase::FilterCategory, Opie::OPimAccessTemplate< T >::hasQuerySettings(), Opie::OPimBase::IgnoreCase, AbConfig::LASTELEMENT, AbConfig::LastName, load(), m_contactdb, m_curr_category, m_curr_Contact, m_list, odebug, oendl, owarn, Opie::OPimAccessTemplate< T >::queryByExample(), Opie::OPimContact::setFileAs(), Opie::OPimContact::setLastName(), Opie::OPimAccessTemplate< T >::sorted(), Opie::OPimContactAccess::SortFileAsName, updateView(), and Opie::OPimBase::WildCards.

Referenced by AddressbookWindow::slotSetLetter().

void AbView::setShowToView Views  view  ) 
 

Definition at line 225 of file abview.cpp.

References m_curr_category, m_curr_View, m_prev_View, odebug, oendl, and updateView().

void AbView::setView Views  view  ) 
 

Definition at line 104 of file abview.cpp.

References load(), m_curr_View, odebug, and oendl.

QString AbView::showCategory  )  const
 

Definition at line 295 of file abview.cpp.

References Categories::label(), m_curr_category, and mCat.

void AbView::showPersonal bool  personal  ) 
 

Definition at line 300 of file abview.cpp.

References addressbookPersonalVCardName(), CardView, l, load(), m_contactdb, m_curr_View, m_inPersonal, m_storedDB, QString::null, odebug, oendl, Opie::OPimContactAccess::save(), and TableView.

Referenced by AddressbookWindow::slotPersonalView().

void AbView::signalClearLetterPicker  )  [signal]
 

Referenced by load(), setShowByCategory(), and slotDoFind().

void AbView::signalNotFound  )  [signal]
 

Referenced by slotDoFind().

void AbView::signalViewSwitched int   )  [signal]
 

Referenced by updateView().

void AbView::slotDoFind const QString str,
bool  caseSensitive,
bool  useRegExp,
bool  backwards,
QString  category = QString::null
[slot]
 

Definition at line 355 of file abview.cpp.

References category(), clearForCategory(), Categories::id(), QString::isEmpty(), m_contactdb, m_curr_category, m_list, Opie::OPimAccessTemplate< T >::matchRegexp(), mCat, QRegExp::setCaseSensitive(), QRegExp::setWildcard(), signalClearLetterPicker(), signalNotFound(), and updateView().

Referenced by AddressbookWindow::slotFind().

void AbView::slotSetSortOrder bool  order  )  [slot]
 

Definition at line 422 of file abview.cpp.

References m_sortOrder, and reload().

Referenced by AbView().

void AbView::slotSwitch  )  [slot]
 

Definition at line 404 of file abview.cpp.

References CardView, m_curr_View, m_prev_View, odebug, oendl, TableView, and updateView().

Referenced by AbView().

void AbView::updateListinViews  )  [private]
 

Definition at line 476 of file abview.cpp.

References m_ablabel, m_abTable, and m_list.

Referenced by updateView().

void AbView::updateView bool  newdata = false  )  [private]
 

Definition at line 482 of file abview.cpp.

References CardView, m_ablabel, m_abTable, m_curr_Contact, m_curr_View, m_list, m_orderedFields, m_prev_View, m_viewStack, signalViewSwitched(), TableView, and updateListinViews().

Referenced by load(), setCurrentUid(), setListOrder(), setShowByLetter(), setShowToView(), slotDoFind(), and slotSwitch().


Member Data Documentation

AbLabel* AbView::m_ablabel [private]
 

Definition at line 86 of file abview.h.

Referenced by AbView(), currentEntry(), updateListinViews(), and updateView().

AbTable* AbView::m_abTable [private]
 

Definition at line 85 of file abview.h.

Referenced by AbView(), currentEntry(), setListOrder(), updateListinViews(), and updateView().

Opie::OPimContactAccess* AbView::m_contactdb [private]
 

Definition at line 80 of file abview.h.

Referenced by AbView(), addEntry(), load(), reload(), removeEntry(), replaceEntry(), save(), setShowByLetter(), showPersonal(), slotDoFind(), and ~AbView().

int AbView::m_curr_category [private]
 

Definition at line 75 of file abview.h.

Referenced by clearForCategory(), load(), setShowByCategory(), setShowByLetter(), setShowToView(), showCategory(), and slotDoFind().

int AbView::m_curr_Contact [private]
 

Definition at line 78 of file abview.h.

Referenced by currentEntry(), setCurrentUid(), setShowByLetter(), and updateView().

Views AbView::m_curr_View [private]
 

Definition at line 76 of file abview.h.

Referenced by currentEntry(), setShowToView(), setView(), showPersonal(), slotSwitch(), and updateView().

bool AbView::m_inPersonal [private]
 

Definition at line 73 of file abview.h.

Referenced by showPersonal().

bool AbView::m_inSearch [private]
 

Definition at line 72 of file abview.h.

Referenced by inSearch(), and offSearch().

Opie::OPimContactAccess::List AbView::m_list [private]
 

Definition at line 82 of file abview.h.

Referenced by clearForCategory(), load(), setShowByLetter(), slotDoFind(), updateListinViews(), and updateView().

QValueList<int> AbView::m_orderedFields [private]
 

Definition at line 88 of file abview.h.

Referenced by AbView(), setListOrder(), and updateView().

Views AbView::m_prev_View [private]
 

Definition at line 77 of file abview.h.

Referenced by setShowToView(), slotSwitch(), and updateView().

bool AbView::m_sortOrder [private]
 

Definition at line 74 of file abview.h.

Referenced by load(), and slotSetSortOrder().

Opie::OPimContactAccess* AbView::m_storedDB [private]
 

Definition at line 81 of file abview.h.

Referenced by showPersonal(), and ~AbView().

QWidgetStack* AbView::m_viewStack [private]
 

Definition at line 84 of file abview.h.

Referenced by AbView(), and updateView().

Categories AbView::mCat [private]
 

Definition at line 71 of file abview.h.

Referenced by AbView(), categories(), setShowByCategory(), showCategory(), and slotDoFind().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:25:51 2005 for OPIE by  doxygen 1.4.2