summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index 691ece2..bd85b4e 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -51,71 +51,92 @@ namespace Opie {
* This is just a frontend for the real database handling which is
* done by the backend.
* This class is used to access the Contacts on a system. This class as any OPIE PIM
* class is backend independent.
* @author Stefan Eilers, Holger Freyther
* @see OPimAccessTemplate
*/
class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact>
{
Q_OBJECT
public:
+ /**
+ * Filter for sorted()
+ * @see SortFilterBase in OPimBase
+ */
enum SortFilter {
- DoNotShowNoneChildren = FilterCustom<<1,
- DoNotShowNoneAnniversary = FilterCustom<<2,
- DoNotShowNoneBirthday = FilterCustom<<3,
- DoNotShowNoHomeAddress = FilterCustom<<4,
- DoNotShowNoBusinessAddress = FilterCustom<<5
+ /** Don't return entries who don't have children */
+ DoNotShowWithoutChildren = FilterCustom<<1,
+ /** Don't return entries who don't have an anniversary */
+ DoNotShowWithoutAnniversary = FilterCustom<<2,
+ /** Don't return entries who don't have a birthday */
+ DoNotShowWithoutBirthday = FilterCustom<<3,
+ /** Don't return entries who don't have a home address */
+ DoNotShowWithoutHomeAddress = FilterCustom<<4,
+ /** Don't return entries who don't have a business address */
+ DoNotShowWithoutBusinessAddress = FilterCustom<<5,
+ /** Don't return entries which hava any category */
+ DoNotShowWithCategory = FilterCustom << 6
};
+ /**
+ * Sort order for sorted()
+ * @see SortOrderBase in OPimBase
+ */
enum SortOrder {
SortTitle = SortCustom,
SortFirstName,
SortMiddleName,
+ SortLastName,
SortSuffix,
SortEmail,
SortNickname,
+ SortFileAsName,
SortAnniversary,
SortBirthday,
SortGender
};
/**
* Create Database with contacts (addressbook).
* @param appname Name of application which wants access to the database
* (i.e. "todolist")
* @param filename The name of the database file. If not set, the default one
* is used.
* @param backend Pointer to an alternative Backend. If not set, we will use
* the default backend.
* @param handlesync If <b>true</b> the database stores the current state
* automatically if it receives the signals <i>flush()</i> and <i>reload()</i>
* which are used before and after synchronisation. If the application wants
* to react itself, it should be disabled by setting it to <b>false</b>
* @see OPimContactAccessBackend
*/
OPimContactAccess (const QString appname, const QString filename = 0l,
OPimContactAccessBackend* backend = 0l, bool handlesync = true);
~OPimContactAccess ();
- /** Return all possible settings.
+ /**
+ * Return all possible settings for queryByExample().
* @return All settings provided by the current backend
- * (i.e.: query_WildCards & query_IgnoreCase)
+ * (i.e.: WildCards & IgnoreCase)
+ * @see QuerySettings in OPimBase for details of the parameter
*/
const uint querySettings();
- /** Check whether settings are correct.
+ /**
+ * Check whether settings are correct for queryByExample().
* @return <i>true</i> if the given settings are correct and possible.
+ * @see QuerySettings in OPimBase for details of the parameter
*/
bool hasQuerySettings ( int querySettings ) const;
/**
* if the resource was changed externally.
* You should use the signal instead of polling possible changes !
*/
bool wasChangedExternally()const;
/** Save contacts database.
* Save is more a "commit". After calling this function, all changes are public available.