• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kaddressbook

kabcore.h

Go to the documentation of this file.
00001 /*
00002     This file is part of KAddressbook.
00003     Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License along
00016     with this program; if not, write to the Free Software Foundation, Inc.,
00017     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 
00024 #ifndef KABCORE_H
00025 #define KABCORE_H
00026 
00027 #include "core.h"
00028 #include <kabc/field.h>
00029 #include <libkdepim/distributionlist.h>
00030 
00031 #include <QtCore/QHash>
00032 #include <QtGui/QHBoxLayout>
00033 #include <QtGui/QLabel>
00034 #include <QtGui/QWidget>
00035 
00036 namespace KABC {
00037 class AddressBook;
00038 class Ticket;
00039 }
00040 
00041 namespace KPIM {
00042 class AddresseeView;
00043 class CategoryEditDialog;
00044 class CategorySelectDialog;
00045 class DistributionList;
00046 }
00047 
00048 class KAboutData;
00049 class KAction;
00050 class KActionCollection;
00051 class KConfig;
00052 class KStatusBar;
00053 class KToggleAction;
00054 class KXMLGUIClient;
00055 
00056 class QSplitter;
00057 class QHBoxLayout;
00058 class QStackedWidget;
00059 
00060 class AddresseeEditorDialog;
00061 class ExtensionManager;
00062 class FilterSelectionWidget;
00063 class IncSearchWidget;
00064 class JumpButtonBar;
00065 class KAddressBookService;
00066 class KIMProxy;
00067 class LDAPSearchDialog;
00068 class ViewManager;
00069 class XXPortManager;
00070 class KUndoStack;
00071 
00072 namespace KAB {
00073     class DistributionListEntryView;
00074 }
00075 
00076 typedef struct {
00077   KABC::Ticket *ticket;
00078   int counter;
00079 } ResourceMapEntry;
00080 
00081 class KADDRESSBOOK_EXPORT KABCore : public KAB::Core
00082 {
00083   Q_OBJECT
00084 
00085   public:
00086     KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent,
00087              const QString &file = QString(), const char *name = 0 );
00088     ~KABCore();
00089 
00093     void restoreSettings();
00094 
00098     void saveSettings();
00099 
00103     KABC::AddressBook *addressBook() const;
00104 
00108     KConfig *config() const;
00109 
00114     KActionCollection *actionCollection() const;
00115 
00119     KABC::Field *currentSortField() const;
00120 
00124     QStringList selectedUIDs() const;
00125 
00131     KABC::Resource *requestResource( QWidget *parent );
00132 
00136     QWidget *widget() const;
00137 
00138     static KAboutData createAboutData();
00139 
00140     void setStatusBar( KStatusBar *statusBar );
00141 
00142     KStatusBar *statusBar() const;
00143 
00144     KAB::SearchManager *searchManager() const { return mSearchManager; }
00145 
00146     QUndoStack *commandHistory() const { return ( QUndoStack* )( mCommandHistory ); }
00147 
00151     virtual KPIM::DistributionList::List distributionLists() const;
00152 
00156     virtual QStringList distributionListNames() const;
00157 
00162     virtual void setSelectedDistributionList( const QString &name );
00163 
00164   public Q_SLOTS:
00168     void setContactSelected( const QString &uid );
00169 
00174     void sendMail();
00175 
00180     void sendMail( const QString& email );
00181 
00182 
00183     void mailVCard();
00184     void mailVCard(const QStringList& uids);
00185 
00189     void startChat();
00190 
00194     void browse( const QString& url );
00195 
00199     void selectAllContacts();
00200 
00204     void deleteContacts();
00205 
00211     void deleteContacts( const QStringList &uids );
00212 
00218     void deleteDistributionLists( const QStringList &names );
00219 
00220 
00224     void copyContacts();
00225 
00229     void cutContacts();
00230 
00234     void pasteContacts();
00235 
00241     void pasteContacts( KABC::Addressee::List &list );
00242 
00243 
00247     void mergeContacts();
00248 
00253     void setWhoAmI();
00254 
00259     void setCategories();
00260 
00265     void incrementalTextSearch( const QString& text );
00266 
00267     void incrementalJumpButtonSearch( const QString& characters );
00268 
00272     void setModified();
00273 
00277     void setModified( bool modified );
00278 
00282     bool modified() const;
00283 
00288     void contactModified( const KABC::Addressee &addr );
00289 
00293     virtual void addEmail( const QString& addr );
00294 
00298     virtual void importVCard( const KUrl& url );
00299 
00303     virtual void importVCardFromData( const QString& vCard );
00304 
00308     virtual void newContact();
00309 
00313     virtual void newDistributionList();
00314 
00319     virtual QString getNameByPhone( const QString& phone );
00320 
00325     bool handleCommandLine();
00326 
00327 
00331     void save();
00332 
00337     void editContact( const QString &uid = QString() );
00338 
00343     void storeContactIn( const QString &uid = QString(), bool copy = false );
00344 
00349     void copySelectedContactToResource();
00350 
00355     void moveSelectedContactToResource();
00356 
00360     void openLDAPDialog();
00361 
00365     void configure();
00366 
00371     void print();
00372 
00373     void detailsHighlighted( const QString& );
00374 
00375     void showContactsAddress( const QString &uid );
00376 
00377     void configurationChanged();
00378 
00379     bool queryClose();
00380 
00384     void reinitXMLGUI();
00385 
00386   private:
00387 
00388     void editDistributionList( const KPIM::DistributionList &list );
00389     void showDistributionListEntry( const QString &uid );
00390 
00391   private Q_SLOTS:
00392     void setJumpButtonBarVisible( bool visible );
00393     void setDetailsVisible( bool visible );
00394 
00395     void extensionModified( const KABC::Addressee::List &list );
00396     void extensionDeleted( const QStringList &uidList );
00397     void clipboardDataChanged();
00398     void updateIncSearchWidget();
00399 
00400     void slotEditorDestroyed( const QString &uid );
00401     void delayedAddressBookChanged();
00402     void addressBookChanged();
00403 
00404     void categoriesSelected( const QStringList& );
00405     void editCategories();
00406     void slotClearSearchBar();
00407     void slotContactsUpdated();
00408 
00409     void activateDetailsWidget( QWidget *widget );
00410     void deactivateDetailsWidget( QWidget *widget );
00411 
00412     void editDistributionList( const QString &name );
00413 
00414     void removeSelectedContactsFromDistList();
00415     void editSelectedDistributionList();
00416     void sendMailToDistributionList( const QString &id );
00417 
00418   private:
00419     void initGUI();
00420     void createJumpButtonBar();
00421     void initActions();
00422 
00423     void updateCategories();
00424     QStringList allCategories() const;
00425 
00426     AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent );
00427 
00428     QWidget *mWidget;
00429     KABC::AddressBook *mAddressBook;
00430     KStatusBar *mStatusBar;
00431 
00432     ViewManager *mViewManager;
00433     QLabel *mViewHeaderLabel;
00434 
00435     QString mSelectedDistributionList;
00436     QWidget *mDistListButtonWidget;
00437 
00438     ExtensionManager *mExtensionManager;
00439     XXPortManager *mXXPortManager;
00440 
00441     JumpButtonBar *mJumpButtonBar;
00442     FilterSelectionWidget *mFilterSelectionWidget;
00443     IncSearchWidget *mIncSearchWidget;
00444     KAB::DistributionListEntryView* mDistListEntryView;
00445     KPIM::AddresseeView *mDetailsViewer;
00446     KPIM::CategorySelectDialog *mCategorySelectDialog;
00447     KPIM::CategoryEditDialog *mCategoryEditDialog;
00448     QWidget *mDetailsPage;
00449     QWidget *mDetailsWidget;
00450     QHBoxLayout *mDetailsLayout;
00451     QSplitter *mDetailsSplitter;
00452     QSplitter *mLeftSplitter;
00453     QStackedWidget *mDetailsStack;
00454     LDAPSearchDialog *mLdapSearchDialog;
00455     QHash<QString, AddresseeEditorDialog *> mEditorDict;
00456 
00457     bool mReadWrite;
00458     bool mModified;
00459     bool mIsPart;
00460 
00461     QTimer *mAddressBookChangedTimer;
00462 
00463     KAction *mActionPaste;
00464     KAction *mActionCut;
00465     KAction *mActionDelete;
00466     KAction *mActionCopy;
00467     KAction *mActionEditAddressee;
00468     KAction *mActionMoveAddresseeTo;
00469     KAction *mActionCopyAddresseeTo;
00470     KAction *mActionMerge;
00471     KAction *mActionMail;
00472     KAction *mActionMailVCard;
00473     KAction *mActionChat;
00474     KAction *mActionSave;
00475     KAction *mActionDeleteView;
00476     KAction *mActionWhoAmI;
00477     KAction *mActionCategories;
00478     KToggleAction *mActionJumpBar;
00479     KToggleAction *mActionDetails;
00480     KUndoStack *mCommandHistory;
00481 
00482     KAddressBookService *mAddressBookService;
00483 
00484     KAB::SearchManager *mSearchManager;
00485     // KIMProxy provides access to up to date instant messaging presence data
00486     ::KIMProxy *mKIMProxy;
00487     class KABCorePrivate;
00488     KABCorePrivate *d;
00489 };
00490 
00491 #endif

kaddressbook

Skip menu "kaddressbook"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal