~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to kaddressbook/mainwidget.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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.
 
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
19
*/
20
20
 
21
21
#ifndef MAINWIDGET_H
26
26
#include <QtGui/QWidget>
27
27
 
28
28
namespace Akonadi {
29
 
class Collection;
30
 
class ContactGroupViewer;
31
 
class ContactViewer;
32
 
class ContactsFilterProxyModel;
33
 
class EntityMimeTypeFilterModel;
34
 
class EntityTreeView;
35
 
class Item;
36
 
class ItemView;
37
 
class StandardContactActionManager;
 
29
  class Collection;
 
30
  class ContactGroupViewer;
 
31
  class ContactViewer;
 
32
  class ContactsFilterProxyModel;
 
33
  class EntityMimeTypeFilterModel;
 
34
  class EntityTreeView;
 
35
  class Item;
 
36
  class ItemView;
 
37
  class StandardContactActionManager;
38
38
}
39
39
 
40
40
class ContactSwitcher;
48
48
class QStackedWidget;
49
49
class QuickSearchWidget;
50
50
class XXPortManager;
 
51
class QActionGroup;
51
52
 
52
53
class KADDRESSBOOK_EXPORT MainWidget : public QWidget
53
54
{
61
62
    void newContact();
62
63
    void newGroup();
63
64
    void print();
 
65
    void configure();
64
66
 
65
67
  private Q_SLOTS:
66
68
    void delayedInit();
67
69
 
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();
71
73
 
72
 
    void setSimpleGuiMode( bool on );
 
74
    void setViewMode( QAction *action );
73
75
    void setQRCodeShow( bool on );
74
76
 
75
77
    void restoreState();
77
79
 
78
80
  private:
79
81
    void setupGui();
80
 
    void setupActions( KActionCollection* );
 
82
    void setupActions( KActionCollection * );
81
83
    bool showQRCodes();
 
84
    void setViewMode( int mode );
 
85
    void saveSplitterStates() const;
 
86
    void restoreSplitterStates();
82
87
 
83
 
    QAbstractItemModel* allContactsModel();
 
88
    QAbstractItemModel *allContactsModel();
84
89
 
85
90
    /**
86
91
     * Returns the address book collection that is currently
101
106
    QStackedWidget *mDetailsViewStack;
102
107
    ContactSwitcher *mContactSwitcher;
103
108
 
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;
110
116
 
 
117
    QActionGroup *mViewModeGroup;
 
118
 
111
119
    XXPortManager *mXXPortManager;
112
120
    ModelColumnManager *mModelColumnManager;
113
121
    KXMLGUIClient *mXmlGuiClient;