libkdepim Library API Documentation

KPIM Namespace Reference

KDEPIM classes for drag and drop of mails. More...


Classes

class  BroadcastStatus
 Provides a singleton which broadcasts status messages by emitting signals. More...
class  ClickLineEdit
 This class provides a KLineEdit which contains a greyed-out hinting text as long as the user didn't enter any textLineEdit with customizable "Click here" text. More...
class  CollectingProcess
 An output collecting KProcess class. More...
class  ConfigManager
 Class for managing a set of config options. More...
class  DiffAlgoDisplay
 DiffAlgo and DiffAlgoDisplay work together for displaying differences between two PIM objects like contacts, events or todos. More...
class  KListViewSearchLine
 This class makes it easy to add a search line for filtering the items in a listview based on a simple text search. More...
class  LdapObject
 This class is internal. More...
class  LdapClient
 This class is internal. More...
struct  LdapResult
 Structure describing one result returned by a LDAP query. More...
class  LdapSearch
 This class is internal. More...
class  LDAPUrl
 LDAPUrl. More...
class  LDIF
 LDIF. More...
class  OverlayWidget
 This is a widget that can align itself with another one, without using a layout, so that it can actually be on top of other widgets. More...
class  PluginLoader
 A generic plugin loader for when KPart::Plugin is overkill. More...
class  ProgressManager
 The ProgressManager singleton keeps track of all ongoing transactions and notifies observers (progress dialogs) when their progress percent value changes, when they are completed (by their owner), and when they are canceled. More...
class  ResourceABC
 This class is the implementation of subfolder resources for KABC. More...

Typedefs

typedef QValueList< LdapResult > LdapResultList
typedef QValueList< QByteArray > LdapAttrValue
typedef QMap< QString, LdapAttrValue > LdapAttrMap
typedef QValueList< MailSummary > MailList
typedef QMap< ProgressItem *,
bool > 
ProgressItemMap

Functions

static void swapItems (CompletionViewItem *one, CompletionViewItem *other)
QStringList splitEmailAddrList (const QString &aStr)
QCString getEmailAddr (const QString &aStr)
bool getNameAndMail (const QString &aStr, QString &name, QString &mail)
bool compareEmail (const QString &email1, const QString &email2, bool matchName)
static void msgDialog (const QString &msg)
QCString kFileToString (const QString &aFileName, bool aEnsureNL, bool aVerbose)
bool kBytesToFile (const char *aBuffer, int len, const QString &aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
bool kCStringToFile (const QCString &aBuffer, const QString &aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)
bool kByteArrayToFile (const QByteArray &aBuffer, const QString &aFileName, bool aAskIfExists, bool aBackup, bool aVerbose)

Variables

static KStaticDeleter< ProgressManager > progressManagerDeleter


Detailed Description

KDEPIM classes for drag and drop of mails.

// Code example for drag and drop enabled widget

void SomeWidget::contentsDropEvent(QDropEvent *e) { if (e->provides(MailListDrag::format())) { MailList mailList; MailListDrag::decode( e, mailList ); ...


Function Documentation

QStringList KPIM::splitEmailAddrList (  const QString &  aStr  ) 
 

Split a comma separated list of email addresses.

QCString KPIM::getEmailAddr (  const QString &  aStr  ) 
 

Return email address from string.

Examples: "Stefan Taferner <taferner@kde.org>" returns "taferner@kde.org" "joe@nowhere.com" returns "joe@nowhere.com". Note that this only returns the first address.

bool KPIM::getNameAndMail (  const QString &  aStr,
QString &  name,
QString &  mail
) 
 

Return email address and name from string.

Examples: "Stefan Taferner <taferner@kde.org>" returns "taferner@kde.org" and "Stefan Taferner". "joe@nowhere.com" returns "joe@nowhere.com" and "". Note that this only returns the first address. Also note that the return value is TRUE if both the name and the mail are not empty: this does NOT tell you if mail contains a valid email address or just some rubbish.

bool KPIM::compareEmail (  const QString &  email1,
const QString &  email2,
bool  matchName
) 
 

Compare two email addresses.

If matchName is false, it just checks the email address, and returns true if this matches. If matchName is true, both the name and the email must be the same.

QCString KPIM::kFileToString (  const QString &  fileName,
bool  ensureNewline = true,
bool  withDialogs = true
) 
 

Load a file.

Returns a pointer to the memory-block that contains the loaded file. Returns a null string if the file could not be loaded. If withDialogs is FALSE no warning dialogs are opened if there are problems. The string returned is always zero-terminated and therefore one byte longer than the file itself. If ensureNewline is TRUE the string will always have a trailing newline.

Definition at line 28 of file kfileio.cpp.

bool KPIM::kBytesToFile (  const char *  aBuffer,
int  len,
const QString &  aFileName,
bool  aAskIfExists,
bool  aBackup,
bool  aVerbose
) 
 

Save a file.

If withDialogs is FALSE no warning dialogs are opened if there are problems. Returns TRUE on success and FALSE on failure. Replaces existing files without warning if askIfExists==FALSE. Makes a copy if the file exists to filename~ if createBackup==TRUE.

Definition at line 168 of file kfileio.cpp.

Referenced by kByteArrayToFile().

bool KPIM::kByteArrayToFile (  const QByteArray &  buffer,
const QString &  fileName,
bool  askIfExists = false,
bool  createBackup = true,
bool  withDialogs = true
) 
 

Does not stop at NUL.

Definition at line 253 of file kfileio.cpp.

References kBytesToFile().

KDE Logo
This file is part of the documentation for libkdepim Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 06:42:28 2005 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003