summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abtable.h
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abtable.h') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.h87
1 files changed, 31 insertions, 56 deletions
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h
index 35a1e9e..83bd5a7 100644
--- a/core/pim/addressbook/abtable.h
+++ b/core/pim/addressbook/abtable.h
@@ -1,4 +1,5 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (c) 2002 Stefan Eilers (eilers.stefan@epost.de)
**
** This file is part of Qt Palmtop Environment.
@@ -24,4 +25,5 @@
#include <qpe/categories.h>
#include <opie/ocontact.h>
+#include <opie/ocontactaccess.h>
#include <qmap.h>
@@ -30,6 +32,4 @@
#include <qcombobox.h>
-#include <opie/ocontactaccess.h>
-
class AbTableItem : public QTableItem
{
@@ -64,52 +64,38 @@ class AbTable : public QTable
public:
- AbTable( const QValueList<int> *ordered, QWidget *parent, const char *name=0 );
+ AbTable( const QValueList<int> ordered, QWidget *parent, const char *name=0 );
~AbTable();
- // NEW
- void addEntry( const OContact &newContact );
+
+ // Set the contacts shown in the table
+ void setContacts( const OContactAccess::List& viewList );
+ // Selects a contact of a specific UID
+ bool selectContact( int UID );
+
+ // Get the current selected entry
OContact currentEntry();
- void replaceCurrentEntry( const OContact &newContact );
- void init();
+ // Get the UID of the current selected Entry
+ int currentEntry_UID();
- void deleteCurrentEntry();
+ QString findContactName( const OContact &entry );
+
+ void init();
void clear();
- void clearFindRow() { currFindRow = -1; }
- void loadFields();
void refresh();
- bool save();
- void load();
- void reload();
-
- // addresspicker mode
- void setChoiceNames( const QStringList& list);
- QStringList choiceNames() const;
- void setChoiceSelection(int index, const QStringList& list);
- QStringList choiceSelection(int index) const;
- void setShowCategory( const QString &b, const QString &c );
- void setShowByLetter( char c );
- QString showCategory() const;
- QStringList categories();
-
- void resizeRows();
void show();
void setPaintingEnabled( bool e );
- QString showBook() const;
-
- void inSearch() { m_inSearch = true; }
- void offSearch() { m_inSearch = false; }
+ // addresspicker mode (What's that ? se)
+ void setChoiceNames( const QStringList& list);
+ QStringList choiceNames() const;
+ void setChoiceSelection( const QValueList<int>& list );
+ QStringList choiceSelection(int index) const;
-public slots:
- void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, bool backwards,
- QString category = QString::null );
signals:
- void empty( bool );
- void details();
- void signalNotFound();
- void signalWrapAround();
- void signalSearchBackward(); // Signalled if backward search is requested
- void signalSearchNext(); // Singalled if forward search is requested
+ void signalSwitch();
+ void signalEditor();
+ void signalKeyDown();
+ void signalKeyUp();
protected:
@@ -128,33 +114,22 @@ protected slots:
private:
- void loadFile( const QString &strFile, bool journalFile );
+ void insertIntoTable( const OContact &cnt, int row );
+ QString findContactContact( const OContact &entry, int row );
void fitColumns();
+ void resizeRows();
+ void realignTable();
void resort();
- void updateJournal( const OContact &contact, OContact::journal_action action,
- int row = -1 );
- void insertIntoTable( const OContact &contact, int row );
- QString findContactName( const OContact &entry );
- QString findContactContact( const OContact &entry, int row );
- void journalFreeReplace( const OContact &cnt, int row );
- void journalFreeRemove( int row );
- void realignTable( int );
void updateVisible();
+
int lastSortCol;
bool asc;
- char showChar;
QMap<AbTableItem*, OContact> contactList;
- const QValueList<int> *intFields;
- int currFindRow;
- QString showCat;
+ QValueList<int> intFields;
QStringList choicenames;
bool enablePainting;
- Categories mCat;
- QString showBk;
bool columnVisible;
- bool m_inSearch;
-
- OContactAccess m_contactdb;
+ OContactAccess::List m_viewList;
};