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

kaddressbook

  • sources
  • kde-4.12
  • 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 
26 #include <QWidget>
27 
28 namespace GrantleeTheme {
29 class GrantleeThemeManager;
30 }
31 
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 ItemView;
41  class StandardContactActionManager;
42  class EntityTreeModel;
43 }
44 
45 namespace KAddressBookGrantlee {
46 class GrantleeContactFormatter;
47 class GrantleeContactGroupFormatter;
48 }
49 
50 class ContactSwitcher;
51 class KActionCollection;
52 class KXMLGUIClient;
53 class ModelColumnManager;
54 class QAbstractItemModel;
55 class QItemSelectionModel;
56 class QModelIndex;
57 class QSplitter;
58 class QStackedWidget;
59 class QuickSearchWidget;
60 class XXPortManager;
61 class QActionGroup;
62 
63 class KADDRESSBOOK_EXPORT MainWidget : public QWidget
64 {
65  Q_OBJECT
66 
67  public:
68  explicit MainWidget( KXMLGUIClient *guiClient, QWidget *parent = 0 );
69  ~MainWidget();
70 
71  public Q_SLOTS:
72  void newContact();
73  void newGroup();
74  void print();
75  void printPreview();
76  void configure();
77 
78  private Q_SLOTS:
79  void delayedInit();
80 
81  void itemSelected( const Akonadi::Item &item );
82  void itemSelectionChanged( const QModelIndex &, const QModelIndex & );
83  void selectFirstItem();
84 
85  void setViewMode( QAction *action );
86  void setQRCodeShow( bool on );
87 
88  void restoreState();
89  void saveState();
90 
91  void slotGrantleeThemeSelected();
92  void slotGrantleeThemesUpdated();
93  void slotCheckNewCalendar(const QModelIndex &parent, int begin, int end);
94 
95 private:
96  void initGrantleeThemeName();
97  void setupGui();
98  void setupActions( KActionCollection * );
99  bool showQRCodes();
100  void setViewMode( int mode );
101  void saveSplitterStates() const;
102  void restoreSplitterStates();
103 
104  QAbstractItemModel *allContactsModel();
105 
111  Akonadi::Collection currentAddressBook() const;
112 
113  Akonadi::EntityMimeTypeFilterModel *mCollectionTree;
114  Akonadi::EntityMimeTypeFilterModel *mItemTree;
115  Akonadi::EntityMimeTypeFilterModel *mAllContactsModel;
116  Akonadi::ContactsFilterProxyModel *mContactsFilterModel;
117 
118  QuickSearchWidget *mQuickSearchWidget;
119  Akonadi::EntityTreeView *mCollectionView;
120  Akonadi::EntityTreeView *mItemView;
121  QWidget *mDetailsPane;
122  QStackedWidget *mDetailsViewStack;
123  ContactSwitcher *mContactSwitcher;
124 
125  QSplitter *mMainWidgetSplitter1;
126  QSplitter *mMainWidgetSplitter2;
127  Akonadi::ContactViewer *mContactDetails;
128  Akonadi::ContactGroupViewer *mContactGroupDetails;
129  QWidget *mEmptyDetails;
130  Akonadi::StandardContactActionManager *mActionManager;
131  QItemSelectionModel *mCollectionSelectionModel;
132 
133  QActionGroup *mViewModeGroup;
134 
135  XXPortManager *mXXPortManager;
136  ModelColumnManager *mModelColumnManager;
137  KXMLGUIClient *mXmlGuiClient;
138  KAddressBookGrantlee::GrantleeContactFormatter *mFormatter;
139  KAddressBookGrantlee::GrantleeContactGroupFormatter *mGroupFormatter;
140  GrantleeTheme::GrantleeThemeManager *mGrantleeThemeManager;
141  Akonadi::EntityTreeModel *entityTreeModel() const;
142 };
143 
144 #endif
kaddressbook_export.h
KADDRESSBOOK_EXPORT
#define KADDRESSBOOK_EXPORT
Definition: kaddressbook_export.h:35
ContactSwitcher
A widget to switch between the contacts of an contact view.
Definition: contactswitcher.h:37
XXPortManager
The class that manages import and export of contacts.
Definition: xxportmanager.h:40
QuickSearchWidget
The quick search widget from the toolbar.
Definition: quicksearchwidget.h:39
ModelColumnManager
A manager for the contacts model columns.
Definition: modelcolumnmanager.h:39
MainWidget
Definition: mainwidget.h:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:51 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

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