~kubuntu-dev/user-manager/master

137 by Àlex Fiestas
First attempt to implement face changing :p
1
/*************************************************************************************
2
 *  Copyright (C) 2013 by Alejandro Fiestas Olivares <afiestas@kde.org>              *
3
 *                                                                                   *
4
 *  This program is free software; you can redistribute it and/or                    *
5
 *  modify it under the terms of the GNU General Public License                      *
6
 *  as published by the Free Software Foundation; either version 2                   *
7
 *  of the License, or (at your option) any later version.                           *
8
 *                                                                                   *
9
 *  This program is distributed in the hope that it will be useful,                  *
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of                   *
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                    *
12
 *  GNU General Public License for more details.                                     *
13
 *                                                                                   *
14
 *  You should have received a copy of the GNU General Public License                *
15
 *  along with this program; if not, write to the Free Software                      *
16
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
17
 *************************************************************************************/
18
19
#ifndef CREATE_AVATAR_JOB_H
20
#define CREATE_AVATAR_JOB_H
21
22
#include <kjob.h>
297 by David Faure
Port from KUrl to QUrl
23
#include <QUrl>
137 by Àlex Fiestas
First attempt to implement face changing :p
24
25
class CreateAvatarJob : public KJob
26
{
27
     Q_OBJECT
28
    public:
336 by Laurent Montel
Warning--
29
        explicit CreateAvatarJob(QObject* parent = nullptr);
137 by Àlex Fiestas
First attempt to implement face changing :p
30
345 by Laurent Montel
Use override. Use nullptr
31
        void start() override;
297 by David Faure
Port from KUrl to QUrl
32
        void setUrl(const QUrl &url);
143 by Àlex Fiestas
Return the createdAvatar temp file
33
        QString avatarPath() const;
137 by Àlex Fiestas
First attempt to implement face changing :p
34
35
    private Q_SLOTS:
36
        void doStart();
37
        void copyDone(KJob* job);
38
39
    private:
297 by David Faure
Port from KUrl to QUrl
40
        QUrl m_url;
137 by Àlex Fiestas
First attempt to implement face changing :p
41
        QString m_tmpFile;
42
};
43
297 by David Faure
Port from KUrl to QUrl
44
#endif //CREATE_AVATAR_JOB_H