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

kaddressbook

  • sources
  • kde-4.14
  • kdepim
  • kaddressbook
mainwidget.h
Go to the documentation of this file.
1 /*
2  This file is part of KAddressBook.
3 
4  Copyright (c) 2007 Tobias Koenig <tokoe@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc.,
18  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef MAINWIDGET_H
22 #define MAINWIDGET_H
23 
24 #include "kaddressbook_export.h"
25 #include <Akonadi/Item>
26 #include <QWidget>
27 
28 namespace GrantleeTheme {
29 class GrantleeThemeManager;
30 }
31 class KAction;
32 namespace Akonadi {
33 class Collection;
34 class ContactGroupViewer;
35 class ContactViewer;
36 class ContactsFilterProxyModel;
37 class EntityMimeTypeFilterModel;
38 class EntityTreeView;
39 class Item;
40 class StandardContactActionManager;
41 class EntityTreeModel;
42 }
43 
44 namespace KAddressBookGrantlee {
45 class GrantleeContactFormatter;
46 class GrantleeContactGroupFormatter;
47 }
48 
49 class ContactSwitcher;
50 class KActionCollection;
51 class KXMLGUIClient;
52 class ModelColumnManager;
53 class QAbstractItemModel;
54 class QItemSelectionModel;
55 class QModelIndex;
56 class QSplitter;
57 class QStackedWidget;
58 class QuickSearchWidget;
59 class XXPortManager;
60 class QActionGroup;
61 class CategorySelectWidget;
62 class CategoryFilterProxyModel;
63 
64 class KADDRESSBOOK_EXPORT MainWidget : public QWidget
65 {
66  Q_OBJECT
67 
68 public:
69  explicit MainWidget( KXMLGUIClient *guiClient, QWidget *parent = 0 );
70  ~MainWidget();
71 
72  XXPortManager *importManager() const;
73  void updateQuickSearchText();
74 
75 public Q_SLOTS:
76  void newContact();
77  void newGroup();
78  void print();
79  void printPreview();
80  void configure();
81  void mergeContacts();
82  void slotSearchDuplicateContacts();
83 
84  void handleCommandLine();
85 
86 private Q_SLOTS:
87  void delayedInit();
88 
89  void itemSelected( const Akonadi::Item &item );
90  void itemSelectionChanged( const QModelIndex &, const QModelIndex & );
91  void selectFirstItem();
92 
93  void setViewMode( QAction *action );
94  void setQRCodeShow( bool on );
95 
96  void restoreState();
97  void saveState();
98 
99  void slotGrantleeThemeSelected();
100  void slotGrantleeThemesUpdated();
101  void slotCheckNewCalendar(const QModelIndex &parent, int begin, int end);
102 
103  void slotSendMail();
104 
105  void slotSendMails(const QStringList &emails);
106 
107  void slotDebugBaloo();
108  void slotSendVcards();
109  void slotSendVcardsError(const QString &error);
110 private:
111  const Akonadi::Item::List collectSelectedAllContactsItem(QItemSelectionModel *model);
112  void initGrantleeThemeName();
113  void setupGui();
114  void setupActions( KActionCollection * );
115  bool showQRCodes();
116  void setViewMode( int mode );
117  void saveSplitterStates() const;
118  void restoreSplitterStates();
119 
120  QAbstractItemModel *allContactsModel();
121 
127  Akonadi::Collection currentAddressBook() const;
128 
129  Akonadi::EntityMimeTypeFilterModel *mCollectionTree;
130  Akonadi::EntityMimeTypeFilterModel *mItemTree;
131  Akonadi::EntityMimeTypeFilterModel *mAllContactsModel;
132  Akonadi::ContactsFilterProxyModel *mContactsFilterModel;
133  CategoryFilterProxyModel *mCategoryFilterModel;
134 
135  QuickSearchWidget *mQuickSearchWidget;
136  Akonadi::EntityTreeView *mCollectionView;
137  Akonadi::EntityTreeView *mItemView;
138  CategorySelectWidget *mCategorySelectWidget;
139 
140  QWidget *mDetailsPane;
141  QStackedWidget *mDetailsViewStack;
142  ContactSwitcher *mContactSwitcher;
143 
144  QSplitter *mMainWidgetSplitter1;
145  QSplitter *mMainWidgetSplitter2;
146  Akonadi::ContactViewer *mContactDetails;
147  Akonadi::ContactGroupViewer *mContactGroupDetails;
148  QWidget *mEmptyDetails;
149  Akonadi::StandardContactActionManager *mActionManager;
150  QItemSelectionModel *mCollectionSelectionModel;
151 
152  QActionGroup *mViewModeGroup;
153 
154  XXPortManager *mXXPortManager;
155  ModelColumnManager *mModelColumnManager;
156  KXMLGUIClient *mXmlGuiClient;
157  KAddressBookGrantlee::GrantleeContactFormatter *mFormatter;
158  KAddressBookGrantlee::GrantleeContactGroupFormatter *mGroupFormatter;
159  GrantleeTheme::GrantleeThemeManager *mGrantleeThemeManager;
160  Akonadi::EntityTreeModel *entityTreeModel() const;
161  KAction *mQuickSearchAction;
162 };
163 
164 #endif
kaddressbook_export.h
QModelIndex
QWidget
QActionGroup
CategorySelectWidget
A widget to specify a category (tag) filter.
Definition: categoryselectwidget.h:35
KADDRESSBOOK_EXPORT
#define KADDRESSBOOK_EXPORT
Definition: kaddressbook_export.h:35
CategoryFilterProxyModel
A proxy model to filter contacts by categories (tags).
Definition: categoryfilterproxymodel.h:37
QStackedWidget
QString
QStringList
ContactSwitcher
A widget to switch between the contacts of an contact view.
Definition: contactswitcher.h:37
QSplitter
XXPortManager
The class that manages import and export of contacts.
Definition: xxportmanager.h:40
QAction
QAbstractItemModel
QuickSearchWidget
The quick search widget from the toolbar.
Definition: quicksearchwidget.h:39
QItemSelectionModel
ModelColumnManager
A manager for the contacts model columns.
Definition: modelcolumnmanager.h:39
MainWidget
Definition: mainwidget.h:64
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kaddressbook

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal