identityeditvcarddialog.h 1.53 KB
Newer Older
1
/*
Laurent Montel's avatar
Laurent Montel committed
2
  Copyright (c) 2012-2017 Montel Laurent <montel@kde.org>
Laurent Montel's avatar
Laurent Montel committed
3

4 5 6
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License, version 2, as
  published by the Free Software Foundation.
Laurent Montel's avatar
Laurent Montel committed
7

8 9 10 11
  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.
Laurent Montel's avatar
Laurent Montel committed
12

13 14 15 16 17 18 19 20
  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
*/

#ifndef IDENTITYEDITVCARDDIALOG_H
#define IDENTITYEDITVCARDDIALOG_H

Laurent Montel's avatar
Laurent Montel committed
21
#include <QDialog>
22

Laurent Montel's avatar
Laurent Montel committed
23
namespace Akonadi {
Laurent Montel's avatar
Laurent Montel committed
24
class AkonadiContactEditor;
25 26
}

Laurent Montel's avatar
Laurent Montel committed
27
class IdentityEditVcardDialog : public QDialog
28
{
Laurent Montel's avatar
Minor  
Laurent Montel committed
29
    Q_OBJECT
30
public:
Laurent Montel's avatar
Laurent Montel committed
31
    explicit IdentityEditVcardDialog(const QString &fileName, QWidget *parent = nullptr);
Laurent Montel's avatar
Minor  
Laurent Montel committed
32
    ~IdentityEditVcardDialog();
Laurent Montel's avatar
Cleanup  
Laurent Montel committed
33
    /**
Laurent Montel's avatar
Laurent Montel committed
34 35 36
    * @brief loadVcard load vcard in a contact editor
    * @param vcardFileName
    */
Laurent Montel's avatar
Minor  
Laurent Montel committed
37 38
    void loadVcard(const QString &vcardFileName);
    /**
Laurent Montel's avatar
Laurent Montel committed
39 40 41
    * @brief saveVcard
    * @return The file path for current vcard.
    */
Laurent Montel's avatar
Minor  
Laurent Montel committed
42
    QString saveVcard() const;
Laurent Montel's avatar
Laurent Montel committed
43

Laurent Montel's avatar
Laurent Montel committed
44 45 46
Q_SIGNALS:
    void vcardRemoved();

Laurent Montel's avatar
Laurent Montel committed
47 48 49
private Q_SLOTS:
    void slotDeleteCurrentVCard();

50
private:
Laurent Montel's avatar
Laurent Montel committed
51
    void deleteCurrentVcard(bool deleteOnDisk);
Laurent Montel's avatar
Minor  
Laurent Montel committed
52
    QString mVcardFileName;
Laurent Montel's avatar
Laurent Montel committed
53
    Akonadi::AkonadiContactEditor *mContactEditor;
54 55 56
};

#endif // IDENTITYEDITVCARDDIALOG_H