2
This file is part of KAddressBook.
4
Copyright (c) 2007 Tobias Koenig <tokoe@kde.org>
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.
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.
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.
2
This file is part of KAddressBook.
4
Copyright (c) 2007 Tobias Koenig <tokoe@kde.org>
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.
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.
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.
21
21
#ifndef MAINWIDGET_H
26
26
#include <QtGui/QWidget>
28
28
namespace Akonadi {
30
class ContactGroupViewer;
32
class ContactsFilterProxyModel;
33
class EntityMimeTypeFilterModel;
37
class StandardContactActionManager;
30
class ContactGroupViewer;
32
class ContactsFilterProxyModel;
33
class EntityMimeTypeFilterModel;
37
class StandardContactActionManager;
40
40
class ContactSwitcher;
66
68
void delayedInit();
68
70
void itemSelected( const Akonadi::Item &item );
69
void itemSelectionChanged( const QModelIndex&, const QModelIndex& );
71
void itemSelectionChanged( const QModelIndex &, const QModelIndex & );
70
72
void selectFirstItem();
72
void setSimpleGuiMode( bool on );
74
void setViewMode( QAction *action );
73
75
void setQRCodeShow( bool on );
75
77
void restoreState();
80
void setupActions( KActionCollection* );
82
void setupActions( KActionCollection * );
81
83
bool showQRCodes();
84
void setViewMode( int mode );
85
void saveSplitterStates() const;
86
void restoreSplitterStates();
83
QAbstractItemModel* allContactsModel();
88
QAbstractItemModel *allContactsModel();
86
91
* Returns the address book collection that is currently
101
106
QStackedWidget *mDetailsViewStack;
102
107
ContactSwitcher *mContactSwitcher;
104
QSplitter *mMainWidgetSplitter;
109
QSplitter *mMainWidgetSplitter1;
110
QSplitter *mMainWidgetSplitter2;
105
111
Akonadi::ContactViewer *mContactDetails;
106
112
Akonadi::ContactGroupViewer *mContactGroupDetails;
107
113
QWidget *mEmptyDetails;
108
114
Akonadi::StandardContactActionManager *mActionManager;
109
115
QItemSelectionModel *mCollectionSelectionModel;
117
QActionGroup *mViewModeGroup;
111
119
XXPortManager *mXXPortManager;
112
120
ModelColumnManager *mModelColumnManager;
113
121
KXMLGUIClient *mXmlGuiClient;