account-identity-dialog.h 1.63 KB
Newer Older
David Edmundson's avatar
David Edmundson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * This file is part of ktp-accounts-kcm
 *
 * Copyright (C) 2011 David Edmundson. <kde@davidedmundson.co.uk>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

21 22 23 24 25 26 27
#ifndef ACCOUNT_IDENTITY_DIALOG_H
#define ACCOUNT_IDENTITY_DIALOG_H

#include <KDialog>

#include <TelepathyQt/Types>

28 29 30 31
namespace Tp {
class PendingOperation;
}

32 33 34 35 36 37 38 39 40 41 42 43 44 45
namespace Ui {
    class AccountIdentityDialog;
}

/** Widget that configures user's identity (nickname/avatar etc) for an account*/

class AccountIdentityDialog : public KDialog
{
    Q_OBJECT

public:
    explicit AccountIdentityDialog(const Tp::AccountPtr &account, QWidget *parent = 0);
    ~AccountIdentityDialog();

46
public Q_SLOTS:
47 48 49
    /** Updates the account to user selection*/
    void apply();

50
private Q_SLOTS:
51
    void onNicknameChanged(const QString &nickname);
52
    void onAvatarChanged(const TpDBus::Avatar &avatar);
53 54 55 56 57 58 59

private:
    Tp::AccountPtr m_account;
    Ui::AccountIdentityDialog *ui;
};

#endif // ACCOUNT_IDENTITY_DIALOG_H