kaddressbookpart.h 1.41 KB
Newer Older
1
/*
Allen Winter's avatar
Allen Winter committed
2
  This file is part of KAddressBook.
3

Laurent Montel's avatar
Laurent Montel committed
4
  Copyright (c) 2009-2016 Laurent Montel <montel@kde.org>
5

Allen Winter's avatar
Allen Winter committed
6 7 8 9
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
10

Allen Winter's avatar
Allen Winter committed
11 12 13 14
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.
15

Allen Winter's avatar
Allen Winter committed
16 17 18
  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 20 21 22 23
*/

#ifndef KADDRESSBOOKPART_H
#define KADDRESSBOOKPART_H

Allen Winter's avatar
Allen Winter committed
24 25
#include <KParts/Event>
#include <KParts/Part>
Laurent Montel's avatar
Laurent Montel committed
26
#include <kparts/readonlypart.h>
27

28 29
class MainWidget;

30 31
class KAddressBookPart: public KParts::ReadOnlyPart
{
Laurent Montel's avatar
Laurent Montel committed
32
    Q_OBJECT
33

Laurent Montel's avatar
Laurent Montel committed
34
public:
Laurent Montel's avatar
Laurent Montel committed
35
    KAddressBookPart(QWidget *parentWidget, QObject *parent, const QVariantList &);
36 37
    virtual ~KAddressBookPart();

38
public Q_SLOTS:
39 40
    void newContact();
    void newGroup();
41
    void updateQuickSearchText();
42

Laurent Montel's avatar
Laurent Montel committed
43
protected:
Laurent Montel's avatar
Laurent Montel committed
44 45
    bool openFile() Q_DECL_OVERRIDE;
    void guiActivateEvent(KParts::GUIActivateEvent *) Q_DECL_OVERRIDE;
46
    void initAction();
Laurent Montel's avatar
Laurent Montel committed
47
private:
48
    MainWidget *mMainWidget;
49 50 51
};

#endif